diff --git a/dist/phaser-arcade-physics.js b/dist/phaser-arcade-physics.js index ecd3dcfd5d..e26329a57a 100644 --- a/dist/phaser-arcade-physics.js +++ b/dist/phaser-arcade-physics.js @@ -360,7 +360,7 @@ if (true) { /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -409,7 +409,7 @@ module.exports = AlignTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -451,7 +451,7 @@ module.exports = Angle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -491,7 +491,7 @@ module.exports = Call; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -550,7 +550,7 @@ module.exports = GetFirst; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -609,7 +609,7 @@ module.exports = GetLast; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -729,7 +729,7 @@ module.exports = GridAlign; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -771,7 +771,7 @@ module.exports = IncAlpha; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -813,7 +813,7 @@ module.exports = IncX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -861,7 +861,7 @@ module.exports = IncXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -903,7 +903,7 @@ module.exports = IncY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -957,7 +957,7 @@ module.exports = PlaceOnCircle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1010,7 +1010,7 @@ module.exports = PlaceOnEllipse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1055,7 +1055,7 @@ module.exports = PlaceOnLine; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1114,7 +1114,7 @@ module.exports = PlaceOnRectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1176,7 +1176,7 @@ module.exports = PlaceOnTriangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1221,7 +1221,7 @@ module.exports = PlayAnimation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1289,7 +1289,7 @@ module.exports = PropertyValueInc; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1357,7 +1357,7 @@ module.exports = PropertyValueSet; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1398,7 +1398,7 @@ module.exports = RandomCircle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1439,7 +1439,7 @@ module.exports = RandomEllipse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1480,7 +1480,7 @@ module.exports = RandomLine; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1519,7 +1519,7 @@ module.exports = RandomRectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1560,7 +1560,7 @@ module.exports = RandomTriangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1602,7 +1602,7 @@ module.exports = Rotate; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1649,7 +1649,7 @@ module.exports = RotateAround; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1699,7 +1699,7 @@ module.exports = RotateAroundDistance; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1741,7 +1741,7 @@ module.exports = ScaleX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1789,7 +1789,7 @@ module.exports = ScaleXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1831,7 +1831,7 @@ module.exports = ScaleY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1873,7 +1873,7 @@ module.exports = SetAlpha; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1914,7 +1914,7 @@ module.exports = SetBlendMode; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1956,7 +1956,7 @@ module.exports = SetDepth; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1996,7 +1996,7 @@ module.exports = SetHitArea; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2050,7 +2050,7 @@ module.exports = SetOrigin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2092,7 +2092,7 @@ module.exports = SetRotation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2140,7 +2140,7 @@ module.exports = SetScale; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2182,7 +2182,7 @@ module.exports = SetScaleX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2224,7 +2224,7 @@ module.exports = SetScaleY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2272,7 +2272,7 @@ module.exports = SetScrollFactor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2314,7 +2314,7 @@ module.exports = SetScrollFactorX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2356,7 +2356,7 @@ module.exports = SetScrollFactorY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2396,7 +2396,7 @@ module.exports = SetTint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2435,7 +2435,7 @@ module.exports = SetVisible; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2477,7 +2477,7 @@ module.exports = SetX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2525,7 +2525,7 @@ module.exports = SetXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2567,7 +2567,7 @@ module.exports = SetY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2693,7 +2693,7 @@ module.exports = ShiftPosition; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2727,7 +2727,7 @@ module.exports = Shuffle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2786,7 +2786,7 @@ module.exports = SmoothStep; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2845,7 +2845,7 @@ module.exports = SmootherStep; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2923,7 +2923,7 @@ module.exports = Spread; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2961,7 +2961,7 @@ module.exports = ToggleVisible; /** * @author Richard Davey * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3012,7 +3012,7 @@ module.exports = WrapInRectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3086,7 +3086,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4016,7 +4016,7 @@ module.exports = Animation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4204,7 +4204,7 @@ module.exports = AnimationFrame; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4216,8 +4216,9 @@ var Events = __webpack_require__(16938); var GameEvents = __webpack_require__(97081); var GetFastValue = __webpack_require__(72632); var GetValue = __webpack_require__(10850); -var Pad = __webpack_require__(76400); +var MATH_CONST = __webpack_require__(83392); var NumberArray = __webpack_require__(13401); +var Pad = __webpack_require__(76400); /** * @classdesc @@ -4646,7 +4647,7 @@ var AnimationManager = new Class({ if (frame) { - var frameDuration = GetFastValue(frame, 'duration', Number.MAX_SAFE_INTEGER); + var frameDuration = GetFastValue(frame, 'duration', MATH_CONST.MAX_SAFE_INTEGER); animFrames.push({ key: key, frame: frameKey, duration: frameDuration }); totalDuration += frameDuration; } @@ -4994,6 +4995,46 @@ var AnimationManager = new Class({ return this.anims.get(key); }, + /** + * Returns an array of all Animation keys that are using the given + * Texture. Only Animations that have at least one AnimationFrame + * entry using this texture will be included in the result. + * + * @method Phaser.Animations.AnimationManager#getAnimsFromTexture + * @since 3.60.0 + * + * @param {(string|Phaser.Textures.Texture|Phaser.Textures.Frame)} key - The unique string-based key of the Texture, or a Texture, or Frame instance. + * + * @return {string[]} An array of Animation keys that feature the given Texture. + */ + getAnimsFromTexture: function (key) + { + var texture = this.textureManager.get(key); + + var match = texture.key; + var anims = this.anims.getArray(); + + var out = []; + + for (var i = 0; i < anims.length; i++) + { + var anim = anims[i]; + var frames = anim.frames; + + for (var c = 0; c < frames.length; c++) + { + if (frames[c].textureKey === match) + { + out.push(anim.key); + + break; + } + } + } + + return out; + }, + /** * Pause all animations. * @@ -5220,7 +5261,7 @@ module.exports = AnimationManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7210,7 +7251,7 @@ module.exports = AnimationState; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7239,7 +7280,7 @@ module.exports = 'add'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7287,7 +7328,7 @@ module.exports = 'animationcomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7339,7 +7380,7 @@ module.exports = 'animationcomplete-'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7384,7 +7425,7 @@ module.exports = 'animationrepeat'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7427,7 +7468,7 @@ module.exports = 'animationrestart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7471,7 +7512,7 @@ module.exports = 'animationstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7515,7 +7556,7 @@ module.exports = 'animationstop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7563,7 +7604,7 @@ module.exports = 'animationupdate'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7589,7 +7630,7 @@ module.exports = 'pauseall'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7615,7 +7656,7 @@ module.exports = 'remove'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7640,7 +7681,7 @@ module.exports = 'resumeall'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7672,7 +7713,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7698,7 +7739,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7885,7 +7926,7 @@ module.exports = BaseCache; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8120,7 +8161,7 @@ module.exports = CacheManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8147,7 +8188,7 @@ module.exports = 'add'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8174,7 +8215,7 @@ module.exports = 'remove'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8197,7 +8238,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8221,7 +8262,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10237,7 +10278,7 @@ module.exports = BaseCamera; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11056,7 +11097,7 @@ module.exports = Camera; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11832,7 +11873,7 @@ module.exports = CameraManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12221,7 +12262,7 @@ module.exports = Fade; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12584,7 +12625,7 @@ module.exports = Flash; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13344,7 +13385,7 @@ module.exports = RotateTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13664,7 +13705,7 @@ module.exports = Shake; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13958,7 +13999,7 @@ module.exports = Zoom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13985,7 +14026,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14010,7 +14051,7 @@ module.exports = 'cameradestroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14038,7 +14079,7 @@ module.exports = 'camerafadeincomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14070,7 +14111,7 @@ module.exports = 'camerafadeinstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14098,7 +14139,7 @@ module.exports = 'camerafadeoutcomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14130,7 +14171,7 @@ module.exports = 'camerafadeoutstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14156,7 +14197,7 @@ module.exports = 'cameraflashcomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14186,7 +14227,7 @@ module.exports = 'cameraflashstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14216,7 +14257,7 @@ module.exports = 'followupdate'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14242,7 +14283,7 @@ module.exports = 'camerapancomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14271,7 +14312,7 @@ module.exports = 'camerapanstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14299,7 +14340,7 @@ module.exports = 'postrender'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14327,7 +14368,7 @@ module.exports = 'prerender'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14353,7 +14394,7 @@ module.exports = 'camerarotatecomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14381,7 +14422,7 @@ module.exports = 'camerarotatestart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14407,7 +14448,7 @@ module.exports = 'camerashakecomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14435,7 +14476,7 @@ module.exports = 'camerashakestart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14461,7 +14502,7 @@ module.exports = 'camerazoomcomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14489,7 +14530,7 @@ module.exports = 'camerazoomstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14528,7 +14569,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14554,7 +14595,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14886,7 +14927,7 @@ module.exports = FixedKeyControl; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15394,7 +15435,7 @@ module.exports = SmoothedKeyControl; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15417,7 +15458,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15444,7 +15485,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15464,7 +15505,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.60.0-beta.17', + VERSION: '3.60.0-beta.18', BlendModes: __webpack_require__(95723), @@ -15589,7 +15630,7 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16219,7 +16260,7 @@ module.exports = Config; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16348,7 +16389,7 @@ module.exports = CreateRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16479,7 +16520,7 @@ module.exports = DebugHeader; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16664,13 +16705,15 @@ var Game = new Class({ this.cache = new CacheManager(this); /** - * An instance of the Data Manager + * An instance of the Data Manager. This is a global manager, available from any Scene + * and allows you to share and exchange your own game-level data or events without having + * to use an internal event system. * * @name Phaser.Game#registry * @type {Phaser.Data.DataManager} * @since 3.0.0 */ - this.registry = new DataManager(this); + this.registry = new DataManager(this, new EventEmitter()); /** * An instance of the Input Manager. @@ -17221,7 +17264,7 @@ module.exports = Game; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18100,7 +18143,7 @@ module.exports = TimeStep; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18192,7 +18235,7 @@ module.exports = VisibilityHandler; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18217,7 +18260,7 @@ module.exports = 'blur'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18241,7 +18284,7 @@ module.exports = 'boot'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18266,7 +18309,7 @@ module.exports = 'contextlost'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18291,7 +18334,7 @@ module.exports = 'destroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18315,7 +18358,7 @@ module.exports = 'focus'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18343,7 +18386,7 @@ module.exports = 'hidden'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18366,7 +18409,7 @@ module.exports = 'pause'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18394,7 +18437,7 @@ module.exports = 'postrender'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18421,7 +18464,7 @@ module.exports = 'poststep'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18448,7 +18491,7 @@ module.exports = 'prerender'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18475,7 +18518,7 @@ module.exports = 'prestep'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18499,7 +18542,7 @@ module.exports = 'ready'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18522,7 +18565,7 @@ module.exports = 'resume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18549,7 +18592,7 @@ module.exports = 'step'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18575,7 +18618,7 @@ module.exports = 'visible'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18611,7 +18654,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18638,7 +18681,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18761,7 +18804,7 @@ module.exports = GenerateTexture; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18784,7 +18827,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18823,7 +18866,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18862,7 +18905,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18901,7 +18944,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18940,7 +18983,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18979,7 +19022,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19005,7 +19048,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19233,7 +19276,7 @@ module.exports = CubicBezierCurve; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19851,7 +19894,7 @@ module.exports = Curve; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -20476,7 +20519,7 @@ module.exports = EllipseCurve; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -20783,7 +20826,7 @@ module.exports = LineCurve; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21001,7 +21044,7 @@ module.exports = QuadraticBezier; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21227,7 +21270,7 @@ module.exports = SplineCurve; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21255,7 +21298,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21395,7 +21438,7 @@ module.exports = MoveTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22314,7 +22357,7 @@ module.exports = Path; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23031,7 +23074,7 @@ module.exports = DataManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23159,7 +23202,7 @@ module.exports = DataManagerPlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23193,7 +23236,7 @@ module.exports = 'changedata'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23225,7 +23268,7 @@ module.exports = 'changedata-'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23248,7 +23291,7 @@ module.exports = 'destroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23278,7 +23321,7 @@ module.exports = 'removedata'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23308,7 +23351,7 @@ module.exports = 'setdata'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23334,7 +23377,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23358,7 +23401,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23485,7 +23528,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23539,11 +23582,16 @@ function init () { var ua = navigator.userAgent; - if ((/Edge\/\d+/).test(ua)) + if ((/Edg\/\d+/).test(ua)) { Browser.edge = true; Browser.es2019 = true; } + else if ((/OPR/).test(ua)) + { + Browser.opera = true; + Browser.es2019 = true; + } else if ((/Chrome\/(\d+)/).test(ua) && !OS.windowsPhone) { Browser.chrome = true; @@ -23565,11 +23613,6 @@ function init () Browser.ie = true; Browser.ieVersion = parseInt(RegExp.$1, 10); } - else if ((/Opera/).test(ua)) - { - Browser.opera = true; - Browser.es2019 = true; - } else if ((/Version\/(\d+\.\d+) Safari/).test(ua) && !OS.windowsPhone) { Browser.safari = true; @@ -23603,7 +23646,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23722,7 +23765,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23922,7 +23965,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24032,7 +24075,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24113,7 +24156,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24306,7 +24349,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24407,7 +24450,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24455,7 +24498,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25106,7 +25149,7 @@ module.exports = ColorMatrix; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25327,7 +25370,7 @@ module.exports = RGB; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25462,7 +25505,7 @@ module.exports = ALIGN_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25507,7 +25550,7 @@ module.exports = BottomCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25552,7 +25595,7 @@ module.exports = BottomLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25597,7 +25640,7 @@ module.exports = BottomRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25640,7 +25683,7 @@ module.exports = Center; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25685,7 +25728,7 @@ module.exports = LeftCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25739,7 +25782,7 @@ module.exports = QuickSet; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25784,7 +25827,7 @@ module.exports = RightCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25829,7 +25872,7 @@ module.exports = TopCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25874,7 +25917,7 @@ module.exports = TopLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25919,7 +25962,7 @@ module.exports = TopRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25950,7 +25993,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25981,7 +26024,7 @@ module.exports = Align; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26026,7 +26069,7 @@ module.exports = BottomCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26071,7 +26114,7 @@ module.exports = BottomLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26116,7 +26159,7 @@ module.exports = BottomRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26161,7 +26204,7 @@ module.exports = LeftBottom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26206,7 +26249,7 @@ module.exports = LeftCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26251,7 +26294,7 @@ module.exports = LeftTop; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26304,7 +26347,7 @@ module.exports = QuickSet; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26349,7 +26392,7 @@ module.exports = RightBottom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26394,7 +26437,7 @@ module.exports = RightCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26439,7 +26482,7 @@ module.exports = RightTop; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26484,7 +26527,7 @@ module.exports = TopCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26529,7 +26572,7 @@ module.exports = TopLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26574,7 +26617,7 @@ module.exports = TopRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26608,7 +26651,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26646,7 +26689,7 @@ module.exports = CenterOn; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26675,7 +26718,7 @@ module.exports = GetBottom; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26720,7 +26763,7 @@ module.exports = GetBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26749,7 +26792,7 @@ module.exports = GetCenterX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26778,7 +26821,7 @@ module.exports = GetCenterY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26807,7 +26850,7 @@ module.exports = GetLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26838,7 +26881,7 @@ module.exports = GetOffsetX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26869,7 +26912,7 @@ module.exports = GetOffsetY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26898,7 +26941,7 @@ module.exports = GetRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26927,7 +26970,7 @@ module.exports = GetTop; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26961,7 +27004,7 @@ module.exports = SetBottom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26997,7 +27040,7 @@ module.exports = SetCenterX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27033,7 +27076,7 @@ module.exports = SetCenterY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27067,7 +27110,7 @@ module.exports = SetLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27101,7 +27144,7 @@ module.exports = SetRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27135,7 +27178,7 @@ module.exports = SetTop; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27172,7 +27215,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27236,7 +27279,7 @@ module.exports = CanvasInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27498,7 +27541,7 @@ module.exports = CanvasPool(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27631,7 +27674,7 @@ module.exports = Smoothing(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27667,7 +27710,7 @@ module.exports = TouchAction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27715,7 +27758,7 @@ module.exports = UserSelect; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27741,7 +27784,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28605,7 +28648,7 @@ module.exports = Color; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28703,7 +28746,7 @@ module.exports = ColorSpectrum; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28744,7 +28787,7 @@ module.exports = ColorToRGBA; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28775,7 +28818,7 @@ module.exports = ComponentToHex; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28806,7 +28849,7 @@ module.exports = GetColor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28838,7 +28881,7 @@ module.exports = GetColor32; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28889,7 +28932,7 @@ module.exports = HSLToColor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28931,7 +28974,7 @@ module.exports = HSVColorWheel; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29013,7 +29056,7 @@ module.exports = HSVToRGB; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29067,7 +29110,7 @@ module.exports = HexStringToColor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29124,7 +29167,7 @@ module.exports = HueToComponent; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29158,7 +29201,7 @@ module.exports = IntegerToColor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29207,7 +29250,7 @@ module.exports = IntegerToRGB; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29316,7 +29359,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29347,7 +29390,7 @@ module.exports = ObjectToColor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29394,7 +29437,7 @@ module.exports = RGBStringToColor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29475,7 +29518,7 @@ module.exports = RGBToHSV; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29520,7 +29563,7 @@ module.exports = RGBToString; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29557,7 +29600,7 @@ module.exports = RandomRGB; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29614,7 +29657,7 @@ module.exports = ValueToColor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29650,7 +29693,7 @@ module.exports = Color; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29679,7 +29722,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29922,7 +29965,7 @@ module.exports = BitmapMask; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30243,7 +30286,7 @@ module.exports = GeometryMask; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30266,7 +30309,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30393,7 +30436,7 @@ module.exports = BaseShader; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30452,7 +30495,7 @@ module.exports = AddToDOM; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30497,7 +30540,7 @@ module.exports = CreateDOMContainer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30561,7 +30604,7 @@ module.exports = DOMContentLoaded; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30621,7 +30664,7 @@ module.exports = GetInnerHeight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30687,7 +30730,7 @@ module.exports = GetScreenOrientation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30739,7 +30782,7 @@ module.exports = GetTarget; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30797,7 +30840,7 @@ module.exports = ParseXML; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30827,7 +30870,7 @@ module.exports = RemoveFromDOM; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31017,7 +31060,7 @@ module.exports = RequestAnimationFrame; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31048,7 +31091,7 @@ module.exports = Dom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31233,7 +31276,7 @@ module.exports = EventEmitter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31251,7 +31294,7 @@ module.exports = { EventEmitter: __webpack_require__(78491) }; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31380,7 +31423,7 @@ module.exports = BuildGameObject; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31478,7 +31521,7 @@ module.exports = BuildGameObjectAnimation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31755,7 +31798,7 @@ module.exports = DisplayList; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32487,7 +32530,7 @@ var GameObject = new Class({ * every game frame. This method is passed two parameters: `delta` and `time`. * * If you wish to run your own logic within `preUpdate` then you should always call - * `preUpdate.super(delta, time)` within it, or it may fail to process required operations, + * `super.preUpdate(delta, time)` within it, or it may fail to process required operations, * such as Sprite animations. * * @method Phaser.GameObjects.GameObject#addToUpdateList @@ -32663,7 +32706,7 @@ module.exports = GameObject; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32867,7 +32910,7 @@ module.exports = GameObjectCreator; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33101,7 +33144,7 @@ module.exports = GameObjectFactory; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33173,7 +33216,7 @@ module.exports = GetCalcMatrix; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33478,7 +33521,7 @@ module.exports = UpdateList; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33538,7 +33581,7 @@ module.exports = BatchChar; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34063,7 +34106,7 @@ module.exports = GetBitmapTextSize; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34118,7 +34161,7 @@ module.exports = ParseFromAtlas; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34251,7 +34294,7 @@ module.exports = ParseRetroFont; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34413,7 +34456,7 @@ module.exports = ParseXMLBitmapFont; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34440,7 +34483,7 @@ module.exports = RetroFont; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34557,7 +34600,7 @@ module.exports = RETRO_FONT_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34792,7 +34835,7 @@ module.exports = DynamicBitmapText; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -35007,7 +35050,7 @@ module.exports = DynamicBitmapTextCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -35059,7 +35102,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -35129,7 +35172,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -35162,7 +35205,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -35451,7 +35494,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -36664,7 +36707,7 @@ module.exports = BitmapText; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -36852,7 +36895,7 @@ module.exports = BitmapTextCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -36906,7 +36949,7 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -36971,7 +37014,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37004,7 +37047,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37144,7 +37187,7 @@ module.exports = BitmapTextWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37444,7 +37487,7 @@ module.exports = Blitter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37582,7 +37625,7 @@ module.exports = BlitterCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37633,7 +37676,7 @@ GameObjectCreator.register('blitter', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37650,14 +37693,14 @@ var GameObjectFactory = __webpack_require__(61286); * * @param {number} x - The x position of the Game Object. * @param {number} y - The y position of the Game Object. - * @param {string} key - The key of the Texture the Blitter object will use. + * @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param {(string|number)} [frame] - The default Frame children of the Blitter will use. * * @return {Phaser.GameObjects.Blitter} The Game Object that was created. */ -GameObjectFactory.register('blitter', function (x, y, key, frame) +GameObjectFactory.register('blitter', function (x, y, texture, frame) { - return this.displayList.add(new Blitter(this.scene, x, y, key, frame)); + return this.displayList.add(new Blitter(this.scene, x, y, texture, frame)); }); // When registering a factory function 'this' refers to the GameObjectFactory context. @@ -37676,7 +37719,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37709,7 +37752,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37828,7 +37871,7 @@ module.exports = BlitterWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -38270,7 +38313,7 @@ module.exports = Bob; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -38566,7 +38609,7 @@ module.exports = Alpha; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -38677,7 +38720,7 @@ module.exports = AlphaSingle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -38802,7 +38845,7 @@ module.exports = BlendMode; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -38952,7 +38995,7 @@ module.exports = ComputedSize; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39078,7 +39121,7 @@ module.exports = Crop; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39176,7 +39219,7 @@ module.exports = Depth; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39279,7 +39322,7 @@ module.exports = FX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39444,7 +39487,7 @@ module.exports = Flip; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39804,7 +39847,7 @@ module.exports = GetBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39966,7 +40009,7 @@ module.exports = Mask; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39998,9 +40041,11 @@ var Origin = { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. * * @name Phaser.GameObjects.Components.Origin#originX * @type {number} + * @readonly * @default 0.5 * @since 3.0.0 */ @@ -40011,9 +40056,11 @@ var Origin = { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. * * @name Phaser.GameObjects.Components.Origin#originY * @type {number} + * @readonly * @default 0.5 * @since 3.0.0 */ @@ -40170,7 +40217,7 @@ module.exports = Origin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -40600,7 +40647,7 @@ module.exports = PathFollower; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -41028,7 +41075,7 @@ module.exports = Pipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -41136,7 +41183,7 @@ module.exports = ScrollFactor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -41332,7 +41379,7 @@ module.exports = Size; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -41476,7 +41523,7 @@ module.exports = Texture; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -41698,7 +41745,7 @@ module.exports = TextureCrop; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -41936,7 +41983,7 @@ module.exports = Tint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -41998,7 +42045,7 @@ module.exports = ToJSON; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -42384,7 +42431,7 @@ var Transform = { * @method Phaser.GameObjects.Components.Transform#setScale * @since 3.0.0 * - * @param {number} x - The horizontal scale of this Game Object. + * @param {number} [x=1] - The horizontal scale of this Game Object. * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value. * * @return {this} This Game Object instance. @@ -42621,7 +42668,7 @@ module.exports = Transform; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -43541,12 +43588,14 @@ var TransformMatrix = new Class({ * @param {number} xw - The xw value. * @param {number} yh - The yh value. * @param {boolean} roundPixels - Pass the results via Math.round? + * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array. * - * @return {number} The calculated y value. + * @return {Float32Array} The quad Float32Array. */ - setQuad: function (x, y, xw, yh, roundPixels) + setQuad: function (x, y, xw, yh, roundPixels, quad) { - var quad = this.quad; + if (quad === undefined) { quad = this.quad; } + var matrix = this.matrix; var a = matrix[0]; @@ -43705,7 +43754,7 @@ module.exports = TransformMatrix; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -43795,7 +43844,7 @@ module.exports = Visible; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -43839,7 +43888,7 @@ module.exports = { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45307,7 +45356,7 @@ module.exports = Container; /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45416,7 +45465,7 @@ module.exports = ContainerCanvasRenderer; /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45467,7 +45516,7 @@ GameObjectCreator.register('container', function (config, addToScene) /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45502,7 +45551,7 @@ GameObjectFactory.register('container', function (x, y, children) /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45536,7 +45585,7 @@ module.exports = { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45688,7 +45737,7 @@ module.exports = ContainerWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45731,7 +45780,7 @@ module.exports = [ /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -46730,7 +46779,7 @@ module.exports = DOMElement; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -46858,7 +46907,7 @@ module.exports = DOMElementCSSRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -46948,7 +46997,7 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -46981,7 +47030,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47009,7 +47058,7 @@ module.exports = 'addedtoscene'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47037,7 +47086,7 @@ module.exports = 'destroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47065,7 +47114,7 @@ module.exports = 'removedfromscene'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47099,7 +47148,7 @@ module.exports = 'complete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47130,7 +47179,7 @@ module.exports = 'created'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47158,7 +47207,7 @@ module.exports = 'error'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47192,7 +47241,7 @@ module.exports = 'loop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47222,7 +47271,7 @@ module.exports = 'play'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47249,7 +47298,7 @@ module.exports = 'seeked'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47277,7 +47326,7 @@ module.exports = 'seeking'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47305,7 +47354,7 @@ module.exports = 'stop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47333,7 +47382,7 @@ module.exports = 'timeout'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47361,7 +47410,7 @@ module.exports = 'unlocked'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47395,7 +47444,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47515,7 +47564,7 @@ module.exports = Extern; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47557,7 +47606,7 @@ GameObjectFactory.register('extern', function () /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47590,7 +47639,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47631,7 +47680,7 @@ module.exports = ExternWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47667,7 +47716,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47808,9 +47857,11 @@ var Graphics = new Class({ /** * The default fill color for shapes rendered by this Graphics object. + * Set this value with `setDefaultStyles()`. * * @name Phaser.GameObjects.Graphics#defaultFillColor * @type {number} + * @readonly * @default -1 * @since 3.0.0 */ @@ -47818,9 +47869,11 @@ var Graphics = new Class({ /** * The default fill alpha for shapes rendered by this Graphics object. + * Set this value with `setDefaultStyles()`. * * @name Phaser.GameObjects.Graphics#defaultFillAlpha * @type {number} + * @readonly * @default 1 * @since 3.0.0 */ @@ -47828,9 +47881,11 @@ var Graphics = new Class({ /** * The default stroke width for shapes rendered by this Graphics object. + * Set this value with `setDefaultStyles()`. * * @name Phaser.GameObjects.Graphics#defaultStrokeWidth * @type {number} + * @readonly * @default 1 * @since 3.0.0 */ @@ -47838,9 +47893,11 @@ var Graphics = new Class({ /** * The default stroke color for shapes rendered by this Graphics object. + * Set this value with `setDefaultStyles()`. * * @name Phaser.GameObjects.Graphics#defaultStrokeColor * @type {number} + * @readonly * @default -1 * @since 3.0.0 */ @@ -47848,9 +47905,11 @@ var Graphics = new Class({ /** * The default stroke alpha for shapes rendered by this Graphics object. + * Set this value with `setDefaultStyles()`. * * @name Phaser.GameObjects.Graphics#defaultStrokeAlpha * @type {number} + * @readonly * @default 1 * @since 3.0.0 */ @@ -48319,7 +48378,7 @@ var Graphics = new Class({ * @param {number} y - The y coordinate of the top-left of the rectangle. * @param {number} width - The width of the rectangle. * @param {number} height - The height of the rectangle. - * @param {(Phaser.Types.GameObjects.Graphics.RoundedRectRadius|number)} [radius=20] - The corner radius; It can also be an object to specify different radii for corners. + * @param {(Phaser.Types.GameObjects.Graphics.RoundedRectRadius|number)} [radius=20] - The corner radius; It can also be an object to specify different radius for corners. * * @return {this} This Game Object. */ @@ -48340,16 +48399,62 @@ var Graphics = new Class({ br = GetFastValue(radius, 'br', 20); } + var convexTL = (tl >= 0); + var convexTR = (tr >= 0); + var convexBL = (bl >= 0); + var convexBR = (br >= 0); + + tl = Math.abs(tl); + tr = Math.abs(tr); + bl = Math.abs(bl); + br = Math.abs(br); + this.beginPath(); this.moveTo(x + tl, y); this.lineTo(x + width - tr, y); - this.arc(x + width - tr, y + tr, tr, -MATH_CONST.TAU, 0); + + if (convexTR) + { + this.arc(x + width - tr, y + tr, tr, -MATH_CONST.TAU, 0); + } + else + { + this.arc(x + width, y, tr, Math.PI, MATH_CONST.TAU, true); + } + this.lineTo(x + width, y + height - br); - this.arc(x + width - br, y + height - br, br, 0, MATH_CONST.TAU); + + if (convexBR) + { + this.arc(x + width - br, y + height - br, br, 0, MATH_CONST.TAU); + } + else + { + this.arc(x + width, y + height, br, -MATH_CONST.TAU, Math.PI, true); + } + this.lineTo(x + bl, y + height); - this.arc(x + bl, y + height - bl, bl, MATH_CONST.TAU, Math.PI); + + if (convexBL) + { + this.arc(x + bl, y + height - bl, bl, MATH_CONST.TAU, Math.PI); + } + else + { + this.arc(x, y + height, bl, 0, -MATH_CONST.TAU, true); + } + this.lineTo(x, y + tl); - this.arc(x + tl, y + tl, tl, -Math.PI, -MATH_CONST.TAU); + + if (convexTL) + { + this.arc(x + tl, y + tl, tl, -Math.PI, -MATH_CONST.TAU); + } + else + { + this.arc(x, y, tl, MATH_CONST.TAU, 0, true); + } + this.fillPath(); return this; @@ -48388,25 +48493,66 @@ var Graphics = new Class({ br = GetFastValue(radius, 'br', 20); } - tl = Math.min(tl, maxRadius); - tr = Math.min(tr, maxRadius); - bl = Math.min(bl, maxRadius); - br = Math.min(br, maxRadius); + var convexTL = (tl >= 0); + var convexTR = (tr >= 0); + var convexBL = (bl >= 0); + var convexBR = (br >= 0); + + tl = Math.min(Math.abs(tl), maxRadius); + tr = Math.min(Math.abs(tr), maxRadius); + bl = Math.min(Math.abs(bl), maxRadius); + br = Math.min(Math.abs(br), maxRadius); this.beginPath(); this.moveTo(x + tl, y); this.lineTo(x + width - tr, y); this.moveTo(x + width - tr, y); - this.arc(x + width - tr, y + tr, tr, -MATH_CONST.TAU, 0); + + if (convexTR) + { + this.arc(x + width - tr, y + tr, tr, -MATH_CONST.TAU, 0); + } + else + { + this.arc(x + width, y, tr, Math.PI, MATH_CONST.TAU, true); + } + this.lineTo(x + width, y + height - br); this.moveTo(x + width, y + height - br); - this.arc(x + width - br, y + height - br, br, 0, MATH_CONST.TAU); + + if (convexBR) + { + this.arc(x + width - br, y + height - br, br, 0, MATH_CONST.TAU); + } + else + { + this.arc(x + width, y + height, br, -MATH_CONST.TAU, Math.PI, true); + } + this.lineTo(x + bl, y + height); this.moveTo(x + bl, y + height); - this.arc(x + bl, y + height - bl, bl, MATH_CONST.TAU, Math.PI); + + if (convexBL) + { + this.arc(x + bl, y + height - bl, bl, MATH_CONST.TAU, Math.PI); + } + else + { + this.arc(x, y + height, bl, 0, -MATH_CONST.TAU, true); + } + this.lineTo(x, y + tl); this.moveTo(x, y + tl); - this.arc(x + tl, y + tl, tl, -Math.PI, -MATH_CONST.TAU); + + if (convexTL) + { + this.arc(x + tl, y + tl, tl, -Math.PI, -MATH_CONST.TAU); + } + else + { + this.arc(x, y, tl, MATH_CONST.TAU, 0, true); + } + this.strokePath(); return this; @@ -49151,7 +49297,7 @@ module.exports = Graphics; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49399,7 +49545,7 @@ module.exports = GraphicsCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49448,7 +49594,7 @@ GameObjectCreator.register('graphics', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49488,7 +49634,7 @@ GameObjectFactory.register('graphics', function (config) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49524,7 +49670,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49880,7 +50026,7 @@ module.exports = GraphicsWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -50006,9 +50152,10 @@ var Group = new Class({ * The class to create new group members from. * * @name Phaser.GameObjects.Group#classType - * @type {Phaser.Types.GameObjects.Group.GroupClassTypeConstructor} + * @type {function} * @since 3.0.0 * @default Phaser.GameObjects.Sprite + * @see Phaser.Types.GameObjects.Group.GroupClassTypeConstructor */ this.classType = GetFastValue(config, 'classType', Sprite); @@ -51632,7 +51779,7 @@ module.exports = Group; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51666,7 +51813,7 @@ GameObjectCreator.register('group', function (config) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51699,7 +51846,7 @@ GameObjectFactory.register('group', function (children, config) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51803,7 +51950,7 @@ module.exports = Image; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51838,7 +51985,7 @@ module.exports = ImageCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51889,7 +52036,7 @@ GameObjectCreator.register('image', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51911,9 +52058,9 @@ var GameObjectFactory = __webpack_require__(61286); * * @return {Phaser.GameObjects.Image} The Game Object that was created. */ -GameObjectFactory.register('image', function (x, y, key, frame) +GameObjectFactory.register('image', function (x, y, texture, frame) { - return this.displayList.add(new Image(this.scene, x, y, key, frame)); + return this.displayList.add(new Image(this.scene, x, y, texture, frame)); }); // When registering a factory function 'this' refers to the GameObjectFactory context. @@ -51932,7 +52079,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51965,7 +52112,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -52000,7 +52147,7 @@ module.exports = ImageWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -52077,7 +52224,7 @@ var GameObjects = { Group: __webpack_require__(62598), Image: __webpack_require__(20927), Layer: __webpack_require__(17676), - Particles: __webpack_require__(30439), + Particles: __webpack_require__(81212), PathFollower: __webpack_require__(19626), RenderTexture: __webpack_require__(29599), Rope: __webpack_require__(31982), @@ -52110,7 +52257,7 @@ var GameObjects = { Group: __webpack_require__(61295), Image: __webpack_require__(83556), Layer: __webpack_require__(56378), - Particles: __webpack_require__(38842), + Particles: __webpack_require__(765), RenderTexture: __webpack_require__(85692), Rope: __webpack_require__(96027), Sprite: __webpack_require__(89219), @@ -52156,7 +52303,7 @@ module.exports = GameObjects; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53149,7 +53296,7 @@ module.exports = Layer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53235,7 +53382,7 @@ module.exports = LayerCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53283,7 +53430,7 @@ GameObjectCreator.register('layer', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53315,7 +53462,7 @@ GameObjectFactory.register('layer', function (children) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53348,7 +53495,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53472,7 +53619,7 @@ module.exports = LayerWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53756,7 +53903,7 @@ module.exports = Light; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -54118,7 +54265,7 @@ module.exports = LightsManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -54237,7 +54384,7 @@ module.exports = LightsPlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55381,7 +55528,7 @@ module.exports = Mesh; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55410,7 +55557,7 @@ module.exports = MeshCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55467,7 +55614,7 @@ GameObjectCreator.register('mesh', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55513,7 +55660,7 @@ if (true) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55546,7 +55693,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55667,7 +55814,7 @@ module.exports = MeshWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55685,7 +55832,7 @@ var Vertex = __webpack_require__(85769); * parameters to this class. * * This is extremely useful for UI and button like elements, where you need - * them to expand to accomodate the content without distorting the texture. + * them to expand to accommodate the content without distorting the texture. * * The texture you provide for this Game Object should be based on the * following layout structure: @@ -56556,7 +56703,7 @@ module.exports = NineSlice; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56612,7 +56759,7 @@ GameObjectCreator.register('nineslice', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56626,7 +56773,7 @@ var GameObjectFactory = __webpack_require__(61286); * parameters to this class. * * This is extremely useful for UI and button like elements, where you need - * them to expand to accomodate the content without distorting the texture. + * them to expand to accommodate the content without distorting the texture. * * The texture you provide for this Game Object should be based on the * following layout structure: @@ -56722,7 +56869,7 @@ if (true) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56755,7 +56902,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56850,6 +56997,216 @@ var NineSliceWebGLRenderer = function (renderer, src, camera, parentMatrix) module.exports = NineSliceWebGLRenderer; +/***/ }), + +/***/ 19737: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(56694); +var EmitterOp = __webpack_require__(93025); +var GetColor = __webpack_require__(22946); +var GetEaseFunction = __webpack_require__(21902); +var GetInterpolationFunction = __webpack_require__(4840); +var IntegerToRGB = __webpack_require__(15978); + +/** + * @classdesc + * This class is responsible for taking control over the color property + * in the Particle class and managing its emission and updating functions. + * + * See the `ParticleEmitter` class for more details on emitter op configuration. + * + * @class EmitterColorOp + * @memberof Phaser.GameObjects.Particles + * @constructor + * @since 3.60.0 + * + * @param {string} key - The name of the property. + */ +var EmitterColorOp = new Class({ + + Extends: EmitterOp, + + initialize: + + function EmitterColorOp (key) + { + EmitterOp.call(this, key, null, false); + + this.active = false; + + this.easeName = 'Linear'; + + /** + * An array containing the red color values. + * + * Populated during the `setMethods` method. + * + * @name Phaser.GameObjects.Particles.EmitterColorOp#r + * @type {number[]} + * @since 3.60.0 + */ + this.r = []; + + /** + * An array containing the green color values. + * + * Populated during the `setMethods` method. + * + * @name Phaser.GameObjects.Particles.EmitterColorOp#g + * @type {number[]} + * @since 3.60.0 + */ + this.g = []; + + /** + * An array containing the blue color values. + * + * Populated during the `setMethods` method. + * + * @name Phaser.GameObjects.Particles.EmitterColorOp#b + * @type {number[]} + * @since 3.60.0 + */ + this.b = []; + }, + + /** + * Checks the type of `EmitterOp.propertyValue` to determine which + * method is required in order to return values from this op function. + * + * @method Phaser.GameObjects.Particles.EmitterColorOp#getMethod + * @since 3.60.0 + * + * @return {number} A number between 0 and 9 which should be passed to `setMethods`. + */ + getMethod: function () + { + return (this.propertyValue === null) ? 0 : 9; + }, + + /** + * Sets the EmitterColorOp method values, if in use. + * + * @method Phaser.GameObjects.Particles.EmitterColorOp#setMethods + * @since 3.60.0 + * + * @return {this} This Emitter Op object. + */ + setMethods: function () + { + var value = this.propertyValue; + var current = value; + + var onEmit = this.defaultEmit; + var onUpdate = this.defaultUpdate; + + if (this.method === 9) + { + this.start = value[0]; + this.ease = GetEaseFunction('Linear'); + this.interpolation = GetInterpolationFunction('linear'); + + onEmit = this.easedValueEmit; + onUpdate = this.easeValueUpdate; + current = value[0]; + + this.active = true; + + // Populate the r,g,b arrays + for (var i = 0; i < value.length; i++) + { + // in hex format 0xff0000 + var color = IntegerToRGB(value[i]); + + this.r.push(color.r); + this.g.push(color.g); + this.b.push(color.b); + } + } + + this.onEmit = onEmit; + this.onUpdate = onUpdate; + this.current = current; + + return this; + }, + + /** + * Sets the Ease function to use for Color interpolation. + * + * @method Phaser.GameObjects.Particles.EmitterColorOp#setEase + * @since 3.60.0 + * + * @param {string} ease - The string-based name of the Ease function to use. + */ + setEase: function (value) + { + this.easeName = value; + + this.ease = GetEaseFunction(value); + }, + + /** + * An `onEmit` callback for an eased property. + * + * It prepares the particle for easing by {@link Phaser.GameObjects.Particles.EmitterColorOp#easeValueUpdate}. + * + * @method Phaser.GameObjects.Particles.EmitterColorOp#easedValueEmit + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. + * @param {string} key - The name of the property. + * + * @return {number} {@link Phaser.GameObjects.Particles.EmitterColorOp#start}, as the new value of the property. + */ + easedValueEmit: function () + { + this.current = this.start; + + return this.start; + }, + + /** + * An `onUpdate` callback that returns an eased value between the + * {@link Phaser.GameObjects.Particles.EmitterColorOp#start} and {@link Phaser.GameObjects.Particles.EmitterColorOp#end} + * range. + * + * @method Phaser.GameObjects.Particles.EmitterColorOp#easeValueUpdate + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. + * @param {string} key - The name of the property. + * @param {number} t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death). + * + * @return {number} The new value of the property. + */ + easeValueUpdate: function (particle, key, t) + { + var v = this.ease(t); + + var r = this.interpolation(this.r, v); + var g = this.interpolation(this.g, v); + var b = this.interpolation(this.b, v); + + var current = GetColor(r, g, b); + + this.current = current; + + return current; + } + +}); + +module.exports = EmitterColorOp; + + /***/ }), /***/ 93025: @@ -56857,42 +57214,47 @@ module.exports = NineSliceWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var Between = __webpack_require__(17489); +var Clamp = __webpack_require__(82897); var Class = __webpack_require__(56694); var FloatBetween = __webpack_require__(61616); var GetEaseFunction = __webpack_require__(21902); var GetFastValue = __webpack_require__(72632); +var GetInterpolationFunction = __webpack_require__(4840); +var SnapTo = __webpack_require__(88462); var Wrap = __webpack_require__(1071); /** * @classdesc - * A Particle Emitter property. + * This class is responsible for taking control over a single property + * in the Particle class and managing its emission and updating functions. * - * Facilitates changing Particle properties as they are emitted and throughout their lifetime. + * Particles properties such as `x`, `y`, `scaleX`, `lifespan` and others all use + * EmitterOp instances to manage them, as they can be given in a variety of + * formats: from simple values, to functions, to dynamic callbacks. + * + * See the `ParticleEmitter` class for more details on emitter op configuration. * * @class EmitterOp * @memberof Phaser.GameObjects.Particles * @constructor * @since 3.0.0 * - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Settings for the Particle Emitter that owns this property. * @param {string} key - The name of the property. - * @param {number} defaultValue - The default value of the property. + * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} defaultValue - The default value of the property. * @param {boolean} [emitOnly=false] - Whether the property can only be modified when a Particle is emitted. */ var EmitterOp = new Class({ initialize: - function EmitterOp (config, key, defaultValue, emitOnly) + function EmitterOp (key, defaultValue, emitOnly) { - if (emitOnly === undefined) - { - emitOnly = false; - } + if (emitOnly === undefined) { emitOnly = false; } /** * The name of this property. @@ -56904,10 +57266,13 @@ var EmitterOp = new Class({ this.propertyKey = key; /** - * The value of this property. + * The current value of this property. + * + * This can be a simple value, an array, a function or an onEmit + * configuration object. * * @name Phaser.GameObjects.Particles.EmitterOp#propertyValue - * @type {number} + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} * @since 3.0.0 */ this.propertyValue = defaultValue; @@ -56915,8 +57280,11 @@ var EmitterOp = new Class({ /** * The default value of this property. * + * This can be a simple value, an array, a function or an onEmit + * configuration object. + * * @name Phaser.GameObjects.Particles.EmitterOp#defaultValue - * @type {number} + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} * @since 3.0.0 */ this.defaultValue = defaultValue; @@ -56942,16 +57310,49 @@ var EmitterOp = new Class({ */ this.counter = 0; + /** + * When the step counter reaches it's maximum, should it then + * yoyo back to the start again, or flip over to it? + * + * @name Phaser.GameObjects.Particles.EmitterOp#yoyo + * @type {boolean} + * @default false + * @since 3.60.0 + */ + this.yoyo = false; + + /** + * The counter direction. 0 for up and 1 for down. + * + * @name Phaser.GameObjects.Particles.EmitterOp#direction + * @type {number} + * @default 0 + * @since 3.60.0 + */ + this.direction = 0; + /** * The start value for this property to ease between. * + * If an interpolation this holds a reference to the number data array. + * * @name Phaser.GameObjects.Particles.EmitterOp#start - * @type {number} + * @type {number|number[]} * @default 0 * @since 3.0.0 */ this.start = 0; + /** + * The most recently calculated value. Updated every time an + * emission or update method is called. Treat as read-only. + * + * @name Phaser.GameObjects.Particles.EmitterOp#current + * @type {number} + * @since 3.60.0 + */ + this.current = 0; + /** * The end value for this property to ease between. * @@ -56963,13 +57364,22 @@ var EmitterOp = new Class({ this.end = 0; /** - * The easing function to use for updating this property. + * The easing function to use for updating this property, if any. * * @name Phaser.GameObjects.Particles.EmitterOp#ease * @type {?function} * @since 3.0.0 */ - this.ease; + this.ease = null; + + /** + * The interpolation function to use for updating this property, if any. + * + * @name Phaser.GameObjects.Particles.EmitterOp#interpolation + * @type {?function} + * @since 3.60.0 + */ + this.interpolation = null; /** * Whether this property can only be modified when a Particle is emitted. @@ -57004,7 +57414,48 @@ var EmitterOp = new Class({ */ this.onUpdate = this.defaultUpdate; - this.loadConfig(config); + /** + * Set to `false` to disable this EmitterOp. + * + * @name Phaser.GameObjects.Particles.EmitterOp#active + * @type {boolean} + * @since 3.60.0 + */ + this.active = true; + + /** + * The onEmit method type of this EmitterOp. + * + * Set as part of `setMethod` and cached here to avoid + * re-setting when only the value changes. + * + * @name Phaser.GameObjects.Particles.EmitterOp#method + * @type {number} + * @since 3.60.0 + */ + this.method = 0; + + /** + * The callback to run for Particles when they are emitted from the Particle Emitter. + * This is set during `setMethods` and used by `proxyEmit`. + * + * @name Phaser.GameObjects.Particles.EmitterOp#_onEmit + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitCallback} + * @private + * @since 3.60.0 + */ + this._onEmit; + + /** + * The callback to run for Particles when they are updated. + * This is set during `setMethods` and used by `proxyUpdate`. + * + * @name Phaser.GameObjects.Particles.EmitterOp#_onUpdate + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateCallback} + * @private + * @since 3.60.0 + */ + this._onUpdate; }, /** @@ -57036,6 +57487,8 @@ var EmitterOp = new Class({ this.defaultValue ); + this.method = this.getMethod(); + this.setMethods(); if (this.emitOnly) @@ -57055,7 +57508,7 @@ var EmitterOp = new Class({ */ toJSON: function () { - return this.propertyValue; + return JSON.stringify(this.propertyValue); }, /** @@ -57064,177 +57517,243 @@ var EmitterOp = new Class({ * @method Phaser.GameObjects.Particles.EmitterOp#onChange * @since 3.0.0 * - * @param {number} value - The value of the property. + * @param {number} value - The new numeric value of this property. * * @return {this} This Emitter Op object. */ onChange: function (value) { - this.propertyValue = value; + var current; - return this.setMethods(); + switch (this.method) + { + // Number + // Custom Callback (onEmit only) + // Custom onEmit and/or onUpdate callbacks + case 1: + case 3: + case 8: + current = value; + break; + + // Random Array + case 2: + if (this.propertyValue.indexOf(value) >= 0) + { + current = value; + } + break; + + // Stepped start/end + case 4: + var step = (this.end - this.start) / this.steps; + current = SnapTo(value, step); + this.counter = current; + break; + + // Eased start/end + // min/max (random float or int) + // Random object (random integer) + case 5: + case 6: + case 7: + current = Clamp(value, this.start, this.end); + break; + + // Interpolation + case 9: + current = this.start[0]; + break; + } + + this.current = current; + + return this; }, /** - * Update the {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} and - * {@link Phaser.GameObjects.Particles.EmitterOp#onUpdate} callbacks based on the type of the current - * {@link Phaser.GameObjects.Particles.EmitterOp#propertyValue}. + * Checks the type of `EmitterOp.propertyValue` to determine which + * method is required in order to return values from this op function. * - * @method Phaser.GameObjects.Particles.EmitterOp#setMethods - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.EmitterOp#getMethod + * @since 3.60.0 * - * @return {this} This Emitter Op object. + * @return {number} A number between 0 and 9 which should be passed to `setMethods`. */ - setMethods: function () + getMethod: function () { var value = this.propertyValue; - var t = typeof value; - - // Reset them in case they're not changed below - this.onEmit = this.defaultEmit; - this.onUpdate = this.defaultUpdate; - // `moveToX` and `moveToY` are null by default if (value === null) { - return; + return 0; } + var t = typeof value; + if (t === 'number') { - // Explicit static value: - // x: 400 - - this.onEmit = this.staticValueEmit; - this.onUpdate = this.staticValueUpdate; // How? + // Number + return 1; } else if (Array.isArray(value)) { - // Picks a random element from the array: - // x: [ 100, 200, 300, 400 ] - - this.onEmit = this.randomStaticValueEmit; + // Random Array + return 2; } else if (t === 'function') { - // The same as setting just the onUpdate function and no onEmit (unless this op is an emitOnly one) - // Custom callback, must return a value: - - /* - x: function (particle, key, t, value) - { - return value + 50; - } - */ - - if (this.emitOnly) + // Custom Callback + return 3; + } + else if (t === 'object') + { + if (this.hasBoth(value, 'start', 'end')) { - this.onEmit = value; + if (this.has(value, 'steps')) + { + // Stepped start/end + return 4; + } + else + { + // Eased start/end + return 5; + } } - else + else if (this.hasBoth(value, 'min', 'max')) { - this.onUpdate = value; + // min/max + return 6; } - } - else if (t === 'object' && this.hasBoth(value, 'start', 'end')) - { - this.start = value.start; - this.end = value.end; - - // x: { start: 100, end: 400, random: true } (random optional) = eases between start and end - - var isRandom = this.has(value, 'random'); - - if (isRandom) + else if (this.has(value, 'random')) { - this.onEmit = this.randomRangedValueEmit; + // Random object + return 7; } - - if (this.has(value, 'steps')) + else if (this.hasEither(value, 'onEmit', 'onUpdate')) { - // A stepped (per emit) range - - // x: { start: 100, end: 400, steps: 64 } - - // Increments a value stored in the emitter - - this.steps = value.steps; - this.counter = this.start; - - this.onEmit = this.steppedEmit; + // Custom onEmit onUpdate + return 8; } - else + else if (this.has(value, 'interpolation')) { - // An eased range (defaults to Linear if not specified) - - // x: { start: 100, end: 400, [ ease: 'Linear' ] } + // Interpolation + return 9; + } + } - var easeType = this.has(value, 'ease') ? value.ease : 'Linear'; + return 0; + }, - this.ease = GetEaseFunction(easeType, value.easeParams); + /** + * Update the {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} and + * {@link Phaser.GameObjects.Particles.EmitterOp#onUpdate} callbacks based on the method returned + * from `getMethod`. The method is stored in the `EmitterOp.method` property + * and is a number between 0 and 9 inclusively. + * + * @method Phaser.GameObjects.Particles.EmitterOp#setMethods + * @since 3.0.0 + * + * @return {this} This Emitter Op object. + */ + setMethods: function () + { + var value = this.propertyValue; + var current = value; - if (!isRandom) - { - this.onEmit = this.easedValueEmit; - } + var onEmit = this.defaultEmit; + var onUpdate = this.defaultUpdate; - this.onUpdate = this.easeValueUpdate; - } - } - else if (t === 'object' && this.hasBoth(value, 'min', 'max')) + switch (this.method) { - // { min: 100, max: 400 } = pick a random number between min and max + // Number + case 1: + onEmit = this.staticValueEmit; + break; - this.start = value.min; - this.end = value.max; - this.onEmit = this.randomRangedValueEmit; - } - else if (t === 'object' && this.has(value, 'random')) - { - // { random: [ 100, 400 ] } = pick a random number between the two elements of the array + // Random Array + case 2: + onEmit = this.randomStaticValueEmit; + current = value[0]; + break; - var rnd = value.random; + // Custom Callback (onEmit only) + case 3: + this._onEmit = value; + onEmit = this.proxyEmit; + break; - if (Array.isArray(rnd)) - { - this.start = rnd[0]; - this.end = rnd[1]; - } + // Stepped start/end + case 4: + this.start = value.start; + this.end = value.end; + this.steps = value.steps; + this.counter = this.start; + this.yoyo = this.has(value, 'yoyo') ? value.yoyo : false; + this.direction = 0; + onEmit = this.steppedEmit; + current = this.start; + break; - this.onEmit = this.randomRangedValueEmit; - } - else if (t === 'object' && this.hasEither(value, 'onEmit', 'onUpdate')) - { - // Custom onEmit and onUpdate callbacks + // Eased start/end + case 5: + this.start = value.start; + this.end = value.end; + var easeType = this.has(value, 'ease') ? value.ease : 'Linear'; + this.ease = GetEaseFunction(easeType, value.easeParams); + onEmit = (this.has(value, 'random') && value.random) ? this.randomRangedValueEmit : this.easedValueEmit; + onUpdate = this.easeValueUpdate; + current = this.start; + break; - /* - x: { - // Called at the start of the particles life, when it is being created - onEmit: function (particle, key, t, value) - { - return value; - }, + // min/max (random float or int) + case 6: + this.start = value.min; + this.end = value.max; + onEmit = (this.has(value, 'int') && value.int) ? this.randomRangedIntEmit : this.randomRangedValueEmit; + current = this.start; + break; + + // Random object (random integer) + case 7: + var rnd = value.random; - // Called during the particles life on each update - onUpdate: function (particle, key, t, value) + if (Array.isArray(rnd)) { - return value; + this.start = rnd[0]; + this.end = rnd[1]; } - } - */ - if (this.has(value, 'onEmit')) - { - this.onEmit = value.onEmit; - } + onEmit = this.randomRangedIntEmit; + current = this.start; + break; - if (this.has(value, 'onUpdate')) - { - this.onUpdate = value.onUpdate; - } + // Custom onEmit and/or onUpdate callbacks + case 8: + this._onEmit = (this.has(value, 'onEmit')) ? value.onEmit : this.defaultEmit; + this._onUpdate = (this.has(value, 'onUpdate')) ? value.onUpdate : this.defaultUpdate; + onEmit = this.proxyEmit; + onUpdate = this.proxyUpdate; + break; + + // Interpolation + case 9: + this.start = value.values; + var easeTypeI = this.has(value, 'ease') ? value.ease : 'Linear'; + this.ease = GetEaseFunction(easeTypeI, value.easeParams); + this.interpolation = GetInterpolationFunction(value.interpolation); + onEmit = this.easedValueEmit; + onUpdate = this.easeValueUpdate; + current = this.start[0]; + break; } + this.onEmit = onEmit; + this.onUpdate = onUpdate; + this.current = current; + return this; }, @@ -57313,7 +57832,7 @@ var EmitterOp = new Class({ * * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. * @param {string} key - The name of the property. - * @param {number} t - The T value (between 0 and 1) + * @param {number} t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death). * @param {number} value - The current value of the property. * * @return {number} The new value of the property. @@ -57323,6 +57842,53 @@ var EmitterOp = new Class({ return value; }, + /** + * The returned value sets what the property will be at the START of the particles life, on emit. + * + * This method is only used when you have provided a custom emit callback. + * + * @method Phaser.GameObjects.Particles.EmitterOp#proxyEmit + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. + * @param {string} key - The name of the property. + * @param {number} [value] - The current value of the property. + * + * @return {number} The new value of the property. + */ + proxyEmit: function (particle, key, value) + { + var result = this._onEmit(particle, key, value); + + this.current = result; + + return result; + }, + + /** + * The returned value updates the property for the duration of the particles life. + * + * This method is only used when you have provided a custom update callback. + * + * @method Phaser.GameObjects.Particles.EmitterOp#proxyUpdate + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. + * @param {string} key - The name of the property. + * @param {number} t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death). + * @param {number} value - The current value of the property. + * + * @return {number} The new value of the property. + */ + proxyUpdate: function (particle, key, t, value) + { + var result = this._onUpdate(particle, key, t, value); + + this.current = result; + + return result; + }, + /** * An `onEmit` callback that returns the current value of the property. * @@ -57333,7 +57899,7 @@ var EmitterOp = new Class({ */ staticValueEmit: function () { - return this.propertyValue; + return this.current; }, /** @@ -57346,7 +57912,7 @@ var EmitterOp = new Class({ */ staticValueUpdate: function () { - return this.propertyValue; + return this.current; }, /** @@ -57361,7 +57927,9 @@ var EmitterOp = new Class({ { var randomIndex = Math.floor(Math.random() * this.propertyValue.length); - return this.propertyValue[randomIndex]; + this.current = this.propertyValue[randomIndex]; + + return this.current; }, /** @@ -57383,8 +57951,38 @@ var EmitterOp = new Class({ if (particle && particle.data[key]) { particle.data[key].min = value; + particle.data[key].max = this.end; } + this.current = value; + + return value; + }, + + /** + * An `onEmit` callback that returns a value between the {@link Phaser.GameObjects.Particles.EmitterOp#start} and + * {@link Phaser.GameObjects.Particles.EmitterOp#end} range. + * + * @method Phaser.GameObjects.Particles.EmitterOp#randomRangedIntEmit + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. + * @param {string} key - The key of the property. + * + * @return {number} The new value of the property. + */ + randomRangedIntEmit: function (particle, key) + { + var value = Between(this.start, this.end); + + if (particle && particle.data[key]) + { + particle.data[key].min = value; + particle.data[key].max = this.end; + } + + this.current = value; + return value; }, @@ -57402,9 +58000,51 @@ var EmitterOp = new Class({ { var current = this.counter; - var next = this.counter + (this.end - this.start) / this.steps; + var next = current; + + var step = (this.end - this.start) / this.steps; + + if (this.yoyo) + { + var over; + + if (this.direction === 0) + { + // Add step to the current value + next += step; + + if (next >= this.end) + { + over = next - this.end; + + next = this.end - over; - this.counter = Wrap(next, this.start, this.end); + this.direction = 1; + } + } + else + { + // Down + next -= step; + + if (next <= this.start) + { + over = this.start - next; + + next = this.start + over; + + this.direction = 0; + } + } + + this.counter = next; + } + else + { + this.counter = Wrap(next + step, this.start, this.end); + } + + this.current = current; return current; }, @@ -57432,6 +58072,8 @@ var EmitterOp = new Class({ data.max = this.end; } + this.current = this.start; + return this.start; }, @@ -57445,7 +58087,7 @@ var EmitterOp = new Class({ * * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. * @param {string} key - The name of the property. - * @param {number} t - The T value (between 0 and 1) + * @param {number} t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death). * * @return {number} The new value of the property. */ @@ -57453,7 +58095,40 @@ var EmitterOp = new Class({ { var data = particle.data[key]; - return (data.max - data.min) * this.ease(t) + data.min; + var current; + var v = this.ease(t); + + if (this.interpolation) + { + current = this.interpolation(this.start, v); + } + else + { + current = (data.max - data.min) * v + data.min; + } + + this.current = current; + + return current; + }, + + /** + * Destroys this EmitterOp instance and all of its references. + * + * Called automatically when the ParticleEmitter that owns this + * EmitterOp is destroyed. + * + * @method Phaser.GameObjects.Particles.EmitterOp#destroy + * @since 3.60.0 + */ + destroy: function () + { + this.propertyValue = null; + this.defaultValue = null; + this.ease = null; + this.interpolation = null; + this._onEmit = null; + this._onUpdate = null; } }); @@ -57467,22 +58142,26 @@ module.exports = EmitterOp; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(56694); var GetFastValue = __webpack_require__(72632); +var ParticleProcessor = __webpack_require__(30891); /** * @classdesc - * The GravityWell action applies a force on the particle to draw it towards, or repel it from, a single point. + * The Gravity Well Particle Processor applies a force on the particles to draw + * them towards, or repel them from, a single point. * - * The force applied is inversely proportional to the square of the distance from the particle to the point, in accordance with Newton's law of gravity. + * The force applied is inversely proportional to the square of the distance + * from the particle to the point, in accordance with Newton's law of gravity. * * This simulates the effect of gravity over large distances (as between planets, for example). * * @class GravityWell + * @extends Phaser.GameObjects.Particles.ParticleProcessor * @memberof Phaser.GameObjects.Particles * @constructor * @since 3.0.0 @@ -57495,6 +58174,8 @@ var GetFastValue = __webpack_require__(72632); */ var GravityWell = new Class({ + Extends: ParticleProcessor, + initialize: function GravityWell (x, y, power, epsilon, gravity) @@ -57518,33 +58199,7 @@ var GravityWell = new Class({ if (gravity === undefined) { gravity = 50; } } - /** - * The x coordinate of the Gravity Well, in world space. - * - * @name Phaser.GameObjects.Particles.GravityWell#x - * @type {number} - * @since 3.0.0 - */ - this.x = x; - - /** - * The y coordinate of the Gravity Well, in world space. - * - * @name Phaser.GameObjects.Particles.GravityWell#y - * @type {number} - * @since 3.0.0 - */ - this.y = y; - - /** - * The active state of the Gravity Well. An inactive Gravity Well will not influence any particles. - * - * @name Phaser.GameObjects.Particles.GravityWell#active - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.active = true; + ParticleProcessor.call(this, x, y, true); /** * Internal gravity value. @@ -57687,17 +58342,23 @@ module.exports = GravityWell; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var AnimationState = __webpack_require__(16569); var Class = __webpack_require__(56694); var DegToRad = __webpack_require__(75606); +var Rectangle = __webpack_require__(74118); +var RotateAround = __webpack_require__(2386); +var Vector2 = __webpack_require__(93736); /** * @classdesc - * A Particle is a simple Game Object controlled by a Particle Emitter and Manager, and rendered by the Manager. - * It uses its own lightweight physics system, and can interact only with its Emitter's bounds and zones. + * A Particle is a simple object owned and controlled by a Particle Emitter. + * + * It encapsulates all of the properties required to move and update according + * to the Emitters operations. * * @class Particle * @memberof Phaser.GameObjects.Particles @@ -57715,7 +58376,7 @@ var Particle = new Class({ /** * The Emitter to which this Particle belongs. * - * A Particle can only belong to a single Emitter and is created, updated and destroyed via it. + * A Particle can only belong to a single Emitter and is created, updated and destroyed by it. * * @name Phaser.GameObjects.Particles.Particle#emitter * @type {Phaser.GameObjects.Particles.ParticleEmitter} @@ -57724,7 +58385,17 @@ var Particle = new Class({ this.emitter = emitter; /** - * The texture frame used to render this Particle. + * The texture used by this Particle when it renders. + * + * @name Phaser.GameObjects.Particles.Particle#texture + * @type {Phaser.Textures.Texture} + * @default null + * @since 3.60.0 + */ + this.texture = null; + + /** + * The texture frame used by this Particle when it renders. * * @name Phaser.GameObjects.Particles.Particle#frame * @type {Phaser.Textures.Frame} @@ -57931,12 +58602,91 @@ var Particle = new Class({ * @since 3.0.0 */ this.data = { - tint: { min: 0xffffff, max: 0xffffff, current: 0xffffff }, + tint: { min: 0xffffff, max: 0xffffff }, alpha: { min: 1, max: 1 }, rotate: { min: 0, max: 0 }, scaleX: { min: 1, max: 1 }, - scaleY: { min: 1, max: 1 } + scaleY: { min: 1, max: 1 }, + x: { min: 0, max: 0 }, + y: { min: 0, max: 0 }, + accelerationX: { min: 0, max: 0 }, + accelerationY: { min: 0, max: 0 }, + maxVelocityX: { min: 0, max: 0 }, + maxVelocityY: { min: 0, max: 0 }, + moveToX: { min: 0, max: 0 }, + moveToY: { min: 0, max: 0 }, + bounce: { min: 0, max: 0 } }; + + /** + * Interal private value. + * + * @name Phaser.GameObjects.Particles.Particle#isCropped + * @type {boolean} + * @private + * @readonly + * @since 3.60.0 + */ + this.isCropped = false; + + /** + * A reference to the Scene to which this Game Object belongs. + * + * Game Objects can only belong to one Scene. + * + * You should consider this property as being read-only. You cannot move a + * Game Object to another Scene by simply changing it. + * + * @name Phaser.GameObjects.Particles.Particle#scene + * @type {Phaser.Scene} + * @since 3.60.0 + */ + this.scene = emitter.scene; + + /** + * The Animation State component of this Particle. + * + * This component provides features to apply animations to this Particle. + * It is responsible for playing, loading, queuing animations for later playback, + * mixing between animations and setting the current animation frame to this Particle. + * + * @name Phaser.GameObjects.Particles.Particle#anims + * @type {Phaser.Animations.AnimationState} + * @since 3.60.0 + */ + this.anims = new AnimationState(this); + + /** + * A rectangle that holds the bounds of this Particle after a call to + * the `Particle.getBounds` method has been made. + * + * @name Phaser.GameObjects.Particles.Particle#bounds + * @type {Phaser.Geom.Rectangle} + * @since 3.60.0 + */ + this.bounds = new Rectangle(); + }, + + /** + * The Event Emitter proxy. + * + * Passes on all parameters to the `ParticleEmitter` to emit directly. + * + * @method Phaser.GameObjects.Particles.Particle#emit + * @since 3.60.0 + * + * @param {(string|Symbol)} event - The event name. + * @param {any} [a1] - Optional argument 1. + * @param {any} [a2] - Optional argument 2. + * @param {any} [a3] - Optional argument 3. + * @param {any} [a4] - Optional argument 4. + * @param {any} [a5] - Optional argument 5. + * + * @return {boolean} `true` if the event had listeners, else `false`. + */ + emit: function (event, a1, a2, a3, a4, a5) + { + return this.emitter.emit(event, a1, a2, a3, a4, a5); }, /** @@ -57953,15 +58703,35 @@ var Particle = new Class({ }, /** - * Resets the position of this particle back to zero. + * Kills this particle. This sets the `lifeCurrent` value to 0, which forces + * the Particle to be removed the next time its parent Emitter runs an update. * - * @method Phaser.GameObjects.Particles.Particle#resetPosition - * @since 3.16.0 + * @method Phaser.GameObjects.Particles.Particle#kill + * @since 3.60.0 */ - resetPosition: function () + kill: function () { - this.x = 0; - this.y = 0; + this.lifeCurrent = 0; + }, + + /** + * Sets the position of this particle to the given x/y coordinates. + * + * If the parameters are left undefined, it resets the particle back to 0x0. + * + * @method Phaser.GameObjects.Particles.Particle#setPosition + * @since 3.60.0 + * + * @param {number} [x=0] - The x coordinate to set this Particle to. + * @param {number} [y=0] - The y coordinate to set this Particle to. + */ + setPosition: function (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + this.x = x; + this.y = y; }, /** @@ -57970,34 +58740,44 @@ var Particle = new Class({ * @method Phaser.GameObjects.Particles.Particle#fire * @since 3.0.0 * - * @param {number} x - The x coordinate to launch this Particle from. - * @param {number} y - The y coordinate to launch this Particle from. + * @param {number} [x] - The x coordinate to launch this Particle from. + * @param {number} [y] - The y coordinate to launch this Particle from. + * + * @return {boolean} `true` if the Particle is alive, or `false` if it was spawned inside a DeathZone. */ fire: function (x, y) { var emitter = this.emitter; + var ops = emitter.ops; - this.frame = emitter.getFrame(); + var anim = emitter.getAnim(); - if (!this.frame) + if (anim) { - throw new Error('Particle has no texture frame'); + this.anims.play(anim); + } + else + { + this.frame = emitter.getFrame(); + this.texture = this.frame.texture; } - if (emitter.emitZone) + if (!this.frame) { - // Updates particle.x and particle.y during this call - emitter.emitZone.getPoint(this); + throw new Error('Particle has no texture frame'); } + // Updates particle.x and particle.y during this call + emitter.getEmitZone(this); + if (x === undefined) { - this.x += emitter.x.onEmit(this, 'x'); + this.x += ops.x.onEmit(this, 'x'); } - else if (emitter.x.steps > 0) + else if (ops.x.steps > 0) { // EmitterOp is stepped but x was forced (follower?) so use it - this.x += x + emitter.x.onEmit(this, 'x'); + this.x += x + ops.x.onEmit(this, 'x'); } else { @@ -58006,36 +58786,53 @@ var Particle = new Class({ if (y === undefined) { - this.y += emitter.y.onEmit(this, 'y'); + this.y += ops.y.onEmit(this, 'y'); } - else if (emitter.y.steps > 0) + else if (ops.y.steps > 0) { // EmitterOp is stepped but y was forced (follower?) so use it - this.y += y + emitter.y.onEmit(this, 'y'); + this.y += y + ops.y.onEmit(this, 'y'); } else { this.y += y; } - this.life = emitter.lifespan.onEmit(this, 'lifespan'); + this.life = ops.lifespan.onEmit(this, 'lifespan'); this.lifeCurrent = this.life; this.lifeT = 0; - var sx = emitter.speedX.onEmit(this, 'speedX'); - var sy = (emitter.speedY) ? emitter.speedY.onEmit(this, 'speedY') : sx; + this.delayCurrent = ops.delay.onEmit(this, 'delay'); + + this.scaleX = ops.scaleX.onEmit(this, 'scaleX'); + this.scaleY = (ops.scaleY.active) ? ops.scaleY.onEmit(this, 'scaleY') : this.scaleX; + + this.angle = ops.rotate.onEmit(this, 'rotate'); + + this.rotation = DegToRad(this.angle); + + // Check we didn't spawn in the middle of a DeathZone + if (this.delayCurrent === 0 && emitter.getDeathZone(this)) + { + this.lifeCurrent = 0; + + return false; + } + + var sx = ops.speedX.onEmit(this, 'speedX'); + var sy = (ops.speedY.active) ? ops.speedY.onEmit(this, 'speedY') : sx; if (emitter.radial) { - var rad = DegToRad(emitter.angle.onEmit(this, 'angle')); + var rad = DegToRad(ops.angle.onEmit(this, 'angle')); this.velocityX = Math.cos(rad) * Math.abs(sx); this.velocityY = Math.sin(rad) * Math.abs(sy); } else if (emitter.moveTo) { - var mx = emitter.moveToX.onEmit(this, 'moveToX'); - var my = (emitter.moveToY) ? emitter.moveToY.onEmit(this, 'moveToY') : mx; + var mx = ops.moveToX.onEmit(this, 'moveToX'); + var my = ops.moveToY.onEmit(this, 'moveToY'); var lifeS = this.life / 1000; this.velocityX = (mx - this.x) / lifeS; @@ -58049,26 +58846,27 @@ var Particle = new Class({ if (emitter.acceleration) { - this.accelerationX = emitter.accelerationX.onEmit(this, 'accelerationX'); - this.accelerationY = emitter.accelerationY.onEmit(this, 'accelerationY'); + this.accelerationX = ops.accelerationX.onEmit(this, 'accelerationX'); + this.accelerationY = ops.accelerationY.onEmit(this, 'accelerationY'); } - this.maxVelocityX = emitter.maxVelocityX.onEmit(this, 'maxVelocityX'); - this.maxVelocityY = emitter.maxVelocityY.onEmit(this, 'maxVelocityY'); - - this.delayCurrent = emitter.delay.onEmit(this, 'delay'); + this.maxVelocityX = ops.maxVelocityX.onEmit(this, 'maxVelocityX'); + this.maxVelocityY = ops.maxVelocityY.onEmit(this, 'maxVelocityY'); - this.scaleX = emitter.scaleX.onEmit(this, 'scaleX'); - this.scaleY = emitter.scaleY.onEmit(this, 'scaleY'); - - this.angle = emitter.rotate.onEmit(this, 'rotate'); - this.rotation = DegToRad(this.angle); + this.bounce = ops.bounce.onEmit(this, 'bounce'); - this.bounce = emitter.bounce.onEmit(this, 'bounce'); + this.alpha = ops.alpha.onEmit(this, 'alpha'); - this.alpha = emitter.alpha.onEmit(this, 'alpha'); + if (ops.color.active) + { + this.tint = ops.color.onEmit(this, 'tint'); + } + else + { + this.tint = ops.tint.onEmit(this, 'tint'); + } - this.tint = emitter.tint.onEmit(this, 'tint'); + return true; }, /** @@ -58080,18 +58878,21 @@ var Particle = new Class({ * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Emitter that is updating this Particle. * @param {number} delta - The delta time in ms. * @param {number} step - The delta value divided by 1000. - * @param {array} processors - Particle processors (gravity wells). + * @param {Phaser.GameObjects.Particles.ParticleProcessor[]} processors - An array of all active Particle Processors. + * @param {number} t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death). */ - computeVelocity: function (emitter, delta, step, processors) + computeVelocity: function (emitter, delta, step, processors, t) { + var ops = emitter.ops; + var vx = this.velocityX; var vy = this.velocityY; - var ax = this.accelerationX; - var ay = this.accelerationY; + var ax = ops.accelerationX.onUpdate(this, 'accelerationX', t, this.accelerationX); + var ay = ops.accelerationY.onUpdate(this, 'accelerationY', t, this.accelerationY); - var mx = this.maxVelocityX; - var my = this.maxVelocityY; + var mx = ops.maxVelocityX.onUpdate(this, 'maxVelocityX', t, this.maxVelocityX); + var my = ops.maxVelocityY.onUpdate(this, 'maxVelocityY', t, this.maxVelocityY); vx += (emitter.gravityX * step); vy += (emitter.gravityY * step); @@ -58130,7 +58931,7 @@ var Particle = new Class({ // Apply any additional processors for (var i = 0; i < processors.length; i++) { - processors[i].update(this, delta, step); + processors[i].update(this, delta, step, t); } }, @@ -58182,12 +58983,18 @@ var Particle = new Class({ * * @param {number} delta - The delta time in ms. * @param {number} step - The delta value divided by 1000. - * @param {array} processors - An optional array of update processors. + * @param {Phaser.GameObjects.Particles.ParticleProcessor[]} processors - An array of all active Particle Processors. * * @return {boolean} Returns `true` if this Particle has now expired and should be removed, otherwise `false` if still active. */ update: function (delta, step, processors) { + if (this.lifeCurrent === 0) + { + // Particle is dead via `Particle.kill` method. + return true; + } + if (this.delayCurrent > 0) { this.delayCurrent -= delta; @@ -58195,24 +59002,54 @@ var Particle = new Class({ return false; } + this.anims.update(0, delta); + var emitter = this.emitter; + var ops = emitter.ops; // How far along in life is this particle? (t = 0 to 1) var t = 1 - (this.lifeCurrent / this.life); this.lifeT = t; - this.computeVelocity(emitter, delta, step, processors); + this.x = ops.x.onUpdate(this, 'x', t, this.x); + this.y = ops.y.onUpdate(this, 'y', t, this.y); + + if (emitter.moveTo) + { + var mx = ops.moveToX.onUpdate(this, 'moveToX', t, emitter.moveToX); + var my = ops.moveToY.onUpdate(this, 'moveToY', t, emitter.moveToY); + var lifeS = this.lifeCurrent / 1000; + + this.velocityX = (mx - this.x) / lifeS; + this.velocityY = (my - this.y) / lifeS; + } + + this.computeVelocity(emitter, delta, step, processors, t); this.x += this.velocityX * step; this.y += this.velocityY * step; if (emitter.bounds) { + this.bounce = ops.bounce.onUpdate(this, 'bounce', t, this.bounce); + this.checkBounds(emitter); } - if (emitter.deathZone && emitter.deathZone.willKill(this)) + this.scaleX = ops.scaleX.onUpdate(this, 'scaleX', t, this.scaleX); + this.scaleY = this.scaleX; + + if (ops.scaleY.active) + { + this.scaleY = ops.scaleY.onUpdate(this, 'scaleY', t, this.scaleY); + } + + this.angle = ops.rotate.onUpdate(this, 'rotate', t, this.angle); + + this.rotation = DegToRad(this.angle); + + if (emitter.getDeathZone(this)) { this.lifeCurrent = 0; @@ -58220,19 +59057,102 @@ var Particle = new Class({ return true; } - this.scaleX = emitter.scaleX.onUpdate(this, 'scaleX', t, this.scaleX); - this.scaleY = emitter.scaleY.onUpdate(this, 'scaleY', t, this.scaleY); - - this.angle = emitter.rotate.onUpdate(this, 'rotate', t, this.angle); - this.rotation = DegToRad(this.angle); + this.alpha = ops.alpha.onUpdate(this, 'alpha', t, this.alpha); - this.alpha = emitter.alpha.onUpdate(this, 'alpha', t, this.alpha); - - this.tint = emitter.tint.onUpdate(this, 'tint', t, this.tint); + if (ops.color.active) + { + this.tint = ops.color.onUpdate(this, 'color', t, this.tint); + } + else + { + this.tint = ops.tint.onUpdate(this, 'tint', t, this.tint); + } this.lifeCurrent -= delta; return (this.lifeCurrent <= 0); + }, + + /** + * This is a NOOP method and does nothing when called. + * + * @method Phaser.GameObjects.Particles.Particle#setSizeToFrame + * @since 3.60.0 + */ + setSizeToFrame: function () + { + // NOOP + }, + + /** + * Gets the bounds of this particle as a Geometry Rectangle, factoring in any + * transforms of the parent emitter and anything else above it in the display list. + * + * Once calculated the bounds can be accessed via the `Particle.bounds` property. + * + * @method Phaser.GameObjects.Particles.Particle#getBounds + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} [matrix] - Optional transform matrix to apply to this particle. + * + * @return {Phaser.Geom.Rectangle} A Rectangle containing the transformed bounds of this particle. + */ + getBounds: function (matrix) + { + if (matrix === undefined) { matrix = this.emitter.getWorldTransformMatrix(); } + + var sx = Math.abs(matrix.scaleX) * this.scaleX; + var sy = Math.abs(matrix.scaleY) * this.scaleY; + + var x = this.x; + var y = this.y; + var rotation = this.rotation; + var width = (this.frame.width * sx) / 2; + var height = (this.frame.height * sy) / 2; + + var bounds = this.bounds; + + var topLeft = new Vector2(x - width, y - height); + var topRight = new Vector2(x + width, y - height); + var bottomLeft = new Vector2(x - width, y + height); + var bottomRight = new Vector2(x + width, y + height); + + if (rotation !== 0) + { + RotateAround(topLeft, x, y, rotation); + RotateAround(topRight, x, y, rotation); + RotateAround(bottomLeft, x, y, rotation); + RotateAround(bottomRight, x, y, rotation); + } + + matrix.transformPoint(topLeft.x, topLeft.y, topLeft); + matrix.transformPoint(topRight.x, topRight.y, topRight); + matrix.transformPoint(bottomLeft.x, bottomLeft.y, bottomLeft); + matrix.transformPoint(bottomRight.x, bottomRight.y, bottomRight); + + bounds.x = Math.min(topLeft.x, topRight.x, bottomLeft.x, bottomRight.x); + bounds.y = Math.min(topLeft.y, topRight.y, bottomLeft.y, bottomRight.y); + bounds.width = Math.max(topLeft.x, topRight.x, bottomLeft.x, bottomRight.x) - bounds.x; + bounds.height = Math.max(topLeft.y, topRight.y, bottomLeft.y, bottomRight.y) - bounds.y; + + return bounds; + }, + + /** + * Destroys this Particle. + * + * @method Phaser.GameObjects.Particles.Particle#destroy + * @since 3.60.0 + */ + destroy: function () + { + this.anims.destroy(); + + this.anims = null; + this.emitter = null; + this.texture = null; + this.frame = null; + this.scene = null; } }); @@ -58247,201 +59167,379 @@ module.exports = Particle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(95723); +var Add = __webpack_require__(78991); var Class = __webpack_require__(56694); var Components = __webpack_require__(64937); +var ComponentsToJSON = __webpack_require__(48129); +var CopyFrom = __webpack_require__(29538); var DeathZone = __webpack_require__(69361); var EdgeZone = __webpack_require__(54213); +var EmitterColorOp = __webpack_require__(19737); var EmitterOp = __webpack_require__(93025); +var Events = __webpack_require__(40629); +var GameObject = __webpack_require__(89980); var GetFastValue = __webpack_require__(72632); var GetRandom = __webpack_require__(72861); +var GravityWell = __webpack_require__(87811); var HasAny = __webpack_require__(53523); var HasValue = __webpack_require__(19256); +var Inflate = __webpack_require__(7782); +var List = __webpack_require__(71207); +var MergeRect = __webpack_require__(14655); var Particle = __webpack_require__(14909); var RandomZone = __webpack_require__(68433); var Rectangle = __webpack_require__(74118); +var RectangleToRectangle = __webpack_require__(90205); +var Remove = __webpack_require__(66458); +var Render = __webpack_require__(69116); var StableSort = __webpack_require__(17922); +var TransformMatrix = __webpack_require__(69360); var Vector2 = __webpack_require__(93736); var Wrap = __webpack_require__(1071); +/** + * Names of simple configuration properties. + * + * @ignore + */ +var configFastMap = [ + 'active', + 'advance', + 'blendMode', + 'collideBottom', + 'collideLeft', + 'collideRight', + 'collideTop', + 'colorEase', + 'deathCallback', + 'deathCallbackScope', + 'duration', + 'emitCallback', + 'emitCallbackScope', + 'follow', + 'frequency', + 'gravityX', + 'gravityY', + 'maxAliveParticles', + 'maxParticles', + 'name', + 'emitting', + 'particleBringToTop', + 'particleClass', + 'radial', + 'sortCallback', + 'sortOrderAsc', + 'sortProperty', + 'stopAfter', + 'tintFill', + 'timeScale', + 'trackVisible', + 'visible' +]; + +/** + * Names of complex configuration properties. + * + * @ignore + */ +var configOpMap = [ + 'accelerationX', + 'accelerationY', + 'alpha', + 'angle', + 'bounce', + 'color', + 'delay', + 'lifespan', + 'maxVelocityX', + 'maxVelocityY', + 'moveToX', + 'moveToY', + 'quantity', + 'rotate', + 'scaleX', + 'scaleY', + 'speedX', + 'speedY', + 'tint', + 'x', + 'y' +]; + /** * @classdesc - * A particle emitter represents a single particle stream. - * It controls a pool of {@link Phaser.GameObjects.Particles.Particle Particles} and is controlled by a {@link Phaser.GameObjects.Particles.ParticleEmitterManager Particle Emitter Manager}. + * A Particle Emitter is a special kind of Game Object that controls a pool of {@link Phaser.GameObjects.Particles.Particle Particles}. + * + * Particle Emitters are created via a configuration object. The properties of this object + * can be specified in a variety of formats, given you plenty of scope over the values they + * return, leading to complex visual effects. Here are the different forms of configuration + * value you can give: + * + * ## An explicit static value: + * + * ```js + * x: 400 + * ``` + * + * The x value will always be 400 when the particle is spawned. + * + * ## A random value: + * + * ```js + * x: [ 100, 200, 300, 400 ] + * ``` + * + * The x value will be one of the 4 elements in the given array, picked at random on emission. + * + * ## A custom callback: + * + * ```js + * x: (particle, key, t, value) => { + * return value + 50; + * } + * ``` + * + * The x value is the result of calling this function. This is only used when the + * particle is emitted, so it provides it's initial starting value. It is not used + * when the particle is updated (see the onUpdate callback for that) + * + * ## A start / end object: + * + * This allows you to control the change in value between the given start and + * end parameters over the course of the particles lifetime: + * + * ```js + * scale: { start: 0, end: 1 } + * ``` + * + * The particle scale will start at 0 when emitted and ease to a scale of 1 + * over the course of its lifetime. You can also specify the ease function + * used for this change (the default is Linear): + * + * ```js + * scale: { start: 0, end: 1, ease: 'bounce.out' } + * ``` + * + * ## A start / end random object: + * + * The start and end object can have an optional `random` parameter. + * This forces it to pick a random value between the two values and use + * this as the starting value, then easing to the 'end' parameter over + * its lifetime. + * + * ```js + * scale: { start: 4, end: 0.5, random: true } + * ``` + * + * The particle will start with a random scale between 0.5 and 4 and then + * scale to the end value over its lifetime. You can combine the above + * with the `ease` parameter as well to control the value easing. + * + * ## An interpolation object: + * + * You can provide an array of values which will be used for interpolation + * during the particles lifetime. You can also define the interpolation + * function to be used. There are three provided: `linear` (the default), + * `bezier` and `catmull`, or you can provide your own function. + * + * ```js + * x: { values: [ 50, 500, 200, 800 ], interpolation: 'catmull' } + * ``` + * + * The particle scale will interpolate from 50 when emitted to 800 via the other + * points over the course of its lifetime. You can also specify an ease function + * used to control the rate of change through the values (the default is Linear): + * + * ```js + * x: { values: [ 50, 500, 200, 800 ], interpolation: 'catmull', ease: 'bounce.out } + * ``` + * + * ## A stepped emitter object: + * + * The `steps` parameter allows you to control the placement of sequential + * particles across the start-end range: + * + * ```js + * x: { steps: 32, start: 0, end: 576 } + * ``` + * + * Here we have a range of 576 (start to end). This is divided into 32 steps. + * + * The first particle will emit at the x position of 0. The next will emit + * at the next 'step' along, which would be 18. The following particle will emit + * at the next step, which is 36, and so on. Because the range of 576 has been + * divided by 32, creating 18 pixels steps. When a particle reaches the 'end' + * value the next one will start from the beginning again. + * + * ## A stepped emitter object with yoyo: + * + * You can add the optional `yoyo` property to a stepped object: + * + * ```js + * x: { steps: 32, start: 0, end: 576, yoyo: true } + * ``` + * + * As with the stepped emitter, particles are emitted in sequence, from 'start' + * to 'end' in step sized jumps. Normally, when a stepped emitter reaches the + * end it snaps around to the start value again. However, if you provide the 'yoyo' + * parameter then when it reaches the end it will reverse direction and start + * emitting back down to 'start' again. Depending on the effect you require this + * can often look better. + * + * ## A min / max object: + * + * This allows you to pick a random float value between the min and max properties: + * + * ```js + * x: { min: 100, max: 700 } + * ``` + * + * The x value will be a random float between min and max. + * + * You can force it select an integer by setting the 'int' flag: + * + * ```js + * x: { min: 100, max: 700, int: true } + * ``` + * + * Or, you could use the 'random' array approach (see below) + * + * ## A random object: + * + * This allows you to pick a random integer value between the first and second array elements: + * + * ```js + * x: { random: [ 100, 700 ] } + * ``` + * + * The x value will be a random integer between 100 and 700 as it takes the first + * element in the 'random' array as the 'min' value and the 2nd element as the 'max' value. + * + * ## Custom onEmit and onUpdate callbacks: + * + * If the above won't give you the effect you're after, you can provide your own + * callbacks that will be used when the particle is both emitted and updated: + * + * ```js + * x: { + * onEmit: (particle, key, t, value) => { + * return value; + * }, + * onUpdate: (particle, key, t, value) => { + * return value; + * } + * } + * ``` + * + * You can provide either one or both functions. The `onEmit` is called at the + * start of the particles life and defines the value of the property on birth. + * + * The `onUpdate` function is called every time the Particle Emitter updates + * until the particle dies. Both must return a value. + * + * The properties are: + * + * particle - A reference to the Particle instance. + * key - The string based key of the property, i.e. 'x' or 'lifespan'. + * t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death). + * value - The current property value. At a minimum you should return this. + * + * By using the above configuration options you have an unlimited about of + * control over how your particles behave. * * @class ParticleEmitter + * @extends Phaser.GameObjects.GameObject * @memberof Phaser.GameObjects.Particles * @constructor - * @since 3.0.0 + * @since 3.60.0 * + * @extends Phaser.GameObjects.Components.AlphaSingle * @extends Phaser.GameObjects.Components.BlendMode + * @extends Phaser.GameObjects.Components.Depth + * @extends Phaser.GameObjects.Components.FX * @extends Phaser.GameObjects.Components.Mask + * @extends Phaser.GameObjects.Components.Pipeline * @extends Phaser.GameObjects.Components.ScrollFactor + * @extends Phaser.GameObjects.Components.Texture + * @extends Phaser.GameObjects.Components.Transform * @extends Phaser.GameObjects.Components.Visible * - * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} manager - The Emitter Manager this Emitter belongs to. * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Settings for this emitter. */ var ParticleEmitter = new Class({ + Extends: GameObject, + Mixins: [ + Components.AlphaSingle, Components.BlendMode, + Components.Depth, + Components.FX, Components.Mask, + Components.Pipeline, Components.ScrollFactor, - Components.Visible + Components.Texture, + Components.Transform, + Components.Visible, + Render ], initialize: - function ParticleEmitter (manager, config) + function ParticleEmitter (scene, x, y, texture, config) { - /** - * The Emitter Manager this Emitter belongs to. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#manager - * @type {Phaser.GameObjects.Particles.ParticleEmitterManager} - * @since 3.0.0 - */ - this.manager = manager; - - /** - * The texture assigned to particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#texture - * @type {Phaser.Textures.Texture} - * @since 3.0.0 - */ - this.texture = manager.texture; - - /** - * The texture frames assigned to particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#frames - * @type {Phaser.Textures.Frame[]} - * @since 3.0.0 - */ - this.frames = [ manager.defaultFrame ]; - - /** - * The default texture frame assigned to particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#defaultFrame - * @type {Phaser.Textures.Frame} - * @since 3.0.0 - */ - this.defaultFrame = manager.defaultFrame; - - /** - * Names of simple configuration properties. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#configFastMap - * @type {object} - * @since 3.0.0 - */ - this.configFastMap = [ - 'active', - 'blendMode', - 'collideBottom', - 'collideLeft', - 'collideRight', - 'collideTop', - 'deathCallback', - 'deathCallbackScope', - 'emitCallback', - 'emitCallbackScope', - 'follow', - 'frequency', - 'gravityX', - 'gravityY', - 'maxParticles', - 'maxAliveParticles', - 'name', - 'on', - 'particleBringToTop', - 'particleClass', - 'radial', - 'timeScale', - 'trackVisible', - 'visible' - ]; - - /** - * Names of complex configuration properties. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#configOpMap - * @type {object} - * @since 3.0.0 - */ - this.configOpMap = [ - 'accelerationX', - 'accelerationY', - 'angle', - 'alpha', - 'bounce', - 'delay', - 'lifespan', - 'maxVelocityX', - 'maxVelocityY', - 'moveToX', - 'moveToY', - 'quantity', - 'rotate', - 'scaleX', - 'scaleY', - 'speedX', - 'speedY', - 'tint', - 'x', - 'y' - ]; - - /** - * The name of this Particle Emitter. - * - * Empty by default and never populated by Phaser, this is left for developers to use. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#name - * @type {string} - * @default '' - * @since 3.0.0 - */ - this.name = ''; + GameObject.call(this, scene, 'ParticleEmitter'); /** * The Particle Class which will be emitted by this Emitter. * * @name Phaser.GameObjects.Particles.ParticleEmitter#particleClass - * @type {Phaser.Types.GameObjects.Particles.ParticleClassConstructor} + * @type {function} * @default Phaser.GameObjects.Particles.Particle * @since 3.0.0 + * @see Phaser.Types.GameObjects.Particles.ParticleClassConstructor */ this.particleClass = Particle; /** - * The x-coordinate of the particle origin (where particles will be emitted). + * An internal object holding all of the EmitterOp instances. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#x - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setPosition - */ - this.x = new EmitterOp(config, 'x', 0, true); - - /** - * The y-coordinate of the particle origin (where particles will be emitted). + * These are populated as part of the Emitter configuration parsing. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#y - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setPosition + * You typically do not access them directly, but instead use the + * provided getters and setters on this class, such as `ParticleEmitter.speedX` etc. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#ops + * @type {Phaser.Types.GameObjects.Particles.ParticleEmitterOps} + * @since 3.60.0 */ - this.y = new EmitterOp(config, 'y', 0, true); + this.ops = { + accelerationX: new EmitterOp('accelerationX', 0), + accelerationY: new EmitterOp('accelerationY', 0), + alpha: new EmitterOp('alpha', 1), + angle: new EmitterOp('angle', { min: 0, max: 360 }, true), + bounce: new EmitterOp('bounce', 0), + color: new EmitterColorOp('color'), + delay: new EmitterOp('delay', 0, true), + lifespan: new EmitterOp('lifespan', 1000, true), + maxVelocityX: new EmitterOp('maxVelocityX', 10000), + maxVelocityY: new EmitterOp('maxVelocityY', 10000), + moveToX: new EmitterOp('moveToX', 0), + moveToY: new EmitterOp('moveToY', 0), + quantity: new EmitterOp('quantity', 1, true), + rotate: new EmitterOp('rotate', 0), + scaleX: new EmitterOp('scaleX', 1), + scaleY: new EmitterOp('scaleY', 1), + speedX: new EmitterOp('speedX', 0, true), + speedY: new EmitterOp('speedY', 0, true), + tint: new EmitterOp('tint', 0xffffff), + x: new EmitterOp('x', 0), + y: new EmitterOp('y', 0) + }; /** * A radial emitter will emit particles in all directions between angle min and max, @@ -58488,68 +59586,6 @@ var ParticleEmitter = new Class({ */ this.acceleration = false; - /** - * Horizontal acceleration applied to emitted particles, in pixels per second squared. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#accelerationX - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - */ - this.accelerationX = new EmitterOp(config, 'accelerationX', 0, true); - - /** - * Vertical acceleration applied to emitted particles, in pixels per second squared. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#accelerationY - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - */ - this.accelerationY = new EmitterOp(config, 'accelerationY', 0, true); - - /** - * The maximum horizontal velocity of emitted particles, in pixels per second squared. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityX - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 10000 - * @since 3.0.0 - */ - this.maxVelocityX = new EmitterOp(config, 'maxVelocityX', 10000, true); - - /** - * The maximum vertical velocity of emitted particles, in pixels per second squared. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityY - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 10000 - * @since 3.0.0 - */ - this.maxVelocityY = new EmitterOp(config, 'maxVelocityY', 10000, true); - - /** - * The initial horizontal speed of emitted particles, in pixels per second. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#speedX - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setSpeedX - */ - this.speedX = new EmitterOp(config, 'speedX', 0, true); - - /** - * The initial vertical speed of emitted particles, in pixels per second. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#speedY - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setSpeedY - */ - this.speedY = new EmitterOp(config, 'speedY', 0, true); - /** * Whether moveToX and moveToY are set. Set automatically during configuration. * @@ -58563,113 +59599,6 @@ var ParticleEmitter = new Class({ */ this.moveTo = false; - /** - * The x-coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#moveToX - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - */ - this.moveToX = new EmitterOp(config, 'moveToX', null, true); - - /** - * The y-coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#moveToY - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - */ - this.moveToY = new EmitterOp(config, 'moveToY', null, true); - - /** - * Whether particles will rebound when they meet the emitter bounds. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#bounce - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - */ - this.bounce = new EmitterOp(config, 'bounce', 0, true); - - /** - * The horizontal scale of emitted particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#scaleX - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 1 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setScale - * @see Phaser.GameObjects.Particles.ParticleEmitter#setScaleX - */ - this.scaleX = new EmitterOp(config, 'scaleX', 1); - - /** - * The vertical scale of emitted particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#scaleY - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 1 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setScale - * @see Phaser.GameObjects.Particles.ParticleEmitter#setScaleY - */ - this.scaleY = new EmitterOp(config, 'scaleY', 1); - - /** - * Color tint applied to emitted particles. Value must not include the alpha channel. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#tint - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0xffffff - * @since 3.0.0 - */ - this.tint = new EmitterOp(config, 'tint', 0xffffff); - - /** - * The alpha (transparency) of emitted particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#alpha - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 1 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setAlpha - */ - this.alpha = new EmitterOp(config, 'alpha', 1); - - /** - * The lifespan of emitted particles, in ms. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#lifespan - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 1000 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setLifespan - */ - this.lifespan = new EmitterOp(config, 'lifespan', 1000, true); - - /** - * The angle of the initial velocity of emitted particles, in degrees. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#angle - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default { min: 0, max: 360 } - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setAngle - */ - this.angle = new EmitterOp(config, 'angle', { min: 0, max: 360 }, true); - - /** - * The rotation of emitted particles, in degrees. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#rotate - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - */ - this.rotate = new EmitterOp(config, 'rotate', 0); - /** * A function to call when a particle is emitted. * @@ -58711,7 +59640,10 @@ var ParticleEmitter = new Class({ this.deathCallbackScope = null; /** - * Set to hard limit the amount of particle objects this emitter is allowed to create. + * Set to hard limit the amount of particle objects this emitter is allowed to create + * in total. This is the number of `Particle` instances it can create, not the number + * of 'alive' particles. + * * 0 means unlimited. * * @name Phaser.GameObjects.Particles.ParticleEmitter#maxParticles @@ -58722,7 +59654,7 @@ var ParticleEmitter = new Class({ this.maxParticles = 0; /** - * The maximum number of alive (and rendering) particles this emitter will update. + * The maximum number of alive and rendering particles this emitter will update. * When this limit is reached, a particle needs to die before another can be emitted. * * 0 means no limits. @@ -58735,26 +59667,48 @@ var ParticleEmitter = new Class({ this.maxAliveParticles = 0; /** - * How many particles are emitted each time particles are emitted (one explosion or one flow cycle). + * If set, either via the Emitter config, or by directly setting this property, + * the Particle Emitter will stop emitting particles once this total has been + * reached. It will then enter a 'stopped' state, firing the `STOP` + * event. Note that entering a stopped state doesn't mean all the particles + * have finished, just that it's not emitting any further ones. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#quantity - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 1 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrequency - * @see Phaser.GameObjects.Particles.ParticleEmitter#setQuantity + * To know when the final particle expires, listen for the COMPLETE event. + * + * Use this if you wish to launch an exact number of particles and then stop + * your emitter afterwards. + * + * The counter is reset each time the `ParticleEmitter.start` method is called. + * + * 0 means the emitter will not stop based on total emitted particles. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#stopAfter + * @type {number} + * @default 0 + * @since 3.60.0 */ - this.quantity = new EmitterOp(config, 'quantity', 1, true); + this.stopAfter = 0; /** - * How many ms to wait after emission before the particles start updating. + * The number of milliseconds this emitter will emit particles for when in flow mode, + * before it stops emission. A value of 0 (the default) means there is no duration. + * + * When the duration expires the `STOP` event is emitted. Note that entering a + * stopped state doesn't mean all the particles have finished, just that it's + * not emitting any further ones. + * + * To know when the final particle expires, listen for the COMPLETE event. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#delay - * @type {Phaser.GameObjects.Particles.EmitterOp} + * The counter is reset each time the `ParticleEmitter.start` method is called. + * + * 0 means the emitter will not stop based on duration. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#duration + * @type {number} * @default 0 - * @since 3.0.0 + * @since 3.60.0 */ - this.delay = new EmitterOp(config, 'delay', 0, true); + this.duration = 0; /** * For a flow emitter, the time interval (>= 0) between particle flow cycles in ms. @@ -58773,20 +59727,25 @@ var ParticleEmitter = new Class({ /** * Controls if the emitter is currently emitting a particle flow (when frequency >= 0). + * * Already alive particles will continue to update until they expire. + * * Controlled by {@link Phaser.GameObjects.Particles.ParticleEmitter#start} and {@link Phaser.GameObjects.Particles.ParticleEmitter#stop}. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#on + * @name Phaser.GameObjects.Particles.ParticleEmitter#emitting * @type {boolean} * @default true * @since 3.0.0 */ - this.on = true; + this.emitting = true; /** * Newly emitted particles are added to the top of the particle list, i.e. rendered above those already alive. + * * Set to false to send them to the back. * + * Also see the `sortOrder` property for more complex particle sorting. + * * @name Phaser.GameObjects.Particles.ParticleEmitter#particleBringToTop * @type {boolean} * @default true @@ -58805,29 +59764,64 @@ var ParticleEmitter = new Class({ this.timeScale = 1; /** - * An object describing a shape to emit particles from. + * An array containing Particle Emission Zones. These can be either EdgeZones or RandomZones. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#emitZone - * @type {?Phaser.GameObjects.Particles.Zones.EdgeZone|Phaser.GameObjects.Particles.Zones.RandomZone} - * @default null - * @since 3.0.0 + * Particles are emitted from a randomly selected zone from this array. + * + * Prior to Phaser v3.60 an Emitter could only have one single Emission Zone. + * In 3.60 they can now have an array of Emission Zones. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#emitZones + * @type {Phaser.GameObjects.Particles.Zones.EdgeZone[]|Phaser.GameObjects.Particles.Zones.RandomZone[]} + * @since 3.60.0 * @see Phaser.GameObjects.Particles.ParticleEmitter#setEmitZone */ - this.emitZone = null; + this.emitZones = []; /** - * An object describing a shape that deactivates particles when they interact with it. + * An array containing Particle Death Zone objects. A particle is immediately killed as soon as its x/y coordinates + * intersect with any of the configured Death Zones. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#deathZone - * @type {?Phaser.GameObjects.Particles.Zones.DeathZone} - * @default null - * @since 3.0.0 + * Prior to Phaser v3.60 an Emitter could only have one single Death Zone. + * In 3.60 they can now have an array of Death Zones. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#deathZones + * @type {Phaser.GameObjects.Particles.Zones.DeathZone[]} + * @since 3.60.0 * @see Phaser.GameObjects.Particles.ParticleEmitter#setDeathZone */ - this.deathZone = null; + this.deathZones = []; + + /** + * An optional Rectangle object that is used during rendering to cull Particles from + * display. For example, if your particles are limited to only move within a 300x300 + * sized area from their origin, then you can set this Rectangle to those dimensions. + * + * The renderer will check to see if the `viewBounds` Rectangle intersects with the + * Camera bounds during the render step and if not it will skip rendering the Emitter + * entirely. + * + * This allows you to create many emitters in a Scene without the cost of + * rendering if the contents aren't visible. + * + * Note that the Emitter will not perform any checks to see if the Particles themselves + * are outside of these bounds, or not. It will simply check the bounds against the + * camera. Use the `getBounds` method with the `advance` parameter to help define + * the location and placement of the view bounds. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#viewBounds + * @type {?Phaser.Geom.Rectangle} + * @default null + * @since 3.60.0 + * @see Phaser.GameObjects.Particles.ParticleEmitter#setViewBounds + */ + this.viewBounds = null; /** - * A rectangular boundary constraining particle movement. + * A rectangular boundary constraining particle movement. Use the Emitter properties `collideLeft`, + * `collideRight`, `collideTop` and `collideBottom` to control if a particle will rebound off + * the sides of this boundary, or not. This happens when the particles x/y coordinate hits + * the boundary. * * @name Phaser.GameObjects.Particles.ParticleEmitter#bounds * @type {?Phaser.Geom.Rectangle} @@ -58877,40 +59871,6 @@ var ParticleEmitter = new Class({ */ this.collideBottom = true; - /** - * Whether this emitter updates itself and its particles. - * - * Controlled by {@link Phaser.GameObjects.Particles.ParticleEmitter#pause} - * and {@link Phaser.GameObjects.Particles.ParticleEmitter#resume}. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#active - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.active = true; - - /** - * Set this to false to hide any active particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#visible - * @type {boolean} - * @default true - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setVisible - */ - this.visible = true; - - /** - * The blend mode of this emitter's particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#blendMode - * @type {number} - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setBlendMode - */ - this.blendMode = BlendModes.NORMAL; - /** * A Game Object whose position is used as the particle origin. * @@ -58946,15 +59906,13 @@ var ParticleEmitter = new Class({ this.trackVisible = false; /** - * The current texture frame, as an index of {@link Phaser.GameObjects.Particles.ParticleEmitter#frames}. + * The texture frames assigned to particles. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#currentFrame - * @type {number} - * @default 0 + * @name Phaser.GameObjects.Particles.ParticleEmitter#frames + * @type {Phaser.Textures.Frame[]} * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrame */ - this.currentFrame = 0; + this.frames = []; /** * Whether texture {@link Phaser.GameObjects.Particles.ParticleEmitter#frames} are selected at random. @@ -58979,7 +59937,38 @@ var ParticleEmitter = new Class({ this.frameQuantity = 1; /** - * Inactive particles. + * The animations assigned to particles. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#anims + * @type {string[]} + * @since 3.60.0 + */ + this.anims = []; + + /** + * Whether animations {@link Phaser.GameObjects.Particles.ParticleEmitter#anims} are selected at random. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#randomAnim + * @type {boolean} + * @default true + * @since 3.60.0 + * @see Phaser.GameObjects.Particles.ParticleEmitter#setAnim + */ + this.randomAnim = true; + + /** + * The number of consecutive particles that receive a single animation (per frame cycle). + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#animQuantity + * @type {number} + * @default 1 + * @since 3.60.0 + * @see Phaser.GameObjects.Particles.ParticleEmitter#setAnim + */ + this.animQuantity = 1; + + /** + * An array containing all currently inactive Particle instances. * * @name Phaser.GameObjects.Particles.ParticleEmitter#dead * @type {Phaser.GameObjects.Particles.Particle[]} @@ -58989,7 +59978,7 @@ var ParticleEmitter = new Class({ this.dead = []; /** - * Active particles + * An array containing all currently live and rendering Particle instances. * * @name Phaser.GameObjects.Particles.ParticleEmitter#alive * @type {Phaser.GameObjects.Particles.Particle[]} @@ -58999,85 +59988,210 @@ var ParticleEmitter = new Class({ this.alive = []; /** - * The time until the next flow cycle. + * Internal array that holds counter data: + * + * 0 - flowCounter - The time until next flow cycle. + * 1 - frameCounter - Counts up to {@link Phaser.GameObjects.Particles.ParticleEmitter#frameQuantity}. + * 2 - animCounter - Counts up to animQuantity. + * 3 - elapsed - The time remaining until the `duration` limit is reached. + * 4 - stopCounter - The number of particles remaining until `stopAfter` limit is reached. + * 5 - completeFlag - Has the COMPLETE event been emitted? + * 6 - zoneIndex - The emit zone index counter. + * 7 - zoneTotal - The emit zone total counter. + * 8 - currentFrame - The current texture frame, as an index of {@link Phaser.GameObjects.Particles.ParticleEmitter#frames}. + * 9 - currentAnim - The current animation, as an index of {@link Phaser.GameObjects.Particles.ParticleEmitter#anims}. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#_counter + * @name Phaser.GameObjects.Particles.ParticleEmitter#counters + * @type {Float32Array} + * @private + * @since 3.60.0 + */ + this.counters = new Float32Array(10); + + /** + * Cached amount of frames in the `ParticleEmitter.frames` array. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#_frameLength * @type {number} * @private * @default 0 * @since 3.0.0 */ - this._counter = 0; + this._frameLength = 0; /** - * Counts up to {@link Phaser.GameObjects.Particles.ParticleEmitter#frameQuantity}. + * Cached amount of animations in the `ParticleEmitter.anims` array. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#_frameCounter + * @name Phaser.GameObjects.Particles.ParticleEmitter#_animLength * @type {number} * @private * @default 0 - * @since 3.0.0 + * @since 3.60.0 + */ + this._animLength = 0; + + /** + * An internal property used to tell when the emitter is in fast-forwarc mode. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#skipping + * @type {boolean} + * @default true + * @since 3.60.0 + */ + this.skipping = false; + + /** + * An internal Transform Matrix used to cache this emitters world matrix. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#worldMatrix + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.60.0 + */ + this.worldMatrix = new TransformMatrix(); + + /** + * Optionally sort the particles before they render based on this + * property. The property must exist on the `Particle` class, such + * as `y`, `lifeT`, `scaleX`, etc. + * + * When set this overrides the `particleBringToTop` setting. + * + * To reset this and disable sorting, so this property to an empty string. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#sortProperty + * @type {string} + * @since 3.60.0 + */ + this.sortProperty = ''; + + /** + * When `sortProperty` is defined this controls the sorting order, + * either ascending or descending. Toggle to control the visual effect. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#sortOrderAsc + * @type {boolean} + * @since 3.60.0 + */ + this.sortOrderAsc = true; + + /** + * The callback used to sort the particles. Only used if `sortProperty` + * has been set. Set this via the `setSortCallback` method. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#sortCallback + * @type {?Phaser.Types.GameObjects.Particles.ParticleSortCallback} + * @since 3.60.0 + */ + this.sortCallback = this.depthSortCallback; + + /** + * A list of Particle Processors being managed by this Emitter. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#processors + * @type {Phaser.Structs.List.} + * @since 3.60.0 + */ + this.processors = new List(this); + + /** + * The tint fill mode used by the Particles in this Emitter. + * + * `false` = An additive tint (the default), where vertices colors are blended with the texture. + * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#tintFill + * @type {boolean} + * @default false + * @since 3.60.0 */ - this._frameCounter = 0; + this.tintFill = false; + + this.initPipeline(); + + this.setPosition(x, y); + this.setTexture(texture); if (config) { - this.fromJSON(config); + this.setConfig(config); } }, + // Overrides Game Object method + addedToScene: function () + { + this.scene.sys.updateList.add(this); + }, + + // Overrides Game Object method + removedFromScene: function () + { + this.scene.sys.updateList.remove(this); + }, + + /** + * Gets all active Particle Processors. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#getProcessors + * @since 3.60.0 + * + * @return {Phaser.GameObjects.Particles.ParticleProcessor[]} - An array of active Particle Processors. + */ + getProcessors: function () + { + return this.processors.getAll('active', true); + }, + /** * Merges configuration settings into the emitter's current settings. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#fromJSON - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#setConfig + * @since 3.60.0 * * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Settings for this emitter. * * @return {this} This Particle Emitter. */ - fromJSON: function (config) + setConfig: function (config) { if (!config) { return this; } - // Only update properties from their current state if they exist in the given config - var i = 0; var key = ''; - for (i = 0; i < this.configFastMap.length; i++) + var ops = this.ops; + + for (i = 0; i < configOpMap.length; i++) { - key = this.configFastMap[i]; + key = configOpMap[i]; - if (HasValue(config, key)) - { - this[key] = GetFastValue(config, key); - } + ops[key].loadConfig(config); } - for (i = 0; i < this.configOpMap.length; i++) + for (i = 0; i < configFastMap.length; i++) { - key = this.configOpMap[i]; + key = configFastMap[i]; + // Only update properties from their current state if they exist in the given config if (HasValue(config, key)) { - this[key].loadConfig(config); + this[key] = GetFastValue(config, key); } } - this.acceleration = (this.accelerationX.propertyValue !== 0 || this.accelerationY.propertyValue !== 0); + this.acceleration = (this.accelerationX !== 0 || this.accelerationY !== 0); - this.moveTo = (this.moveToX.propertyValue !== null && this.moveToY.propertyValue !== null); + this.moveTo = (this.moveToX !== 0 && this.moveToY !== 0); // Special 'speed' override if (HasValue(config, 'speed')) { - this.speedX.loadConfig(config, 'speed'); - this.speedY = null; + ops.speedX.loadConfig(config, 'speed'); + ops.speedY.active = false; } // If you specify speedX, speedY or moveTo then it changes the emitter from radial to a point emitter @@ -59090,8 +60204,8 @@ var ParticleEmitter = new Class({ if (HasValue(config, 'scale')) { - this.scaleX.loadConfig(config, 'scale'); - this.scaleY.loadConfig(config, 'scale'); + ops.scaleX.loadConfig(config, 'scale'); + ops.scaleY.active = false; } if (HasValue(config, 'callbackScope')) @@ -59104,12 +60218,12 @@ var ParticleEmitter = new Class({ if (HasValue(config, 'emitZone')) { - this.setEmitZone(config.emitZone); + this.addEmitZone(config.emitZone); } if (HasValue(config, 'deathZone')) { - this.setDeathZone(config.deathZone); + this.addDeathZone(config.deathZone); } if (HasValue(config, 'bounds')) @@ -59122,9 +60236,18 @@ var ParticleEmitter = new Class({ this.followOffset.setFromObject(GetFastValue(config, 'followOffset', 0)); } + if (HasValue(config, 'texture')) + { + this.setTexture(config.texture); + } + if (HasValue(config, 'frame')) { - this.setFrame(config.frame); + this.setEmitterFrame(config.frame); + } + else if (HasValue(config, 'anim')) + { + this.setAnim(config.anim); } if (HasValue(config, 'reserve')) @@ -59132,6 +60255,18 @@ var ParticleEmitter = new Class({ this.reserve(config.reserve); } + if (HasValue(config, 'advance')) + { + this.fastForward(config.advance); + } + + this.resetCounters(this.frequency, this.emitting); + + if (this.emitting) + { + this.emit(Events.START, this); + } + return this; }, @@ -59141,51 +60276,76 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#toJSON * @since 3.0.0 * - * @param {object} [output] - An object to copy output into. - * - * @return {object} - The output object. + * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. */ - toJSON: function (output) + toJSON: function () { - if (output === undefined) { output = {}; } + var output = ComponentsToJSON(this); var i = 0; var key = ''; - for (i = 0; i < this.configFastMap.length; i++) + for (i = 0; i < configFastMap.length; i++) { - key = this.configFastMap[i]; + key = configFastMap[i]; output[key] = this[key]; } - for (i = 0; i < this.configOpMap.length; i++) + var ops = this.ops; + + for (i = 0; i < configOpMap.length; i++) { - key = this.configOpMap[i]; + key = configOpMap[i]; - if (this[key]) + if (ops[key]) { - output[key] = this[key].toJSON(); + output[key] = ops[key].toJSON(); } } // special handlers - if (!this.speedY) + if (!ops.speedY.active) { delete output.speedX; - output.speed = this.speedX.toJSON(); + output.speed = ops.speedX.toJSON(); } if (this.scaleX === this.scaleY) { delete output.scaleX; delete output.scaleY; - output.scale = this.scaleX.toJSON(); + output.scale = ops.scaleX.toJSON(); } return output; }, + /** + * Resets the internal counter trackers. + * + * You shouldn't ever need to call this directly. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#resetCounters + * @since 3.60.0 + * + * @param {number} frequency - The frequency counter. + * @param {boolean} on - Set the complete flag. + */ + resetCounters: function (frequency, on) + { + var counters = this.counters; + + counters.fill(0); + + counters[0] = frequency; + + if (on) + { + counters[5] = 1; + } + }, + /** * Continuously moves the particle origin to follow a Game Object's position. * @@ -59239,40 +60399,43 @@ var ParticleEmitter = new Class({ */ getFrame: function () { - if (this.frames.length === 1) + var frames = this.frames; + var current; + + if (frames.length === 1) { - return this.defaultFrame; + current = frames[0]; } else if (this.randomFrame) { - return GetRandom(this.frames); + current = GetRandom(frames); } else { - var frame = this.frames[this.currentFrame]; + current = frames[this.currentFrame]; - this._frameCounter++; + this.frameCounter++; - if (this._frameCounter === this.frameQuantity) + if (this.frameCounter >= this.frameQuantity) { - this._frameCounter = 0; + this.frameCounter = 0; this.currentFrame = Wrap(this.currentFrame + 1, 0, this._frameLength); } - - return frame; } - }, - // frame: 0 - // frame: 'red' - // frame: [ 0, 1, 2, 3 ] - // frame: [ 'red', 'green', 'blue', 'pink', 'white' ] - // frame: { frames: [ 'red', 'green', 'blue', 'pink', 'white' ], [cycle: bool], [quantity: int] } + return this.texture.get(current); + }, /** - * Sets a pattern for assigning texture frames to emitted particles. + * Sets a pattern for assigning texture frames to emitted particles. The `frames` configuration can be any of: + * + * frame: 0 + * frame: 'red' + * frame: [ 0, 1, 2, 3 ] + * frame: [ 'red', 'green', 'blue', 'pink', 'white' ] + * frame: { frames: [ 'red', 'green', 'blue', 'pink', 'white' ], [cycle: bool], [quantity: int] } * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setFrame + * @method Phaser.GameObjects.Particles.ParticleEmitter#setEmitterFrame * @since 3.0.0 * * @param {(array|string|number|Phaser.Types.GameObjects.Particles.ParticleEmitterFrameConfig)} frames - One or more texture frames, or a configuration object. @@ -59281,21 +60444,27 @@ var ParticleEmitter = new Class({ * * @return {this} This Particle Emitter. */ - setFrame: function (frames, pickRandom, quantity) + setEmitterFrame: function (frames, pickRandom, quantity) { if (pickRandom === undefined) { pickRandom = true; } if (quantity === undefined) { quantity = 1; } this.randomFrame = pickRandom; this.frameQuantity = quantity; + this.currentFrame = 0; - this._frameCounter = 0; var t = typeof (frames); - if (Array.isArray(frames) || t === 'string' || t === 'number') + this.frames.length = 0; + + if (Array.isArray(frames)) + { + this.frames = this.frames.concat(frames); + } + else if (t === 'string' || t === 'number') { - this.manager.setEmitterFrames(frames, this); + this.frames.push(frames); } else if (t === 'object') { @@ -59305,7 +60474,7 @@ var ParticleEmitter = new Class({ if (frames) { - this.manager.setEmitterFrames(frames, this); + this.frames = this.frames.concat(frames); } var isCycle = GetFastValue(frameConfig, 'cycle', false); @@ -59327,40 +60496,127 @@ var ParticleEmitter = new Class({ }, /** - * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle movement on or off. + * Chooses an animation from {@link Phaser.GameObjects.Particles.ParticleEmitter#anims}, if populated. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setRadial - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#getAnim + * @since 3.60.0 * - * @param {boolean} [value=true] - Radial mode (true) or point mode (true). + * @return {string} The animation to play, or `null` if there aren't any. + */ + getAnim: function () + { + var anims = this.anims; + + if (anims.length === 0) + { + return null; + } + else if (anims.length === 1) + { + return anims[0]; + } + else if (this.randomAnim) + { + return GetRandom(anims); + } + else + { + var anim = anims[this.currentAnim]; + + this.animCounter++; + + if (this.animCounter >= this.animQuantity) + { + this.animCounter = 0; + this.currentAnim = Wrap(this.currentAnim + 1, 0, this._animLength); + } + + return anim; + } + }, + + /** + * Sets a pattern for assigning animations to emitted particles. The `anims` configuration can be any of: + * + * anim: 'red' + * anim: [ 'red', 'green', 'blue', 'pink', 'white' ] + * anim: { anims: [ 'red', 'green', 'blue', 'pink', 'white' ], [cycle: bool], [quantity: int] } + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setAnim + * @since 3.60.0 + * + * @param {(array|string|Phaser.Types.GameObjects.Particles.ParticleEmitterFrameConfig)} anims - One or more animations, or a configuration object. + * @param {boolean} [pickRandom=true] - Whether animations should be assigned at random from `anims`. + * @param {number} [quantity=1] - The number of consecutive particles that will receive each animation. * * @return {this} This Particle Emitter. */ - setRadial: function (value) + setAnim: function (anims, pickRandom, quantity) { - if (value === undefined) { value = true; } + if (pickRandom === undefined) { pickRandom = true; } + if (quantity === undefined) { quantity = 1; } - this.radial = value; + this.randomAnim = pickRandom; + this.animQuantity = quantity; + + this.currentAnim = 0; + + var t = typeof (anims); + + this.anims.length = 0; + + if (Array.isArray(anims)) + { + this.anims = this.anims.concat(anims); + } + else if (t === 'string') + { + this.anims.push(anims); + } + else if (t === 'object') + { + var animConfig = anims; + + anims = GetFastValue(animConfig, 'anims', null); + + if (anims) + { + this.anims = this.anims.concat(anims); + } + + var isCycle = GetFastValue(animConfig, 'cycle', false); + + this.randomAnim = (isCycle) ? false : true; + + this.animQuantity = GetFastValue(animConfig, 'quantity', quantity); + } + + this._animLength = this.anims.length; + + if (this._animLength === 1) + { + this.animQuantity = 1; + this.randomAnim = false; + } return this; }, /** - * Sets the position of the emitter's particle origin. - * New particles will be emitted here. + * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle movement on or off. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setPosition + * @method Phaser.GameObjects.Particles.ParticleEmitter#setRadial * @since 3.0.0 * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} x - The x-coordinate of the particle origin. - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} y - The y-coordinate of the particle origin. + * @param {boolean} [value=true] - Radial mode (true) or point mode (true). * * @return {this} This Particle Emitter. */ - setPosition: function (x, y) + setRadial: function (value) { - this.x.onChange(x); - this.y.onChange(y); + if (value === undefined) { value = true; } + + this.radial = value; return this; }, @@ -59370,8 +60626,10 @@ var ParticleEmitter = new Class({ * * To remove the boundary, set {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds} to null. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setBounds - * @since 3.0.0 + * Particles will rebound off the edges of the boundary. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setParticleBounds + * @since 3.60.0 * * @param {(number|Phaser.Types.GameObjects.Particles.ParticleEmitterBounds|Phaser.Types.GameObjects.Particles.ParticleEmitterBoundsAlt)} x - The x-coordinate of the left edge of the boundary, or an object representing a rectangle. * @param {number} y - The y-coordinate of the top edge of the boundary. @@ -59380,7 +60638,7 @@ var ParticleEmitter = new Class({ * * @return {this} This Particle Emitter. */ - setBounds: function (x, y, width, height) + setParticleBounds: function (x, y, width, height) { if (typeof x === 'object') { @@ -59405,409 +60663,583 @@ var ParticleEmitter = new Class({ }, /** - * Sets the initial horizontal speed of emitted particles. - * Changes the emitter to point mode. + * Sets the initial radial speed of emitted particles. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setSpeedX - * @since 3.0.0 + * Changes the emitter to radial mode. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setParticleSpeed + * @since 3.60.0 * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second. + * @param {number} x - The horizontal scale of the emitted Particles. + * @param {number} [y=x] - The vertical scale of emitted Particles. If not set it will use the `x` value. * * @return {this} This Particle Emitter. */ - setSpeedX: function (value) + setParticleSpeed: function (x, y) { - this.speedX.onChange(value); + if (y === undefined) { y = x; } + + this.ops.speedX.onChange(x); + + if (x === y) + { + this.ops.speedY.active = false; + } + else + { + this.ops.speedY.onChange(y); + } // If you specify speedX and Y then it changes the emitter from radial to a point emitter - this.radial = false; + this.radial = true; return this; }, /** - * Sets the initial vertical speed of emitted particles. - * Changes the emitter to point mode. + * Sets the vertical and horizontal scale of the emitted particles. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setSpeedY - * @since 3.0.0 + * You can also set the scale of the entire emitter via `setScale`. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setParticleScale + * @since 3.60.0 * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second. + * @param {number} [x=1] - The horizontal scale of the emitted Particles. + * @param {number} [y=x] - The vertical scale of emitted Particles. If not set it will use the `x` value. * * @return {this} This Particle Emitter. */ - setSpeedY: function (value) + setParticleScale: function (x, y) { - if (this.speedY) - { - this.speedY.onChange(value); + if (x === undefined) { x = 1; } + if (y === undefined) { y = x; } - // If you specify speedX and Y then it changes the emitter from radial to a point emitter - this.radial = false; - } + this.ops.scaleX.onChange(x); + this.ops.scaleY.onChange(y); return this; }, /** - * Sets the initial radial speed of emitted particles. - * Changes the emitter to radial mode. + * Sets the gravity applied to emitted particles. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setSpeed - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#setParticleGravity + * @since 3.60.0 * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second. + * @param {number} x - Horizontal acceleration due to gravity, in pixels per second squared. Set to zero for no gravity. + * @param {number} y - Vertical acceleration due to gravity, in pixels per second squared. Set to zero for no gravity. * * @return {this} This Particle Emitter. */ - setSpeed: function (value) + setParticleGravity: function (x, y) { - this.speedX.onChange(value); - this.speedY = null; - - // If you specify speedX and Y then it changes the emitter from radial to a point emitter - this.radial = true; + this.gravityX = x; + this.gravityY = y; return this; }, /** - * Sets the horizontal scale of emitted particles. + * Sets the opacity (alpha) of emitted particles. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setScaleX - * @since 3.0.0 + * You can also set the alpha of the entire emitter via `setAlpha`. * - * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1. + * @method Phaser.GameObjects.Particles.ParticleEmitter#setParticleAlpha + * @since 3.60.0 + * + * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 (transparent) and 1 (opaque). * * @return {this} This Particle Emitter. */ - setScaleX: function (value) + setParticleAlpha: function (value) { - this.scaleX.onChange(value); + this.ops.alpha.onChange(value); return this; }, /** - * Sets the vertical scale of emitted particles. + * Sets the color tint of emitted particles. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setScaleY - * @since 3.0.0 + * This is a WebGL only feature. * - * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1. + * @method Phaser.GameObjects.Particles.ParticleEmitter#setParticleTint + * @since 3.60.0 + * @webglOnly + * + * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 and 0xffffff. * * @return {this} This Particle Emitter. */ - setScaleY: function (value) + setParticleTint: function (value) { - this.scaleY.onChange(value); + this.ops.tint.onChange(value); return this; }, /** - * Sets the scale of emitted particles. This updates both the scaleX and scaleY values. + * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setScale + * The value is given in degrees using Phaser's right-handed coordinate system. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setEmitterAngle * @since 3.0.0 * - * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1. + * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The angle of the initial velocity of emitted particles, in degrees. * * @return {this} This Particle Emitter. */ - setScale: function (value) + setEmitterAngle: function (value) { - this.scaleX.onChange(value); - this.scaleY.onChange(value); + this.ops.angle.onChange(value); return this; }, /** - * Sets the horizontal gravity applied to emitted particles. + * Sets the lifespan of newly emitted particles in milliseconds. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setGravityX - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#setParticleLifespan + * @since 3.60.0 * - * @param {number} value - Acceleration due to gravity, in pixels per second squared. + * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The lifespan of a particle, in ms. * * @return {this} This Particle Emitter. */ - setGravityX: function (value) + setParticleLifespan: function (value) { - this.gravityX = value; + this.lifespan.onChange(value); return this; }, /** - * Sets the vertical gravity applied to emitted particles. + * Sets the number of particles released at each flow cycle or explosion. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setGravityY + * @method Phaser.GameObjects.Particles.ParticleEmitter#setQuantity * @since 3.0.0 * - * @param {number} value - Acceleration due to gravity, in pixels per second squared. + * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} quantity - The number of particles to release at each flow cycle or explosion. * * @return {this} This Particle Emitter. */ - setGravityY: function (value) + setQuantity: function (quantity) { - this.gravityY = value; + this.quantity = quantity; return this; }, /** - * Sets the gravity applied to emitted particles. + * Sets the emitter's {@link Phaser.GameObjects.Particles.ParticleEmitter#frequency} + * and {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setGravity + * @method Phaser.GameObjects.Particles.ParticleEmitter#setFrequency * @since 3.0.0 * - * @param {number} x - Horizontal acceleration due to gravity, in pixels per second squared. - * @param {number} y - Vertical acceleration due to gravity, in pixels per second squared. + * @param {number} frequency - The time interval (>= 0) of each flow cycle, in ms; or -1 to put the emitter in explosion mode. + * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} [quantity] - The number of particles to release at each flow cycle or explosion. * * @return {this} This Particle Emitter. */ - setGravity: function (x, y) + setFrequency: function (frequency, quantity) { - this.gravityX = x; - this.gravityY = y; + this.frequency = frequency; + + this.flowCounter = (frequency > 0) ? frequency : 0; + + if (quantity) + { + this.quantity = quantity; + } return this; }, /** - * Sets the opacity of emitted particles. + * Adds a new Particle Death Zone to this Emitter. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setAlpha - * @since 3.0.0 + * A particle is immediately killed as soon as its x/y coordinates intersect + * with any of the configured Death Zones. * - * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 (transparent) and 1 (opaque). + * The `source` can be a Geometry Shape, such as a Circle, Rectangle or Triangle. + * Any valid object from the `Phaser.Geometry` namespace is allowed, as long as + * it supports a `contains` function. You can set the `type` to be either `onEnter` + * or `onLeave`. * - * @return {this} This Particle Emitter. + * A single Death Zone instance can only exist once within this Emitter, but can belong + * to multiple Emitters. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#addDeathZone + * @since 3.60.0 + * + * @param {Phaser.Types.GameObjects.Particles.DeathZoneObject|Phaser.Types.GameObjects.Particles.DeathZoneObject[]} config - A Death Zone configuration object, a Death Zone instance, a valid Geometry object or an array of them. + * + * @return {Phaser.GameObjects.Particles.Zones.DeathZone} The Death Zone that was added to this Emitter. */ - setAlpha: function (value) + addDeathZone: function (config) { - this.alpha.onChange(value); + if (!Array.isArray(config)) + { + config = [ config ]; + } - return this; + var zone; + + for (var i = 0; i < config.length; i++) + { + zone = config[i]; + + if (zone instanceof DeathZone) + { + Add(this.deathZones, zone); + } + else if (typeof zone.contains === 'function') + { + zone = new DeathZone(zone, true); + + Add(this.deathZones, zone); + } + else + { + var type = GetFastValue(zone, 'type', 'onEnter'); + var source = GetFastValue(zone, 'source', null); + + if (source && typeof source.contains === 'function') + { + var killOnEnter = (type === 'onEnter') ? true : false; + + zone = new DeathZone(source, killOnEnter); + + Add(this.deathZones, zone); + } + } + } + + return zone; }, /** - * Sets the color tint of emitted particles. + * Removes the given Particle Death Zone from this Emitter. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setTint - * @since 3.22.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#removeDeathZone + * @since 3.60.0 * - * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 and 0xffffff. + * @param {Phaser.GameObjects.Particles.Zones.DeathZone} zone - The Death Zone that should be removed from this Emitter. * * @return {this} This Particle Emitter. */ - setTint: function (value) + removeDeathZone: function (zone) { - this.tint.onChange(value); + Remove(this.deathZones, zone); return this; }, /** - * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream. + * Adds a new Particle Emission Zone to this Emitter. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setEmitterAngle - * @since 3.0.0 + * An {@link Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig EdgeZone} places particles on its edges. + * Its {@link Phaser.Types.GameObjects.Particles.EdgeZoneSource source} can be a Curve, Path, Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; + * or any object with a suitable {@link Phaser.Types.GameObjects.Particles.EdgeZoneSourceCallback getPoints} method. * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The angle of the initial velocity of emitted particles. + * A {@link Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig RandomZone} places the particles randomly within its interior. + * Its {@link RandomZoneSource source} can be a Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable {@link Phaser.Types.GameObjects.Particles.RandomZoneSourceCallback getRandomPoint} method. * - * @return {this} This Particle Emitter. + * An Emission Zone can only exist once within this Emitter. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#addEmitZone + * @since 3.60.0 + * + * @param {Phaser.Types.GameObjects.Particles.EmitZoneObject|Phaser.Types.GameObjects.Particles.EmitZoneObject[]} zone - An Emission Zone configuration object, a RandomZone or EdgeZone instance, or an array of them. + * + * @return {Phaser.GameObjects.Particles.Zones.EdgeZone|Phaser.GameObjects.Particles.Zones.RandomZone} The Emission Zone that was added to this Emitter. */ - setEmitterAngle: function (value) + addEmitZone: function (config) { - this.angle.onChange(value); + if (!Array.isArray(config)) + { + config = [ config ]; + } - return this; + var zone; + + for (var i = 0; i < config.length; i++) + { + zone = config[i]; + + if (zone instanceof RandomZone || zone instanceof EdgeZone) + { + Add(this.emitZones, zone); + } + else + { + // Where source = Geom like Circle, or a Path or Curve + // emitZone: { type: 'random', source: X } + // emitZone: { type: 'edge', source: X, quantity: 32, [stepRate=0], [yoyo=false], [seamless=true], [total=1] } + + var type = GetFastValue(zone, 'type', 'random'); + var source = GetFastValue(zone, 'source', null); + + if (type === 'random') + { + zone = new RandomZone(source); + } + else if (type === 'edge') + { + var quantity = GetFastValue(zone, 'quantity', 1); + var stepRate = GetFastValue(zone, 'stepRate', 0); + var yoyo = GetFastValue(zone, 'yoyo', false); + var seamless = GetFastValue(zone, 'seamless', true); + var total = GetFastValue(zone, 'total', -1); + + zone = new EdgeZone(source, quantity, stepRate, yoyo, seamless, total); + } + + if (zone) + { + Add(this.emitZones, zone); + } + } + } + + return zone; }, /** - * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream. + * Removes the given Particle Emission Zone from this Emitter. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setAngle - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#removeEmitZone + * @since 3.60.0 * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The angle of the initial velocity of emitted particles. + * @param {Phaser.GameObjects.Particles.Zones.EdgeZone|Phaser.GameObjects.Particles.Zones.RandomZone} zone - The Emission Zone that should be removed from this Emitter. * * @return {this} This Particle Emitter. */ - setAngle: function (value) + removeEmitZone: function (zone) { - this.angle.onChange(value); + Remove(this.emitZones, zone); + + this.zoneIndex = 0; return this; }, /** - * Sets the lifespan of newly emitted particles. + * Takes the given particle and sets its x/y coordinates to match the next available + * emission zone, if any have been configured. This method is called automatically + * as part of the `Particle.fire` process. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setLifespan - * @since 3.0.0 + * The Emit Zones are iterated in sequence. Once a zone has had a particle emitted + * from it, then the next zone is used and so on, in a loop. * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The particle lifespan, in ms. + * @method Phaser.GameObjects.Particles.ParticleEmitter#getEmitZone + * @since 3.60.0 * - * @return {this} This Particle Emitter. + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle to set the emission zone for. */ - setLifespan: function (value) + getEmitZone: function (particle) { - this.lifespan.onChange(value); + var zones = this.emitZones; + var len = zones.length; - return this; + if (len === 0) + { + return; + } + else + { + var zone = zones[this.zoneIndex]; + + zone.getPoint(particle); + + if (zone.total > -1) + { + this.zoneTotal++; + + if (this.zoneTotal >= zone.total) + { + this.zoneTotal = 0; + + this.zoneIndex = Wrap(this.zoneIndex + 1, 0, len); + } + } + } }, /** - * Sets the number of particles released at each flow cycle or explosion. + * Takes the given particle and checks to see if any of the configured Death Zones + * will kill it and returns the result. This method is called automatically as part + * of the `Particle.update` process. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setQuantity - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#getDeathZone + * @fires Phaser.GameObjects.Particles.Events#DEATH_ZONE + * @since 3.60.0 * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} quantity - The number of particles to release at each flow cycle or explosion. + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle to test against the Death Zones. * - * @return {this} This Particle Emitter. + * @return {boolean} `true` if the particle should be killed, otherwise `false`. */ - setQuantity: function (quantity) + getDeathZone: function (particle) { - this.quantity.onChange(quantity); + var zones = this.deathZones; - return this; + for (var i = 0; i < zones.length; i++) + { + var bounds = particle.getBounds(this.worldMatrix); + + if (zones[i].willKill(bounds.centerX, bounds.centerY)) + { + this.emit(Events.DEATH_ZONE, this, particle, zones[i]); + + return true; + } + } + + return false; }, /** - * Sets the emitter's {@link Phaser.GameObjects.Particles.ParticleEmitter#frequency} - * and {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}. + * Changes the currently active Emission Zone. The zones should have already + * been added to this Emitter either via the emitter config, or the + * `addEmitZone` method. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setFrequency + * Call this method by passing either a numeric zone index value, or + * the zone instance itself. + * + * Prior to v3.60 an Emitter could only have a single Emit Zone and this + * method was how you set it. From 3.60 and up it now performs a different + * function and swaps between all available active zones. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setEmitZone * @since 3.0.0 * - * @param {number} frequency - The time interval (>= 0) of each flow cycle, in ms; or -1 to put the emitter in explosion mode. - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} [quantity] - The number of particles to release at each flow cycle or explosion. + * @param {number|Phaser.GameObjects.Particles.Zones.EdgeZone|Phaser.GameObjects.Particles.Zones.RandomZone} zone - The Emit Zone to set as the active zone. * * @return {this} This Particle Emitter. */ - setFrequency: function (frequency, quantity) + setEmitZone: function (zone) { - this.frequency = frequency; + var index; - this._counter = 0; + if (isFinite(zone)) + { + index = zone; + } + else + { + index = this.emitZones.indexOf(zone); + } - if (quantity) + if (index >= 0) { - this.quantity.onChange(quantity); + this.zoneIndex = index; } return this; }, /** - * Sets or removes the {@link Phaser.GameObjects.Particles.ParticleEmitter#emitZone}. - * - * An {@link Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig EdgeZone} places particles on its edges. Its {@link Phaser.Types.GameObjects.Particles.EdgeZoneSource source} can be a Curve, Path, Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable {@link Phaser.Types.GameObjects.Particles.EdgeZoneSourceCallback getPoints} method. + * Adds a Particle Processor, such as a Gravity Well, to this Emitter. * - * A {@link Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig RandomZone} places randomly within its interior. Its {@link RandomZoneSource source} can be a Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable {@link Phaser.Types.GameObjects.Particles.RandomZoneSourceCallback getRandomPoint} method. + * It will start processing particles from the next update as long as its `active` + * property is set. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setEmitZone - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#addParticleProcessor + * @since 3.60.0 * - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig} [zoneConfig] - An object describing the zone, or `undefined` to remove any current emit zone. + * @param {Phaser.GameObjects.Particles.ParticleProcessor} processor - The Particle Processor to add to this Emitter Manager. * - * @return {this} This Particle Emitter. + * @return {Phaser.GameObjects.Particles.ParticleProcessor} The Particle Processor that was added to this Emitter Manager. */ - setEmitZone: function (zoneConfig) + addParticleProcessor: function (processor) { - if (zoneConfig === undefined) + if (!this.processors.exists(processor)) { - this.emitZone = null; - } - else - { - // Where source = Geom like Circle, or a Path or Curve - // emitZone: { type: 'random', source: X } - // emitZone: { type: 'edge', source: X, quantity: 32, [stepRate=0], [yoyo=false], [seamless=true] } - - var type = GetFastValue(zoneConfig, 'type', 'random'); - var source = GetFastValue(zoneConfig, 'source', null); - - switch (type) + if (processor.emitter) { - case 'random': - - this.emitZone = new RandomZone(source); - - break; - - case 'edge': - - var quantity = GetFastValue(zoneConfig, 'quantity', 1); - var stepRate = GetFastValue(zoneConfig, 'stepRate', 0); - var yoyo = GetFastValue(zoneConfig, 'yoyo', false); - var seamless = GetFastValue(zoneConfig, 'seamless', true); + processor.emitter.removeParticleProcessor(processor); + } - this.emitZone = new EdgeZone(source, quantity, stepRate, yoyo, seamless); + this.processors.add(processor); - break; - } + processor.emitter = this; } - return this; + return processor; }, /** - * Sets or removes the {@link Phaser.GameObjects.Particles.ParticleEmitter#deathZone}. + * Removes a Particle Processor from this Emitter. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setDeathZone - * @since 3.0.0 + * The Processor must belong to this Emitter to be removed. * - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterDeathZoneConfig} [zoneConfig] - An object describing the zone, or `undefined` to remove any current death zone. + * It is not destroyed when removed, allowing you to move it to another Emitter Manager, + * so if you no longer require it you should call its `destroy` method directly. * - * @return {this} This Particle Emitter. + * @method Phaser.GameObjects.Particles.ParticleEmitter#removeParticleProcessor + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.ParticleProcessor} processor - The Particle Processor to remove from this Emitter Manager. + * + * @return {?Phaser.GameObjects.Particles.ParticleProcessor} The Particle Processor that was removed, or null if it could not be found. */ - setDeathZone: function (zoneConfig) + removeParticleProcessor: function (processor) { - if (zoneConfig === undefined) - { - this.deathZone = null; - } - else + if (this.processors.exists(processor)) { - // Where source = Geom like Circle or Rect that supports a 'contains' function - // deathZone: { type: 'onEnter', source: X } - // deathZone: { type: 'onLeave', source: X } - - var type = GetFastValue(zoneConfig, 'type', 'onEnter'); - var source = GetFastValue(zoneConfig, 'source', null); - - if (source && typeof source.contains === 'function') - { - var killOnEnter = (type === 'onEnter') ? true : false; + this.processors.remove(processor, true); - this.deathZone = new DeathZone(source, killOnEnter); - } + processor.emitter = null; } - return this; + return processor; + }, + + /** + * Creates a new Gravity Well, adds it to this Emitter and returns a reference to it. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#createGravityWell + * @since 3.60.0 + * + * @param {Phaser.Types.GameObjects.Particles.GravityWellConfig} config - Configuration settings for the Gravity Well to create. + * + * @return {Phaser.GameObjects.Particles.GravityWell} The Gravity Well that was created. + */ + createGravityWell: function (config) + { + return this.addParticleProcessor(new GravityWell(config)); }, /** * Creates inactive particles and adds them to this emitter's pool. * + * If `ParticleEmitter.maxParticles` is set it will limit the + * value passed to this method to make sure it's not exceeded. + * * @method Phaser.GameObjects.Particles.ParticleEmitter#reserve * @since 3.0.0 * - * @param {number} particleCount - The number of particles to create. + * @param {number} count - The number of particles to create. * * @return {this} This Particle Emitter. */ - reserve: function (particleCount) + reserve: function (count) { var dead = this.dead; - for (var i = 0; i < particleCount; i++) + if (this.maxParticles > 0) + { + var total = this.getParticleCount(); + + if (total + count > this.maxParticles) + { + count = this.maxParticles - (total + count); + } + } + + for (var i = 0; i < count; i++) { dead.push(new this.particleClass(this)); } @@ -59938,7 +61370,9 @@ var ParticleEmitter = new Class({ }, /** - * Deactivates every particle in this emitter. + * Deactivates every particle in this emitter immediately. + * + * This particles are killed but do not emit an event or callback. * * @method Phaser.GameObjects.Particles.ParticleEmitter#killAll * @since 3.0.0 @@ -59959,13 +61393,14 @@ var ParticleEmitter = new Class({ }, /** - * Calls a function for each active particle in this emitter. + * Calls a function for each active particle in this emitter. The function is + * sent two parameters: a reference to the Particle instance and to this Emitter. * * @method Phaser.GameObjects.Particles.ParticleEmitter#forEachAlive * @since 3.0.0 * * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function. - * @param {*} context - The function's calling context. + * @param {*} context - The functions calling context. * * @return {this} This Particle Emitter. */ @@ -59974,10 +61409,10 @@ var ParticleEmitter = new Class({ var alive = this.alive; var length = alive.length; - for (var index = 0; index < length; ++index) + for (var i = 0; i < length; i++) { // Sends the Particle and the Emitter - callback.call(context, alive[index], this); + callback.call(context, alive[i], this); } return this; @@ -59990,7 +61425,7 @@ var ParticleEmitter = new Class({ * @since 3.0.0 * * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function. - * @param {*} context - The function's calling context. + * @param {*} context - The functions calling context. * * @return {this} This Particle Emitter. */ @@ -59999,10 +61434,9 @@ var ParticleEmitter = new Class({ var dead = this.dead; var length = dead.length; - for (var index = 0; index < length; ++index) + for (var i = 0; i < length; i++) { - // Sends the Particle and the Emitter - callback.call(context, dead[index], this); + callback.call(context, dead[i], this); } return this; @@ -60016,31 +61450,74 @@ var ParticleEmitter = new Class({ * If this emitter is in explode mode (frequency = -1), nothing will happen. * Use {@link Phaser.GameObjects.Particles.ParticleEmitter#explode} or {@link Phaser.GameObjects.Particles.ParticleEmitter#flow} instead. * + * Calling this method will emit the `START` event. + * * @method Phaser.GameObjects.Particles.ParticleEmitter#start + * @fires Phaser.GameObjects.Particles.Events#START * @since 3.0.0 * + * @param {number} [advance=0] - Advance this number of ms in time through the emitter. + * @param {number} [duration=0] - Limit this emitter to only emit particles for the given number of ms. Setting this parameter will override any duration already set in the Emitter configuration object. + * * @return {this} This Particle Emitter. */ - start: function () + start: function (advance, duration) { - this.on = true; + if (advance === undefined) { advance = 0; } + + if (!this.emitting) + { + if (advance > 0) + { + this.fastForward(advance); + } + + this.emitting = true; - this._counter = 0; + this.resetCounters(this.frequency, true); + + if (duration !== undefined) + { + this.duration = Math.abs(duration); + } + + this.emit(Events.START, this); + } return this; }, /** - * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#on off} the emitter. + * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#emitting off} the emitter and + * stops it from emitting further particles. Currently alive particles will remain + * active until they naturally expire unless you set the `kill` parameter to `true`. + * + * Calling this method will emit the `STOP` event. When the final particle has + * expired the `COMPLETE` event will be emitted. * * @method Phaser.GameObjects.Particles.ParticleEmitter#stop + * @fires Phaser.GameObjects.Particles.Events#STOP * @since 3.11.0 * + * @param {boolean} [kill=false] - Kill all particles immediately (true), or leave them to die after their lifespan expires? (false, the default) + * * @return {this} This Particle Emitter. */ - stop: function () + stop: function (kill) { - this.on = false; + if (kill === undefined) { kill = false; } + + if (this.emitting) + { + this.emitting = false; + + if (kill) + { + this.killAll(); + } + + this.emit(Events.STOP, this); + } return this; }, @@ -60076,16 +61553,72 @@ var ParticleEmitter = new Class({ }, /** - * Removes the emitter from its manager and the scene. + * Set the property by which active particles are sorted prior to be rendered. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#remove - * @since 3.22.0 + * It allows you to control the rendering order of the particles. + * + * This can be any valid property of the `Particle` class, such as `y`, `alpha` + * or `lifeT`. + * + * The 'alive' particles array is sorted in place each game frame. Setting a + * sort property will override the `particleBringToTop` setting. + * + * If you wish to use your own sorting function, see `setSortCallback` instead. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setSortProperty + * @since 3.60.0 + * + * @param {string} [property] - The property on the `Particle` class to sort by. + * @param {boolean} [ascending=true] - Should the particles be sorted in ascending or descending order? * * @return {this} This Particle Emitter. */ - remove: function () + setSortProperty: function (property, ascending) + { + if (property === undefined) { property = ''; } + if (ascending === undefined) { ascending = this.true; } + + this.sortProperty = property; + this.sortOrderAsc = ascending; + this.sortCallback = this.depthSortCallback; + + return this; + }, + + /** + * Sets a callback to be used to sort the particles before rendering each frame. + * + * This allows you to define your own logic and behavior in the callback. + * + * The callback will be sent two parameters: the two Particles being compared, + * and must adhere to the criteria of the `compareFn` in `Array.sort`: + * + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description + * + * Call this method with no parameters to reset the sort callback. + * + * Setting your own callback will override both the `particleBringToTop` and + * `sortProperty` settings of this Emitter. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setSortCallback + * @since 3.60.0 + * + * @param {Phaser.Types.GameObjects.Particles.ParticleSortCallback} [callback] - The callback to invoke when the particles are sorted. Leave undefined to reset to the default. + * + * @return {this} This Particle Emitter. + */ + setSortCallback: function (callback) { - this.manager.removeEmitter(this); + if (this.sortProperty !== '') + { + callback = this.depthSortCallback; + } + else + { + callback = null; + } + + this.sortCallback = callback; return this; }, @@ -60100,31 +61633,64 @@ var ParticleEmitter = new Class({ */ depthSort: function () { - StableSort(this.alive, this.depthSortCallback); + StableSort(this.alive, this.sortCallback.bind(this)); return this; }, + /** + * Calculates the difference of two particles, for sorting them by depth. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#depthSortCallback + * @since 3.0.0 + * + * @param {object} a - The first particle. + * @param {object} b - The second particle. + * + * @return {number} The difference of a and b's y coordinates. + */ + depthSortCallback: function (a, b) + { + var key = this.sortProperty; + + if (this.sortOrderAsc) + { + return a[key] - b[key]; + } + else + { + return b[key] - a[key]; + } + }, + /** * Puts the emitter in flow mode (frequency >= 0) and starts (or restarts) a particle flow. * * To resume a flow at the current frequency and quantity, use {@link Phaser.GameObjects.Particles.ParticleEmitter#start} instead. * * @method Phaser.GameObjects.Particles.ParticleEmitter#flow + * @fires Phaser.GameObjects.Particles.Events#START * @since 3.0.0 * * @param {number} frequency - The time interval (>= 0) of each flow cycle, in ms. * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} [count=1] - The number of particles to emit at each flow cycle. + * @param {number} [stopAfter] - Stop this emitter from firing any more particles once this value is reached. Set to zero for unlimited. Setting this parameter will override any `stopAfter` value already set in the Emitter configuration object. * * @return {this} This Particle Emitter. */ - flow: function (frequency, count) + flow: function (frequency, count, stopAfter) { if (count === undefined) { count = 1; } + this.emitting = false; + this.frequency = frequency; + this.quantity = count; - this.quantity.onChange(count); + if (stopAfter !== undefined) + { + this.stopAfter = stopAfter; + } return this.start(); }, @@ -60133,6 +61699,7 @@ var ParticleEmitter = new Class({ * Puts the emitter in explode mode (frequency = -1), stopping any current particle flow, and emits several particles all at once. * * @method Phaser.GameObjects.Particles.ParticleEmitter#explode + * @fires Phaser.GameObjects.Particles.Events#EXPLODE * @since 3.0.0 * * @param {number} [count=this.quantity] - The number of Particles to emit. @@ -60145,11 +61712,18 @@ var ParticleEmitter = new Class({ { this.frequency = -1; - return this.emitParticle(count, x, y); + this.resetCounters(-1, true); + + var particle = this.emitParticle(count, x, y); + + this.emit(Events.EXPLODE, this, particle); + + return particle; }, /** - * Emits particles at a given position (or the emitter's current position). + * Emits particles at the given position. If no position is given, it will + * emit from this Emitters current location. * * @method Phaser.GameObjects.Particles.ParticleEmitter#emitParticleAt * @since 3.0.0 @@ -60166,7 +61740,7 @@ var ParticleEmitter = new Class({ }, /** - * Emits particles at a given position (or the emitter's current position). + * Emits particles at a given position (or the emitters current position). * * @method Phaser.GameObjects.Particles.ParticleEmitter#emitParticle * @since 3.0.0 @@ -60188,10 +61762,11 @@ var ParticleEmitter = new Class({ if (count === undefined) { - count = this.quantity.onEmit(); + count = this.ops.quantity.onEmit(); } var dead = this.dead; + var stopAfter = this.stopAfter; var followX = (this.follow) ? this.follow.x + this.followOffset.x : x; var followY = (this.follow) ? this.follow.y + this.followOffset.y : y; @@ -60205,20 +61780,35 @@ var ParticleEmitter = new Class({ particle = new this.particleClass(this); } - particle.fire(followX, followY); - - if (this.particleBringToTop) + if (particle.fire(followX, followY)) { - this.alive.push(particle); + if (this.particleBringToTop) + { + this.alive.push(particle); + } + else + { + this.alive.unshift(particle); + } + + if (this.emitCallback) + { + this.emitCallback.call(this.emitCallbackScope, particle, this); + } } else { - this.alive.unshift(particle); + this.dead.push(particle); } - if (this.emitCallback) + if (stopAfter > 0) { - this.emitCallback.call(this.emitCallbackScope, particle, this); + this.stopCounter++; + + if (this.stopCounter >= stopAfter) + { + break; + } } if (this.atLimit()) @@ -60230,10 +61820,52 @@ var ParticleEmitter = new Class({ return particle; }, + /** + * Fast forwards this Particle Emitter and all of its particles. + * + * Works by running the Emitter `preUpdate` handler in a loop until the `time` + * has been reached at `delta` steps per loop. + * + * All callbacks and emitter related events that would normally be fired + * will still be invoked. + * + * You can make an emitter 'fast forward' via the emitter config using the + * `advance` property. Set this value to the number of ms you wish the + * emitter to be fast-forwarded by. Or, call this method post-creation. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#fastForward + * @since 3.60.0 + * + * @param {number} time - The number of ms to advance the Particle Emitter by. + * @param {number} [delta] - The amount of delta to use for each step. Defaults to 1000 / 60. + * + * @return {this} This Particle Emitter. + */ + fastForward: function (time, delta) + { + if (delta === undefined) { delta = 1000 / 60; } + + var total = 0; + + this.skipping = true; + + while (total < Math.abs(time)) + { + this.preUpdate(0, delta); + + total += delta; + } + + this.skipping = false; + + return this; + }, + /** * Updates this emitter and its particles. * * @method Phaser.GameObjects.Particles.ParticleEmitter#preUpdate + * @fires Phaser.GameObjects.Particles.Events#COMPLETE * @since 3.0.0 * * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. @@ -60251,8 +61883,13 @@ var ParticleEmitter = new Class({ this.visible = this.follow.visible; } + if (this.deathZones.length > 0) + { + this.worldMatrix = this.getWorldTransformMatrix(); + } + // Any particle processors? - var processors = this.manager.getProcessors(); + var processors = this.getProcessors(); var particles = this.alive; var dead = this.dead; @@ -60296,12 +61933,19 @@ var ParticleEmitter = new Class({ deathCallback.call(deathCallbackScope, entry.particle); } - entry.particle.resetPosition(); + entry.particle.setPosition(); } } - if (!this.on) + if (!this.emitting && !this.skipping) { + if (this.completeFlag === 1 && particles.length === 0) + { + this.completeFlag = 0; + + this.emit(Events.COMPLETE, this); + } + return; } @@ -60311,558 +61955,1090 @@ var ParticleEmitter = new Class({ } else if (this.frequency > 0) { - this._counter -= delta; + this.flowCounter -= delta; - while (this._counter <= 0) + while (this.flowCounter <= 0) { + // Emits the 'quantity' number of particles this.emitParticle(); - // counter = frequency - remained from previous delta - this._counter += this.frequency; + // counter = frequency - remainder from previous delta + this.flowCounter += this.frequency; + } + } + + // Duration or stopAfter set? + if (!this.skipping) + { + if (this.duration > 0) + { + // elapsed + this.elapsed += delta; + + if (this.elapsed >= this.duration) + { + this.stop(); + } + } + + if (this.stopAfter > 0 && this.stopCounter >= this.stopAfter) + { + this.stop(); } } }, /** - * Calculates the difference of two particles, for sorting them by depth. + * Takes either a Rectangle Geometry object or an Arcade Physics Body and tests + * to see if it intersects with any currently alive Particle in this Emitter. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#depthSortCallback - * @since 3.0.0 + * Overlapping particles are returned in an array, where you can perform further + * processing on them. If nothing overlaps then the array will be empty. * - * @param {object} a - The first particle. - * @param {object} b - The second particle. + * @method Phaser.GameObjects.Particles.ParticleEmitter#overlap + * @since 3.60.0 * - * @return {number} The difference of a and b's y coordinates. + * @param {(Phaser.Geom.Rectangle|Phaser.Physics.Arcade.Body)} target - A Rectangle or Arcade Physics Body to check for intersection against all alive particles. + * + * @return {Phaser.GameObjects.Particles.Particle[]} An array of Particles that overlap with the given target. */ - depthSortCallback: function (a, b) + overlap: function (target) { - return a.y - b.y; - } + var matrix = this.getWorldTransformMatrix(); -}); + var alive = this.alive; + var length = alive.length; -module.exports = ParticleEmitter; + var output = []; + for (var i = 0; i < length; i++) + { + var particle = alive[i]; -/***/ }), + if (RectangleToRectangle(target, particle.getBounds(matrix))) + { + output.push(particle); + } + } -/***/ 84622: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + return output; + }, -/** - * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ + /** + * Returns a bounds Rectangle calculated from the bounds of all currently + * _active_ Particles in this Emitter. If this Emitter has only just been + * created and not yet rendered, then calling this method will return a Rectangle + * with a max safe integer for dimensions. Use the `advance` parameter to + * avoid this. + * + * Typically it takes a few seconds for a flow Emitter to 'warm up'. You can + * use the `advance` and `delta` parameters to force the Emitter to + * 'fast forward' in time to try and allow the bounds to be more accurate, + * as it will calculate the bounds based on the particle bounds across all + * timesteps, giving a better result. + * + * You can also use the `padding` parameter to increase the size of the + * bounds. Emitters with a lot of randomness in terms of direction or lifespan + * can often return a bounds smaller than their possible maximum. By using + * the `padding` (and `advance` if needed) you can help limit this. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#getBounds + * @since 3.60.0 + * + * @param {number} [padding] - The amount of padding, in pixels, to add to the bounds Rectangle. + * @param {number} [advance] - The number of ms to advance the Particle Emitter by. Defaults to 0, i.e. not used. + * @param {number} [delta] - The amount of delta to use for each step. Defaults to 1000 / 60. + * @param {Phaser.Geom.Rectangle} [output] - The Rectangle to store the results in. If not given a new one will be created. + * + * @return {Phaser.Geom.Rectangle} A Rectangle containing the calculated bounds of this Emitter. + */ + getBounds: function (padding, advance, delta, output) + { + if (padding === undefined) { padding = 0; } + if (advance === undefined) { advance = 0; } + if (delta === undefined) { delta = 1000 / 60; } + if (output === undefined) { output = new Rectangle(); } -var Class = __webpack_require__(56694); -var Components = __webpack_require__(64937); -var GameObject = __webpack_require__(89980); -var GravityWell = __webpack_require__(87811); -var List = __webpack_require__(71207); -var ParticleEmitter = __webpack_require__(9216); -var Render = __webpack_require__(72745); + var matrix = this.getWorldTransformMatrix(); -/** - * @classdesc - * A Particle Emitter Manager creates and controls {@link Phaser.GameObjects.Particles.ParticleEmitter Particle Emitters} and {@link Phaser.GameObjects.Particles.GravityWell Gravity Wells}. - * - * @class ParticleEmitterManager - * @extends Phaser.GameObjects.GameObject - * @memberof Phaser.GameObjects.Particles - * @constructor - * @since 3.0.0 - * - * @extends Phaser.GameObjects.Components.Depth - * @extends Phaser.GameObjects.Components.Mask - * @extends Phaser.GameObjects.Components.Pipeline - * @extends Phaser.GameObjects.Components.Transform - * @extends Phaser.GameObjects.Components.Visible - * - * @param {Phaser.Scene} scene - The Scene to which this Emitter Manager belongs. - * @param {string} texture - The key of the Texture this Emitter Manager will use to render particles, as stored in the Texture Manager. - * @param {(string|number)} [frame] - An optional frame from the Texture this Emitter Manager will use to render particles. - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterConfig[]} [emitters] - Configuration settings for one or more emitters to create. - */ -var ParticleEmitterManager = new Class({ + var i; + var bounds; + var alive = this.alive; + var setFirst = false; - Extends: GameObject, + output.setTo(0, 0, 0, 0); - Mixins: [ - Components.Depth, - Components.Mask, - Components.Pipeline, - Components.Transform, - Components.Visible, - Render - ], + if (advance > 0) + { + var total = 0; - initialize: + this.skipping = true; - // frame is optional and can contain the emitters array or object if skipped - function ParticleEmitterManager (scene, texture, frame, emitters) - { - GameObject.call(this, scene, 'ParticleEmitterManager'); + while (total < Math.abs(advance)) + { + this.preUpdate(0, delta); - /** - * The blend mode applied to all emitters and particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitterManager#blendMode - * @type {number} - * @default -1 - * @private - * @since 3.0.0 - */ - this.blendMode = -1; + for (i = 0; i < alive.length; i++) + { + bounds = alive[i].getBounds(matrix); - /** - * The time scale applied to all emitters and particles, affecting flow rate, lifespan, and movement. - * Values larger than 1 are faster than normal. - * This is multiplied with any timeScale set on each individual emitter. - * - * @name Phaser.GameObjects.Particles.ParticleEmitterManager#timeScale - * @type {number} - * @default 1 - * @since 3.0.0 - */ - this.timeScale = 1; + if (!setFirst) + { + setFirst = true; - /** - * The texture used to render this Emitter Manager's particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitterManager#texture - * @type {Phaser.Textures.Texture} - * @default null - * @since 3.0.0 - */ - this.texture = null; + CopyFrom(bounds, output); + } + else + { + MergeRect(output, bounds); + } + } - /** - * The texture frame used to render this Emitter Manager's particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitterManager#frame - * @type {Phaser.Textures.Frame} - * @default null - * @since 3.0.0 - */ - this.frame = null; + total += delta; + } - /** - * Names of this Emitter Manager's texture frames. - * - * @name Phaser.GameObjects.Particles.ParticleEmitterManager#frameNames - * @type {string[]} - * @since 3.0.0 - */ - this.frameNames = []; + this.skipping = false; + } + else + { + for (i = 0; i < alive.length; i++) + { + bounds = alive[i].getBounds(matrix); + + if (!setFirst) + { + setFirst = true; + + CopyFrom(bounds, output); + } + else + { + MergeRect(output, bounds); + } + } + } - // frame is optional and can contain the emitters array or object if skipped - if (frame !== null && (typeof frame === 'object' || Array.isArray(frame))) + if (padding > 0) { - emitters = frame; - frame = null; + Inflate(output, padding, padding); } - this.setTexture(texture, frame); + return output; + }, - this.initPipeline(); + /** + * The x coordinate the particles are emitted from. + * + * This is relative to the Emitters x coordinate and that of any parent. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleX + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + particleX: { - /** - * A list of Emitters being managed by this Emitter Manager. - * - * @name Phaser.GameObjects.Particles.ParticleEmitterManager#emitters - * @type {Phaser.Structs.List.} - * @since 3.0.0 - */ - this.emitters = new List(this); + get: function () + { + return this.ops.x.current; + }, - /** - * A list of Gravity Wells being managed by this Emitter Manager. - * - * @name Phaser.GameObjects.Particles.ParticleEmitterManager#wells - * @type {Phaser.Structs.List.} - * @since 3.0.0 - */ - this.wells = new List(this); + set: function (value) + { + this.ops.x.onChange(value); + } + + }, + + /** + * The y coordinate the particles are emitted from. + * + * This is relative to the Emitters x coordinate and that of any parent. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleY + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + particleY: { - if (emitters) + get: function () { - // An array of emitter configs? - if (!Array.isArray(emitters)) - { - emitters = [ emitters ]; - } + return this.ops.y.current; + }, - for (var i = 0; i < emitters.length; i++) - { - this.createEmitter(emitters[i]); - } + set: function (value) + { + this.ops.y.onChange(value); } - }, - // Overrides Game Object method - addedToScene: function () - { - this.scene.sys.updateList.add(this); }, - // Overrides Game Object method - removedFromScene: function () - { - this.scene.sys.updateList.remove(this); + /** + * The horizontal acceleration applied to emitted particles, in pixels per second squared. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#accelerationX + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + accelerationX: { + + get: function () + { + return this.ops.accelerationX.current; + }, + + set: function (value) + { + this.ops.accelerationX.onChange(value); + } + }, /** - * Sets the texture and frame this Emitter Manager will use to render with. + * The vertical acceleration applied to emitted particles, in pixels per second squared. * - * Textures are referenced by their string-based keys, as stored in the Texture Manager. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setTexture - * @since 3.0.0 + * @name Phaser.GameObjects.Particles.ParticleEmitter#accelerationY + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + accelerationY: { + + get: function () + { + return this.ops.accelerationY.current; + }, + + set: function (value) + { + this.ops.accelerationY.onChange(value); + } + + }, + + /** + * The maximum horizontal velocity emitted particles can reach, in pixels per second squared. * - * @param {string} key - The key of the texture to be used, as stored in the Texture Manager. - * @param {(string|number)} [frame] - The name or index of the frame within the Texture. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @return {this} This Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityX + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + * @default 10000 */ - setTexture: function (key, frame) - { - this.texture = this.scene.sys.textures.get(key); + maxVelocityX: { + + get: function () + { + return this.ops.maxVelocityX.current; + }, + + set: function (value) + { + this.ops.maxVelocityX.onChange(value); + } - return this.setFrame(frame); }, /** - * Sets the frame this Emitter Manager will use to render with. + * The maximum vertical velocity emitted particles can reach, in pixels per second squared. * - * The Frame has to belong to the current Texture being used. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * It can be either a string or an index. + * @name Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityY + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + * @default 10000 + */ + maxVelocityY: { + + get: function () + { + return this.ops.maxVelocityY.current; + }, + + set: function (value) + { + this.ops.maxVelocityY.onChange(value); + } + + }, + + /** + * The initial speed of emitted particles, in pixels per second. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setFrame - * @since 3.0.0 + * If using this as a getter it will return the `speedX` value. * - * @param {(string|number)} [frame] - The name or index of the frame within the Texture. + * If using it as a setter it will update both `speedX` and `speedY` to the + * given value. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @return {this} This Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#speed + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 */ - setFrame: function (frame) - { - this.frame = this.texture.get(frame); - - var frames = this.texture.getFramesFromTextureSource(this.frame.sourceIndex); + speed: { - var names = []; + get: function () + { + return this.ops.speedX.current; + }, - frames.forEach(function (sourceFrame) + set: function (value) { - names.push(sourceFrame.name); - }); + this.ops.speedX.onChange(value); + this.ops.speedY.onChange(value); + } - this.frameNames = names; + }, - this.defaultFrame = this.frame; + /** + * The initial horizontal speed of emitted particles, in pixels per second. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#speedX + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + speedX: { + + get: function () + { + return this.ops.speedX.current; + }, + + set: function (value) + { + this.ops.speedX.onChange(value); + } - return this; }, /** - * Assigns texture frames to an emitter. + * The initial vertical speed of emitted particles, in pixels per second. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setEmitterFrames - * @since 3.0.0 + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#speedY + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + speedY: { + + get: function () + { + return this.ops.speedY.current; + }, + + set: function (value) + { + this.ops.speedY.onChange(value); + } + + }, + + /** + * The x coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true. * - * @param {(Phaser.Textures.Frame|Phaser.Textures.Frame[])} frames - The texture frames. - * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The particle emitter to modify. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @return {this} This Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#moveToX + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 */ - setEmitterFrames: function (frames, emitter) - { - if (!Array.isArray(frames)) + moveToX: { + + get: function () + { + return this.ops.moveToX.current; + }, + + set: function (value) { - frames = [ frames ]; + this.ops.moveToX.onChange(value); } - var out = emitter.frames; + }, - out.length = 0; + /** + * The y coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#moveToY + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + moveToY: { - for (var i = 0; i < frames.length; i++) + get: function () { - var frame = frames[i]; + return this.ops.moveToY.current; + }, - if (this.frameNames.indexOf(frame) !== -1) - { - out.push(this.texture.get(frame)); - } - else - { - console.warn('Texture "%s" has no frame "%s"', this.texture.key, frame); - } + set: function (value) + { + this.ops.moveToY.onChange(value); } - if (out.length > 0) + }, + + /** + * The amount of velocity particles will use when rebounding off the + * emitter bounds, if set. A value of 0 means no bounce. A value of 1 + * means a full rebound. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#bounce + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + bounce: { + + get: function () + { + return this.ops.bounce.current; + }, + + set: function (value) { - emitter.defaultFrame = out[0]; + this.ops.bounce.onChange(value); } - else + + }, + + /** + * The horizontal scale of emitted particles. + * + * This is relative to the Emitters scale and that of any parent. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleScaleX + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + particleScaleX: { + + get: function () { - console.warn('No texture frames were set'); + return this.ops.scaleX.current; + }, - emitter.defaultFrame = this.defaultFrame; + set: function (value) + { + this.ops.scaleX.onChange(value); } - return this; }, /** - * Adds an existing Particle Emitter to this Emitter Manager. + * The vertical scale of emitted particles. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#addEmitter - * @since 3.0.0 + * This is relative to the Emitters scale and that of any parent. * - * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Particle Emitter to add to this Emitter Manager. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} The Particle Emitter that was added to this Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleScaleY + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 */ - addEmitter: function (emitter) - { - return this.emitters.add(emitter); + particleScaleY: { + + get: function () + { + return this.ops.scaleY.current; + }, + + set: function (value) + { + this.ops.scaleY.onChange(value); + } + }, /** - * Creates a new Particle Emitter object, adds it to this Emitter Manager and returns a reference to it. + * A color tint value that is applied to the texture of the emitted + * particle. The value should be given in hex format, i.e. 0xff0000 + * for a red tint, and should not include the alpha channel. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#createEmitter - * @since 3.0.0 + * Tints are additive, meaning a tint value of white (0xffffff) will + * effectively reset the tint to nothing. + * + * Modify the `ParticleEmitter.tintFill` property to change between + * an additive and replacement tint mode. * - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Configuration settings for the Particle Emitter to create. + * When you define the color via the Emitter config you should give + * it as an array of color values. The Particle will then interpolate + * through these colors over the course of its lifespan. Setting this + * will override any `tint` value that may also be given. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} The Particle Emitter that was created. + * This is a WebGL only feature. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleColor + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 */ - createEmitter: function (config) - { - return this.addEmitter(new ParticleEmitter(this, config)); + particleColor: { + + get: function () + { + return this.ops.color.current; + }, + + set: function (value) + { + this.ops.color.onChange(value); + } + }, /** - * Removes a Particle Emitter from this Emitter Manager, if the Emitter belongs to this Manager. + * Controls the easing function used when you have created an + * Emitter that uses the `color` property to interpolate the + * tint of Particles over their lifetime. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#removeEmitter - * @since 3.22.0 + * Setting this has no effect if you haven't also applied a + * `particleColor` to this Emitter. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#colorEase + * @type {string} + * @since 3.60.0 + */ + colorEase: { + + get: function () + { + return this.ops.color.easeName; + }, + + set: function (value) + { + this.ops.color.setEase(value); + } + + }, + + /** + * A color tint value that is applied to the texture of the emitted + * particle. The value should be given in hex format, i.e. 0xff0000 + * for a red tint, and should not include the alpha channel. + * + * Tints are additive, meaning a tint value of white (0xffffff) will + * effectively reset the tint to nothing. + * + * Modify the `ParticleEmitter.tintFill` property to change between + * an additive and replacement tint mode. * - * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter + * The `tint` value will be overriden if a `color` array is provided. * - * @return {?Phaser.GameObjects.Particles.ParticleEmitter} The Particle Emitter if it was removed or null if it was not. + * This is a WebGL only feature. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleTint + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 */ - removeEmitter: function (emitter) - { - return this.emitters.remove(emitter, true); + particleTint: { + + get: function () + { + return this.ops.tint.current; + }, + + set: function (value) + { + this.ops.tint.onChange(value); + } + }, /** - * Adds an existing Gravity Well object to this Emitter Manager. + * The alpha value of the emitted particles. This is a value + * between 0 and 1. Particles with alpha zero are invisible + * and are therefore not rendered, but are still processed + * by the Emitter. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#addGravityWell - * @since 3.0.0 + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleAlpha + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + particleAlpha: { + + get: function () + { + return this.ops.alpha.current; + }, + + set: function (value) + { + this.ops.alpha.onChange(value); + } + + }, + + /** + * The lifespan of the emitted particles. This value is given + * in milliseconds and defaults to 1000ms (1 second). When a + * particle reaches this amount it is killed. * - * @param {Phaser.GameObjects.Particles.GravityWell} well - The Gravity Well to add to this Emitter Manager. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @return {Phaser.GameObjects.Particles.GravityWell} The Gravity Well that was added to this Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#lifespan + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 */ - addGravityWell: function (well) - { - return this.wells.add(well); + lifespan: { + + get: function () + { + return this.ops.lifespan.current; + }, + + set: function (value) + { + this.ops.lifespan.onChange(value); + } + }, /** - * Creates a new Gravity Well, adds it to this Emitter Manager and returns a reference to it. + * The angle at which the particles are emitted. The values are + * given in degrees. This allows you to control the direction + * of the emitter. If you wish instead to change the rotation + * of the particles themselves, see the `particleRotate` property. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#createGravityWell - * @since 3.0.0 + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @param {Phaser.Types.GameObjects.Particles.GravityWellConfig} config - Configuration settings for the Gravity Well to create. + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleAngle + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + particleAngle: { + + get: function () + { + return this.ops.angle.current; + }, + + set: function (value) + { + this.ops.angle.onChange(value); + } + + }, + + /** + * The rotation (or angle) of each particle when it is emitted. + * The value is given in degrees and uses a right-handed + * coordinate system, where 0 degrees points to the right, 90 degrees + * points down and -90 degrees points up. * - * @return {Phaser.GameObjects.Particles.GravityWell} The Gravity Well that was created. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleRotate + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 */ - createGravityWell: function (config) - { - return this.addGravityWell(new GravityWell(config)); + particleRotate: { + + get: function () + { + return this.ops.rotate.current; + }, + + set: function (value) + { + this.ops.rotate.onChange(value); + } + }, /** - * Emits particles from each active emitter. + * The number of particles that are emitted each time an emission + * occurs, i.e. from one 'explosion' or each frame in a 'flow' cycle. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#emitParticle - * @since 3.0.0 + * The default is 1. * - * @param {number} [count] - The number of particles to release from each emitter. The default is the emitter's own {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}. - * @param {number} [x] - The x-coordinate to to emit particles from. The default is the x-coordinate of the emitter's current location. - * @param {number} [y] - The y-coordinate to to emit particles from. The default is the y-coordinate of the emitter's current location. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @return {this} This Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#quantity + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrequency + * @see Phaser.GameObjects.Particles.ParticleEmitter#setQuantity + * @since 3.60.0 */ - emitParticle: function (count, x, y) - { - var emitters = this.emitters.list; + quantity: { - for (var i = 0; i < emitters.length; i++) + get: function () { - var emitter = emitters[i]; + return this.ops.quantity.current; + }, - if (emitter.active) - { - emitter.emitParticle(count, x, y); - } + set: function (value) + { + this.ops.quantity.onChange(value); } - return this; }, /** - * Emits particles from each active emitter. + * The number of milliseconds to wait after emission before + * the particles start updating. This allows you to emit particles + * that appear 'static' or still on-screen and then, after this value, + * begin to move. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#emitParticleAt - * @since 3.0.0 + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @param {number} [x] - The x-coordinate to to emit particles from. The default is the x-coordinate of the emitter's current location. - * @param {number} [y] - The y-coordinate to to emit particles from. The default is the y-coordinate of the emitter's current location. - * @param {number} [count] - The number of particles to release from each emitter. The default is the emitter's own {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}. + * @name Phaser.GameObjects.Particles.ParticleEmitter#delay + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + delay: { + + get: function () + { + return this.ops.delay.current; + }, + + set: function (value) + { + this.ops.delay.onChange(value); + } + + }, + + /** + * The internal flow counter. + * + * Treat this property as read-only. * - * @return {this} This Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#flowCounter + * @type {number} + * @since 3.60.0 */ - emitParticleAt: function (x, y, count) - { - return this.emitParticle(count, x, y); + flowCounter: { + + get: function () + { + return this.counters[0]; + }, + + set: function (value) + { + this.counters[0] = value; + } + + }, + + /** + * The internal frame counter. + * + * Treat this property as read-only. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#frameCounter + * @type {number} + * @since 3.60.0 + */ + frameCounter: { + + get: function () + { + return this.counters[1]; + }, + + set: function (value) + { + this.counters[1] = value; + } + }, /** - * Pauses this Emitter Manager. + * The internal animation counter. * - * This has the effect of pausing all emitters, and all particles of those emitters, currently under its control. + * Treat this property as read-only. * - * The particles will still render, but they will not have any of their logic updated. + * @name Phaser.GameObjects.Particles.ParticleEmitter#animCounter + * @type {number} + * @since 3.60.0 + */ + animCounter: { + + get: function () + { + return this.counters[2]; + }, + + set: function (value) + { + this.counters[2] = value; + } + + }, + + /** + * The internal elasped counter. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#pause - * @since 3.0.0 + * Treat this property as read-only. * - * @return {this} This Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#elapsed + * @type {number} + * @since 3.60.0 */ - pause: function () - { - this.active = false; + elapsed: { + + get: function () + { + return this.counters[3]; + }, + + set: function (value) + { + this.counters[3] = value; + } - return this; }, /** - * Resumes this Emitter Manager, should it have been previously paused. + * The internal stop counter. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#resume - * @since 3.0.0 + * Treat this property as read-only. * - * @return {this} This Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#stopCounter + * @type {number} + * @since 3.60.0 */ - resume: function () - { - this.active = true; + stopCounter: { + + get: function () + { + return this.counters[4]; + }, + + set: function (value) + { + this.counters[4] = value; + } - return this; }, /** - * Gets all active particle processors (gravity wells). + * The internal complete flag. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#getProcessors - * @since 3.0.0 + * Treat this property as read-only. * - * @return {Phaser.GameObjects.Particles.GravityWell[]} - The active gravity wells. + * @name Phaser.GameObjects.Particles.ParticleEmitter#completeFlag + * @type {boolean} + * @since 3.60.0 */ - getProcessors: function () - { - return this.wells.getAll('active', true); + completeFlag: { + + get: function () + { + return this.counters[5]; + }, + + set: function (value) + { + this.counters[5] = value; + } + }, /** - * Updates all active emitters. + * The internal zone index. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#preUpdate - * @since 3.0.0 + * Treat this property as read-only. * - * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. - * @param {number} delta - The delta time, in ms, elapsed since the last frame. + * @name Phaser.GameObjects.Particles.ParticleEmitter#zoneIndex + * @type {number} + * @since 3.60.0 */ - preUpdate: function (time, delta) - { - // Scale the delta - delta *= this.timeScale; + zoneIndex: { - var emitters = this.emitters.list; + get: function () + { + return this.counters[6]; + }, - for (var i = 0; i < emitters.length; i++) + set: function (value) { - var emitter = emitters[i]; + this.counters[6] = value; + } - if (emitter.active) - { - emitter.preUpdate(time, delta); - } + }, + + /** + * The internal zone total. + * + * Treat this property as read-only. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#zoneTotal + * @type {number} + * @since 3.60.0 + */ + zoneTotal: { + + get: function () + { + return this.counters[7]; + }, + + set: function (value) + { + this.counters[7] = value; } + }, /** - * A NOOP method so you can pass an EmitterManager to a Container. - * Calling this method will do nothing. It is intentionally empty. + * The current frame index. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setAlpha - * @private - * @since 3.10.0 + * Treat this property as read-only. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#currentFrame + * @type {number} + * @since 3.60.0 */ - setAlpha: function () - { + currentFrame: { + + get: function () + { + return this.counters[8]; + }, + + set: function (value) + { + this.counters[8] = value; + } + }, /** - * A NOOP method so you can pass an EmitterManager to a Container. - * Calling this method will do nothing. It is intentionally empty. + * The current animation index. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setScrollFactor - * @private - * @since 3.10.0 + * Treat this property as read-only. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#currentAnim + * @type {number} + * @since 3.60.0 */ - setScrollFactor: function () - { + currentAnim: { + + get: function () + { + return this.counters[9]; + }, + + set: function (value) + { + this.counters[9] = value; + } + }, /** - * A NOOP method so you can pass an EmitterManager to a Container. - * Calling this method will do nothing. It is intentionally empty. + * Destroys this Particle Emitter and all Particles it owns. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setBlendMode - * @private - * @since 3.15.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#preDestroy + * @since 3.60.0 */ - setBlendMode: function () + preDestroy: function () { + this.texture = null; + this.frames = null; + this.anims = null; + this.emitCallback = null; + this.emitCallbackScope = null; + this.deathCallback = null; + this.deathCallbackScope = null; + this.emitZones = null; + this.deathZones = null; + this.bounds = null; + this.follow = null; + this.counters = null; + + var i; + + var ops = this.ops; + + for (i = 0; i < configOpMap.length; i++) + { + var key = configOpMap[i]; + + ops[key].destroy(); + } + + for (i = 0; i < this.alive.length; i++) + { + this.alive[i].destroy(); + } + + for (i = 0; i < this.dead.length; i++) + { + this.dead[i].destroy(); + } + + this.ops = null; + this.alive = []; + this.dead = []; + this.worldMatrix.destroy(); } }); -module.exports = ParticleEmitterManager; +module.exports = ParticleEmitter; /***/ }), -/***/ 66545: +/***/ 10456: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var RectangleToRectangle = __webpack_require__(90205); var TransformMatrix = __webpack_require__(69360); var tempMatrix1 = new TransformMatrix(); @@ -60875,26 +63051,18 @@ var tempMatrix4 = new TransformMatrix(); * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera. * This method should not be called directly. It is a utility function of the Render module. * - * @method Phaser.GameObjects.Particles.EmitterManager#renderCanvas - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.Emitter#renderCanvas + * @since 3.60.0 * @private * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. - * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - The Game Object being rendered in this call. + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Game Object being rendered in this call. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var ParticleManagerCanvasRenderer = function (renderer, emitterManager, camera, parentMatrix) +var ParticleEmitterCanvasRenderer = function (renderer, emitter, camera, parentMatrix) { - var emitters = emitterManager.emitters.list; - var emittersLength = emitters.length; - - if (emittersLength === 0) - { - return; - } - - var camMatrix = tempMatrix1.copyFrom(camera.matrix); + var camMatrix = tempMatrix1; var calcMatrix = tempMatrix2; var particleMatrix = tempMatrix3; var managerMatrix = tempMatrix4; @@ -60903,199 +63071,214 @@ var ParticleManagerCanvasRenderer = function (renderer, emitterManager, camera, { managerMatrix.loadIdentity(); managerMatrix.multiply(parentMatrix); - managerMatrix.translate(emitterManager.x, emitterManager.y); - managerMatrix.rotate(emitterManager.rotation); - managerMatrix.scale(emitterManager.scaleX, emitterManager.scaleY); + managerMatrix.translate(emitter.x, emitter.y); + managerMatrix.rotate(emitter.rotation); + managerMatrix.scale(emitter.scaleX, emitter.scaleY); } else { - managerMatrix.applyITRS(emitterManager.x, emitterManager.y, emitterManager.rotation, emitterManager.scaleX, emitterManager.scaleY); + managerMatrix.applyITRS(emitter.x, emitter.y, emitter.rotation, emitter.scaleX, emitter.scaleY); } var ctx = renderer.currentContext; var roundPixels = camera.roundPixels; + var camerAlpha = camera.alpha; + var emitterAlpha = emitter.alpha; + + var particles = emitter.alive; + var particleCount = particles.length; + var viewBounds = emitter.viewBounds; - for (var e = 0; e < emittersLength; e++) + if (!emitter.visible || particleCount === 0 || (viewBounds && !RectangleToRectangle(viewBounds, camera.worldView))) { - var emitter = emitters[e]; - var particles = emitter.alive; - var particleCount = particles.length; + return; + } - if (!emitter.visible || particleCount === 0) - { - continue; - } + if (emitter.sortCallback) + { + emitter.depthSort(); + } - camera.addToRenderList(emitter); + camera.addToRenderList(emitter); - var scrollFactorX = emitter.scrollFactorX; - var scrollFactorY = emitter.scrollFactorY; + var scrollFactorX = emitter.scrollFactorX; + var scrollFactorY = emitter.scrollFactorY; - ctx.save(); + ctx.save(); - ctx.globalCompositeOperation = renderer.blendModes[emitter.blendMode]; + ctx.globalCompositeOperation = renderer.blendModes[emitter.blendMode]; - for (var i = 0; i < particleCount; i++) - { - var particle = particles[i]; + for (var i = 0; i < particleCount; i++) + { + var particle = particles[i]; - var alpha = particle.alpha * camera.alpha; + var alpha = particle.alpha * emitterAlpha * camerAlpha; - if (alpha <= 0) - { - continue; - } + if (alpha <= 0 || particle.scaleX === 0 || particle.scaleY === 0) + { + continue; + } - particleMatrix.applyITRS(particle.x, particle.y, particle.rotation, particle.scaleX, particle.scaleY); + particleMatrix.applyITRS(particle.x, particle.y, particle.rotation, particle.scaleX, particle.scaleY); - camMatrix.copyFrom(camera.matrix); + camMatrix.copyFrom(camera.matrix); - camMatrix.multiplyWithOffset(managerMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY); + camMatrix.multiplyWithOffset(managerMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY); - // Undo the camera scroll - particleMatrix.e = particle.x; - particleMatrix.f = particle.y; + // Undo the camera scroll + particleMatrix.e = particle.x; + particleMatrix.f = particle.y; - // Multiply by the particle matrix, store result in calcMatrix - camMatrix.multiply(particleMatrix, calcMatrix); + // Multiply by the particle matrix, store result in calcMatrix + camMatrix.multiply(particleMatrix, calcMatrix); - var frame = particle.frame; - var cd = frame.canvasData; + var frame = particle.frame; + var cd = frame.canvasData; - if (cd.width > 0 && cd.height > 0) - { - var x = -(frame.halfWidth); - var y = -(frame.halfHeight); + if (cd.width > 0 && cd.height > 0) + { + var x = -(frame.halfWidth); + var y = -(frame.halfHeight); - ctx.globalAlpha = alpha; + ctx.globalAlpha = alpha; - ctx.save(); + ctx.save(); - calcMatrix.setToContext(ctx); + calcMatrix.setToContext(ctx); - if (roundPixels) - { - x = Math.round(x); - y = Math.round(y); - } + if (roundPixels) + { + x = Math.round(x); + y = Math.round(y); + } - ctx.imageSmoothingEnabled = !frame.source.scaleMode; + ctx.imageSmoothingEnabled = !frame.source.scaleMode; - ctx.drawImage(frame.source.image, cd.x, cd.y, cd.width, cd.height, x, y, cd.width, cd.height); + ctx.drawImage(frame.source.image, cd.x, cd.y, cd.width, cd.height, x, y, cd.width, cd.height); - ctx.restore(); - } + ctx.restore(); } - - ctx.restore(); } + + ctx.restore(); }; -module.exports = ParticleManagerCanvasRenderer; +module.exports = ParticleEmitterCanvasRenderer; /***/ }), -/***/ 38842: +/***/ 765: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var BuildGameObject = __webpack_require__(88933); var GameObjectCreator = __webpack_require__(99325); var GetAdvancedValue = __webpack_require__(20494); var GetFastValue = __webpack_require__(72632); -var ParticleEmitterManager = __webpack_require__(84622); +var ParticleEmitter = __webpack_require__(9216); /** - * Creates a new Particle Emitter Manager Game Object and returns it. + * Creates a new Particle Emitter Game Object and returns it. + * + * Prior to Phaser v3.60 this function would create a `ParticleEmitterManager`. These were removed + * in v3.60 and replaced with creating a `ParticleEmitter` instance directly. Please see the + * updated function parameters and class documentation for more details. * * Note: This method will only be available if the Particles Game Object has been built into Phaser. * * @method Phaser.GameObjects.GameObjectCreator#particles * @since 3.0.0 * - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterManagerConfig} config - The configuration object this Game Object will use to create itself. + * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCreatorConfig} config - The configuration object this Game Object will use to create itself. * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} The Game Object that was created. + * @return {Phaser.GameObjects.Particles.ParticleEmitter} The Game Object that was created. */ GameObjectCreator.register('particles', function (config, addToScene) { if (config === undefined) { config = {}; } var key = GetAdvancedValue(config, 'key', null); - var frame = GetAdvancedValue(config, 'frame', null); - var emitters = GetFastValue(config, 'emitters', null); + var emitterConfig = GetFastValue(config, 'config', null); - // frame is optional and can contain the emitters array or object if skipped - var manager = new ParticleEmitterManager(this.scene, key, frame, emitters); + var emitter = new ParticleEmitter(this.scene, 0, 0, key); if (addToScene !== undefined) { config.add = addToScene; } - var add = GetFastValue(config, 'add', false); + BuildGameObject(this.scene, emitter, config); - if (add) + if (emitterConfig) { - this.displayList.add(manager); - } - else - { - this.updateList.add(manager); + emitter.setConfig(emitterConfig); } - return manager; + return emitter; }); /***/ }), -/***/ 30439: +/***/ 81212: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(61286); -var ParticleEmitterManager = __webpack_require__(84622); +var ParticleEmitter = __webpack_require__(9216); /** - * Creates a new Particle Emitter Manager Game Object and adds it to the Scene. + * Creates a new Particle Emitter Game Object and adds it to the Scene. + * + * If you wish to configure the Emitter after creating it, use the `ParticleEmitter.setConfig` method. + * + * Prior to Phaser v3.60 this function would create a `ParticleEmitterManager`. These were removed + * in v3.60 and replaced with creating a `ParticleEmitter` instance directly. Please see the + * updated function parameters and class documentation for more details. * * Note: This method will only be available if the Particles Game Object has been built into Phaser. * * @method Phaser.GameObjects.GameObjectFactory#particles - * @since 3.0.0 + * @since 3.60.0 * - * @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param {(string|number|object)} [frame] - An optional frame from the Texture this Game Object is rendering with. - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterConfig[]} [emitters] - Configuration settings for one or more emitters to create. + * @param {number} [x] - The horizontal position of this Game Object in the world. + * @param {number} [y] - The vertical position of this Game Object in the world. + * @param {(string|Phaser.Textures.Texture)} [texture] - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} [config] - Configuration settings for the Particle Emitter. * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} The Game Object that was created. + * @return {Phaser.GameObjects.Particles.ParticleEmitter} The Game Object that was created. */ -GameObjectFactory.register('particles', function (key, frame, emitters) +GameObjectFactory.register('particles', function (x, y, texture, config) { - return this.displayList.add(new ParticleEmitterManager(this.scene, key, frame, emitters)); + if (x !== undefined && typeof x === 'string') + { + console.warn('ParticleEmitterManager was removed in Phaser 3.60. See documentation for details'); + } + + return this.displayList.add(new ParticleEmitter(this.scene, x, y, texture, config)); }); /***/ }), -/***/ 72745: +/***/ 69116: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61105,12 +63288,12 @@ var renderCanvas = NOOP; if (true) { - renderWebGL = __webpack_require__(58971); + renderWebGL = __webpack_require__(10275); } if (true) { - renderCanvas = __webpack_require__(66545); + renderCanvas = __webpack_require__(10456); } module.exports = { @@ -61123,15 +63306,16 @@ module.exports = { /***/ }), -/***/ 58971: +/***/ 10275: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var RectangleToRectangle = __webpack_require__(90205); var TransformMatrix = __webpack_require__(69360); var Utils = __webpack_require__(75512); @@ -61145,26 +63329,18 @@ var tempMatrix4 = new TransformMatrix(); * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera. * This method should not be called directly. It is a utility function of the Render module. * - * @method Phaser.GameObjects.Particles.EmitterManager#renderWebGL - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.Emitter#renderWebGL + * @since 3.60.0 * @private * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. - * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - The Game Object being rendered in this call. + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Game Object being rendered in this call. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var ParticleManagerWebGLRenderer = function (renderer, emitterManager, camera, parentMatrix) +var ParticleEmitterWebGLRenderer = function (renderer, emitter, camera, parentMatrix) { - var emitters = emitterManager.emitters.list; - var emittersLength = emitters.length; - - if (emittersLength === 0) - { - return; - } - - var pipeline = renderer.pipelines.set(emitterManager.pipeline); + var pipeline = renderer.pipelines.set(emitter.pipeline); var camMatrix = tempMatrix1; var calcMatrix = tempMatrix2; @@ -61175,108 +63351,394 @@ var ParticleManagerWebGLRenderer = function (renderer, emitterManager, camera, p { managerMatrix.loadIdentity(); managerMatrix.multiply(parentMatrix); - managerMatrix.translate(emitterManager.x, emitterManager.y); - managerMatrix.rotate(emitterManager.rotation); - managerMatrix.scale(emitterManager.scaleX, emitterManager.scaleY); + managerMatrix.translate(emitter.x, emitter.y); + managerMatrix.rotate(emitter.rotation); + managerMatrix.scale(emitter.scaleX, emitter.scaleY); } else { - managerMatrix.applyITRS(emitterManager.x, emitterManager.y, emitterManager.rotation, emitterManager.scaleX, emitterManager.scaleY); + managerMatrix.applyITRS(emitter.x, emitter.y, emitter.rotation, emitter.scaleX, emitter.scaleY); } var roundPixels = camera.roundPixels; - var texture = emitterManager.defaultFrame.glTexture; var getTint = Utils.getTintAppendFloatAlpha; + var camerAlpha = camera.alpha; + var emitterAlpha = emitter.alpha; + var texture = emitter.texture.glTexture; + + renderer.pipelines.preBatch(emitter); - var textureUnit = pipeline.setGameObject(emitterManager, emitterManager.defaultFrame); + var particles = emitter.alive; + var particleCount = particles.length; + var viewBounds = emitter.viewBounds; - renderer.pipelines.preBatch(emitterManager); + if (!emitter.visible || particleCount === 0 || (viewBounds && !RectangleToRectangle(viewBounds, camera.worldView))) + { + return; + } - for (var e = 0; e < emittersLength; e++) + if (emitter.sortCallback) { - var emitter = emitters[e]; - var particles = emitter.alive; - var particleCount = particles.length; + emitter.depthSort(); + } + + var textureUnit = pipeline.setGameObject(emitter, emitter.frame); + + camera.addToRenderList(emitter); + + var scrollFactorX = emitter.scrollFactorX; + var scrollFactorY = emitter.scrollFactorY; + + renderer.setBlendMode(emitter.blendMode); + + if (emitter.mask) + { + emitter.mask.preRenderWebGL(renderer, emitter, camera); + + renderer.pipelines.set(emitter.pipeline); + } + + var tintEffect = emitter.tintFill; + + for (var i = 0; i < particleCount; i++) + { + var particle = particles[i]; + + var alpha = particle.alpha * emitterAlpha * camerAlpha; - if (!emitter.visible || particleCount === 0) + if (alpha <= 0 || particle.scaleX === 0 || particle.scaleY === 0) { continue; } - camera.addToRenderList(emitter); + particleMatrix.applyITRS(particle.x, particle.y, particle.rotation, particle.scaleX, particle.scaleY); - var scrollFactorX = emitter.scrollFactorX; - var scrollFactorY = emitter.scrollFactorY; + camMatrix.copyFrom(camera.matrix); - renderer.setBlendMode(emitter.blendMode); + camMatrix.multiplyWithOffset(managerMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY); - if (emitter.mask) - { - emitter.mask.preRenderWebGL(renderer, emitter, camera); + // Undo the camera scroll + particleMatrix.e = particle.x; + particleMatrix.f = particle.y; - renderer.pipelines.set(emitterManager.pipeline); - } + // Multiply by the particle matrix, store result in calcMatrix + camMatrix.multiply(particleMatrix, calcMatrix); - var tintEffect = 0; + var frame = particle.frame; - for (var i = 0; i < particleCount; i++) - { - var particle = particles[i]; + var x = -frame.halfWidth; + var y = -frame.halfHeight; - var alpha = particle.alpha * camera.alpha; + var quad = calcMatrix.setQuad(x, y, x + frame.width, y + frame.height, roundPixels); - if (alpha <= 0) - { - continue; - } + var tint = getTint(particle.tint, alpha); - particleMatrix.applyITRS(particle.x, particle.y, particle.rotation, particle.scaleX, particle.scaleY); + pipeline.batchQuad(emitter, quad[0], quad[1], quad[2], quad[3], quad[4], quad[5], quad[6], quad[7], frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, tintEffect, texture, textureUnit); + } - camMatrix.copyFrom(camera.matrix); + if (emitter.mask) + { + emitter.mask.postRenderWebGL(renderer, camera); + } - camMatrix.multiplyWithOffset(managerMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY); + renderer.pipelines.postBatch(emitter); +}; - // Undo the camera scroll - particleMatrix.e = particle.x; - particleMatrix.f = particle.y; +module.exports = ParticleEmitterWebGLRenderer; - // Multiply by the particle matrix, store result in calcMatrix - camMatrix.multiply(particleMatrix, calcMatrix); - var frame = particle.frame; +/***/ }), - var x = -frame.halfWidth; - var y = -frame.halfHeight; - var xw = x + frame.width; - var yh = y + frame.height; +/***/ 30891: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - var tx0 = calcMatrix.getXRound(x, y, roundPixels); - var ty0 = calcMatrix.getYRound(x, y, roundPixels); +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ - var tx1 = calcMatrix.getXRound(x, yh, roundPixels); - var ty1 = calcMatrix.getYRound(x, yh, roundPixels); +var Class = __webpack_require__(56694); - var tx2 = calcMatrix.getXRound(xw, yh, roundPixels); - var ty2 = calcMatrix.getYRound(xw, yh, roundPixels); +/** + * @classdesc + * This class provides the structured required for all Particle Processors. + * + * You should extend it and add the functionality required for your processor, + * including tidying up any resources this may create in the `destroy` method. + * + * See the GravityWell for an example of a processor. + * + * @class ParticleProcessor + * @memberof Phaser.GameObjects.Particles + * @constructor + * @since 3.60.0 + * + * @param {number} [x=0] - The x coordinate of the Particle Processor, in world space. + * @param {number} [y=0] - The y coordinate of the Particle Processor, in world space. + * @param {boolean} [active=true] - The active state of this Particle Processor. + */ +var ParticleProcessor = new Class({ - var tx3 = calcMatrix.getXRound(xw, y, roundPixels); - var ty3 = calcMatrix.getYRound(xw, y, roundPixels); + initialize: - var tint = getTint(particle.tint, alpha); + function ParticleProcessor (x, y, active) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (active === undefined) { active = true; } - pipeline.batchQuad(emitter, tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, tintEffect, texture, textureUnit); - } + /** + * A reference to the Particle Emitter that owns this Processor. + * This is set automatically when the Processor is added to an Emitter + * and nulled when removed or destroyed. + * + * @name Phaser.GameObjects.Particles.ParticleProcessor#manager + * @type {Phaser.GameObjects.Particles.ParticleEmitter} + * @since 3.60.0 + */ + this.emitter; - if (emitter.mask) - { - emitter.mask.postRenderWebGL(renderer, camera); - } + /** + * The x coordinate of the Particle Processor, in world space. + * + * @name Phaser.GameObjects.Particles.ParticleProcessor#x + * @type {number} + * @since 3.60.0 + */ + this.x = x; + + /** + * The y coordinate of the Particle Processor, in world space. + * + * @name Phaser.GameObjects.Particles.ParticleProcessor#y + * @type {number} + * @since 3.60.0 + */ + this.y = y; + + /** + * The active state of the Particle Processor. + * + * An inactive Particle Processor will be skipped for processing by + * its parent Emitter. + * + * @name Phaser.GameObjects.Particles.ParticleProcessor#active + * @type {boolean} + * @since 3.60.0 + */ + this.active = active; + }, + + /** + * The Particle Processor update method should be overriden by your own + * method and handle the processing of the particles, typically modifying + * their velocityX/Y values based on the criteria of this processor. + * + * @method Phaser.GameObjects.Particles.ParticleProcessor#update + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.Particle} particle - The Particle to update. + * @param {number} delta - The delta time in ms. + * @param {number} step - The delta value divided by 1000. + * @param {number} t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death). + */ + update: function () + { + }, + + /** + * Destroys this Particle Processor by removing all external references. + * + * This is called automatically when the owning Particle Emitter is destroyed. + * + * @method Phaser.GameObjects.Particles.ParticleProcessor#destroy + * @since 3.60.0 + */ + destroy: function () + { + this.emitter = null; } - renderer.pipelines.postBatch(emitterManager); -}; +}); + +module.exports = ParticleProcessor; + + +/***/ }), + +/***/ 76100: +/***/ ((module) => { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Particle Emitter Complete Event. + * + * This event is dispatched when the final particle, emitted from a Particle Emitter that + * has been stopped, dies. Upon receipt of this event you know that no particles are + * still rendering at this point in time. + * + * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('complete', listener)`. + * + * @event Phaser.GameObjects.Particles.Events#COMPLETE + * @type {string} + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - A reference to the Particle Emitter that just completed. + */ +module.exports = 'complete'; + + +/***/ }), + +/***/ 26677: +/***/ ((module) => { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Particle Emitter Death Zone Event. + * + * This event is dispatched when a Death Zone kills a Particle instance. + * + * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('deathzone', listener)`. + * + * If you wish to know when the final particle is killed, see the `COMPLETE` event. + * + * @event Phaser.GameObjects.Particles.Events#DEATH_ZONE + * @type {string} + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - A reference to the Particle Emitter that owns the Particle and Death Zone. + * @param {Phaser.GameObjects.Particles.Particle} particle - The Particle that has been killed. + * @param {Phaser.GameObjects.Particles.Zones.DeathZone} zone - The Death Zone that killed the particle. + */ +module.exports = 'deathzone'; + + +/***/ }), + +/***/ 62736: +/***/ ((module) => { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Particle Emitter Explode Event. + * + * This event is dispatched when a Particle Emitter explodes a set of particles. + * + * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('explode', listener)`. + * + * @event Phaser.GameObjects.Particles.Events#EXPLODE + * @type {string} + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - A reference to the Particle Emitter that just completed. + * @param {Phaser.GameObjects.Particles.Particle} particle - The most recently emitted Particle. + */ +module.exports = 'explode'; + + +/***/ }), + +/***/ 56490: +/***/ ((module) => { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Particle Emitter Start Event. + * + * This event is dispatched when a Particle Emitter starts emission of particles. + * + * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('start', listener)`. + * + * @event Phaser.GameObjects.Particles.Events#START + * @type {string} + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - A reference to the Particle Emitter that just completed. + */ +module.exports = 'start'; + -module.exports = ParticleManagerWebGLRenderer; +/***/ }), + +/***/ 85715: +/***/ ((module) => { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Particle Emitter Stop Event. + * + * This event is dispatched when a Particle Emitter is stopped. This can happen either + * when you directly call the `ParticleEmitter.stop` method, or if the emitter has + * been configured to stop after a set time via the `duration` property, or after a + * set number of particles via the `stopAfter` property. + * + * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('stop', listener)`. + * + * Note that just because the emitter has stopped, that doesn't mean there aren't still + * particles alive and rendering. It just means the emitter has stopped emitting particles. + * + * If you wish to know when the final particle is killed, see the `COMPLETE` event. + * + * @event Phaser.GameObjects.Particles.Events#STOP + * @type {string} + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - A reference to the Particle Emitter that just completed. + */ +module.exports = 'stop'; + + +/***/ }), + +/***/ 40629: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Particles.Events + */ + +module.exports = { + + COMPLETE: __webpack_require__(76100), + DEATH_ZONE: __webpack_require__(26677), + EXPLODE: __webpack_require__(62736), + START: __webpack_require__(56490), + STOP: __webpack_require__(85715) + +}; /***/ }), @@ -61286,7 +63748,7 @@ module.exports = ParticleManagerWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61296,11 +63758,13 @@ module.exports = ParticleManagerWebGLRenderer; module.exports = { + EmitterColorOp: __webpack_require__(19737), EmitterOp: __webpack_require__(93025), + Events: __webpack_require__(40629), GravityWell: __webpack_require__(87811), Particle: __webpack_require__(14909), ParticleEmitter: __webpack_require__(9216), - ParticleEmitterManager: __webpack_require__(84622), + ParticleProcessor: __webpack_require__(30891), Zones: __webpack_require__(25962) }; @@ -61313,7 +63777,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61369,13 +63833,14 @@ var DeathZone = new Class({ * @method Phaser.GameObjects.Particles.Zones.DeathZone#willKill * @since 3.0.0 * - * @param {Phaser.GameObjects.Particles.Particle} particle - The Particle to be checked against this zone. + * @param {number} x - The x coordinate of the Particle to be checked against this zone. + * @param {number} y - The y coordinate of the Particle to be checked against this zone. * * @return {boolean} Return `true` if the Particle is to be killed, otherwise return `false`. */ - willKill: function (particle) + willKill: function (x, y) { - var withinZone = this.source.contains(particle.x, particle.y); + var withinZone = this.source.contains(x, y); return (withinZone && this.killOnEnter || !withinZone && !this.killOnEnter); } @@ -61392,7 +63857,7 @@ module.exports = DeathZone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61412,15 +63877,17 @@ var Class = __webpack_require__(56694); * @param {number} stepRate - The distance between each particle. When set, `quantity` is implied and should be set to 0. * @param {boolean} [yoyo=false] - Whether particles are placed from start to end and then end to start. * @param {boolean} [seamless=true] - Whether one endpoint will be removed if it's identical to the other. + * @param {number} [total=-1] - The total number of particles this zone will emit before passing over to the next emission zone in the Emitter. -1 means it will never pass over and you must use `setEmitZone` to change it. */ var EdgeZone = new Class({ initialize: - function EdgeZone (source, quantity, stepRate, yoyo, seamless) + function EdgeZone (source, quantity, stepRate, yoyo, seamless, total) { if (yoyo === undefined) { yoyo = false; } if (seamless === undefined) { seamless = true; } + if (total === undefined) { total = -1; } /** * An object instance with a `getPoints(quantity, stepRate)` method returning an array of points. @@ -61511,6 +63978,24 @@ var EdgeZone = new Class({ */ this._direction = 0; + /** + * The total number of particles this zone will emit before the Emitter + * transfers control over to the next zone in its emission zone list. + * + * By default this is -1, meaning it will never pass over from this + * zone to another one. You can call the `ParticleEmitter.setEmitZone` + * method to change it, or set this value to something else via the + * config, or directly at runtime. + * + * A value of 1 would mean the zones rotate in order, but it can + * be set to any integer value. + * + * @name Phaser.GameObjects.Particles.Zones.EdgeZone#total + * @type {number} + * @since 3.60.0 + */ + this.total = total; + this.updateSource(); }, @@ -61637,7 +64122,7 @@ module.exports = EdgeZone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61679,6 +64164,24 @@ var RandomZone = new Class({ * @since 3.0.0 */ this._tempVec = new Vector2(); + + /** + * The total number of particles this zone will emit before the Emitter + * transfers control over to the next zone in its emission zone list. + * + * By default this is -1, meaning it will never pass over from this + * zone to another one. You can call the `ParticleEmitter.setEmitZone` + * method to change it, or set this value to something else via the + * config, or directly at runtime. + * + * A value of 1 would mean the zones rotate in order, but it can + * be set to any integer value. + * + * @name Phaser.GameObjects.Particles.Zones.RandomZone#total + * @type {number} + * @since 3.60.0 + */ + this.total = -1; }, /** @@ -61711,7 +64214,7 @@ module.exports = RandomZone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61735,7 +64238,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61818,7 +64321,7 @@ module.exports = PathFollower; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61867,7 +64370,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -62072,7 +64575,7 @@ module.exports = PointLight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -62123,7 +64626,7 @@ GameObjectCreator.register('pointlight', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -62184,7 +64687,7 @@ GameObjectFactory.register('pointlight', function (x, y, color, radius, intensit /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -62212,7 +64715,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -62281,7 +64784,7 @@ module.exports = PointLightWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63114,7 +65617,7 @@ module.exports = RenderTexture; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63178,7 +65681,7 @@ GameObjectCreator.register('renderTexture', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63226,7 +65729,7 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64354,7 +66857,7 @@ module.exports = Rope; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64383,7 +66886,7 @@ module.exports = RopeCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64439,7 +66942,7 @@ GameObjectCreator.register('rope', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64482,7 +66985,7 @@ if (true) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64515,7 +67018,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64632,7 +67135,7 @@ module.exports = RopeWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -65865,7 +68368,7 @@ module.exports = Shader; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -65894,7 +68397,7 @@ module.exports = ShaderCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -65948,7 +68451,7 @@ GameObjectCreator.register('shader', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -65990,7 +68493,7 @@ if (true) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66023,7 +68526,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66086,7 +68589,7 @@ module.exports = ShaderWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66149,7 +68652,7 @@ module.exports = FillPathWebGL; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66187,7 +68690,7 @@ module.exports = FillStyleCanvas; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66226,7 +68729,7 @@ module.exports = LineStyleCanvas; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66652,7 +69155,7 @@ module.exports = Shape; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66726,7 +69229,7 @@ module.exports = StrokePathWebGL; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67136,7 +69639,7 @@ module.exports = Arc; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67214,7 +69717,7 @@ module.exports = ArcCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67288,7 +69791,7 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67321,7 +69824,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67383,7 +69886,7 @@ module.exports = ArcWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67566,7 +70069,7 @@ module.exports = Curve; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67656,7 +70159,7 @@ module.exports = CurveCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67707,7 +70210,7 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67740,7 +70243,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67802,7 +70305,7 @@ module.exports = CurveWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67993,7 +70496,7 @@ module.exports = Ellipse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68080,7 +70583,7 @@ module.exports = EllipseCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68133,7 +70636,7 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor, /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68166,7 +70669,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68228,7 +70731,7 @@ module.exports = EllipseWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68508,7 +71011,7 @@ module.exports = Grid; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68699,7 +71202,7 @@ module.exports = GridCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68755,7 +71258,7 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68788,7 +71291,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68990,7 +71493,7 @@ module.exports = GridWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69206,7 +71709,7 @@ module.exports = IsoBox; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69309,7 +71812,7 @@ module.exports = IsoBoxCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69361,7 +71864,7 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69394,7 +71897,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69531,7 +72034,7 @@ module.exports = IsoBoxWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69778,7 +72281,7 @@ module.exports = IsoTriangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69894,7 +72397,7 @@ module.exports = IsoTriangleCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69948,7 +72451,7 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69981,7 +72484,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70138,7 +72641,7 @@ module.exports = IsoTriangleWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70306,7 +72809,7 @@ module.exports = Line; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70365,7 +72868,7 @@ module.exports = LineCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70417,7 +72920,7 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor, /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70450,7 +72953,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70528,7 +73031,7 @@ module.exports = LineWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70704,7 +73207,7 @@ module.exports = Polygon; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70794,7 +73297,7 @@ module.exports = PolygonCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70848,7 +73351,7 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70881,7 +73384,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70943,7 +73446,7 @@ module.exports = PolygonWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71092,7 +73595,7 @@ module.exports = Rectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71168,7 +73671,7 @@ module.exports = RectangleCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71214,7 +73717,7 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71247,7 +73750,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71321,7 +73824,7 @@ module.exports = RectangleWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71610,7 +74113,7 @@ module.exports = Star; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71697,7 +74200,7 @@ module.exports = StarCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71750,7 +74253,7 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71783,7 +74286,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71845,7 +74348,7 @@ module.exports = StarWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71989,7 +74492,7 @@ module.exports = Triangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72066,7 +74569,7 @@ module.exports = TriangleCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72118,7 +74621,7 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72151,7 +74654,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72236,7 +74739,7 @@ module.exports = TriangleWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72718,7 +75221,7 @@ module.exports = Sprite; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72753,7 +75256,7 @@ module.exports = SpriteCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72807,7 +75310,7 @@ GameObjectCreator.register('sprite', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72829,13 +75332,9 @@ var Sprite = __webpack_require__(13747); * * @return {Phaser.GameObjects.Sprite} The Game Object that was created. */ -GameObjectFactory.register('sprite', function (x, y, key, frame) +GameObjectFactory.register('sprite', function (x, y, texture, frame) { - var sprite = new Sprite(this.scene, x, y, key, frame); - - this.displayList.add(sprite); - - return sprite; + return this.displayList.add(new Sprite(this.scene, x, y, texture, frame)); }); // When registering a factory function 'this' refers to the GameObjectFactory context. @@ -72854,7 +75353,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72887,7 +75386,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72922,7 +75421,7 @@ module.exports = SpriteWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -73005,7 +75504,7 @@ module.exports = GetTextSize; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -73024,7 +75523,7 @@ var CanvasPool = __webpack_require__(61068); var MeasureText = function (textStyle) { var canvas = CanvasPool.create(this); - var context = canvas.getContext('2d'); + var context = canvas.getContext('2d', { willReadFrequently: true }); textStyle.syncFont(canvas, context); @@ -73069,6 +75568,7 @@ var MeasureText = function (textStyle) }; var imagedata = context.getImageData(0, 0, width, height); + if (!imagedata) { output.ascent = baseline; @@ -73155,7 +75655,7 @@ module.exports = MeasureText; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -74616,7 +77116,7 @@ module.exports = Text; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -74656,7 +77156,7 @@ module.exports = TextCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -74744,7 +77244,7 @@ GameObjectCreator.register('text', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -74810,7 +77310,7 @@ GameObjectFactory.register('text', function (x, y, text, style) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -74843,7 +77343,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -75950,7 +78450,7 @@ module.exports = TextStyle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -76022,7 +78522,7 @@ module.exports = TextWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -76676,7 +79176,7 @@ module.exports = TileSprite; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -76713,7 +79213,7 @@ module.exports = TileSpriteCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -76766,7 +79266,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -76790,9 +79290,9 @@ var GameObjectFactory = __webpack_require__(61286); * * @return {Phaser.GameObjects.TileSprite} The Game Object that was created. */ -GameObjectFactory.register('tileSprite', function (x, y, width, height, key, frame) +GameObjectFactory.register('tileSprite', function (x, y, width, height, texture, frame) { - return this.displayList.add(new TileSprite(this.scene, x, y, width, height, key, frame)); + return this.displayList.add(new TileSprite(this.scene, x, y, width, height, texture, frame)); }); // When registering a factory function 'this' refers to the GameObjectFactory context. @@ -76811,7 +79311,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -76844,7 +79344,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -76920,7 +79420,7 @@ module.exports = TileSpriteWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -78837,7 +81337,7 @@ module.exports = Video; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -78875,7 +81375,7 @@ module.exports = VideoCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -78925,7 +81425,7 @@ GameObjectCreator.register('video', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -78959,7 +81459,7 @@ GameObjectFactory.register('video', function (x, y, key) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -78992,7 +81492,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79030,7 +81530,7 @@ module.exports = VideoWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79352,7 +81852,7 @@ module.exports = Zone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79392,7 +81892,7 @@ GameObjectCreator.register('zone', function (config) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79435,7 +81935,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79464,7 +81964,7 @@ module.exports = Area; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79840,7 +82340,7 @@ module.exports = Circle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79869,7 +82369,7 @@ module.exports = Circumference; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79909,7 +82409,7 @@ module.exports = CircumferencePoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79940,7 +82440,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79982,7 +82482,7 @@ module.exports = Contains; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80014,7 +82514,7 @@ module.exports = ContainsPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80051,7 +82551,7 @@ module.exports = ContainsRect; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80084,7 +82584,7 @@ module.exports = CopyFrom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80119,7 +82619,7 @@ module.exports = Equals; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80160,7 +82660,7 @@ module.exports = GetBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80204,7 +82704,7 @@ module.exports = GetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80257,7 +82757,7 @@ module.exports = GetPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80293,7 +82793,7 @@ module.exports = Offset; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80328,7 +82828,7 @@ module.exports = OffsetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80373,7 +82873,7 @@ module.exports = Random; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80405,7 +82905,7 @@ module.exports = Circle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80486,7 +82986,7 @@ module.exports = GEOM_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80521,7 +83021,7 @@ module.exports = Area; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80554,7 +83054,7 @@ module.exports = Circumference; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80597,7 +83097,7 @@ module.exports = CircumferencePoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80628,7 +83128,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80671,7 +83171,7 @@ module.exports = Contains; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80703,7 +83203,7 @@ module.exports = ContainsPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80740,7 +83240,7 @@ module.exports = ContainsRect; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80773,7 +83273,7 @@ module.exports = CopyFrom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81156,7 +83656,7 @@ module.exports = Ellipse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81192,7 +83692,7 @@ module.exports = Equals; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81233,7 +83733,7 @@ module.exports = GetBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81277,7 +83777,7 @@ module.exports = GetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81332,7 +83832,7 @@ module.exports = GetPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81368,7 +83868,7 @@ module.exports = Offset; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81403,7 +83903,7 @@ module.exports = OffsetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81445,7 +83945,7 @@ module.exports = Random; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81477,7 +83977,7 @@ module.exports = Ellipse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81515,7 +84015,7 @@ module.exports = Geom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81547,7 +84047,7 @@ module.exports = CircleToCircle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81603,7 +84103,7 @@ module.exports = CircleToRectangle; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81698,7 +84198,7 @@ module.exports = GetCircleToCircle; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81749,7 +84249,7 @@ module.exports = GetCircleToRectangle; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81841,7 +84341,7 @@ module.exports = GetLineToCircle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81886,13 +84386,15 @@ var GetLineToLine = function (line1, line2, isRay, out) var denom = (dx1 * dy2 - dy1 * dx2); + // Add co-linear check + // Make sure there is not a division by zero - this also indicates that the lines are parallel. // If numA and numB were both equal to zero the lines would be on top of each other (coincidental). // This check is not done because it is not necessary for this implementation (the parallel check accounts for this). if (denom === 0) { - return false; + return null; } var t; @@ -81948,7 +84450,7 @@ module.exports = GetLineToLine; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82028,7 +84530,7 @@ module.exports = GetLineToPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82102,7 +84604,7 @@ module.exports = GetLineToPolygon; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82162,7 +84664,7 @@ module.exports = GetLineToRectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82265,7 +84767,7 @@ module.exports = GetRaysFromPointToPolygon; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82316,7 +84818,7 @@ module.exports = GetRectangleIntersection; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82368,7 +84870,7 @@ module.exports = GetRectangleToRectangle; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82417,7 +84919,7 @@ module.exports = GetRectangleToTriangle; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82467,7 +84969,7 @@ module.exports = GetTriangleToCircle; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82527,7 +85029,7 @@ module.exports = GetTriangleToLine; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82576,7 +85078,7 @@ module.exports = GetTriangleToTriangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82661,12 +85163,12 @@ module.exports = LineToCircle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ // This is based off an explanation and expanded math presented by Paul Bourke: -// See http:'local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/ +// See http://paulbourke.net/geometry/pointlineplane/ /** * Checks if two Lines intersect. If the Lines are identical, they will be treated as parallel and thus non-intersecting. @@ -82682,7 +85184,6 @@ module.exports = LineToCircle; */ var LineToLine = function (line1, line2, out) { - var x1 = line1.x1; var y1 = line1.y1; var x2 = line1.x2; @@ -82693,39 +85194,46 @@ var LineToLine = function (line1, line2, out) var x4 = line2.x2; var y4 = line2.y2; - var numA = (x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3); - var numB = (x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3); - var deNom = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1); + // Check that none of the lines are length zero + if ((x1 === x2 && y1 === y2) || (x3 === x4 && y3 === y4)) + { + return false; + } + + var denom = ((y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1)); // Make sure there is not a division by zero - this also indicates that the lines are parallel. // If numA and numB were both equal to zero the lines would be on top of each other (coincidental). // This check is not done because it is not necessary for this implementation (the parallel check accounts for this). - if (deNom === 0) + if (denom === 0) { + // Lines are parallel return false; } // Calculate the intermediate fractional point that the lines potentially intersect. - var uA = numA / deNom; - var uB = numB / deNom; + var ua = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denom; + var ub = ((x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3)) / denom; // The fractional point will be between 0 and 1 inclusive if the lines intersect. // If the fractional calculation is larger than 1 or smaller than 0 the lines would need to be longer to intersect. - if (uA >= 0 && uA <= 1 && uB >= 0 && uB <= 1) + if (ua < 0 || ua > 1 || ub < 0 || ub > 1) + { + return false; + } + else { if (out) { - out.x = x1 + (uA * (x2 - x1)); - out.y = y1 + (uA * (y2 - y1)); + out.x = x1 + ua * (x2 - x1); + out.y = y1 + ua * (y2 - y1); } return true; } - - return false; }; module.exports = LineToLine; @@ -82738,7 +85246,7 @@ module.exports = LineToLine; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82841,7 +85349,7 @@ module.exports = LineToRectangle; /** * @author Richard Davey * @author Florian Mertens - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82911,7 +85419,7 @@ module.exports = PointToLine; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82953,7 +85461,7 @@ module.exports = PointToLineSegment; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82992,7 +85500,7 @@ module.exports = RectangleToRectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83086,7 +85594,7 @@ module.exports = RectangleToTriangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83127,7 +85635,7 @@ module.exports = RectangleToValues; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83193,7 +85701,7 @@ module.exports = TriangleToCircle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83249,7 +85757,7 @@ module.exports = TriangleToLine; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83340,7 +85848,7 @@ module.exports = TriangleToTriangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83388,7 +85896,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83417,7 +85925,7 @@ module.exports = Angle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83492,7 +86000,7 @@ module.exports = BresenhamPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83533,7 +86041,7 @@ module.exports = CenterOn; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83564,7 +86072,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83596,7 +86104,7 @@ module.exports = CopyFrom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83631,7 +86139,7 @@ module.exports = Equals; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83690,7 +86198,7 @@ module.exports = Extend; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83811,7 +86319,7 @@ module.exports = GetEasedPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83851,7 +86359,7 @@ module.exports = GetMidPoint; /** * @author Richard Davey * @author Florian Mertens - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83906,7 +86414,7 @@ module.exports = GetNearestPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83951,7 +86459,7 @@ module.exports = GetNormal; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83991,7 +86499,7 @@ module.exports = GetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84058,7 +86566,7 @@ module.exports = GetPoints; /** * @author Richard Davey * @author Florian Mertens - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84068,12 +86576,10 @@ module.exports = GetPoints; * @function Phaser.Geom.Line.GetShortestDistance * @since 3.16.0 * - * @generic {Phaser.Geom.Point} O - [out,$return] - * * @param {Phaser.Geom.Line} line - The line to get the distance from. - * @param {(Phaser.Geom.Point|object)} point - The point to get the shortest distance to. + * @param {Phaser.Types.Math.Vector2Like} point - The point to get the shortest distance to. * - * @return {number} The shortest distance from the line to the point. + * @return {(boolean|number)} The shortest distance from the line to the point, or `false`. */ var GetShortestDistance = function (line, point) { @@ -84105,7 +86611,7 @@ module.exports = GetShortestDistance; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84134,7 +86640,7 @@ module.exports = Height; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84163,7 +86669,7 @@ module.exports = Length; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84501,7 +87007,7 @@ module.exports = Line; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84536,7 +87042,7 @@ module.exports = NormalAngle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84568,7 +87074,7 @@ module.exports = NormalX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84601,7 +87107,7 @@ module.exports = NormalY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84640,7 +87146,7 @@ module.exports = Offset; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84669,7 +87175,7 @@ module.exports = PerpSlope; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84710,7 +87216,7 @@ module.exports = Random; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84745,7 +87251,7 @@ module.exports = ReflectAngle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84782,7 +87288,7 @@ module.exports = Rotate; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84817,7 +87323,7 @@ module.exports = RotateAroundPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84866,7 +87372,7 @@ module.exports = RotateAroundXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84907,7 +87413,7 @@ module.exports = SetToAngle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84936,7 +87442,7 @@ module.exports = Slope; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84965,7 +87471,7 @@ module.exports = Width; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -85011,7 +87517,7 @@ module.exports = Line; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -85603,7 +88109,7 @@ module.exports = Face; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -85846,7 +88352,7 @@ module.exports = GenerateGridVerts; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -85991,7 +88497,7 @@ module.exports = GenerateObjVerts; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -86053,16 +88559,18 @@ var Vertex = __webpack_require__(85769); * @param {number[]} [normals] - Optional vertex normals array. If you don't have one, pass `null` or an empty array. * @param {number|number[]} [colors=0xffffff] - An array of colors, one per vertex, or a single color value applied to all vertices. * @param {number|number[]} [alphas=1] - An array of alpha values, one per vertex, or a single alpha value applied to all vertices. + * @param {boolean} [flipUV=false] - Flip the UV coordinates? * * @return {Phaser.Types.Geom.Mesh.GenerateVertsResult} The parsed Face and Vertex objects. */ -var GenerateVerts = function (vertices, uvs, indicies, containsZ, normals, colors, alphas) +var GenerateVerts = function (vertices, uvs, indicies, containsZ, normals, colors, alphas, flipUV) { if (containsZ === undefined) { containsZ = false; } if (colors === undefined) { colors = 0xffffff; } if (alphas === undefined) { alphas = 1; } + if (flipUV === undefined) { flipUV = false; } - if (vertices.length !== uvs.length) + if (vertices.length !== uvs.length && !containsZ) { console.warn('GenerateVerts: vertices and uvs count not equal'); return; @@ -86109,6 +88617,11 @@ var GenerateVerts = function (vertices, uvs, indicies, containsZ, normals, color u = uvs[index2]; v = uvs[index2 + 1]; + if (flipUV) + { + v = 1 - v; + } + color = (isColorArray) ? colors[index1] : colors; alpha = (isAlphaArray) ? alphas[index1] : alphas; @@ -86183,7 +88696,7 @@ module.exports = GenerateVerts; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -86500,7 +89013,7 @@ module.exports = ParseObj; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -86579,7 +89092,7 @@ module.exports = ParseObjMaterial; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -86645,7 +89158,7 @@ module.exports = RotateFace; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -86988,7 +89501,7 @@ module.exports = Vertex; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87019,7 +89532,7 @@ module.exports = Mesh; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87050,7 +89563,7 @@ module.exports = Ceil; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87081,7 +89594,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87113,7 +89626,7 @@ module.exports = CopyFrom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87143,7 +89656,7 @@ module.exports = Equals; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87174,7 +89687,7 @@ module.exports = Floor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87239,7 +89752,7 @@ module.exports = GetCentroid; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87268,7 +89781,7 @@ module.exports = GetMagnitude; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87297,7 +89810,7 @@ module.exports = GetMagnitudeSq; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87368,7 +89881,7 @@ module.exports = GetRectangleFromPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87410,7 +89923,7 @@ module.exports = Interpolate; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87441,7 +89954,7 @@ module.exports = Invert; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87477,7 +89990,7 @@ module.exports = Negative; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87571,7 +90084,7 @@ module.exports = Point; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87619,7 +90132,7 @@ module.exports = Project; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87665,7 +90178,7 @@ module.exports = ProjectUnit; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87710,7 +90223,7 @@ module.exports = SetMagnitude; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87742,7 +90255,7 @@ module.exports = Point; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87773,7 +90286,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87823,7 +90336,7 @@ module.exports = Contains; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87856,7 +90369,7 @@ module.exports = ContainsPoint; "use strict"; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88622,7 +91135,7 @@ module.exports = earcut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88679,7 +91192,7 @@ module.exports = GetAABB; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88723,7 +91236,7 @@ module.exports = GetNumberArray; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88801,7 +91314,7 @@ module.exports = GetPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88850,7 +91363,7 @@ module.exports = Perimeter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89085,7 +91598,7 @@ module.exports = Polygon; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89325,7 +91838,7 @@ module.exports = Simplify; /** * @author Richard Davey * @author Igor Ognichenko - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89401,7 +91914,7 @@ module.exports = Smooth; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89442,7 +91955,7 @@ module.exports = Translate; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89471,7 +91984,7 @@ module.exports = Polygon; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89500,7 +92013,7 @@ module.exports = Area; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89534,7 +92047,7 @@ module.exports = Ceil; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89570,12 +92083,10 @@ module.exports = CeilAll; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -// Centers this Rectangle so that the center coordinates match the given x and y values. - /** * Moves the top-left corner of a Rectangle so that its center is at the given coordinates. * @@ -89608,7 +92119,7 @@ module.exports = CenterOn; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89639,7 +92150,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89675,7 +92186,7 @@ module.exports = Contains; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89707,7 +92218,7 @@ module.exports = ContainsPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89748,7 +92259,7 @@ module.exports = ContainsRect; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89780,7 +92291,7 @@ module.exports = CopyFrom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89818,7 +92329,7 @@ module.exports = Decompose; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89853,7 +92364,7 @@ module.exports = Equals; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89907,7 +92418,7 @@ module.exports = FitInside; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89961,7 +92472,7 @@ module.exports = FitOutside; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89995,7 +92506,7 @@ module.exports = Floor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90031,24 +92542,26 @@ module.exports = FloorAll; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Rectangle = __webpack_require__(74118); var MATH_CONST = __webpack_require__(83392); -// points is an array of Point-like objects, -// either 2 dimensional arrays, or objects with public x/y properties: -// var points = [ -// [100, 200], -// [200, 400], -// { x: 30, y: 60 } -// ] - /** * Constructs new Rectangle or repositions and resizes an existing Rectangle so that all of the given points are on or within its bounds. * + * The `points` parameter is an array of Point-like objects: + * + * ```js + * const points = [ + * [100, 200], + * [200, 400], + * { x: 30, y: 60 } + * ] + * ``` + * * @function Phaser.Geom.Rectangle.FromPoints * @since 3.0.0 * @@ -90118,7 +92631,7 @@ module.exports = FromPoints; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90162,7 +92675,7 @@ module.exports = FromXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90191,7 +92704,7 @@ module.exports = GetAspectRatio; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90230,7 +92743,7 @@ module.exports = GetCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90312,16 +92825,13 @@ module.exports = GetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetPoint = __webpack_require__(47698); var Perimeter = __webpack_require__(85876); -// Return an array of points from the perimeter of the rectangle -// each spaced out based on the quantity or step required - /** * Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required. * @@ -90367,13 +92877,12 @@ module.exports = GetPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(79967); - /** * Returns the size of the Rectangle, expressed as a Point object. * With the value of the `width` as the `x` property and the `height` as the `y` property. @@ -90408,13 +92917,12 @@ module.exports = GetSize; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var CenterOn = __webpack_require__(79993); - /** * Increases the size of a Rectangle by a specified amount. * @@ -90451,7 +92959,7 @@ module.exports = Inflate; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90503,14 +93011,13 @@ module.exports = Intersection; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Perimeter = __webpack_require__(85876); var Point = __webpack_require__(79967); - /** * Returns an array of points from the perimeter of the Rectangle, where each point is spaced out based * on either the `step` value, or the `quantity`. @@ -90623,7 +93130,7 @@ module.exports = MarchingAnts; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90673,13 +93180,10 @@ module.exports = MergePoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -// Merges source rectangle into target rectangle and returns target -// Neither rect should have negative widths or heights - /** * Merges the source rectangle into the target rectangle and returns the target. * Neither rectangle should have a negative width or height. @@ -90721,7 +93225,7 @@ module.exports = MergeRect; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90766,7 +93270,7 @@ module.exports = MergeXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90802,7 +93306,7 @@ module.exports = Offset; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90837,7 +93341,7 @@ module.exports = OffsetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90872,7 +93376,7 @@ module.exports = Overlaps; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90901,7 +93405,7 @@ module.exports = Perimeter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90959,7 +93463,7 @@ module.exports = PerimeterPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90998,7 +93502,7 @@ module.exports = Random; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91070,7 +93574,7 @@ module.exports = RandomOutside; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91582,7 +94086,7 @@ module.exports = Rectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91612,12 +94116,10 @@ module.exports = SameDimensions; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -// Scales the width and height of this Rectangle by the given amounts. - /** * Scales the width and height of this Rectangle by the given amounts. * @@ -91652,7 +94154,7 @@ module.exports = Scale; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91695,7 +94197,7 @@ module.exports = Union; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91750,7 +94252,7 @@ module.exports = Rectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91790,7 +94292,7 @@ module.exports = Area; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91835,7 +94337,7 @@ module.exports = BuildEquilateral; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91912,7 +94414,7 @@ module.exports = BuildFromPolygon; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91962,7 +94464,7 @@ module.exports = BuildRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92016,7 +94518,7 @@ module.exports = CenterOn; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92061,7 +94563,7 @@ module.exports = Centroid; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92138,7 +94640,7 @@ module.exports = CircumCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92222,7 +94724,7 @@ module.exports = CircumCircle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92253,7 +94755,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92307,7 +94809,7 @@ module.exports = Contains; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92395,7 +94897,7 @@ module.exports = ContainsArray; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92427,7 +94929,7 @@ module.exports = ContainsPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92459,7 +94961,7 @@ module.exports = CopyFrom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92495,7 +94997,7 @@ module.exports = Decompose; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92532,7 +95034,7 @@ module.exports = Equals; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92620,7 +95122,7 @@ module.exports = GetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92714,7 +95216,7 @@ module.exports = GetPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92780,7 +95282,7 @@ module.exports = InCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92822,7 +95324,7 @@ module.exports = Offset; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92858,7 +95360,7 @@ module.exports = Perimeter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92915,7 +95417,7 @@ module.exports = Random; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92952,7 +95454,7 @@ module.exports = Rotate; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92987,7 +95489,7 @@ module.exports = RotateAroundPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93042,7 +95544,7 @@ module.exports = RotateAroundXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93490,7 +95992,7 @@ module.exports = Triangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93531,7 +96033,7 @@ module.exports = Triangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93602,7 +96104,7 @@ module.exports = CreateInteractiveObject; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93639,7 +96141,7 @@ module.exports = CreatePixelPerfectHandler; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -94750,7 +97252,7 @@ module.exports = InputManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -97264,7 +99766,7 @@ var InputPlugin = new Class({ debug.setRotation(rotation); debug.setScale(scaleX, scaleY); - debug.setPosition(x + offsetx, y + offsety); + debug.setPosition(x + offsetx * scaleX, y + offsety * scaleY); debug.setScrollFactor(gameObject.scrollFactorX, gameObject.scrollFactorY); debug.setDepth(gameObject.depth); }; @@ -98012,7 +100514,7 @@ module.exports = InputPlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -98121,7 +100623,7 @@ module.exports = InputPluginCache; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99453,7 +101955,7 @@ module.exports = Pointer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99552,7 +102054,7 @@ module.exports = INPUT_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99575,7 +102077,7 @@ module.exports = 'boot'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99598,7 +102100,7 @@ module.exports = 'destroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99628,7 +102130,7 @@ module.exports = 'dragend'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99661,7 +102163,7 @@ module.exports = 'dragenter'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99695,7 +102197,7 @@ module.exports = 'drag'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99728,7 +102230,7 @@ module.exports = 'dragleave'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99764,7 +102266,7 @@ module.exports = 'dragover'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99796,7 +102298,7 @@ module.exports = 'dragstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99827,7 +102329,7 @@ module.exports = 'drop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99870,7 +102372,7 @@ module.exports = 'gameobjectdown'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99903,7 +102405,7 @@ module.exports = 'dragend'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99935,7 +102437,7 @@ module.exports = 'dragenter'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99968,7 +102470,7 @@ module.exports = 'drag'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100000,7 +102502,7 @@ module.exports = 'dragleave'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100035,7 +102537,7 @@ module.exports = 'dragover'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100071,7 +102573,7 @@ module.exports = 'dragstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100103,7 +102605,7 @@ module.exports = 'drop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100146,7 +102648,7 @@ module.exports = 'gameobjectmove'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100192,7 +102694,7 @@ module.exports = 'gameobjectout'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100235,7 +102737,7 @@ module.exports = 'gameobjectover'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100278,7 +102780,7 @@ module.exports = 'pointerdown'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100321,7 +102823,7 @@ module.exports = 'pointermove'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100365,7 +102867,7 @@ module.exports = 'pointerout'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100408,7 +102910,7 @@ module.exports = 'pointerover'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100451,7 +102953,7 @@ module.exports = 'pointerup'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100495,7 +102997,7 @@ module.exports = 'wheel'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100538,7 +103040,7 @@ module.exports = 'gameobjectup'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100584,7 +103086,7 @@ module.exports = 'gameobjectwheel'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100613,7 +103115,7 @@ module.exports = 'gameout'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100642,7 +103144,7 @@ module.exports = 'gameover'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100665,7 +103167,7 @@ module.exports = 'boot'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100692,7 +103194,7 @@ module.exports = 'process'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100715,7 +103217,7 @@ module.exports = 'update'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100741,7 +103243,7 @@ module.exports = 'pointerlockchange'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100778,7 +103280,7 @@ module.exports = 'pointerdown'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100814,7 +103316,7 @@ module.exports = 'pointerdownoutside'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100851,7 +103353,7 @@ module.exports = 'pointermove'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100891,7 +103393,7 @@ module.exports = 'pointerout'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100928,7 +103430,7 @@ module.exports = 'pointerover'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100965,7 +103467,7 @@ module.exports = 'pointerup'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101001,7 +103503,7 @@ module.exports = 'pointerupoutside'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101041,7 +103543,7 @@ module.exports = 'wheel'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101065,7 +103567,7 @@ module.exports = 'preupdate'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101088,7 +103590,7 @@ module.exports = 'shutdown'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101112,7 +103614,7 @@ module.exports = 'start'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101139,7 +103641,7 @@ module.exports = 'update'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101206,7 +103708,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101332,7 +103834,7 @@ module.exports = Axis; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101479,7 +103981,7 @@ module.exports = Button; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -102253,7 +104755,7 @@ module.exports = Gamepad; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -102900,7 +105402,7 @@ module.exports = GamepadPlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103044,7 +105546,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103288,7 +105790,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103521,7 +106023,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103545,7 +106047,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103576,7 +106078,7 @@ module.exports = 'down'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103607,7 +106109,7 @@ module.exports = 'up'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103640,7 +106142,7 @@ module.exports = 'connected'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103668,7 +106170,7 @@ module.exports = 'disconnected'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103702,7 +106204,7 @@ module.exports = 'down'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103736,7 +106238,7 @@ module.exports = 'up'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103763,7 +106265,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103790,7 +106292,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103830,7 +106332,7 @@ module.exports = Input; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -104275,7 +106777,7 @@ module.exports = KeyboardManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105238,7 +107740,7 @@ module.exports = KeyboardPlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105281,7 +107783,7 @@ module.exports = AdvanceKeyCombo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105575,7 +108077,7 @@ module.exports = KeyCombo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105657,7 +108159,7 @@ module.exports = ProcessKeyCombo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105693,7 +108195,7 @@ module.exports = ResetKeyCombo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105731,7 +108233,7 @@ module.exports = 'keydown'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105762,7 +108264,7 @@ module.exports = 'keyup'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105798,7 +108300,7 @@ module.exports = 'keycombomatch'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105834,7 +108336,7 @@ module.exports = 'down'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105875,7 +108377,7 @@ module.exports = 'keydown-'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105909,7 +108411,7 @@ module.exports = 'keyup-'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105945,7 +108447,7 @@ module.exports = 'up'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105973,7 +108475,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -106012,7 +108514,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -106047,7 +108549,7 @@ module.exports = DownDuration; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -106090,7 +108592,7 @@ module.exports = JustDown; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -106133,7 +108635,7 @@ module.exports = JustUp; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -106536,7 +109038,7 @@ module.exports = Key; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -107443,7 +109945,7 @@ module.exports = KeyCodes; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -107466,7 +109968,7 @@ module.exports = KeyMap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -107501,7 +110003,7 @@ module.exports = UpDuration; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -108068,7 +110570,7 @@ module.exports = MouseManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -108092,7 +110594,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -108500,7 +111002,7 @@ module.exports = TouchManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -108524,7 +111026,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -109093,7 +111595,7 @@ module.exports = File; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -109163,7 +111665,7 @@ module.exports = FileTypesManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -109205,7 +111707,7 @@ module.exports = GetURL; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -110318,7 +112820,7 @@ module.exports = LoaderPlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -110367,7 +112869,7 @@ module.exports = MergeXHRSettings; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -110674,7 +113176,7 @@ module.exports = MultiFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -110756,7 +113258,7 @@ module.exports = XHRLoader; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -110827,7 +113329,7 @@ module.exports = XHRSettings; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -110989,7 +113491,7 @@ module.exports = FILE_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111021,7 +113523,7 @@ module.exports = 'addfile'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111051,7 +113553,7 @@ module.exports = 'complete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111084,7 +113586,7 @@ module.exports = 'filecomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111142,7 +113644,7 @@ module.exports = 'filecomplete-'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111169,7 +113671,7 @@ module.exports = 'loaderror'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111197,7 +113699,7 @@ module.exports = 'load'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111226,7 +113728,7 @@ module.exports = 'fileprogress'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111257,7 +113759,7 @@ module.exports = 'postprocess'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111284,7 +113786,7 @@ module.exports = 'progress'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111313,7 +113815,7 @@ module.exports = 'start'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111344,7 +113846,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111546,7 +114048,7 @@ module.exports = AnimationJSONFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111817,7 +114319,7 @@ module.exports = AsepriteFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -112074,7 +114576,7 @@ module.exports = AtlasJSONFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -112316,7 +114818,7 @@ module.exports = AtlasXMLFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -112591,7 +115093,7 @@ module.exports = AudioFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -112882,7 +115384,7 @@ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audio /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -113065,7 +115567,7 @@ module.exports = BinaryFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -113312,7 +115814,7 @@ module.exports = BitmapFontFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -114041,7 +116543,7 @@ module.exports = CompressedTextureFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -114451,7 +116953,7 @@ module.exports = GLSLFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -114655,7 +117157,7 @@ module.exports = HTML5AudioFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -114831,7 +117333,7 @@ module.exports = HTMLFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -115088,7 +117590,7 @@ module.exports = HTMLTextureFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -115446,7 +117948,7 @@ module.exports = ImageFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -115686,7 +118188,7 @@ module.exports = JSONFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116015,7 +118517,7 @@ module.exports = MultiAtlasFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116233,7 +118735,7 @@ module.exports = MultiScriptFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116488,7 +118990,7 @@ module.exports = OBJFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116716,7 +119218,7 @@ module.exports = PackFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116929,7 +119431,7 @@ module.exports = PluginFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117267,7 +119769,7 @@ module.exports = SVGFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117488,7 +119990,7 @@ module.exports = SceneFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117695,7 +120197,7 @@ module.exports = ScenePluginFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117884,7 +120386,7 @@ module.exports = ScriptFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118074,7 +120576,7 @@ module.exports = SpriteSheetFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118254,7 +120756,7 @@ module.exports = TextFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118448,7 +120950,7 @@ module.exports = TilemapCSVFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118603,7 +121105,7 @@ module.exports = TilemapImpactFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118758,7 +121260,7 @@ module.exports = TilemapJSONFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118999,7 +121501,7 @@ module.exports = UnityAtlasFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119395,7 +121897,7 @@ module.exports = VideoFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119579,7 +122081,7 @@ module.exports = XMLFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119633,7 +122135,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119674,7 +122176,7 @@ module.exports = Loader; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119710,7 +122212,7 @@ module.exports = Average; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119742,7 +122244,7 @@ module.exports = Bernstein; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119772,7 +122274,7 @@ module.exports = Between; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119810,7 +122312,7 @@ module.exports = CatmullRom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119848,7 +122350,7 @@ module.exports = CeilTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119879,7 +122381,7 @@ module.exports = Clamp; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119910,7 +122412,7 @@ module.exports = DegToRad; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119940,7 +122442,7 @@ module.exports = Difference; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120224,7 +122726,7 @@ module.exports = Euler; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120265,7 +122767,7 @@ module.exports = Factorial; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120295,7 +122797,7 @@ module.exports = FloatBetween; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120333,7 +122835,7 @@ module.exports = FloorTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120368,7 +122870,7 @@ module.exports = FromPercent; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120402,7 +122904,7 @@ module.exports = GetSpeed; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120434,7 +122936,7 @@ module.exports = IsEven; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120464,7 +122966,7 @@ module.exports = IsEvenStrict; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120530,7 +123032,7 @@ module.exports = LinearXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121124,7 +123626,7 @@ module.exports = Matrix3; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122918,7 +125420,7 @@ module.exports = Matrix4; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122991,7 +125493,7 @@ module.exports = Median; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123022,7 +125524,7 @@ module.exports = MinSub; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123082,7 +125584,7 @@ module.exports = Percent; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124132,7 +126634,7 @@ module.exports = Quaternion; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124163,7 +126665,7 @@ module.exports = RadToDeg; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124204,7 +126706,7 @@ module.exports = RandomXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124244,7 +126746,7 @@ module.exports = RandomXYZ; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124281,7 +126783,7 @@ module.exports = RandomXYZW; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124317,7 +126819,7 @@ module.exports = Rotate; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124362,7 +126864,7 @@ module.exports = RotateAround; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124404,7 +126906,7 @@ module.exports = RotateAroundDistance; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124442,7 +126944,7 @@ module.exports = RotateTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124491,7 +126993,7 @@ module.exports = RotateVec3; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124521,7 +127023,7 @@ module.exports = RoundAwayFromZero; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124574,7 +127076,7 @@ module.exports = RoundTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124628,7 +127130,7 @@ module.exports = SinCosTableGenerator; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124676,7 +127178,7 @@ module.exports = SmoothStep; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124716,7 +127218,7 @@ module.exports = SmootherStep; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124773,7 +127275,7 @@ module.exports = ToXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124829,7 +127331,7 @@ module.exports = TransformXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125623,7 +128125,7 @@ module.exports = Vector2; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126670,7 +129172,7 @@ module.exports = Vector3; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127212,7 +129714,7 @@ module.exports = Vector4; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127243,7 +129745,7 @@ module.exports = Within; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127276,7 +129778,7 @@ module.exports = Wrap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127308,7 +129810,7 @@ module.exports = Between; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127340,7 +129842,7 @@ module.exports = BetweenPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127373,7 +129875,7 @@ module.exports = BetweenPointsY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127408,7 +129910,7 @@ module.exports = BetweenY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127454,7 +129956,7 @@ module.exports = CounterClockwise; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127493,7 +129995,7 @@ module.exports = Normalize; /** * @author Richard Davey * @author @samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127523,7 +130025,7 @@ module.exports = Random; /** * @author Richard Davey * @author @samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127552,7 +130054,7 @@ module.exports = RandomDegrees; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127583,7 +130085,7 @@ module.exports = Reverse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127651,7 +130153,7 @@ module.exports = RotateTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127699,7 +130201,7 @@ module.exports = ShortestBetween; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127732,7 +130234,7 @@ module.exports = Wrap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127765,7 +130267,7 @@ module.exports = WrapDegrees; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127799,7 +130301,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127892,7 +130394,7 @@ module.exports = MATH_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127927,7 +130429,7 @@ module.exports = DistanceBetween; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127960,7 +130462,7 @@ module.exports = DistanceBetweenPoints; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127993,7 +130495,7 @@ module.exports = DistanceBetweenPointsSquared; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128028,7 +130530,7 @@ module.exports = ChebyshevDistance; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128063,7 +130565,7 @@ module.exports = DistancePower; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128098,7 +130600,7 @@ module.exports = SnakeDistance; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128133,7 +130635,7 @@ module.exports = DistanceSquared; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128161,7 +130663,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128243,7 +130745,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128275,7 +130777,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128316,7 +130818,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128348,7 +130850,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128372,7 +130874,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128418,7 +130920,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128483,7 +130985,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128527,7 +131029,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128551,7 +131053,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128580,7 +131082,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128616,7 +131118,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128645,7 +131147,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128669,7 +131171,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128698,7 +131200,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128734,7 +131236,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128763,7 +131265,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128787,7 +131289,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128843,7 +131345,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128906,7 +131408,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128962,7 +131464,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128986,7 +131488,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129015,7 +131517,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129051,7 +131553,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129080,7 +131582,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129104,7 +131606,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129137,7 +131639,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129166,7 +131668,7 @@ module.exports = Linear; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129180,7 +131682,7 @@ module.exports = __webpack_require__(43927); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129209,7 +131711,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129245,7 +131747,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129274,7 +131776,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129298,7 +131800,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129327,7 +131829,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129363,7 +131865,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129392,7 +131894,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129416,7 +131918,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129445,7 +131947,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129481,7 +131983,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129510,7 +132012,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129534,7 +132036,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129574,7 +132076,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129614,7 +132116,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129654,7 +132156,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129678,7 +132180,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129721,7 +132223,7 @@ module.exports = Stepped; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129739,7 +132241,7 @@ module.exports = __webpack_require__(52770); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129771,7 +132273,7 @@ module.exports = Ceil; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129806,7 +132308,7 @@ module.exports = Equal; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129838,7 +132340,7 @@ module.exports = Floor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129873,7 +132375,7 @@ module.exports = GreaterThan; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129908,7 +132410,7 @@ module.exports = LessThan; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129934,7 +132436,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130027,7 +132529,7 @@ module.exports = PhaserMath; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130067,7 +132569,7 @@ module.exports = BezierInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130125,7 +132627,7 @@ module.exports = CatmullRomInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130196,7 +132698,7 @@ module.exports = CubicBezierInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130244,7 +132746,7 @@ module.exports = LinearInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130304,7 +132806,7 @@ module.exports = QuadraticBezierInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130338,7 +132840,7 @@ module.exports = SmoothStepInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130372,7 +132874,7 @@ module.exports = SmootherStepInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130400,7 +132902,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130431,7 +132933,7 @@ module.exports = GetPowerOfTwo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130462,7 +132964,7 @@ module.exports = IsSizePowerOfTwo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130491,7 +132993,7 @@ module.exports = IsValuePowerOfTwo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130515,7 +133017,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131026,7 +133528,7 @@ module.exports = RandomDataGenerator; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131071,7 +133573,7 @@ module.exports = SnapCeil; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131116,7 +133618,7 @@ module.exports = SnapFloor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131160,7 +133662,7 @@ module.exports = SnapTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131184,7 +133686,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131278,7 +133780,7 @@ __webpack_require__.g.Phaser = Phaser; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131381,7 +133883,7 @@ module.exports = ArcadeImage; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132108,7 +134610,7 @@ module.exports = ArcadePhysics; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132213,7 +134715,7 @@ module.exports = ArcadeSprite; /** * @author Richard Davey * @author Benjamin D. Richards - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134843,7 +137345,7 @@ module.exports = Body; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135027,7 +137529,7 @@ module.exports = Collider; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135367,7 +137869,7 @@ module.exports = Factory; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135476,7 +137978,7 @@ module.exports = GetOverlapX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135585,7 +138087,7 @@ module.exports = GetOverlapY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135688,9 +138190,10 @@ var PhysicsGroup = new Class({ * This should be either `Phaser.Physics.Arcade.Image`, `Phaser.Physics.Arcade.Sprite`, or a class extending one of those. * * @name Phaser.Physics.Arcade.Group#classType - * @type {Phaser.Types.GameObjects.Group.GroupClassTypeConstructor} + * @type {function} * @default ArcadeSprite * @since 3.0.0 + * @see Phaser.Types.GameObjects.Group.GroupClassTypeConstructor */ config.classType = GetFastValue(config, 'classType', ArcadeSprite); @@ -135884,7 +138387,7 @@ module.exports = PhysicsGroup; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136302,7 +138805,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136720,7 +139223,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136741,12 +139244,13 @@ var ProcessX = __webpack_require__(22916); * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate. * @param {boolean} overlapOnly - If `true`, the bodies will only have their overlap data set and no separation will take place. * @param {number} bias - A value to add to the delta value during overlap checking. Used to prevent sprite tunneling. + * @param {number} [overlap] - If given then this value will be used as the overlap and no check will be run. * * @return {boolean} `true` if the two bodies overlap vertically, otherwise `false`. */ -var SeparateX = function (body1, body2, overlapOnly, bias) +var SeparateX = function (body1, body2, overlapOnly, bias, overlap) { - var overlap = GetOverlapX(body1, body2, overlapOnly, bias); + if (overlap === undefined) { overlap = GetOverlapX(body1, body2, overlapOnly, bias); } var body1Immovable = body1.immovable; var body2Immovable = body2.immovable; @@ -136792,7 +139296,7 @@ module.exports = SeparateX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136813,12 +139317,13 @@ var ProcessY = __webpack_require__(67050); * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate. * @param {boolean} overlapOnly - If `true`, the bodies will only have their overlap data set and no separation will take place. * @param {number} bias - A value to add to the delta value during overlap checking. Used to prevent sprite tunneling. + * @param {number} [overlap] - If given then this value will be used as the overlap and no check will be run. * * @return {boolean} `true` if the two bodies overlap vertically, otherwise `false`. */ -var SeparateY = function (body1, body2, overlapOnly, bias) +var SeparateY = function (body1, body2, overlapOnly, bias, overlap) { - var overlap = GetOverlapY(body1, body2, overlapOnly, bias); + if (overlap === undefined) { overlap = GetOverlapY(body1, body2, overlapOnly, bias); } var body1Immovable = body1.immovable; var body2Immovable = body2.immovable; @@ -136864,7 +139369,7 @@ module.exports = SeparateY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137914,7 +140419,7 @@ module.exports = StaticBody; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138114,7 +140619,7 @@ module.exports = StaticPhysicsGroup; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138125,6 +140630,7 @@ var Class = __webpack_require__(56694); var Collider = __webpack_require__(3909); var CONST = __webpack_require__(47401); var DistanceBetween = __webpack_require__(53996); +var DistanceBetweenPoints = __webpack_require__(92951); var EventEmitter = __webpack_require__(6659); var Events = __webpack_require__(27037); var FuzzyEqual = __webpack_require__(88456); @@ -139450,7 +141956,7 @@ var World = new Class({ body.velocity.set(velocityX, velocityY); - if (maxSpeed > -1 && speed > maxSpeed) + if (maxSpeed > -1 && body.velocity.length() > maxSpeed) { body.velocity.normalize().scale(maxSpeed); speed = maxSpeed; @@ -139477,6 +141983,12 @@ var World = new Class({ */ separate: function (body1, body2, processCallback, callbackContext, overlapOnly) { + var overlapX; + var overlapY; + + var result = false; + var runSeparation = true; + if ( !body1.enable || !body2.enable || @@ -139484,80 +141996,71 @@ var World = new Class({ body2.checkCollision.none || !this.intersects(body1, body2)) { - return false; + return result; } // They overlap. Is there a custom process callback? If it returns true then we can carry on, otherwise we should abort. if (processCallback && processCallback.call(callbackContext, body1.gameObject, body2.gameObject) === false) { - return false; - } - - // Circle vs. Circle quick bail out - if (body1.isCircle && body2.isCircle) - { - return this.separateCircle(body1, body2, overlapOnly); + return result; } - // We define the behavior of bodies in a collision circle and rectangle - // If a collision occurs in the corner points of the rectangle, the body behave like circles - - // Either body1 or body2 is a circle - if (body1.isCircle !== body2.isCircle) + // Circle vs. Circle, or Circle vs. Rect + if (body1.isCircle || body2.isCircle) { - var bodyRect = (body1.isCircle) ? body2 : body1; - var bodyCircle = (body1.isCircle) ? body1 : body2; + var circleResults = this.separateCircle(body1, body2, overlapOnly); - var rect = { - x: bodyRect.x, - y: bodyRect.y, - right: bodyRect.right, - bottom: bodyRect.bottom - }; - - var circle = bodyCircle.center; - - if (circle.y < rect.y || circle.y > rect.bottom) + if (circleResults.result) { - if (circle.x < rect.x || circle.x > rect.right) - { - return this.separateCircle(body1, body2, overlapOnly); - } + // We got a satisfactory result from the separateCircle method + result = true; + runSeparation = false; + } + else + { + // Further processing required + overlapX = circleResults.x; + overlapY = circleResults.y; + runSeparation = true; } } - var resultX = false; - var resultY = false; - - // Do we separate on x first or y first or both? - if (overlapOnly) + if (runSeparation) { - // No separation but we need to calculate overlapX, overlapY, etc. - resultX = SeparateX(body1, body2, overlapOnly, this.OVERLAP_BIAS); - resultY = SeparateY(body1, body2, overlapOnly, this.OVERLAP_BIAS); - } - else if (this.forceX || Math.abs(this.gravity.y + body1.gravity.y) < Math.abs(this.gravity.x + body1.gravity.x)) - { - resultX = SeparateX(body1, body2, overlapOnly, this.OVERLAP_BIAS); + var resultX = false; + var resultY = false; + var bias = this.OVERLAP_BIAS; - // Are they still intersecting? Let's do the other axis then - if (this.intersects(body1, body2)) + // Do we separate on x first or y first or both? + if (overlapOnly) { - resultY = SeparateY(body1, body2, overlapOnly, this.OVERLAP_BIAS); + // No separation but we need to calculate overlapX, overlapY, etc. + resultX = SeparateX(body1, body2, overlapOnly, bias, overlapX); + resultY = SeparateY(body1, body2, overlapOnly, bias, overlapY); } - } - else - { - resultY = SeparateY(body1, body2, overlapOnly, this.OVERLAP_BIAS); + else if (this.forceX || Math.abs(this.gravity.y + body1.gravity.y) < Math.abs(this.gravity.x + body1.gravity.x)) + { + resultX = SeparateX(body1, body2, overlapOnly, bias, overlapX); - // Are they still intersecting? Let's do the other axis then - if (this.intersects(body1, body2)) + // Are they still intersecting? Let's do the other axis then + if (this.intersects(body1, body2)) + { + resultY = SeparateY(body1, body2, overlapOnly, bias, overlapY); + } + } + else { - resultX = SeparateX(body1, body2, overlapOnly, this.OVERLAP_BIAS); + resultY = SeparateY(body1, body2, overlapOnly, bias, overlapY); + + // Are they still intersecting? Let's do the other axis then + if (this.intersects(body1, body2)) + { + resultX = SeparateX(body1, body2, overlapOnly, bias, overlapX); + } } - } - var result = (resultX || resultY); + result = (resultX || resultY); + } if (result) { @@ -139588,140 +142091,209 @@ var World = new Class({ * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to be separated. * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to be separated. * @param {boolean} [overlapOnly] - If this a collide or overlap check? - * @param {number} [bias] - A small value added to the calculations. * * @return {boolean} True if separation occurred, otherwise false. */ - separateCircle: function (body1, body2, overlapOnly, bias) + separateCircle: function (body1, body2, overlapOnly) { - // Set the bounding box overlap values into the bodies themselves (hence we don't use the return values here) - GetOverlapX(body1, body2, false, bias); - GetOverlapY(body1, body2, false, bias); + // Set the AABB overlap, blocked and touching values into the bodies (we don't use the return values here) + GetOverlapX(body1, body2, false, 0); + GetOverlapY(body1, body2, false, 0); + + var body1IsCircle = body1.isCircle; + var body2IsCircle = body2.isCircle; + var body1Center = body1.center; + var body2Center = body2.center; + var body1Immovable = body1.immovable; + var body2Immovable = body2.immovable; + var body1Velocity = body1.velocity; + var body2Velocity = body2.velocity; var overlap = 0; + var twoCircles = true; - if (body1.isCircle !== body2.isCircle) + if (body1IsCircle !== body2IsCircle) { - var rect = { - x: (body2.isCircle) ? body1.position.x : body2.position.x, - y: (body2.isCircle) ? body1.position.y : body2.position.y, - right: (body2.isCircle) ? body1.right : body2.right, - bottom: (body2.isCircle) ? body1.bottom : body2.bottom - }; + twoCircles = false; - var circle = { - x: (body1.isCircle) ? body1.center.x : body2.center.x, - y: (body1.isCircle) ? body1.center.y : body2.center.y, - radius: (body1.isCircle) ? body1.halfWidth : body2.halfWidth - }; + var circleX = body1Center.x; + var circleY = body1Center.y; + var circleRadius = body1.halfWidth; + + var rectX = body2.position.x; + var rectY = body2.position.y; + var rectRight = body2.right; + var rectBottom = body2.bottom; + + if (body2IsCircle) + { + circleX = body2Center.x; + circleY = body2Center.y; + circleRadius = body2.halfWidth; + + rectX = body1.position.x; + rectY = body1.position.y; + rectRight = body1.right; + rectBottom = body1.bottom; + } - if (circle.y < rect.y) + if (circleY < rectY) { - if (circle.x < rect.x) + if (circleX < rectX) { - overlap = DistanceBetween(circle.x, circle.y, rect.x, rect.y) - circle.radius; + overlap = DistanceBetween(circleX, circleY, rectX, rectY) - circleRadius; } - else if (circle.x > rect.right) + else if (circleX > rectRight) { - overlap = DistanceBetween(circle.x, circle.y, rect.right, rect.y) - circle.radius; + overlap = DistanceBetween(circleX, circleY, rectRight, rectY) - circleRadius; } } - else if (circle.y > rect.bottom) + else if (circleY > rectBottom) { - if (circle.x < rect.x) + if (circleX < rectX) { - overlap = DistanceBetween(circle.x, circle.y, rect.x, rect.bottom) - circle.radius; + overlap = DistanceBetween(circleX, circleY, rectX, rectBottom) - circleRadius; } - else if (circle.x > rect.right) + else if (circleX > rectRight) { - overlap = DistanceBetween(circle.x, circle.y, rect.right, rect.bottom) - circle.radius; + overlap = DistanceBetween(circleX, circleY, rectRight, rectBottom) - circleRadius; } } + // If a collision occurs in the corner points of the rectangle + // then the bodies behave like circles overlap *= -1; } else { - overlap = (body1.halfWidth + body2.halfWidth) - DistanceBetween(body1.center.x, body1.center.y, body2.center.x, body2.center.y); + overlap = (body1.halfWidth + body2.halfWidth) - DistanceBetweenPoints(body1Center, body2Center); } body1.overlapR = overlap; body2.overlapR = overlap; - // Can't separate two immovable bodies, or a body with its own custom separation logic - if (overlapOnly || overlap === 0 || (body1.immovable && body2.immovable) || body1.customSeparateX || body2.customSeparateX) - { - if (overlap !== 0 && (body1.onOverlap || body2.onOverlap)) - { - this.emit(Events.OVERLAP, body1.gameObject, body2.gameObject, body1, body2); - } + var angle = AngleBetweenPoints(body1Center, body2Center); + var overlapX = (overlap + MATH_CONST.EPSILON) * Math.cos(angle); + var overlapY = (overlap + MATH_CONST.EPSILON) * Math.sin(angle); - // return true if there was some overlap, otherwise false - return (overlap !== 0); - } + console.log('overlap', overlap, 'xy', overlapX, overlapY); - var dx = body1.center.x - body2.center.x; - var dy = body1.center.y - body2.center.y; - var d = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)); - var nx = ((body2.center.x - body1.center.x) / d) || 0; - var ny = ((body2.center.y - body1.center.y) / d) || 0; - var p = 2 * (body1.velocity.x * nx + body1.velocity.y * ny - body2.velocity.x * nx - body2.velocity.y * ny) / (body1.mass + body2.mass); + var results = { overlap: overlap, result: false, x: overlapX, y: overlapY }; - if (body1.immovable || body2.immovable) + // We know the AABBs already intersect before we enter this method + if (overlapOnly && (!twoCircles || (twoCircles && overlap !== 0))) { - p *= 2; - } + // Now we know the rect vs circle overlaps, or two circles do + results.result = true; - if (!body1.immovable) - { - body1.velocity.x = (body1.velocity.x - p / body1.mass * nx); - body1.velocity.y = (body1.velocity.y - p / body1.mass * ny); + return results; } - if (!body2.immovable) + // Can't separate (in this method): + // Two immovable bodies + // A body with its own custom separation logic + // A circle vs. a rect with a face-on collision + if ((!twoCircles && overlap === 0) || (body1Immovable && body2Immovable) || body1.customSeparateX || body2.customSeparateX) { - body2.velocity.x = (body2.velocity.x + p / body2.mass * nx); - body2.velocity.y = (body2.velocity.y + p / body2.mass * ny); - } + // Let SeparateX / SeparateY handle this + results.x = undefined; + results.y = undefined; - if (!body1.immovable && !body2.immovable) - { - overlap /= 2; + return results; } - // Note: This is inadequate for circle-rectangle separation + // If we get this far we either have circle vs. circle + // or circle vs. rect with corner collision - var angle = AngleBetweenPoints(body1.center, body2.center); - var overlapX = (overlap + MATH_CONST.EPSILON) * Math.cos(angle); - var overlapY = (overlap + MATH_CONST.EPSILON) * Math.sin(angle); + var deadlock = (!body1.pushable && !body2.pushable); - if (!body1.immovable) + if (twoCircles) { - body1.x -= overlapX; - body1.y -= overlapY; + var dx = body1Center.x - body2Center.x; + var dy = body1Center.y - body2Center.y; + var d = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)); + var nx = ((body2Center.x - body1Center.x) / d) || 0; + var ny = ((body2Center.y - body1Center.y) / d) || 0; + var p = 2 * (body1Velocity.x * nx + body1Velocity.y * ny - body2Velocity.x * nx - body2Velocity.y * ny) / (body1.mass + body2.mass); - body1.updateCenter(); - } + if (body1Immovable || body2Immovable) + { + p *= 2; + } - if (!body2.immovable) - { - body2.x += overlapX; - body2.y += overlapY; + console.log('circ vel', body1Velocity, body2Velocity, 'p', p, 'nxy', nx, ny); - body2.updateCenter(); - } + if (!body1Immovable) + { + body1Velocity.x = (body1Velocity.x - p / body1.mass * nx); + body1Velocity.y = (body1Velocity.y - p / body1.mass * ny); + body1Velocity.multiply(body1.bounce); + + console.log('body1', body1Velocity, 'y', body1.y); + } + + if (!body2Immovable) + { + body2Velocity.x = (body2Velocity.x + p / body2.mass * nx); + body2Velocity.y = (body2Velocity.y + p / body2.mass * ny); + body2Velocity.multiply(body2.bounce); + + console.log('body2', body2Velocity, 'y', body2.y); + } + + if (!body1Immovable && !body2Immovable) + { + overlapX *= 0.5; + overlapY *= 0.5; + } + + if (!body1Immovable) + { + body1.x -= overlapX; + body1.y -= overlapY; + + body1.updateCenter(); + + console.log('body1 sep', body1.y); + } + + if (!body2Immovable) + { + body2.x += overlapX; + body2.y += overlapY; - body1.velocity.x *= body1.bounce.x; - body1.velocity.y *= body1.bounce.y; - body2.velocity.x *= body2.bounce.x; - body2.velocity.y *= body2.bounce.y; + body2.updateCenter(); + } - if (body1.onCollide || body2.onCollide) + results.result = true; + } + else { - this.emit(Events.COLLIDE, body1.gameObject, body2.gameObject, body1, body2); + // Circle vs. Rect + // We'll only move the circle (if we can) and let + // the runSeparation handle the rectangle + + if (!body1Immovable || body1.pushable || deadlock) + { + body1.x -= overlapX; + body1.y -= overlapY; + + body1.updateCenter(); + } + else if (!body2Immovable || body2.pushable || deadlock) + { + body2.x += overlapX; + body2.y += overlapY; + + body2.updateCenter(); + } + + // Let SeparateX / SeparateY handle this further + results.x = undefined; + results.y = undefined; } - return true; + return results; }, /** @@ -139746,10 +142318,10 @@ var World = new Class({ { // Rect vs. Rect return !( - body1.right <= body2.position.x || - body1.bottom <= body2.position.y || - body1.position.x >= body2.right || - body1.position.y >= body2.bottom + body1.right <= body2.left || + body1.bottom <= body2.top || + body1.left >= body2.right || + body1.top >= body2.bottom ); } else if (body1.isCircle) @@ -139757,7 +142329,7 @@ var World = new Class({ if (body2.isCircle) { // Circle vs. Circle - return DistanceBetween(body1.center.x, body1.center.y, body2.center.x, body2.center.y) <= (body1.halfWidth + body2.halfWidth); + return DistanceBetweenPoints(body1.center, body2.center) <= (body1.halfWidth + body2.halfWidth); } else { @@ -140315,8 +142887,8 @@ var World = new Class({ return false; } - var x = body.position.x; - var y = body.position.y; + var x = body.x; + var y = body.y; var w = body.width; var h = body.height; @@ -140574,7 +143146,7 @@ module.exports = World; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140650,7 +143222,7 @@ module.exports = Acceleration; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140733,7 +143305,7 @@ module.exports = Angular; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140834,7 +143406,7 @@ module.exports = Bounce; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140962,7 +143534,7 @@ module.exports = Debug; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141096,7 +143668,7 @@ module.exports = Drag; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141110,15 +143682,16 @@ var Enable = { /** * Enables this Game Object's Body. + * If you reset the Body you must also pass `x` and `y`. * * @method Phaser.Physics.Arcade.Components.Enable#enableBody * @since 3.0.0 * - * @param {boolean} reset - Also reset the Body and place it at (x, y). - * @param {number} x - The horizontal position to place the Game Object and Body. - * @param {number} y - The horizontal position to place the Game Object and Body. - * @param {boolean} enableGameObject - Also activate this Game Object. - * @param {boolean} showGameObject - Also show this Game Object. + * @param {boolean} [reset] - Also reset the Body and place the Game Object at (x, y). + * @param {number} [x] - The horizontal position to place the Game Object, if `reset` is true. + * @param {number} [y] - The horizontal position to place the Game Object, if `reset` is true. + * @param {boolean} [enableGameObject] - Also set this Game Object's `active` to true. + * @param {boolean} [showGameObject] - Also set this Game Object's `visible` to true. * * @return {this} This Game Object. * @@ -141157,8 +143730,8 @@ var Enable = { * @method Phaser.Physics.Arcade.Components.Enable#disableBody * @since 3.0.0 * - * @param {boolean} [disableGameObject=false] - Also deactivate this Game Object. - * @param {boolean} [hideGameObject=false] - Also hide this Game Object. + * @param {boolean} [disableGameObject=false] - Also set this Game Object's `active` to false. + * @param {boolean} [hideGameObject=false] - Also set this Game Object's `visible` to false. * * @return {this} This Game Object. * @@ -141221,7 +143794,7 @@ module.exports = Enable; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141310,7 +143883,7 @@ module.exports = Friction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141389,7 +143962,7 @@ module.exports = Gravity; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141436,7 +144009,7 @@ module.exports = Immovable; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141632,7 +144205,7 @@ module.exports = OverlapRect; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141681,7 +144254,7 @@ module.exports = Pushable; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141785,7 +144358,7 @@ module.exports = Size; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141885,7 +144458,7 @@ module.exports = Velocity; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141921,7 +144494,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142051,7 +144624,7 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142086,7 +144659,7 @@ module.exports = 'collide'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142121,7 +144694,7 @@ module.exports = 'overlap'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142146,7 +144719,7 @@ module.exports = 'pause'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142171,7 +144744,7 @@ module.exports = 'resume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142205,7 +144778,7 @@ module.exports = 'tilecollide'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142239,7 +144812,7 @@ module.exports = 'tileoverlap'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142273,7 +144846,7 @@ module.exports = 'worldbounds'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142303,7 +144876,7 @@ module.exports = 'worldstep'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142332,7 +144905,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142378,7 +144951,7 @@ module.exports = Arcade; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142420,7 +144993,7 @@ module.exports = ProcessTileCallbacks; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142469,7 +145042,7 @@ module.exports = ProcessTileSeparationX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142518,7 +145091,7 @@ module.exports = ProcessTileSeparationY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142639,7 +145212,7 @@ module.exports = SeparateTile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142730,7 +145303,7 @@ module.exports = TileCheckX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142821,7 +145394,7 @@ module.exports = TileCheckY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142858,7 +145431,7 @@ module.exports = TileIntersectsBody; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142888,7 +145461,7 @@ module.exports = Tilemap; /** * @author Richard Davey -* @copyright 2022 Photon Storm Ltd. +* @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ @@ -143019,7 +145592,7 @@ module.exports = BasePlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143122,7 +145695,7 @@ module.exports = DefaultPlugins; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143332,7 +145905,7 @@ module.exports = PluginCache; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144240,7 +146813,7 @@ module.exports = PluginManager; /** * @author Richard Davey -* @copyright 2022 Photon Storm Ltd. +* @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ @@ -144383,7 +146956,7 @@ module.exports = ScenePlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144409,7 +146982,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144749,7 +147322,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144805,7 +147378,7 @@ module.exports = ScaleModes; /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145672,7 +148245,7 @@ module.exports = CanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145696,7 +148269,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145761,7 +148334,7 @@ module.exports = GetBlendModes; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145830,7 +148403,7 @@ module.exports = SetTransform; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145854,7 +148427,7 @@ module.exports = 'postrender'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145879,7 +148452,7 @@ module.exports = 'prerender'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145907,7 +148480,7 @@ module.exports = 'render'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145934,7 +148507,7 @@ module.exports = 'resize'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145959,7 +148532,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -145988,7 +148561,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146085,7 +148658,7 @@ module.exports = CanvasSnapshot; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146144,7 +148717,7 @@ var WebGLSnapshot = function (sourceContext, config) gl.readPixels(x, bufferHeight - y - height, width, height, gl.RGBA, gl.UNSIGNED_BYTE, pixels); var canvas = CanvasPool.createWebGL(this, width, height); - var ctx = canvas.getContext('2d'); + var ctx = canvas.getContext('2d', { willReadFrequently: true }); var imageData = ctx.getImageData(0, 0, width, height); @@ -146197,7 +148770,7 @@ module.exports = WebGLSnapshot; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146220,7 +148793,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147568,7 +150141,7 @@ module.exports = PipelineManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147941,7 +150514,7 @@ module.exports = RenderTarget; * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @author Matthew Groves <@doormat> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -148119,7 +150692,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150709,7 +153282,7 @@ module.exports = WebGLPipeline; /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -153600,7 +156173,7 @@ module.exports = WebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154791,7 +157364,7 @@ module.exports = WebGLShader; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154872,7 +157445,7 @@ module.exports = WEBGL_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -154912,7 +157485,7 @@ module.exports = WebGL; /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155063,7 +157636,7 @@ module.exports = BitmapMaskPipeline; /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155637,7 +158210,7 @@ module.exports = LightPipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -155757,7 +158330,7 @@ module.exports = MobilePipeline; /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156751,7 +159324,7 @@ module.exports = MultiPipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -156933,7 +159506,7 @@ module.exports = PointLightPipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157424,7 +159997,7 @@ module.exports = PostFXPipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157492,7 +160065,7 @@ module.exports = RopePipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -157570,7 +160143,7 @@ module.exports = SinglePipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -158406,7 +160979,7 @@ module.exports = SpriteFXPipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159203,7 +161776,7 @@ module.exports = UtilityPipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159321,7 +161894,7 @@ module.exports = PIPELINE_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159347,7 +161920,7 @@ module.exports = 'pipelineafterflush'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159373,7 +161946,7 @@ module.exports = 'pipelinebeforeflush'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159398,7 +161971,7 @@ module.exports = 'pipelinebind'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159422,7 +161995,7 @@ module.exports = 'pipelineboot'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159446,7 +162019,7 @@ module.exports = 'pipelinedestroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159471,7 +162044,7 @@ module.exports = 'pipelinerebind'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159498,7 +162071,7 @@ module.exports = 'pipelineresize'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -159526,7 +162099,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -160123,7 +162696,7 @@ module.exports = [ /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161896,7 +164469,7 @@ module.exports = ScaleManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161983,7 +164556,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162037,7 +164610,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162136,7 +164709,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162211,7 +164784,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162234,7 +164807,7 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162255,7 +164828,7 @@ module.exports = 'enterfullscreen'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162276,7 +164849,7 @@ module.exports = 'fullscreenfailed'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162297,7 +164870,7 @@ module.exports = 'fullscreenunsupported'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162319,7 +164892,7 @@ module.exports = 'leavefullscreen'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162344,7 +164917,7 @@ module.exports = 'orientationchange'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162376,7 +164949,7 @@ module.exports = 'resize'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162403,7 +164976,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162460,7 +165033,7 @@ module.exports = Scale; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162523,7 +165096,7 @@ module.exports = GetPhysicsPlugins; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162571,7 +165144,7 @@ module.exports = GetScenePlugins; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162634,7 +165207,7 @@ module.exports = InjectionMap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162954,7 +165527,7 @@ module.exports = Scene; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163255,8 +165828,6 @@ var SceneManager = new Class({ // Clear the pending lists this._start.length = 0; this._pending.length = 0; - - return; } for (i = 0; i < this._queue.length; i++) @@ -163529,6 +166100,11 @@ var SceneManager = new Class({ { sys.step(time, delta); } + + if (sys.scenePlugin._target) + { + sys.scenePlugin.step(time, delta); + } } }, @@ -164710,7 +167286,7 @@ module.exports = SceneManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -165060,8 +167636,6 @@ var ScenePlugin = new Class({ this.systems.events.emit(Events.TRANSITION_OUT, target, duration); - this.systems.events.on(Events.UPDATE, this.step, this); - return true; }, @@ -165128,9 +167702,6 @@ var ScenePlugin = new Class({ var targetSys = this._target.sys; var targetSettings = this._target.sys.settings; - // Stop the step - this.systems.events.off(Events.UPDATE, this.step, this); - // Notify target scene targetSys.events.emit(Events.TRANSITION_COMPLETE, this.scene); @@ -165802,7 +168373,6 @@ var ScenePlugin = new Class({ var eventEmitter = this.systems.events; eventEmitter.off(Events.SHUTDOWN, this.shutdown, this); - eventEmitter.off(Events.POST_UPDATE, this.step, this); eventEmitter.off(Events.TRANSITION_OUT); }, @@ -165841,7 +168411,7 @@ module.exports = ScenePlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -165938,7 +168508,7 @@ module.exports = Settings; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -166758,7 +169328,7 @@ module.exports = Systems; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -166882,7 +169452,7 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -166910,7 +169480,7 @@ module.exports = 'addedtoscene'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -166937,7 +169507,7 @@ module.exports = 'boot'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -166968,7 +169538,7 @@ module.exports = 'create'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -166997,7 +169567,7 @@ module.exports = 'destroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167026,7 +169596,7 @@ module.exports = 'pause'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167106,7 +169676,7 @@ module.exports = 'prerender'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167146,7 +169716,7 @@ module.exports = 'preupdate'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167176,7 +169746,7 @@ module.exports = 'ready'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167204,7 +169774,7 @@ module.exports = 'removedfromscene'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167244,7 +169814,7 @@ module.exports = 'render'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167273,7 +169843,7 @@ module.exports = 'resume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167305,7 +169875,7 @@ module.exports = 'shutdown'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167334,7 +169904,7 @@ module.exports = 'sleep'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167361,7 +169931,7 @@ module.exports = 'start'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167399,7 +169969,7 @@ module.exports = 'transitioncomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167438,7 +170008,7 @@ module.exports = 'transitioninit'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167474,7 +170044,7 @@ module.exports = 'transitionout'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167516,7 +170086,7 @@ module.exports = 'transitionstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167553,7 +170123,7 @@ module.exports = 'transitionwake'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167593,7 +170163,7 @@ module.exports = 'update'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167622,7 +170192,7 @@ module.exports = 'wake'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167665,7 +170235,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -167702,7 +170272,7 @@ module.exports = Scene; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -168204,7 +170774,7 @@ module.exports = BaseSound; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -168954,7 +171524,7 @@ module.exports = BaseSoundManager; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169006,7 +171576,7 @@ module.exports = SoundManagerCreator; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169039,7 +171609,7 @@ module.exports = 'complete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169073,7 +171643,7 @@ module.exports = 'decodedall'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169105,7 +171675,7 @@ module.exports = 'decoded'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169139,7 +171709,7 @@ module.exports = 'destroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169174,7 +171744,7 @@ module.exports = 'detune'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169204,7 +171774,7 @@ module.exports = 'detune'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169233,7 +171803,7 @@ module.exports = 'mute'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169263,7 +171833,7 @@ module.exports = 'rate'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169292,7 +171862,7 @@ module.exports = 'volume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169328,7 +171898,7 @@ module.exports = 'looped'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169364,7 +171934,7 @@ module.exports = 'loop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169399,7 +171969,7 @@ module.exports = 'mute'; /** * @author pi-kei - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169434,7 +172004,7 @@ module.exports = 'pan'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169463,7 +172033,7 @@ module.exports = 'pauseall'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169497,7 +172067,7 @@ module.exports = 'pause'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169530,7 +172100,7 @@ module.exports = 'play'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169565,7 +172135,7 @@ module.exports = 'rate'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169594,7 +172164,7 @@ module.exports = 'resumeall'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169629,7 +172199,7 @@ module.exports = 'resume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169664,7 +172234,7 @@ module.exports = 'seek'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169693,7 +172263,7 @@ module.exports = 'stopall'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169727,7 +172297,7 @@ module.exports = 'stop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169756,7 +172326,7 @@ module.exports = 'unlocked'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169791,7 +172361,7 @@ module.exports = 'volume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -169837,7 +172407,7 @@ module.exports = { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -170803,7 +173373,7 @@ module.exports = HTML5AudioSound; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -171273,7 +173843,7 @@ module.exports = HTML5AudioSoundManager; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -171310,7 +173880,7 @@ module.exports = { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -171809,7 +174379,7 @@ module.exports = NoAudioSound; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -172176,7 +174746,7 @@ module.exports = NoAudioSoundManager; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173166,7 +175736,7 @@ module.exports = WebAudioSound; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173660,7 +176230,7 @@ module.exports = WebAudioSoundManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174508,7 +177078,7 @@ module.exports = List; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174884,7 +177454,7 @@ module.exports = Map; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175269,7 +177839,7 @@ module.exports = ProcessQueue; /** * @author Vladimir Agafonkin * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175881,7 +178451,7 @@ module.exports = rbush; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176336,7 +178906,7 @@ module.exports = Set; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177115,7 +179685,7 @@ module.exports = Size; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177144,7 +179714,7 @@ module.exports = 'add'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177173,7 +179743,7 @@ module.exports = 'remove'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177196,7 +179766,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177224,7 +179794,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177860,7 +180430,7 @@ module.exports = CanvasTexture; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -178030,7 +180600,7 @@ var DynamicTexture = new Class({ * An internal Camera that can be used to move around this Dynamic Texture. * * Control it just like you would any Scene Camera. The difference is that it only impacts - * the placement of Game Objects that you then draw to this texture. + * the placement of **Game Objects** (not textures) that you then draw to this texture. * * You can scroll, zoom and rotate this Camera. * @@ -179416,7 +181986,7 @@ module.exports = DynamicTexture; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180274,7 +182844,7 @@ module.exports = Frame; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180806,7 +183376,7 @@ module.exports = Texture; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -182370,7 +184940,7 @@ module.exports = TextureManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -182734,7 +185304,7 @@ module.exports = TextureSource; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -182779,7 +185349,7 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -182807,7 +185377,7 @@ module.exports = 'addtexture'; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -182834,7 +185404,7 @@ module.exports = 'addtexture-'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -182862,7 +185432,7 @@ module.exports = 'onerror'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -182893,7 +185463,7 @@ module.exports = 'onload'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -182918,7 +185488,7 @@ module.exports = 'ready'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -182948,7 +185518,7 @@ module.exports = 'removetexture'; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -182976,7 +185546,7 @@ module.exports = 'removetexture-'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -183004,7 +185574,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -183059,7 +185629,7 @@ module.exports = Textures; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -183141,7 +185711,7 @@ module.exports = AtlasXML; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -183177,7 +185747,7 @@ module.exports = Canvas; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -183213,7 +185783,7 @@ module.exports = Image; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -183330,7 +185900,7 @@ module.exports = JSONArray; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -183852,7 +186422,7 @@ module.exports = PVRParser; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -183984,7 +186554,7 @@ module.exports = SpriteSheet; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -184176,7 +186746,7 @@ module.exports = SpriteSheetFromAtlas; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -184347,7 +186917,7 @@ TextureImporter: /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -184378,7 +186948,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -184434,7 +187004,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -184841,7 +187411,7 @@ module.exports = ObjectHelper; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -184928,7 +187498,7 @@ module.exports = ParseToTilemap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185862,7 +188432,7 @@ module.exports = Tile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186732,7 +189302,7 @@ var Tilemap = new Class({ * @since 3.0.0 * * @param {(number|array)} indexes - The tile index, or array of indexes, to create Sprites from. - * @param {(number|array)} replacements - The tile index, or array of indexes, to change a converted + * @param {?(number|array)} replacements - The tile index, or array of indexes, to change a converted * tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a * one-to-one mapping with the indexes array. * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e. scene.make.sprite). @@ -188517,7 +191087,7 @@ module.exports = Tilemap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -188562,7 +191132,7 @@ GameObjectCreator.register('tilemap', function (config) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -188629,7 +191199,7 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -189072,7 +191642,7 @@ var TilemapLayer = new Class({ * @since 3.50.0 * * @param {(number|array)} indexes - The tile index, or array of indexes, to create Sprites from. - * @param {(number|array)} replacements - The tile index, or array of indexes, to change a converted + * @param {?(number|array)} replacements - The tile index, or array of indexes, to change a converted * tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a * one-to-one mapping with the indexes array. * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} [spriteConfig] - The config object to pass into the Sprite creator (i.e. @@ -190094,7 +192664,7 @@ module.exports = TilemapLayer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190238,7 +192808,7 @@ module.exports = TilemapLayerCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190271,7 +192841,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190388,7 +192958,7 @@ module.exports = TilemapLayerWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190809,7 +193379,7 @@ module.exports = Tileset; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190904,7 +193474,7 @@ module.exports = CalculateFacesAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190970,7 +193540,7 @@ module.exports = CalculateFacesWithin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191017,7 +193587,7 @@ module.exports = CheckIsoBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191113,7 +193683,7 @@ module.exports = Copy; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191130,7 +193700,7 @@ var ReplaceByIndex = __webpack_require__(51202); * @since 3.0.0 * * @param {(number|number[])} indexes - The tile index, or array of indexes, to create Sprites from. - * @param {(number|number[])} replacements - The tile index, or array of indexes, to change a converted tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a one-to-one mapping with the indexes array. + * @param {?(number|number[])} replacements - The tile index, or array of indexes, to change a converted tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a one-to-one mapping with the indexes array. * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e. scene.make.sprite). * @param {Phaser.Scene} scene - The Scene to create the Sprites within. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to use when determining the world XY @@ -191201,7 +193771,7 @@ module.exports = CreateFromTiles; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191258,7 +193828,7 @@ module.exports = CullBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191314,7 +193884,7 @@ module.exports = CullTiles; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191368,7 +193938,7 @@ module.exports = Fill; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191412,7 +193982,7 @@ module.exports = FilterTiles; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191499,7 +194069,7 @@ module.exports = FindByIndex; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191551,7 +194121,7 @@ module.exports = FindTile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191598,7 +194168,7 @@ module.exports = ForEachTile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191653,7 +194223,7 @@ module.exports = GetCullTilesFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191709,7 +194279,7 @@ module.exports = GetTileAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191749,7 +194319,7 @@ module.exports = GetTileAtWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191814,7 +194384,7 @@ module.exports = GetTileCorners; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191867,7 +194437,7 @@ module.exports = GetTileCornersFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191907,7 +194477,7 @@ module.exports = GetTileToWorldXFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191962,7 +194532,7 @@ module.exports = GetTileToWorldXYFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192007,7 +194577,7 @@ module.exports = GetTileToWorldYFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192110,7 +194680,7 @@ module.exports = GetTilesWithin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192226,7 +194796,7 @@ module.exports = GetTilesWithinShape; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192281,7 +194851,7 @@ module.exports = GetTilesWithinWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192323,7 +194893,7 @@ module.exports = GetWorldToTileXFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192378,7 +194948,7 @@ module.exports = GetWorldToTileXYFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192423,7 +194993,7 @@ module.exports = GetWorldToTileYFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192466,7 +195036,7 @@ module.exports = HasTileAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192509,7 +195079,7 @@ module.exports = HasTileAtWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192566,7 +195136,7 @@ module.exports = HexagonalCullBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192618,7 +195188,7 @@ module.exports = HexagonalCullTiles; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192683,7 +195253,7 @@ module.exports = HexagonalGetTileCorners; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192754,7 +195324,7 @@ module.exports = HexagonalTileToWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192854,7 +195424,7 @@ module.exports = HexagonalWorldToTileXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192885,7 +195455,7 @@ module.exports = IsInLayerBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193034,7 +195604,7 @@ module.exports = IsometricCullTiles; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193096,7 +195666,7 @@ module.exports = IsometricTileToWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193179,7 +195749,7 @@ module.exports = IsometricWorldToTileXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193278,7 +195848,7 @@ module.exports = PutTileAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193322,7 +195892,7 @@ module.exports = PutTileAtWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193390,7 +195960,7 @@ module.exports = PutTilesAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193449,7 +196019,7 @@ module.exports = Randomize; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193512,7 +196082,7 @@ module.exports = RemoveTileAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193554,7 +196124,7 @@ module.exports = RemoveTileAtWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193779,7 +196349,7 @@ for (var q = 0; q <= 9; q++) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193824,7 +196394,7 @@ module.exports = ReplaceByIndex; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193951,7 +196521,7 @@ module.exports = RunCull; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194023,7 +196593,7 @@ module.exports = SetCollision; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194100,7 +196670,7 @@ module.exports = SetCollisionBetween; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194162,7 +196732,7 @@ module.exports = SetCollisionByExclusion; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194238,7 +196808,7 @@ module.exports = SetCollisionByProperty; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194298,7 +196868,7 @@ module.exports = SetCollisionFromCollisionGroup; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194337,7 +196907,7 @@ module.exports = SetLayerCollisionIndex; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194373,7 +196943,7 @@ module.exports = SetTileCollision; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194420,7 +196990,7 @@ module.exports = SetTileIndexCallback; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194462,7 +197032,7 @@ module.exports = SetTileLocationCallback; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194508,7 +197078,7 @@ module.exports = Shuffle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194562,7 +197132,7 @@ module.exports = StaggeredCullBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194614,7 +197184,7 @@ module.exports = StaggeredCullTiles; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194676,7 +197246,7 @@ module.exports = StaggeredTileToWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194721,7 +197291,7 @@ module.exports = StaggeredTileToWorldY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194787,7 +197357,7 @@ module.exports = StaggeredWorldToTileXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194835,7 +197405,7 @@ module.exports = StaggeredWorldToTileY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194887,7 +197457,7 @@ module.exports = SwapByIndex; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194932,7 +197502,7 @@ module.exports = TileToWorldX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194976,7 +197546,7 @@ module.exports = TileToWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195021,7 +197591,7 @@ module.exports = TileToWorldY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195105,7 +197675,7 @@ module.exports = WeightedRandomize; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195145,7 +197715,7 @@ module.exports = WorldToTileX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195212,7 +197782,7 @@ module.exports = WorldToTileXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195252,7 +197822,7 @@ module.exports = WorldToTileY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195343,7 +197913,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195417,7 +197987,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195437,7 +198007,7 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195487,7 +198057,7 @@ module.exports = Tilemaps; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195728,7 +198298,7 @@ module.exports = LayerData; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195996,7 +198566,7 @@ module.exports = MapData; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196125,7 +198695,7 @@ module.exports = ObjectLayer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196173,7 +198743,7 @@ module.exports = FromOrientationString; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196244,7 +198814,7 @@ module.exports = Parse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196337,7 +198907,7 @@ module.exports = Parse2DArray; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196386,7 +198956,7 @@ module.exports = ParseCSV; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196473,7 +199043,7 @@ module.exports = ParseTileLayers; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196525,7 +199095,7 @@ module.exports = ParseTilesets; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196593,7 +199163,7 @@ module.exports = ParseWeltmeister; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196617,7 +199187,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196645,7 +199215,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196719,7 +199289,7 @@ module.exports = AssignTileProperties; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196763,7 +199333,7 @@ module.exports = Base64Decode; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196858,7 +199428,7 @@ module.exports = BuildTilesetIndex; /** * @author Seth Berrier - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196919,7 +199489,7 @@ module.exports = CreateGroupLayer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -197010,7 +199580,7 @@ module.exports = ParseGID; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -197099,7 +199669,7 @@ module.exports = ParseImageLayers; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -197185,7 +199755,7 @@ module.exports = ParseJSONTiled; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -197266,7 +199836,7 @@ module.exports = ParseObject; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -197366,7 +199936,7 @@ module.exports = ParseObjectLayers; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -197637,7 +200207,7 @@ module.exports = ParseTileLayers; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -197833,7 +200403,7 @@ module.exports = ParseTilesets; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -197975,7 +200545,7 @@ module.exports = ParseWangsets; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -198007,7 +200577,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -198484,7 +201054,7 @@ module.exports = Clock; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -198855,7 +201425,7 @@ module.exports = TimerEvent; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -198878,7 +201448,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200005,7 +202575,7 @@ module.exports = TweenManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200047,7 +202617,7 @@ module.exports = GetBoolean; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200155,7 +202725,7 @@ module.exports = GetEaseFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200223,7 +202793,7 @@ module.exports = GetInterpolationFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200288,7 +202858,7 @@ module.exports = GetNewValue; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200350,7 +202920,7 @@ module.exports = GetProps; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200400,7 +202970,7 @@ module.exports = GetTargets; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200731,7 +203301,7 @@ module.exports = GetValueOp; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200859,7 +203429,7 @@ module.exports = NumberTweenBuilder; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201106,7 +203676,7 @@ module.exports = StaggerBuilder; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201311,7 +203881,7 @@ module.exports = TweenBuilder; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201410,7 +203980,7 @@ module.exports = TweenChainBuilder; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201441,7 +204011,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201487,7 +204057,7 @@ module.exports = 'active'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201530,7 +204100,7 @@ module.exports = 'complete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201576,7 +204146,7 @@ module.exports = 'loop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201615,7 +204185,7 @@ module.exports = 'pause'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201664,7 +204234,7 @@ module.exports = 'repeat'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201703,7 +204273,7 @@ module.exports = 'resume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201745,7 +204315,7 @@ module.exports = 'start'; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201783,7 +204353,7 @@ module.exports = 'stop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201828,7 +204398,7 @@ module.exports = 'update'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201878,7 +204448,7 @@ module.exports = 'yoyo'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201909,7 +204479,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201943,7 +204513,7 @@ module.exports = Tweens; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -202840,7 +205410,7 @@ module.exports = BaseTween; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -203514,7 +206084,7 @@ module.exports = BaseTweenData; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -203563,7 +206133,7 @@ module.exports = TWEEN_DEFAULTS; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -203636,7 +206206,7 @@ module.exports = [ /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -203925,13 +206495,13 @@ var Tween = new Class({ { if (startToCurrent === undefined) { startToCurrent = false; } - if (key !== 'texture' && (this.isPlayingForward() || this.isPlayingBackward())) + if (key !== 'texture') { for (var i = 0; i < this.totalData; i++) { var tweenData = this.data[i]; - if (tweenData.key === key) + if (tweenData.key === key && (tweenData.isPlayingForward() || tweenData.isPlayingBackward())) { tweenData.end = value; @@ -204488,7 +207058,7 @@ module.exports = Tween; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -205053,7 +207623,7 @@ module.exports = TweenChain; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -205475,7 +208045,7 @@ module.exports = TweenData; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -205798,7 +208368,7 @@ module.exports = TweenFrameData; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -206024,7 +208594,7 @@ module.exports = TWEEN_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -206281,7 +208851,7 @@ module.exports = Class; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -206309,7 +208879,7 @@ module.exports = NOOP; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -206339,7 +208909,7 @@ module.exports = NULL; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -206457,7 +209027,7 @@ module.exports = Add; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -206580,7 +209150,7 @@ module.exports = AddAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -206619,7 +209189,7 @@ module.exports = BringToTop; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -206672,7 +209242,7 @@ module.exports = CountAllMatching; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -206719,7 +209289,7 @@ module.exports = Each; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -206776,7 +209346,7 @@ module.exports = EachInRange; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -206861,7 +209431,7 @@ module.exports = FindClosestInSorted; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -206905,7 +209475,7 @@ module.exports = Flatten; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -206968,7 +209538,7 @@ module.exports = GetAll; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -207028,7 +209598,7 @@ module.exports = GetFirst; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -207064,7 +209634,7 @@ module.exports = GetRandom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -207129,7 +209699,7 @@ module.exports = MoveAbove; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -207194,7 +209764,7 @@ module.exports = MoveBelow; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -207237,7 +209807,7 @@ module.exports = MoveDown; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -207285,7 +209855,7 @@ module.exports = MoveTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -207328,7 +209898,7 @@ module.exports = MoveUp; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -207422,7 +209992,7 @@ module.exports = NumberArray; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -207500,7 +210070,7 @@ module.exports = NumberArrayStep; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -207623,7 +210193,7 @@ module.exports = QuickSelect; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -207762,7 +210332,7 @@ module.exports = Range; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -207852,7 +210422,7 @@ module.exports = Remove; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -207904,7 +210474,7 @@ module.exports = RemoveAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -207968,7 +210538,7 @@ module.exports = RemoveBetween; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208007,7 +210577,7 @@ module.exports = RemoveRandomElement; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208052,7 +210622,7 @@ module.exports = Replace; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208093,7 +210663,7 @@ module.exports = RotateLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208134,7 +210704,7 @@ module.exports = RotateRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208183,7 +210753,7 @@ module.exports = SafeRange; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208222,7 +210792,7 @@ module.exports = SendToBack; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208278,7 +210848,7 @@ module.exports = SetAll; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208320,7 +210890,7 @@ module.exports = Shuffle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208359,7 +210929,7 @@ module.exports = SortByDigits; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208407,7 +210977,7 @@ module.exports = SpliceOne; /** * @author Richard Davey * @author Angry Bytes (and contributors) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208596,7 +211166,7 @@ module.exports = StableSort; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208645,7 +211215,7 @@ module.exports = Swap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208703,7 +211273,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208766,7 +211336,7 @@ module.exports = CheckMatrix; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208862,7 +211432,7 @@ module.exports = MatrixToString; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208908,7 +211478,7 @@ module.exports = ReverseColumns; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208959,7 +211529,7 @@ module.exports = ReverseRows; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209007,7 +211577,7 @@ module.exports = Rotate180; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209055,7 +211625,7 @@ module.exports = RotateLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209142,7 +211712,7 @@ module.exports = RotateMatrix; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209190,7 +211760,7 @@ module.exports = RotateRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209280,7 +211850,7 @@ module.exports = TranslateMatrix; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209343,7 +211913,7 @@ module.exports = TransposeMatrix; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209375,7 +211945,7 @@ module.exports = { /** * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209434,7 +212004,7 @@ module.exports = ArrayBufferToBase64; /** * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209509,7 +212079,7 @@ module.exports = Base64ToArrayBuffer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209532,7 +212102,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209559,7 +212129,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209602,7 +212172,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209652,7 +212222,7 @@ module.exports = DeepCopy; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209754,7 +212324,7 @@ module.exports = Extend; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209842,7 +212412,7 @@ module.exports = GetAdvancedValue; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209886,7 +212456,7 @@ module.exports = GetFastValue; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209926,7 +212496,7 @@ module.exports = GetMinMaxValue; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210045,7 +212615,7 @@ module.exports = GetValue; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210083,7 +212653,7 @@ module.exports = HasAll; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210121,7 +212691,7 @@ module.exports = HasAny; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210151,7 +212721,7 @@ module.exports = HasValue; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210208,7 +212778,7 @@ module.exports = IsPlainObject; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210254,7 +212824,7 @@ module.exports = Merge; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210298,7 +212868,7 @@ module.exports = MergeRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210343,7 +212913,7 @@ module.exports = Pick; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210427,7 +212997,7 @@ module.exports = SetValue; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210463,7 +213033,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210499,7 +213069,7 @@ module.exports = Format; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210576,7 +213146,7 @@ module.exports = Pad; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210613,7 +213183,7 @@ module.exports = RemoveAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210643,7 +213213,7 @@ module.exports = Reverse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210679,7 +213249,7 @@ module.exports = UUID; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210717,7 +213287,7 @@ module.exports = UppercaseFirst; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/dist/phaser-arcade-physics.min.js b/dist/phaser-arcade-physics.min.js index 077f823ea9..c4386cc036 100644 --- a/dist/phaser-arcade-physics.min.js +++ b/dist/phaser-arcade-physics.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Phaser",[],e):"object"==typeof exports?exports.Phaser=e():t.Phaser=e()}(this,(()=>(()=>{var t={6659:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function s(){}function n(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function r(t,e,s,r,a){if("function"!=typeof s)throw new TypeError("The listener must be a function");var o=new n(s,r||t,a),h=i?i+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],o]:t._events[h].push(o):(t._events[h]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new s:delete t._events[e]}function o(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(i=!1)),o.prototype.eventNames=function(){var t,s,n=[];if(0===this._eventsCount)return n;for(s in t=this._events)e.call(t,s)&&n.push(i?s.slice(1):s);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},o.prototype.listeners=function(t){var e=i?i+t:t,s=this._events[e];if(!s)return[];if(s.fn)return[s.fn];for(var n=0,r=s.length,a=new Array(r);n{var s=i(82590);t.exports=function(t,e,i,n){for(var r=t[0],a=1;a{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"angle",e,i,n,r)}},22015:t=>{t.exports=function(t,e,i){for(var s=0;s{t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=i;s{t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=i;s{var s=i(40327),n=i(84093),r=i(72632),a=i(72283),o=new(i(71030))({sys:{queueDepthSort:a,events:{once:a}}},0,0,1,1).setOrigin(0,0);t.exports=function(t,e){void 0===e&&(e={});var i=e.hasOwnProperty("width"),a=e.hasOwnProperty("height"),h=r(e,"width",-1),l=r(e,"height",-1),u=r(e,"cellWidth",1),c=r(e,"cellHeight",u),d=r(e,"position",n.TOP_LEFT),f=r(e,"x",0),p=r(e,"y",0),v=0,g=0,m=h*u,y=l*c;o.setPosition(f,p),o.setSize(u,c);for(var x=0;x{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"alpha",e,i,n,r)}},3877:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"x",e,i,n,r)}},71020:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r,a,o){return null==i&&(i=e),s(t,"x",e,n,a,o),s(t,"y",i,r,a,o)}},28970:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"y",e,i,n,r)}},82249:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=6.28);for(var n=i,r=(s-i)/t.length,a=e.x,o=e.y,h=e.radius,l=0;l{t.exports=function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=6.28);for(var n=i,r=(s-i)/t.length,a=e.width/2,o=e.height/2,h=0;h{var s=i(8570);t.exports=function(t,e){for(var i=s(e,t.length),n=0;n{var s=i(40053),n=i(77640),r=i(38487);t.exports=function(t,e,i){void 0===i&&(i=0);var a=s(e,!1,t.length);i>0?n(a,i):i<0&&r(a,Math.abs(i));for(var o=0;o{var s=i(58813);t.exports=function(t,e,i){var n=s({x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},i),r=s({x1:e.x2,y1:e.y2,x2:e.x3,y2:e.y3},i),a=s({x1:e.x3,y1:e.y3,x2:e.x1,y2:e.y1},i);n.pop(),r.pop(),a.pop();for(var o=(n=n.concat(r,a)).length/t.length,h=0,l=0;l{t.exports=function(t,e,i){for(var s=0;s{t.exports=function(t,e,i,s,n,r){var a;void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=1);var o=0,h=t.length;if(1===r)for(a=n;a=0;a--)t[a][e]+=i+o*s,o++;return t}},23646:t=>{t.exports=function(t,e,i,s,n,r){var a;void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=1);var o=0,h=t.length;if(1===r)for(a=n;a=0;a--)t[a][e]=i+o*s,o++;return t}},4392:(t,e,i)=>{var s=i(30977);t.exports=function(t,e){for(var i=0;i{var s=i(72006);t.exports=function(t,e){for(var i=0;i{var s=i(74077);t.exports=function(t,e){for(var i=0;i{var s=i(30001);t.exports=function(t,e){for(var i=0;i{var s=i(99761);t.exports=function(t,e){for(var i=0;i{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"rotation",e,i,n,r)}},87299:(t,e,i)=>{var s=i(72395),n=i(53996);t.exports=function(t,e,i){for(var r=e.x,a=e.y,o=0;o{var s=i(72395);t.exports=function(t,e,i,n){var r=e.x,a=e.y;if(0===n)return t;for(var o=0;o{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"scaleX",e,i,n,r)}},51449:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r,a,o){return null==i&&(i=e),s(t,"scaleX",e,n,a,o),s(t,"scaleY",i,r,a,o)}},64895:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"scaleY",e,i,n,r)}},30329:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"alpha",e,i,n,r)}},43954:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n){return s(t,"blendMode",e,0,i,n)}},70688:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"depth",e,i,n,r)}},8314:t=>{t.exports=function(t,e,i){for(var s=0;s{var s=i(23646);t.exports=function(t,e,i,n,r,a,o){return null==i&&(i=e),s(t,"originX",e,n,a,o),s(t,"originY",i,r,a,o),t.forEach((function(t){t.updateDisplayOrigin()})),t}},38767:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"rotation",e,i,n,r)}},18584:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r,a,o){return null==i&&(i=e),s(t,"scaleX",e,n,a,o),s(t,"scaleY",i,r,a,o)}},17381:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scaleX",e,i,n,r)}},74370:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scaleY",e,i,n,r)}},27773:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r,a,o){return null==i&&(i=e),s(t,"scrollFactorX",e,n,a,o),s(t,"scrollFactorY",i,r,a,o)}},75257:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scrollFactorX",e,i,n,r)}},54512:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scrollFactorY",e,i,n,r)}},69423:t=>{t.exports=function(t,e,i,s,n){for(var r=0;r{var s=i(23646);t.exports=function(t,e,i,n){return s(t,"visible",e,0,i,n)}},94833:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"x",e,i,n,r)}},14284:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r,a,o){return null==i&&(i=e),s(t,"x",e,n,a,o),s(t,"y",i,r,a,o)}},96574:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"y",e,i,n,r)}},74086:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){var a,o;void 0===n&&(n=0),void 0===r&&(r=new s);var h=t.length;if(1===h)a=t[0].x,o=t[0].y,t[0].x=e,t[0].y=i;else{var l=1,u=0;0===n&&(u=h-1,l=h-2),a=t[u].x,o=t[u].y,t[u].x=e,t[u].y=i;for(var c=0;c=h||-1===l)){var d=t[l],f=d.x,p=d.y;d.x=a,d.y=o,a=f,o=p,0===n?l--:l++}}return r.x=a,r.y=o,r}},86347:(t,e,i)=>{var s=i(18592);t.exports=function(t){return s(t)}},1558:(t,e,i)=>{var s=i(5514);t.exports=function(t,e,i,n,r){void 0===r&&(r=!1);var a,o=Math.abs(n-i)/t.length;if(r)for(a=0;a{var s=i(87736);t.exports=function(t,e,i,n,r){void 0===r&&(r=!1);var a,o=Math.abs(n-i)/t.length;if(r)for(a=0;a{t.exports=function(t,e,i,s,n){if(void 0===n&&(n=!1),0===t.length)return t;if(1===t.length)return n?t[0][e]+=(s+i)/2:t[0][e]=(s+i)/2,t;var r,a=Math.abs(s-i)/(t.length-1);if(n)for(r=0;r{t.exports=function(t){for(var e=0;e{var s=i(1071);t.exports=function(t,e,i){void 0===i&&(i=0);for(var n=0;n{t.exports={AlignTo:i(62270),Angle:i(61148),Call:i(22015),GetFirst:i(31060),GetLast:i(52367),GridAlign:i(12673),IncAlpha:i(691),IncX:i(3877),IncXY:i(71020),IncY:i(28970),PlaceOnCircle:i(82249),PlaceOnEllipse:i(30285),PlaceOnLine:i(61557),PlaceOnRectangle:i(63549),PlaceOnTriangle:i(51629),PlayAnimation:i(1045),PropertyValueInc:i(6124),PropertyValueSet:i(23646),RandomCircle:i(4392),RandomEllipse:i(94985),RandomLine:i(63305),RandomRectangle:i(90739),RandomTriangle:i(91417),Rotate:i(26182),RotateAround:i(87299),RotateAroundDistance:i(92194),ScaleX:i(30363),ScaleXY:i(51449),ScaleY:i(64895),SetAlpha:i(30329),SetBlendMode:i(43954),SetDepth:i(70688),SetHitArea:i(8314),SetOrigin:i(12894),SetRotation:i(38767),SetScale:i(18584),SetScaleX:i(17381),SetScaleY:i(74370),SetScrollFactor:i(27773),SetScrollFactorX:i(75257),SetScrollFactorY:i(54512),SetTint:i(69423),SetVisible:i(58291),SetX:i(94833),SetXY:i(14284),SetY:i(96574),ShiftPosition:i(74086),Shuffle:i(86347),SmootherStep:i(9938),SmoothStep:i(1558),Spread:i(71060),ToggleVisible:i(11207),WrapInRectangle:i(24404)}},85463:(t,e,i)=>{var s=i(82897),n=i(56694),r=i(16938),a=i(2406),o=i(71519),h=i(10850),l=i(28834),u=new n({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,h(i,"frames",[]),h(i,"defaultTextureKey",null),h(i,"sortFrames",!0)),this.frameRate=h(i,"frameRate",null),this.duration=h(i,"duration",null),this.msPerFrame,this.skipMissedFrames=h(i,"skipMissedFrames",!0),this.delay=h(i,"delay",0),this.repeat=h(i,"repeat",0),this.repeatDelay=h(i,"repeatDelay",0),this.yoyo=h(i,"yoyo",!1),this.showBeforeDelay=h(i,"showBeforeDelay",!1),this.showOnStart=h(i,"showOnStart",!1),this.hideOnComplete=h(i,"hideOnComplete",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(r.PAUSE_ALL,this.pause,this),this.manager.on(r.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(t,e,i,s){null===i&&null===s?(t.frameRate=24,t.duration=24/e*1e3):i&&null===s?(t.duration=i,t.frameRate=e/(i/1e3)):(t.frameRate=s,t.duration=e/s*1e3),t.msPerFrame=1e3/t.frameRate},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i=this.getFrames(this.manager.textureManager,e);if(i.length>0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var s=this.frames.slice(0,t),n=this.frames.slice(t);this.frames=s.concat(i,n)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t0){r.isLast=!0,r.nextFrame=c[0],c[0].prevFrame=r;var y=1/(c.length-1);for(a=0;a0?t.inReverse&&t.forward?t.forward=!1:this.repeatAnimation(t):t.complete():this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e||(e=!1),t.inReverse===!e&&t.repeatCounter>0)return(0===t.repeatDelay||t.pendingRepeat)&&(t.forward=e),void this.repeatAnimation(t);if(t.inReverse===e||0!==t.repeatCounter){t.forward=e;var i=e?t.currentFrame.nextFrame:t.currentFrame.prevFrame;this.updateAndGetNextTick(t,i)}else t.complete()},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.yoyo?this.handleYoyoFrame(t,!0):t.repeatCounter>0?(t.inReverse&&!t.forward||(t.forward=!0),this.repeatAnimation(t)):t.complete():this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.setCurrentFrame(e),this.getNextTick(t)},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop){if(0===t._pendingStopValue)return t.stop();t._pendingStopValue--}t.repeatDelay>0&&!t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t.repeatDelay):(t.repeatCounter--,t.forward?t.setCurrentFrame(t.currentFrame.nextFrame):t.setCurrentFrame(t.currentFrame.prevFrame),t.isPlaying&&(this.getNextTick(t),t.handleRepeat()))},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showBeforeDelay:this.showBeforeDelay,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach((function(e){t.frames.push(e.toJSON())})),t},updateFrameSequence:function(){for(var t,e=this.frames.length,i=1/(e-1),s=0;s1?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):e>1&&(t.prevFrame=this.frames[s-1],t.nextFrame=this.frames[s+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(r.PAUSE_ALL,this.pause,this),this.manager.off(r.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var t=0;t{var s=new(i(56694))({initialize:function(t,e,i,s,n){void 0===n&&(n=!1),this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=s,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=n},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});t.exports=s},90249:(t,e,i)=>{var s=i(85463),n=i(56694),r=i(33885),a=i(6659),o=i(16938),h=i(97081),l=i(72632),u=i(10850),c=i(76400),d=i(13401),f=new n({Extends:a,initialize:function(t){a.call(this),this.game=t,this.textureManager=null,this.globalTimeScale=1,this.anims=new r,this.mixes=new r,this.paused=!1,this.name="AnimationManager",t.events.once(h.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(h.DESTROY,this.destroy,this)},addMix:function(t,e,i){var s=this.anims,n=this.mixes,r="string"==typeof t?t:t.key,a="string"==typeof e?e:e.key;if(s.has(r)&&s.has(a)){var o=n.get(r);o||(o={}),o[a]=i,n.set(r,o)}return this},removeMix:function(t,e){var i=this.mixes,s="string"==typeof t?t:t.key,n=i.get(s);if(n)if(e){var r="string"==typeof e?e:e.key;n.hasOwnProperty(r)&&delete n[r]}else e||i.delete(s);return this},getMix:function(t,e){var i=this.mixes,s="string"==typeof t?t:t.key,n="string"==typeof e?e:e.key,r=i.get(s);return r&&r.hasOwnProperty(n)?r[n]:0},add:function(t,e){return this.anims.has(t)?(console.warn("Animation key exists: "+t),this):(e.key=t,this.anims.set(t,e),this.emit(o.ADD_ANIMATION,t,e),this)},exists:function(t){return this.anims.has(t)},createFromAseprite:function(t,e,i){var s=[],n=this.game.cache.json.get(t);if(!n)return s;var r=this,a=u(n,"meta",null),o=u(n,"frames",null);a&&o&&u(a,"frameTags",[]).forEach((function(n){var a=[],h=l(n,"name",null),u=l(n,"from",0),c=l(n,"to",0),d=l(n,"direction","forward");if(h&&(!e||e&&e.indexOf(h)>-1)){for(var f=0,p=u;p<=c;p++){var v=p.toString(),g=o[v];if(g){var m=l(g,"duration",Number.MAX_SAFE_INTEGER);a.push({key:t,frame:v,duration:m}),f+=m}}var y=f/a.length;a.forEach((function(t){t.duration-=y})),"reverse"===d&&(a=a.reverse());var x,T={key:h,frames:a,duration:f,yoyo:"pingpong"===d};i?i.anims&&(x=i.anims.create(T)):x=r.create(T),x&&s.push(x)}}));return s},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))||(i=new s(this,e,t),this.anims.set(e,i),this.emit(o.ADD_ANIMATION,e,i))),i},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var s=0;s{var s=i(56694),n=i(33885),r=i(72632),a=i(16938),o=i(85463),h=new s({initialize:function(t){this.parent=t,this.animationManager=t.scene.sys.anims,this.animationManager.on(a.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.showBeforeDelay=!1,this.showOnStart=!1,this.hideOnComplete=!1,this.forward=!0,this.inReverse=!1,this.accumulator=0,this.nextTick=0,this.delayCounter=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},chain:function(t){var e=this.parent;if(void 0===t)return this.nextAnimsQueue.length=0,this.nextAnim=null,e;Array.isArray(t)||(t=[t]);for(var i=0;is.getTotalFrames()&&(h=0);var l=s.frames[h];0!==h||this.forward||(l=s.getLastFrame()),this.currentFrame=l}else console.warn("Missing animation: "+i);return this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.setCurrentFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.setCurrentFrame(t),this.parent},playAfterDelay:function(t,e){if(this.isPlaying){var i=this.nextAnim,s=this.nextAnimsQueue;i&&s.unshift(i),this.nextAnim=t,this._pendingStop=1,this._pendingStopValue=e}else this.delayCounter=e,this.play(t,!0);return this.parent},playAfterRepeat:function(t,e){if(void 0===e&&(e=1),this.isPlaying){var i=this.nextAnim,s=this.nextAnimsQueue;i&&s.unshift(i),-1!==this.repeatCounter&&e>this.repeatCounter&&(e=this.repeatCounter),this.nextAnim=t,this._pendingStop=2,this._pendingStopValue=e}else this.play(t);return this.parent},play:function(t,e){void 0===e&&(e=!1);var i=this.currentAnim,s=this.parent,n="string"==typeof t?t:t.key;if(e&&this.isPlaying&&i.key===n)return s;if(i&&this.isPlaying){var r=this.animationManager.getMix(i.key,t);if(r>0)return this.playAfterDelay(t,r)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t)},playReverse:function(t,e){void 0===e&&(e=!1);var i="string"==typeof t?t:t.key;return e&&this.isPlaying&&this.currentAnim.key===i?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t))},startAnimation:function(t){this.load(t);var e=this.currentAnim,i=this.parent;return e?(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat,e.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,0===this.delayCounter?this.handleStart():this.showBeforeDelay&&this.setCurrentFrame(this.currentFrame),i):i},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(a.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(a.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(a.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(a.ANIMATION_COMPLETE,a.ANIMATION_COMPLETE_KEY)},emitEvents:function(t,e){var i=this.currentAnim;if(i){var s=this.currentFrame,n=this.parent,r=s.textureFrame;n.emit(t,i,s,n,r),e&&n.emit(e+i.key,i,s,n,r)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var t=this.currentFrame;if(!t)return 0;var e=t.progress;return this.inReverse&&(e*=-1),e},setProgress:function(t){return this.forward||(t=1-t),this.setCurrentFrame(this.currentAnim.getFrameByProgress(t)),this.parent},setRepeat:function(t){return this.repeatCounter=-1===t?Number.MAX_VALUE:t,this.parent},globalRemove:function(t,e){void 0===e&&(e=this.currentAnim),this.isPlaying&&e.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var i=this.currentAnim,s=this.parent;return i?(e&&(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat),i.getFirstTick(this),this.emitEvents(a.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!t,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(i.frames[0]),this.parent):s},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(t)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(t)}return this.parent},stopAfterDelay:function(t){return this._pendingStop=1,this._pendingStopValue=t,this.parent},stopAfterRepeat:function(t){return void 0===t&&(t=1),-1!==this.repeatCounter&&t>this.repeatCounter&&(t=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=t,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(t,e){var i=this.currentAnim;if(this.isPlaying&&i&&!i.paused){if(this.accumulator+=e*this.timeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.stop();if(this.hasStarted){if(this.accumulator>=this.nextTick&&(this.forward?i.nextFrame(this):i.previousFrame(this),this.isPlaying&&0===this._pendingStop&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var s=0;do{this.forward?i.nextFrame(this):i.previousFrame(this),s++}while(this.isPlaying&&this.accumulator>this.nextTick&&s<60)}}else this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart())}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),t.setAlpha&&(e.alpha=t.alpha),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(a.ANIMATION_UPDATE),3===this._pendingStop&&this._pendingStopValue===t&&this.stop()),e},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(t){return this.anims?this.anims.get(t):null},exists:function(t){return!!this.anims&&this.anims.has(t)},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))||(i=new o(this,e,t),this.anims||(this.anims=new n),this.anims.set(e,i))),i},createFromAseprite:function(t,e){return this.animationManager.createFromAseprite(t,e,this.parent)},generateFrameNames:function(t,e){return this.animationManager.generateFrameNames(t,e)},generateFrameNumbers:function(t,e){return this.animationManager.generateFrameNumbers(t,e)},remove:function(t){var e=this.get(t);return e&&(this.currentAnim===e&&this.stop(),this.anims.delete(t)),e},destroy:function(){this.animationManager.off(a.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});t.exports=h},44509:t=>{t.exports="add"},84563:t=>{t.exports="animationcomplete"},61586:t=>{t.exports="animationcomplete-"},72175:t=>{t.exports="animationrepeat"},568:t=>{t.exports="animationrestart"},37690:t=>{t.exports="animationstart"},58525:t=>{t.exports="animationstop"},5243:t=>{t.exports="animationupdate"},10598:t=>{t.exports="pauseall"},4860:t=>{t.exports="remove"},31865:t=>{t.exports="resumeall"},16938:(t,e,i)=>{t.exports={ADD_ANIMATION:i(44509),ANIMATION_COMPLETE:i(84563),ANIMATION_COMPLETE_KEY:i(61586),ANIMATION_REPEAT:i(72175),ANIMATION_RESTART:i(568),ANIMATION_START:i(37690),ANIMATION_STOP:i(58525),ANIMATION_UPDATE:i(5243),PAUSE_ALL:i(10598),REMOVE_ANIMATION:i(4860),RESUME_ALL:i(31865)}},13517:(t,e,i)=>{t.exports={Animation:i(85463),AnimationFrame:i(71519),AnimationManager:i(90249),AnimationState:i(16569),Events:i(16938)}},23740:(t,e,i)=>{var s=i(56694),n=i(33885),r=i(6659),a=i(69773),o=new s({initialize:function(){this.entries=new n,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit(a.ADD,this,t,e),this},has:function(t){return this.entries.has(t)},exists:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit(a.REMOVE,this,t,e.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=o},43474:(t,e,i)=>{var s=i(23740),n=i(56694),r=i(97081),a=new n({initialize:function(t){this.game=t,this.binary=new s,this.bitmapFont=new s,this.json=new s,this.physics=new s,this.shader=new s,this.audio=new s,this.video=new s,this.text=new s,this.html=new s,this.obj=new s,this.tilemap=new s,this.xml=new s,this.custom={},this.game.events.once(r.DESTROY,this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new s),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],e=0;e{t.exports="add"},75968:t=>{t.exports="remove"},69773:(t,e,i)=>{t.exports={ADD:i(94762),REMOVE:i(75968)}},45820:(t,e,i)=>{t.exports={BaseCache:i(23740),CacheManager:i(43474),Events:i(69773)}},51052:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(75606),a=i(6659),o=i(89787),h=i(74118),l=i(69360),u=i(93222),c=i(93736),d=new s({Extends:a,Mixins:[n.Alpha,n.Visible],initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),a.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new h,this.dirty=!0,this._x=t,this._y=e,this._width=i,this._height=s,this._bounds=new h,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new l,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new c(i/2,s/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0},addToRenderList:function(t){this.renderList.push(t)},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this},getScroll:function(t,e,i){void 0===i&&(i=new c);var s=.5*this.width,n=.5*this.height;return i.x=t-s,i.y=e-n,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOnX:function(t){var e=.5*this.width;return this.midPoint.x=t,this.scrollX=t-e,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(t){var e=.5*this.height;return this.midPoint.y=t,this.scrollY=t-e,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(t,e){return this.centerOnX(t),this.centerOnY(e),this},centerToBounds:function(){if(this.useBounds){var t=this._bounds,e=.5*this.width,i=.5*this.height;this.midPoint.set(t.centerX,t.centerY),this.scrollX=t.centerX-e,this.scrollY=t.centerY-i}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(t){if(this.disableCull)return t;var e=this.matrix.matrix,i=e[0],s=e[1],n=e[2],r=e[3],a=i*r-s*n;if(!a)return t;var o=e[4],h=e[5],l=this.scrollX,u=this.scrollY,c=this.width,d=this.height,f=this.y,p=f+d,v=this.x,g=v+c,m=this.culledObjects,y=t.length;a=1/a,m.length=0;for(var x=0;xv&&S*i+b*n+of&&S*s+b*r+hn&&(t=n),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,s=e.y+(i-this.height)/2,n=Math.max(s,s+e.height-i);return tn&&(t=n),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=r(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,s,n){return void 0===n&&(n=!1),this._bounds.setTo(t,e,i,s),this.dirty=!0,this.useBounds=!0,n?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t,e){void 0===e&&(e=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=t,this.isSceneCamera=e;var i=t.sys;return this.sceneManager=i.game.scene,this.scaleManager=i.scale,this.cameraManager=i.cameras,this.updateSystem(),this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setZoom:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),0===t&&(t=.001),0===e&&(e=.001),this.zoomX=t,this.zoomY=e,this},setMask:function(t,e){return void 0===e&&(e=!0),this.mask=t,this._maskCamera=e?this.cameraManager.default:this,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},update:function(){},setIsSceneCamera:function(t){return this.isSceneCamera=t,this},updateSystem:function(){if(this.scaleManager&&this.isSceneCamera){var t=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,e=this.sceneManager;t&&!this._customViewport?e.customViewports++:!t&&this._customViewport&&e.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit(o.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(t){this._x=t,this.updateSystem()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.updateSystem()}},width:{get:function(){return this._width},set:function(t){this._width=t,this.updateSystem()}},height:{get:function(){return this._height},set:function(t){this._height=t,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(t){t!==this._scrollX&&(this._scrollX=t,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(t){t!==this._scrollY&&(this._scrollY=t,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(t){this._zoomX=t,this._zoomY=t,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(t){this._zoomX=t,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(t){this._zoomY=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});t.exports=d},47751:(t,e,i)=>{var s=i(51052),n=i(79993),r=i(82897),a=i(56694),o=i(64937),h=i(53030),l=i(89787),u=i(42798),c=i(74118),d=i(93736),f=new a({Extends:s,Mixins:[o.Pipeline],initialize:function(t,e,i,n){s.call(this,t,e,i,n),this.postPipelines=[],this.pipelineData={},this.inputEnabled=!0,this.fadeEffect=new h.Fade(this),this.flashEffect=new h.Flash(this),this.shakeEffect=new h.Shake(this),this.panEffect=new h.Pan(this),this.rotateToEffect=new h.RotateTo(this),this.zoomEffect=new h.Zoom(this),this.lerp=new d(1,1),this.followOffset=new d,this.deadzone=null,this._follow=null},setDeadzone:function(t,e){if(void 0===t)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=t,this.deadzone.height=e):this.deadzone=new c(0,0,t,e),this._follow){var i=this.width/2,s=this.height/2,r=this._follow.x-this.followOffset.x,a=this._follow.y-this.followOffset.y;this.midPoint.set(r,a),this.scrollX=r-i,this.scrollY=a-s}n(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(t,e,i,s,n,r){return this.fadeEffect.start(!1,t,e,i,s,!0,n,r)},fadeOut:function(t,e,i,s,n,r){return this.fadeEffect.start(!0,t,e,i,s,!0,n,r)},fadeFrom:function(t,e,i,s,n,r,a){return this.fadeEffect.start(!1,t,e,i,s,n,r,a)},fade:function(t,e,i,s,n,r,a){return this.fadeEffect.start(!0,t,e,i,s,n,r,a)},flash:function(t,e,i,s,n,r,a){return this.flashEffect.start(t,e,i,s,n,r,a)},shake:function(t,e,i,s,n){return this.shakeEffect.start(t,e,i,s,n)},pan:function(t,e,i,s,n,r,a){return this.panEffect.start(t,e,i,s,n,r,a)},rotateTo:function(t,e,i,s,n,r,a){return this.rotateToEffect.start(t,e,i,s,n,r,a)},zoomTo:function(t,e,i,s,n,r){return this.zoomEffect.start(t,e,i,s,n,r)},preRender:function(){this.renderList.length=0;var t=this.width,e=this.height,i=.5*t,s=.5*e,r=this.zoom,a=this.matrix,o=t*this.originX,h=e*this.originY,c=this._follow,d=this.deadzone,f=this.scrollX,p=this.scrollY;d&&n(d,this.midPoint.x,this.midPoint.y);var v=!1;if(this.roundPixels&&(o=Math.floor(o),h=Math.floor(h)),c&&!this.panEffect.isRunning){var g=this.lerp,m=c.x-this.followOffset.x,y=c.y-this.followOffset.y;this.roundPixels&&(m=Math.floor(m),y=Math.floor(y)),d?(md.right&&(f=u(f,f+(m-d.right),g.x)),yd.bottom&&(p=u(p,p+(y-d.bottom),g.y))):(f=u(f,m-o,g.x),p=u(p,y-h,g.y)),v=!0}this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(f=Math.floor(f),p=Math.floor(p)),this.scrollX=f,this.scrollY=p;var x=f+i,T=p+s;this.midPoint.set(x,T);var w=t/r,E=e/r,S=x-w/2,b=T-E/2;this.roundPixels&&(S=Math.floor(S),b=Math.floor(b)),this.worldView.setTo(S,b,w,E),a.applyITRS(Math.floor(this.x+o),Math.floor(this.y+h),this.rotation,r,r),a.translate(-o,-h),this.shakeEffect.preRender(),v&&this.emit(l.FOLLOW_UPDATE,this,c)},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,s,n,a){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===s&&(s=i),void 0===n&&(n=0),void 0===a&&(a=n),this._follow=t,this.roundPixels=e,i=r(i,0,1),s=r(s,0,1),this.lerp.set(i,s),this.followOffset.set(n,a);var o=this.width/2,h=this.height/2,l=t.x-n,u=t.y-a;return this.midPoint.set(l,u),this.scrollX=l-o,this.scrollY=u-h,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.rotateToEffect.update(t,e),this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.resetFX(),s.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=f},62382:(t,e,i)=>{var s=i(47751),n=i(56694),r=i(72632),a=i(91963),o=i(94287),h=i(40444),l=i(7599),u=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.roundPixels=t.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,t.sys.events.once(l.BOOT,this.boot,this),t.sys.events.on(l.START,this.start,this)},boot:function(){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new s(0,0,t.scale.width,t.scale.height).setScene(this.scene),t.game.scale.on(h.RESIZE,this.onResize,this),this.systems.events.once(l.DESTROY,this.destroy,this)},start:function(){if(!this.main){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0]}var e=this.systems.events;e.on(l.UPDATE,this.update,this),e.once(l.SHUTDOWN,this.shutdown,this)},add:function(t,e,i,n,r,a){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===r&&(r=!1),void 0===a&&(a="");var o=new s(t,e,i,n);return o.setName(a),o.setScene(this.scene),o.setRoundPixels(this.roundPixels),o.id=this.getNextID(),this.cameras.push(o),r&&(this.main=o),o},addExisting:function(t,e){return void 0===e&&(e=!1),-1===this.cameras.indexOf(t)?(t.id=this.getNextID(),t.setRoundPixels(this.roundPixels),this.cameras.push(t),e&&(this.main=t),t):null},getNextID:function(){for(var t=this.cameras,e=1,i=0;i<32;i++){for(var s=!1,n=0;n0){r.preRender();var a=this.getVisibleChildren(e.getChildren(),r);t.render(i,a,r)}}},getVisibleChildren:function(t,e){return t.filter((function(t){return t.willRender(e)}))},resetAll:function(){for(var t=0;t{var s=i(82897),n=i(56694),r=i(89787),a=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,a,o,h){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===a&&(a=!1),void 0===o&&(o=null),void 0===h&&(h=this.camera.scene),!a&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=s,this.blue=n,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=h;var l=t?r.FADE_OUT_START:r.FADE_IN_START;return this.camera.emit(l,this.camera,this,e,i,s,n),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var s=i(82897),n=i(56694),r=i(89787),a=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=1,this.progress=0,this._elapsed=0,this._alpha,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,a,o){return void 0===t&&(t=250),void 0===e&&(e=255),void 0===i&&(i=255),void 0===s&&(s=255),void 0===n&&(n=!1),void 0===a&&(a=null),void 0===o&&(o=this.camera.scene),!n&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,this.red=e,this.green=i,this.blue=s,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=o,this.camera.emit(r.FLASH_START,this.camera,this,t,e,i,s)),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var s=i(82897),n=i(56694),r=i(35060),a=i(89787),o=i(93736),h=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=new o,this.current=new o,this.destination=new o,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,o,h){void 0===i&&(i=1e3),void 0===s&&(s=r.Linear),void 0===n&&(n=!1),void 0===o&&(o=null),void 0===h&&(h=this.camera.scene);var l=this.camera;return!n&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(l.scrollX,l.scrollY),this.destination.set(t,e),l.getScroll(t,e,this.current),"string"==typeof s&&r.hasOwnProperty(s)?this.ease=r[s]:"function"==typeof s&&(this.ease=s),this._elapsed=0,this._onUpdate=o,this._onUpdateScope=h,this.camera.emit(a.PAN_START,this.camera,this,i,t,e)),l},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=s(this._elapsed/this.duration,0,1);this.progress=i;var n=this.camera;if(this._elapsed{var s=i(82897),n=i(56694),r=i(89787),a=i(35060),o=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope,this.clockwise=!0,this.shortestPath=!1},start:function(t,e,i,s,n,o,h){void 0===i&&(i=1e3),void 0===s&&(s=a.Linear),void 0===n&&(n=!1),void 0===o&&(o=null),void 0===h&&(h=this.camera.scene),void 0===e&&(e=!1),this.shortestPath=e;var l=t;t<0?(l=-1*t,this.clockwise=!1):this.clockwise=!0;var u=360*Math.PI/180;l-=Math.floor(l/u)*u;var c=this.camera;if(!n&&this.isRunning)return c;if(this.isRunning=!0,this.duration=i,this.progress=0,this.source=c.rotation,this.destination=l,"string"==typeof s&&a.hasOwnProperty(s)?this.ease=a[s]:"function"==typeof s&&(this.ease=s),this._elapsed=0,this._onUpdate=o,this._onUpdateScope=h,this.shortestPath){var d=0,f=0;(d=this.destination>this.source?Math.abs(this.destination-this.source):Math.abs(this.destination+u)-this.source)<(f=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+u)-this.destination)?this.clockwise=!0:d>f&&(this.clockwise=!1)}return this.camera.emit(r.ROTATE_START,this.camera,this,i,l),c},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=s(this._elapsed/this.duration,0,1);this.progress=i;var n=this.camera;if(this._elapsed=l?Math.abs(h-l):Math.abs(h+o)-l;var u=0;u=this.clockwise?n.rotation+a*r:n.rotation-a*r,n.rotation=u,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,n,i,u)}else n.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,n,i,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(r.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});t.exports=o},3241:(t,e,i)=>{var s=i(82897),n=i(56694),r=i(89787),a=i(93736),o=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new a,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===i&&(i=!1),void 0===s&&(s=null),void 0===n&&(n=this.camera.scene),!i&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,"number"==typeof e?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=s,this._onUpdateScope=n,this.camera.emit(r.SHAKE_START,this.camera,this,t,e)),this.camera},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){if(this.isRunning)if(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var s=i(82897),n=i(56694),r=i(35060),a=i(89787),o=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,o){void 0===e&&(e=1e3),void 0===i&&(i=r.Linear),void 0===s&&(s=!1),void 0===n&&(n=null),void 0===o&&(o=this.camera.scene);var h=this.camera;return!s&&this.isRunning||(this.isRunning=!0,this.duration=e,this.progress=0,this.source=h.zoom,this.destination=t,"string"==typeof i&&r.hasOwnProperty(i)?this.ease=r[i]:"function"==typeof i&&(this.ease=i),this._elapsed=0,this._onUpdate=n,this._onUpdateScope=o,this.camera.emit(a.ZOOM_START,this.camera,this,e,t)),h},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._elapsed{t.exports={Fade:i(92522),Flash:i(22151),Pan:i(37551),Shake:i(3241),RotateTo:i(1771),Zoom:i(13383)}},39577:t=>{t.exports="cameradestroy"},85373:t=>{t.exports="camerafadeincomplete"},92057:t=>{t.exports="camerafadeinstart"},1903:t=>{t.exports="camerafadeoutcomplete"},96131:t=>{t.exports="camerafadeoutstart"},85409:t=>{t.exports="cameraflashcomplete"},25500:t=>{t.exports="cameraflashstart"},44071:t=>{t.exports="followupdate"},19818:t=>{t.exports="camerapancomplete"},80002:t=>{t.exports="camerapanstart"},87966:t=>{t.exports="postrender"},74217:t=>{t.exports="prerender"},34805:t=>{t.exports="camerarotatecomplete"},30408:t=>{t.exports="camerarotatestart"},49856:t=>{t.exports="camerashakecomplete"},69189:t=>{t.exports="camerashakestart"},67657:t=>{t.exports="camerazoomcomplete"},14229:t=>{t.exports="camerazoomstart"},89787:(t,e,i)=>{t.exports={DESTROY:i(39577),FADE_IN_COMPLETE:i(85373),FADE_IN_START:i(92057),FADE_OUT_COMPLETE:i(1903),FADE_OUT_START:i(96131),FLASH_COMPLETE:i(85409),FLASH_START:i(25500),FOLLOW_UPDATE:i(44071),PAN_COMPLETE:i(19818),PAN_START:i(80002),POST_RENDER:i(87966),PRE_RENDER:i(74217),ROTATE_COMPLETE:i(34805),ROTATE_START:i(30408),SHAKE_COMPLETE:i(49856),SHAKE_START:i(69189),ZOOM_COMPLETE:i(67657),ZOOM_START:i(14229)}},32356:(t,e,i)=>{t.exports={Camera:i(47751),BaseCamera:i(51052),CameraManager:i(62382),Effects:i(53030),Events:i(89787)}},84219:(t,e,i)=>{var s=i(56694),n=i(10850),r=new s({initialize:function(t){this.camera=n(t,"camera",null),this.left=n(t,"left",null),this.right=n(t,"right",null),this.up=n(t,"up",null),this.down=n(t,"down",null),this.zoomIn=n(t,"zoomIn",null),this.zoomOut=n(t,"zoomOut",null),this.zoomSpeed=n(t,"zoomSpeed",.01),this.minZoom=n(t,"minZoom",.001),this.maxZoom=n(t,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=n(t,"speed",null);"number"==typeof e?(this.speedX=e,this.speedY=e):(this.speedX=n(t,"speed.x",0),this.speedY=n(t,"speed.y",0)),this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this.up&&this.up.isDown?e.scrollY-=this.speedY*t|0:this.down&&this.down.isDown&&(e.scrollY+=this.speedY*t|0),this.left&&this.left.isDown?e.scrollX-=this.speedX*t|0:this.right&&this.right.isDown&&(e.scrollX+=this.speedX*t|0),this.zoomIn&&this.zoomIn.isDown?(e.zoom-=this.zoomSpeed,e.zoomthis.maxZoom&&(e.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},69370:(t,e,i)=>{var s=i(56694),n=i(10850),r=new s({initialize:function(t){this.camera=n(t,"camera",null),this.left=n(t,"left",null),this.right=n(t,"right",null),this.up=n(t,"up",null),this.down=n(t,"down",null),this.zoomIn=n(t,"zoomIn",null),this.zoomOut=n(t,"zoomOut",null),this.zoomSpeed=n(t,"zoomSpeed",.01),this.minZoom=n(t,"minZoom",.001),this.maxZoom=n(t,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=n(t,"acceleration",null);"number"==typeof e?(this.accelX=e,this.accelY=e):(this.accelX=n(t,"acceleration.x",0),this.accelY=n(t,"acceleration.y",0)),this.dragX=0,this.dragY=0;var i=n(t,"drag",null);"number"==typeof i?(this.dragX=i,this.dragY=i):(this.dragX=n(t,"drag.x",0),this.dragY=n(t,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var s=n(t,"maxSpeed",null);"number"==typeof s?(this.maxSpeedX=s,this.maxSpeedY=s):(this.maxSpeedX=n(t,"maxSpeed.x",0),this.maxSpeedY=n(t,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this._speedX>0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoomthis.maxZoom&&(e.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},6524:(t,e,i)=>{t.exports={FixedKeyControl:i(84219),SmoothedKeyControl:i(69370)}},44143:(t,e,i)=>{t.exports={Controls:i(6524),Scene2D:i(32356)}},86459:(t,e,i)=>{var s={VERSION:"3.60.0-beta.17",BlendModes:i(95723),ScaleModes:i(27394),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=s},14033:(t,e,i)=>{var s=i(56694),n=i(86459),r=i(18360),a=i(77290),o=i(72632),h=i(10850),l=i(42911),u=i(72283),c=i(5923),d=i(65641),f=i(93222),p=new s({initialize:function(t){void 0===t&&(t={});var e=h(t,"scale",null);this.width=h(e,"width",1024,t),this.height=h(e,"height",768,t),this.zoom=h(e,"zoom",1,t),this.parent=h(e,"parent",void 0,t),this.scaleMode=h(e,e?"mode":"scaleMode",0,t),this.expandParent=h(e,"expandParent",!0,t),this.autoRound=h(e,"autoRound",!1,t),this.autoCenter=h(e,"autoCenter",0,t),this.resizeInterval=h(e,"resizeInterval",500,t),this.fullscreenTarget=h(e,"fullscreenTarget",null,t),this.minWidth=h(e,"minWidth",0,t),this.maxWidth=h(e,"maxWidth",0,t),this.minHeight=h(e,"minHeight",0,t),this.maxHeight=h(e,"maxHeight",0,t),this.renderType=h(t,"type",n.AUTO),this.canvas=h(t,"canvas",null),this.context=h(t,"context",null),this.canvasStyle=h(t,"canvasStyle",null),this.customEnvironment=h(t,"customEnvironment",!1),this.sceneConfig=h(t,"scene",null),this.seed=h(t,"seed",[(Date.now()*Math.random()).toString()]),c.RND=new c.RandomDataGenerator(this.seed),this.gameTitle=h(t,"title",""),this.gameURL=h(t,"url","https://phaser.io"),this.gameVersion=h(t,"version",""),this.autoFocus=h(t,"autoFocus",!0),this.stableSort=h(t,"stableSort",-1),-1===this.stableSort&&(this.stableSort=a.browser.es2019?1:0),a.features.stableSort=this.stableSort,this.domCreateContainer=h(t,"dom.createContainer",!1),this.domPointerEvents=h(t,"dom.pointerEvents","none"),this.inputKeyboard=h(t,"input.keyboard",!0),this.inputKeyboardEventTarget=h(t,"input.keyboard.target",window),this.inputKeyboardCapture=h(t,"input.keyboard.capture",[]),this.inputMouse=h(t,"input.mouse",!0),this.inputMouseEventTarget=h(t,"input.mouse.target",null),this.inputMousePreventDefaultDown=h(t,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=h(t,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=h(t,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=h(t,"input.mouse.preventDefaultWheel",!0),this.inputTouch=h(t,"input.touch",a.input.touch),this.inputTouchEventTarget=h(t,"input.touch.target",null),this.inputTouchCapture=h(t,"input.touch.capture",!0),this.inputActivePointers=h(t,"input.activePointers",1),this.inputSmoothFactor=h(t,"input.smoothFactor",0),this.inputWindowEvents=h(t,"input.windowEvents",!0),this.inputGamepad=h(t,"input.gamepad",!1),this.inputGamepadEventTarget=h(t,"input.gamepad.target",window),this.disableContextMenu=h(t,"disableContextMenu",!1),this.audio=h(t,"audio",{}),this.hideBanner=!1===h(t,"banner",null),this.hidePhaser=h(t,"banner.hidePhaser",!1),this.bannerTextColor=h(t,"banner.text","#ffffff"),this.bannerBackgroundColor=h(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=h(t,"fps",null);var i=h(t,"render",null);this.pipeline=h(i,"pipeline",null,t),this.autoMobilePipeline=h(i,"autoMobilePipeline",!0,t),this.defaultPipeline=h(i,"defaultPipeline",d.MULTI_PIPELINE,t),this.antialias=h(i,"antialias",!0,t),this.antialiasGL=h(i,"antialiasGL",!0,t),this.mipmapFilter=h(i,"mipmapFilter","LINEAR",t),this.desynchronized=h(i,"desynchronized",!1,t),this.roundPixels=h(i,"roundPixels",!1,t),this.pixelArt=h(i,"pixelArt",1!==this.zoom,t),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=h(i,"transparent",!1,t),this.clearBeforeRender=h(i,"clearBeforeRender",!0,t),this.preserveDrawingBuffer=h(i,"preserveDrawingBuffer",!1,t),this.premultipliedAlpha=h(i,"premultipliedAlpha",!0,t),this.failIfMajorPerformanceCaveat=h(i,"failIfMajorPerformanceCaveat",!1,t),this.powerPreference=h(i,"powerPreference","default",t),this.batchSize=h(i,"batchSize",4096,t),this.maxTextures=h(i,"maxTextures",-1,t),this.maxLights=h(i,"maxLights",10,t);var s=h(t,"backgroundColor",0);this.backgroundColor=f(s),this.transparent&&(this.backgroundColor=f(0),this.backgroundColor.alpha=0),this.preBoot=h(t,"callbacks.preBoot",u),this.postBoot=h(t,"callbacks.postBoot",u),this.physics=h(t,"physics",{}),this.defaultPhysicsSystem=h(this.physics,"default",!1),this.loaderBaseURL=h(t,"loader.baseURL",""),this.loaderPath=h(t,"loader.path",""),this.loaderMaxParallelDownloads=h(t,"loader.maxParallelDownloads",a.os.android?6:32),this.loaderCrossOrigin=h(t,"loader.crossOrigin",void 0),this.loaderResponseType=h(t,"loader.responseType",""),this.loaderAsync=h(t,"loader.async",!0),this.loaderUser=h(t,"loader.user",""),this.loaderPassword=h(t,"loader.password",""),this.loaderTimeout=h(t,"loader.timeout",0),this.loaderWithCredentials=h(t,"loader.withCredentials",!1),this.loaderImageLoadType=h(t,"loader.imageLoadType","XHR"),this.loaderLocalScheme=h(t,"loader.localScheme",["file://","capacitor://"]),this.installGlobalPlugins=[],this.installScenePlugins=[];var p=h(t,"plugins",null),v=r.DefaultScene;p&&(Array.isArray(p)?this.defaultPlugins=p:l(p)&&(this.installGlobalPlugins=o(p,"global",[]),this.installScenePlugins=o(p,"scene",[]),Array.isArray(p.default)?v=p.default:Array.isArray(p.defaultMerge)&&(v=v.concat(p.defaultMerge)))),this.defaultPlugins=v;var g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=h(t,"images.default",g+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=h(t,"images.missing",g+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=h(t,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=n.WEBGL:window.FORCE_CANVAS&&(this.renderType=n.CANVAS))}});t.exports=p},50150:(t,e,i)=>{var s=i(70616),n=i(61068),r=i(86459),a=i(90185);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===r.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==r.HEADLESS)if(e.renderType===r.AUTO&&(e.renderType=a.webGL?r.WEBGL:r.CANVAS),e.renderType===r.WEBGL){if(!a.webGL)throw new Error("Cannot create WebGL context, aborting.")}else{if(e.renderType!==r.CANVAS)throw new Error("Unknown value for renderer type: "+e.renderType);if(!a.canvas)throw new Error("Cannot create Canvas context, aborting.")}e.antialias||n.disableSmoothing();var o,h,l=t.scale.baseSize,u=l.width,c=l.height;(e.canvas?(t.canvas=e.canvas,t.canvas.width=u,t.canvas.height=c):t.canvas=n.create(t,u,c,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||s.setCrisp(t.canvas),e.renderType!==r.HEADLESS)&&(o=i(91135),h=i(11857),e.renderType===r.WEBGL?t.renderer=new h(t):(t.renderer=new o(t),t.context=t.renderer.gameContext))}},77291:(t,e,i)=>{var s=i(86459);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===s.CANVAS?i="Canvas":e.renderType===s.HEADLESS&&(i="Headless");var n,r=e.audio,a=t.device.audio;if(n=a.webAudio&&!r.disableWebAudio?"Web Audio":r.noAudio||!a.webAudio&&!a.audioData?"No Audio":"HTML5 Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+s.VERSION+" / https://phaser.io");else{var o,h="",l=[h];if(Array.isArray(e.bannerBackgroundColor))e.bannerBackgroundColor.forEach((function(t){h=h.concat("%c "),l.push("background: "+t),o=t})),l[l.length-1]="color: "+e.bannerTextColor+"; background: "+o;else h=h.concat("%c "),l.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor);l.push("background: transparent"),e.gameTitle&&(h=h.concat(e.gameTitle),e.gameVersion&&(h=h.concat(" v"+e.gameVersion)),e.hidePhaser||(h=h.concat(" / ")));e.hidePhaser||(h=h.concat("Phaser v"+s.VERSION+" ("+i+" | "+n+")")),h=h.concat(" %c "+e.gameURL),l[0]=h,console.log.apply(console,l)}}}},15213:(t,e,i)=>{var s=i(99584),n=i(90249),r=i(43474),a=i(61068),o=i(56694),h=i(14033),l=i(85178),u=i(50150),c=i(81078),d=i(77291),f=i(77290),p=i(21546),v=i(6659),g=i(97081),m=i(69898),y=i(91963),x=i(49274),T=i(756),w=i(13553),E=i(38203),S=i(6237),b=i(26617),A=i(26493),_=i(84191),C=new o({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new v,this.anims=new n(this),this.textures=new S(this),this.cache=new r(this),this.registry=new c(this),this.input=new m(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=f,this.scale=new T(this,this.config),this.sound=null,this.sound=_.create(this),this.loop=new b(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,p(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),d(this),s(this.canvas,this.config.parent),this.textures.once(E.READY,this.texturesReady,this),this.events.emit(g.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(g.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),A(this);var t=this.events;t.on(g.HIDDEN,this.onHidden,this),t.on(g.VISIBLE,this.onVisible,this),t.on(g.BLUR,this.onBlur,this),t.on(g.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(g.PRE_STEP,t,e),i.emit(g.STEP,t,e),this.scene.update(t,e),i.emit(g.POST_STEP,t,e);var s=this.renderer;s.preRender(),i.emit(g.PRE_RENDER,s,t,e),this.scene.render(s),s.postRender(),i.emit(g.POST_RENDER,s,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(g.PRE_STEP,t,e),i.emit(g.STEP,t,e),this.scene.update(t,e),i.emit(g.POST_STEP,t,e),this.scene.isProcessing=!1,i.emit(g.PRE_RENDER,null,t,e),i.emit(g.POST_RENDER,null,t,e)},onHidden:function(){this.loop.pause(),this.events.emit(g.PAUSE)},pause:function(){this.onHidden()},onVisible:function(){this.loop.resume(),this.events.emit(g.RESUME)},resume:function(){this.onVisible()},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.scene.destroy(),this.events.emit(g.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(a.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=C},26617:(t,e,i)=>{var s=i(56694),n=i(10850),r=i(72283),a=i(27385),o=new s({initialize:function(t,e){this.game=t,this.raf=new a,this.started=!1,this.running=!1,this.minFps=n(e,"min",5),this.targetFps=n(e,"target",60),this.fpsLimit=n(e,"limit",0),this.hasFpsLimit=this.fpsLimit>0,this._limitRate=this.hasFpsLimit?1e3/this.fpsLimit:0,this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=n(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=n(e,"deltaHistory",10),this.panicMax=n(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=n(e,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0;for(var e=0;e0||!this.inFocus)&&(this._coolDown--,t=Math.min(t,this._target)),t>this._min&&(t=i[e],t=Math.min(t,this._min)),i[e]=t,this.deltaIndex++,this.deltaIndex>=s&&(this.deltaIndex=0);for(var n=0,r=0;r=this.nextFpsUpdate&&this.updateFPS(t),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(t,this.delta),this.delta=0),this.lastTime=t,this.frame++},step:function(t){this.now=t;var e=Math.max(0,t-this.lastTime);this.rawDelta=e,this.time+=this.rawDelta,this.smoothStep&&(e=this.smoothDelta(e)),this.delta=e,t>=this.nextFpsUpdate&&this.updateFPS(t),this.framesThisSecond++,this.callback(t,e),this.lastTime=t,this.frame++},tick:function(){var t=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(t):this.step(t)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){void 0===t&&(t=!1);var e=window.performance.now();if(!this.running){t&&(this.startTime+=-this.lastTime+(this.lastTime+e));var i=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(i,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0,this.fpsLimitTriggered=!1,this.tick()}},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.raf.destroy(),this.raf=null,this.game=null,this.callback=null}});t.exports=o},26493:(t,e,i)=>{var s=i(97081);t.exports=function(t){var e,i=t.events;if(void 0!==document.hidden)e="visibilitychange";else{["webkit","moz","ms"].forEach((function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")}))}e&&document.addEventListener(e,(function(t){document.hidden||"pause"===t.type?i.emit(s.HIDDEN):i.emit(s.VISIBLE)}),!1),window.onblur=function(){i.emit(s.BLUR)},window.onfocus=function(){i.emit(s.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},41651:t=>{t.exports="blur"},5520:t=>{t.exports="boot"},51673:t=>{t.exports="contextlost"},25055:t=>{t.exports="destroy"},23767:t=>{t.exports="focus"},57564:t=>{t.exports="hidden"},38327:t=>{t.exports="pause"},43807:t=>{t.exports="postrender"},73652:t=>{t.exports="poststep"},780:t=>{t.exports="prerender"},13781:t=>{t.exports="prestep"},38247:t=>{t.exports="ready"},29129:t=>{t.exports="resume"},34994:t=>{t.exports="step"},98704:t=>{t.exports="visible"},97081:(t,e,i)=>{t.exports={BLUR:i(41651),BOOT:i(5520),CONTEXT_LOST:i(51673),DESTROY:i(25055),FOCUS:i(23767),HIDDEN:i(57564),PAUSE:i(38327),POST_RENDER:i(43807),POST_STEP:i(73652),PRE_RENDER:i(780),PRE_STEP:i(13781),READY:i(38247),RESUME:i(29129),STEP:i(34994),VISIBLE:i(98704)}},80293:(t,e,i)=>{t.exports={Config:i(14033),CreateRenderer:i(50150),DebugHeader:i(77291),Events:i(97081),TimeStep:i(26617),VisibilityHandler:i(26493)}},52780:(t,e,i)=>{var s=i(81543),n=i(61068),r=i(10850);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),a=r(t,"palette",s),o=r(t,"pixelWidth",1),h=r(t,"pixelHeight",o),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*o)),p=Math.floor(Math.abs(e.length*h));i||(i=n.create2D(this,f,p),l=!1,u=!1),l&&(i.width=f,i.height=p);var v=i.getContext("2d");u&&v.clearRect(0,0,f,p),c&&c(i,v);for(var g=0;g{t.exports={GenerateTexture:i(52780),Palettes:i(25235)}},81543:t=>{t.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},75846:t=>{t.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},83206:t=>{t.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},13194:t=>{t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},50686:t=>{t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},25235:(t,e,i)=>{t.exports={ARNE16:i(81543),C64:i(75846),CGA:i(83206),JMP:i(13194),MSX:i(50686)}},63120:(t,e,i)=>{var s=i(56694),n=i(34631),r=i(38517),a=i(93736),o=new s({Extends:r,initialize:function(t,e,i,s){r.call(this,"CubicBezierCurve"),Array.isArray(t)&&(s=new a(t[6],t[7]),i=new a(t[4],t[5]),e=new a(t[2],t[3]),t=new a(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i,this.p3=s},getStartPoint:function(t){return void 0===t&&(t=new a),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new a);var i=this.p0,s=this.p1,r=this.p2,o=this.p3;return e.set(n(t,i.x,s.x,r.x,o.x),n(t,i.y,s.y,r.y,o.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var s=1;s{var s=i(56694),n=i(80222),r=i(74118),a=i(93736),o=new s({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new a,this._tmpVec2B=new a},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var s=Math.max(1,Math.round(i/e));return n(this.getSpacedPoints(s),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new a),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],s=this.getPoint(0,this._tmpVec2A),n=0;i.push(0);for(var r=1;r<=t;r++)n+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(s),i.push(n),s.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var s=0;s<=t;s++)i.push(this.getPoint(s/t));return i},getRandomPoint:function(t){return void 0===t&&(t=new a),this.getPoint(Math.random(),t)},getSpacedPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var s=0;s<=t;s++){var n=this.getUtoTmapping(s/t,null,t);i.push(this.getPoint(n))}return i},getStartPoint:function(t){return void 0===t&&(t=new a),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new a);var i=1e-4,s=t-i,n=t+i;return s<0&&(s=0),n>1&&(n=1),this.getPoint(s,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var s,n=this.getLengths(i),r=0,a=n.length;s=e?Math.min(e,n[a-1]):t*n[a-1];for(var o,h=0,l=a-1;h<=l;)if((o=n[r=Math.floor(h+(l-h)/2)]-s)<0)h=r+1;else{if(!(o>0)){l=r;break}l=r-1}if(n[r=l]===s)return r/(a-1);var u=n[r];return(r+(s-u)/(n[r+1]-u))/(a-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=o},48835:(t,e,i)=>{var s=i(56694),n=i(38517),r=i(75606),a=i(10850),o=i(23701),h=i(93736),l=new s({Extends:n,initialize:function(t,e,i,s,o,l,u,c){if("object"==typeof t){var d=t;t=a(d,"x",0),e=a(d,"y",0),i=a(d,"xRadius",0),s=a(d,"yRadius",i),o=a(d,"startAngle",0),l=a(d,"endAngle",360),u=a(d,"clockwise",!1),c=a(d,"rotation",0)}else void 0===s&&(s=i),void 0===o&&(o=0),void 0===l&&(l=360),void 0===u&&(u=!1),void 0===c&&(c=0);n.call(this,"EllipseCurve"),this.p0=new h(t,e),this._xRadius=i,this._yRadius=s,this._startAngle=r(o),this._endAngle=r(l),this._clockwise=u,this._rotation=r(c)},getStartPoint:function(t){return void 0===t&&(t=new h),this.getPoint(0,t)},getResolution:function(t){return 2*t},getPoint:function(t,e){void 0===e&&(e=new h);for(var i=2*Math.PI,s=this._endAngle-this._startAngle,n=Math.abs(s)i;)s-=i;s{var s=i(56694),n=i(38517),r=i(80222),a=i(74118),o=i(93736),h=new s({Extends:n,initialize:function(t,e){n.call(this,"LineCurve"),Array.isArray(t)&&(e=new o(t[2],t[3]),t=new o(t[0],t[1])),this.p0=t,this.p1=e,this.arcLengthDivisions=1},getBounds:function(t){return void 0===t&&(t=new a),r([this.p0,this.p1],t)},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.p0)},getResolution:function(t){return void 0===t&&(t=1),t},getPoint:function(t,e){return void 0===e&&(e=new o),1===t?e.copy(this.p1):(e.copy(this.p1).subtract(this.p0).scale(t).add(this.p0),e)},getPointAt:function(t,e){return this.getPoint(t,e)},getTangent:function(t,e){return void 0===e&&(e=new o),e.copy(this.p1).subtract(this.p0).normalize(),e},getUtoTmapping:function(t,e,i){var s;if(e){var n=this.getLengths(i),r=n[n.length-1];s=Math.min(e,r)/r}else s=t;return s},draw:function(t){return t.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});h.fromJSON=function(t){var e=t.points,i=new o(e[0],e[1]),s=new o(e[2],e[3]);return new h(i,s)},t.exports=h},64761:(t,e,i)=>{var s=i(56694),n=i(38517),r=i(16252),a=i(93736),o=new s({Extends:n,initialize:function(t,e,i){n.call(this,"QuadraticBezierCurve"),Array.isArray(t)&&(i=new a(t[4],t[5]),e=new a(t[2],t[3]),t=new a(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i},getStartPoint:function(t){return void 0===t&&(t=new a),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new a);var i=this.p0,s=this.p1,n=this.p2;return e.set(r(t,i.x,s.x,n.x),r(t,i.y,s.y,n.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var s=1;s{var s=i(14976),n=i(56694),r=i(38517),a=i(93736),o=new n({Extends:r,initialize:function(t){void 0===t&&(t=[]),r.call(this,"SplineCurve"),this.points=[],this.addPoints(t)},addPoints:function(t){for(var e=0;ei.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(s(o,h.x,l.x,u.x,c.x),s(o,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e{t.exports={Path:i(12822),MoveTo:i(53639),CubicBezier:i(63120),Curve:i(38517),Ellipse:i(48835),Line:i(58084),QuadraticBezier:i(64761),Spline:i(11956)}},53639:(t,e,i)=>{var s=i(56694),n=i(93736),r=new s({initialize:function(t,e){this.active=!1,this.p0=new n(t,e)},getPoint:function(t,e){return void 0===e&&(e=new n),e.copy(this.p0)},getPointAt:function(t,e){return this.getPoint(t,e)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});t.exports=r},12822:(t,e,i)=>{var s=i(56694),n=i(63120),r=i(48835),a=i(61286),o=i(58084),h=i(53639),l=i(64761),u=i(74118),c=i(11956),d=i(93736),f=i(83392),p=new s({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new d,this._tmpVec2A=new d,this._tmpVec2B=new d,"object"==typeof t?this.fromJSON(t):this.startPoint.set(t,e)},add:function(t){return this.curves.push(t),this},circleTo:function(t,e,i){return void 0===e&&(e=!1),this.ellipseTo(t,t,0,360,e,i)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);return t.equals(e)||this.curves.push(new o(e,t)),this},cubicBezierTo:function(t,e,i,s,r,a){var o,h,l,u=this.getEndPoint();return t instanceof d?(o=t,h=e,l=i):(o=new d(i,s),h=new d(r,a),l=new d(t,e)),this.add(new n(u,o,h,l))},quadraticBezierTo:function(t,e,i,s){var n,r,a=this.getEndPoint();return t instanceof d?(n=t,r=e):(n=new d(i,s),r=new d(t,e)),this.add(new l(a,n,r))},draw:function(t,e){for(var i=0;i=e)return this.curves[s];s++}return null},getEndPoint:function(t){return void 0===t&&(t=new d),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),s=this.getCurveLengths(),n=0;n=i){var r=s[n]-i,a=this.curves[n],o=a.getLength(),h=0===o?0:1-r/o;return a.getPointAt(h,e)}n++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],s=0;s1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new d),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new d),t.copy(this.startPoint)},getTangent:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),s=this.getCurveLengths(),n=0;n=i){var r=s[n]-i,a=this.curves[n],o=a.getLength(),h=0===o?0:1-r/o;return a.getTangentAt(h,e)}n++}return null},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new o([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new h(t.x,t.y)):this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e{var s=i(56694),n=i(35026),r=new s({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(n.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],s=0;s{var s=i(56694),n=i(81078),r=i(91963),a=i(7599),o=new s({Extends:n,initialize:function(t){n.call(this,t,t.sys.events),this.scene=t,this.systems=t.sys,t.sys.events.once(a.BOOT,this.boot,this),t.sys.events.on(a.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(a.DESTROY,this.destroy,this)},start:function(){this.events.once(a.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){n.prototype.destroy.call(this),this.events.off(a.START,this.start,this),this.scene=null,this.systems=null}});r.register("DataManagerPlugin",o,"data"),t.exports=o},73569:t=>{t.exports="changedata"},15590:t=>{t.exports="changedata-"},37669:t=>{t.exports="destroy"},87090:t=>{t.exports="removedata"},90142:t=>{t.exports="setdata"},35026:(t,e,i)=>{t.exports={CHANGE_DATA:i(73569),CHANGE_DATA_KEY:i(15590),DESTROY:i(37669),REMOVE_DATA:i(87090),SET_DATA:i(90142)}},1999:(t,e,i)=>{t.exports={DataManager:i(81078),DataManagerPlugin:i(76508),Events:i(35026)}},10720:(t,e,i)=>{var s=i(1350),n={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return n;n.audioData=!!window.Audio,n.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e){var i=function(e,i){var s=t.canPlayType("audio/"+e).replace(/^no$/,"");return i?Boolean(s||t.canPlayType("audio/"+i).replace(/^no$/,"")):Boolean(s)};if(n.ogg=i('ogg; codecs="vorbis"'),n.opus=i('ogg; codecs="opus"',"opus"),n.mp3=i("mpeg"),n.wav=i("wav"),n.m4a=i("x-m4a"),n.aac=i("aac"),n.flac=i("flac","x-flac"),n.webm=i('webm; codecs="vorbis"'),""!==t.canPlayType('audio/mp4; codecs="ec-3"'))if(s.edge)n.dolby=!0;else if(s.safari&&s.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var r=parseInt(RegExp.$1,10),a=parseInt(RegExp.$2,10);(10===r&&a>=11||r>10)&&(n.dolby=!0)}}}catch(t){}return n}()},1350:(t,e,i)=>{var s,n=i(36580),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};t.exports=(s=navigator.userAgent,/Edge\/\d+/.test(s)?(r.edge=!0,r.es2019=!0):/Chrome\/(\d+)/.test(s)&&!n.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10),r.es2019=r.chromeVersion>69):/Firefox\D+(\d+)/.test(s)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10),r.es2019=r.firefoxVersion>10):/AppleWebKit/.test(s)&&n.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(s)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(s)?(r.opera=!0,r.es2019=!0):/Version\/(\d+\.\d+) Safari/.test(s)&&!n.windowsPhone?(r.safari=!0,r.safariVersion=parseInt(RegExp.$1,10),r.es2019=r.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(s)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(s)&&(r.silk=!0),r)},98581:(t,e,i)=>{var s,n,r,a=i(61068),o={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(o.supportNewBlendModes=(s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",n="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=a.create2D(t,6).getContext("2d",{willReadFrequently:!0});if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;a.remove(t),o.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=s+"/wCKxvRF"+n},r.src=s+"AP804Oa6"+n,!1),o.supportInverseAlpha=function(){var t=a.create2D(this,2).getContext("2d",{willReadFrequently:!0});t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1),s=i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3];return a.remove(this),s}()),o)},90185:(t,e,i)=>{var s=i(36580),n=i(1350),r=i(61068),a={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){if("function"==typeof importScripts)return a;a.canvas=!!window.CanvasRenderingContext2D;try{a.localStorage=!!localStorage.getItem}catch(t){a.localStorage=!1}a.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),a.fileSystem=!!window.requestFileSystem;var t,e,i,o=!1;return a.webGL=function(){if(window.WebGLRenderingContext)try{var t=r.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=r.create2D(this),s=i.getContext("2d",{willReadFrequently:!0}).createImageData(1,1);return o=s.data instanceof Uint8ClampedArray,r.remove(t),r.remove(i),!!e}catch(t){return!1}return!1}(),a.worker=!!window.Worker,a.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,a.getUserMedia=a.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,n.firefox&&n.firefoxVersion<21&&(a.getUserMedia=!1),!s.iOS&&(n.ie||n.firefox||n.chrome)&&(a.canvasBitBltShift=!0),(n.safari||n.mobileSafari)&&(a.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(a.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(a.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),a.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==a.littleEndian&&o,a}()},33553:t=>{var e={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"==typeof importScripts)return e;var t,i="Fullscreen",s="FullScreen",n=["request"+i,"request"+s,"webkitRequest"+i,"webkitRequest"+s,"msRequest"+i,"msRequest"+s,"mozRequest"+s,"mozRequest"+i];for(t=0;t{var s=i(1350),n={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=("function"==typeof importScripts||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(n.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(n.mspointer=!0),navigator.getGamepads&&(n.gamepads=!0),"onwheel"in window||s.ie&&"WheelEvent"in window?n.wheelEvent="wheel":"onmousewheel"in window?n.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(n.wheelEvent="DOMMouseScroll")),n)},36580:t=>{var e={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){if("function"==typeof importScripts)return e;var t=navigator.userAgent;/Windows/.test(t)?e.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(e.iOS=!0,e.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),e.iOSVersion=parseInt(RegExp.$1,10)):e.macOS=!0:/Android/.test(t)?e.android=!0:/Linux/.test(t)?e.linux=!0:/iP[ao]d|iPhone/i.test(t)?(e.iOS=!0,navigator.appVersion.match(/OS (\d+)/),e.iOSVersion=parseInt(RegExp.$1,10),e.iPhone=-1!==t.toLowerCase().indexOf("iphone"),e.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?e.kindle=!0:/CrOS/.test(t)&&(e.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(e.android=!1,e.iOS=!1,e.macOS=!1,e.windows=!0,e.windowsPhone=!0);var i=/Silk/.test(t);return(e.windows||e.macOS||e.linux&&!i||e.chromeOS)&&(e.desktop=!0),(e.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(e.desktop=!1),navigator.standalone&&(e.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(e.cordova=!0),void 0!==window.ejecta&&(e.ejecta=!0)),"undefined"!=typeof process&&process.versions&&process.versions.node&&(e.node=!0),e.node&&"object"==typeof process.versions&&(e.nodeWebkit=!!process.versions["node-webkit"],e.electron=!!process.versions.electron),/Crosswalk/.test(t)&&(e.crosswalk=!0),e.pixelRatio=window.devicePixelRatio||1,e}()},53861:t=>{var e={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return e;var t=document.createElement("video"),i=!!t.canPlayType,s=/^no$/;try{i&&(t.canPlayType('video/ogg; codecs="theora"').replace(s,"")&&(e.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(s,"")&&(e.h264=!0,e.mp4=!0),t.canPlayType("video/x-m4v").replace(s,"")&&(e.m4v=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(s,"")&&(e.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(s,"")&&(e.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(s,"")&&(e.hls=!0))}catch(t){}return e}()},77290:(t,e,i)=>{t.exports={os:i(36580),browser:i(1350),features:i(90185),input:i(95872),audio:i(10720),video:i(53861),fullscreen:i(33553),canvasFeatures:i(98581)}},65246:(t,e,i)=>{var s=new(i(56694))({initialize:function(){this._matrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],this.alpha=1,this._dirty=!0,this._data},set:function(t){return this._matrix=t,this._dirty=!0,this},reset:function(){var t=this._matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=1,t[13]=0,t[14]=0,t[15]=0,t[16]=0,t[17]=0,t[18]=1,t[19]=0,this._dirty=!0,this},getData:function(){if(this._dirty){var t=new Float32Array(this._matrix);t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,this._data=t,this._dirty=!1}return this._data},brightness:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t;return this.multiply([i,0,0,0,0,0,i,0,0,0,0,0,i,0,0,0,0,0,1,0],e)},saturate:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=2*t/3+1,s=-.5*(i-1);return this.multiply([i,s,s,0,0,s,i,s,0,0,s,s,i,0,0,0,0,0,1,0],e)},desaturate:function(t){return void 0===t&&(t=!1),this.saturate(-1,t)},hue:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1),t=t/180*Math.PI;var i=Math.cos(t),s=Math.sin(t),n=.213,r=.715,a=.072;return this.multiply([n+.787*i+s*-n,r+i*-r+s*-r,a+i*-a+.928*s,0,0,n+i*-n+.143*s,r+i*(1-r)+.14*s,a+i*-a+-.283*s,0,0,n+i*-n+-.787*s,r+i*-r+s*r,a+.928*i+s*a,0,0,0,0,0,1,0],e)},grayscale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=!1),this.saturate(-t,e)},blackWhite:function(t){return void 0===t&&(t=!1),this.multiply([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t)},contrast:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t+1,s=-.5*(i-1);return this.multiply([i,0,0,0,s,0,i,0,0,s,0,0,i,0,s,0,0,0,1,0],e)},negative:function(t){return void 0===t&&(t=!1),this.multiply([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],t)},desaturateLuminance:function(t){return void 0===t&&(t=!1),this.multiply([.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],t)},sepia:function(t){return void 0===t&&(t=!1),this.multiply([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t)},night:function(t,e){return void 0===t&&(t=.1),void 0===e&&(e=!1),this.multiply([-2*t,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0],e)},lsd:function(t){return void 0===t&&(t=!1),this.multiply([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},brown:function(t){return void 0===t&&(t=!1),this.multiply([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t)},vintagePinhole:function(t){return void 0===t&&(t=!1),this.multiply([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t)},kodachrome:function(t){return void 0===t&&(t=!1),this.multiply([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],t)},technicolor:function(t){return void 0===t&&(t=!1),this.multiply([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],t)},polaroid:function(t){return void 0===t&&(t=!1),this.multiply([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t)},shiftToBGR:function(t){return void 0===t&&(t=!1),this.multiply([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t)},multiply:function(t,e){e||this.reset();for(var i=this._matrix,s=[],n=0;n<20;n++)s[n]=i[n];return i[0]=s[0]*t[0]+s[1]*t[5]+s[2]*t[10]+s[3]*t[15],i[1]=s[0]*t[1]+s[1]*t[6]+s[2]*t[11]+s[3]*t[16],i[2]=s[0]*t[2]+s[1]*t[7]+s[2]*t[12]+s[3]*t[17],i[3]=s[0]*t[3]+s[1]*t[8]+s[2]*t[13]+s[3]*t[18],i[4]=s[0]*t[4]+s[1]*t[9]+s[2]*t[14]+s[3]*t[19]+s[4],i[5]=s[5]*t[0]+s[6]*t[5]+s[7]*t[10]+s[8]*t[15],i[6]=s[5]*t[1]+s[6]*t[6]+s[7]*t[11]+s[8]*t[16],i[7]=s[5]*t[2]+s[6]*t[7]+s[7]*t[12]+s[8]*t[17],i[8]=s[5]*t[3]+s[6]*t[8]+s[7]*t[13]+s[8]*t[18],i[9]=s[5]*t[4]+s[6]*t[9]+s[7]*t[14]+s[8]*t[19]+s[9],i[10]=s[10]*t[0]+s[11]*t[5]+s[12]*t[10]+s[13]*t[15],i[11]=s[10]*t[1]+s[11]*t[6]+s[12]*t[11]+s[13]*t[16],i[12]=s[10]*t[2]+s[11]*t[7]+s[12]*t[12]+s[13]*t[17],i[13]=s[10]*t[3]+s[11]*t[8]+s[12]*t[13]+s[13]*t[18],i[14]=s[10]*t[4]+s[11]*t[9]+s[12]*t[14]+s[13]*t[19]+s[14],i[15]=s[15]*t[0]+s[16]*t[5]+s[17]*t[10]+s[18]*t[15],i[16]=s[15]*t[1]+s[16]*t[6]+s[17]*t[11]+s[18]*t[16],i[17]=s[15]*t[2]+s[16]*t[7]+s[17]*t[12]+s[18]*t[17],i[18]=s[15]*t[3]+s[16]*t[8]+s[17]*t[13]+s[18]*t[18],i[19]=s[15]*t[4]+s[16]*t[9]+s[17]*t[14]+s[18]*t[19]+s[19],this._dirty=!0,this}});t.exports=s},39298:(t,e,i)=>{var s=i(56694),n=i(72283),r=new s({initialize:function(t,e,i){this._rgb=[0,0,0],this.onChangeCallback=n,this.dirty=!1,this.set(t,e,i)},set:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this._rgb=[t,e,i],this.onChange(),this},equals:function(t,e,i){var s=this._rgb;return s[0]===t&&s[1]===e&&s[2]===i},onChange:function(){this.dirty=!0;var t=this._rgb;this.onChangeCallback.call(this,t[0],t[1],t[2])},r:{get:function(){return this._rgb[0]},set:function(t){this._rgb[0]=t,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(t){this._rgb[1]=t,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(t){this._rgb[2]=t,this.onChange()}},destroy:function(){this.onChangeCallback=null}});t.exports=r},84093:t=>{t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},32058:(t,e,i)=>{var s=i(97328),n=i(59994),r=i(73174),a=i(28417);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,n(e)+i),r(t,s(e)+o),t}},85535:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(73174),a=i(74465);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,n(e)-i),r(t,s(e)+o),t}},9605:(t,e,i)=>{var s=i(97328),n=i(70271),r=i(73174),a=i(19298);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,n(e)+i),r(t,s(e)+o),t}},22529:(t,e,i)=>{var s=i(21843),n=i(59994),r=i(29568);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,n(e)+i,r(e)+a),t}},5739:(t,e,i)=>{var s=i(29568),n=i(40163),r=i(81711),a=i(74465);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,n(e)-i),r(t,s(e)+o),t}},40327:(t,e,i)=>{var s=i(84093),n=[];n[s.BOTTOM_CENTER]=i(32058),n[s.BOTTOM_LEFT]=i(85535),n[s.BOTTOM_RIGHT]=i(9605),n[s.CENTER]=i(22529),n[s.LEFT_CENTER]=i(5739),n[s.RIGHT_CENTER]=i(27683),n[s.TOP_CENTER]=i(96439),n[s.TOP_LEFT]=i(81447),n[s.TOP_RIGHT]=i(47888),n[s.LEFT_BOTTOM]=n[s.BOTTOM_LEFT],n[s.LEFT_TOP]=n[s.TOP_LEFT],n[s.RIGHT_BOTTOM]=n[s.BOTTOM_RIGHT],n[s.RIGHT_TOP]=n[s.TOP_RIGHT];t.exports=function(t,e,i,s,r){return n[i](t,e,s,r)}},27683:(t,e,i)=>{var s=i(29568),n=i(70271),r=i(81711),a=i(19298);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,n(e)+i),r(t,s(e)+o),t}},96439:(t,e,i)=>{var s=i(59994),n=i(47196),r=i(28417),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),r(t,s(e)+i),a(t,n(e)-o),t}},81447:(t,e,i)=>{var s=i(40163),n=i(47196),r=i(74465),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),r(t,s(e)-i),a(t,n(e)-o),t}},47888:(t,e,i)=>{var s=i(70271),n=i(47196),r=i(19298),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),r(t,s(e)+i),a(t,n(e)-o),t}},46997:(t,e,i)=>{t.exports={BottomCenter:i(32058),BottomLeft:i(85535),BottomRight:i(9605),Center:i(22529),LeftCenter:i(5739),QuickSet:i(40327),RightCenter:i(27683),TopCenter:i(96439),TopLeft:i(81447),TopRight:i(47888)}},93545:(t,e,i)=>{var s=i(84093),n=i(98611),r={In:i(46997),To:i(86639)};r=n(!1,r,s),t.exports=r},27118:(t,e,i)=>{var s=i(97328),n=i(59994),r=i(28417),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),r(t,n(e)+i),a(t,s(e)+o),t}},84469:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(74465),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),r(t,n(e)-i),a(t,s(e)+o),t}},51577:(t,e,i)=>{var s=i(97328),n=i(70271),r=i(19298),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),r(t,n(e)+i),a(t,s(e)+o),t}},90271:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(73174),a=i(19298);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,n(e)-i),r(t,s(e)+o),t}},30466:(t,e,i)=>{var s=i(29568),n=i(40163),r=i(81711),a=i(19298);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,n(e)-i),r(t,s(e)+o),t}},50087:(t,e,i)=>{var s=i(40163),n=i(47196),r=i(19298),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),r(t,s(e)-i),a(t,n(e)-o),t}},82590:(t,e,i)=>{var s=i(84093),n=[];n[s.BOTTOM_CENTER]=i(27118),n[s.BOTTOM_LEFT]=i(84469),n[s.BOTTOM_RIGHT]=i(51577),n[s.LEFT_BOTTOM]=i(90271),n[s.LEFT_CENTER]=i(30466),n[s.LEFT_TOP]=i(50087),n[s.RIGHT_BOTTOM]=i(13555),n[s.RIGHT_CENTER]=i(99049),n[s.RIGHT_TOP]=i(67788),n[s.TOP_CENTER]=i(78170),n[s.TOP_LEFT]=i(54145),n[s.TOP_RIGHT]=i(75548);t.exports=function(t,e,i,s,r){return n[i](t,e,s,r)}},13555:(t,e,i)=>{var s=i(97328),n=i(70271),r=i(73174),a=i(74465);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,n(e)+i),r(t,s(e)+o),t}},99049:(t,e,i)=>{var s=i(29568),n=i(70271),r=i(81711),a=i(74465);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,n(e)+i),r(t,s(e)+o),t}},67788:(t,e,i)=>{var s=i(70271),n=i(47196),r=i(74465),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),r(t,s(e)+i),a(t,n(e)-o),t}},78170:(t,e,i)=>{var s=i(59994),n=i(47196),r=i(73174),a=i(28417);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,s(e)+i),r(t,n(e)-o),t}},54145:(t,e,i)=>{var s=i(40163),n=i(47196),r=i(73174),a=i(74465);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,s(e)-i),r(t,n(e)-o),t}},75548:(t,e,i)=>{var s=i(70271),n=i(47196),r=i(73174),a=i(19298);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,s(e)+i),r(t,n(e)-o),t}},86639:(t,e,i)=>{t.exports={BottomCenter:i(27118),BottomLeft:i(84469),BottomRight:i(51577),LeftBottom:i(90271),LeftCenter:i(30466),LeftTop:i(50087),QuickSet:i(82590),RightBottom:i(13555),RightCenter:i(99049),RightTop:i(67788),TopCenter:i(78170),TopLeft:i(54145),TopRight:i(75548)}},21843:(t,e,i)=>{var s=i(28417),n=i(81711);t.exports=function(t,e,i){return s(t,e),n(t,i)}},97328:t=>{t.exports=function(t){return t.y+t.height-t.height*t.originY}},7126:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(70271),a=i(47196);t.exports=function(t,e){void 0===e&&(e={});var i=n(t),o=a(t);return e.x=i,e.y=o,e.width=r(t)-i,e.height=s(t)-o,e}},59994:t=>{t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},29568:t=>{t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},40163:t=>{t.exports=function(t){return t.x-t.width*t.originX}},52088:t=>{t.exports=function(t){return t.width*t.originX}},23379:t=>{t.exports=function(t){return t.height*t.originY}},70271:t=>{t.exports=function(t){return t.x+t.width-t.width*t.originX}},47196:t=>{t.exports=function(t){return t.y-t.height*t.originY}},73174:t=>{t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},28417:t=>{t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},81711:t=>{t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},74465:t=>{t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},19298:t=>{t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},84349:t=>{t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},15252:(t,e,i)=>{t.exports={CenterOn:i(21843),GetBottom:i(97328),GetBounds:i(7126),GetCenterX:i(59994),GetCenterY:i(29568),GetLeft:i(40163),GetOffsetX:i(52088),GetOffsetY:i(23379),GetRight:i(70271),GetTop:i(47196),SetBottom:i(73174),SetCenterX:i(28417),SetCenterY:i(81711),SetLeft:i(74465),SetRight:i(19298),SetTop:i(84349)}},70616:t=>{t.exports={setCrisp:function(t){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach((function(e){t.style["image-rendering"]=e})),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},61068:(t,e,i)=>{var s,n,r,a=i(86459),o=i(8213),h=[],l=!1;t.exports=(r=function(){var t=0;return h.forEach((function(e){e.parent&&t++})),t},{create2D:function(t,e,i){return s(t,e,i,a.CANVAS)},create:s=function(t,e,i,s,r){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=a.CANVAS),void 0===r&&(r=!1);var c=n(s);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:s},s===a.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),r&&(c.parent=u),u.width=e,u.height=i,l&&s===a.CANVAS&&o.disable(u.getContext("2d")),u},createWebGL:function(t,e,i){return s(t,e,i,a.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:n=function(t){if(void 0===t&&(t=a.CANVAS),t===a.WEBGL)return null;for(var e=0;e{var e,i="";t.exports={disable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!1),t},enable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!0),t},getPrefix:e=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i{t.exports=function(t,e){return void 0===e&&(e="none"),t.style.msTouchAction=e,t.style["ms-touch-action"]=e,t.style["touch-action"]=e,t}},36505:t=>{t.exports=function(t,e){void 0===e&&(e="none");return["-webkit-","-khtml-","-moz-","-ms-",""].forEach((function(i){t.style[i+"user-select"]=e})),t.style["-webkit-touch-callout"]=e,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t}},23514:(t,e,i)=>{t.exports={CanvasInterpolation:i(70616),CanvasPool:i(61068),Smoothing:i(8213),TouchAction:i(59271),UserSelect:i(36505)}},27119:(t,e,i)=>{var s=i(56694),n=i(22946),r=i(5657),a=i(24650),o=i(68033),h=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,s)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(t,e,i,s,n){return void 0===s&&(s=255),void 0===n&&(n=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=s,this._locked=!1,this.update(n)},setGLTo:function(t,e,i,s){return void 0===s&&(s=1),this._locked=!0,this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=s,this._locked=!1,this.update(!0)},setFromRGB:function(t){return this._locked=!0,this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this._locked=!1,this.update(!0)},setFromHSV:function(t,e,i){return a(t,e,i,this)},update:function(t){if(void 0===t&&(t=!1),this._locked)return this;var e=this.r,i=this.g,s=this.b,a=this.a;return this._color=n(e,i,s),this._color32=r(e,i,s,a),this._rgba="rgba("+e+","+i+","+s+","+a/255+")",t&&o(e,i,s,this),this},updateHSV:function(){var t=this.r,e=this.g,i=this.b;return o(t,e,i,this),this},clone:function(){return new h(this.r,this.g,this.b,this.a)},gray:function(t){return this.setTo(t,t,t)},random:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t)),s=Math.floor(t+Math.random()*(e-t)),n=Math.floor(t+Math.random()*(e-t));return this.setTo(i,s,n)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t));return this.setTo(i,i,i)},saturate:function(t){return this.s+=t/100,this},desaturate:function(t){return this.s-=t/100,this},lighten:function(t){return this.v+=t/100,this},darken:function(t){return this.v-=t/100,this},brighten:function(t){var e=this.r,i=this.g,s=this.b;return e=Math.max(0,Math.min(255,e-Math.round(-t/100*255))),i=Math.max(0,Math.min(255,i-Math.round(-t/100*255))),s=Math.max(0,Math.min(255,s-Math.round(-t/100*255))),this.setTo(e,i,s)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(t){this.gl[0]=Math.min(Math.abs(t),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(t){this.gl[1]=Math.min(Math.abs(t),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(t){this.gl[2]=Math.min(Math.abs(t),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(t){this.gl[3]=Math.min(Math.abs(t),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(t){t=Math.floor(Math.abs(t)),this.r=Math.min(t,255),this.gl[0]=t/255,this.update(!0)}},green:{get:function(){return this.g},set:function(t){t=Math.floor(Math.abs(t)),this.g=Math.min(t,255),this.gl[1]=t/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(t){t=Math.floor(Math.abs(t)),this.b=Math.min(t,255),this.gl[2]=t/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(t){t=Math.floor(Math.abs(t)),this.a=Math.min(t,255),this.gl[3]=t/255,this.update()}},h:{get:function(){return this._h},set:function(t){this._h=t,a(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,a(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,a(this._h,this._s,t,this)}}});t.exports=h},30245:(t,e,i)=>{var s=i(22946);t.exports=function(t){void 0===t&&(t=1024);var e,i=[],n=255,r=255,a=0,o=0;for(e=0;e<=n;e++)i.push({r:r,g:e,b:o,color:s(r,e,o)});for(a=255,e=n;e>=0;e--)i.push({r:e,g:a,b:o,color:s(e,a,o)});for(r=0,e=0;e<=n;e++,a--)i.push({r:r,g:a,b:e,color:s(r,a,e)});for(a=0,o=255,e=0;e<=n;e++,o--,r++)i.push({r:r,g:a,b:o,color:s(r,a,o)});if(1024===t)return i;var h=[],l=0,u=1024/t;for(e=0;e{t.exports=function(t){var e={r:t>>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},25409:t=>{t.exports=function(t){var e=t.toString(16);return 1===e.length?"0"+e:e}},22946:t=>{t.exports=function(t,e,i){return t<<16|e<<8|i}},5657:t=>{t.exports=function(t,e,i,s){return s<<24|t<<16|e<<8|i}},74777:(t,e,i)=>{var s=i(27119),n=i(59998);t.exports=function(t,e,i){var r=i,a=i,o=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=n(l,h,t+1/3),a=n(l,h,t),o=n(l,h,t-1/3)}return(new s).setGLTo(r,a,o,1)}},89263:(t,e,i)=>{var s=i(24650);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],n=0;n<=359;n++)i.push(s(n/359,t,e));return i}},24650:(t,e,i)=>{var s=i(22946);function n(t,e,i,s){var n=(t+6*e)%6,r=Math.min(n,4-n,1);return Math.round(255*(s-s*i*Math.max(0,r)))}t.exports=function(t,e,i,r){void 0===e&&(e=1),void 0===i&&(i=1);var a=n(5,t,e,i),o=n(3,t,e,i),h=n(1,t,e,i);return r?r.setTo?r.setTo(a,o,h,r.alpha,!0):(r.r=a,r.g=o,r.b=h,r.color=s(a,o,h),r):{r:a,g:o,b:h,color:s(a,o,h)}}},91487:(t,e,i)=>{var s=i(27119);t.exports=function(t){var e=new s;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,i,s){return e+e+i+i+s+s}));var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var n=parseInt(i[1],16),r=parseInt(i[2],16),a=parseInt(i[3],16);e.setTo(n,r,a)}return e}},59998:t=>{t.exports=function(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},74853:(t,e,i)=>{var s=i(27119),n=i(15978);t.exports=function(t){var e=n(t);return new s(e.r,e.g,e.b,e.a)}},15978:t=>{t.exports=function(t){return t>16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},53756:(t,e,i)=>{var s=i(42798),n=function(t,e,i,n,r,a,o,h){void 0===o&&(o=100),void 0===h&&(h=0);var l=h/o;return{r:s(t,n,l),g:s(e,r,l),b:s(i,a,l)}};t.exports={RGBWithRGB:n,ColorWithRGB:function(t,e,i,s,r,a){return void 0===r&&(r=100),void 0===a&&(a=0),n(t.r,t.g,t.b,e,i,s,r,a)},ColorWithColor:function(t,e,i,s){return void 0===i&&(i=100),void 0===s&&(s=0),n(t.r,t.g,t.b,e.r,e.g,e.b,i,s)}}},73904:(t,e,i)=>{var s=i(27119);t.exports=function(t){return new s(t.r,t.g,t.b,t.a)}},26841:(t,e,i)=>{var s=i(27119);t.exports=function(t){var e=new s,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var n=parseInt(i[1],10),r=parseInt(i[2],10),a=parseInt(i[3],10),o=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(n,r,a,255*o)}return e}},68033:t=>{t.exports=function(t,e,i,s){void 0===s&&(s={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var n=Math.min(t,e,i),r=Math.max(t,e,i),a=r-n,o=0,h=0===r?0:a/r,l=r;return r!==n&&(r===t?o=(e-i)/a+(e{var s=i(25409);t.exports=function(t,e,i,n,r){return void 0===n&&(n=255),void 0===r&&(r="#"),"#"===r?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1,7):"0x"+s(n)+s(t)+s(e)+s(i)}},37243:(t,e,i)=>{var s=i(17489),n=i(27119);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new n(s(t,e),s(t,e),s(t,e))}},93222:(t,e,i)=>{var s=i(91487),n=i(74853),r=i(73904),a=i(26841);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?a(t):s(t);case"number":return n(t);case"object":return r(t)}}},95509:(t,e,i)=>{var s=i(27119);s.ColorSpectrum=i(30245),s.ColorToRGBA=i(86672),s.ComponentToHex=i(25409),s.GetColor=i(22946),s.GetColor32=i(5657),s.HexStringToColor=i(91487),s.HSLToColor=i(74777),s.HSVColorWheel=i(89263),s.HSVToRGB=i(24650),s.HueToComponent=i(59998),s.IntegerToColor=i(74853),s.IntegerToRGB=i(15978),s.Interpolate=i(53756),s.ObjectToColor=i(73904),s.RandomRGB=i(37243),s.RGBStringToColor=i(26841),s.RGBToHSV=i(68033),s.RGBToString=i(4880),s.ValueToColor=i(93222),t.exports=s},24816:(t,e,i)=>{t.exports={Align:i(93545),BaseShader:i(31053),Bounds:i(15252),Canvas:i(23514),Color:i(95509),ColorMatrix:i(65246),Masks:i(93310),RGB:i(39298)}},76756:(t,e,i)=>{var s=i(56694),n=i(61286),r=new s({initialize:function(t,e,i,s,n,r){e||(e=t.sys.make.image({x:i,y:s,key:n,frame:r,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e,i)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});n.register("bitmapMask",(function(t,e,i,s,n){return new r(this.scene,t,e,i,s,n)})),t.exports=r},63037:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var s=t.gl;t.flush(),0===t.maskStack.length&&(s.enable(s.STENCIL_TEST),s.clear(s.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var s=t.gl,n=this.geometryMask,r=t.maskCount;s.colorMask(!1,!1,!1,!1),i?(s.stencilFunc(s.EQUAL,r,255),s.stencilOp(s.KEEP,s.KEEP,s.INCR)):(s.stencilFunc(s.EQUAL,r+1,255),s.stencilOp(s.KEEP,s.KEEP,s.DECR)),n.renderWebGL(t,n,e),t.flush(),s.colorMask(!0,!0,!0,!0),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),i?this.invertAlpha?s.stencilFunc(s.NOTEQUAL,r+1,255):s.stencilFunc(s.EQUAL,r+1,255):this.invertAlpha?s.stencilFunc(s.NOTEQUAL,r,255):s.stencilFunc(s.EQUAL,r,255)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;if(0===t.maskStack.length)i.mask=null,e.disable(e.STENCIL_TEST);else{var s=t.maskStack[t.maskStack.length-1];s.mask.applyStencil(t,s.camera,!1),t.currentCameraMask.mask!==s.mask?(i.mask=s.mask,i.camera=s.camera):i.mask=null}},preRenderCanvas:function(t,e,i){var s=this.geometryMask;t.currentContext.save(),s.renderCanvas(t,s,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=s},93310:(t,e,i)=>{t.exports={BitmapMask:i(76756),GeometryMask:i(63037)}},31053:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s){e&&""!==e||(e=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join("\n")),i&&""!==i||(i=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join("\n")),void 0===s&&(s=null),this.key=t,this.fragmentSrc=e,this.vertexSrc=i,this.uniforms=s}});t.exports=s},99584:t=>{t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement||null===e)return t;return i||(i=document.body),i.appendChild(t),t}},85178:(t,e,i)=>{var s=i(99584);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+e.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=i,s(i,e.parent)}}},21546:(t,e,i)=>{var s=i(36580);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?s.cordova?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},74181:t=>{t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},s=document.createElement("div");return s.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(s),i.w=90===e?s.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:s.offsetHeight,document.documentElement.removeChild(s),s=null,90!==Math.abs(window.orientation)?i.h:i.w}},9229:(t,e,i)=>{var s=i(55301);t.exports=function(t,e){var i=window.screen,n=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);return n&&"string"==typeof n.type?n.type:"string"==typeof n?n:"number"==typeof window.orientation?0===window.orientation||180===window.orientation?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE:window.matchMedia?window.matchMedia("(orientation: portrait)").matches?s.ORIENTATION.PORTRAIT:window.matchMedia("(orientation: landscape)").matches?s.ORIENTATION.LANDSCAPE:void 0:e>t?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE}},2893:t=>{t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||(e=document.body),e}},89200:t=>{t.exports=function(t){var e="";try{if(window.DOMParser)e=(new DOMParser).parseFromString(t,"text/xml");else(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},55638:t=>{t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},27385:(t,e,i)=>{var s=i(56694),n=i(72283),r=new s({initialize:function(){this.isRunning=!1,this.callback=n,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var t=this;this.step=function e(i){t.callback(i),t.isRunning&&(t.timeOutID=window.requestAnimationFrame(e))},this.stepTimeout=function e(){t.isRunning&&(t.timeOutID=window.setTimeout(e,t.delay)),t.callback(window.performance.now())}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.delay=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=n}});t.exports=r},3590:(t,e,i)=>{var s={AddToDOM:i(99584),DOMContentLoaded:i(21546),GetInnerHeight:i(74181),GetScreenOrientation:i(9229),GetTarget:i(2893),ParseXML:i(89200),RemoveFromDOM:i(55638),RequestAnimationFrame:i(27385)};t.exports=s},78491:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(91963),a=new s({Extends:n,initialize:function(){n.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",a,"events"),t.exports=a},95146:(t,e,i)=>{t.exports={EventEmitter:i(78491)}},88933:(t,e,i)=>{var s=i(95723),n=i(20494);t.exports=function(t,e,i){e.x=n(i,"x",0),e.y=n(i,"y",0),e.depth=n(i,"depth",0),e.flipX=n(i,"flipX",!1),e.flipY=n(i,"flipY",!1);var r=n(i,"scale",null);"number"==typeof r?e.setScale(r):null!==r&&(e.scaleX=n(r,"x",1),e.scaleY=n(r,"y",1));var a=n(i,"scrollFactor",null);"number"==typeof a?e.setScrollFactor(a):null!==a&&(e.scrollFactorX=n(a,"x",1),e.scrollFactorY=n(a,"y",1)),e.rotation=n(i,"rotation",0);var o=n(i,"angle",null);null!==o&&(e.angle=o),e.alpha=n(i,"alpha",1);var h=n(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=n(h,"x",.5),u=n(h,"y",.5);e.setOrigin(l,u)}return e.blendMode=n(i,"blendMode",s.NORMAL),e.visible=n(i,"visible",!0),n(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},32291:(t,e,i)=>{var s=i(20494);t.exports=function(t,e){var i=s(e,"anims",null);if(null===i)return t;if("string"==typeof i)t.anims.play(i);else if("object"==typeof i){var n=t.anims,r=s(i,"key",void 0);if(r){var a=s(i,"startFrame",void 0),o=s(i,"delay",0),h=s(i,"repeat",0),l=s(i,"repeatDelay",0),u=s(i,"yoyo",!1),c=s(i,"play",!1),d=s(i,"delayedPlay",0),f={key:r,delay:o,repeat:h,repeatDelay:l,yoyo:u,startFrame:a};c?n.play(f):d>0?n.playAfterDelay(f,d):n.load(f)}}return t}},91713:(t,e,i)=>{var s=i(56694),n=i(71207),r=i(91963),a=i(56631),o=i(7599),h=i(17922),l=new s({Extends:n,initialize:function(t){n.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(o.BOOT,this.boot,this),this.events.on(o.START,this.start,this)},boot:function(){this.events.once(o.DESTROY,this.destroy,this)},addChildCallback:function(t){t.displayList&&t.displayList!==this&&t.removeFromDisplayList(),t.parentContainer&&t.parentContainer.remove(t),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(a.ADDED_TO_SCENE,t,this.scene),this.events.emit(o.ADDED_TO_SCENE,t,this.scene))},removeChildCallback:function(t){this.queueDepthSort(),t.displayList=null,t.emit(a.REMOVED_FROM_SCENE,t,this.scene),this.events.emit(o.REMOVED_FROM_SCENE,t,this.scene)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(h(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},shutdown:function(){for(var t=this.list;t.length;)t[0].destroy(!0);this.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});r.register("DisplayList",l,"displayList"),t.exports=l},89980:(t,e,i)=>{var s=i(56694),n=i(48129),r=i(81078),a=i(6659),o=i(56631),h=i(7599),l=new s({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(o.ADDED_TO_SCENE,this.addedToScene,this),this.on(o.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(t,e){return this.data||(this.data=new r(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new r(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new r(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new r(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return n(this)},willRender:function(t){return!(!(!this.displayList||!this.displayList.active||this.displayList.willRender(t))||l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(o.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t&&t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(o.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(o.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},99325:(t,e,i)=>{var s=i(56694),n=i(91963),r=i(7599),a=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});a.register=function(t,e){a.prototype.hasOwnProperty(t)||(a.prototype[t]=e)},a.remove=function(t){a.prototype.hasOwnProperty(t)&&delete a.prototype[t]},n.register("GameObjectCreator",a,"make"),t.exports=a},61286:(t,e,i)=>{var s=i(56694),n=i(91963),r=i(7599),a=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});a.register=function(t,e){a.prototype.hasOwnProperty(t)||(a.prototype[t]=e)},a.remove=function(t){a.prototype.hasOwnProperty(t)&&delete a.prototype[t]},n.register("GameObjectFactory",a,"add"),t.exports=a},73329:(t,e,i)=>{var s=i(69360),n=new s,r=new s,a=new s,o={camera:n,sprite:r,calc:a};t.exports=function(t,e,i){var s=n,h=r,l=a;return h.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),h.e=t.x,h.f=t.y):(h.e-=e.scrollX*t.scrollFactorX,h.f-=e.scrollY*t.scrollFactorY),s.multiply(h,l),o}},92034:(t,e,i)=>{var s=i(56694),n=i(74623),r=i(91963),a=i(7599),o=new s({Extends:n,initialize:function(t){n.call(this),this.checkQueue=!0,this.scene=t,this.systems=t.sys,t.sys.events.once(a.BOOT,this.boot,this),t.sys.events.on(a.START,this.start,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(a.PRE_UPDATE,this.update,this),t.on(a.UPDATE,this.sceneUpdate,this),t.once(a.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(t,e){for(var i=this._active,s=i.length,n=0;n{t.exports=function(t,e,i,s,n,r,a,o,h,l,u,c,d,f,p){var v=i.x-e.displayOriginX+n,g=i.y-e.displayOriginY+r,m=v+i.w,y=g+i.h,x=a.getXRound(v,g,o),T=a.getYRound(v,g,o),w=a.getXRound(v,y,o),E=a.getYRound(v,y,o),S=a.getXRound(m,y,o),b=a.getYRound(m,y,o),A=a.getXRound(m,g,o),_=a.getYRound(m,g,o);t.batchQuad(e,x,T,w,E,S,b,A,_,s.u0,s.v0,s.u1,s.v1,h,l,u,c,d,f,p)}},82173:t=>{t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),void 0===s)return s={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0};var n,r,a,o,h=t.text,l=h.length,u=t.maxWidth,c=t.wordWrapCharCode,d=Number.MAX_VALUE,f=Number.MAX_VALUE,p=0,v=0,g=t.fontData.chars,m=t.fontData.lineHeight,y=t.letterSpacing,x=t.lineSpacing,T=0,w=0,E=0,S=null,b=t._align,A=0,_=0,C=t.fontSize/t.fontData.size,R=C*t.scaleX,M=C*t.scaleY,P=null,O=0,L=[],F=Number.MAX_VALUE,D=0,k=0,I=0,B=[],N=[],Y=null;if(u>0){for(n=0;nu||H-z>u?(G.push(W.i-1),W.cr?(G.push(W.i+W.word.length),z=0,X=null):X=W):W.cr&&(G.push(W.i+W.word.length),z=0,X=null)}for(n=G.length-1;n>=0;n--)r=h,a=G[n],o="\n",h=r.substr(0,a)+o+r.substr(a+1);s.wrappedText=h,l=h.length,B=[],Y=null}var j=0;for(n=0;nA&&(d=A),f>_&&(f=_);var q=A+S.xAdvance,Z=_+m;pD&&(D=I),ID&&(D=I),I0)for(var Q=0;Q{var s=i(31476);t.exports=function(t,e,i,n,r,a,o){var h=t.sys.textures.get(i),l=h.get(n),u=t.sys.cache.xml.get(r);if(l&&u){var c=s(u,l,a,o,h);return t.sys.cache.bitmapFont.add(e,{data:c,texture:i,frame:n,fromAtlas:!0}),!0}return!1}},39860:(t,e,i)=>{var s=i(10850);t.exports=function(t,e){var i=e.width,n=e.height,r=Math.floor(i/2),a=Math.floor(n/2),o=s(e,"chars","");if(""!==o){var h=s(e,"image",""),l=t.sys.textures.getFrame(h),u=l.cutX,c=l.cutY,d=l.source.width,f=l.source.height,p=s(e,"offset.x",0),v=s(e,"offset.y",0),g=s(e,"spacing.x",0),m=s(e,"spacing.y",0),y=s(e,"lineSpacing",0),x=s(e,"charsPerRow",null);null===x&&(x=d/i)>o.length&&(x=o.length);for(var T=p,w=v,E={retroFont:!0,font:h,size:i,lineHeight:n+y,chars:{}},S=0,b=0;b{function e(t,e){return parseInt(t.getAttribute(e),10)}t.exports=function(t,i,s,n,r){void 0===s&&(s=0),void 0===n&&(n=0);var a=i.cutX,o=i.cutY,h=i.source.width,l=i.source.height,u=i.sourceIndex,c={},d=t.getElementsByTagName("info")[0],f=t.getElementsByTagName("common")[0];c.font=d.getAttribute("face"),c.size=e(d,"size"),c.lineHeight=e(f,"lineHeight")+n,c.chars={};var p=t.getElementsByTagName("char"),v=void 0!==i&&i.trimmed;if(v)var g=i.height,m=i.width;for(var y=0;y{var s=i(66863),n=i(98611),r={Parse:i(39860)};r=n(!1,r,s),t.exports=r},66863:t=>{t.exports={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},13468:(t,e,i)=>{var s=i(44616),n=i(56694),r=i(88899),a=new n({Extends:s,Mixins:[r],initialize:function(t,e,i,n,r,a,o){s.call(this,t,e,i,n,r,a,o),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}});t.exports=a},93438:(t,e,i)=>{var s=i(49584);t.exports=function(t,e,i,n){var r=e._text,a=r.length,o=t.currentContext;if(0!==a&&s(t,o,e,i,n)){i.addToRenderList(e);var h=e.fromAtlas?e.frame:e.texture.frames.__BASE,l=e.displayCallback,u=e.callbackData,c=e.fontData.chars,d=e.fontData.lineHeight,f=e._letterSpacing,p=0,v=0,g=0,m=null,y=0,x=0,T=0,w=0,E=0,S=0,b=null,A=0,_=e.frame.source.image,C=h.cutX,R=h.cutY,M=0,P=0,O=e._fontSize/e.fontData.size,L=e._align,F=0,D=0;e.getTextBounds(!1);var k=e._bounds.lines;1===L?D=(k.longest-k.lengths[0])/2:2===L&&(D=k.longest-k.lengths[0]),o.translate(-e.displayOriginX,-e.displayOriginY);var I=i.roundPixels;e.cropWidth>0&&e.cropHeight>0&&(o.beginPath(),o.rect(0,0,e.cropWidth,e.cropHeight),o.clip());for(var B=0;B{var s=i(13468),n=i(88933),r=i(99325),a=i(20494);r.register("dynamicBitmapText",(function(t,e){void 0===t&&(t={});var i=a(t,"font",""),r=a(t,"text",""),o=a(t,"size",!1),h=new s(this.scene,0,0,i,r,o);return void 0!==e&&(t.add=e),n(this.scene,h,t),h}))},94145:(t,e,i)=>{var s=i(13468);i(61286).register("dynamicBitmapText",(function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,n,r))}))},88899:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(16873),r=i(93438),t.exports={renderWebGL:n,renderCanvas:r}},16873:(t,e,i)=>{var s=i(73329),n=i(69360),r=i(75512),a=new n;t.exports=function(t,e,i,n){var o=e.text,h=o.length;if(0!==h){i.addToRenderList(e);var l=t.pipelines.set(e.pipeline,e),u=s(e,i,n),c=u.sprite,d=u.calc,f=a,p=e.cropWidth>0||e.cropHeight>0;p&&(l.flush(),t.pushScissor(d.tx,d.ty,e.cropWidth*d.scaleX,e.cropHeight*d.scaleY));var v,g,m=e.frame.glTexture,y=e.tintFill,x=r.getTintAppendFloatAlpha(e.tintTopLeft,i.alpha*e._alphaTL),T=r.getTintAppendFloatAlpha(e.tintTopRight,i.alpha*e._alphaTR),w=r.getTintAppendFloatAlpha(e.tintBottomLeft,i.alpha*e._alphaBL),E=r.getTintAppendFloatAlpha(e.tintBottomRight,i.alpha*e._alphaBR),S=l.setGameObject(e),b=0,A=0,_=0,C=0,R=e.letterSpacing,M=0,P=0,O=e.scrollX,L=e.scrollY,F=e.fontData,D=F.chars,k=F.lineHeight,I=e.fontSize/F.size,B=0,N=e._align,Y=0,U=0,X=e.getTextBounds(!1);e.maxWidth>0&&(h=(o=X.wrappedText).length);var z=e._bounds.lines;1===N?U=(z.longest-z.lengths[0])/2:2===N&&(U=z.longest-z.lengths[0]);var G=i.roundPixels,W=e.displayCallback,V=e.callbackData;t.pipelines.preBatch(e);for(var H=0;H{var s=i(56694),n=i(82897),r=i(64937),a=i(89980),o=i(82173),h=i(68298),l=i(31476),u=i(74118),c=i(84557),d=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Texture,r.Tint,r.Transform,r.Visible,c],initialize:function(t,e,i,s,n,r,h){void 0===n&&(n=""),void 0===h&&(h=0),a.call(this,t,"BitmapText"),this.font=s;var l=this.scene.sys.cache.bitmapFont.get(s);l||console.warn("Invalid BitmapText key: "+s),this.fontData=l.data,this._text="",this._fontSize=r||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=h,this._bounds=o(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=l.fromAtlas,this.setTexture(l.texture,l.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.setText(n)},setLeftAlign:function(){return this._align=d.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=d.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=d.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(t){return this._fontSize=t,this._dirty=!0,this},setLetterSpacing:function(t){return void 0===t&&(t=0),this._letterSpacing=t,this._dirty=!0,this},setLineSpacing:function(t){return void 0===t&&(t=0),this.lineSpacing=t,this},setText:function(t){return t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t!==this.text&&(this._text=t.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=.5),this.dropShadowX=t,this.dropShadowY=e,this.dropShadowColor=i,this.dropShadowAlpha=s,this},setCharacterTint:function(t,e,i,s,r,a,o){void 0===t&&(t=0),void 0===e&&(e=1),void 0===i&&(i=!1),void 0===s&&(s=-1),void 0===r&&(r=s,a=s,o=s);var h=this.text.length;-1===e&&(e=h),t<0&&(t=h+t),t=n(t,0,h-1);for(var l=n(t+e,t,h),u=this.charColors,c=t;c{var s=i(49584);t.exports=function(t,e,i,n){var r=e._text,a=r.length,o=t.currentContext;if(0!==a&&s(t,o,e,i,n)){i.addToRenderList(e);var h=e.fromAtlas?e.frame:e.texture.frames.__BASE,l=e.fontData.chars,u=e.fontData.lineHeight,c=e._letterSpacing,d=e._lineSpacing,f=0,p=0,v=0,g=null,m=0,y=0,x=0,T=0,w=0,E=0,S=null,b=0,A=h.source.image,_=h.cutX,C=h.cutY,R=e._fontSize/e.fontData.size,M=e._align,P=0,O=0,L=e.getTextBounds(!1);e.maxWidth>0&&(a=(r=L.wrappedText).length);var F=e._bounds.lines;1===M?O=(F.longest-F.lengths[0])/2:2===M&&(O=F.longest-F.lengths[0]),o.translate(-e.displayOriginX,-e.displayOriginY);for(var D=i.roundPixels,k=0;k{var s=i(44616),n=i(88933),r=i(99325),a=i(20494),o=i(10850);r.register("bitmapText",(function(t,e){void 0===t&&(t={});var i=o(t,"font",""),r=a(t,"text",""),h=a(t,"size",!1),l=o(t,"align",0),u=new s(this.scene,0,0,i,r,h,l);return void 0!==e&&(t.add=e),n(this.scene,u,t),u}))},21797:(t,e,i)=>{var s=i(44616);i(61286).register("bitmapText",(function(t,e,i,n,r,a){return this.displayList.add(new s(this.scene,t,e,i,n,r,a))}))},84557:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(26372),r=i(97545),t.exports={renderWebGL:n,renderCanvas:r}},26372:(t,e,i)=>{var s=i(8810),n=i(73329),r=i(75512);t.exports=function(t,e,i,a){if(0!==e._text.length){i.addToRenderList(e);var o,h,l,u=t.pipelines.set(e.pipeline,e),c=n(e,i,a).calc,d=i.roundPixels,f=i.alpha,p=e.charColors,v=e.tintFill,g=r.getTintAppendFloatAlpha,m=g(e.tintTopLeft,f*e._alphaTL),y=g(e.tintTopRight,f*e._alphaTR),x=g(e.tintBottomLeft,f*e._alphaBL),T=g(e.tintBottomRight,f*e._alphaBR),w=e.frame.glTexture,E=u.setGameObject(e),S=e.getTextBounds(!1).characters,b=e.dropShadowX,A=e.dropShadowY,_=0!==b||0!==A;if(t.pipelines.preBatch(e),_){var C=e.dropShadowColor,R=e.dropShadowAlpha,M=g(C,f*R*e._alphaTL),P=g(C,f*R*e._alphaTR),O=g(C,f*R*e._alphaBL),L=g(C,f*R*e._alphaBR);for(o=0;o{var s=i(92246),n=i(41664),r=i(56694),a=i(64937),o=i(82047),h=i(89980),l=i(71207),u=new r({Extends:h,Mixins:[a.Alpha,a.BlendMode,a.Depth,a.Mask,a.Pipeline,a.ScrollFactor,a.Size,a.Texture,a.Transform,a.Visible,s],initialize:function(t,e,i,s,n){h.call(this,t,"Blitter"),this.setTexture(s,n),this.setPosition(e,i),this.initPipeline(),this.children=new l,this.renderList=[],this.dirty=!1},create:function(t,e,i,s,r){void 0===s&&(s=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof o||(i=this.texture.get(i));var a=new n(this,t,e,i,s);return this.children.addAt(a,r,!1),this.dirty=!0,a},createFromCallback:function(t,e,i,s){for(var n=this.createMultiple(e,i,s),r=0;r0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});t.exports=u},33177:t=>{t.exports=function(t,e,i,s){var n=e.getRenderList();if(0!==n.length){var r=t.currentContext,a=i.alpha*e.alpha;if(0!==a){i.addToRenderList(e),r.globalCompositeOperation=t.blendModes[e.blendMode],r.imageSmoothingEnabled=!e.frame.source.scaleMode;var o=e.x-i.scrollX*e.scrollFactorX,h=e.y-i.scrollY*e.scrollFactorY;r.save(),s&&s.copyToContext(r);for(var l=i.roundPixels,u=0;u0&&p.height>0&&(r.save(),r.translate(c.x+o,c.y+h),r.scale(m,y),r.drawImage(f.source.image,p.x,p.y,p.width,p.height,v,g,p.width,p.height),r.restore())):(l&&(v=Math.round(v),g=Math.round(g)),p.width>0&&p.height>0&&r.drawImage(f.source.image,p.x,p.y,p.width,p.height,v+c.x+o,g+c.y+h,p.width,p.height)))}r.restore()}}}},68452:(t,e,i)=>{var s=i(52816),n=i(88933),r=i(99325),a=i(20494);r.register("blitter",(function(t,e){void 0===t&&(t={});var i=a(t,"key",null),r=a(t,"frame",null),o=new s(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),n(this.scene,o,t),o}))},38906:(t,e,i)=>{var s=i(52816);i(61286).register("blitter",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},92246:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(89165),r=i(33177),t.exports={renderWebGL:n,renderCanvas:r}},89165:(t,e,i)=>{var s=i(69360),n=i(75512),r=new s;t.exports=function(t,e,i,s){var a=e.getRenderList(),o=i.alpha*e.alpha;if(0!==a.length&&0!==o){i.addToRenderList(e);var h=t.pipelines.set(this.pipeline,e),l=i.scrollX*e.scrollFactorX,u=i.scrollY*e.scrollFactorY,c=r.copyFrom(i.matrix);s&&(c.multiplyWithOffset(s,-l,-u),l=0,u=0);var d=e.x-l,f=e.y-u,p=-1,v=i.roundPixels;t.pipelines.preBatch(e);for(var g=0;g{var s=i(56694),n=i(82047),r=new s({initialize:function(t,e,i,s,n){this.parent=t,this.x=e,this.y=i,this.frame=s,this.data={},this.tint=16777215,this._visible=n,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(t){return void 0===t?this.frame=this.parent.frame:t instanceof n&&t.texture===this.parent.texture?this.frame=t:this.frame=this.parent.texture.get(t),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(t,e,i){return this.x=t,this.y=e,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,i&&this.setFrame(i),this},setPosition:function(t,e){return this.x=t,this.y=e,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},setVisible:function(t){return this.visible=t,this},setAlpha:function(t){return this.alpha=t,this},setTint:function(t){return this.tint=t,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(t){this.parent.dirty|=this._visible!==t,this._visible=t}},alpha:{get:function(){return this._alpha},set:function(t){this.parent.dirty|=this._alpha>0!=t>0,this._alpha=t}}});t.exports=r},97123:(t,e,i)=>{var s=i(82897),n={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,n){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=s(t,0,1),this._alphaTR=s(e,0,1),this._alphaBL=s(i,0,1),this._alphaBR=s(n,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=s(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=s(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=s(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=s(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=n},15720:(t,e,i)=>{var s=i(82897),n={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=n},69732:(t,e,i)=>{var s=i(95723),n={_blendMode:s.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=s[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=n},28284:t=>{t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},85293:t=>{var e={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var n=t;this.frame.setCropUVs(this._crop,n.x,n.y,n.width,n.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=e},14975:t=>{var e={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=e},88677:t=>{var e={fxPadding:0,setFXPadding:function(t){return void 0===t&&(t=0),this.fxPadding=t,this},onFXCopy:function(){},onFX:function(){}};t.exports=e},92972:t=>{t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},80693:(t,e,i)=>{var s=i(74118),n=i(2386),r=i(93736),a={prepareBoundsOutput:function(t,e){(void 0===e&&(e=!1),0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,n,r,a,o,h,l;if(void 0===t&&(t=new s),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),u.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),n=t.x,r=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),a=t.x,o=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),n=t.x,r=t.y,this.getBottomLeft(t),a=t.x,o=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,n,a,h),t.y=Math.min(i,r,o,l),t.width=Math.max(e,n,a,h)-t.x,t.height=Math.max(i,r,o,l)-t.y,t}};t.exports=a},39171:(t,e,i)=>{var s=i(76756),n=i(63037),r={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t,e,i,n,r){return void 0===t&&(this.texture||this.shader||this.geom)&&(t=this),new s(this.scene,t,e,i,n,r)},createGeometryMask:function(t){return void 0!==t||"Graphics"!==this.type&&!this.geom||(t=this),new n(this.scene,t)}};t.exports=r},28072:t=>{var e={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=e},54211:(t,e,i)=>{var s=i(75606),n=i(63130),r=i(10850),a=i(55303),o=i(93736),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:a.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=r(t,"from",0),t.to=r(t,"to",1);var h=n(t,"positionOnPath",!1);this.rotateToPath=n(t,"rotateToPath",!1),this.pathRotationOffset=r(t,"rotationOffset",0);var l=r(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.setTargetValue()}),this.pathOffset||(this.pathOffset=new o(this.x,this.y)),this.pathVector||(this.pathVector=new o),this.pathDelta||(this.pathDelta=new o),this.pathDelta.reset(),t.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=a.PLAYING_FORWARD,this.rotateToPath){var u=this.path.getPoint(.1);this.rotation=Math.atan2(u.y-this.y,u.x-this.x)+s(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t){var e=t.data[0],i=this.pathDelta,n=this.pathVector;if(i.copy(n).negate(),e.state===a.COMPLETE)return this.path.getPoint(e.end,n),i.add(n),n.add(this.pathOffset),void this.setPosition(n.x,n.y);if(e.state!==a.PLAYING_FORWARD&&e.state!==a.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),n),i.add(n),n.add(this.pathOffset);var r=this.x,o=this.y;this.setPosition(n.x,n.y);var h=this.x-r,l=this.y-o;if(0===h&&0===l)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(l,h)+s(this.pathRotationOffset))}}};t.exports=h},58210:(t,e,i)=>{var s=i(28699),n=i(72677),r={defaultPipeline:null,pipeline:null,hasPostPipeline:!1,postPipelines:null,pipelineData:null,initPipeline:function(t){var e=this.scene.sys.renderer;if(!e)return!1;var i=e.pipelines;if(this.postPipelines=[],this.pipelineData={},i){void 0===t&&(t=i.default);var s=i.get(t);if(s)return this.defaultPipeline=s,this.pipeline=s,!0}return!1},setPipeline:function(t,e,i){var n=this.scene.sys.renderer;if(!n)return this;var r=n.pipelines;if(r){var a=r.get(t);a&&(this.pipeline=a),e&&(this.pipelineData=i?s(e):e)}return this},setPostPipeline:function(t,e,i){var n=this.scene.sys.renderer;if(!n)return this;var r=n.pipelines;if(r){Array.isArray(t)||(t=[t]);for(var a=0;a0,this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e="string"==typeof t,i=this.postPipelines,s=[],n=0;n=0;i--){var s=e[i];("string"==typeof t&&s.name===t||"string"!=typeof t&&s instanceof t)&&(s.destroy(),n(e,i))}return this.hasPostPipeline=this.postPipelines.length>0,this},getPipelineName:function(){return this.pipeline.name}};t.exports=r},45900:t=>{var e={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=e},31654:t=>{var e={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=this.width,e.hitArea.height=this.height),this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=e},82081:(t,e,i)=>{var s=i(82047),n={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=n},21850:(t,e,i)=>{var s=i(82047),n={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var n=t;this.frame.setCropUVs(this._crop,n.x,n.y,n.width,n.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=n},58072:t=>{var e={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,i=t,s=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=s,this.tintFill=!1,this},setTintFill:function(t,e,i,s){return this.setTint(t,e,i,s),this.tintFill=!0,this},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};t.exports=e},48129:t=>{t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},56584:(t,e,i)=>{var s=i(83392),n=i(69360),r=i(64462),a=i(35786),o=i(62138),h=i(93736),l={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return o(this._rotation*s.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*s.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=a(t)}},setPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=0),this.x=t,this.y=e,this.z=i,this.w=s,this},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===s&&(s=this.scene.sys.scale.height),this.x=t+Math.random()*i,this.y=e+Math.random()*s,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new n),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new n),void 0===e&&(e=new n);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);i;)e.applyITRS(i.x,i.y,i._rotation,i._scaleX,i._scaleY),e.multiply(t,t),i=i.parentContainer;return t},getLocalPoint:function(t,e,i,s){i||(i=new h),s||(s=this.scene.sys.cameras.main);var n=s.scrollX,a=s.scrollY,o=t+n*this.scrollFactorX-n,l=e+a*this.scrollFactorY-a;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(o,l,i):r(o,l,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=l},69360:(t,e,i)=>{var s=i(56694),n=i(83392),r=i(93736),a=new s({initialize:function(t,e,i,s,n,r){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=1),void 0===n&&(n=0),void 0===r&&(r=0),this.matrix=new Float32Array([t,e,i,s,n,r,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],r=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):s||r?n.TAU-(r>0?Math.acos(-s/this.scaleY):-Math.acos(s/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),s=this.matrix,n=s[0],r=s[1],a=s[2],o=s[3];return s[0]=n*i+a*e,s[1]=r*i+o*e,s[2]=n*-e+a*i,s[3]=r*-e+o*i,this},multiply:function(t,e){var i=this.matrix,s=t.matrix,n=i[0],r=i[1],a=i[2],o=i[3],h=i[4],l=i[5],u=s[0],c=s[1],d=s[2],f=s[3],p=s[4],v=s[5],g=void 0===e?i:e.matrix;return g[0]=u*n+c*a,g[1]=u*r+c*o,g[2]=d*n+f*a,g[3]=d*r+f*o,g[4]=p*n+v*a+h,g[5]=p*r+v*o+l,g},multiplyWithOffset:function(t,e,i){var s=this.matrix,n=t.matrix,r=s[0],a=s[1],o=s[2],h=s[3],l=e*r+i*o+s[4],u=e*a+i*h+s[5],c=n[0],d=n[1],f=n[2],p=n[3],v=n[4],g=n[5];return s[0]=c*r+d*o,s[1]=c*a+d*h,s[2]=f*r+p*o,s[3]=f*a+p*h,s[4]=v*r+g*o+l,s[5]=v*a+g*h+u,this},transform:function(t,e,i,s,n,r){var a=this.matrix,o=a[0],h=a[1],l=a[2],u=a[3],c=a[4],d=a[5];return a[0]=t*o+e*l,a[1]=t*h+e*u,a[2]=i*o+s*l,a[3]=i*h+s*u,a[4]=n*o+r*l+c,a[5]=n*h+r*u+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var s=this.matrix,n=s[0],r=s[1],a=s[2],o=s[3],h=s[4],l=s[5];return i.x=t*n+e*a+h,i.y=t*r+e*o+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],o=e*n-i*s;return t[0]=n/o,t[1]=-i/o,t[2]=-s/o,t[3]=e/o,t[4]=(s*a-n*r)/o,t[5]=-(e*a-i*r)/o,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,s,n,r){var a=this.matrix;return a[0]=t,a[1]=e,a[2]=i,a[3]=s,a[4]=n,a[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],s=e[1],n=e[2],r=e[3],a=i*r-s*n;if(t.translateX=e[4],t.translateY=e[5],i||s){var o=Math.sqrt(i*i+s*s);t.rotation=s>0?Math.acos(i/o):-Math.acos(i/o),t.scaleX=o,t.scaleY=a/o}else if(n||r){var h=Math.sqrt(n*n+r*r);t.rotation=.5*Math.PI-(r>0?Math.acos(-n/h):-Math.acos(n/h)),t.scaleX=a/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,s,n){var r=this.matrix,a=Math.sin(i),o=Math.cos(i);return r[4]=t,r[5]=e,r[0]=o*s,r[1]=a*s,r[2]=-a*n,r[3]=o*n,this},applyInverse:function(t,e,i){void 0===i&&(i=new r);var s=this.matrix,n=s[0],a=s[1],o=s[2],h=s[3],l=s[4],u=s[5],c=1/(n*h+o*-a);return i.x=h*c*t+-o*c*e+(u*o-l*h)*c,i.y=n*c*e+-a*c*t+(-u*n+l*a)*c,i},setQuad:function(t,e,i,s,n){var r=this.quad,a=this.matrix,o=a[0],h=a[1],l=a[2],u=a[3],c=a[4],d=a[5];return r[0]=t*o+e*l+c,r[1]=t*h+e*u+d,r[2]=t*o+s*l+c,r[3]=t*h+s*u+d,r[4]=i*o+s*l+c,r[5]=i*h+s*u+d,r[6]=i*o+e*l+c,r[7]=i*h+e*u+d,n&&r.forEach((function(t,e){r[e]=Math.round(t)})),r},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var s=this.getX(t,e);return i&&(s=Math.round(s)),s},getYRound:function(t,e,i){var s=this.getY(t,e);return i&&(s=Math.round(s)),s},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});t.exports=a},59694:t=>{var e={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=e},64937:(t,e,i)=>{t.exports={Alpha:i(97123),AlphaSingle:i(15720),BlendMode:i(69732),ComputedSize:i(28284),Crop:i(85293),Depth:i(14975),Flip:i(92972),FX:i(88677),GetBounds:i(80693),Mask:i(39171),Origin:i(28072),PathFollower:i(54211),Pipeline:i(58210),ScrollFactor:i(45900),Size:i(31654),Texture:i(82081),TextureCrop:i(21850),Tint:i(58072),ToJSON:i(48129),Transform:i(56584),TransformMatrix:i(69360),Visible:i(59694)}},70339:(t,e,i)=>{var s=i(59959),n=i(95723),r=i(56694),a=i(64937),o=i(56631),h=i(89980),l=i(74118),u=i(98524),c=i(58795),d=i(93736),f=new r({Extends:h,Mixins:[a.AlphaSingle,a.BlendMode,a.ComputedSize,a.Depth,a.Mask,a.Pipeline,a.Transform,a.Visible,u],initialize:function(t,e,i,s){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new a.TransformMatrix,this.tempTransformMatrix=new a.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPipeline(),this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(n.SKIP_CHECK),s&&this.add(s)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,s=new l,n=!1;t.setEmpty();for(var r=0;r-1},setAll:function(t,e,i,n){return s.SetAll(this.list,t,e,i,n),this},each:function(t,e){var i,s=[null],n=this.list.slice(),r=n.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=f},13916:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var n=e.list;if(0!==n.length){var r=e.localTransform;s?(r.loadIdentity(),r.multiply(s),r.translate(e.x,e.y),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY)):r.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);var o=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var u=0;u{var s=i(88933),n=i(70339),r=i(99325),a=i(20494);r.register("container",(function(t,e){void 0===t&&(t={});var i=a(t,"x",0),r=a(t,"y",0),o=a(t,"children",null),h=new n(this.scene,i,r,o);return void 0!==e&&(t.add=e),s(this.scene,h,t),h}))},23400:(t,e,i)=>{var s=i(70339);i(61286).register("container",(function(t,e,i){return this.displayList.add(new s(this.scene,t,e,i))}))},98524:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(36934),r=i(13916),t.exports={renderWebGL:n,renderCanvas:r}},36934:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var n=e.list,r=n.length;if(0!==r){var a=e.localTransform;s?(a.loadIdentity(),a.multiply(s),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY)):a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.pipelines.preBatch(e);var o=-1!==e.blendMode;o||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=0;c{t.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},38943:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(11603),a=i(89980),o=i(42911),h=i(55638),l=i(7599),u=i(51729),c=new s({Extends:a,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Origin,n.ScrollFactor,n.Transform,n.Visible,r],initialize:function(t,e,i,s,n,r){a.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new u,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),"string"==typeof s?"#"===s[0]?this.setElement(s.substr(1),n,r):this.createElement(s,n,r):s&&this.setElement(s,n,r),t.sys.events.on(l.SLEEP,this.handleSceneEvent,this),t.sys.events.on(l.WAKE,this.handleSceneEvent,this),t.sys.events.on(l.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(t){var e=this.node,i=e.style;e&&(i.display=t.settings.visible?"block":"none")},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e{var s=i(2452),n=i(89980),r=i(69360),a=new r,o=new r,h=new r;t.exports=function(t,e,i,r){if(e.node){var l=e.node.style,u=e.scene.sys.settings;if(!l||!u.visible||n.RENDER_MASK!==e.renderFlags||0!==e.cameraFilter&&e.cameraFilter&i.id||e.parentContainer&&!e.parentContainer.willRender())l.display="none";else{var c=e.parentContainer,d=i.alpha*e.alpha;c&&(d*=c.alpha);var f=a,p=o,v=h,g=0,m=0,y="0%",x="0%";r?(g=e.width*e.scaleX*e.originX,m=e.height*e.scaleY*e.originY,p.applyITRS(e.x-g,e.y-m,e.rotation,e.scaleX,e.scaleY),f.copyFrom(i.matrix),f.multiplyWithOffset(r,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),p.e=e.x-g,p.f=e.y-m,f.multiply(p,v)):(g=e.width*e.originX,m=e.height*e.originY,p.applyITRS(e.x-g,e.y-m,e.rotation,e.scaleX,e.scaleY),f.copyFrom(i.matrix),y=100*e.originX+"%",x=100*e.originY+"%",p.e-=i.scrollX*e.scrollFactorX,p.f-=i.scrollY*e.scrollFactorY,f.multiply(p,v)),e.transformOnly||(l.display="block",l.opacity=d,l.zIndex=e._depth,l.pointerEvents=e.pointerEvents,l.mixBlendMode=s[e._blendMode]),l.transform=v.getCSSMatrix()+" skew("+e.skewX+"rad, "+e.skewY+"rad) rotate3d("+e.rotate3d.x+","+e.rotate3d.y+","+e.rotate3d.z+","+e.rotate3d.w+e.rotate3dAngle+")",l.transformOrigin=y+" "+x}}}},66788:(t,e,i)=>{var s=i(38943);i(61286).register("dom",(function(t,e,i,n,r){var a=new s(this.scene,t,e,i,n,r);return this.displayList.add(a),a}))},11603:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(66070),r=i(66070),t.exports={renderWebGL:n,renderCanvas:r}},65492:t=>{t.exports="addedtoscene"},98398:t=>{t.exports="destroy"},40239:t=>{t.exports="removedfromscene"},17286:t=>{t.exports="complete"},31496:t=>{t.exports="created"},89587:t=>{t.exports="error"},96342:t=>{t.exports="loop"},49614:t=>{t.exports="play"},24418:t=>{t.exports="seeked"},87318:t=>{t.exports="seeking"},61922:t=>{t.exports="stop"},13991:t=>{t.exports="timeout"},4052:t=>{t.exports="unlocked"},56631:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(65492),DESTROY:i(98398),REMOVED_FROM_SCENE:i(40239),VIDEO_COMPLETE:i(17286),VIDEO_CREATED:i(31496),VIDEO_ERROR:i(89587),VIDEO_LOOP:i(96342),VIDEO_PLAY:i(49614),VIDEO_SEEKED:i(24418),VIDEO_SEEKING:i(87318),VIDEO_STOP:i(61922),VIDEO_TIMEOUT:i(13991),VIDEO_UNLOCKED:i(4052)}},39419:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),a=i(79394),o=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.Origin,n.ScrollFactor,n.Size,n.Texture,n.Tint,n.Transform,n.Visible,a],initialize:function(t){r.call(this,t,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});t.exports=o},96699:()=>{},41155:(t,e,i)=>{var s=i(39419);i(61286).register("extern",(function(){var t=new s(this.scene);return this.displayList.add(t),t}))},79394:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(81410),r=i(96699),t.exports={renderWebGL:n,renderCanvas:r}},81410:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){t.pipelines.clear();var r=s(e,i,n).calc;e.render.call(e,t,i,r),t.pipelines.rebind()}},36266:t=>{t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},33182:(t,e,i)=>{var s=i(51052),n=i(56694),r=i(36266),a=i(15720),o=i(69732),h=i(14975),l=i(39171),u=i(58210),c=i(45900),d=i(56584),f=i(59694),p=i(95669),v=i(89980),g=i(72632),m=i(10850),y=i(83392),x=i(60898),T=new n({Extends:v,Mixins:[a,o,h,l,u,d,f,c,x],initialize:function(t,e){var i=m(e,"x",0),s=m(e,"y",0);v.call(this,t,"Graphics"),this.setPosition(i,s),this.initPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return m(t,"lineStyle",null)&&(this.defaultStrokeWidth=m(t,"lineStyle.width",1),this.defaultStrokeColor=m(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=m(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),m(t,"fillStyle",null)&&(this.defaultFillColor=m(t,"fillStyle.color",16777215),this.defaultFillAlpha=m(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},fillGradientStyle:function(t,e,i,s,n,a,o,h){return void 0===n&&(n=1),void 0===a&&(a=n),void 0===o&&(o=n),void 0===h&&(h=n),this.commandBuffer.push(r.GRADIENT_FILL_STYLE,n,a,o,h,t,e,i,s),this},lineGradientStyle:function(t,e,i,s,n,a){return void 0===a&&(a=1),this.commandBuffer.push(r.GRADIENT_LINE_STYLE,t,a,e,i,s,n),this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},fill:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,y.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,y.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,s){return this.commandBuffer.push(r.FILL_RECT,t,e,i,s),this},strokeRect:function(t,e,i,s){var n=this._lineWidth/2,r=t-n,a=t+n;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+s),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+s),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(a+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+s),this.lineTo(a+i,e+s),this.strokePath(),this},fillRoundedRect:function(t,e,i,s,n){void 0===n&&(n=20);var r=n,a=n,o=n,h=n;return"number"!=typeof n&&(r=g(n,"tl",20),a=g(n,"tr",20),o=g(n,"bl",20),h=g(n,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-a,e),this.arc(t+i-a,e+a,a,-y.TAU,0),this.lineTo(t+i,e+s-h),this.arc(t+i-h,e+s-h,h,0,y.TAU),this.lineTo(t+o,e+s),this.arc(t+o,e+s-o,o,y.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-y.TAU),this.fillPath(),this},strokeRoundedRect:function(t,e,i,s,n){void 0===n&&(n=20);var r=n,a=n,o=n,h=n,l=Math.min(i,s)/2;return"number"!=typeof n&&(r=g(n,"tl",20),a=g(n,"tr",20),o=g(n,"bl",20),h=g(n,"br",20)),r=Math.min(r,l),a=Math.min(a,l),o=Math.min(o,l),h=Math.min(h,l),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-a,e),this.moveTo(t+i-a,e),this.arc(t+i-a,e+a,a,-y.TAU,0),this.lineTo(t+i,e+s-h),this.moveTo(t+i,e+s-h),this.arc(t+i-h,e+s-h,h,0,y.TAU),this.lineTo(t+o,e+s),this.moveTo(t+o,e+s),this.arc(t+o,e+s-o,o,y.TAU,Math.PI),this.lineTo(t,e+r),this.moveTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-y.TAU),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,s,n,a){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,s,n,a),this},strokeTriangle:function(t,e,i,s,n,a){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,s,n,a),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,s){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,s),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},strokePoints:function(t,e,i,s){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===s&&(s=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var n=1;n-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var s,n,r=this.scene.sys,a=r.game.renderer;if(void 0===e&&(e=r.scale.width),void 0===i&&(i=r.scale.height),T.TargetCamera.setScene(this.scene),T.TargetCamera.setViewport(0,0,e,i),T.TargetCamera.scrollX=this.x,T.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var o=(s=r.textures.get(t)).getSourceImage();o instanceof HTMLCanvasElement&&(n=o.getContext("2d"))}else n=(s=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(n=t.getContext("2d"));return n&&(this.renderCanvas(a,this,T.TargetCamera,null,n,!1),s&&s.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});T.TargetCamera=new s,t.exports=T},91543:(t,e,i)=>{var s=i(36266),n=i(49584);t.exports=function(t,e,i,r,a,o){var h=e.commandBuffer,l=h.length,u=a||t.currentContext;if(0!==l&&n(t,u,e,i,r)){i.addToRenderList(e);var c=1,d=1,f=0,p=0,v=1,g=0,m=0,y=0;u.beginPath();for(var x=0;x>>16,m=(65280&f)>>>8,y=255&f,u.strokeStyle="rgba("+g+","+m+","+y+","+c+")",u.lineWidth=v,x+=3;break;case s.FILL_STYLE:p=h[x+1],d=h[x+2],g=(16711680&p)>>>16,m=(65280&p)>>>8,y=255&p,u.fillStyle="rgba("+g+","+m+","+y+","+d+")",x+=2;break;case s.BEGIN_PATH:u.beginPath();break;case s.CLOSE_PATH:u.closePath();break;case s.FILL_PATH:o||u.fill();break;case s.STROKE_PATH:o||u.stroke();break;case s.FILL_RECT:o?u.rect(h[x+1],h[x+2],h[x+3],h[x+4]):u.fillRect(h[x+1],h[x+2],h[x+3],h[x+4]),x+=4;break;case s.FILL_TRIANGLE:u.beginPath(),u.moveTo(h[x+1],h[x+2]),u.lineTo(h[x+3],h[x+4]),u.lineTo(h[x+5],h[x+6]),u.closePath(),o||u.fill(),x+=6;break;case s.STROKE_TRIANGLE:u.beginPath(),u.moveTo(h[x+1],h[x+2]),u.lineTo(h[x+3],h[x+4]),u.lineTo(h[x+5],h[x+6]),u.closePath(),o||u.stroke(),x+=6;break;case s.LINE_TO:u.lineTo(h[x+1],h[x+2]),x+=2;break;case s.MOVE_TO:u.moveTo(h[x+1],h[x+2]),x+=2;break;case s.LINE_FX_TO:u.lineTo(h[x+1],h[x+2]),x+=5;break;case s.MOVE_FX_TO:u.moveTo(h[x+1],h[x+2]),x+=5;break;case s.SAVE:u.save();break;case s.RESTORE:u.restore();break;case s.TRANSLATE:u.translate(h[x+1],h[x+2]),x+=2;break;case s.SCALE:u.scale(h[x+1],h[x+2]),x+=2;break;case s.ROTATE:u.rotate(h[x+1]),x+=1;break;case s.GRADIENT_FILL_STYLE:x+=5;break;case s.GRADIENT_LINE_STYLE:x+=6}}u.restore()}}},41286:(t,e,i)=>{var s=i(99325),n=i(33182);s.register("graphics",(function(t,e){void 0===t&&(t={}),void 0!==e&&(t.add=e);var i=new n(this.scene,t);return t.add&&this.scene.sys.displayList.add(i),i}))},13122:(t,e,i)=>{var s=i(33182);i(61286).register("graphics",(function(t){return this.displayList.add(new s(this.scene,t))}))},60898:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(34429),r=i(91543),r=i(91543),t.exports={renderWebGL:n,renderCanvas:r}},34429:(t,e,i)=>{var s=i(36266),n=i(73329),r=i(69360),a=i(75512),o=function(t,e,i){this.x=t,this.y=e,this.width=i},h=function(t,e,i){this.points=[],this.pointsLength=1,this.points[0]=new o(t,e,i)},l=[],u=new r;t.exports=function(t,e,i,r){if(0!==e.commandBuffer.length){i.addToRenderList(e);var c=t.pipelines.set(e.pipeline,e);t.pipelines.preBatch(e);for(var d=n(e,i,r).calc,f=u.loadIdentity(),p=e.commandBuffer,v=i.alpha*e.alpha,g=1,m=c.fillTint,y=c.strokeTint,x=0,T=0,w=0,E=2*Math.PI,S=[],b=0,A=!0,_=null,C=a.getTintAppendFloatAlpha,R=0;R0&&(X=X%E-E):X>E?X=E:X<0&&(X=E+X%E),null===_&&(_=new h(B+Math.cos(U)*Y,N+Math.sin(U)*Y,g),S.push(_),I+=.01);I<1+G;)w=X*I+U,x=B+Math.cos(w)*Y,T=N+Math.sin(w)*Y,_.points.push(new o(x,T,g)),I+=.01;w=X+U,x=B+Math.cos(w)*Y,T=N+Math.sin(w)*Y,_.points.push(new o(x,T,g));break;case s.FILL_RECT:c.batchFillRect(p[++R],p[++R],p[++R],p[++R],f,d);break;case s.FILL_TRIANGLE:c.batchFillTriangle(p[++R],p[++R],p[++R],p[++R],p[++R],p[++R],f,d);break;case s.STROKE_TRIANGLE:c.batchStrokeTriangle(p[++R],p[++R],p[++R],p[++R],p[++R],p[++R],g,f,d);break;case s.LINE_TO:null!==_?_.points.push(new o(p[++R],p[++R],g)):(_=new h(p[++R],p[++R],g),S.push(_));break;case s.MOVE_TO:_=new h(p[++R],p[++R],g),S.push(_);break;case s.SAVE:l.push(f.copyToArray());break;case s.RESTORE:f.copyFromArray(l.pop());break;case s.TRANSLATE:B=p[++R],N=p[++R],f.translate(B,N);break;case s.SCALE:B=p[++R],N=p[++R],f.scale(B,N);break;case s.ROTATE:f.rotate(p[++R])}t.pipelines.postBatch(e)}}},59192:(t,e,i)=>{var s=i(83979),n=i(56694),r=i(56631),a=i(6659),o=i(71608),h=i(72632),l=i(10850),u=i(19256),c=i(42911),d=i(75757),f=i(58403),p=i(13747),v=new n({Extends:a,initialize:function(t,e,i){a.call(this),i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?c(e[0])&&(i=e,e=null):c(e)&&(i=e,e=null),this.scene=t,this.children=new f,this.isParent=!0,this.type="Group",this.classType=h(i,"classType",p),this.name=h(i,"name",""),this.active=h(i,"active",!0),this.maxSize=h(i,"maxSize",-1),this.defaultKey=h(i,"defaultKey",null),this.defaultFrame=h(i,"defaultFrame",null),this.runChildUpdate=h(i,"runChildUpdate",!1),this.createCallback=h(i,"createCallback",null),this.removeCallback=h(i,"removeCallback",null),this.createMultipleCallback=h(i,"createMultipleCallback",null),this.internalCreateCallback=h(i,"internalCreateCallback",null),this.internalRemoveCallback=h(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i),this.on(r.ADDED_TO_SCENE,this.addedToScene,this),this.on(r.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(t,e,i,s,n,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===s&&(s=this.defaultFrame),void 0===n&&(n=!0),void 0===r&&(r=!0),this.isFull())return null;var a=new this.classType(this.scene,t,e,i,s);return a.addToDisplayList(this.scene.sys.displayList),a.addToUpdateList(),a.visible=n,a.setActive(r),this.add(a),a},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof n&&(l.x=n),"number"==typeof r&&(l.y=r),l):s?this.create(n,r,a,o,h):null},get:function(t,e,i,s,n){return this.getFirst(!1,!0,t,e,i,s,n)},getFirstAlive:function(t,e,i,s,n,r){return this.getFirst(!0,t,e,i,s,n,r)},getFirstDead:function(t,e,i,s,n,r){return this.getFirst(!1,t,e,i,s,n,r)},playAnimation:function(t,e){return s.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i{var s=i(99325),n=i(59192);s.register("group",(function(t){return new n(this.scene,null,t)}))},62598:(t,e,i)=>{var s=i(59192);i(61286).register("group",(function(t,e){return this.updateList.add(new s(this.scene,t,e))}))},1539:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),a=i(57322),o=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.FX,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.ScrollFactor,n.Size,n.TextureCrop,n.Tint,n.Transform,n.Visible,a],initialize:function(t,e,i,s,n){r.call(this,t,"Image"),this._crop=this.resetCropObject(),this.setTexture(s,n),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()}});t.exports=o},57786:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},83556:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),a=i(1539);n.register("image",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),o=new a(this.scene,0,0,i,n);return void 0!==e&&(t.add=e),s(this.scene,o,t),o}))},20927:(t,e,i)=>{var s=i(1539);i(61286).register("image",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},57322:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(59390),r=i(57786),t.exports={renderWebGL:n,renderCanvas:r}},59390:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),this.pipeline.batchSprite(e,i,s)}},48013:(t,e,i)=>{var s={Events:i(56631),DisplayList:i(91713),GameObjectCreator:i(99325),GameObjectFactory:i(61286),UpdateList:i(92034),Components:i(64937),GetCalcMatrix:i(73329),BuildGameObject:i(88933),BuildGameObjectAnimation:i(32291),GameObject:i(89980),BitmapText:i(44616),Blitter:i(52816),Bob:i(41664),Container:i(70339),DOMElement:i(38943),DynamicBitmapText:i(13468),Extern:i(39419),Graphics:i(33182),Group:i(59192),Image:i(1539),Layer:i(85305),Particles:i(27684),PathFollower:i(29598),RenderTexture:i(15996),RetroFont:i(55873),Rope:i(79968),Sprite:i(13747),Text:i(76555),GetTextSize:i(32979),MeasureText:i(27030),TextStyle:i(74744),TileSprite:i(35856),Zone:i(71030),Video:i(8630),Shape:i(91461),Arc:i(28593),Curve:i(15220),Ellipse:i(28591),Grid:i(39169),IsoBox:i(4415),IsoTriangle:i(65159),Line:i(579),Polygon:i(91249),Rectangle:i(517),Star:i(77843),Triangle:i(21873),Factories:{Blitter:i(38906),Container:i(23400),DOMElement:i(66788),DynamicBitmapText:i(94145),Extern:i(41155),Graphics:i(13122),Group:i(62598),Image:i(20927),Layer:i(17676),Particles:i(30439),PathFollower:i(19626),RenderTexture:i(29599),Rope:i(31982),Sprite:i(66135),StaticBitmapText:i(21797),Text:i(94627),TileSprite:i(20509),Zone:i(34546),Video:i(215),Arc:i(10369),Curve:i(10147),Ellipse:i(99869),Grid:i(9326),IsoBox:i(88154),IsoTriangle:i(67765),Line:i(85665),Polygon:i(88203),Rectangle:i(94355),Star:i(23962),Triangle:i(79296)},Creators:{Blitter:i(68452),Container:i(44516),DynamicBitmapText:i(67513),Graphics:i(41286),Group:i(61295),Image:i(83556),Layer:i(56378),Particles:i(38842),RenderTexture:i(85692),Rope:i(96027),Sprite:i(89219),StaticBitmapText:i(95499),Text:i(75397),TileSprite:i(63950),Zone:i(24067),Video:i(65601)}};s.Shader=i(27902),s.Mesh=i(83321),s.NineSlice=i(44139),s.PointLight=i(13171),s.Factories.Shader=i(51979),s.Factories.Mesh=i(8767),s.Factories.NineSlice=i(53778),s.Factories.PointLight=i(91201),s.Creators.Shader=i(13908),s.Creators.Mesh=i(41839),s.Creators.NineSlice=i(40964),s.Creators.PointLight=i(162),s.Light=i(14455),s.LightsManager=i(26193),s.LightsPlugin=i(50296),t.exports=s},85305:(t,e,i)=>{var s=i(95723),n=i(56694),r=i(64937),a=i(48129),o=i(81078),h=i(6659),l=i(56631),u=i(71207),c=i(58010),d=i(7599),f=i(17922),p=new n({Extends:u,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.Visible,h,c],initialize:function(t,e){u.call(this,t),h.call(this),this.scene=t,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=t.sys,this.events=t.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPipeline(),this.clearAlpha(),this.setBlendMode(s.SKIP_CHECK),e&&this.add(e),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new o(this)),this},setData:function(t,e){return this.data||(this.data=new o(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new o(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new o(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new o(this)),this.data.get(t)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return a(this)},willRender:function(t){return!(15!==this.renderFlags||0===this.list.length||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return i.unshift(this.displayList.getIndex(t)),i},addChildCallback:function(t){t.displayList&&t.displayList!==this&&t.removeFromDisplayList(),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(l.ADDED_TO_SCENE,t,this.scene),this.events.emit(d.ADDED_TO_SCENE,t,this.scene))},removeChildCallback:function(t){this.queueDepthSort(),t.displayList=null,t.emit(l.REMOVED_FROM_SCENE,t,this.scene),this.events.emit(d.REMOVED_FROM_SCENE,t,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(f(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(l.ADDED_TO_SCENE,this,this.scene),t.events.emit(d.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(l.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(d.REMOVED_FROM_SCENE,this,this.scene)),this},destroy:function(t){if(this.scene&&!this.ignoreDestroy){this.emit(l.DESTROY,this);for(var e=this.list;e.length;)e[0].destroy(t);this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});t.exports=p},834:t=>{t.exports=function(t,e,i){var s=e.list;if(0!==s.length){e.depthSort();var n=-1!==e.blendMode;n||t.setBlendMode(0);var r=e._alpha;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var a=0;a{var s=i(88933),n=i(85305),r=i(99325),a=i(20494);r.register("layer",(function(t,e){void 0===t&&(t={});var i=a(t,"children",null),r=new n(this.scene,i);return void 0!==e&&(t.add=e),s(this.scene,r,t),r}))},17676:(t,e,i)=>{var s=i(85305);i(61286).register("layer",(function(t){return this.displayList.add(new s(this.scene,t))}))},58010:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(17576),r=i(834),t.exports={renderWebGL:n,renderCanvas:r}},17576:t=>{t.exports=function(t,e,i){var s=e.list,n=s.length;if(0!==n){e.depthSort(),t.pipelines.preBatch(e);var r=-1!==e.blendMode;r||t.setBlendMode(0);for(var a=e.alpha,o=0;o{var s=i(26673),n=i(56694),r=i(64937),a=i(39298),o=i(75512),h=new n({Extends:s,Mixins:[r.Origin,r.ScrollFactor,r.Transform,r.Visible],initialize:function(t,e,i,n,r,o,h){s.call(this,t,e,i),this.color=new a(n,r,o),this.intensity=h,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(i)},displayWidth:{get:function(){return this.diameter},set:function(t){this.diameter=t}},displayHeight:{get:function(){return this.diameter},set:function(t){this.diameter=t}},width:{get:function(){return this.diameter},set:function(t){this.diameter=t}},height:{get:function(){return this.diameter},set:function(t){this.diameter=t}},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setColor:function(t){var e=o.getFloatsFromUintRGB(t);return this.color.set(e[0],e[1],e[2]),this},setIntensity:function(t){return this.intensity=t,this},setRadius:function(t){return this.radius=t,this}});h.RENDER_MASK=15,t.exports=h},26193:(t,e,i)=>{var s=i(26535),n=i(56694),r=i(53996),a=i(14455),o=i(13171),h=i(39298),l=i(72677),u=i(17922),c=i(75512),d=new n({initialize:function(){this.lights=[],this.ambientColor=new h(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(t,e,i,s,n,r){return this.systems.displayList.add(new o(this.scene,t,e,i,s,n,r))},enable:function(){return-1===this.maxLights&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(t){for(var e=this.lights,i=t.worldView,n=[],a=0;athis.maxLights&&(u(n,this.sortByDistance),n=n.slice(0,this.maxLights)),this.visibleLights=n.length,n},sortByDistance:function(t,e){return t.distance>=e.distance},setAmbientColor:function(t){var e=c.getFloatsFromUintRGB(t);return this.ambientColor.set(e[0],e[1],e[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(t,e,i,s,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=128),void 0===s&&(s=16777215),void 0===n&&(n=1);var r=c.getFloatsFromUintRGB(s),o=new a(t,e,i,r[0],r[1],r[2],n);return this.lights.push(o),o},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&l(this.lights,e),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=d},50296:(t,e,i)=>{var s=i(56694),n=i(26193),r=i(91963),a=i(7599),o=new s({Extends:n,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once(a.BOOT,this.boot,this),n.call(this)},boot:function(){var t=this.systems.events;t.on(a.SHUTDOWN,this.shutdown,this),t.on(a.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",o,"lights"),t.exports=o},83321:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(75606),a=i(18693),o=i(89980),h=i(67623),l=i(53267),u=i(73329),c=i(16650),d=i(23464),f=i(17922),p=i(70015),v=i(85769),g=new s({Extends:o,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Mask,n.Pipeline,n.Size,n.Texture,n.Transform,n.Visible,n.ScrollFactor,d],initialize:function(t,e,i,s,n,r,a,h,l,u,d,f){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s="__WHITE"),o.call(this,t,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new p,this.modelScale=new p(1,1,1),this.modelRotation=new p,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new c,this.viewPosition=new p,this.viewMatrix=new c,this.projectionMatrix=new c,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1;var v=t.sys.renderer;this.setPosition(e,i),this.setTexture(s,n),this.setSize(v.width,v.height),this.initPipeline(),this.setPerspective(v.width,v.height),r&&this.addVertices(r,a,h,l,u,d,f)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(t){return this.viewPosition.addScale(p.LEFT,t),this.dirtyCache[10]=1,this},panY:function(t){return this.viewPosition.y+=p.DOWN.y*t,this.dirtyCache[10]=1,this},panZ:function(t){return this.viewPosition.z+=t,this.dirtyCache[10]=1,this},setPerspective:function(t,e,i,s,n){return void 0===i&&(i=45),void 0===s&&(s=.01),void 0===n&&(n=1e3),this.projectionMatrix.perspective(r(i),t/e,s,n),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(t,e,i,s){return void 0===t&&(t=this.scene.sys.renderer.getAspectRatio()),void 0===e&&(e=1),void 0===i&&(i=-1e3),void 0===s&&(s=1e3),this.projectionMatrix.ortho(-t,t,-e,e,i,s),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach((function(t){t.destroy()})),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(t,e,i,s,n,r,a,o,h){var u,c=this.scene.sys.cache.obj.get(t);return c&&(u=l(c,this,e,i,s,n,r,a,o,h)),u&&0!==u.verts.length||console.warn("Mesh.addVerticesFromObj data empty:",t),this},sortByDepth:function(t,e){return t.depth-e.depth},depthSort:function(){return f(this.faces,this.sortByDepth),this},addVertex:function(t,e,i,s,n,r,a){var o=new v(t,e,i,s,n,r,a);return this.vertices.push(o),o},addFace:function(t,e,i){var s=new a(t,e,i);return this.faces.push(s),this.dirtyCache[9]=-1,s},addVertices:function(t,e,i,s,n,r,a){var o=h(t,e,i,s,n,r,a);return o?(this.faces=this.faces.concat(o.faces),this.vertices=this.vertices.concat(o.vertices)):console.warn("Mesh.addVertices data empty or invalid"),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(t){return this.faces[t]},getFaceAt:function(t,e,i){void 0===i&&(i=this.scene.sys.cameras.main);for(var s=u(this,i).calc,n=this.faces,r=[],a=0;a{t.exports=function(){}},41839:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),a=i(10850),o=i(83321);n.register("mesh",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),h=a(t,"vertices",[]),l=a(t,"uvs",[]),u=a(t,"indicies",[]),c=a(t,"containsZ",!1),d=a(t,"normals",[]),f=a(t,"colors",16777215),p=a(t,"alphas",1),v=new o(this.scene,0,0,i,n,h,l,u,c,d,f,p);return void 0!==e&&(t.add=e),s(this.scene,v,t),v}))},8767:(t,e,i)=>{var s=i(83321);i(61286).register("mesh",(function(t,e,i,n,r,a,o,h,l,u,c){return this.displayList.add(new s(this.scene,t,e,i,n,r,a,o,h,l,u,c))}))},23464:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(57410),r=i(6317),t.exports={renderWebGL:n,renderCanvas:r}},57410:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){var r=e.faces,a=r.length;if(0!==a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline,e),h=s(e,i,n).calc,l=o.setGameObject(e),u=o.vertexViewF32,c=o.vertexViewU32,d=o.vertexCount*o.currentShader.vertexComponentCount-1,f=e.tintFill,p=[],v=e.debugCallback,g=h.a,m=h.b,y=h.c,x=h.d,T=h.e,w=h.f,E=e.viewPosition.z,S=e.hideCCW,b=i.roundPixels,A=i.alpha*e.alpha,_=0;t.pipelines.preBatch(e);for(var C=0;C{var s=i(56694),n=i(64937),r=i(89980),a=i(94456),o=i(85769),h=new s({Extends:r,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.FX,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.ScrollFactor,n.Texture,n.Transform,n.Visible,a],initialize:function(t,e,i,s,n,a,h,l,u,c,d){void 0===a&&(a=256),void 0===h&&(h=256),void 0===l&&(l=10),void 0===u&&(u=10),void 0===c&&(c=0),void 0===d&&(d=0),r.call(this,t,"NineSlice"),this._width=a,this._height=h,this._originX=.5,this._originY=.5,this._sizeComponent=!0,this.vertices=[],this.leftWidth=l,this.rightWidth=u,this.topHeight=c,this.bottomHeight=d,this.tint=16777215,this.tintFill=!1,this.is3Slice=0===c&&0===d;for(var f=this.is3Slice?18:54,p=0;p{var s=i(88933),n=i(99325),r=i(20494),a=i(10850),o=i(44139);n.register("nineslice",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),h=a(t,"width",256),l=a(t,"height",256),u=a(t,"leftWidth",10),c=a(t,"rightWidth",10),d=a(t,"topHeight",0),f=a(t,"bottomHeight",0),p=new o(this.scene,0,0,i,n,h,l,u,c,d,f);return void 0!==e&&(t.add=e),s(this.scene,p,t),p}))},53778:(t,e,i)=>{var s=i(44139);i(61286).register("nineslice",(function(t,e,i,n,r,a,o,h,l,u){return this.displayList.add(new s(this.scene,t,e,i,n,r,a,o,h,l,u))}))},94456:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(27420),t.exports={renderWebGL:n,renderCanvas:r}},27420:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){var a=e.vertices,o=a.length;if(0!==o){i.addToRenderList(e);var h=t.pipelines.set(e.pipeline,e),l=s(e,i,r,!1).calc,u=h.setGameObject(e),c=h.vertexViewF32,d=h.vertexViewU32,f=h.vertexCount*h.currentShader.vertexComponentCount-1,p=i.roundPixels,v=e.tintFill,g=i.alpha*e.alpha,m=n.getTintAppendFloatAlpha(e.tint,g);t.pipelines.preBatch(e);var y=h.vertexAvailable(),x=-1;y{var s=i(56694),n=i(61616),r=i(21902),a=i(72632),o=i(1071),h=new s({initialize:function(t,e,i,s){void 0===s&&(s=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=s,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=a(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if(this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,null!==t){if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&this.hasBoth(t,"start","end")){this.start=t.start,this.end=t.end;var i=this.has(t,"random");if(i&&(this.onEmit=this.randomRangedValueEmit),this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s,t.easeParams),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else if("object"===e&&this.hasBoth(t,"min","max"))this.start=t.min,this.end=t.max,this.onEmit=this.randomRangedValueEmit;else if("object"===e&&this.has(t,"random")){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this}},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,s){return s},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=n(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=o(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var s=t.data[e];return(s.max-s.min)*this.ease(i)+s.min}});t.exports=h},87811:(t,e,i)=>{var s=i(56694),n=i(72632),r=new s({initialize:function(t,e,i,s,r){if("object"==typeof t){var a=t;t=n(a,"x",0),e=n(a,"y",0),i=n(a,"power",0),s=n(a,"epsilon",100),r=n(a,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=s},update:function(t,e){var i=this.x-t.x,s=this.y-t.y,n=i*i+s*s;if(0!==n){var r=Math.sqrt(n);n{var s=i(56694),n=i(75606),r=new s({initialize:function(t){this.emitter=t,this.frame=null,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>0},resetPosition:function(){this.x=0,this.y=0},fire:function(t,e){var i=this.emitter;if(this.frame=i.getFrame(),!this.frame)throw new Error("Particle has no texture frame");i.emitZone&&i.emitZone.getPoint(this),void 0===t?this.x+=i.x.onEmit(this,"x"):i.x.steps>0?this.x+=t+i.x.onEmit(this,"x"):this.x+=t,void 0===e?this.y+=i.y.onEmit(this,"y"):i.y.steps>0?this.y+=e+i.y.onEmit(this,"y"):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var s=i.speedX.onEmit(this,"speedX"),r=i.speedY?i.speedY.onEmit(this,"speedY"):s;if(i.radial){var a=n(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(a)*Math.abs(s),this.velocityY=Math.sin(a)*Math.abs(r)}else if(i.moveTo){var o=i.moveToX.onEmit(this,"moveToX"),h=i.moveToY?i.moveToY.onEmit(this,"moveToY"):o,l=this.life/1e3;this.velocityX=(o-this.x)/l,this.velocityY=(h-this.y)/l}else this.velocityX=s,this.velocityY=r;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY.onEmit(this,"scaleY"),this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=n(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint")},computeVelocity:function(t,e,i,s){var n=this.velocityX,r=this.velocityY,a=this.accelerationX,o=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;n+=t.gravityX*i,r+=t.gravityY*i,a&&(n+=a*i),o&&(r+=o*i),n>h?n=h:n<-h&&(n=-h),r>l?r=l:r<-l&&(r=-l),this.velocityX=n,this.velocityY=r;for(var u=0;ue.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var s=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(s,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,s.bounds&&this.checkBounds(s),s.deathZone&&s.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=s.scaleX.onUpdate(this,"scaleX",r,this.scaleX),this.scaleY=s.scaleY.onUpdate(this,"scaleY",r,this.scaleY),this.angle=s.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=n(this.angle),this.alpha=s.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=s.tint.onUpdate(this,"tint",r,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=r},9216:(t,e,i)=>{var s=i(95723),n=i(56694),r=i(64937),a=i(69361),o=i(54213),h=i(93025),l=i(72632),u=i(72861),c=i(53523),d=i(19256),f=i(14909),p=i(68433),v=i(74118),g=i(17922),m=i(93736),y=i(1071),x=new n({Mixins:[r.BlendMode,r.Mask,r.ScrollFactor,r.Visible],initialize:function(t,e){this.manager=t,this.texture=t.texture,this.frames=[t.defaultFrame],this.defaultFrame=t.defaultFrame,this.configFastMap=["active","blendMode","collideBottom","collideLeft","collideRight","collideTop","deathCallback","deathCallbackScope","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxParticles","maxAliveParticles","name","on","particleBringToTop","particleClass","radial","timeScale","trackVisible","visible"],this.configOpMap=["accelerationX","accelerationY","angle","alpha","bounce","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],this.name="",this.particleClass=f,this.x=new h(e,"x",0,!0),this.y=new h(e,"y",0,!0),this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.accelerationX=new h(e,"accelerationX",0,!0),this.accelerationY=new h(e,"accelerationY",0,!0),this.maxVelocityX=new h(e,"maxVelocityX",1e4,!0),this.maxVelocityY=new h(e,"maxVelocityY",1e4,!0),this.speedX=new h(e,"speedX",0,!0),this.speedY=new h(e,"speedY",0,!0),this.moveTo=!1,this.moveToX=new h(e,"moveToX",null,!0),this.moveToY=new h(e,"moveToY",null,!0),this.bounce=new h(e,"bounce",0,!0),this.scaleX=new h(e,"scaleX",1),this.scaleY=new h(e,"scaleY",1),this.tint=new h(e,"tint",16777215),this.alpha=new h(e,"alpha",1),this.lifespan=new h(e,"lifespan",1e3,!0),this.angle=new h(e,"angle",{min:0,max:360},!0),this.rotate=new h(e,"rotate",0),this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.maxAliveParticles=0,this.quantity=new h(e,"quantity",1,!0),this.delay=new h(e,"delay",0,!0),this.frequency=0,this.on=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZone=null,this.deathZone=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.active=!0,this.visible=!0,this.blendMode=s.NORMAL,this.follow=null,this.followOffset=new m,this.trackVisible=!1,this.currentFrame=0,this.randomFrame=!0,this.frameQuantity=1,this.dead=[],this.alive=[],this._counter=0,this._frameCounter=0,e&&this.fromJSON(e)},fromJSON:function(t){if(!t)return this;var e=0,i="";for(e=0;e0&&this.getParticleCount()>=this.maxParticles||this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,s=i.length,n=0;n0){var u=this.deathCallback,c=this.deathCallbackScope;for(a=h-1;a>=0;a--){var d=o[a];n.splice(d.index,1),r.push(d.particle),u&&u.call(c,d.particle),d.particle.resetPosition()}}if(this.on)if(0===this.frequency)this.emitParticle();else if(this.frequency>0)for(this._counter-=e;this._counter<=0;)this.emitParticle(),this._counter+=this.frequency},depthSortCallback:function(t,e){return t.y-e.y}});t.exports=x},84622:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),a=i(87811),o=i(71207),h=i(9216),l=i(72745),u=new s({Extends:r,Mixins:[n.Depth,n.Mask,n.Pipeline,n.Transform,n.Visible,l],initialize:function(t,e,i,s){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(s=i,i=null),this.setTexture(e,i),this.initPipeline(),this.emitters=new o(this),this.wells=new o(this),s){Array.isArray(s)||(s=[s]);for(var n=0;n0?e.defaultFrame=i[0]:(console.warn("No texture frames were set"),e.defaultFrame=this.defaultFrame),this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},removeEmitter:function(t){return this.emitters.remove(t,!0)},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new a(t))},emitParticle:function(t,e,i){for(var s=this.emitters.list,n=0;n{var s=i(69360),n=new s,r=new s,a=new s,o=new s;t.exports=function(t,e,i,s){var h=e.emitters.list,l=h.length;if(0!==l){var u=n.copyFrom(i.matrix),c=r,d=a,f=o;s?(f.loadIdentity(),f.multiply(s),f.translate(e.x,e.y),f.rotate(e.rotation),f.scale(e.scaleX,e.scaleY)):f.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);for(var p=t.currentContext,v=i.roundPixels,g=0;g0&&_.height>0){var C=-A.halfWidth,R=-A.halfHeight;p.globalAlpha=b,p.save(),c.setToContext(p),v&&(C=Math.round(C),R=Math.round(R)),p.imageSmoothingEnabled=!A.source.scaleMode,p.drawImage(A.source.image,_.x,_.y,_.width,_.height,C,R,_.width,_.height),p.restore()}}}p.restore()}}}}},38842:(t,e,i)=>{var s=i(99325),n=i(20494),r=i(72632),a=i(84622);s.register("particles",(function(t,e){void 0===t&&(t={});var i=n(t,"key",null),s=n(t,"frame",null),o=r(t,"emitters",null),h=new a(this.scene,i,s,o);return void 0!==e&&(t.add=e),r(t,"add",!1)?this.displayList.add(h):this.updateList.add(h),h}))},30439:(t,e,i)=>{var s=i(61286),n=i(84622);s.register("particles",(function(t,e,i){return this.displayList.add(new n(this.scene,t,e,i))}))},72745:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(58971),r=i(66545),t.exports={renderWebGL:n,renderCanvas:r}},58971:(t,e,i)=>{var s=i(69360),n=i(75512),r=new s,a=new s,o=new s,h=new s;t.exports=function(t,e,i,s){var l=e.emitters.list,u=l.length;if(0!==u){var c=t.pipelines.set(e.pipeline),d=r,f=a,p=o,v=h;s?(v.loadIdentity(),v.multiply(s),v.translate(e.x,e.y),v.rotate(e.rotation),v.scale(e.scaleX,e.scaleY)):v.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var g=i.roundPixels,m=e.defaultFrame.glTexture,y=n.getTintAppendFloatAlpha,x=c.setGameObject(e,e.defaultFrame);t.pipelines.preBatch(e);for(var T=0;T{t.exports={EmitterOp:i(93025),GravityWell:i(87811),Particle:i(14909),ParticleEmitter:i(9216),ParticleEmitterManager:i(84622),Zones:i(25962)}},69361:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=s},54213:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s,n){void 0===s&&(s=!1),void 0===n&&(n=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=s,this.counter=-1,this.seamless=n,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=s},68433:(t,e,i)=>{var s=i(56694),n=i(93736),r=new s({initialize:function(t){this.source=t,this._tempVec=new n},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},25962:(t,e,i)=>{t.exports={DeathZone:i(69361),EdgeZone:i(54213),RandomZone:i(68433)}},29598:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(13747),a=new s({Extends:r,Mixins:[n.PathFollower],initialize:function(t,e,i,s,n,a){r.call(this,t,i,s,n,a),this.path=e},preUpdate:function(t,e){this.anims.update(t,e),this.pathUpdate(t)}});t.exports=a},19626:(t,e,i)=>{var s=i(61286),n=i(29598);s.register("follower",(function(t,e,i,s,r){var a=new n(this.scene,t,e,i,s,r);return this.displayList.add(a),this.updateList.add(a),a}))},13171:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),a=i(74853),o=i(65641),h=i(71606),l=new s({Extends:r,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Mask,n.Pipeline,n.ScrollFactor,n.Transform,n.Visible,h],initialize:function(t,e,i,s,n,h,l){void 0===s&&(s=16777215),void 0===n&&(n=128),void 0===h&&(h=1),void 0===l&&(l=.1),r.call(this,t,"PointLight"),this.initPipeline(o.POINTLIGHT_PIPELINE),this.setPosition(e,i),this.color=a(s),this.intensity=h,this.attenuation=l,this.width=2*n,this.height=2*n,this._radius=n},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this.width=2*t,this.height=2*t}},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});t.exports=l},162:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),a=i(13171);n.register("pointlight",(function(t,e){void 0===t&&(t={});var i=r(t,"color",16777215),n=r(t,"radius",128),o=r(t,"intensity",1),h=r(t,"attenuation",.1),l=new a(this.scene,0,0,i,n,o,h);return void 0!==e&&(t.add=e),s(this.scene,l,t),l}))},91201:(t,e,i)=>{var s=i(61286),n=i(13171);s.register("pointlight",(function(t,e,i,s,r,a){return this.displayList.add(new n(this.scene,t,e,i,s,r,a))}))},71606:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(80590),t.exports={renderWebGL:n,renderCanvas:r}},80590:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),a=s(e,i,n).calc,o=e.width,h=e.height,l=-e._radius,u=-e._radius,c=l+o,d=u+h,f=a.getX(0,0),p=a.getY(0,0),v=a.getX(l,u),g=a.getY(l,u),m=a.getX(l,d),y=a.getY(l,d),x=a.getX(c,d),T=a.getY(c,d),w=a.getX(c,u),E=a.getY(c,u);t.pipelines.preBatch(e),r.batchPointLight(e,i,v,g,m,y,x,T,w,E,f,p),t.pipelines.postBatch(e)}},15996:(t,e,i)=>{var s=i(56694),n=i(845),r=i(1539),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=32),void 0===a&&(a=32);var o=new n(t.sys.textures,"",s,a);r.call(this,t,e,i,o),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(t,e){this.width=t,this.height=e,this.texture.setSize(t,e),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this},resize:function(t,e){return this.setSize(t,e),this},saveTexture:function(t){var e=this.texture;return e.key=t,e.manager.addDynamicTexture(e)&&(this._saved=!0),e},fill:function(t,e,i,s,n,r){return this.texture.fill(t,e,i,s,n,r),this},clear:function(){return this.texture.clear(),this},stamp:function(t,e,i,s,n){return this.texture.stamp(t,e,i,s,n),this},erase:function(t,e,i){return this.texture.erase(t,e,i),this},draw:function(t,e,i,s,n){return this.texture.draw(t,e,i,s,n),this},drawFrame:function(t,e,i,s,n,r){return this.texture.drawFrame(t,e,i,s,n,r),this},repeat:function(t,e,i,s,n,r,a,o,h){return this.texture.repeat(t,e,i,s,n,r,a,o,h),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(t,e,i,s,n){return this.texture.batchDraw(t,e,i,s,n),this},batchDrawFrame:function(t,e,i,s,n,r){return this.texture.batchDrawFrame(t,e,i,s,n,r),this},endDraw:function(t){return this.texture.endDraw(t),this},snapshotArea:function(t,e,i,s,n,r,a){return this.texture.snapshotArea(t,e,i,s,n,r,a),this},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.width,this.height,t,e,i)},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i,"pixel")},preDestroy:function(){this._saved||this.texture.destroy()}});t.exports=a},85692:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),a=i(15996);n.register("renderTexture",(function(t,e){void 0===t&&(t={});var i=r(t,"x",0),n=r(t,"y",0),o=r(t,"width",32),h=r(t,"height",32),l=new a(this.scene,i,n,o,h);return void 0!==e&&(t.add=e),s(this.scene,l,t),l}))},29599:(t,e,i)=>{var s=i(61286),n=i(15996);s.register("renderTexture",(function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))}))},79968:(t,e,i)=>{var s=i(16569),n=i(56694),r=i(64937),a=i(89980),o=i(65641),h=i(58912),l=i(93736),u=new n({Extends:a,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Flip,r.Mask,r.Pipeline,r.Size,r.Texture,r.Transform,r.Visible,r.ScrollFactor,h],initialize:function(t,e,i,n,r,h,u,c,d){void 0===n&&(n="__DEFAULT"),void 0===h&&(h=2),void 0===u&&(u=!0),a.call(this,t,"Rope"),this.anims=new s(this),this.points=h,this.vertices,this.uv,this.colors,this.alphas,this.tintFill="__DEFAULT"===n,this.dirty=!1,this.horizontal=u,this._flipX=!1,this._flipY=!1,this._perp=new l,this.debugCallback=null,this.debugGraphic=null,this.setTexture(n,r),this.setPosition(e,i),this.setSizeToFrame(),this.initPipeline(o.ROPE_PIPELINE),Array.isArray(h)&&this.resizeArrays(h.length),this.setPoints(h,c,d),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){var i=this.anims.currentFrame;this.anims.update(t,e),this.anims.currentFrame!==i&&(this.updateUVs(),this.updateVertices())},play:function(t,e,i){return this.anims.play(t,e,i),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(t,e,i){return void 0===t&&(t=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(t,e,i))},setVertical:function(t,e,i){return void 0===t&&(t=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(t,e,i)):this},setTintFill:function(t){return void 0===t&&(t=!1),this.tintFill=t,this},setAlphas:function(t,e){var i=this.points.length;if(i<1)return this;var s,n=this.alphas;void 0===t?t=[1]:Array.isArray(t)||void 0!==e||(t=[t]);var r=0;if(void 0!==e)for(s=0;sr&&(a=t[r]),n[r]=a,t.length>r+1&&(a=t[r+1]),n[r+1]=a}return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i,s=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var n=0;if(t.length===e)for(i=0;in&&(r=t[n]),s[n]=r,t.length>n+1&&(r=t[n+1]),s[n+1]=r}return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var s,n,r,a=t;if(a<2&&(a=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,n=this.frame.width/(a-1),s=0;s{t.exports=function(){}},96027:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),a=i(10850),o=i(79968);n.register("rope",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),h=r(t,"horizontal",!0),l=a(t,"points",void 0),u=a(t,"colors",void 0),c=a(t,"alphas",void 0),d=new o(this.scene,0,0,i,n,l,h,u,c);return void 0!==e&&(t.add=e),s(this.scene,d,t),d}))},31982:(t,e,i)=>{var s=i(79968);i(61286).register("rope",(function(t,e,i,n,r,a,o,h){return this.displayList.add(new s(this.scene,t,e,i,n,r,a,o,h))}))},58912:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(49489),r=i(44598),t.exports={renderWebGL:n,renderCanvas:r}},49489:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline,e),o=s(e,i,r).calc,h=e.vertices,l=e.uv,u=e.colors,c=e.alphas,d=e.alpha,f=n.getTintAppendFloatAlpha,p=i.roundPixels,v=h.length,g=Math.floor(.5*v);a.flush(),t.pipelines.preBatch(e);var m=a.setGameObject(e),y=a.vertexViewF32,x=a.vertexViewU32,T=a.vertexCount*a.currentShader.vertexComponentCount-1,w=0,E=e.tintFill;e.dirty&&e.updateVertices();for(var S=e.debugCallback,b=[],A=0;A{var s=i(56694),n=i(64937),r=i(89980),a=i(72632),o=i(98611),h=i(22440),l=i(24252),u=i(69360),c=new s({Extends:r,Mixins:[n.ComputedSize,n.Depth,n.GetBounds,n.Mask,n.Origin,n.ScrollFactor,n.Transform,n.Visible,l],initialize:function(t,e,i,s,n,a,o,h){void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=128),void 0===a&&(a=128),r.call(this,t,"Shader"),this.blendMode=-1,this.shader;var l=t.sys.renderer;this.renderer=l,this.gl=l.gl,this.vertexData=new ArrayBuffer(2*Float32Array.BYTES_PER_ELEMENT*6),this.vertexBuffer=l.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new u,this._tempMatrix2=new u,this._tempMatrix3=new u,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=l.width,this._rendererHeight=l.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(i,s),this.setSize(n,a),this.setOrigin(.5,.5),this.setShader(e,o,h)},willRender:function(t){return!!this.renderToTexture||!(r.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setRenderToTexture:function(t,e){if(void 0===e&&(e=!1),!this.renderToTexture){var i=this.width,s=this.height,n=this.renderer;this.glTexture=n.createTextureFromSource(null,i,s,0),this.glTexture.flipY=e,this.framebuffer=n.createFramebuffer(i,s,this.glTexture,!1),this._rendererWidth=i,this._rendererHeight=s,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),t&&(this.texture=this.scene.sys.textures.addGLTexture(t,this.glTexture,i,s))}return this.shader&&(n.pipelines.clear(),this.load(),this.flush(),n.pipelines.rebind()),this},setShader:function(t,e,i){if(void 0===e&&(e=[]),"string"==typeof t){var s=this.scene.sys.cache.shader;if(!s.has(t))return console.warn("Shader missing: "+t),this;this.shader=s.get(t)}else this.shader=t;var n=this.gl,r=this.renderer;this.program&&n.deleteProgram(this.program);var a=r.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);n.uniformMatrix4fv(n.getUniformLocation(a,"uViewMatrix"),!1,this.viewMatrix),n.uniformMatrix4fv(n.getUniformLocation(a,"uProjectionMatrix"),!1,this.projectionMatrix),n.uniform2f(n.getUniformLocation(a,"uResolution"),this.width,this.height),this.program=a;var h=new Date,l={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[h.getFullYear(),h.getMonth(),h.getDate(),60*h.getHours()*60+60*h.getMinutes()+h.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=o(!0,{},this.shader.uniforms,l):this.uniforms=l;for(var u=0;u<4;u++)e[u]&&this.setSampler2D("iChannel"+u,e[u],u,i);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(t){return this.pointer=t,this},projOrtho:function(t,e,i,s){var n=1/(t-e),r=1/(i-s),a=this.projectionMatrix;a[0]=-2*n,a[5]=-2*r,a[10]=-.001,a[12]=(t+e)*n,a[13]=(s+i)*r,a[14]=-0;var o=this.program,h=this.gl;this.renderer.setProgram(o),h.uniformMatrix4fv(h.getUniformLocation(o,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=e,this._rendererHeight=i},initUniforms:function(){var t=this.gl,e=this.renderer.glFuncMap,i=this.program;for(var s in this._textureCount=0,this.uniforms){var n=this.uniforms[s],r=n.type,a=e[r];n.uniformLocation=t.getUniformLocation(i,s),"sampler2D"!==r&&(n.glMatrix=a.matrix,n.glValueLength=a.length,n.glFunc=a.func)}},setSampler2DBuffer:function(t,e,i,s,n,r){void 0===n&&(n=0),void 0===r&&(r={});var a=this.uniforms[t];return a.value=e,r.width=i,r.height=s,a.textureData=r,this._textureCount=n,this.initSampler2D(a),this},setSampler2D:function(t,e,i,s){void 0===i&&(i=0);var n=this.scene.sys.textures;if(n.exists(e)){var r=n.getFrame(e);if(r.glTexture&&r.glTexture.isRenderTexture)return this.setSampler2DBuffer(t,r.glTexture,r.width,r.height,i,s);var a=this.uniforms[t],o=r.source;a.textureKey=e,a.source=o.image,a.value=r.glTexture,o.isGLTexture&&(s||(s={}),s.width=o.width,s.height=o.height),s&&(a.textureData=s),this._textureCount=i,this.initSampler2D(a)}return this},setUniform:function(t,e){return h(this.uniforms,t,e),this},getUniform:function(t){return a(this.uniforms,t,null)},setChannel0:function(t,e){return this.setSampler2D("iChannel0",t,0,e)},setChannel1:function(t,e){return this.setSampler2D("iChannel1",t,1,e)},setChannel2:function(t,e){return this.setSampler2D("iChannel2",t,2,e)},setChannel3:function(t,e){return this.setSampler2D("iChannel3",t,3,e)},initSampler2D:function(t){if(t.value){var e=this.gl;e.activeTexture(e.TEXTURE0+this._textureCount),e.bindTexture(e.TEXTURE_2D,t.value);var i=t.textureData;if(i&&!t.value.isRenderTexture){var s=e[a(i,"magFilter","linear").toUpperCase()],n=e[a(i,"minFilter","linear").toUpperCase()],r=e[a(i,"wrapS","repeat").toUpperCase()],o=e[a(i,"wrapT","repeat").toUpperCase()],h=e[a(i,"format","rgba").toUpperCase()];if(i.repeat&&(r=e.REPEAT,o=e.REPEAT),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!!i.flipY),i.width){var l=a(i,"width",512),u=a(i,"height",2),c=a(i,"border",0);e.texImage2D(e.TEXTURE_2D,0,h,l,u,c,h,e.UNSIGNED_BYTE,null)}else e.texImage2D(e.TEXTURE_2D,0,h,e.RGBA,e.UNSIGNED_BYTE,t.source);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,s),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,o)}this.renderer.setProgram(this.program),e.uniform1i(t.uniformLocation,this._textureCount),this._textureCount++}},syncUniforms:function(){var t,e,i,s,n,r=this.gl,a=this.uniforms,o=0;for(var h in a)i=(t=a[h]).glFunc,e=t.glValueLength,s=t.uniformLocation,null!==(n=t.value)&&(1===e?t.glMatrix?i.call(r,s,t.transpose,n):i.call(r,s,n):2===e?i.call(r,s,n.x,n.y):3===e?i.call(r,s,n.x,n.y,n.z):4===e?i.call(r,s,n.x,n.y,n.z,n.w):"sampler2D"===t.type&&(r.activeTexture(r.TEXTURE0+o),r.bindTexture(r.TEXTURE_2D,n),r.uniform1i(s,o),o++))},load:function(t){var e=this.gl,i=this.width,s=this.height,n=this.renderer,r=this.program,a=this.viewMatrix;if(!this.renderToTexture){var o=-this._displayOriginX,h=-this._displayOriginY;a[0]=t[0],a[1]=t[1],a[4]=t[2],a[5]=t[3],a[8]=t[4],a[9]=t[5],a[12]=a[0]*o+a[4]*h,a[13]=a[1]*o+a[5]*h}e.useProgram(r),e.uniformMatrix4fv(e.getUniformLocation(r,"uViewMatrix"),!1,a),e.uniform2f(e.getUniformLocation(r,"uResolution"),this.width,this.height);var l=this.uniforms,u=l.resolution;u.value.x=i,u.value.y=s,l.time.value=n.game.loop.getDuration();var c=this.pointer;if(c){var d=l.mouse,f=c.x/i,p=1-c.y/s;d.value.x=f.toFixed(2),d.value.y=p.toFixed(2)}this.syncUniforms()},flush:function(){var t=this.width,e=this.height,i=this.program,s=this.gl,n=this.vertexBuffer,r=this.renderer,a=2*Float32Array.BYTES_PER_ELEMENT;this.renderToTexture&&(r.setFramebuffer(this.framebuffer),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT)),s.bindBuffer(s.ARRAY_BUFFER,n);var o=s.getAttribLocation(i,"inPosition");-1!==o&&(s.enableVertexAttribArray(o),s.vertexAttribPointer(o,2,s.FLOAT,!1,a,0));var h=this.vertexViewF32;h[3]=e,h[4]=t,h[5]=e,h[8]=t,h[9]=e,h[10]=t;s.bufferSubData(s.ARRAY_BUFFER,0,this.bytes.subarray(0,6*a)),s.drawArrays(s.TRIANGLES,0,6),this.renderToTexture&&r.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},preDestroy:function(){var t=this.gl;t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(this.renderer.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null)}});t.exports=c},10612:t=>{t.exports=function(){}},13908:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),a=i(27902);n.register("shader",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"x",0),o=r(t,"y",0),h=r(t,"width",128),l=r(t,"height",128),u=new a(this.scene,i,n,o,h,l);return void 0!==e&&(t.add=e),s(this.scene,u,t),u}))},51979:(t,e,i)=>{var s=i(27902);i(61286).register("shader",(function(t,e,i,n,r,a,o){return this.displayList.add(new s(this.scene,t,e,i,n,r,a,o))}))},24252:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(19782),r=i(10612),t.exports={renderWebGL:n,renderCanvas:r}},19782:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){if(e.shader){if(i.addToRenderList(e),t.pipelines.clear(),e.renderToTexture)e.load(),e.flush();else{var r=s(e,i,n).calc;t.width===e._rendererWidth&&t.height===e._rendererHeight||e.projOrtho(0,t.width,t.height,0),e.load(r.matrix),e.flush()}t.pipelines.rebind()}}},19543:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n,r,a){for(var o=s.getTintAppendFloatAlpha(i.fillColor,i.fillAlpha*n),h=i.pathData,l=i.pathIndexes,u=0;u{t.exports=function(t,e,i,s){var n=i||e.fillColor,r=s||e.fillAlpha,a=(16711680&n)>>>16,o=(65280&n)>>>8,h=255&n;t.fillStyle="rgba("+a+","+o+","+h+","+r+")"}},17876:t=>{t.exports=function(t,e,i,s){var n=i||e.strokeColor,r=s||e.strokeAlpha,a=(16711680&n)>>>16,o=(65280&n)>>>8,h=255&n;t.strokeStyle="rgba("+a+","+o+","+h+","+r+")",t.lineWidth=e.lineWidth}},91461:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),a=i(88829),o=new s({Extends:r,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.GetBounds,n.FX,n.Mask,n.Origin,n.Pipeline,n.ScrollFactor,n.Transform,n.Visible],initialize:function(t,e,i){void 0===e&&(e="Shape"),r.call(this,t,e),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new a,this.width=0,this.height=0,this.initPipeline()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.isFilled=!1:(this.fillColor=t,this.fillAlpha=e,this.isFilled=!0),this},setStrokeStyle:function(t,e,i){return void 0===i&&(i=1),void 0===t?this.isStroked=!1:(this.lineWidth=t,this.strokeColor=e,this.strokeAlpha=i,this.isStroked=!0),this},setClosePath:function(t){return this.closePath=t,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}}});t.exports=o},50262:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n,r){var a=t.strokeTint,o=s.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*i);a.TL=o,a.TR=o,a.BL=o,a.BR=o;var h=e.pathData,l=h.length-1,u=e.lineWidth,c=u/2,d=h[0]-n,f=h[1]-r;e.closePath||(l-=2);for(var p=2;p{var s=i(2213),n=i(56694),r=i(75606),a=i(11117),o=i(26673),h=i(83392),l=i(91461),u=new n({Extends:l,Mixins:[s],initialize:function(t,e,i,s,n,r,a,h,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===n&&(n=0),void 0===r&&(r=360),void 0===a&&(a=!1),l.call(this,t,"Arc",new o(0,0,s)),this._startAngle=n,this._endAngle=r,this._anticlockwise=a,this._iterations=.01,this.setPosition(e,i);var c=2*this.geom.radius;this.setSize(c,c),void 0!==h&&this.setFillStyle(h,u),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(t){this._iterations=t,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(t){this.geom.radius=t;var e=2*t;this.setSize(e,e),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(t){this._startAngle=t,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(t){this._endAngle=t,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(t){this._anticlockwise=t,this.updateData()}},setRadius:function(t){return this.radius=t,this},setIterations:function(t){return void 0===t&&(t=.01),this.iterations=t,this},setStartAngle:function(t,e){return this._startAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},setEndAngle:function(t,e){return this._endAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},updateData:function(){var t=this._iterations,e=t,i=this.geom.radius,s=r(this._startAngle),n=r(this._endAngle),o=i,l=i;n-=s,this._anticlockwise?n<-h.PI2?n=-h.PI2:n>0&&(n=-h.PI2+n%h.PI2):n>h.PI2?n=h.PI2:n<0&&(n=h.PI2+n%h.PI2);for(var u,c=[o+Math.cos(s)*i,l+Math.sin(s)*i];e<1;)u=n*e+s,c.push(o+Math.cos(u)*i,l+Math.sin(u)*i),e+=t;return u=n+s,c.push(o+Math.cos(u)*i,l+Math.sin(u)*i),c.push(o+Math.cos(s)*i,l+Math.sin(s)*i),this.pathIndexes=a(c),this.pathData=c,this}});t.exports=u},23560:(t,e,i)=>{var s=i(75606),n=i(15608),r=i(17876),a=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var h=t.currentContext;if(a(t,h,e,i,o)){var l=e.radius;h.beginPath(),h.arc(l-e.originX*(2*l),l-e.originY*(2*l),l,s(e._startAngle),s(e._endAngle),e.anticlockwise),e.closePath&&h.closePath(),e.isFilled&&(n(h,e),h.fill()),e.isStroked&&(r(h,e),h.stroke()),h.restore()}}},10369:(t,e,i)=>{var s=i(28593),n=i(61286);n.register("arc",(function(t,e,i,n,r,a,o,h){return this.displayList.add(new s(this.scene,t,e,i,n,r,a,o,h))})),n.register("circle",(function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,0,360,!1,n,r))}))},2213:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(58356),r=i(23560),t.exports={renderWebGL:n,renderCanvas:r}},58356:(t,e,i)=>{var s=i(73329),n=i(19543),r=i(50262);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),h=s(e,i,a),l=o.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&n(o,l,e,d,u,c),e.isStroked&&r(o,e,d,u,c),t.pipelines.postBatch(e)}},15220:(t,e,i)=>{var s=i(56694),n=i(87203),r=i(11117),a=i(74118),o=i(91461),h=new s({Extends:o,Mixins:[n],initialize:function(t,e,i,s,n,r){void 0===e&&(e=0),void 0===i&&(i=0),o.call(this,t,"Curve",s),this._smoothness=32,this._curveBounds=new a,this.closePath=!1,this.setPosition(e,i),void 0!==n&&this.setFillStyle(n,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],s=this.geom.getPoints(e),n=0;n{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.currentContext;if(r(t,o,e,i,a)){var h=e._displayOriginX+e._curveBounds.x,l=e._displayOriginY+e._curveBounds.y,u=e.pathData,c=u.length-1,d=u[0]-h,f=u[1]-l;o.beginPath(),o.moveTo(d,f),e.closePath||(c-=2);for(var p=2;p{var s=i(61286),n=i(15220);s.register("curve",(function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))}))},87203:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(82958),r=i(4024),t.exports={renderWebGL:n,renderCanvas:r}},82958:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),h=n(e,i,a),l=o.calcMatrix.copyFrom(h.calc),u=e._displayOriginX+e._curveBounds.x,c=e._displayOriginY+e._curveBounds.y,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(o,l,e,d,u,c),e.isStroked&&r(o,e,d,u,c),t.pipelines.postBatch(e)}},28591:(t,e,i)=>{var s=i(56694),n=i(11117),r=i(84171),a=i(95669),o=i(91461),h=new s({Extends:o,Mixins:[r],initialize:function(t,e,i,s,n,r,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===n&&(n=128),o.call(this,t,"Ellipse",new a(s/2,n/2,s,n)),this._smoothness=64,this.setPosition(e,i),this.width=s,this.height=n,void 0!==r&&this.setFillStyle(r,h),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSize:function(t,e){return this.width=t,this.height=e,this.geom.setPosition(t/2,e/2),this.geom.setSize(t,e),this.updateData()},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){for(var t=[],e=this.geom.getPoints(this._smoothness),i=0;i{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.currentContext;if(r(t,o,e,i,a)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,f=u[1]-l;o.beginPath(),o.moveTo(d,f),e.closePath||(c-=2);for(var p=2;p{var s=i(28591);i(61286).register("ellipse",(function(t,e,i,n,r,a){return this.displayList.add(new s(this.scene,t,e,i,n,r,a))}))},84171:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(17554),r=i(55881),t.exports={renderWebGL:n,renderCanvas:r}},17554:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),h=n(e,i,a),l=o.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(o,l,e,d,u,c),e.isStroked&&r(o,e,d,u,c),t.pipelines.postBatch(e)}},39169:(t,e,i)=>{var s=i(56694),n=i(91461),r=i(88059),a=new s({Extends:n,Mixins:[r],initialize:function(t,e,i,s,r,a,o,h,l,u,c){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===r&&(r=128),void 0===a&&(a=32),void 0===o&&(o=32),n.call(this,t,"Grid",null),this.cellWidth=a,this.cellHeight=o,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(e,i),this.setSize(s,r),this.setFillStyle(h,l),void 0!==u&&this.setOutlineStyle(u,c),this.updateDisplayOrigin()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showCells=!1:(this.fillColor=t,this.fillAlpha=e,this.showCells=!0),this},setAltFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showAltCells=!1:(this.altFillColor=t,this.altFillAlpha=e,this.showAltCells=!0),this},setOutlineStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showOutline=!1:(this.outlineFillColor=t,this.outlineFillAlpha=e,this.showOutline=!0),this}});t.exports=a},95525:(t,e,i)=>{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.currentContext;if(r(t,o,e,i,a)){var h=-e._displayOriginX,l=-e._displayOriginY,u=i.alpha*e.alpha,c=e.width,d=e.height,f=e.cellWidth,p=e.cellHeight,v=Math.ceil(c/f),g=Math.ceil(d/p),m=f,y=p,x=f-(v*f-c),T=p-(g*p-d),w=e.showCells,E=e.showAltCells,S=e.showOutline,b=0,A=0,_=0,C=0,R=0;if(S&&(m--,y--,x===f&&x--,T===p&&T--),w&&e.fillAlpha>0)for(s(o,e),A=0;A0)for(s(o,e,e.altFillColor,e.altFillAlpha*u),A=0;A0){for(n(o,e,e.outlineFillColor,e.outlineFillAlpha*u),b=1;b{var s=i(61286),n=i(39169);s.register("grid",(function(t,e,i,s,r,a,o,h,l,u){return this.displayList.add(new n(this.scene,t,e,i,s,r,a,o,h,l,u))}))},88059:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(50639),r=i(95525),t.exports={renderWebGL:n,renderCanvas:r}},50639:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),o=s(e,i,r);a.calcMatrix.copyFrom(o.calc).translate(-e._displayOriginX,-e._displayOriginY);var h,l,u=i.alpha*e.alpha,c=e.width,d=e.height,f=e.cellWidth,p=e.cellHeight,v=Math.ceil(c/f),g=Math.ceil(d/p),m=f,y=p,x=f-(v*f-c),T=p-(g*p-d),w=e.showCells,E=e.showAltCells,S=e.showOutline,b=0,A=0,_=0,C=0,R=0;if(S&&(m--,y--,x===f&&x--,T===p&&T--),t.pipelines.preBatch(e),w&&e.fillAlpha>0)for(h=a.fillTint,l=n.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*u),h.TL=l,h.TR=l,h.BL=l,h.BR=l,A=0;A0)for(h=a.fillTint,l=n.getTintAppendFloatAlpha(e.altFillColor,e.altFillAlpha*u),h.TL=l,h.TR=l,h.BL=l,h.BR=l,A=0;A0){var M=a.strokeTint,P=n.getTintAppendFloatAlpha(e.outlineFillColor,e.outlineFillAlpha*u);for(M.TL=P,M.TR=P,M.BL=P,M.BR=P,b=1;b{var s=i(72296),n=i(56694),r=i(91461),a=new n({Extends:r,Mixins:[s],initialize:function(t,e,i,s,n,a,o,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=48),void 0===n&&(n=32),void 0===a&&(a=15658734),void 0===o&&(o=10066329),void 0===h&&(h=13421772),r.call(this,t,"IsoBox",null),this.projection=4,this.fillTop=a,this.fillLeft=o,this.fillRight=h,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(e,i),this.setSize(s,n),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=a},32884:(t,e,i)=>{var s=i(15608),n=i(49584);t.exports=function(t,e,i,r){i.addToRenderList(e);var a=t.currentContext;if(n(t,a,e,i,r)&&e.isFilled){var o=e.width,h=e.height,l=o/2,u=o/e.projection;e.showTop&&(s(a,e,e.fillTop),a.beginPath(),a.moveTo(-l,-h),a.lineTo(0,-u-h),a.lineTo(l,-h),a.lineTo(l,-1),a.lineTo(0,u-1),a.lineTo(-l,-1),a.lineTo(-l,-h),a.fill()),e.showLeft&&(s(a,e,e.fillLeft),a.beginPath(),a.moveTo(-l,0),a.lineTo(0,u),a.lineTo(0,u-h),a.lineTo(-l,-h),a.lineTo(-l,0),a.fill()),e.showRight&&(s(a,e,e.fillRight),a.beginPath(),a.moveTo(l,0),a.lineTo(0,u),a.lineTo(0,u-h),a.lineTo(l,-h),a.lineTo(l,0),a.fill()),a.restore()}}},88154:(t,e,i)=>{var s=i(61286),n=i(4415);s.register("isobox",(function(t,e,i,s,r,a,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,a,o))}))},72296:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(33101),r=i(32884),t.exports={renderWebGL:n,renderCanvas:r}},33101:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var a,o,h,l,u,c,d,f,p,v=t.pipelines.set(e.pipeline),g=s(e,i,r),m=v.calcMatrix.copyFrom(g.calc),y=e.width,x=e.height,T=y/2,w=y/e.projection,E=i.alpha*e.alpha;e.isFilled&&(t.pipelines.preBatch(e),e.showTop&&(a=n.getTintAppendFloatAlpha(e.fillTop,E),o=m.getX(-T,-x),h=m.getY(-T,-x),l=m.getX(0,-w-x),u=m.getY(0,-w-x),c=m.getX(T,-x),d=m.getY(T,-x),f=m.getX(0,w-x),p=m.getY(0,w-x),v.batchQuad(e,o,h,l,u,c,d,f,p,0,0,1,1,a,a,a,a,2)),e.showLeft&&(a=n.getTintAppendFloatAlpha(e.fillLeft,E),o=m.getX(-T,0),h=m.getY(-T,0),l=m.getX(0,w),u=m.getY(0,w),c=m.getX(0,w-x),d=m.getY(0,w-x),f=m.getX(-T,-x),p=m.getY(-T,-x),v.batchQuad(e,o,h,l,u,c,d,f,p,0,0,1,1,a,a,a,a,2)),e.showRight&&(a=n.getTintAppendFloatAlpha(e.fillRight,E),o=m.getX(T,0),h=m.getY(T,0),l=m.getX(0,w),u=m.getY(0,w),c=m.getX(0,w-x),d=m.getY(0,w-x),f=m.getX(T,-x),p=m.getY(T,-x),v.batchQuad(e,o,h,l,u,c,d,f,p,0,0,1,1,a,a,a,a,2)),t.pipelines.postBatch(e))}},65159:(t,e,i)=>{var s=i(56694),n=i(93387),r=i(91461),a=new s({Extends:r,Mixins:[n],initialize:function(t,e,i,s,n,a,o,h,l){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=48),void 0===n&&(n=32),void 0===a&&(a=!1),void 0===o&&(o=15658734),void 0===h&&(h=10066329),void 0===l&&(l=13421772),r.call(this,t,"IsoTriangle",null),this.projection=4,this.fillTop=o,this.fillLeft=h,this.fillRight=l,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=a,this.isFilled=!0,this.setPosition(e,i),this.setSize(s,n),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setReversed:function(t){return this.isReversed=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=a},9923:(t,e,i)=>{var s=i(15608),n=i(49584);t.exports=function(t,e,i,r){i.addToRenderList(e);var a=t.currentContext;if(n(t,a,e,i,r)&&e.isFilled){var o=e.width,h=e.height,l=o/2,u=o/e.projection,c=e.isReversed;e.showTop&&c&&(s(a,e,e.fillTop),a.beginPath(),a.moveTo(-l,-h),a.lineTo(0,-u-h),a.lineTo(l,-h),a.lineTo(0,u-h),a.fill()),e.showLeft&&(s(a,e,e.fillLeft),a.beginPath(),c?(a.moveTo(-l,-h),a.lineTo(0,u),a.lineTo(0,u-h)):(a.moveTo(-l,0),a.lineTo(0,u),a.lineTo(0,u-h)),a.fill()),e.showRight&&(s(a,e,e.fillRight),a.beginPath(),c?(a.moveTo(l,-h),a.lineTo(0,u),a.lineTo(0,u-h)):(a.moveTo(l,0),a.lineTo(0,u),a.lineTo(0,u-h)),a.fill()),a.restore()}}},67765:(t,e,i)=>{var s=i(61286),n=i(65159);s.register("isotriangle",(function(t,e,i,s,r,a,o,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,a,o,h))}))},93387:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(54946),r=i(9923),t.exports={renderWebGL:n,renderCanvas:r}},54946:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),o=s(e,i,r),h=a.calcMatrix.copyFrom(o.calc),l=e.width,u=e.height,c=l/2,d=l/e.projection,f=e.isReversed,p=i.alpha*e.alpha;if(e.isFilled){var v,g,m,y,x,T,w;if(t.pipelines.preBatch(e),e.showTop&&f){v=n.getTintAppendFloatAlpha(e.fillTop,p),g=h.getX(-c,-u),m=h.getY(-c,-u),y=h.getX(0,-d-u),x=h.getY(0,-d-u),T=h.getX(c,-u),w=h.getY(c,-u);var E=h.getX(0,d-u),S=h.getY(0,d-u);a.batchQuad(e,g,m,y,x,T,w,E,S,0,0,1,1,v,v,v,v,2)}e.showLeft&&(v=n.getTintAppendFloatAlpha(e.fillLeft,p),f?(g=h.getX(-c,-u),m=h.getY(-c,-u),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)):(g=h.getX(-c,0),m=h.getY(-c,0),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)),a.batchTri(e,g,m,y,x,T,w,0,0,1,1,v,v,v,2)),e.showRight&&(v=n.getTintAppendFloatAlpha(e.fillRight,p),f?(g=h.getX(c,-u),m=h.getY(c,-u),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)):(g=h.getX(c,0),m=h.getY(c,0),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)),a.batchTri(e,g,m,y,x,T,w,0,0,1,1,v,v,v,2)),t.pipelines.postBatch(e)}}},579:(t,e,i)=>{var s=i(56694),n=i(91461),r=i(88829),a=i(52660),o=new s({Extends:n,Mixins:[a],initialize:function(t,e,i,s,a,o,h,l,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===a&&(a=0),void 0===o&&(o=128),void 0===h&&(h=0),n.call(this,t,"Line",new r(s,a,o,h));var c=Math.max(1,this.geom.right-this.geom.left),d=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(e,i),this.setSize(c,d),void 0!==l&&this.setStrokeStyle(1,l,u),this.updateDisplayOrigin()},setLineWidth:function(t,e){return void 0===e&&(e=t),this._startWidth=t,this._endWidth=e,this.lineWidth=t,this},setTo:function(t,e,i,s){return this.geom.setTo(t,e,i,s),this}});t.exports=o},52044:(t,e,i)=>{var s=i(17876),n=i(49584);t.exports=function(t,e,i,r){i.addToRenderList(e);var a=t.currentContext;if(n(t,a,e,i,r)){var o=e._displayOriginX,h=e._displayOriginY;e.isStroked&&(s(a,e),a.beginPath(),a.moveTo(e.geom.x1-o,e.geom.y1-h),a.lineTo(e.geom.x2-o,e.geom.y2-h),a.stroke()),a.restore()}}},85665:(t,e,i)=>{var s=i(61286),n=i(579);s.register("line",(function(t,e,i,s,r,a,o,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,a,o,h))}))},52660:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(46952),r=i(52044),t.exports={renderWebGL:n,renderCanvas:r}},46952:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),o=s(e,i,r);a.calcMatrix.copyFrom(o.calc);var h=e._displayOriginX,l=e._displayOriginY,u=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isStroked){var c=a.strokeTint,d=n.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*u);c.TL=d,c.TR=d,c.BL=d,c.BR=d;var f=e._startWidth,p=e._endWidth;a.batchLine(e.geom.x1-h,e.geom.y1-l,e.geom.x2-h,e.geom.y2-l,f,p,1,0,!1,o.sprite,o.camera)}t.pipelines.postBatch(e)}},91249:(t,e,i)=>{var s=i(70573),n=i(56694),r=i(11117),a=i(14045),o=i(8580),h=i(91461),l=i(18974),u=new n({Extends:h,Mixins:[s],initialize:function(t,e,i,s,n,r){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Polygon",new o(s));var l=a(this.geom);this.setPosition(e,i),this.setSize(l.width,l.height),void 0!==n&&this.setFillStyle(n,r),this.updateDisplayOrigin(),this.updateData()},smooth:function(t){void 0===t&&(t=1);for(var e=0;e{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.currentContext;if(r(t,o,e,i,a)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,f=u[1]-l;o.beginPath(),o.moveTo(d,f),e.closePath||(c-=2);for(var p=2;p{var s=i(61286),n=i(91249);s.register("polygon",(function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))}))},70573:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(72841),r=i(40834),t.exports={renderWebGL:n,renderCanvas:r}},72841:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),h=n(e,i,a),l=o.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(o,l,e,d,u,c),e.isStroked&&r(o,e,d,u,c),t.pipelines.postBatch(e)}},517:(t,e,i)=>{var s=i(56694),n=i(74118),r=i(91461),a=i(37673),o=new s({Extends:r,Mixins:[a],initialize:function(t,e,i,s,a,o,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===a&&(a=128),r.call(this,t,"Rectangle",new n(0,0,s,a)),this.setPosition(e,i),this.setSize(s,a),void 0!==o&&this.setFillStyle(o,h),this.updateDisplayOrigin(),this.updateData()},setSize:function(t,e){this.width=t,this.height=e,this.geom.setSize(t,e),this.updateData(),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=o},4091:(t,e,i)=>{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.currentContext;if(r(t,o,e,i,a)){var h=e._displayOriginX,l=e._displayOriginY;e.isFilled&&(s(o,e),o.fillRect(-h,-l,e.width,e.height)),e.isStroked&&(n(o,e),o.beginPath(),o.rect(-h,-l,e.width,e.height),o.stroke()),o.restore()}}},94355:(t,e,i)=>{var s=i(61286),n=i(517);s.register("rectangle",(function(t,e,i,s,r,a){return this.displayList.add(new n(this.scene,t,e,i,s,r,a))}))},37673:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(43532),r=i(4091),t.exports={renderWebGL:n,renderCanvas:r}},43532:(t,e,i)=>{var s=i(73329),n=i(50262),r=i(75512);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),h=s(e,i,a);o.calcMatrix.copyFrom(h.calc);var l=e._displayOriginX,u=e._displayOriginY,c=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isFilled){var d=o.fillTint,f=r.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*c);d.TL=f,d.TR=f,d.BL=f,d.BR=f,o.batchFillRect(-l,-u,e.width,e.height)}e.isStroked&&n(o,e,c,l,u),t.pipelines.postBatch(e)}},77843:(t,e,i)=>{var s=i(87956),n=i(56694),r=i(11117),a=i(91461),o=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,s,n,r,o,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=5),void 0===n&&(n=32),void 0===r&&(r=64),a.call(this,t,"Star",null),this._points=s,this._innerRadius=n,this._outerRadius=r,this.setPosition(e,i),this.setSize(2*r,2*r),void 0!==o&&this.setFillStyle(o,h),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,s=this._outerRadius,n=Math.PI/2*3,a=Math.PI/e,o=s,h=s;t.push(o,h+-s);for(var l=0;l{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.currentContext;if(r(t,o,e,i,a)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,f=u[1]-l;o.beginPath(),o.moveTo(d,f),e.closePath||(c-=2);for(var p=2;p{var s=i(77843);i(61286).register("star",(function(t,e,i,n,r,a,o){return this.displayList.add(new s(this.scene,t,e,i,n,r,a,o))}))},87956:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(12037),r=i(11401),t.exports={renderWebGL:n,renderCanvas:r}},12037:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),h=n(e,i,a),l=o.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(o,l,e,d,u,c),e.isStroked&&r(o,e,d,u,c),t.pipelines.postBatch(e)}},21873:(t,e,i)=>{var s=i(56694),n=i(91461),r=i(66349),a=i(70498),o=new s({Extends:n,Mixins:[a],initialize:function(t,e,i,s,a,o,h,l,u,c,d){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===a&&(a=128),void 0===o&&(o=64),void 0===h&&(h=0),void 0===l&&(l=128),void 0===u&&(u=128),n.call(this,t,"Triangle",new r(s,a,o,h,l,u));var f=this.geom.right-this.geom.left,p=this.geom.bottom-this.geom.top;this.setPosition(e,i),this.setSize(f,p),void 0!==c&&this.setFillStyle(c,d),this.updateDisplayOrigin(),this.updateData()},setTo:function(t,e,i,s,n,r){return this.geom.setTo(t,e,i,s,n,r),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=o},60213:(t,e,i)=>{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.currentContext;if(r(t,o,e,i,a)){var h=e._displayOriginX,l=e._displayOriginY,u=e.geom.x1-h,c=e.geom.y1-l,d=e.geom.x2-h,f=e.geom.y2-l,p=e.geom.x3-h,v=e.geom.y3-l;o.beginPath(),o.moveTo(u,c),o.lineTo(d,f),o.lineTo(p,v),o.closePath(),e.isFilled&&(s(o,e),o.fill()),e.isStroked&&(n(o,e),o.stroke()),o.restore()}}},79296:(t,e,i)=>{var s=i(61286),n=i(21873);s.register("triangle",(function(t,e,i,s,r,a,o,h,l,u){return this.displayList.add(new n(this.scene,t,e,i,s,r,a,o,h,l,u))}))},70498:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(72291),r=i(60213),t.exports={renderWebGL:n,renderCanvas:r}},72291:(t,e,i)=>{var s=i(73329),n=i(50262),r=i(75512);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),h=s(e,i,a);o.calcMatrix.copyFrom(h.calc);var l=e._displayOriginX,u=e._displayOriginY,c=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isFilled){var d=o.fillTint,f=r.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*c);d.TL=f,d.TR=f,d.BL=f,d.BR=f;var p=e.geom.x1-l,v=e.geom.y1-u,g=e.geom.x2-l,m=e.geom.y2-u,y=e.geom.x3-l,x=e.geom.y3-u;o.batchFillTriangle(p,v,g,m,y,x,h.sprite,h.camera)}e.isStroked&&n(o,e,c,l,u),t.pipelines.postBatch(e)}},13747:(t,e,i)=>{var s=i(16569),n=i(56694),r=i(64937),a=i(89980),o=i(20791),h=new n({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.FX,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,o],initialize:function(t,e,i,n,r){a.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s(this),this.setTexture(n,r),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e){return this.anims.play(t,e)},playReverse:function(t,e){return this.anims.playReverse(t,e)},playAfterDelay:function(t,e){return this.anims.playAfterDelay(t,e)},playAfterRepeat:function(t,e){return this.anims.playAfterRepeat(t,e)},chain:function(t){return this.anims.chain(t)},stop:function(){return this.anims.stop()},stopAfterDelay:function(t){return this.anims.stopAfterDelay(t)},stopAfterRepeat:function(t){return this.anims.stopAfterRepeat(t)},stopOnFrame:function(t){return this.anims.stopOnFrame(t)},toJSON:function(){return r.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=h},27573:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},89219:(t,e,i)=>{var s=i(88933),n=i(32291),r=i(99325),a=i(20494),o=i(13747);r.register("sprite",(function(t,e){void 0===t&&(t={});var i=a(t,"key",null),r=a(t,"frame",null),h=new o(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),s(this.scene,h,t),n(h,t),h}))},66135:(t,e,i)=>{var s=i(61286),n=i(13747);s.register("sprite",(function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.displayList.add(r),r}))},20791:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(21034),r=i(27573),t.exports={renderWebGL:n,renderCanvas:r}},21034:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),e.pipeline.batchSprite(e,i,s)}},32979:t=>{t.exports=function(t,e,i){var s=t.canvas,n=t.context,r=t.style,a=[],o=0,h=i.length;r.maxLines>0&&r.maxLines1&&(d+=f*(h-1)),{width:o,height:d,lines:h,lineWidths:a,lineSpacing:f,lineHeight:c}}},27030:(t,e,i)=>{var s=i(61068);t.exports=function(t){var e=s.create(this),i=e.getContext("2d");t.syncFont(e,i);var n=i.measureText(t.testString);if("actualBoundingBoxAscent"in n){var r=n.actualBoundingBoxAscent,a=n.actualBoundingBoxDescent;return s.remove(e),{ascent:r,descent:a,fontSize:r+a}}var o=Math.ceil(n.width*t.baselineX),h=o,l=2*h;h=h*t.baselineY|0,e.width=o,e.height=l,i.fillStyle="#f00",i.fillRect(0,0,o,l),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,h);var u={ascent:0,descent:0,fontSize:0},c=i.getImageData(0,0,o,l);if(!c)return u.ascent=h,u.descent=h+6,u.fontSize=u.ascent+u.descent,s.remove(e),u;var d,f,p=c.data,v=p.length,g=4*o,m=0,y=!1;for(d=0;dh;d--){for(f=0;f{var s=i(99584),n=i(61068),r=i(56694),a=i(64937),o=i(89980),h=i(32979),l=i(10850),u=i(55638),c=i(80032),d=i(74744),f=new r({Extends:o,Mixins:[a.Alpha,a.BlendMode,a.ComputedSize,a.Crop,a.Depth,a.Flip,a.FX,a.GetBounds,a.Mask,a.Origin,a.Pipeline,a.ScrollFactor,a.Tint,a.Transform,a.Visible,c],initialize:function(t,e,i,s,r){void 0===e&&(e=0),void 0===i&&(i=0),o.call(this,t,"Text"),this.renderer=t.sys.renderer,this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.canvas=n.create(this),this.context=this.canvas.getContext("2d"),this.style=new d(this,r),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this._text=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.lineSpacing=0,this.dirty=!1,0===this.style.resolution&&(this.style.resolution=1),this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(s),r&&r.padding&&this.setPadding(r.padding),r&&r.lineSpacing&&this.setLineSpacing(r.lineSpacing)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",s(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(t){var e=this.style;if(e.wordWrapCallback){var i=e.wordWrapCallback.call(e.wordWrapCallbackScope,t,this);return Array.isArray(i)&&(i=i.join("\n")),i}return e.wordWrapWidth?e.wordWrapUseAdvanced?this.advancedWordWrap(t,this.context,this.style.wordWrapWidth):this.basicWordWrap(t,this.context,this.style.wordWrapWidth):t},advancedWordWrap:function(t,e,i){for(var s="",n=t.replace(/ +/gi," ").split(this.splitRegExp),r=n.length,a=0;al){if(0===c){for(var v=f;v.length&&(v=v.slice(0,-1),!((p=e.measureText(v).width)<=l)););if(!v.length)throw new Error("wordWrapWidth < a single character");var g=d.substr(v.length);u[c]=g,h+=v}var m=u[c].length?c:c+1,y=u.slice(m).join(" ").replace(/[ \n]*$/gi,"");n.splice(a+1,0,y),r=n.length;break}h+=f,l-=p}s+=h.replace(/[ \n]*$/gi,"")+"\n"}}return s=s.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var s="",n=t.split(this.splitRegExp),r=n.length-1,a=e.measureText(" ").width,o=0;o<=r;o++){for(var h=i,l=n[o].split(" "),u=l.length-1,c=0;c<=u;c++){var d=l[c],f=e.measureText(d).width,p=f;ch&&c>0&&(s+="\n",h=i),s+=d,c0&&(d+=l.lineSpacing*v),i.rtl)c=f-c-u.left-u.right;else if("right"===i.align)c+=a-l.lineWidths[v];else if("center"===i.align)c+=(a-l.lineWidths[v])/2;else if("justify"===i.align){if(l.lineWidths[v]/l.width>=.85){var g=l.width-l.lineWidths[v],m=e.measureText(" ").width,y=o[v].trim(),x=y.split(" ");g+=(o[v].length-y.length)*m;for(var T=Math.floor(g/m),w=0;T>0;)x[w]+=" ",w=(w+1)%(x.length-1||1),--T;o[v]=x.join(" ")}}this.autoRound&&(c=Math.round(c),d=Math.round(d)),i.strokeThickness&&(i.syncShadow(e,i.shadowStroke),e.strokeText(o[v],c,d)),i.color&&(i.syncShadow(e,i.shadowFill),e.fillText(o[v],c,d))}e.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var E=this.input;return E&&!E.customHitArea&&(E.hitArea.width=this.width,E.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(t){this.setText(t)}},toJSON:function(){var t=a.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&u(this.canvas),n.remove(this.canvas),this.texture.destroy()}});t.exports=f},71649:t=>{t.exports=function(t,e,i,s){0!==e.width&&0!==e.height&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,s))}},75397:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),a=i(76555);n.register("text",(function(t,e){void 0===t&&(t={});var i=r(t,"text",""),n=r(t,"style",null),o=r(t,"padding",null);null!==o&&(n.padding=o);var h=new a(this.scene,0,0,i,n);return void 0!==e&&(t.add=e),s(this.scene,h,t),h.autoRound=r(t,"autoRound",!0),h.resolution=r(t,"resolution",1),h}))},94627:(t,e,i)=>{var s=i(76555);i(61286).register("text",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},80032:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(76128),r=i(71649),t.exports={renderWebGL:n,renderCanvas:r}},74744:(t,e,i)=>{var s=i(56694),n=i(20494),r=i(10850),a=i(27030),o={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new s({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this.wordWrapWidth,this.wordWrapCallback,this.wordWrapCallbackScope,this.wordWrapUseAdvanced,this._font,this.setStyle(e,!1,!0)},setStyle:function(t,e,i){for(var s in void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),o){var h=i?o[s][1]:this[s];this[s]="wordWrapCallback"===s||"wordWrapCallbackScope"===s?r(t,o[s][0],h):n(t,o[s][0],h)}var l=r(t,"font",null);null!==l&&this.setFont(l,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var u=r(t,"fill",null);null!==u&&(this.color=u);var c=r(t,"metrics",!1);return c?this.metrics={ascent:r(c,"ascent",0),descent:r(c,"descent",0),fontSize:r(c,"fontSize",0)}:!e&&this.metrics||(this.metrics=a(this)),e?this.parent.updateText():this.parent},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow: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)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=a(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i=t,s="",n="";if("string"!=typeof t)i=r(t,"fontFamily","Courier"),s=r(t,"fontSize","16px"),n=r(t,"fontStyle","");else{var a=t.split(" "),o=0;n=a.length>2?a[o++]:"",s=a[o++]||"16px",i=a[o++]||"Courier"}return i===this.fontFamily&&s===this.fontSize&&n===this.fontStyle||(this.fontFamily=i,this.fontSize=s,this.fontStyle=n,e&&this.update(!0)),this.parent},setFontFamily:function(t){return this.fontFamily!==t&&(this.fontFamily=t,this.update(!0)),this.parent},setFontStyle:function(t){return this.fontStyle!==t&&(this.fontStyle=t,this.update(!0)),this.parent},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize!==t&&(this.fontSize=t,this.update(!0)),this.parent},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setResolution:function(t){return this.resolution=t,this.update(!1)},setStroke:function(t,e){return void 0===e&&(e=this.strokeThickness),void 0===t&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):this.stroke===t&&this.strokeThickness===e||(this.stroke=t,this.strokeThickness=e,this.update(!0)),this.parent},setShadow:function(t,e,i,s,n,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===s&&(s=0),void 0===n&&(n=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=s,this.shadowStroke=n,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in o)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},76128:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n){if(0!==e.width&&0!==e.height){i.addToRenderList(e);var r=e.frame,a=r.width,o=r.height,h=s.getTintAppendFloatAlpha,l=t.pipelines.set(e.pipeline,e),u=l.setTexture2D(r.glTexture,e);l.batchTexture(e,r.glTexture,a,o,e.x,e.y,a/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,a,o,h(e.tintTopLeft,i.alpha*e._alphaTL),h(e.tintTopRight,i.alpha*e._alphaTR),h(e.tintBottomLeft,i.alpha*e._alphaBL),h(e.tintBottomRight,i.alpha*e._alphaBR),e.tintFill,0,0,i,n,!1,u)}}},35856:(t,e,i)=>{var s=i(61068),n=i(56694),r=i(64937),a=i(89980),o=i(3504),h=i(8213),l=i(9271),u=i(93736),c=new n({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.FX,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,l],initialize:function(t,e,i,n,r,h,l){var c=t.sys.renderer;a.call(this,t,"TileSprite");var d=t.sys.textures.get(h),f=d.get(l);f.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed textures"),f=(d=t.sys.textures.get("__MISSING")).get()),n&&r?(n=Math.floor(n),r=Math.floor(r)):(n=f.width,r=f.height),this._tilePosition=new u,this._tileScale=new u(1,1),this.dirty=!1,this.renderer=c,this.canvas=s.create(this,n,r),this.context=this.canvas.getContext("2d"),this.displayTexture=d,this.displayFrame=f,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=o(f.width),this.potHeight=o(f.height),this.fillCanvas=s.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(e,i),this.setSize(n,r),this.setFrame(l),this.setOriginFromFrame(),this.initPipeline()},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){var e=this.displayTexture.get(t);return this.potWidth=o(e.width),this.potHeight=o(e.height),this.canvas.width=0,e.cutWidth&&e.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=e,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileScale:function(t,e){return void 0===t&&(t=this.tileScaleX),void 0===e&&(e=t),this.tileScaleX=t,this.tileScaleY=e,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var t=this.displayFrame;if(t.source.isRenderTexture||t.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var e=this.fillContext,i=this.fillCanvas,s=this.potWidth,n=this.potHeight;this.renderer&&this.renderer.gl||(s=t.cutWidth,n=t.cutHeight),e.clearRect(0,0,s,n),i.width=s,i.height=n,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,s,n),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var t=this.canvas;if(t.width===this.width&&t.height===this.height||(t.width=this.width,t.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context;this.scene.sys.game.config.antialias||h.disable(e);var i=this._tileScale.x,s=this._tileScale.y,n=this._tilePosition.x,r=this._tilePosition.y;e.clearRect(0,0,this.width,this.height),e.save(),e.scale(i,s),e.translate(-n,-r),e.fillStyle=this.fillPattern,e.fillRect(n,r,this.width/i,this.height/s),e.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),s.remove(this.canvas),s.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}});t.exports=c},93305:t=>{t.exports=function(t,e,i,s){e.updateCanvas(),i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},63950:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),a=i(35856);n.register("tileSprite",(function(t,e){void 0===t&&(t={});var i=r(t,"x",0),n=r(t,"y",0),o=r(t,"width",512),h=r(t,"height",512),l=r(t,"key",""),u=r(t,"frame",""),c=new a(this.scene,i,n,o,h,l,u);return void 0!==e&&(t.add=e),s(this.scene,c,t),c}))},20509:(t,e,i)=>{var s=i(35856);i(61286).register("tileSprite",(function(t,e,i,n,r,a){return this.displayList.add(new s(this.scene,t,e,i,n,r,a))}))},9271:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(74287),r=i(93305),t.exports={renderWebGL:n,renderCanvas:r}},74287:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n){e.updateCanvas();var r=e.width,a=e.height;if(0!==r&&0!==a){i.addToRenderList(e);var o=s.getTintAppendFloatAlpha,h=t.pipelines.set(e.pipeline,e),l=h.setTexture2D(e.fillPattern,e);h.batchTexture(e,e.fillPattern,e.displayFrame.width*e.tileScaleX,e.displayFrame.height*e.tileScaleY,e.x,e.y,r,a,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.originX*r,e.originY*a,0,0,r,a,o(e.tintTopLeft,i.alpha*e._alphaTL),o(e.tintTopRight,i.alpha*e._alphaTR),o(e.tintBottomLeft,i.alpha*e._alphaBL),o(e.tintBottomRight,i.alpha*e._alphaBR),e.tintFill,e.tilePositionX%e.displayFrame.width/e.displayFrame.width,e.tilePositionY%e.displayFrame.height/e.displayFrame.height,i,n,!1,l)}}},8630:(t,e,i)=>{var s=i(56694),n=i(82897),r=i(64937),a=i(56631),o=i(97081),h=i(33963),l=i(89980),u=i(76038),c=i(76583),d=i(77974),f=i(83392),p=new s({Extends:l,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.FX,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,d],initialize:function(t,e,i,s){l.call(this,t,"Video"),this.video=null,this.videoTexture=null,this.videoTextureSource=null,this.snapshotTexture=null,this.flipY=!1,this._key=c(),this.touchLocked=!0,this.playWhenUnlocked=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={play:this.playHandler.bind(this),load:this.loadHandler.bind(this),error:this.loadErrorHandler.bind(this),end:this.completeHandler.bind(this),time:this.timeUpdateHandler.bind(this),seeking:this.seekingHandler.bind(this),seeked:this.seekedHandler.bind(this)},this._crop=this.resetCropObject(),this.markers={},this._markerIn=-1,this._markerOut=f.MAX_SAFE_INTEGER,this._lastUpdate=0,this._cacheKey="",this._isSeeking=!1,this.removeVideoElementOnDestroy=!1,this.setPosition(e,i),this.setSize(256,256),this.initPipeline(),s&&this.changeSource(s,!1);var n=t.sys.game.events;n.on(o.PAUSE,this.globalPause,this),n.on(o.RESUME,this.globalResume,this);var r=t.sys.sound;r&&r.on(u.GLOBAL_MUTE,this.globalMute,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},play:function(t,e,i){if(this.touchLocked&&this.playWhenUnlocked||this.isPlaying())return this;var s=this.video;if(!s)return console.warn("Video not loaded"),this;void 0===t&&(t=s.loop);var n=this.scene.sys.sound;return n&&n.mute&&this.setMute(!0),isNaN(e)||(this._markerIn=e),!isNaN(i)&&i>e&&(this._markerOut=i),s.loop=t,this.createPlayPromise()},createPlayPromise:function(){var t=this.video,e=this._callbacks;this.isPlaying();var i=t.play();return void 0!==i?i.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)):(t.addEventListener("playing",e.play),t.readyState<2&&(this.retry=this.retryLimit,this._retryID&&window.clearTimeout(this._retryID),this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))),t.addEventListener("error",e.error),t.addEventListener("abort",e.error),t.addEventListener("stalled",e.error),t.addEventListener("suspend",e.error),t.addEventListener("waiting",e.error),t.addEventListener("ended",e.end),t.addEventListener("timeupdate",e.time),t.addEventListener("seeking",e.seeking),t.addEventListener("seeked",e.seeked),t.addEventListener("play",this.playHandler2.bind(this)),t.addEventListener("pause",this.pauseHandler.bind(this)),this},playHandler2:function(t){console.log("play",this._cacheKey)},pauseHandler:function(t){console.log("paused",this._cacheKey)},changeSource:function(t,e,i,s,n){void 0===e&&(e=!0),this.video&&this.stop();var r=this.scene.sys.cache.video.get(t);return r?(this.video=r,this._cacheKey=t,this._codePaused=r.paused,this._codeMuted=r.muted,this.videoTexture?(this.scene.sys.textures.remove(this._key),this.videoTexture=this.scene.sys.textures.create(this._key,r,r.videoWidth,r.videoHeight),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,r.videoWidth,r.videoHeight),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(a.VIDEO_CREATED,this,r.videoWidth,r.videoHeight)):this.updateTexture(),r.currentTime=0,this._lastUpdate=0,e&&this.play(i,s,n)):this.video=null,this},addMarker:function(t,e,i){return!isNaN(e)&&e>=0&&!isNaN(i)&&(this.markers[t]=[e,i]),this},playMarker:function(t,e){var i=this.markers[t];return i&&this.play(e,i[0],i[1]),this},removeMarker:function(t){return delete this.markers[t],this},snapshot:function(t,e){return void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.snapshotArea(0,0,this.width,this.height,t,e)},snapshotArea:function(t,e,i,s,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===s&&(s=this.height),void 0===n&&(n=i),void 0===r&&(r=s);var a=this.video,o=this.snapshotTexture;return o?(o.setSize(n,r),a&&o.context.drawImage(a,t,e,i,s,0,0,n,r)):(o=this.scene.sys.textures.createCanvas(c(),n,r),this.snapshotTexture=o,a&&o.context.drawImage(a,t,e,i,s,0,0,n,r)),o.update()},saveSnapshotTexture:function(t){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,t):this.snapshotTexture=this.scene.sys.textures.createCanvas(t,this.width,this.height),this.snapshotTexture},loadURL:function(t,e,i,s){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var n=document.createElement("video");return n.controls=!1,i&&(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")),n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),void 0!==s&&n.setAttribute("crossorigin",s),n.addEventListener("error",this._callbacks.error),n.addEventListener(e,this._callbacks.load),n.src=t,n.load(),this.video=n,this},loadMediaStream:function(t,e,i){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var s=document.createElement("video");s.controls=!1,i&&(s.muted=!0,s.defaultMuted=!0,s.setAttribute("autoplay","autoplay")),s.setAttribute("playsinline","playsinline"),s.setAttribute("preload","auto"),s.addEventListener("error",this._callbacks.error,!0),s.addEventListener(e,this._callbacks.load,!0);try{s.srcObject=t}catch(e){s.src=window.URL.createObjectURL(t)}return s.load(),this.video=s,this},playPromiseSuccessHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(a.VIDEO_PLAY,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn)},playPromiseErrorHandler:function(t){console.log("pp error handler",t),this.scene.sys.input.once(h.POINTER_DOWN,this.unlockHandler,this),this.touchLocked=!0,this.playWhenUnlocked=!0,this.emit(a.VIDEO_ERROR,this,t)},playHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(a.VIDEO_PLAY,this),this.video.removeEventListener("playing",this._callbacks.play,!0)},loadHandler:function(){this.updateTexture()},loadErrorHandler:function(t){this.stop(),this.emit(a.VIDEO_ERROR,this,t)},unlockHandler:function(){this.touchLocked=!1,this.playWhenUnlocked=!1,this.emit(a.VIDEO_UNLOCKED,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn),this.createPlayPromise()},completeHandler:function(){console.log("ended"),this.emit(a.VIDEO_COMPLETE,this)},timeUpdateHandler:function(){this.video&&this.video.currentTime=this._markerOut&&(t.loop?(t.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=e,this.emit(a.VIDEO_LOOP,this)):(this.emit(a.VIDEO_COMPLETE,this),console.log("prEUp stop"),this.stop())))}},checkVideoProgress:function(){this.video.readyState>=2?this.updateTexture():(this.retry--,this.retry>0?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):this.emit(a.VIDEO_TIMEOUT,this))},updateTexture:function(){var t=this.video,e=t.videoWidth,i=t.videoHeight;if(this.videoTexture){var s=this.videoTextureSource;s.source!==t&&(s.source=t,s.width=e,s.height=i),s.update()}else this.videoTexture=this.scene.sys.textures.create(this._key,t,e,i),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,e,i),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(a.VIDEO_CREATED,this,e,i)},getVideoKey:function(){return this._cacheKey},seekTo:function(t){var e=this.video;if(e){var i=e.duration;if(i!==1/0&&!isNaN(i)){var s=i*t;this.setCurrentTime(s)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e=this.video;if(e){if("string"==typeof t){var i=t[0],s=parseFloat(t.substr(1));"+"===i?t=e.currentTime+s:"-"===i&&(t=e.currentTime-s)}e.currentTime=t,this._lastUpdate=t}return this},isSeeking:function(){return this._isSeeking},seekingHandler:function(){this._isSeeking=!0,this.emit(a.VIDEO_SEEKING,this)},seekedHandler:function(){this._isSeeking=!1,this.emit(a.VIDEO_SEEKED,this),this.video&&this.updateTexture()},getProgress:function(){var t=this.video;if(t){var e=t.currentTime,i=t.duration;if(i!==1/0&&!isNaN(i))return e/i}return 0},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){void 0===t&&(t=!0),this._codeMuted=t;var e=this.video;return e&&(e.muted=!!this._systemMuted||t),this},isMuted:function(){return this._codeMuted},globalMute:function(t,e){this._systemMuted=e;var i=this.video;i&&(i.muted=!!this._codeMuted||e)},globalPause:function(){this._systemPaused=!0,this.video&&this.video.pause()},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&this.createPlayPromise()},setPaused:function(t){void 0===t&&(t=!0);var e=this.video;return this._codePaused=t,e&&(t?e.paused||e.pause():t||e.paused&&!this._systemPaused&&this.createPlayPromise()),this},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(t){return void 0===t&&(t=1),this.video&&(this.video.volume=n(t,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(t){return this.video&&(this.video.playbackRate=t),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(t){return void 0===t&&(t=!0),this.video&&(this.video.loop=t),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!1),this.videoTexture&&this.scene.sys.textures.renameTexture(this._key,t),this._key=t,this.flipY=e,this.videoTextureSource&&this.videoTextureSource.setFlipY(e),this.videoTexture},stop:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.removeEventListener(i,e[i]);t.pause()}return this._retryID&&window.clearTimeout(this._retryID),this.emit(a.VIDEO_STOP,this),this},removeVideoElement:function(){var t=this.video;if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("autoplay"),t.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(),this.removeVideoElementOnDestroy&&this.removeVideoElement();var t=this.scene.sys.game.events;t.off(o.PAUSE,this.globalPause,this),t.off(o.RESUME,this.globalResume,this);var e=this.scene.sys.sound;e&&e.off(u.GLOBAL_MUTE,this.globalMute,this),this._retryID&&window.clearTimeout(this._retryID)}});t.exports=p},56933:t=>{t.exports=function(t,e,i,s){e.videoTexture&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,s))}},65601:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),a=i(8630);n.register("video",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=new a(this.scene,0,0,i);return void 0!==e&&(t.add=e),s(this.scene,n,t),n}))},215:(t,e,i)=>{var s=i(8630);i(61286).register("video",(function(t,e,i){return this.displayList.add(new s(this.scene,t,e,i))}))},77974:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(83572),r=i(56933),t.exports={renderWebGL:n,renderCanvas:r}},83572:t=>{t.exports=function(t,e,i,s){e.videoTexture&&(i.addToRenderList(e),e.pipeline.batchSprite(e,i,s))}},71030:(t,e,i)=>{var s=i(95723),n=i(26673),r=i(65650),a=i(56694),o=i(64937),h=i(89980),l=i(74118),u=i(94287),c=new a({Extends:h,Mixins:[o.Depth,o.GetBounds,o.Origin,o.Transform,o.ScrollFactor,o.Visible],initialize:function(t,e,i,n,r){void 0===n&&(n=1),void 0===r&&(r=n),h.call(this,t,"Zone"),this.setPosition(e,i),this.width=n,this.height=r,this.blendMode=s.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e,i){void 0===i&&(i=!0),this.width=t,this.height=e,this.updateDisplayOrigin();var s=this.input;return i&&s&&!s.customHitArea&&(s.hitArea.width=t,s.hitArea.height=e),this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},setCircleDropZone:function(t){return this.setDropZone(new n(0,0,t),r)},setRectangleDropZone:function(t,e){return this.setDropZone(new l(0,0,t,e),u)},setDropZone:function(t,e){return this.input||this.setInteractive(t,e,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(t,e,i){i.addToRenderList(e)},renderWebGL:function(t,e,i){i.addToRenderList(e)}});t.exports=c},24067:(t,e,i)=>{var s=i(99325),n=i(20494),r=i(71030);s.register("zone",(function(t){var e=n(t,"x",0),i=n(t,"y",0),s=n(t,"width",1),a=n(t,"height",s);return new r(this.scene,e,i,s,a)}))},34546:(t,e,i)=>{var s=i(71030);i(61286).register("zone",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},95847:t=>{t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},26673:(t,e,i)=>{var s=i(56694),n=i(65650),r=i(94026),a=i(62941),o=i(52394),h=i(30977),l=new s({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.type=o.CIRCLE,this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=l},37964:t=>{t.exports=function(t){return Math.PI*t.radius*2}},72233:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x+t.radius*Math.cos(e),i.y=t.y+t.radius*Math.sin(e),i}},61761:(t,e,i)=>{var s=i(26673);t.exports=function(t){return new s(t.x,t.y,t.radius)}},65650:t=>{t.exports=function(t,e,i){return t.radius>0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},39187:(t,e,i)=>{var s=i(65650);t.exports=function(t,e){return s(t,e.x,e.y)}},58672:(t,e,i)=>{var s=i(65650);t.exports=function(t,e){return s(t,e.x,e.y)&&s(t,e.right,e.y)&&s(t,e.x,e.bottom)&&s(t,e.right,e.bottom)}},42997:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},94894:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},48027:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},94026:(t,e,i)=>{var s=i(72233),n=i(91806),r=i(83392),a=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new a);var o=n(e,0,r.PI2);return s(t,o,i)}},62941:(t,e,i)=>{var s=i(37964),n=i(72233),r=i(91806),a=i(83392);t.exports=function(t,e,i,o){void 0===o&&(o=[]),!e&&i>0&&(e=s(t)/i);for(var h=0;h{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},88665:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},30977:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=2*Math.PI*Math.random(),n=Math.random()+Math.random(),r=n>1?2-n:n,a=r*Math.cos(i),o=r*Math.sin(i);return e.x=t.x+a*t.radius,e.y=t.y+o*t.radius,e}},6112:(t,e,i)=>{var s=i(26673);s.Area=i(95847),s.Circumference=i(37964),s.CircumferencePoint=i(72233),s.Clone=i(61761),s.Contains=i(65650),s.ContainsPoint=i(39187),s.ContainsRect=i(58672),s.CopyFrom=i(42997),s.Equals=i(94894),s.GetBounds=i(48027),s.GetPoint=i(94026),s.GetPoints=i(62941),s.Offset=i(34585),s.OffsetPoint=i(88665),s.Random=i(30977),t.exports=s},52394:t=>{t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},58605:t=>{t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},39507:t=>{t.exports=function(t){var e=t.width/2,i=t.height/2,s=Math.pow(e-i,2)/Math.pow(e+i,2);return Math.PI*(e+i)*(1+3*s/(10+Math.sqrt(4-3*s)))}},86998:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.width/2,r=t.height/2;return i.x=t.x+n*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},81773:(t,e,i)=>{var s=i(95669);t.exports=function(t){return new s(t.x,t.y,t.width,t.height)}},72313:t=>{t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var s=(e-t.x)/t.width,n=(i-t.y)/t.height;return(s*=s)+(n*=n)<.25}},34368:(t,e,i)=>{var s=i(72313);t.exports=function(t,e){return s(t,e.x,e.y)}},71431:(t,e,i)=>{var s=i(72313);t.exports=function(t,e){return s(t,e.x,e.y)&&s(t,e.right,e.y)&&s(t,e.x,e.bottom)&&s(t,e.right,e.bottom)}},75459:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},95669:(t,e,i)=>{var s=i(56694),n=i(72313),r=i(95340),a=i(54978),o=i(52394),h=i(72006),l=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=o.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=l},98068:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},72897:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},95340:(t,e,i)=>{var s=i(86998),n=i(91806),r=i(83392),a=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new a);var o=n(e,0,r.PI2);return s(t,o,i)}},54978:(t,e,i)=>{var s=i(39507),n=i(86998),r=i(91806),a=i(83392);t.exports=function(t,e,i,o){void 0===o&&(o=[]),!e&&i>0&&(e=s(t)/i);for(var h=0;h{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},36233:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},72006:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random()*Math.PI*2,n=Math.sqrt(Math.random());return e.x=t.x+n*Math.cos(i)*t.width/2,e.y=t.y+n*Math.sin(i)*t.height/2,e}},40652:(t,e,i)=>{var s=i(95669);s.Area=i(58605),s.Circumference=i(39507),s.CircumferencePoint=i(86998),s.Clone=i(81773),s.Contains=i(72313),s.ContainsPoint=i(34368),s.ContainsRect=i(71431),s.CopyFrom=i(75459),s.Equals=i(98068),s.GetBounds=i(72897),s.GetPoint=i(95340),s.GetPoints=i(54978),s.Offset=i(77951),s.OffsetPoint=i(36233),s.Random=i(72006),t.exports=s},84068:(t,e,i)=>{var s=i(52394),n=i(98611),r={Circle:i(6112),Ellipse:i(40652),Intersects:i(7563),Line:i(28482),Mesh:i(14293),Point:i(63472),Polygon:i(44359),Rectangle:i(66658),Triangle:i(87619)};r=n(!1,r,s),t.exports=r},22184:(t,e,i)=>{var s=i(53996);t.exports=function(t,e){return s(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},26535:t=>{t.exports=function(t,e){var i=e.width/2,s=e.height/2,n=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-s),a=i+t.radius,o=s+t.radius;if(n>a||r>o)return!1;if(n<=i||r<=s)return!0;var h=n-i,l=r-s;return h*h+l*l<=t.radius*t.radius}},71145:(t,e,i)=>{var s=i(79967),n=i(22184);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r,a,o,h,l=t.x,u=t.y,c=t.radius,d=e.x,f=e.y,p=e.radius;if(u===f)0===(o=(a=-2*f)*a-4*(r=1)*(d*d+(h=(p*p-c*c-d*d+l*l)/(2*(l-d)))*h-2*d*h+f*f-p*p))?i.push(new s(h,-a/(2*r))):o>0&&(i.push(new s(h,(-a+Math.sqrt(o))/(2*r))),i.push(new s(h,(-a-Math.sqrt(o))/(2*r))));else{var v=(l-d)/(u-f),g=(p*p-c*c-d*d+l*l-f*f+u*u)/(2*(u-f));0===(o=(a=2*u*v-2*g*v-2*l)*a-4*(r=v*v+1)*(l*l+u*u+g*g-c*c-2*u*g))?(h=-a/(2*r),i.push(new s(h,g-h*v))):o>0&&(h=(-a+Math.sqrt(o))/(2*r),i.push(new s(h,g-h*v)),h=(-a-Math.sqrt(o))/(2*r),i.push(new s(h,g-h*v)))}}return i}},62508:(t,e,i)=>{var s=i(26111),n=i(26535);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),a=e.getLineB(),o=e.getLineC(),h=e.getLineD();s(r,t,i),s(a,t,i),s(o,t,i),s(h,t,i)}return i}},26111:(t,e,i)=>{var s=i(79967),n=i(61472);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r,a,o=t.x1,h=t.y1,l=t.x2,u=t.y2,c=e.x,d=e.y,f=e.radius,p=l-o,v=u-h,g=o-c,m=h-d,y=p*p+v*v,x=2*(p*g+v*m),T=x*x-4*y*(g*g+m*m-f*f);if(0===T){var w=-x/(2*y);r=o+w*p,a=h+w*v,w>=0&&w<=1&&i.push(new s(r,a))}else if(T>0){var E=(-x-Math.sqrt(T))/(2*y);r=o+E*p,a=h+E*v,E>=0&&E<=1&&i.push(new s(r,a));var S=(-x+Math.sqrt(T))/(2*y);r=o+S*p,a=h+S*v,S>=0&&S<=1&&i.push(new s(r,a))}}return i}},96537:(t,e,i)=>{var s=i(70015);t.exports=function(t,e,i,n){void 0===i&&(i=!1);var r,a,o,h=t.x1,l=t.y1,u=t.x2,c=t.y2,d=e.x1,f=e.y1,p=u-h,v=c-l,g=e.x2-d,m=e.y2-f,y=p*m-v*g;if(0===y)return!1;if(i){if((a=(d+g*(r=(p*(f-l)+v*(h-d))/(g*v-m*p))-h)/p)<0||r<0||r>1)return null;o=a}else{if(a=((l-f)*p-(h-d)*v)/y,(r=((d-h)*m-(f-l)*g)/y)<0||r>1||a<0||a>1)return null;o=r}return void 0===n&&(n=new s),n.set(h+p*o,l+v*o,o)}},17647:(t,e,i)=>{var s=i(96537),n=i(88829),r=i(70015),a=new n,o=new r;t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=new r);var h=!1;n.set(),o.set();for(var l=e[0],u=1;u{var s=i(70015),n=i(51729),r=i(17647),a=new s;t.exports=function(t,e,i,s){void 0===s&&(s=new n),Array.isArray(e)||(e=[e]);var o=!1;s.set(),a.set();for(var h=0;h{var s=i(79967),n=i(25227),r=i(47910);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e))for(var a=e.getLineA(),o=e.getLineB(),h=e.getLineC(),l=e.getLineD(),u=[new s,new s,new s,new s],c=[n(a,t,u[0]),n(o,t,u[1]),n(h,t,u[2]),n(l,t,u[3])],d=0;d<4;d++)c[d]&&i.push(u[d]);return i}},7449:(t,e,i)=>{var s=i(51729),n=i(68439),r=new(i(88829));function a(t,e,i,a,o){var h=Math.cos(t),l=Math.sin(t);r.setTo(e,i,e+h,i+l);var u=n(r,a,!0);u&&o.push(new s(u.x,u.y,t,u.w))}function o(t,e){return t.z-e.z}t.exports=function(t,e,i){Array.isArray(i)||(i=[i]);for(var s=[],n=[],r=0;r{var s=i(74118),n=i(90205);t.exports=function(t,e,i){return void 0===i&&(i=new s),n(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},1946:(t,e,i)=>{var s=i(9569),n=i(90205);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=t.getLineA(),a=t.getLineB(),o=t.getLineC(),h=t.getLineD();s(r,e,i),s(a,e,i),s(o,e,i),s(h,e,i)}return i}},34211:(t,e,i)=>{var s=i(20370),n=i(9569);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),a=e.getLineB(),o=e.getLineC();n(r,t,i),n(a,t,i),n(o,t,i)}return i}},80511:(t,e,i)=>{var s=i(26111),n=i(48411);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=t.getLineA(),a=t.getLineB(),o=t.getLineC();s(r,e,i),s(a,e,i),s(o,e,i)}return i}},31343:(t,e,i)=>{var s=i(79967),n=i(86117),r=i(25227);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e))for(var a=t.getLineA(),o=t.getLineB(),h=t.getLineC(),l=[new s,new s,new s],u=[r(a,e,l[0]),r(o,e,l[1]),r(h,e,l[2])],c=0;c<3;c++)u[c]&&i.push(l[c]);return i}},70534:(t,e,i)=>{var s=i(23589),n=i(31343);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),a=e.getLineB(),o=e.getLineC();n(t,r,i),n(t,a,i),n(t,o,i)}return i}},61472:(t,e,i)=>{var s=i(65650),n=new(i(79967));t.exports=function(t,e,i){if(void 0===i&&(i=n),s(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(s(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,a=t.y2-t.y1,o=e.x-t.x1,h=e.y-t.y1,l=r*r+a*a,u=r,c=a;if(l>0){var d=(o*r+h*a)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*a>=0&&s(e,i.x,i.y)}},25227:t=>{t.exports=function(t,e,i){var s=t.x1,n=t.y1,r=t.x2,a=t.y2,o=e.x1,h=e.y1,l=e.x2,u=e.y2,c=(u-h)*(r-s)-(l-o)*(a-n);if(0===c)return!1;var d=((l-o)*(n-h)-(u-h)*(s-o))/c,f=((r-s)*(n-h)-(a-n)*(s-o))/c;return d>=0&&d<=1&&f>=0&&f<=1&&(i&&(i.x=s+d*(r-s),i.y=n+d*(a-n)),!0)}},47910:t=>{t.exports=function(t,e){var i=t.x1,s=t.y1,n=t.x2,r=t.y2,a=e.x,o=e.y,h=e.right,l=e.bottom,u=0;if(i>=a&&i<=h&&s>=o&&s<=l||n>=a&&n<=h&&r>=o&&r<=l)return!0;if(i=a){if((u=s+(r-s)*(a-i)/(n-i))>o&&u<=l)return!0}else if(i>h&&n<=h&&(u=s+(r-s)*(h-i)/(n-i))>=o&&u<=l)return!0;if(s=o){if((u=i+(n-i)*(o-s)/(r-s))>=a&&u<=h)return!0}else if(s>l&&r<=l&&(u=i+(n-i)*(l-s)/(r-s))>=a&&u<=h)return!0;return!1}},34426:t=>{t.exports=function(t,e,i){void 0===i&&(i=1);var s=e.x1,n=e.y1,r=e.x2,a=e.y2,o=t.x,h=t.y,l=(r-s)*(r-s)+(a-n)*(a-n);if(0===l)return!1;var u=((o-s)*(r-s)+(h-n)*(a-n))/l;if(u<0)return Math.sqrt((s-o)*(s-o)+(n-h)*(n-h))<=i;if(u>=0&&u<=1){var c=((n-h)*(r-s)-(s-o)*(a-n))/l;return Math.abs(c)*Math.sqrt(l)<=i}return Math.sqrt((r-o)*(r-o)+(a-h)*(a-h))<=i}},81414:(t,e,i)=>{var s=i(34426);t.exports=function(t,e){if(!s(t,e))return!1;var i=Math.min(e.x1,e.x2),n=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),a=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=n&&t.y>=r&&t.y<=a}},90205:t=>{t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0)&&!(t.righte.right||t.y>e.bottom)}},20370:(t,e,i)=>{var s=i(25227),n=i(94287),r=i(86875),a=i(87279);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},8786:t=>{t.exports=function(t,e,i,s,n,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||n{var s=i(61472),n=i(60689);t.exports=function(t,e){return!(t.left>e.right||t.righte.bottom||t.bottom{var s=i(25227);t.exports=function(t,e){return!(!t.contains(e.x1,e.y1)&&!t.contains(e.x2,e.y2))||(!!s(t.getLineA(),e)||(!!s(t.getLineB(),e)||!!s(t.getLineC(),e)))}},23589:(t,e,i)=>{var s=i(86875),n=i(18680),r=i(25227);t.exports=function(t,e){if(t.left>e.right||t.righte.bottom||t.bottom0||(c=n(e),(d=s(t,c,!0)).length>0)}},7563:(t,e,i)=>{t.exports={CircleToCircle:i(22184),CircleToRectangle:i(26535),GetCircleToCircle:i(71145),GetCircleToRectangle:i(62508),GetLineToCircle:i(26111),GetLineToLine:i(96537),GetLineToPoints:i(17647),GetLineToPolygon:i(68439),GetLineToRectangle:i(9569),GetRaysFromPointToPolygon:i(7449),GetRectangleIntersection:i(82931),GetRectangleToRectangle:i(1946),GetRectangleToTriangle:i(34211),GetTriangleToCircle:i(80511),GetTriangleToLine:i(31343),GetTriangleToTriangle:i(70534),LineToCircle:i(61472),LineToLine:i(25227),LineToRectangle:i(47910),PointToLine:i(34426),PointToLineSegment:i(81414),RectangleToRectangle:i(90205),RectangleToTriangle:i(20370),RectangleToValues:i(8786),TriangleToCircle:i(48411),TriangleToLine:i(86117),TriangleToTriangle:i(23589)}},50599:t=>{t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},58813:t=>{t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=[]);var s=Math.round(t.x1),n=Math.round(t.y1),r=Math.round(t.x2),a=Math.round(t.y2),o=Math.abs(r-s),h=Math.abs(a-n),l=s-h&&(c-=h,s+=l),f{t.exports=function(t,e,i){var s=e-(t.x1+t.x2)/2,n=i-(t.y1+t.y2)/2;return t.x1+=s,t.y1+=n,t.x2+=s,t.y2+=n,t}},26718:(t,e,i)=>{var s=i(88829);t.exports=function(t){return new s(t.x1,t.y1,t.x2,t.y2)}},88930:t=>{t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},90656:t=>{t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},30897:(t,e,i)=>{var s=i(16028);t.exports=function(t,e,i){void 0===i&&(i=e);var n=s(t),r=t.x2-t.x1,a=t.y2-t.y1;return e&&(t.x1=t.x1-r/n*e,t.y1=t.y1-a/n*e),i&&(t.x2=t.x2+r/n*i,t.y2=t.y2+a/n*i),t}},30684:(t,e,i)=>{var s=i(92951),n=i(21902),r=i(79967);t.exports=function(t,e,i,a,o){void 0===a&&(a=0),void 0===o&&(o=[]);var h,l,u=[],c=t.x1,d=t.y1,f=t.x2-c,p=t.y2-d,v=n(e,o),g=i-1;for(h=0;h0){var m=u[0],y=[m];for(h=1;h=a&&(y.push(x),m=x)}var T=u[u.length-1];return s(m,T){var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},11222:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.x1,r=t.y1,a=t.x2,o=t.y2,h=(a-n)*(a-n)+(o-r)*(o-r);if(0===h)return i;var l=((e.x-n)*(a-n)+(e.y-r)*(o-r))/h;return i.x=n+l*(a-n),i.y=r+l*(o-r),i}},7377:(t,e,i)=>{var s=i(83392),n=i(50599),r=i(79967);t.exports=function(t,e){void 0===e&&(e=new r);var i=n(t)-s.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},66464:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},8570:(t,e,i)=>{var s=i(16028),n=i(79967);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(e=s(t)/i);for(var a=t.x1,o=t.y1,h=t.x2,l=t.y2,u=0;u{t.exports=function(t,e){var i=t.x1,s=t.y1,n=t.x2,r=t.y2,a=(n-i)*(n-i)+(r-s)*(r-s);if(0===a)return!1;var o=((s-e.y)*(n-i)-(i-e.x)*(r-s))/a;return Math.abs(o)*Math.sqrt(a)}},82996:t=>{t.exports=function(t){return Math.abs(t.y1-t.y2)}},16028:t=>{t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},88829:(t,e,i)=>{var s=i(56694),n=i(66464),r=i(8570),a=i(52394),o=i(74077),h=i(93736),l=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=a.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=s},getPoint:function(t,e){return n(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},73273:(t,e,i)=>{var s=i(83392),n=i(1071),r=i(50599);t.exports=function(t){var e=r(t)-s.TAU;return n(e,-Math.PI,Math.PI)}},96936:(t,e,i)=>{var s=i(83392),n=i(50599);t.exports=function(t){return Math.cos(n(t)-s.TAU)}},43581:(t,e,i)=>{var s=i(83392),n=i(50599);t.exports=function(t){return Math.sin(n(t)-s.TAU)}},13990:t=>{t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},1298:t=>{t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},74077:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},30473:(t,e,i)=>{var s=i(50599),n=i(73273);t.exports=function(t,e){return 2*n(e)-Math.PI-s(t)}},25968:(t,e,i)=>{var s=i(1809);t.exports=function(t,e){var i=(t.x1+t.x2)/2,n=(t.y1+t.y2)/2;return s(t,i,n,e)}},24296:(t,e,i)=>{var s=i(1809);t.exports=function(t,e,i){return s(t,e.x,e.y,i)}},1809:t=>{t.exports=function(t,e,i,s){var n=Math.cos(s),r=Math.sin(s),a=t.x1-e,o=t.y1-i;return t.x1=a*n-o*r+e,t.y1=a*r+o*n+i,a=t.x2-e,o=t.y2-i,t.x2=a*n-o*r+e,t.y2=a*r+o*n+i,t}},88171:t=>{t.exports=function(t,e,i,s,n){return t.x1=e,t.y1=i,t.x2=e+Math.cos(s)*n,t.y2=i+Math.sin(s)*n,t}},82797:t=>{t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},41067:t=>{t.exports=function(t){return Math.abs(t.x1-t.x2)}},28482:(t,e,i)=>{var s=i(88829);s.Angle=i(50599),s.BresenhamPoints=i(58813),s.CenterOn=i(88513),s.Clone=i(26718),s.CopyFrom=i(88930),s.Equals=i(90656),s.Extend=i(30897),s.GetEasedPoints=i(30684),s.GetMidPoint=i(20487),s.GetNearestPoint=i(11222),s.GetNormal=i(7377),s.GetPoint=i(66464),s.GetPoints=i(8570),s.GetShortestDistance=i(65269),s.Height=i(82996),s.Length=i(16028),s.NormalAngle=i(73273),s.NormalX=i(96936),s.NormalY=i(43581),s.Offset=i(13990),s.PerpSlope=i(1298),s.Random=i(74077),s.ReflectAngle=i(30473),s.Rotate=i(25968),s.RotateAroundPoint=i(24296),s.RotateAroundXY=i(1809),s.SetToAngle=i(88171),s.Slope=i(82797),s.Width=i(41067),t.exports=s},18693:(t,e,i)=>{var s=i(56694),n=i(74118),r=i(93736);function a(t,e,i,s){var n=t-i,r=e-s,a=n*n+r*r;return Math.sqrt(a)}var o=new s({initialize:function(t,e,i){this.vertex1=t,this.vertex2=e,this.vertex3=i,this.bounds=new n,this._inCenter=new r},getInCenter:function(t){void 0===t&&(t=!0);var e,i,s,n,r,o,h=this.vertex1,l=this.vertex2,u=this.vertex3;t?(e=h.x,i=h.y,s=l.x,n=l.y,r=u.x,o=u.y):(e=h.vx,i=h.vy,s=l.vx,n=l.vy,r=u.vx,o=u.vy);var c=a(r,o,s,n),d=a(e,i,r,o),f=a(s,n,e,i),p=c+d+f;return this._inCenter.set((e*c+s*d+r*f)/p,(i*c+n*d+o*f)/p)},contains:function(t,e,i){var s=this.vertex1,n=this.vertex2,r=this.vertex3,a=s.vx,o=s.vy,h=n.vx,l=n.vy,u=r.vx,c=r.vy;if(i){var d=i.a,f=i.b,p=i.c,v=i.d,g=i.e,m=i.f;a=s.vx*d+s.vy*p+g,o=s.vx*f+s.vy*v+m,h=n.vx*d+n.vy*p+g,l=n.vx*f+n.vy*v+m,u=r.vx*d+r.vy*p+g,c=r.vx*f+r.vy*v+m}var y=u-a,x=c-o,T=h-a,w=l-o,E=t-a,S=e-o,b=y*y+x*x,A=y*T+x*w,_=y*E+x*S,C=T*T+w*w,R=T*E+w*S,M=b*C-A*A,P=0===M?0:1/M,O=(C*_-A*R)*P,L=(b*R-A*_)*P;return O>=0&&L>=0&&O+L<1},isCounterClockwise:function(t){var e=this.vertex1,i=this.vertex2,s=this.vertex3,n=(i.vx-e.vx)*(s.vy-e.vy)-(i.vy-e.vy)*(s.vx-e.vx);return t<=0?n>=0:n<0},load:function(t,e,i,s,n){return i=this.vertex1.load(t,e,i,s,n),i=this.vertex2.load(t,e,i,s,n),i=this.vertex3.load(t,e,i,s,n)},transformCoordinatesLocal:function(t,e,i,s){return this.vertex1.transformCoordinatesLocal(t,e,i,s),this.vertex2.transformCoordinatesLocal(t,e,i,s),this.vertex3.transformCoordinatesLocal(t,e,i,s),this},updateBounds:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3,s=this.bounds;return s.x=Math.min(t.vx,e.vx,i.vx),s.y=Math.min(t.vy,e.vy,i.vy),s.width=Math.max(t.vx,e.vx,i.vx)-s.x,s.height=Math.max(t.vy,e.vy,i.vy)-s.y,this},isInView:function(t,e,i,s,n,r,a,o,h,l,u){this.update(s,n,r,a,o,h,l,u);var c=this.vertex1,d=this.vertex2,f=this.vertex3;if(c.ta<=0&&d.ta<=0&&f.ta<=0)return!1;if(e&&!this.isCounterClockwise(i))return!1;var p=this.bounds;p.x=Math.min(c.tx,d.tx,f.tx),p.y=Math.min(c.ty,d.ty,f.ty),p.width=Math.max(c.tx,d.tx,f.tx)-p.x,p.height=Math.max(c.ty,d.ty,f.ty)-p.y;var v=t.x+t.width,g=t.y+t.height;return!(p.width<=0||p.height<=0||t.width<=0||t.height<=0)&&!(p.rightv||p.y>g)},update:function(t,e,i,s,n,r,a,o){return this.vertex1.update(e,i,s,n,r,a,o,t),this.vertex2.update(e,i,s,n,r,a,o,t),this.vertex3.update(e,i,s,n,r,a,o,t),this},translate:function(t,e){void 0===e&&(e=0);var i=this.vertex1,s=this.vertex2,n=this.vertex3;return i.x+=t,i.y+=e,s.x+=t,s.y+=e,n.x+=t,n.y+=e,this},x:{get:function(){return this.getInCenter().x},set:function(t){var e=this.getInCenter();this.translate(t-e.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(t){var e=this.getInCenter();this.translate(0,t-e.y)}},alpha:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.alpha+e.alpha+i.alpha)/3},set:function(t){this.vertex1.alpha=t,this.vertex2.alpha=t,this.vertex3.alpha=t}},depth:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.vz+e.vz+i.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});t.exports=o},99425:(t,e,i)=>{var s=i(18693),n=i(72632),r=i(16650),a=i(70015),o=i(85769),h=new a,l=new a,u=new r;t.exports=function(t){var e=n(t,"mesh"),i=n(t,"texture",null),r=n(t,"frame"),a=n(t,"width",1),c=n(t,"height",a),d=n(t,"widthSegments",1),f=n(t,"heightSegments",d),p=n(t,"x",0),v=n(t,"y",0),g=n(t,"z",0),m=n(t,"rotateX",0),y=n(t,"rotateY",0),x=n(t,"rotateZ",0),T=n(t,"zIsUp",!0),w=n(t,"isOrtho",!!e&&e.dirtyCache[11]),E=n(t,"colors",[16777215]),S=n(t,"alphas",[1]),b=n(t,"tile",!1),A=n(t,"flipY",!1),_=n(t,"width",null),C={faces:[],verts:[]};if(h.set(p,v,g),l.set(m,y,x),u.fromRotationXYTranslation(l,h,T),!i&&e)i=e.texture;else if(e&&"string"==typeof i)i=e.scene.sys.textures.get(i);else if(!i)return C;var R=i.get(r);!_&&w&&i&&e&&(a=R.width/e.height,c=R.height/e.height);var M,P,O=a/2,L=c/2,F=Math.floor(d),D=Math.floor(f),k=F+1,I=D+1,B=a/F,N=c/D,Y=[],U=[],X=0,z=1,G=0,W=1;R&&(X=R.u0,z=R.u1,A?(G=R.v1,W=R.v0):(G=R.v0,W=R.v1));var V=z-X,H=W-G;for(P=0;P{var s=i(18693),n=i(16650),r=i(70015),a=i(85769),o=new r,h=new r,l=new n;t.exports=function(t,e,i,n,r,u,c,d,f,p){void 0===i&&(i=1),void 0===n&&(n=0),void 0===r&&(r=0),void 0===u&&(u=0),void 0===c&&(c=0),void 0===d&&(d=0),void 0===f&&(f=0),void 0===p&&(p=!0);var v={faces:[],verts:[]},g=t.materials;o.set(n,r,u),h.set(c,d,f),l.fromRotationXYTranslation(h,o,p);for(var m=0;m{var s=i(18693),n=i(85769);t.exports=function(t,e,i,r,a,o,h){if(void 0===r&&(r=!1),void 0===o&&(o=16777215),void 0===h&&(h=1),t.length===e.length){var l,u,c,d,f,p,v,g,m,y,x,T={faces:[],vertices:[]},w=r?3:2,E=Array.isArray(o),S=Array.isArray(h);if(Array.isArray(i)&&i.length>0)for(l=0;l{var e=!0,i="untitled",s="",n="";function r(t){var e=t.indexOf("#");return e>-1?t.substring(0,e):t}function a(t){return 0===t.models.length&&t.models.push({faces:[],name:i,textureCoords:[],vertexNormals:[],vertices:[]}),s="",t.models[t.models.length-1]}function o(t,e){var n=t.length>=2?t[1]:i;e.models.push({faces:[],name:n,textureCoords:[],vertexNormals:[],vertices:[]}),s=""}function h(t){2===t.length&&(s=t[1])}function l(t,e){var i=t.length,s=i>=2?parseFloat(t[1]):0,n=i>=3?parseFloat(t[2]):0,r=i>=4?parseFloat(t[3]):0;a(e).vertices.push({x:s,y:n,z:r})}function u(t,i){var s=t.length,n=s>=2?parseFloat(t[1]):0,r=s>=3?parseFloat(t[2]):0,o=s>=4?parseFloat(t[3]):0;isNaN(n)&&(n=0),isNaN(r)&&(r=0),isNaN(o)&&(o=0),e&&(r=1-r),a(i).textureCoords.push({u:n,v:r,w:o})}function c(t,e){var i=t.length,s=i>=2?parseFloat(t[1]):0,n=i>=3?parseFloat(t[2]):0,r=i>=4?parseFloat(t[3]):0;a(e).vertexNormals.push({x:s,y:n,z:r})}function d(t,e){var i=t.length-1;if(!(i<3)){for(var r={group:s,material:n,vertices:[]},o=0;o3)){var u=0,c=0,d=0;u=parseInt(h[0],10),l>1&&""!==h[1]&&(c=parseInt(h[1],10)),l>2&&(d=parseInt(h[2],10)),0!==u&&(u<0&&(u=a(e).vertices.length+1+u),c-=1,u-=1,d-=1,r.vertices.push({textureCoordsIndex:c,vertexIndex:u,vertexNormalIndex:d}))}}a(e).faces.push(r)}}function f(t,e){t.length>=2&&e.materialLibraries.push(t[1])}function p(t){t.length>=2&&(n=t[1])}t.exports=function(t,i){void 0===i&&(i=!0),e=i;var a={materials:{},materialLibraries:[],models:[]};s="",n="";for(var v=t.split("\n"),g=0;g{var s=i(22946);t.exports=function(t){for(var e={},i=t.split("\n"),n="",r=0;r=2?Math.floor(255*o[2]):h,u=o.length>=3?Math.floor(255*o[3]):h;e[n]=s(h,l,u)}}}return e}},15313:t=>{t.exports=function(t,e,i,s){var n,r;if(void 0===i&&void 0===s){var a=t.getInCenter();n=a.x,r=a.y}var o=Math.cos(e),h=Math.sin(e),l=t.vertex1,u=t.vertex2,c=t.vertex3,d=l.x-n,f=l.y-r;l.set(d*o-f*h+n,d*h+f*o+r),d=u.x-n,f=u.y-r,u.set(d*o-f*h+n,d*h+f*o+r),d=c.x-n,f=c.y-r,c.set(d*o-f*h+n,d*h+f*o+r)}},85769:(t,e,i)=>{var s=i(56694),n=i(75512),r=i(70015),a=new s({Extends:r,initialize:function(t,e,i,s,n,a,o,h,l,u){void 0===a&&(a=16777215),void 0===o&&(o=1),void 0===h&&(h=0),void 0===l&&(l=0),void 0===u&&(u=0),r.call(this,t,e,i),this.vx=0,this.vy=0,this.vz=0,this.nx=h,this.ny=l,this.nz=u,this.u=s,this.v=n,this.color=a,this.alpha=o,this.tx=0,this.ty=0,this.ta=0},setUVs:function(t,e){return this.u=t,this.v=e,this},transformCoordinatesLocal:function(t,e,i,s){var n=this.x,r=this.y,a=this.z,o=t.val,h=n*o[0]+r*o[4]+a*o[8]+o[12],l=n*o[1]+r*o[5]+a*o[9]+o[13],u=n*o[2]+r*o[6]+a*o[10]+o[14],c=n*o[3]+r*o[7]+a*o[11]+o[15];this.vx=h/c*e,this.vy=-l/c*i,this.vz=s<=0?u/c:-u/c},resize:function(t,e,i,s,n,r){return this.x=t,this.y=e,this.vx=this.x*i,this.vy=-this.y*s,this.vz=0,n<.5?this.vx+=i*(.5-n):n>.5&&(this.vx-=i*(n-.5)),r<.5?this.vy+=s*(.5-r):r>.5&&(this.vy-=s*(r-.5)),this},update:function(t,e,i,s,n,r,a,o){var h=this.vx*t+this.vy*i+n,l=this.vx*e+this.vy*s+r;return a&&(h=Math.round(h),l=Math.round(l)),this.tx=h,this.ty=l,this.ta=this.alpha*o,this},load:function(t,e,i,s,r){return t[++i]=this.tx,t[++i]=this.ty,t[++i]=this.u,t[++i]=this.v,t[++i]=s,t[++i]=r,e[++i]=n.getTintAppendFloatAlpha(this.color,this.ta),i}});t.exports=a},14293:(t,e,i)=>{var s={Face:i(18693),GenerateGridVerts:i(99425),GenerateObjVerts:i(53267),GenerateVerts:i(67623),ParseObj:i(27291),ParseObjMaterial:i(76799),RotateFace:i(15313),Vertex:i(85769)};t.exports=s},77601:t=>{t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},38933:(t,e,i)=>{var s=i(79967);t.exports=function(t){return new s(t.x,t.y)}},47103:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y)}},13625:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},12536:t=>{t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},54205:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){if(void 0===e&&(e=new s),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var n=0;n{t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},82712:t=>{t.exports=function(t){return t.x*t.x+t.y*t.y}},20052:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){void 0===e&&(e=new s);for(var i=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,o=0;oi&&(i=h.x),h.xr&&(r=h.y),h.y{var s=i(79967);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=new s),n.x=t.x+(e.x-t.x)*i,n.y=t.y+(e.y-t.y)*i,n}},42397:t=>{t.exports=function(t){return t.setTo(t.y,t.x)}},59464:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.setTo(-t.x,-t.y)}},79967:(t,e,i)=>{var s=i(56694),n=i(52394),r=new s({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=n.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=r},53581:(t,e,i)=>{var s=i(79967),n=i(82712);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=(t.x*e.x+t.y*e.y)/n(e);return 0!==r&&(i.x=r*e.x,i.y=r*e.y),i}},50817:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.x*e.x+t.y*e.y;return 0!==n&&(i.x=n*e.x,i.y=n*e.y),i}},40525:(t,e,i)=>{var s=i(50083);t.exports=function(t,e){if(0!==t.x||0!==t.y){var i=s(t);t.x/=i,t.y/=i}return t.x*=e,t.y*=e,t}},63472:(t,e,i)=>{var s=i(79967);s.Ceil=i(77601),s.Clone=i(38933),s.CopyFrom=i(47103),s.Equals=i(13625),s.Floor=i(12536),s.GetCentroid=i(54205),s.GetMagnitude=i(50083),s.GetMagnitudeSq=i(82712),s.GetRectangleFromPoints=i(20052),s.Interpolate=i(77154),s.Invert=i(42397),s.Negative=i(59464),s.Project=i(53581),s.ProjectUnit=i(50817),s.SetMagnitude=i(40525),t.exports=s},19631:(t,e,i)=>{var s=i(8580);t.exports=function(t){return new s(t.points)}},45604:t=>{t.exports=function(t,e,i){for(var s=!1,n=-1,r=t.points.length-1;++n{var s=i(45604);t.exports=function(t,e){return s(t,e.x,e.y)}},11117:t=>{"use strict";function e(t,e,s){s=s||2;var r,a,o,h,c,d,p,v=e&&e.length,g=v?e[0]*s:t.length,m=i(t,0,g,s,!0),y=[];if(!m||m.next===m.prev)return y;if(v&&(m=function(t,e,s,n){var r,a,o,h=[];for(r=0,a=e.length;r80*s){r=o=t[0],a=h=t[1];for(var x=s;xo&&(o=c),d>h&&(h=d);p=0!==(p=Math.max(o-r,h-a))?32767/p:0}return n(m,y,s,r,a,p,0),y}function i(t,e,i,s,n){var r,a;if(n===_(t,e,i,s)>0)for(r=e;r=e;r-=s)a=S(r,t[r],t[r+1],a);return a&&m(a,a.next)&&(b(a),a=a.next),a}function s(t,e){if(!t)return t;e||(e=t);var i,s=t;do{if(i=!1,s.steiner||!m(s,s.next)&&0!==g(s.prev,s,s.next))s=s.next;else{if(b(s),(s=e=s.prev)===s.next)break;i=!0}}while(i||s!==e);return e}function n(t,e,i,l,u,c,f){if(t){!f&&c&&function(t,e,i,s){var n=t;do{0===n.z&&(n.z=d(n.x,n.y,e,i,s)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,i,s,n,r,a,o,h,l=1;do{for(i=t,t=null,r=null,a=0;i;){for(a++,s=i,o=0,e=0;e0||h>0&&s;)0!==o&&(0===h||!s||i.z<=s.z)?(n=i,i=i.nextZ,o--):(n=s,s=s.nextZ,h--),r?r.nextZ=n:t=n,n.prevZ=r,r=n;i=s}r.nextZ=null,l*=2}while(a>1)}(n)}(t,l,u,c);for(var p,v,g=t;t.prev!==t.next;)if(p=t.prev,v=t.next,c?a(t,l,u,c):r(t))e.push(p.i/i|0),e.push(t.i/i|0),e.push(v.i/i|0),b(t),t=v.next,g=v.next;else if((t=v)===g){f?1===f?n(t=o(s(t),e,i),e,i,l,u,c,2):2===f&&h(t,e,i,l,u,c):n(s(t),e,i,l,u,c,1);break}}}function r(t){var e=t.prev,i=t,s=t.next;if(g(e,i,s)>=0)return!1;for(var n=e.x,r=i.x,a=s.x,o=e.y,h=i.y,l=s.y,u=nr?n>a?n:a:r>a?r:a,f=o>h?o>l?o:l:h>l?h:l,v=s.next;v!==e;){if(v.x>=u&&v.x<=d&&v.y>=c&&v.y<=f&&p(n,o,r,h,a,l,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function a(t,e,i,s){var n=t.prev,r=t,a=t.next;if(g(n,r,a)>=0)return!1;for(var o=n.x,h=r.x,l=a.x,u=n.y,c=r.y,f=a.y,v=oh?o>l?o:l:h>l?h:l,x=u>c?u>f?u:f:c>f?c:f,T=d(v,m,e,i,s),w=d(y,x,e,i,s),E=t.prevZ,S=t.nextZ;E&&E.z>=T&&S&&S.z<=w;){if(E.x>=v&&E.x<=y&&E.y>=m&&E.y<=x&&E!==n&&E!==a&&p(o,u,h,c,l,f,E.x,E.y)&&g(E.prev,E,E.next)>=0)return!1;if(E=E.prevZ,S.x>=v&&S.x<=y&&S.y>=m&&S.y<=x&&S!==n&&S!==a&&p(o,u,h,c,l,f,S.x,S.y)&&g(S.prev,S,S.next)>=0)return!1;S=S.nextZ}for(;E&&E.z>=T;){if(E.x>=v&&E.x<=y&&E.y>=m&&E.y<=x&&E!==n&&E!==a&&p(o,u,h,c,l,f,E.x,E.y)&&g(E.prev,E,E.next)>=0)return!1;E=E.prevZ}for(;S&&S.z<=w;){if(S.x>=v&&S.x<=y&&S.y>=m&&S.y<=x&&S!==n&&S!==a&&p(o,u,h,c,l,f,S.x,S.y)&&g(S.prev,S,S.next)>=0)return!1;S=S.nextZ}return!0}function o(t,e,i){var n=t;do{var r=n.prev,a=n.next.next;!m(r,a)&&y(r,n,n.next,a)&&w(r,a)&&w(a,r)&&(e.push(r.i/i|0),e.push(n.i/i|0),e.push(a.i/i|0),b(n),b(n.next),n=t=a),n=n.next}while(n!==t);return s(n)}function h(t,e,i,r,a,o){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&v(h,l)){var u=E(h,l);return h=s(h,h.next),u=s(u,u.next),n(h,e,i,r,a,o,0),void n(u,e,i,r,a,o,0)}l=l.next}h=h.next}while(h!==t)}function l(t,e){return t.x-e.x}function u(t,e){var i=function(t,e){var i,s=e,n=t.x,r=t.y,a=-1/0;do{if(r<=s.y&&r>=s.next.y&&s.next.y!==s.y){var o=s.x+(r-s.y)*(s.next.x-s.x)/(s.next.y-s.y);if(o<=n&&o>a&&(a=o,i=s.x=s.x&&s.x>=u&&n!==s.x&&p(ri.x||s.x===i.x&&c(i,s)))&&(i=s,f=h)),s=s.next}while(s!==l);return i}(t,e);if(!i)return e;var n=E(i,t);return s(n,n.next),s(i,i.next)}function c(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function d(t,e,i,s,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-i)*n|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-s)*n|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function f(t){var e=t,i=t;do{(e.x=(t-a)*(r-o)&&(t-a)*(s-o)>=(i-a)*(e-o)&&(i-a)*(r-o)>=(n-a)*(s-o)}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&y(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(w(t,e)&&w(e,t)&&function(t,e){var i=t,s=!1,n=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&n<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(s=!s),i=i.next}while(i!==t);return s}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||m(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function m(t,e){return t.x===e.x&&t.y===e.y}function y(t,e,i,s){var n=T(g(t,e,i)),r=T(g(t,e,s)),a=T(g(i,s,t)),o=T(g(i,s,e));return n!==r&&a!==o||(!(0!==n||!x(t,i,e))||(!(0!==r||!x(t,s,e))||(!(0!==a||!x(i,t,s))||!(0!==o||!x(i,e,s)))))}function x(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function T(t){return t>0?1:t<0?-1:0}function w(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function E(t,e){var i=new A(t.i,t.x,t.y),s=new A(e.i,e.x,e.y),n=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=n,n.prev=i,s.next=i,i.prev=s,r.next=s,s.prev=r,s}function S(t,e,i,s){var n=new A(t,e,i);return s?(n.next=s.next,n.prev=s,s.next.prev=n,s.next=n):(n.prev=n,n.next=n),n}function b(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function A(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function _(t,e,i,s){for(var n=0,r=e,a=i-s;r0&&(s+=t[n-1].length,i.holes.push(s))}return i},t.exports=e},14045:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){void 0===e&&(e=new s);for(var i,n=1/0,r=1/0,a=-n,o=-r,h=0;h{t.exports=function(t,e){void 0===e&&(e=[]);for(var i=0;i{var s=i(16028),n=i(88829),r=i(5159);t.exports=function(t,e,i,a){void 0===a&&(a=[]);var o=t.points,h=r(t);!e&&i>0&&(e=h/i);for(var l=0;lc+g)){var m=v.getPoint((u-c)/g);a.push(m);break}c+=g}return a}},5159:(t,e,i)=>{var s=i(16028),n=i(88829);t.exports=function(t){for(var e=t.points,i=0,r=0;r{var s=i(56694),n=i(45604),r=i(89294),a=i(52394),o=new s({initialize:function(t){this.type=a.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return n(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,s=0;s{t.exports=function(t){return t.points.reverse(),t}},95874:t=>{function e(t,e,i){var s=e.x,n=e.y,r=i.x-s,a=i.y-n;if(0!==r||0!==a){var o=((t.x-s)*r+(t.y-n)*a)/(r*r+a*a);o>1?(s=i.x,n=i.y):o>0&&(s+=r*o,n+=a*o)}return(r=t.x-s)*r+(a=t.y-n)*a}function i(t,s,n,r,a){for(var o,h=r,l=s+1;lh&&(o=l,h=u)}h>r&&(o-s>1&&i(t,s,o,r,a),a.push(t[o]),n-o>1&&i(t,o,n,r,a))}function s(t,e){var s=t.length-1,n=[t[0]];return i(t,0,s,e,n),n.push(t[s]),n}t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=!1);var n=t.points;if(n.length>2){var r=e*e;i||(n=function(t,e){for(var i,s,n,r,a,o=t[0],h=[o],l=1,u=t.length;le&&(h.push(i),o=i);return o!==i&&h.push(i),h}(n,r)),t.setTo(s(n,r))}return t}},18974:t=>{var e=function(t,e){return t[0]=e[0],t[1]=e[1],t};t.exports=function(t){var i,s=[],n=t.points;for(i=0;i0&&r.push(e([0,0],s[0])),i=0;i1&&r.push(e([0,0],s[s.length-1])),t.setTo(r)}},23490:t=>{t.exports=function(t,e,i){for(var s=t.points,n=0;n{var s=i(8580);s.Clone=i(19631),s.Contains=i(45604),s.ContainsPoint=i(87289),s.Earcut=i(11117),s.GetAABB=i(14045),s.GetNumberArray=i(98286),s.GetPoints=i(89294),s.Perimeter=i(5159),s.Reverse=i(32244),s.Simplify=i(95874),s.Smooth=i(18974),s.Translate=i(23490),t.exports=s},1653:t=>{t.exports=function(t){return t.width*t.height}},33943:t=>{t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t}},58662:t=>{t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t.width=Math.ceil(t.width),t.height=Math.ceil(t.height),t}},79993:t=>{t.exports=function(t,e,i){return t.x=e-t.width/2,t.y=i-t.height/2,t}},81572:(t,e,i)=>{var s=i(74118);t.exports=function(t){return new s(t.x,t.y,t.width,t.height)}},94287:t=>{t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i)}},28687:(t,e,i)=>{var s=i(94287);t.exports=function(t,e){return s(t,e.x,e.y)}},73222:t=>{t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&(e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom{t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},87279:t=>{t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},19989:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},92628:(t,e,i)=>{var s=i(6700);t.exports=function(t,e){var i=s(t);return i{var s=i(6700);t.exports=function(t,e){var i=s(t);return i>s(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},71356:t=>{t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},21687:t=>{t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},80222:(t,e,i)=>{var s=i(74118),n=i(83392);t.exports=function(t,e){if(void 0===e&&(e=new s),0===t.length)return e;for(var i,r,a,o=Number.MAX_VALUE,h=Number.MAX_VALUE,l=n.MIN_SAFE_INTEGER,u=n.MIN_SAFE_INTEGER,c=0;c{var s=i(74118);t.exports=function(t,e,i,n,r){return void 0===r&&(r=new s),r.setTo(Math.min(t,i),Math.min(e,n),Math.abs(t-i),Math.abs(e-n))}},6700:t=>{t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},35242:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.centerX,e.y=t.centerY,e}},47698:(t,e,i)=>{var s=i(85876),n=i(79967);t.exports=function(t,e,i){if(void 0===i&&(i=new n),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=s(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},54932:(t,e,i)=>{var s=i(47698),n=i(85876);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(e=n(t)/i);for(var a=0;a{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.width,e.y=t.height,e}},7782:(t,e,i)=>{var s=i(79993);t.exports=function(t,e,i){var n=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),s(t,n,r)}},66217:(t,e,i)=>{var s=i(74118),n=i(90205);t.exports=function(t,e,i){return void 0===i&&(i=new s),n(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},40053:(t,e,i)=>{var s=i(85876),n=i(79967);t.exports=function(t,e,i,r){if(void 0===r&&(r=[]),!e&&!i)return r;e?i=Math.round(s(t)/e):e=s(t)/i;for(var a=t.x,o=t.y,h=0,l=0;l=t.right&&(h=1,o+=a-t.right,a=t.right);break;case 1:(o+=e)>=t.bottom&&(h=2,a-=o-t.bottom,o=t.bottom);break;case 2:(a-=e)<=t.left&&(h=3,o-=t.left-a,a=t.left);break;case 3:(o-=e)<=t.top&&(h=0,o=t.top)}return r}},86673:t=>{t.exports=function(t,e){for(var i=t.x,s=t.right,n=t.y,r=t.bottom,a=0;a{t.exports=function(t,e){var i=Math.min(t.x,e.x),s=Math.max(t.right,e.right);t.x=i,t.width=s-i;var n=Math.min(t.y,e.y),r=Math.max(t.bottom,e.bottom);return t.y=n,t.height=r-n,t}},44755:t=>{t.exports=function(t,e,i){var s=Math.min(t.x,e),n=Math.max(t.right,e);t.x=s,t.width=n-s;var r=Math.min(t.y,i),a=Math.max(t.bottom,i);return t.y=r,t.height=a-r,t}},74466:t=>{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},55946:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},97474:t=>{t.exports=function(t,e){return t.xe.x&&t.ye.y}},85876:t=>{t.exports=function(t){return 2*(t.width+t.height)}},20243:(t,e,i)=>{var s=i(79967),n=i(75606);t.exports=function(t,e,i){void 0===i&&(i=new s),e=n(e);var r=Math.sin(e),a=Math.cos(e),o=a>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(o*r){var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},97691:(t,e,i)=>{var s=i(17489),n=i(73222),r=i(79967);t.exports=function(t,e,i){if(void 0===i&&(i=new r),n(t,e))switch(s(0,3)){case 0:i.x=t.x+Math.random()*(e.right-t.x),i.y=t.y+Math.random()*(e.top-t.y);break;case 1:i.x=e.x+Math.random()*(t.right-e.x),i.y=e.bottom+Math.random()*(t.bottom-e.bottom);break;case 2:i.x=t.x+Math.random()*(e.x-t.x),i.y=e.y+Math.random()*(t.bottom-e.y);break;case 3:i.x=e.right+Math.random()*(t.right-e.right),i.y=t.y+Math.random()*(e.bottom-t.y)}return i}},74118:(t,e,i)=>{var s=i(56694),n=i(94287),r=i(47698),a=i(54932),o=i(52394),h=i(88829),l=i(30001),u=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=o.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},51828:t=>{t.exports=function(t,e){return t.width===e.width&&t.height===e.height}},5691:t=>{t.exports=function(t,e,i){return void 0===i&&(i=e),t.width*=e,t.height*=i,t}},58795:(t,e,i)=>{var s=i(74118);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=Math.min(t.x,e.x),r=Math.min(t.y,e.y),a=Math.max(t.right,e.right)-n,o=Math.max(t.bottom,e.bottom)-r;return i.setTo(n,r,a,o)}},66658:(t,e,i)=>{var s=i(74118);s.Area=i(1653),s.Ceil=i(33943),s.CeilAll=i(58662),s.CenterOn=i(79993),s.Clone=i(81572),s.Contains=i(94287),s.ContainsPoint=i(28687),s.ContainsRect=i(73222),s.CopyFrom=i(29538),s.Decompose=i(87279),s.Equals=i(19989),s.FitInside=i(92628),s.FitOutside=i(85028),s.Floor=i(71356),s.FloorAll=i(21687),s.FromPoints=i(80222),s.FromXY=i(75785),s.GetAspectRatio=i(6700),s.GetCenter=i(35242),s.GetPoint=i(47698),s.GetPoints=i(54932),s.GetSize=i(31591),s.Inflate=i(7782),s.Intersection=i(66217),s.MarchingAnts=i(40053),s.MergePoints=i(86673),s.MergeRect=i(14655),s.MergeXY=i(44755),s.Offset=i(74466),s.OffsetPoint=i(55946),s.Overlaps=i(97474),s.Perimeter=i(85876),s.PerimeterPoint=i(20243),s.Random=i(30001),s.RandomOutside=i(97691),s.SameDimensions=i(51828),s.Scale=i(5691),s.Union=i(58795),t.exports=s},19108:t=>{t.exports=function(t){var e=t.x1,i=t.y1,s=t.x2,n=t.y2,r=t.x3,a=t.y3;return Math.abs(((r-e)*(n-i)-(s-e)*(a-i))/2)}},41199:(t,e,i)=>{var s=i(66349);t.exports=function(t,e,i){var n=i*(Math.sqrt(3)/2);return new s(t,e,t+i/2,e+n,t-i/2,e+n)}},88730:(t,e,i)=>{var s=i(11117),n=i(66349);t.exports=function(t,e,i,r,a){void 0===e&&(e=null),void 0===i&&(i=1),void 0===r&&(r=1),void 0===a&&(a=[]);for(var o,h,l,u,c,d,f,p,v,g=s(t,e),m=0;m{var s=i(66349);t.exports=function(t,e,i,n){return void 0===n&&(n=i),new s(t,e,t,e-n,t+i,e)}},1882:(t,e,i)=>{var s=i(56595),n=i(9640);t.exports=function(t,e,i,r){void 0===r&&(r=s);var a=r(t),o=e-a.x,h=i-a.y;return n(t,o,h)}},56595:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},91835:(t,e,i)=>{var s=i(93736);function n(t,e,i,s){return t*s-e*i}t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x3,r=t.y3,a=t.x1-i,o=t.y1-r,h=t.x2-i,l=t.y2-r,u=2*n(a,o,h,l),c=n(o,a*a+o*o,l,h*h+l*l),d=n(a,a*a+o*o,h,h*h+l*l);return e.x=i-c/u,e.y=r+d/u,e}},97073:(t,e,i)=>{var s=i(26673);t.exports=function(t,e){void 0===e&&(e=new s);var i,n,r=t.x1,a=t.y1,o=t.x2,h=t.y2,l=t.x3,u=t.y3,c=o-r,d=h-a,f=l-r,p=u-a,v=c*(r+o)+d*(a+h),g=f*(r+l)+p*(a+u),m=2*(c*(u-h)-d*(l-o));if(Math.abs(m)<1e-6){var y=Math.min(r,o,l),x=Math.min(a,h,u);i=.5*(Math.max(r,o,l)-y),n=.5*(Math.max(a,h,u)-x),e.x=y+i,e.y=x+n,e.radius=Math.sqrt(i*i+n*n)}else e.x=(p*v-d*g)/m,e.y=(c*g-f*v)/m,i=e.x-r,n=e.y-a,e.radius=Math.sqrt(i*i+n*n);return e}},75974:(t,e,i)=>{var s=i(66349);t.exports=function(t){return new s(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},60689:t=>{t.exports=function(t,e,i){var s=t.x3-t.x1,n=t.y3-t.y1,r=t.x2-t.x1,a=t.y2-t.y1,o=e-t.x1,h=i-t.y1,l=s*s+n*n,u=s*r+n*a,c=s*o+n*h,d=r*r+a*a,f=r*o+a*h,p=l*d-u*u,v=0===p?0:1/p,g=(d*c-u*f)*v,m=(l*f-u*c)*v;return g>=0&&m>=0&&g+m<1}},86875:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=!1),void 0===s&&(s=[]);for(var n,r,a,o,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=u*u+c*c,v=u*d+c*f,g=d*d+f*f,m=p*g-v*v,y=0===m?0:1/m,x=t.x1,T=t.y1,w=0;w=0&&r>=0&&n+r<1&&(s.push({x:e[w].x,y:e[w].y}),i)));w++);return s}},51532:(t,e,i)=>{var s=i(60689);t.exports=function(t,e){return s(t,e.x,e.y)}},42538:t=>{t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},18680:t=>{t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},29977:t=>{t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2&&t.x3===e.x3&&t.y3===e.y3}},56088:(t,e,i)=>{var s=i(79967),n=i(16028);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=t.getLineA(),a=t.getLineB(),o=t.getLineC();if(e<=0||e>=1)return i.x=r.x1,i.y=r.y1,i;var h=n(r),l=n(a),u=n(o),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d):(d=(c-=h)/l,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d),i}},24402:(t,e,i)=>{var s=i(16028),n=i(79967);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var a=t.getLineA(),o=t.getLineB(),h=t.getLineC(),l=s(a),u=s(o),c=s(h),d=l+u+c;!e&&i>0&&(e=d/i);for(var f=0;fl+u?(v=(p-=l+u)/c,g.x=h.x1+(h.x2-h.x1)*v,g.y=h.y1+(h.y2-h.y1)*v):(v=(p-=l)/u,g.x=o.x1+(o.x2-o.x1)*v,g.y=o.y1+(o.y2-o.y1)*v),r.push(g)}return r}},83648:(t,e,i)=>{var s=i(79967);function n(t,e,i,s){var n=t-i,r=e-s,a=n*n+r*r;return Math.sqrt(a)}t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x1,r=t.y1,a=t.x2,o=t.y2,h=t.x3,l=t.y3,u=n(h,l,a,o),c=n(i,r,h,l),d=n(a,o,i,r),f=u+c+d;return e.x=(i*u+a*c+h*d)/f,e.y=(r*u+o*c+l*d)/f,e}},9640:t=>{t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},95290:(t,e,i)=>{var s=i(16028);t.exports=function(t){var e=t.getLineA(),i=t.getLineB(),n=t.getLineC();return s(e)+s(i)+s(n)}},99761:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x2-t.x1,n=t.y2-t.y1,r=t.x3-t.x1,a=t.y3-t.y1,o=Math.random(),h=Math.random();return o+h>=1&&(o=1-o,h=1-h),e.x=t.x1+(i*o+r*h),e.y=t.y1+(n*o+a*h),e}},21934:(t,e,i)=>{var s=i(19211),n=i(83648);t.exports=function(t,e){var i=n(t);return s(t,i.x,i.y,e)}},68454:(t,e,i)=>{var s=i(19211);t.exports=function(t,e,i){return s(t,e.x,e.y,i)}},19211:t=>{t.exports=function(t,e,i,s){var n=Math.cos(s),r=Math.sin(s),a=t.x1-e,o=t.y1-i;return t.x1=a*n-o*r+e,t.y1=a*r+o*n+i,a=t.x2-e,o=t.y2-i,t.x2=a*n-o*r+e,t.y2=a*r+o*n+i,a=t.x3-e,o=t.y3-i,t.x3=a*n-o*r+e,t.y3=a*r+o*n+i,t}},66349:(t,e,i)=>{var s=i(56694),n=i(60689),r=i(56088),a=i(24402),o=i(52394),h=i(88829),l=i(99761),u=new s({initialize:function(t,e,i,s,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=0),this.type=o.TRIANGLE,this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.x3=n,this.y3=r},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,s,n,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.x3=n,this.y3=r,this},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.x3,this.y3,this.x1,this.y1),t},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=u},87619:(t,e,i)=>{var s=i(66349);s.Area=i(19108),s.BuildEquilateral=i(41199),s.BuildFromPolygon=i(88730),s.BuildRight=i(3635),s.CenterOn=i(1882),s.Centroid=i(56595),s.CircumCenter=i(91835),s.CircumCircle=i(97073),s.Clone=i(75974),s.Contains=i(60689),s.ContainsArray=i(86875),s.ContainsPoint=i(51532),s.CopyFrom=i(42538),s.Decompose=i(18680),s.Equals=i(29977),s.GetPoint=i(56088),s.GetPoints=i(24402),s.InCenter=i(83648),s.Perimeter=i(95290),s.Offset=i(9640),s.Random=i(99761),s.Rotate=i(21934),s.RotateAroundPoint=i(68454),s.RotateAroundXY=i(19211),t.exports=s},27395:t=>{t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}}},18104:t=>{t.exports=function(t,e){return function(i,s,n,r){var a=t.getPixelAlpha(s,n,r.texture.key,r.frame.name);return a&&a>=e}}},69898:(t,e,i)=>{var s=i(56694),n=i(72687),r=i(6659),a=i(33963),o=i(97081),h=i(71064),l=i(7905),u=i(40398),c=i(37579),d=i(69360),f=i(64462),p=new s({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new r,this.isOver=!0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new h(this):null,this.mouse=e.inputMouse?new l(this):null,this.touch=e.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var s=new u(this,i);s.smoothFactor=e.inputSmoothFactor,this.pointers.push(s)}this.mousePointer=e.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new d,this._tempMatrix2=new d,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(o.BOOT,this.boot,this)},boot:function(){var t=this.game,e=t.events;this.canvas=t.canvas,this.scaleManager=t.scale,this.events.emit(a.MANAGER_BOOT),e.on(o.PRE_RENDER,this.preRender,this),e.once(o.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(a.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(a.GAME_OUT,t)},preRender:function(){var t=this.game.loop.now,e=this.game.loop.delta,i=this.game.scene.getScenes(!0,!0);this.time=t,this.events.emit(a.MANAGER_UPDATE);for(var s=0;s10&&(t=10-this.pointersTotal);for(var i=0;i{var s=i(26673),n=i(65650),r=i(56694),a=i(72687),o=i(27395),h=i(18104),l=i(53996),u=i(95669),c=i(72313),d=i(33963),f=i(6659),p=i(72632),v=i(52394),g=i(63399),m=i(42911),y=i(91963),x=i(74118),T=i(94287),w=i(7599),E=i(66349),S=i(60689),b=new r({Extends:f,initialize:function(t){f.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.pluginEvents=new f,this.enabled=!0,this.displayList,this.cameras,g.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var e={cancelled:!1};this._eventContainer={stopPropagation:function(){e.cancelled=!0}},this._eventData=e,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,t.sys.events.once(w.BOOT,this.boot,this),t.sys.events.on(w.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(w.DESTROY,this.destroy,this),this.pluginEvents.emit(d.BOOT)},start:function(){var t=this.systems.events;t.on(w.TRANSITION_START,this.transitionIn,this),t.on(w.TRANSITION_OUT,this.transitionOut,this),t.on(w.TRANSITION_COMPLETE,this.transitionComplete,this),t.on(w.PRE_UPDATE,this.preUpdate,this),t.once(w.SHUTDOWN,this.shutdown,this),this.manager.events.on(d.GAME_OUT,this.onGameOut,this),this.manager.events.on(d.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(d.START)},onGameOver:function(t){this.isActive()&&this.emit(d.GAME_OVER,t.timeStamp,t)},onGameOut:function(t){this.isActive()&&this.emit(d.GAME_OUT,t.timeStamp,t)},preUpdate:function(){this.pluginEvents.emit(d.PRE_UPDATE);var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,s=e.length;if(0!==i||0!==s){for(var n=this._list,r=0;r-1&&(n.splice(o,1),this.clear(a,!0))}this._pendingRemoval.length=0,this._list=n.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.canInput()},updatePoll:function(t,e){if(!this.isActive())return!1;if(this.pluginEvents.emit(d.UPDATE,t,e),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var i,s=this.manager,n=s.pointers,r=s.pointersTotal;for(i=0;i0){if(this._pollTimer-=e,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var o=!1;for(i=0;i0&&(o=!0)}return o},update:function(t,e){if(!this.isActive())return!1;for(var i=e.length,s=!1,n=0;n0&&(s=!0)}return this._updatedThisFrame=!0,s},clear:function(t,e){void 0===e&&(e=!1),this.disable(t);var i=t.input;i&&(this.removeDebug(t),i.gameObject=void 0,i.target=void 0,i.hitArea=void 0,i.hitAreaCallback=void 0,i.callbackContext=void 0,t.input=null),e||this.queueForRemoval(t);var s=this._draggable.indexOf(t);return s>-1&&this._draggable.splice(s,1),t},disable:function(t){var e=t.input;e&&(e.enabled=!1,e.dragState=0);var i=this._temp,s=this._drag,n=this._over,r=this.manager,a=i.indexOf(t);a>-1&&i.splice(a,1);for(var o=0;o-1&&s[o].splice(a,1),(a=n[o].indexOf(t))>-1&&(n[o].splice(a,1),r.resetCursor(e));return this},enable:function(t,e,i,s){return void 0===s&&(s=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&s&&!t.input.dropZone&&(t.input.dropZone=s),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i0)return t.camera=s,n}return t.camera=e[0],[]},processDownEvents:function(t){var e=0,i=this._temp,s=this._eventData,n=this._eventContainer;s.cancelled=!1;for(var r=!1,a=0;a0&&l(t.x,t.y,t.downX,t.downY)>=n||s>0&&e>=t.downTime+s)&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;i1&&(this.sortGameObjects(i,t),this.topOnly&&i.splice(1)),this._drag[t.id]=i,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?(this.setDragState(t,3),this.processDragStartList(t)):(this.setDragState(t,2),0))},processDragMoveEvent:function(t){if(2===this.getDragState(t)&&this.processDragThresholdEvent(t,this.manager.game.loop.now),4!==this.getDragState(t))return 0;for(var e=this._tempZones,i=this._drag[t.id],s=0;s0?(a.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,a,h),o.target=e[0],h=o.target,a.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,a,h)):(a.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,a,h),e[0]?(o.target=e[0],h=o.target,a.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,a,h)):o.target=null)}else!h&&e[0]&&(o.target=e[0],h=o.target,a.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,a,h));if(a.parentContainer){var u=t.worldX-o.dragStartXGlobal,c=t.worldY-o.dragStartYGlobal,f=a.getParentRotation(),p=u*Math.cos(f)+c*Math.sin(f),v=c*Math.cos(f)-u*Math.sin(f);p*=1/a.parentContainer.scaleX,v*=1/a.parentContainer.scaleY,n=p+o.dragStartX,r=v+o.dragStartY}else n=t.worldX-o.dragX,r=t.worldY-o.dragY;a.emit(d.GAMEOBJECT_DRAG,t,n,r),this.emit(d.DRAG,t,a,n,r)}return i.length},processDragUpEvent:function(t){for(var e=this._drag[t.id],i=0;i0){var r=this.manager,a=this._eventData,o=this._eventContainer;a.cancelled=!1;for(var h=!1,l=0;l0){var n=this.manager,r=this._eventData,a=this._eventContainer;r.cancelled=!1;var o=!1;this.sortGameObjects(e,t);for(var h=0;h0){for(this.sortGameObjects(n,t),e=0;e0){for(this.sortGameObjects(r,t),e=0;e-1&&this._draggable.splice(n,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return h(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var s=!1,n=!1,r=!1,a=!1,h=!1,l=!0;if(m(e)){var u=e;e=p(u,"hitArea",null),i=p(u,"hitAreaCallback",null),s=p(u,"draggable",!1),n=p(u,"dropZone",!1),r=p(u,"cursor",!1),a=p(u,"useHandCursor",!1),h=p(u,"pixelPerfect",!1);var c=p(u,"alphaTolerance",1);h&&(e={},i=this.makePixelPerfect(c)),e&&i||(this.setHitAreaFromTexture(t),l=!1)}else"function"!=typeof e||i||(i=e,e={});for(var d=0;d{var s=i(10850),n={},r={register:function(t,e,i,s,r){n[t]={plugin:e,mapping:i,settingsKey:s,configKey:r}},getPlugin:function(t){return n[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,r=e.game.config;for(var a in n){var o=n[a].plugin,h=n[a].mapping,l=n[a].settingsKey,u=n[a].configKey;s(i,l,r[u])&&(t[h]=new o(t))}},remove:function(t){n.hasOwnProperty(t)&&delete n[t]}};t.exports=r},40398:(t,e,i)=>{var s=i(90447),n=i(56694),r=i(53996),a=i(88456),o=i(44521),h=i(93736),l=i(36580),u=new n({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new h,this.prevPosition=new h,this.midPoint=new h(-1,-1),this.velocity=new h,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===e,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(t){var e=t.getWorldPoint(this.x,this.y);return this.worldX=e.x,this.worldY=e.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t=this.position.x,e=this.position.y,i=this.midPoint.x,n=this.midPoint.y;if(t!==i||e!==n){var r=o(this.motionFactor,i,t),h=o(this.motionFactor,n,e);a(r,t,.1)&&(r=t),a(h,e,.1)&&(h=e),this.midPoint.set(r,h);var l=t-r,u=e-h;this.velocity.set(l,u),this.angle=s(r,h,t,e),this.distance=Math.sqrt(l*l+u*u)}},up:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),0===this.buttons&&(this.isDown=!1,this.upTime=t.timeStamp,this.wasTouch=!1)},down:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),l.macOS&&t.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=t.timeStamp),this.wasTouch=!1},move:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.locked&&(this.movementX=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.moveTime=t.timeStamp,this.wasTouch=!1},wheel:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=e,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(t,e){this.event=e,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.moveTime=e.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?s(this.downX,this.downY,this.x,this.y):s(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,s=this.prevPosition.y,n=this.position.x,r=this.position.y,a=0;a{t.exports={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8}},14874:t=>{t.exports="boot"},54168:t=>{t.exports="destroy"},526:t=>{t.exports="dragend"},81623:t=>{t.exports="dragenter"},94472:t=>{t.exports="drag"},9304:t=>{t.exports="dragleave"},34265:t=>{t.exports="dragover"},50151:t=>{t.exports="dragstart"},98134:t=>{t.exports="drop"},56773:t=>{t.exports="gameobjectdown"},45824:t=>{t.exports="dragend"},39578:t=>{t.exports="dragenter"},72072:t=>{t.exports="drag"},82569:t=>{t.exports="dragleave"},70833:t=>{t.exports="dragover"},81442:t=>{t.exports="dragstart"},32936:t=>{t.exports="drop"},99658:t=>{t.exports="gameobjectmove"},60515:t=>{t.exports="gameobjectout"},55254:t=>{t.exports="gameobjectover"},34782:t=>{t.exports="pointerdown"},41769:t=>{t.exports="pointermove"},65588:t=>{t.exports="pointerout"},61640:t=>{t.exports="pointerover"},49342:t=>{t.exports="pointerup"},82662:t=>{t.exports="wheel"},13058:t=>{t.exports="gameobjectup"},52426:t=>{t.exports="gameobjectwheel"},78072:t=>{t.exports="gameout"},1545:t=>{t.exports="gameover"},67137:t=>{t.exports="boot"},27678:t=>{t.exports="process"},22257:t=>{t.exports="update"},90379:t=>{t.exports="pointerlockchange"},88909:t=>{t.exports="pointerdown"},36548:t=>{t.exports="pointerdownoutside"},18483:t=>{t.exports="pointermove"},22355:t=>{t.exports="pointerout"},7997:t=>{t.exports="pointerover"},66318:t=>{t.exports="pointerup"},94812:t=>{t.exports="pointerupoutside"},37310:t=>{t.exports="wheel"},24196:t=>{t.exports="preupdate"},27053:t=>{t.exports="shutdown"},29413:t=>{t.exports="start"},25165:t=>{t.exports="update"},33963:(t,e,i)=>{t.exports={BOOT:i(14874),DESTROY:i(54168),DRAG_END:i(526),DRAG_ENTER:i(81623),DRAG:i(94472),DRAG_LEAVE:i(9304),DRAG_OVER:i(34265),DRAG_START:i(50151),DROP:i(98134),GAME_OUT:i(78072),GAME_OVER:i(1545),GAMEOBJECT_DOWN:i(56773),GAMEOBJECT_DRAG_END:i(45824),GAMEOBJECT_DRAG_ENTER:i(39578),GAMEOBJECT_DRAG:i(72072),GAMEOBJECT_DRAG_LEAVE:i(82569),GAMEOBJECT_DRAG_OVER:i(70833),GAMEOBJECT_DRAG_START:i(81442),GAMEOBJECT_DROP:i(32936),GAMEOBJECT_MOVE:i(99658),GAMEOBJECT_OUT:i(60515),GAMEOBJECT_OVER:i(55254),GAMEOBJECT_POINTER_DOWN:i(34782),GAMEOBJECT_POINTER_MOVE:i(41769),GAMEOBJECT_POINTER_OUT:i(65588),GAMEOBJECT_POINTER_OVER:i(61640),GAMEOBJECT_POINTER_UP:i(49342),GAMEOBJECT_POINTER_WHEEL:i(82662),GAMEOBJECT_UP:i(13058),GAMEOBJECT_WHEEL:i(52426),MANAGER_BOOT:i(67137),MANAGER_PROCESS:i(27678),MANAGER_UPDATE:i(22257),POINTER_DOWN:i(88909),POINTER_DOWN_OUTSIDE:i(36548),POINTER_MOVE:i(18483),POINTER_OUT:i(22355),POINTER_OVER:i(7997),POINTER_UP:i(66318),POINTER_UP_OUTSIDE:i(94812),POINTER_WHEEL:i(37310),POINTERLOCK_CHANGE:i(90379),PRE_UPDATE:i(24196),SHUTDOWN:i(27053),START:i(29413),UPDATE:i(25165)}},70848:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=.1},update:function(t){this.value=t},getValue:function(){return Math.abs(this.value){var s=i(56694),n=i(43200),r=new s({initialize:function(t,e){this.pad=t,this.events=t.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(t){this.value=t;var e=this.pad,i=this.index;t>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(n.BUTTON_DOWN,e,this,t),this.pad.emit(n.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(n.BUTTON_UP,e,this,t),this.pad.emit(n.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},75956:(t,e,i)=>{var s=i(70848),n=i(21274),r=i(56694),a=i(6659),o=i(93736),h=new r({Extends:a,initialize:function(t,e){a.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],r=0;r=2&&(this.leftStick.set(r[0].getValue(),r[1].getValue()),n>=4&&this.rightStick.set(r[2].getValue(),r[3].getValue()))}},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t{var s=i(56694),n=i(6659),r=i(43200),a=i(75956),o=i(10850),h=i(63399),l=i(33963),u=new s({Extends:n,initialize:function(t){n.call(this),this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,t.pluginEvents.once(l.BOOT,this.boot,this),t.pluginEvents.on(l.START,this.start,this)},boot:function(){var t=this.scene.sys.game,e=this.settings.input,i=t.config;this.enabled=o(e,"gamepad",i.inputGamepad)&&t.device.input.gamepads,this.target=o(e,"gamepad.target",i.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(l.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(l.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var t=this,e=this.target,i=function(e){!e.defaultPrevented&&t.isActive()&&(t.refreshPads(),t.queue.push(e))};this.onGamepadHandler=i,e.addEventListener("gamepadconnected",i,!1),e.addEventListener("gamepaddisconnected",i,!1),this.sceneInputPlugin.pluginEvents.on(l.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(l.UPDATE,this.update);for(var t=0;t{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},74982:t=>{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},43247:t=>{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},4898:(t,e,i)=>{t.exports={DUALSHOCK_4:i(74982),SNES_USB:i(33171),XBOX_360:i(43247)}},17344:t=>{t.exports="down"},36635:t=>{t.exports="up"},85724:t=>{t.exports="connected"},55832:t=>{t.exports="disconnected"},772:t=>{t.exports="down"},33608:t=>{t.exports="up"},43200:(t,e,i)=>{t.exports={BUTTON_DOWN:i(17344),BUTTON_UP:i(36635),CONNECTED:i(85724),DISCONNECTED:i(55832),GAMEPAD_BUTTON_DOWN:i(772),GAMEPAD_BUTTON_UP:i(33608)}},92636:(t,e,i)=>{t.exports={Axis:i(70848),Button:i(21274),Events:i(43200),Gamepad:i(75956),GamepadPlugin:i(1379),Configs:i(4898)}},20873:(t,e,i)=>{var s=i(72687),n=i(98611),r={CreatePixelPerfectHandler:i(18104),CreateInteractiveObject:i(27395),Events:i(33963),Gamepad:i(92636),InputManager:i(69898),InputPlugin:i(12499),InputPluginCache:i(63399),Keyboard:i(28388),Mouse:i(11343),Pointer:i(40398),Touch:i(77423)};r=n(!1,r,s),t.exports=r},71064:(t,e,i)=>{var s=i(66458),n=i(56694),r=i(97081),a=i(33963),o=i(11873),h=i(72283),l=new n({initialize:function(t){this.manager=t,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=h,this.onKeyUp=h,t.events.once(a.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.addCapture(t.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(r.POST_STEP,this.postUpdate,this)},startListeners:function(){var t=this;this.onKeyDown=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.events.emit(a.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}},this.onKeyUp=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.events.emit(a.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}};var e=this.target;e&&(e.addEventListener("keydown",this.onKeyDown,!1),e.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var t=this.target;t.removeEventListener("keydown",this.onKeyDown,!1),t.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},removeCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(r.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=l},89666:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(94030),a=i(97081),o=i(10850),h=i(33963),l=i(63399),u=i(50165),c=i(11873),d=i(95625),f=i(48044),p=i(7599),v=i(84314),g=new s({Extends:n,initialize:function(t){n.call(this),this.game=t.systems.game,this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.manager=t.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,t.pluginEvents.once(h.BOOT,this.boot,this),t.pluginEvents.on(h.START,this.start,this)},boot:function(){var t=this.settings.input;this.enabled=o(t,"keyboard",!0);var e=o(t,"keyboard.capture",null);e&&this.addCaptures(e),this.sceneInputPlugin.pluginEvents.once(h.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(h.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(h.SHUTDOWN,this.shutdown,this),this.game.events.on(a.BLUR,this.resetKeys,this),this.scene.sys.events.on(p.PAUSE,this.resetKeys,this),this.scene.sys.events.on(p.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(t){return this.manager.addCapture(t),this},removeCapture:function(t){return this.manager.removeCapture(t),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:c.UP,down:c.DOWN,left:c.LEFT,right:c.RIGHT,space:c.SPACE,shift:c.SHIFT})},addKeys:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var s={};if("string"==typeof t){t=t.split(",");for(var n=0;n-1?s[n]=t:s[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t}return"string"==typeof t&&(t=c[t.toUpperCase()]),s[t]||(s[t]=new u(this,t),e&&this.addCapture(t),s[t].setEmitOnRepeat(i)),s[t]},removeKey:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var s,n=this.keys;if(t instanceof u){var r=n.indexOf(t);r>-1&&(s=this.keys[r],this.keys[r]=void 0)}else"string"==typeof t&&(t=c[t.toUpperCase()]);return n[t]&&(s=n[t],n[t]=void 0),s&&(s.plugin=null,i&&this.removeCapture(s.keyCode),e&&s.destroy()),this},removeAllKeys:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);for(var i=this.keys,s=0;st._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,s=0;s{t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},95625:(t,e,i)=>{var s=i(56694),n=i(94030),r=i(72632),a=i(2544),o=i(88754),h=new s({initialize:function(t,e,i){if(void 0===i&&(i={}),e.length<2)return!1;this.manager=t,this.enabled=!0,this.keyCodes=[];for(var s=0;s{var s=i(60258);t.exports=function(t,e){if(e.matched)return!0;var i=!1,n=!1;if(t.keyCode===e.current)if(e.index>0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(n=!0,i=s(t,e))}else n=!0,i=s(t,e);return!n&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},88754:t=>{t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},5044:t=>{t.exports="keydown"},40813:t=>{t.exports="keyup"},89319:t=>{t.exports="keycombomatch"},43267:t=>{t.exports="down"},78595:t=>{t.exports="keydown-"},30056:t=>{t.exports="keyup-"},81939:t=>{t.exports="up"},94030:(t,e,i)=>{t.exports={ANY_KEY_DOWN:i(5044),ANY_KEY_UP:i(40813),COMBO_MATCH:i(89319),DOWN:i(43267),KEY_DOWN:i(78595),KEY_UP:i(30056),UP:i(81939)}},28388:(t,e,i)=>{t.exports={Events:i(94030),KeyboardManager:i(71064),KeyboardPlugin:i(89666),Key:i(50165),KeyCodes:i(11873),KeyCombo:i(95625),AdvanceKeyCombo:i(60258),ProcessKeyCombo:i(2544),ResetKeyCombo:i(88754),JustDown:i(42460),JustUp:i(53162),DownDuration:i(64964),UpDuration:i(70331)}},64964:t=>{t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeDown;return t.isDown&&i{t.exports=function(t){return!!t._justDown&&(t._justDown=!1,!0)}},53162:t=>{t.exports=function(t){return!!t._justUp&&(t._justUp=!1,!0)}},50165:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(94030),a=new s({Extends:n,initialize:function(t,e){n.call(this),this.plugin=t,this.keyCode=e,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(t){return this.emitOnRepeat=t,this},onDown:function(t){this.originalEvent=t,this.enabled&&(this.altKey=t.altKey,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.location=t.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(r.DOWN,this,t):(this.isDown=!0,this.isUp=!1,this.timeDown=t.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(r.DOWN,this,t)))},onUp:function(t){this.originalEvent=t,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=t.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(r.UP,this,t))},reset:function(){return this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});t.exports=a},11873:t=>{t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},48044:(t,e,i)=>{var s=i(11873),n={};for(var r in s)n[s[r]]=r;t.exports=n},70331:t=>{t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeUp;return t.isUp&&i{var s=i(56694),n=i(90185),r=i(33963),a=i(72283),o=new s({initialize:function(t){this.manager=t,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=a,this.onMouseDown=a,this.onMouseUp=a,this.onMouseDownWindow=a,this.onMouseUpWindow=a,this.onMouseOver=a,this.onMouseOut=a,this.onMouseWheel=a,this.pointerLockChange=a,this.isTop=!0,t.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.passive=t.inputMousePassive,this.preventDefaultDown=t.inputMousePreventDefaultDown,this.preventDefaultUp=t.inputMousePreventDefaultUp,this.preventDefaultMove=t.inputMousePreventDefaultMove,this.preventDefaultWheel=t.inputMousePreventDefaultWheel,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",(function(t){return t.preventDefault(),!1})),this},requestPointerLock:function(){if(n.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},releasePointerLock:function(){n.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this.target;if(t){var e=this,i=this.manager,s=i.canvas,r=window&&window.focus&&i.game.config.autoFocus;this.onMouseMove=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseMove(t),e.preventDefaultMove&&t.preventDefault())},this.onMouseDown=function(t){r&&window.focus(),!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseDown(t),e.preventDefaultDown&&t.target===s&&t.preventDefault())},this.onMouseDownWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onMouseDown(t)},this.onMouseUp=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseUp(t),e.preventDefaultUp&&t.target===s&&t.preventDefault())},this.onMouseUpWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onMouseUp(t)},this.onMouseOver=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOver(t)},this.onMouseOut=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOut(t)},this.onMouseWheel=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onMouseWheel(t),e.preventDefaultWheel&&t.target===s&&t.preventDefault()};var a={passive:!0};if(t.addEventListener("mousemove",this.onMouseMove),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("mouseover",this.onMouseOver,a),t.addEventListener("mouseout",this.onMouseOut,a),this.preventDefaultWheel?t.addEventListener("wheel",this.onMouseWheel,{passive:!1}):t.addEventListener("wheel",this.onMouseWheel,a),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,a),window.top.addEventListener("mouseup",this.onMouseUpWindow,a)}catch(t){window.addEventListener("mousedown",this.onMouseDownWindow,a),window.addEventListener("mouseup",this.onMouseUpWindow,a),this.isTop=!1}n.pointerLock&&(this.pointerLockChange=function(t){var s=e.target;e.locked=document.pointerLockElement===s||document.mozPointerLockElement===s||document.webkitPointerLockElement===s,i.onPointerLockChange(t)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&((t=this.isTop?window.top:window).removeEventListener("mousedown",this.onMouseDownWindow),t.removeEventListener("mouseup",this.onMouseUpWindow)),n.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=o},11343:(t,e,i)=>{t.exports={MouseManager:i(7905)}},37579:(t,e,i)=>{var s=i(56694),n=i(33963),r=i(72283),a=new s({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=r,this.onTouchStartWindow=r,this.onTouchMove=r,this.onTouchEnd=r,this.onTouchEndWindow=r,this.onTouchCancel=r,this.onTouchCancelWindow=r,this.isTop=!0,t.events.once(n.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputTouch,this.target=t.inputTouchEventTarget,this.capture=t.inputTouchCapture,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",(function(t){return t.preventDefault(),!1})),this},startListeners:function(){var t=this.target;if(t){var e=this,i=this.manager,s=i.canvas,n=window&&window.focus&&i.game.config.autoFocus;this.onTouchMove=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchMove(t),e.capture&&t.cancelable&&t.preventDefault())},this.onTouchStart=function(t){n&&window.focus(),!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchStart(t),e.capture&&t.cancelable&&t.target===s&&t.preventDefault())},this.onTouchStartWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onTouchStart(t)},this.onTouchEnd=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchEnd(t),e.capture&&t.cancelable&&t.target===s&&t.preventDefault())},this.onTouchEndWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onTouchEnd(t)},this.onTouchCancel=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchCancel(t),e.capture&&t.preventDefault())},this.onTouchCancelWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onTouchCancel(t)};var r=this.capture,a={passive:!0},o={passive:!1};if(t.addEventListener("touchstart",this.onTouchStart,r?o:a),t.addEventListener("touchmove",this.onTouchMove,r?o:a),t.addEventListener("touchend",this.onTouchEnd,r?o:a),t.addEventListener("touchcancel",this.onTouchCancel,r?o:a),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,o),window.top.addEventListener("touchend",this.onTouchEndWindow,o),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,o)}catch(t){window.addEventListener("touchstart",this.onTouchStartWindow,o),window.addEventListener("touchend",this.onTouchEndWindow,o),window.addEventListener("touchcancel",this.onTouchCancelWindow,o),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("touchstart",this.onTouchStart),t.removeEventListener("touchmove",this.onTouchMove),t.removeEventListener("touchend",this.onTouchEnd),t.removeEventListener("touchcancel",this.onTouchCancel),window&&((t=this.isTop?window.top:window).removeEventListener("touchstart",this.onTouchStartWindow),t.removeEventListener("touchend",this.onTouchEndWindow),t.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=a},77423:(t,e,i)=>{t.exports={TouchManager:i(37579)}},98035:(t,e,i)=>{var s=i(56694),n=i(12117),r=i(683),a=i(72632),o=i(30750),h=i(43531),l=i(88490),u=i(33868),c=new s({initialize:function(t,e){if(this.loader=t,this.cache=a(e,"cache",!1),this.type=a(e,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=a(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.key)throw new Error("Invalid File key: "+this.key);var s=a(e,"url");void 0===s?s=t.path+i+"."+a(e,"extension",""):"string"!=typeof s||s.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(s=t.path+s),this.url=s,this.src="",this.xhrSettings=u(a(e,"responseType",void 0)),a(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,a(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?n.FILE_POPULATED:n.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=a(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===n.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=n.FILE_LOADING,this.src=o(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&this.loader.localSchemes.some((function(e){return 0===t.responseURL.indexOf(e)}))&&0===e.target.status,s=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(s=!1),this.state=n.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,s)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(r.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=n.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=n.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=n.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(t){if(this.state!==n.FILE_PENDING_DESTROY){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(r.FILE_COMPLETE,e,i,t),this.loader.emit(r.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this),this.state=n.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var s=new FileReader;s.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+s.result.split(",")[1]},s.onerror=t.onerror,s.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},76846:t=>{var e={},i={install:function(t){for(var i in e)t[i]=e[i]},register:function(t,i){e[t]=i},destroy:function(){e={}}};t.exports=i},30750:t=>{t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},67285:(t,e,i)=>{var s=i(56694),n=i(12117),r=i(58403),a=i(6659),o=i(683),h=i(76846),l=i(72632),u=i(10850),c=i(91963),d=i(7599),f=i(33868),p=new s({Extends:a,initialize:function(t){a.call(this);var e=t.sys.game.config,i=t.sys.settings.loader;this.scene=t,this.systems=t.sys,this.cacheManager=t.sys.cache,this.textureManager=t.sys.textures,this.sceneManager=t.sys.game.scene,h.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(l(i,"baseURL",e.loaderBaseURL)),this.setPath(l(i,"path",e.loaderPath)),this.setPrefix(l(i,"prefix",e.loaderPrefix)),this.maxParallelDownloads=l(i,"maxParallelDownloads",e.loaderMaxParallelDownloads),this.xhr=f(l(i,"responseType",e.loaderResponseType),l(i,"async",e.loaderAsync),l(i,"user",e.loaderUser),l(i,"password",e.loaderPassword),l(i,"timeout",e.loaderTimeout),l(i,"withCredentials",e.loaderWithCredentials)),this.crossOrigin=l(i,"crossOrigin",e.loaderCrossOrigin),this.imageLoadType=l(i,"imageLoadType",e.loaderImageLoadType),this.localSchemes=l(i,"localScheme",e.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new r,this.inflight=new r,this.queue=new r,this._deleteQueue=new r,this.totalFailed=0,this.totalComplete=0,this.state=n.LOADER_IDLE,this.multiKeyIndex=0,t.sys.events.once(d.BOOT,this.boot,this),t.sys.events.on(d.START,this.pluginStart,this)},boot:function(){this.systems.events.once(d.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(d.SHUTDOWN,this.shutdown,this)},setBaseURL:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.baseURL=t,this},setPath:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.path=t,this},setPrefix:function(t){return void 0===t&&(t=""),this.prefix=t,this},setCORS:function(t){return this.crossOrigin=t,this},addFile:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e0},isLoading:function(){return this.state===n.LOADER_LOADING||this.state===n.LOADER_PROCESSING},isReady:function(){return this.state===n.LOADER_IDLE||this.state===n.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(o.START,this),0===this.list.size?this.loadComplete():(this.state=n.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(d.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(o.PROGRESS,this.progress)},update:function(){this.state===n.LOADER_LOADING&&this.list.size>0&&this.inflight.size{var s=i(98611),n=i(33868);t.exports=function(t,e){var i=void 0===t?n():s({},t);if(e)for(var r in e)void 0!==e[r]&&(i[r]=e[r]);return i}},45176:(t,e,i)=>{var s=i(56694),n=i(12117),r=i(683),a=new s({initialize:function(t,e,i,s){var r=[];s.forEach((function(t){t&&r.push(t)})),this.loader=t,this.type=e,this.key=i,this.multiKeyIndex=t.multiKeyIndex++,this.files=r,this.state=n.FILE_PENDING,this.complete=!1,this.pending=r.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var a=0;a{var s=i(43531);t.exports=function(t,e){var i=s(e,t.xhrSettings),n=new XMLHttpRequest;if(n.open("GET",t.src,i.async,i.user,i.password),n.responseType=t.xhrSettings.responseType,n.timeout=i.timeout,i.headers)for(var r in i.headers)n.setRequestHeader(r,i.headers[r]);return i.header&&i.headerValue&&n.setRequestHeader(i.header,i.headerValue),i.requestedWith&&n.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&n.overrideMimeType(i.overrideMimeType),i.withCredentials&&(n.withCredentials=!0),n.onload=t.onLoad.bind(t,n),n.onerror=t.onError.bind(t,n),n.onprogress=t.onProgress.bind(t),n.send(),n}},33868:t=>{t.exports=function(t,e,i,s,n,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===s&&(s=""),void 0===n&&(n=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:s,timeout:n,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},12117:t=>{t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20}},7398:t=>{t.exports="addfile"},52187:t=>{t.exports="complete"},36627:t=>{t.exports="filecomplete"},81925:t=>{t.exports="filecomplete-"},29774:t=>{t.exports="loaderror"},20943:t=>{t.exports="load"},74693:t=>{t.exports="fileprogress"},71176:t=>{t.exports="postprocess"},88984:t=>{t.exports="progress"},72753:t=>{t.exports="start"},683:(t,e,i)=>{t.exports={ADD:i(7398),COMPLETE:i(52187),FILE_COMPLETE:i(36627),FILE_KEY_COMPLETE:i(81925),FILE_LOAD_ERROR:i(29774),FILE_LOAD:i(20943),FILE_PROGRESS:i(74693),POST_PROCESS:i(71176),PROGRESS:i(88984),START:i(72753)}},46468:(t,e,i)=>{var s=i(56694),n=i(76846),r=i(70806),a=i(683),o=new s({Extends:r,initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.type="animationJSON"},onProcess:function(){this.loader.once(a.POST_PROCESS,this.onLoadComplete,this),r.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});n.register("animation",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(72632),a=i(42927),o=i(42911),h=i(70806),l=i(45176),u=new s({Extends:l,initialize:function(t,e,i,s,n,u){var c,d;if(o(e)){var f=e;e=r(f,"key"),c=new a(t,{key:e,url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),d=new h(t,{key:e,url:r(f,"atlasURL"),extension:r(f,"atlasExtension","json"),xhrSettings:r(f,"atlasXhrSettings")})}else c=new a(t,e,i,n),d=new h(t,e,s,u);c.linkFile?l.call(this,t,"atlasjson",e,[c,d,c.linkFile]):l.call(this,t,"atlasjson",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),e.addToCache(),this.complete=!0}}});n.register("aseprite",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var a=0;a{var s=i(56694),n=i(76846),r=i(72632),a=i(42927),o=i(42911),h=i(70806),l=i(45176),u=new s({Extends:l,initialize:function(t,e,i,s,n,u){var c,d;if(o(e)){var f=e;e=r(f,"key"),c=new a(t,{key:e,url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),d=new h(t,{key:e,url:r(f,"atlasURL"),extension:r(f,"atlasExtension","json"),xhrSettings:r(f,"atlasXhrSettings")})}else c=new a(t,e,i,n),d=new h(t,e,s,u);c.linkFile?l.call(this,t,"atlasjson",e,[c,d,c.linkFile]):l.call(this,t,"atlasjson",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),this.complete=!0}}});n.register("atlas",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var a=0;a{var s=i(56694),n=i(76846),r=i(72632),a=i(42927),o=i(42911),h=i(45176),l=i(15297),u=new s({Extends:h,initialize:function(t,e,i,s,n,u){var c,d;if(o(e)){var f=e;e=r(f,"key"),c=new a(t,{key:e,url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),d=new l(t,{key:e,url:r(f,"atlasURL"),extension:r(f,"atlasExtension","xml"),xhrSettings:r(f,"atlasXhrSettings")})}else c=new a(t,e,i,n),d=new l(t,e,s,u);c.linkFile?h.call(this,t,"atlasxml",e,[c,d,c.linkFile]):h.call(this,t,"atlasxml",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(t.key,t.data,e.data,i),this.complete=!0}}});n.register("atlasXML",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var a=0;a{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(30929),l=i(42911),u=new s({Extends:r,initialize:function(t,e,i,s,n){if(l(e)){var a=e;e=o(a,"key"),s=o(a,"xhrSettings"),n=o(a,"context",n)}var h={type:"audio",cache:t.cacheManager.audio,extension:i.type,responseType:"arraybuffer",key:e,url:i.url,xhrSettings:s,config:{context:n}};r.call(this,t,h)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this;this.config.context.decodeAudioData(this.xhrLoader.response,(function(e){t.data=e,t.onProcessComplete()}),(function(e){console.error("Error decoding audio: "+t.key+" - ",e?e.message:null),t.onProcessError()})),this.config.context=null}});u.create=function(t,e,i,s,n){var r=t.systems.game,a=r.config.audio,c=r.device.audio;l(e)&&(i=o(e,"url",[]),s=o(e,"config",{}));var d=u.getAudioURL(r,i);return d?c.webAudio&&!a.disableWebAudio?new u(t,e,d,n,r.sound.context):new h(t,e,d,s):null},u.getAudioURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i{var s=i(67448),n=i(56694),r=i(76846),a=i(72632),o=i(42911),h=i(70806),l=i(45176),u=new n({Extends:l,initialize:function(t,e,i,n,r,u,c){if(o(e)){var d=e;e=a(d,"key"),i=a(d,"jsonURL"),n=a(d,"audioURL"),r=a(d,"audioConfig"),u=a(d,"audioXhrSettings"),c=a(d,"jsonXhrSettings")}var f;if(n){var p=s.create(t,e,n,r,u);p&&(f=new h(t,e,i,c),l.call(this,t,"audiosprite",e,[p,f]),this.config.resourceLoad=!1)}else f=new h(t,e,i,c),l.call(this,t,"audiosprite",e,[f]),this.config.resourceLoad=!0,this.config.audioConfig=r,this.config.audioXhrSettings=u},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,this.config.resourceLoad&&"json"===t.type&&t.data.hasOwnProperty("resources"))){var e=t.data.resources,i=a(this.config,"audioConfig"),n=a(this.config,"audioXhrSettings"),r=s.create(this.loader,t.key,e,i,n);r&&(this.addToMultiFile(r),this.loader.addFile(r))}},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache(),e.addToCache(),this.complete=!0}}});r.register("audioSprite",(function(t,e,i,s,n,r){var a,o=this.systems.game,h=o.config.audio,l=o.device.audio;if(h&&h.noAudio||!l.webAudio&&!l.audioData)return this;if(Array.isArray(t))for(var c=0;c{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n){var a="bin";if(h(e)){var l=e;e=o(l,"key"),i=o(l,"url"),s=o(l,"xhrSettings"),a=o(l,"extension",a),n=o(l,"dataType",n)}var u={type:"binary",cache:t.cacheManager.binary,extension:a,responseType:"arraybuffer",key:e,url:i,xhrSettings:s,config:{dataType:n}};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this.config.dataType;this.data=t?new t(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});a.register("binary",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(72632),a=i(42927),o=i(42911),h=i(45176),l=i(31476),u=i(15297),c=new s({Extends:h,initialize:function(t,e,i,s,n,l){var c,d;if(o(e)){var f=e;e=r(f,"key"),c=new a(t,{key:e,url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),d=new u(t,{key:e,url:r(f,"fontDataURL"),extension:r(f,"fontDataExtension","xml"),xhrSettings:r(f,"fontDataXhrSettings")})}else c=new a(t,e,i,n),d=new u(t,e,s,l);c.linkFile?h.call(this,t,"bitmapfont",e,[c,d,c.linkFile]):h.call(this,t,"bitmapfont",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache();var i=t.cache.get(t.key),s=l(e.data,t.cache.getFrame(t.key),0,0,i);this.loader.cacheManager.bitmapFont.add(t.key,{data:s,texture:t.key,frame:null}),this.complete=!0}}});n.register("bitmapFont",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var a=0;a{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="css";if(h(e)){var a=e;e=o(a,"key"),i=o(a,"url"),s=o(a,"xhrSettings"),n=o(a,"extension",n)}var l={type:"script",cache:!1,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});a.register("css",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(73152),n=i(40612),r=i(56694),a=i(76846),o=i(72632),h=i(42927),l=i(42911),u=i(70806),c=i(67409),d=i(30657),f=i(80802),p=i(45176),v=i(24904),g=new r({Extends:p,initialize:function(t,e,i,s){if(i.multiAtlasURL){var r=new u(t,{key:e,url:i.multiAtlasURL,xhrSettings:s,config:i});p.call(this,t,"texture",e,[r])}else{var a=i.textureURL.substr(i.textureURL.length-3);i.type||(i.type="ktx"===a.toLowerCase()?"KTX":"PVR");var o=new n(t,{key:e,url:i.textureURL,extension:a,xhrSettings:s,config:i});if(i.atlasURL){var h=new u(t,{key:e,url:i.atlasURL,xhrSettings:s,config:i});p.call(this,t,"texture",e,[o,h])}else p.call(this,t,"texture",e,[o])}this.config=i},onFileComplete:function(t){if(-1!==this.files.indexOf(t)){if(this.pending--,!this.config.multiAtlasURL)return;if("json"===t.type&&t.data.hasOwnProperty("textures")){var e=t.data.textures,i=this.config,s=this.loader,r=s.baseURL,a=s.path,h=s.prefix,l=o(i,"multiBaseURL",this.baseURL),u=o(i,"multiPath",this.path),c=o(i,"prefix",this.prefix),d=o(i,"textureXhrSettings");l&&s.setBaseURL(l),u&&s.setPath(u),c&&s.setPrefix(c);for(var f=0;f{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=i(31053),u=new s({Extends:r,initialize:function(t,e,i,s,n){var a="glsl";if(h(e)){var l=e;e=o(l,"key"),i=o(l,"url"),s=o(l,"shaderType","fragment"),n=o(l,"xhrSettings"),a=o(l,"extension",a)}else void 0===s&&(s="fragment");var u={type:"glsl",cache:t.cacheManager.shader,extension:a,responseType:"text",key:e,url:i,config:{shaderType:s},xhrSettings:n};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.split("\n"),e=this.extractBlock(t,0);if(e)for(;e;){var i=this.getShaderName(e.header),s=this.getShaderType(e.header),n=this.getShaderUniforms(e.header),r=e.shader;if(this.cache.has(i)){var a=this.cache.get(i);"fragment"===s?a.fragmentSrc=r:a.vertexSrc=r,a.uniforms||(a.uniforms=n)}else"fragment"===s?this.cache.add(i,new l(i,r,"",n)):this.cache.add(i,new l(i,"",r,n));e=this.extractBlock(t,e.offset)}else"fragment"===this.config.shaderType?this.cache.add(this.key,new l(this.key,this.data)):this.cache.add(this.key,new l(this.key,"",this.data))},getShaderName:function(t){for(var e=0;e{var s=i(56694),n=i(683),r=i(98035),a=i(72632),o=i(30750),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){if(h(e)){var n=e;e=a(n,"key"),s=a(n,"config",s)}var o={type:"audio",cache:t.cacheManager.audio,extension:i.type,key:e,url:i.url,config:s};r.call(this,t,o),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="html";if(h(e)){var a=e;e=o(a,"key"),i=o(a,"url"),s=o(a,"xhrSettings"),n=o(a,"extension",n)}var l={type:"text",cache:t.cacheManager.html,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("html",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n,a){void 0===s&&(s=512),void 0===n&&(n=512);var l="html";if(h(e)){var u=e;e=o(u,"key"),i=o(u,"url"),a=o(u,"xhrSettings"),l=o(u,"extension",l),s=o(u,"width",s),n=o(u,"height",n)}var c={type:"html",cache:t.textureManager,extension:l,responseType:"text",key:e,url:i,xhrSettings:a,config:{width:s,height:n}};r.call(this,t,c)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this.config.width,e=this.config.height,i=[];i.push(''),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var s=[i.join("\n")],a=this;try{var o=new window.Blob(s,{type:"image/svg+xml;charset=utf-8"})}catch(t){return a.state=n.FILE_ERRORED,void a.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(a.data),a.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(a.data),a.onProcessError()},r.createObjectURL(this.data,o,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});a.register("htmlTexture",(function(t,e,i,s,n){if(Array.isArray(t))for(var r=0;r{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=i(30750),u=new s({Extends:r,initialize:function t(e,i,s,n,a){var l,u="png";if(h(i)){var c=i;i=o(c,"key"),s=o(c,"url"),l=o(c,"normalMap"),n=o(c,"xhrSettings"),u=o(c,"extension",u),a=o(c,"frameConfig")}Array.isArray(s)&&(l=s[1],s=s[0]);var d={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:s,xhrSettings:n,config:a};if(r.call(this,e,d),l){var f=new t(e,this.key,l,n,a);f.type="normalMap",this.setLink(f),e.addFile(f)}this.useImageElementLoad="HTMLImageElement"===e.imageLoadType,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){r.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(t.data),t.onProcessError()},r.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=n.FILE_PROCESSING,t===n.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){if(this.state=n.FILE_LOADING,this.src=l(this,this.loader.baseURL),0===this.src.indexOf("data:"))console.warn("Local data URIs are not supported: "+this.key);else{this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=n.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src}},addToCache:function(){var t=this.linkFile;t?t.state>=n.FILE_COMPLETE&&("normalMap"===this.type?this.cache.addImage(this.key,t.data,this.data):this.cache.addImage(this.key,this.data,t.data)):this.cache.addImage(this.key,this.data)}});a.register("image",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(10850),l=i(42911),u=new s({Extends:r,initialize:function(t,e,i,s,a){var u="json";if(l(e)){var c=e;e=o(c,"key"),i=o(c,"url"),s=o(c,"xhrSettings"),u=o(c,"extension",u),a=o(c,"dataKey",a)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:s,config:a};r.call(this,t,d),l(i)&&(this.data=a?h(i,a):i,this.state=n.FILE_POPULATED)},onProcess:function(){if(this.state!==n.FILE_POPULATED){this.state=n.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});a.register("json",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(72632),a=i(42927),o=i(42911),h=i(70806),l=i(45176),u=new s({Extends:l,initialize:function(t,e,i,s,n,a,u){if(o(e)){var c=e;e=r(c,"key"),i=r(c,"url",!1)?r(c,"url"):r(c,"atlasURL"),a=r(c,"xhrSettings"),s=r(c,"path"),n=r(c,"baseURL"),u=r(c,"textureXhrSettings")}var d=new h(t,e,i,a);l.call(this,t,"multiatlas",e,[d]),this.config.path=s,this.config.baseURL=n,this.config.textureXhrSettings=u},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"json"===t.type&&t.data.hasOwnProperty("textures"))){var e=t.data.textures,i=this.config,s=this.loader,n=s.baseURL,o=s.path,h=s.prefix,l=r(i,"baseURL",this.baseURL),u=r(i,"path",this.path),c=r(i,"prefix",this.prefix),d=r(i,"textureXhrSettings");s.setBaseURL(l),s.setPath(u),s.setPrefix(c);for(var f=0;f{var s=i(56694),n=i(76846),r=i(72632),a=i(42911),o=i(45176),h=i(55188),l=new s({Extends:o,initialize:function(t,e,i,s){var n="js",l=[];if(a(e)){var u=e;e=r(u,"key"),i=r(u,"url"),s=r(u,"xhrSettings"),n=r(u,"extension",n)}Array.isArray(i)||(i=[i]);for(var c=0;c{var s=i(56694),n=i(76846),r=i(72632),a=i(42911),o=i(45176),h=i(27291),l=i(76799),u=i(86897),c=new s({Extends:o,initialize:function(t,e,i,s,n,h){var l,c,d=t.cacheManager.obj;if(a(e)){var f=e;e=r(f,"key"),l=new u(t,{key:e,type:"obj",cache:d,url:r(f,"url"),extension:r(f,"extension","obj"),xhrSettings:r(f,"xhrSettings"),config:{flipUV:r(f,"flipUV",n)}}),(s=r(f,"matURL"))&&(c=new u(t,{key:e,type:"mat",cache:d,url:s,extension:r(f,"matExtension","mat"),xhrSettings:r(f,"xhrSettings")}))}else l=new u(t,{key:e,url:i,type:"obj",cache:d,extension:"obj",xhrSettings:h,config:{flipUV:n}}),s&&(c=new u(t,{key:e,url:s,type:"mat",cache:d,extension:"mat",xhrSettings:h}));o.call(this,t,"obj",e,[l,c])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=h(t.data,t.config.flipUV);e&&(i.materials=l(e.data)),t.cache.add(t.key,i),this.complete=!0}}});n.register("obj",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var a=0;a{var s=i(56694),n=i(12117),r=i(76846),a=i(70806),o=new s({Extends:a,initialize:function(t,e,i,s,n){a.call(this,t,e,i,s,n),this.type="packfile"},onProcess:function(){if(this.state!==n.FILE_POPULATED&&(this.state=n.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var t={};t[this.config]=this.data,this.data=t}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});r.register("pack",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,a,l){var u="js";if(h(e)){var c=e;e=o(c,"key"),i=o(c,"url"),l=o(c,"xhrSettings"),u=o(c,"extension",u),s=o(c,"start"),a=o(c,"mapping")}var d={type:"plugin",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:l,config:{start:s,mapping:a}};r.call(this,t,d),"function"==typeof i&&(this.data=i,this.state=n.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=o(e,"start",!1),s=o(e,"mapping",null);if(this.state===n.FILE_POPULATED)t.install(this.key,this.data,i,s);else{this.state=n.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var r=t.install(this.key,window[this.key],i,s);(i||s)&&(this.loader.systems[s]=r,this.loader.scene[s]=r)}this.onProcessComplete()}});a.register("plugin",(function(t,e,i,s,n){if(Array.isArray(t))for(var r=0;r{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n){var a="svg";if(h(e)){var l=e;e=o(l,"key"),i=o(l,"url"),s=o(l,"svgConfig",{}),n=o(l,"xhrSettings"),a=o(l,"extension",a)}var u={type:"svg",cache:t.textureManager,extension:a,responseType:"text",key:e,url:i,xhrSettings:n,config:{width:o(s,"width"),height:o(s,"height"),scale:o(s,"scale")}};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this.xhrLoader.responseText,e=[t],i=this.config.width,s=this.config.height,a=this.config.scale;t:if(i&&s||a){var o=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("svg")[0],h=o.hasAttribute("viewBox"),l=parseFloat(o.getAttribute("width")),u=parseFloat(o.getAttribute("height"));if(!h&&l&&u)o.setAttribute("viewBox","0 0 "+l+" "+u);else if(h&&!l&&!u){var c=o.getAttribute("viewBox").split(/\s+|,/);l=c[2],u=c[3]}if(a){if(!l||!u)break t;i=l*a,s=u*a}o.setAttribute("width",i.toString()+"px"),o.setAttribute("height",s.toString()+"px"),e=[(new XMLSerializer).serializeToString(o)]}try{var d=new window.Blob(e,{type:"image/svg+xml;charset=utf-8"})}catch(t){return void this.onProcessError()}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var f=this,p=!1;this.data.onload=function(){p||r.revokeObjectURL(f.data),f.onProcessComplete()},this.data.onerror=function(){p?f.onProcessError():(p=!0,r.revokeObjectURL(f.data),f.data.src="data:image/svg+xml,"+encodeURIComponent(e.join("")))},r.createObjectURL(this.data,d,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});a.register("svg",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="js";if(h(e)){var a=e;e=o(a,"key"),i=o(a,"url"),s=o(a,"xhrSettings"),n=o(a,"extension",n)}var l={type:"text",extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.concat("(function(){\nreturn new "+this.key+"();\n}).call(this);"),e=eval;this.loader.sceneManager.add(this.key,e(t)),this.complete=!0}});a.register("sceneFile",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,a,l){var u="js";if(h(e)){var c=e;e=o(c,"key"),i=o(c,"url"),l=o(c,"xhrSettings"),u=o(c,"extension",u),s=o(c,"systemKey"),a=o(c,"sceneKey")}var d={type:"scenePlugin",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:l,config:{systemKey:s,sceneKey:a}};r.call(this,t,d),"function"==typeof i&&(this.data=i,this.state=n.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=this.key,s=o(e,"systemKey",i),r=o(e,"sceneKey",i);this.state===n.FILE_POPULATED?t.installScenePlugin(s,this.data,r,this.loader.scene,!0):(this.state=n.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),t.installScenePlugin(s,window[this.key],r,this.loader.scene,!0)),this.onProcessComplete()}});a.register("scenePlugin",(function(t,e,i,s,n){if(Array.isArray(t))for(var r=0;r{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n){var a="js";if(h(e)){var l=e;e=o(l,"key"),i=o(l,"url"),s=o(l,"type","script"),n=o(l,"xhrSettings"),a=o(l,"extension",a)}else void 0===s&&(s="script");var u={type:s,cache:!1,extension:a,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});a.register("script",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(42927),a=new s({Extends:r,initialize:function(t,e,i,s,n){r.call(this,t,e,i,n,s),this.type="spritesheet"},addToCache:function(){this.cache.addSpriteSheet(this.key,this.data,this.config)}});n.register("spritesheet",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="text",a="txt",l=t.cacheManager.text;if(h(e)){var u=e;e=o(u,"key"),i=o(u,"url"),s=o(u,"xhrSettings"),a=o(u,"extension",a),n=o(u,"type",n),l=o(u,"cache",l)}var c={type:n,cache:l,extension:a,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,c)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("text",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=i(93560),u=new s({Extends:r,initialize:function(t,e,i,s){var n="csv";if(h(e)){var a=e;e=o(a,"key"),i=o(a,"url"),s=o(a,"xhrSettings"),n=o(a,"extension",n)}var u={type:"tilemapCSV",cache:t.cacheManager.tilemap,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,u),this.tilemapFormat=l.CSV},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,t)}});a.register("tilemapCSV",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(76846),r=i(70806),a=i(93560),o=new s({Extends:r,initialize:function(t,e,i,s){r.call(this,t,e,i,s),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:a.WELTMEISTER,data:this.data};this.cache.add(this.key,t)}});n.register("tilemapImpact",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(76846),r=i(70806),a=i(93560),o=new s({Extends:r,initialize:function(t,e,i,s){r.call(this,t,e,i,s),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:a.TILED_JSON,data:this.data};this.cache.add(this.key,t)}});n.register("tilemapTiledJSON",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(76846),r=i(72632),a=i(42927),o=i(42911),h=i(45176),l=i(86897),u=new s({Extends:h,initialize:function(t,e,i,s,n,u){var c,d;if(o(e)){var f=e;e=r(f,"key"),c=new a(t,{key:e,url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),d=new l(t,{key:e,url:r(f,"atlasURL"),extension:r(f,"atlasExtension","txt"),xhrSettings:r(f,"atlasXhrSettings")})}else c=new a(t,e,i,n),d=new l(t,e,s,u);c.linkFile?h.call(this,t,"unityatlas",e,[c,d,c.linkFile]):h.call(this,t,"unityatlas",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(t.key,t.data,e.data,i),this.complete=!0}}});n.register("unityAtlas",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var a=0;a{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(30750),h=i(72632),l=i(42911),u=new s({Extends:r,initialize:function(t,e,i,s,n,a,o){void 0===s&&(s="loadeddata"),void 0===n&&(n=!1),void 0===a&&(a=!1),"loadeddata"!==s&&"canplay"!==s&&"canplaythrough"!==s&&(s="loadeddata");var h={type:"video",cache:t.cacheManager.video,extension:i.type,responseType:"blob",key:e,url:i.url,xhrSettings:o,config:{loadEvent:s,asBlob:n,noAudio:a}};this.onLoadCallback=this.onVideoLoadHandler.bind(this),this.onErrorCallback=this.onVideoErrorHandler.bind(this),r.call(this,t,h)},onProcess:function(){if(this.state=n.FILE_PROCESSING,this.config.asBlob){var t=this.createVideoElement();this.data=t;var e=this;this.data.onloadeddata=function(){e.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(e.data),e.onProcessError()},r.createObjectURL(t,this.xhrLoader.response,""),t.load()}else this.onProcessComplete()},createVideoElement:function(){var t=document.createElement("video");return t.controls=!1,t.crossOrigin=this.loader.crossOrigin,this.config.noAudio&&(t.muted=!0,t.defaultMuted=!0,t.setAttribute("autoplay","autoplay")),t.setAttribute("playsinline","playsinline"),t.setAttribute("preload","auto"),t},onVideoLoadHandler:function(t){var e=t.target;e.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),e.removeEventListener("error",this.onErrorCallback,!0),this.data=e,this.resetXHR(),this.loader.nextFile(this,!0)},onVideoErrorHandler:function(t){var e=t.target;e&&(e.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),e.removeEventListener("error",this.onErrorCallback,!0)),this.resetXHR(),this.loader.nextFile(this,!1)},load:function(){var t=this.config.loadEvent;if(this.config.asBlob)r.prototype.load.call(this);else{this.percentComplete=0;var e=this.createVideoElement();e.addEventListener(t,this.onLoadCallback,!0),e.addEventListener("error",this.onErrorCallback,!0),e.src=o(this,this.loader.baseURL),e.load()}}});u.create=function(t,e,i,s,n,r,a){var o=t.systems.game;l(e)&&(i=h(e,"url",[]),s=h(e,"loadEvent","loadeddata"),n=h(e,"asBlob",!1),r=h(e,"noAudio",!1),a=h(e,"xhrSettings"),e=h(e,"key"));var c=u.getVideoURL(o,i);if(c)return new u(t,e,c,s,n,r,a)},u.getVideoURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=i(89200),u=new s({Extends:r,initialize:function(t,e,i,s){var n="xml";if(h(e)){var a=e;e=o(a,"key"),i=o(a,"url"),s=o(a,"xhrSettings"),n=o(a,"extension",n)}var l={type:"xml",cache:t.cacheManager.xml,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});a.register("xml",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{t.exports={AnimationJSONFile:i(46468),AsepriteFile:i(31648),AtlasJSONFile:i(73152),AtlasXMLFile:i(24616),AudioFile:i(67448),AudioSpriteFile:i(66109),BinaryFile:i(40612),BitmapFontFile:i(54565),CompressedTextureFile:i(47375),CSSFile:i(99898),GLSLFile:i(46568),HTML5AudioFile:i(30929),HTMLFile:i(77459),HTMLTextureFile:i(9755),ImageFile:i(42927),JSONFile:i(70806),MultiAtlasFile:i(80802),MultiScriptFile:i(39034),OBJFile:i(85527),PackFile:i(3616),PluginFile:i(12217),SceneFile:i(95171),ScenePluginFile:i(82458),ScriptFile:i(55188),SpriteSheetFile:i(33536),SVGFile:i(4474),TextFile:i(86897),TilemapCSVFile:i(58673),TilemapImpactFile:i(98896),TilemapJSONFile:i(50563),UnityAtlasFile:i(82857),VideoFile:i(22833),XMLFile:i(15297)}},95695:(t,e,i)=>{var s=i(12117),n=i(98611),r={Events:i(683),FileTypes:i(34034),File:i(98035),FileTypesManager:i(76846),GetURL:i(30750),LoaderPlugin:i(67285),MergeXHRSettings:i(43531),MultiFile:i(45176),XHRLoader:i(88490),XHRSettings:i(33868)};r=n(!1,r,s),t.exports=r},26042:t=>{t.exports=function(t){for(var e=0,i=0;i{var s=i(8034);t.exports=function(t,e){return s(t)/s(e)/s(t-e)}},17489:t=>{t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},14976:t=>{t.exports=function(t,e,i,s,n){var r=.5*(s-e),a=.5*(n-i),o=t*t;return(2*i-2*s+r+a)*(t*o)+(-3*i+3*s-2*r-a)*o+r*t+i}},89129:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.ceil(t*s)/s}},82897:t=>{t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},75606:(t,e,i)=>{var s=i(83392);t.exports=function(t){return t*s.DEG_TO_RAD}},767:t=>{t.exports=function(t,e){return Math.abs(t-e)}},9849:(t,e,i)=>{var s=i(82897),n=i(56694),r=i(16650),a=i(72283),o=new r,h=new n({initialize:function t(e,i,s,n){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=t.DefaultOrder),this._x=e,this._y=i,this._z=s,this._order=n,this.onChangeCallback=a},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,s){return void 0===s&&(s=this._order),this._x=t,this._y=e,this._z=i,this._order=s,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),o.fromQuat(t),this.setFromRotationMatrix(o,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var n=t.val,r=n[0],a=n[4],o=n[8],h=n[1],l=n[5],u=n[9],c=n[2],d=n[6],f=n[10],p=0,v=0,g=0,m=.99999;switch(e){case"XYZ":v=Math.asin(s(o,-1,1)),Math.abs(o){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},61616:t=>{t.exports=function(t,e){return Math.random()*(e-t)+t}},60679:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.floor(t*s)/s}},91806:(t,e,i)=>{var s=i(82897);t.exports=function(t,e,i){return(i-e)*(t=s(t,0,1))+e}},79366:t=>{t.exports=function(t,e){return t/e/1e3}},43776:t=>{t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},58442:t=>{t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},42798:t=>{t.exports=function(t,e,i){return(e-t)*i+t}},61072:t=>{t.exports=function(t,e,i){return void 0===i&&(i=0),t.clone().lerp(e,i)}},5341:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new s(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=s,this},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=l*r-a*h,c=-l*n+a*o,d=h*n-r*o,f=e*u+i*c+s*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+s*h)*f,t[2]=(a*i-s*r)*f,t[3]=c*f,t[4]=(l*e-s*o)*f,t[5]=(-a*e+s*n)*f,t[6]=d*f,t[7]=(-h*e+i*o)*f,t[8]=(r*e-i*n)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return t[0]=r*l-a*h,t[1]=s*h-i*l,t[2]=i*a-s*r,t[3]=a*o-n*l,t[4]=e*l-s*o,t[5]=s*n-e*a,t[6]=n*h-r*o,t[7]=i*o-e*h,t[8]=e*r-i*n,this},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return e*(l*r-a*h)+i*(-l*n+a*o)+s*(h*n-r*o)},multiply:function(t){var e=this.val,i=e[0],s=e[1],n=e[2],r=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],v=c[3],g=c[4],m=c[5],y=c[6],x=c[7],T=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*s+f*a+p*l,e[2]=d*n+f*o+p*u,e[3]=v*i+g*r+m*h,e[4]=v*s+g*a+m*l,e[5]=v*n+g*o+m*u,e[6]=y*i+x*r+T*h,e[7]=y*s+x*a+T*l,e[8]=y*n+x*o+T*u,this},translate:function(t){var e=this.val,i=t.x,s=t.y;return e[6]=i*e[0]+s*e[3]+e[6],e[7]=i*e[1]+s*e[4]+e[7],e[8]=i*e[2]+s*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],s=e[1],n=e[2],r=e[3],a=e[4],o=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*s+h*a,e[2]=l*n+h*o,e[3]=l*r-h*i,e[4]=l*a-h*s,e[5]=l*o-h*n,this},scale:function(t){var e=this.val,i=t.x,s=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=s*e[3],e[4]=s*e[4],e[5]=s*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,s=t.z,n=t.w,r=e+e,a=i+i,o=s+s,h=e*r,l=e*a,u=e*o,c=i*a,d=i*o,f=s*o,p=n*r,v=n*a,g=n*o,m=this.val;return m[0]=1-(c+f),m[3]=l+g,m[6]=u-v,m[1]=l-g,m[4]=1-(h+f),m[7]=d+p,m[2]=u+v,m[5]=d-p,m[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,s=e[0],n=e[1],r=e[2],a=e[3],o=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],v=e[12],g=e[13],m=e[14],y=e[15],x=s*h-n*o,T=s*l-r*o,w=s*u-a*o,E=n*l-r*h,S=n*u-a*h,b=r*u-a*l,A=c*g-d*v,_=c*m-f*v,C=c*y-p*v,R=d*m-f*g,M=d*y-p*g,P=f*y-p*m,O=x*P-T*M+w*R+E*C-S*_+b*A;return O?(O=1/O,i[0]=(h*P-l*M+u*R)*O,i[1]=(l*C-o*P-u*_)*O,i[2]=(o*M-h*C+u*A)*O,i[3]=(r*M-n*P-a*R)*O,i[4]=(s*P-r*C+a*_)*O,i[5]=(n*C-s*M-a*A)*O,i[6]=(g*b-m*S+y*E)*O,i[7]=(m*w-v*b-y*T)*O,i[8]=(v*S-g*w+y*x)*O,this):null}});t.exports=s},16650:(t,e,i)=>{var s=i(56694),n=i(70015),r=1e-6,a=new s({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new a(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,s,n,r,a,o,h,l,u,c,d,f,p,v){var g=this.val;return g[0]=t,g[1]=e,g[2]=i,g[3]=s,g[4]=n,g[5]=r,g[6]=a,g[7]=o,g[8]=h,g[9]=l,g[10]=u,g[11]=c,g[12]=d,g[13]=f,g[14]=p,g[15]=v,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var s=o.fromQuat(i).val,n=e.x,r=e.y,a=e.z;return this.setValues(s[0]*n,s[1]*n,s[2]*n,0,s[4]*r,s[5]*r,s[6]*r,0,s[8]*a,s[9]*a,s[10]*a,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var s=this.val;return s[12]=t,s[13]=e,s[14]=i,this},scaling:function(t,e,i){this.zero();var s=this.val;return s[0]=t,s[5]=e,s[10]=i,s[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[3],n=t[6],r=t[7],a=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=n,t[11]=t[14],t[12]=s,t[13]=r,t[14]=a,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],v=t[14],g=t[15],m=e*a-i*r,y=e*o-s*r,x=e*h-n*r,T=i*o-s*a,w=i*h-n*a,E=s*h-n*o,S=l*p-u*f,b=l*v-c*f,A=l*g-d*f,_=u*v-c*p,C=u*g-d*p,R=c*g-d*v,M=m*R-y*C+x*_+T*A-w*b+E*S;return M?(M=1/M,this.setValues((a*R-o*C+h*_)*M,(s*C-i*R-n*_)*M,(p*E-v*w+g*T)*M,(c*w-u*E-d*T)*M,(o*A-r*R-h*b)*M,(e*R-s*A+n*b)*M,(v*x-f*E-g*y)*M,(l*E-c*x+d*y)*M,(r*C-a*A+h*S)*M,(i*A-e*C-n*S)*M,(f*w-p*x+g*m)*M,(u*x-l*w-d*m)*M,(a*b-r*_-o*S)*M,(e*_-i*b+s*S)*M,(p*y-f*T-v*m)*M,(l*T-u*y+c*m)*M)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],v=t[14],g=t[15];return this.setValues(a*(c*g-d*v)-u*(o*g-h*v)+p*(o*d-h*c),-(i*(c*g-d*v)-u*(s*g-n*v)+p*(s*d-n*c)),i*(o*g-h*v)-a*(s*g-n*v)+p*(s*h-n*o),-(i*(o*d-h*c)-a*(s*d-n*c)+u*(s*h-n*o)),-(r*(c*g-d*v)-l*(o*g-h*v)+f*(o*d-h*c)),e*(c*g-d*v)-l*(s*g-n*v)+f*(s*d-n*c),-(e*(o*g-h*v)-r*(s*g-n*v)+f*(s*h-n*o)),e*(o*d-h*c)-r*(s*d-n*c)+l*(s*h-n*o),r*(u*g-d*p)-l*(a*g-h*p)+f*(a*d-h*u),-(e*(u*g-d*p)-l*(i*g-n*p)+f*(i*d-n*u)),e*(a*g-h*p)-r*(i*g-n*p)+f*(i*h-n*a),-(e*(a*d-h*u)-r*(i*d-n*u)+l*(i*h-n*a)),-(r*(u*v-c*p)-l*(a*v-o*p)+f*(a*c-o*u)),e*(u*v-c*p)-l*(i*v-s*p)+f*(i*c-s*u),-(e*(a*v-o*p)-r*(i*v-s*p)+f*(i*o-s*a)),e*(a*c-o*u)-r*(i*c-s*u)+l*(i*o-s*a))},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],v=t[14],g=t[15];return(e*a-i*r)*(c*g-d*v)-(e*o-s*r)*(u*g-d*p)+(e*h-n*r)*(u*v-c*p)+(i*o-s*a)*(l*g-d*f)-(i*h-n*a)*(l*v-c*f)+(s*h-n*o)*(l*p-u*f)},multiply:function(t){var e=this.val,i=e[0],s=e[1],n=e[2],r=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],v=e[13],g=e[14],m=e[15],y=t.val,x=y[0],T=y[1],w=y[2],E=y[3];return e[0]=x*i+T*a+w*u+E*p,e[1]=x*s+T*o+w*c+E*v,e[2]=x*n+T*h+w*d+E*g,e[3]=x*r+T*l+w*f+E*m,x=y[4],T=y[5],w=y[6],E=y[7],e[4]=x*i+T*a+w*u+E*p,e[5]=x*s+T*o+w*c+E*v,e[6]=x*n+T*h+w*d+E*g,e[7]=x*r+T*l+w*f+E*m,x=y[8],T=y[9],w=y[10],E=y[11],e[8]=x*i+T*a+w*u+E*p,e[9]=x*s+T*o+w*c+E*v,e[10]=x*n+T*h+w*d+E*g,e[11]=x*r+T*l+w*f+E*m,x=y[12],T=y[13],w=y[14],E=y[15],e[12]=x*i+T*a+w*u+E*p,e[13]=x*s+T*o+w*c+E*v,e[14]=x*n+T*h+w*d+E*g,e[15]=x*r+T*l+w*f+E*m,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,s=e.val,n=i[0],r=i[4],a=i[8],o=i[12],h=i[1],l=i[5],u=i[9],c=i[13],d=i[2],f=i[6],p=i[10],v=i[14],g=i[3],m=i[7],y=i[11],x=i[15],T=s[0],w=s[4],E=s[8],S=s[12],b=s[1],A=s[5],_=s[9],C=s[13],R=s[2],M=s[6],P=s[10],O=s[14],L=s[3],F=s[7],D=s[11],k=s[15];return this.setValues(n*T+r*b+a*R+o*L,h*T+l*b+u*R+c*L,d*T+f*b+p*R+v*L,g*T+m*b+y*R+x*L,n*w+r*A+a*M+o*F,h*w+l*A+u*M+c*F,d*w+f*A+p*M+v*F,g*w+m*A+y*M+x*F,n*E+r*_+a*P+o*D,h*E+l*_+u*P+c*D,d*E+f*_+p*P+v*D,g*E+m*_+y*P+x*D,n*S+r*C+a*O+o*k,h*S+l*C+u*O+c*k,d*S+f*C+p*O+v*k,g*S+m*C+y*O+x*k)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var s=this.val;return s[12]=s[0]*t+s[4]*e+s[8]*i+s[12],s[13]=s[1]*t+s[5]*e+s[9]*i+s[13],s[14]=s[2]*t+s[6]*e+s[10]*i+s[14],s[15]=s[3]*t+s[7]*e+s[11]*i+s[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var s=this.val;return s[0]=s[0]*t,s[1]=s[1]*t,s[2]=s[2]*t,s[3]=s[3]*t,s[4]=s[4]*e,s[5]=s[5]*e,s[6]=s[6]*e,s[7]=s[7]*e,s[8]=s[8]*i,s[9]=s[9]*i,s[10]=s[10]*i,s[11]=s[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),s=Math.sin(e),n=1-i,r=t.x,a=t.y,o=t.z,h=n*r,l=n*a;return this.setValues(h*r+i,h*a-s*o,h*o+s*a,0,h*a+s*o,l*a+i,l*o-s*r,0,h*o-s*a,l*o+s*r,n*o*o+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,s=e.x,n=e.y,a=e.z,o=Math.sqrt(s*s+n*n+a*a);if(Math.abs(o){t.exports=function(t,e,i){return Math.min(t+e,i)}},37394:t=>{t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort((function(t,e){return t-e}));var i=Math.floor(e/2);return e%2==0?(t[i]+t[i-1])/2:t[i]}},17259:t=>{t.exports=function(t,e,i){return Math.max(t-e,i)}},61820:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=e+1);var n=(t-e)/(i-e);return n>1?void 0!==s?(n=(s-t)/(s-i))<0&&(n=0):n=1:n<0&&(n=0),n}},75003:(t,e,i)=>{var s=i(56694),n=i(5341),r=i(72283),a=i(70015),o=1e-6,h=new Int8Array([1,2,0]),l=new Float32Array([0,0,0]),u=new a(1,0,0),c=new a(0,1,0),d=new a,f=new n,p=new s({initialize:function(t,e,i,s){this.onChangeCallback=r,this.set(t,e,i,s)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,s,n){return void 0===n&&(n=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=s||0),n&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,n=t*t+e*e+i*i+s*s;return n>0&&(n=1/Math.sqrt(n),this._x=t*n,this._y=e*n,this._z=i*n,this._w=s*n),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,n=this.z,r=this.w;return this.set(i+e*(t.x-i),s+e*(t.y-s),n+e*(t.z-n),r+e*(t.w-r))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(d.copy(u).cross(t).length().999999?this.set(0,0,0,1):(d.copy(t).cross(e),this._x=d.x,this._y=d.y,this._z=d.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var s=f.val;return s[0]=e.x,s[3]=e.y,s[6]=e.z,s[1]=i.x,s[4]=i.y,s[7]=i.z,s[2]=-t.x,s[5]=-t.y,s[8]=-t.z,this.fromMat3(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,s=this.z,n=this.w,r=t.x,a=t.y,o=t.z,h=t.w;return this.set(e*h+n*r+i*o-s*a,i*h+n*a+s*r-e*o,s*h+n*o+e*a-i*r,n*h-e*r-i*a-s*o)},slerp:function(t,e){var i=this.x,s=this.y,n=this.z,r=this.w,a=t.x,h=t.y,l=t.z,u=t.w,c=i*a+s*h+n*l+r*u;c<0&&(c=-c,a=-a,h=-h,l=-l,u=-u);var d=1-e,f=e;if(1-c>o){var p=Math.acos(c),v=Math.sin(p);d=Math.sin((1-e)*p)/v,f=Math.sin(e*p)/v}return this.set(d*i+f*a,d*s+f*h,d*n+f*l,d*r+f*u)},invert:function(){var t=this.x,e=this.y,i=this.z,s=this.w,n=t*t+e*e+i*i+s*s,r=n?1/n:0;return this.set(-t*r,-e*r,-i*r,s*r)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,n=this.w,r=Math.sin(t),a=Math.cos(t);return this.set(e*a+n*r,i*a+s*r,s*a-i*r,n*a-e*r)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,n=this.w,r=Math.sin(t),a=Math.cos(t);return this.set(e*a-s*r,i*a+n*r,s*a+e*r,n*a-i*r)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,n=this.w,r=Math.sin(t),a=Math.cos(t);return this.set(e*a+i*r,i*a-e*r,s*a+n*r,n*a-s*r)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,s=t.y/2,n=t.z/2,r=Math.cos(i),a=Math.cos(s),o=Math.cos(n),h=Math.sin(i),l=Math.sin(s),u=Math.sin(n);switch(t.order){case"XYZ":this.set(h*a*o+r*l*u,r*l*o-h*a*u,r*a*u+h*l*o,r*a*o-h*l*u,e);break;case"YXZ":this.set(h*a*o+r*l*u,r*l*o-h*a*u,r*a*u-h*l*o,r*a*o+h*l*u,e);break;case"ZXY":this.set(h*a*o-r*l*u,r*l*o+h*a*u,r*a*u+h*l*o,r*a*o-h*l*u,e);break;case"ZYX":this.set(h*a*o-r*l*u,r*l*o+h*a*u,r*a*u-h*l*o,r*a*o+h*l*u,e);break;case"YZX":this.set(h*a*o+r*l*u,r*l*o+h*a*u,r*a*u-h*l*o,r*a*o-h*l*u,e);break;case"XZY":this.set(h*a*o-r*l*u,r*l*o-h*a*u,r*a*u+h*l*o,r*a*o+h*l*u,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,s=i[0],n=i[4],r=i[8],a=i[1],o=i[5],h=i[9],l=i[2],u=i[6],c=i[10],d=s+o+c;return d>0?(e=.5/Math.sqrt(d+1),this.set((u-h)*e,(r-l)*e,(a-n)*e,.25/e)):s>o&&s>c?(e=2*Math.sqrt(1+s-o-c),this.set(.25*e,(n+a)/e,(r+l)/e,(u-h)/e)):o>c?(e=2*Math.sqrt(1+o-s-c),this.set((n+a)/e,.25*e,(h+u)/e,(r-l)/e)):(e=2*Math.sqrt(1+c-s-o),this.set((r+l)/e,(h+u)/e,.25*e,(a-n)/e)),this},fromMat3:function(t){var e,i=t.val,s=i[0]+i[4]+i[8];if(s>0)e=Math.sqrt(s+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var n=0;i[4]>i[0]&&(n=1),i[8]>i[3*n+n]&&(n=2);var r=h[n],a=h[r];e=Math.sqrt(i[3*n+n]-i[3*r+r]-i[3*a+a]+1),l[n]=.5*e,e=.5/e,l[r]=(i[3*r+n]+i[3*n+r])*e,l[a]=(i[3*a+n]+i[3*n+a])*e,this._x=l[0],this._y=l[1],this._z=l[2],this._w=(i[3*a+r]-i[3*r+a])*e}return this.onChangeCallback(this),this}});t.exports=p},23701:(t,e,i)=>{var s=i(83392);t.exports=function(t){return t*s.RAD_TO_DEG}},16906:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},52417:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,s=2*Math.random()-1,n=Math.sqrt(1-s*s)*e;return t.x=Math.cos(i)*n,t.y=Math.sin(i)*n,t.z=s*e,t}},17915:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},52257:t=>{t.exports=function(t,e){var i=t.x,s=t.y;return t.x=i*Math.cos(e)-s*Math.sin(e),t.y=i*Math.sin(e)+s*Math.cos(e),t}},2386:t=>{t.exports=function(t,e,i,s){var n=Math.cos(s),r=Math.sin(s),a=t.x-e,o=t.y-i;return t.x=a*n-o*r+e,t.y=a*r+o*n+i,t}},72395:t=>{t.exports=function(t,e,i,s,n){var r=s+Math.atan2(t.y-i,t.x-e);return t.x=e+n*Math.cos(r),t.y=i+n*Math.sin(r),t}},41061:t=>{t.exports=function(t,e,i,s,n){return t.x=e+n*Math.cos(s),t.y=i+n*Math.sin(s),t}},93709:(t,e,i)=>{var s=i(70015),n=i(16650),r=i(75003),a=new n,o=new r,h=new s;t.exports=function(t,e,i){return o.setAxisAngle(e,i),a.fromRotationTranslation(o,h.set(0,0,0)),t.transformMat4(a)}},67233:t=>{t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},64333:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.round(t*s)/s}},59533:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=1),s*=Math.PI/t;for(var n=[],r=[],a=0;a{t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},87736:t=>{t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},55805:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n){void 0===n&&(n=new s);var r=0,a=0;return t>0&&t<=e*i&&(r=t>e-1?t-(a=Math.floor(t/e))*e:t),n.set(r,a)}},64462:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,a,o,h){void 0===h&&(h=new s);var l=Math.sin(r),u=Math.cos(r),c=u*a,d=l*a,f=-l*o,p=u*o,v=1/(c*p+f*-d);return h.x=p*v*t+-f*v*e+(n*f-i*p)*v,h.y=c*v*e+-d*v*t+(-n*c+i*d)*v,h}},93736:(t,e,i)=>{var s=i(56694),n=i(88456),r=new s({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new r(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return n(this.x,t.x,e)&&n(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this},transformMat3:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[3]*i+s[6],this.y=s[1]*e+s[4]*i+s[7],this},transformMat4:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[4]*i+s[12],this.y=s[1]*e+s[5]*i+s[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)},project:function(t){var e=this.dot(t)/t.dot(t);return this.copy(t).scale(e)}});r.ZERO=new r,r.RIGHT=new r(1,0),r.LEFT=new r(-1,0),r.UP=new r(0,-1),r.DOWN=new r(0,1),r.ONE=new r(1,1),t.exports=r},70015:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new s(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var i=t.x,s=t.y,n=t.z,r=e.x,a=e.y,o=e.z;return this.x=s*o-n*a,this.y=n*r-i*o,this.z=i*a-s*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return Math.sqrt(e*e+i*i+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return e*e+i*i+s*s},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,s=t*t+e*e+i*i;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,s=this.z,n=t.x,r=t.y,a=t.z;return this.x=i*a-s*r,this.y=s*n-e*a,this.z=e*r-i*n,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,n=this.z;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=n+e*(t.z-n),this},applyMatrix3:function(t){var e=this.x,i=this.y,s=this.z,n=t.val;return this.x=n[0]*e+n[3]*i+n[6]*s,this.y=n[1]*e+n[4]*i+n[7]*s,this.z=n[2]*e+n[5]*i+n[8]*s,this},applyMatrix4:function(t){var e=this.x,i=this.y,s=this.z,n=t.val,r=1/(n[3]*e+n[7]*i+n[11]*s+n[15]);return this.x=(n[0]*e+n[4]*i+n[8]*s+n[12])*r,this.y=(n[1]*e+n[5]*i+n[9]*s+n[13])*r,this.z=(n[2]*e+n[6]*i+n[10]*s+n[14])*r,this},transformMat3:function(t){var e=this.x,i=this.y,s=this.z,n=t.val;return this.x=e*n[0]+i*n[3]+s*n[6],this.y=e*n[1]+i*n[4]+s*n[7],this.z=e*n[2]+i*n[5]+s*n[8],this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,n=t.val;return this.x=n[0]*e+n[4]*i+n[8]*s+n[12],this.y=n[1]*e+n[5]*i+n[9]*s+n[13],this.z=n[2]*e+n[6]*i+n[10]*s+n[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,s=this.z,n=t.val,r=e*n[0]+i*n[4]+s*n[8]+n[12],a=e*n[1]+i*n[5]+s*n[9]+n[13],o=e*n[2]+i*n[6]+s*n[10]+n[14],h=e*n[3]+i*n[7]+s*n[11]+n[15];return this.x=r/h,this.y=a/h,this.z=o/h,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,n=t.x,r=t.y,a=t.z,o=t.w,h=o*e+r*s-a*i,l=o*i+a*e-n*s,u=o*s+n*i-r*e,c=-n*e-r*i-a*s;return this.x=h*o+c*-n+l*-a-u*-r,this.y=l*o+c*-r+u*-n-h*-a,this.z=u*o+c*-a+h*-r-l*-n,this},project:function(t){var e=this.x,i=this.y,s=this.z,n=t.val,r=n[0],a=n[1],o=n[2],h=n[3],l=n[4],u=n[5],c=n[6],d=n[7],f=n[8],p=n[9],v=n[10],g=n[11],m=n[12],y=n[13],x=n[14],T=1/(e*h+i*d+s*g+n[15]);return this.x=(e*r+i*l+s*f+m)*T,this.y=(e*a+i*u+s*p+y)*T,this.z=(e*o+i*c+s*v+x)*T,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,s=t.y,n=t.z,r=t.w,a=this.x-i,o=r-this.y-1-s,h=this.z;return this.x=2*a/n-1,this.y=2*o/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});s.ZERO=new s,s.RIGHT=new s(1,0,0),s.LEFT=new s(-1,0,0),s.UP=new s(0,-1,0),s.DOWN=new s(0,1,0),s.FORWARD=new s(0,0,1),s.BACK=new s(0,0,-1),s.ONE=new s(1,1,1),t.exports=s},51729:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0)},clone:function(){return new s(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,s){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,n=t*t+e*e+i*i+s*s;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n,this.w=s*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,n=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=n+e*(t.z-n),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,n=t.w-this.w||0;return Math.sqrt(e*e+i*i+s*s+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,n=t.w-this.w||0;return e*e+i*i+s*s+n*n},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,n=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*s+r[12]*n,this.y=r[1]*e+r[5]*i+r[9]*s+r[13]*n,this.z=r[2]*e+r[6]*i+r[10]*s+r[14]*n,this.w=r[3]*e+r[7]*i+r[11]*s+r[15]*n,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,n=t.x,r=t.y,a=t.z,o=t.w,h=o*e+r*s-a*i,l=o*i+a*e-n*s,u=o*s+n*i-r*e,c=-n*e-r*i-a*s;return this.x=h*o+c*-n+l*-a-u*-r,this.y=l*o+c*-r+u*-n-h*-a,this.z=u*o+c*-a+h*-r-l*-n,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});s.prototype.sub=s.prototype.subtract,s.prototype.mul=s.prototype.multiply,s.prototype.div=s.prototype.divide,s.prototype.dist=s.prototype.distance,s.prototype.distSq=s.prototype.distanceSq,s.prototype.len=s.prototype.length,s.prototype.lenSq=s.prototype.lengthSq,t.exports=s},9557:t=>{t.exports=function(t,e,i){return Math.abs(t-e)<=i}},1071:t=>{t.exports=function(t,e,i){var s=i-e;return e+((t-e)%s+s)%s}},90447:t=>{t.exports=function(t,e,i,s){return Math.atan2(s-e,i-t)}},94240:t=>{t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},84066:t=>{t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},9678:t=>{t.exports=function(t,e,i,s){return Math.atan2(i-t,s-e)}},76861:(t,e,i)=>{var s=i(83392);t.exports=function(t){return t>Math.PI&&(t-=s.PI2),Math.abs(((t+s.TAU)%s.PI2-s.PI2)%s.PI2)}},37570:t=>{t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},87597:(t,e,i)=>{var s=i(61616);t.exports=function(){return s(-Math.PI,Math.PI)}},74493:(t,e,i)=>{var s=i(61616);t.exports=function(){return s(-180,180)}},19049:(t,e,i)=>{var s=i(37570);t.exports=function(t){return s(t+Math.PI)}},90612:(t,e,i)=>{var s=i(83392);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=s.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e{t.exports=function(t,e){var i=e-t;return 0===i?0:i-360*Math.floor((i- -180)/360)}},35786:(t,e,i)=>{var s=i(1071);t.exports=function(t){return s(t,-Math.PI,Math.PI)}},62138:(t,e,i)=>{var s=i(1071);t.exports=function(t){return s(t,-180,180)}},22153:(t,e,i)=>{t.exports={Between:i(90447),BetweenPoints:i(94240),BetweenPointsY:i(84066),BetweenY:i(9678),CounterClockwise:i(76861),Normalize:i(37570),Random:i(87597),RandomDegrees:i(74493),Reverse:i(19049),RotateTo:i(90612),ShortestBetween:i(93954),Wrap:i(35786),WrapDegrees:i(62138)}},83392:t=>{var e={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=e},53996:t=>{t.exports=function(t,e,i,s){var n=t-i,r=e-s;return Math.sqrt(n*n+r*r)}},92951:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return Math.sqrt(i*i+s*s)}},12161:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return i*i+s*s}},38057:t=>{t.exports=function(t,e,i,s){return Math.max(Math.abs(t-i),Math.abs(e-s))}},33297:t=>{t.exports=function(t,e,i,s,n){return void 0===n&&(n=2),Math.sqrt(Math.pow(i-t,n)+Math.pow(s-e,n))}},90366:t=>{t.exports=function(t,e,i,s){return Math.abs(t-i)+Math.abs(e-s)}},35032:t=>{t.exports=function(t,e,i,s){var n=t-i,r=e-s;return n*n+r*r}},10130:(t,e,i)=>{t.exports={Between:i(53996),BetweenPoints:i(92951),BetweenPointsSquared:i(12161),Chebyshev:i(38057),Power:i(33297),Snake:i(90366),Squared:i(35032)}},35060:(t,e,i)=>{var s=i(25265),n=i(57428),r=i(73214),a=i(71778),o=i(36468),h=i(88258),l=i(52910),u=i(67799),c=i(74083),d=i(92284),f=i(28035),p=i(8754);t.exports={Power0:l,Power1:u.Out,Power2:a.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:a.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:o.Out,Back:s.Out,Bounce:n.Out,Stepped:p,"Quad.easeIn":u.In,"Cubic.easeIn":a.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":o.In,"Back.easeIn":s.In,"Bounce.easeIn":n.In,"Quad.easeOut":u.Out,"Cubic.easeOut":a.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":o.Out,"Back.easeOut":s.Out,"Bounce.easeOut":n.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":a.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":o.InOut,"Back.easeInOut":s.InOut,"Bounce.easeInOut":n.InOut}},25860:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},45264:t=>{t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},36699:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},25265:(t,e,i)=>{t.exports={In:i(25860),Out:i(36699),InOut:i(45264)}},62191:t=>{t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},24799:t=>{t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},60819:t=>{t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},57428:(t,e,i)=>{t.exports={In:i(62191),Out:i(60819),InOut:i(24799)}},86855:t=>{t.exports=function(t){return 1-Math.sqrt(1-t*t)}},7280:t=>{t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},18058:t=>{t.exports=function(t){return Math.sqrt(1- --t*t)}},73214:(t,e,i)=>{t.exports={In:i(86855),Out:i(18058),InOut:i(7280)}},91532:t=>{t.exports=function(t){return t*t*t}},63180:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},16518:t=>{t.exports=function(t){return--t*t*t+1}},71778:(t,e,i)=>{t.exports={In:i(91532),Out:i(16518),InOut:i(63180)}},24729:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)}},50325:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*.5+1}},84074:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-s)*(2*Math.PI)/i)+1}},36468:(t,e,i)=>{t.exports={In:i(24729),Out:i(84074),InOut:i(50325)}},95638:t=>{t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},10357:t=>{t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},14894:t=>{t.exports=function(t){return 1-Math.pow(2,-10*t)}},88258:(t,e,i)=>{t.exports={In:i(95638),Out:i(14894),InOut:i(10357)}},33063:(t,e,i)=>{t.exports={Back:i(25265),Bounce:i(57428),Circular:i(73214),Cubic:i(71778),Elastic:i(36468),Expo:i(88258),Linear:i(52910),Quadratic:i(67799),Quartic:i(74083),Quintic:i(92284),Sine:i(28035),Stepped:i(8754)}},43927:t=>{t.exports=function(t){return t}},52910:(t,e,i)=>{t.exports=i(43927)},77471:t=>{t.exports=function(t){return t*t}},83863:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},44383:t=>{t.exports=function(t){return t*(2-t)}},67799:(t,e,i)=>{t.exports={In:i(77471),Out:i(44383),InOut:i(83863)}},48311:t=>{t.exports=function(t){return t*t*t*t}},55248:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},23135:t=>{t.exports=function(t){return 1- --t*t*t*t}},74083:(t,e,i)=>{t.exports={In:i(48311),Out:i(23135),InOut:i(55248)}},7313:t=>{t.exports=function(t){return t*t*t*t*t}},98759:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},26670:t=>{t.exports=function(t){return--t*t*t*t*t+1}},92284:(t,e,i)=>{t.exports={In:i(7313),Out:i(26670),InOut:i(98759)}},52929:t=>{t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},66333:t=>{t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},37255:t=>{t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},28035:(t,e,i)=>{t.exports={In:i(52929),Out:i(37255),InOut:i(66333)}},52770:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},8754:(t,e,i)=>{t.exports=i(52770)},17247:t=>{t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},88456:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},41935:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},54726:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t{t.exports={Ceil:i(17247),Equal:i(88456),Floor:i(61824),GreaterThan:i(41935),LessThan:i(54726)}},5923:(t,e,i)=>{var s=i(83392),n=i(98611),r={Angle:i(22153),Distance:i(10130),Easing:i(33063),Fuzzy:i(52778),Interpolation:i(48528),Pow2:i(73773),Snap:i(23679),RandomDataGenerator:i(81429),Average:i(26042),Bernstein:i(22824),Between:i(17489),CatmullRom:i(14976),CeilTo:i(89129),Clamp:i(82897),DegToRad:i(75606),Difference:i(767),Euler:i(9849),Factorial:i(8034),FloatBetween:i(61616),FloorTo:i(60679),FromPercent:i(91806),GetSpeed:i(79366),IsEven:i(43776),IsEvenStrict:i(58442),Linear:i(42798),LinearXY:i(61072),MaxAdd:i(69635),Median:i(37394),MinSub:i(17259),Percent:i(61820),RadToDeg:i(23701),RandomXY:i(16906),RandomXYZ:i(52417),RandomXYZW:i(17915),Rotate:i(52257),RotateAround:i(2386),RotateAroundDistance:i(72395),RotateTo:i(41061),RoundAwayFromZero:i(67233),RoundTo:i(64333),SinCosTableGenerator:i(59533),SmootherStep:i(87736),SmoothStep:i(5514),ToXY:i(55805),TransformXY:i(64462),Within:i(9557),Wrap:i(1071),Vector2:i(93736),Vector3:i(70015),Vector4:i(51729),Matrix3:i(5341),Matrix4:i(16650),Quaternion:i(75003),RotateVec3:i(93709)};r=n(!1,r,s),t.exports=r},63210:(t,e,i)=>{var s=i(22824);t.exports=function(t,e){for(var i=0,n=t.length-1,r=0;r<=n;r++)i+=Math.pow(1-e,n-r)*Math.pow(e,r)*t[r]*s(n,r);return i}},88332:(t,e,i)=>{var s=i(14976);t.exports=function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n);return t[0]===t[i]?(e<0&&(r=Math.floor(n=i*(1+e))),s(n-r,t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i])):e<0?t[0]-(s(-n,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(s(n-i,t[i],t[i],t[i-1],t[i-1])-t[i]):s(n-r,t[r?r-1:0],t[r],t[i{t.exports=function(t,e,i,s,n){return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,s)+function(t,e){return t*t*t*e}(t,n)}},47614:(t,e,i)=>{var s=i(42798);t.exports=function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n);return e<0?s(t[0],t[1],n):e>1?s(t[i],t[i-1],i-n):s(t[r],t[r+1>i?i:r+1],n-r)}},16252:t=>{t.exports=function(t,e,i,s){return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,s)}},44521:(t,e,i)=>{var s=i(5514);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},45507:(t,e,i)=>{var s=i(87736);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},48528:(t,e,i)=>{t.exports={Bezier:i(63210),CatmullRom:i(88332),CubicBezier:i(34631),Linear:i(47614),QuadraticBezier:i(16252),SmoothStep:i(44521),SmootherStep:i(45507)}},3504:t=>{t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<{t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},2018:t=>{t.exports=function(t){return t>0&&0==(t&t-1)}},73773:(t,e,i)=>{t.exports={GetNext:i(3504),IsSize:i(28621),IsValue:i(2018)}},81429:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),s=t[i];t[i]=t[e],t[e]=s}return t}});t.exports=s},82127:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),s?(i+t)/e:i+t)}},84314:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),s?(i+t)/e:i+t)}},88462:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),s?(i+t)/e:i+t)}},23679:(t,e,i)=>{t.exports={Ceil:i(82127),Floor:i(84314),To:i(88462)}},85780:(t,e,i)=>{var s=i(86459),n=i(98611),r={Actions:i(83979),Animations:i(13517),BlendModes:i(95723),Cache:i(45820),Cameras:i(44143),Core:i(80293),Class:i(56694),Create:i(84106),Curves:i(73962),Data:i(1999),Display:i(24816),DOM:i(3590),Events:i(95146),Game:i(15213),GameObjects:i(48013),Geom:i(84068),Input:i(20873),Loader:i(95695),Math:i(5923),Physics:{Arcade:i(39977)},Plugins:i(45615),Renderer:i(42069),Scale:i(86754),ScaleModes:i(27394),Scene:i(87157),Scenes:i(20436),Structs:i(20010),Textures:i(87499),Tilemaps:i(52678),Time:i(97121),Tweens:i(75193),Utils:i(22178)};r.Sound=i(56751),r=n(!1,r,s),t.exports=r,i.g.Phaser=r},62832:(t,e,i)=>{var s=i(56694),n=i(7864),r=i(1539),a=new s({Extends:r,Mixins:[n.Acceleration,n.Angular,n.Bounce,n.Debug,n.Drag,n.Enable,n.Friction,n.Gravity,n.Immovable,n.Mass,n.Pushable,n.Size,n.Velocity],initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.body=null}});t.exports=a},66150:(t,e,i)=>{var s=i(56694),n=i(75606),r=i(53996),a=i(35032),o=i(99523),h=i(72632),l=i(30657),u=i(2732),c=i(15147),d=i(91963),f=i(7599),p=i(93736),v=i(85233),g=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,t.sys.events.once(f.BOOT,this.boot,this),t.sys.events.on(f.START,this.start,this)},boot:function(){this.world=new v(this.scene,this.config),this.add=new o(this.world),this.systems.events.once(f.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new v(this.scene,this.config),this.add=new o(this.world));var t=this.systems.events;h(this.config,"customUpdate",!1)||t.on(f.UPDATE,this.world.update,this.world),t.on(f.POST_UPDATE,this.world.postUpdate,this.world),t.once(f.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(f.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(f.UPDATE,this.world.update,this.world)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return l(h(e,"arcade",{}),h(t,"arcade",{}))},overlap:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.world.collideObjects(t,e,i,s,n,!0)},collide:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.world.collideObjects(t,e,i,s,n,!1)},collideTiles:function(t,e,i,s,n){return this.world.collideTiles(t,e,i,s,n)},overlapTiles:function(t,e,i,s,n){return this.world.overlapTiles(t,e,i,s,n)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(t,e,i,s,n,r){void 0===s&&(s=60);var a=Math.atan2(i-t.y,e-t.x);return t.body.acceleration.setToPolar(a,s),void 0!==n&&void 0!==r&&t.body.maxVelocity.set(n,r),a},accelerateToObject:function(t,e,i,s,n){return this.accelerateTo(t,e.x,e.y,i,s,n)},closest:function(t,e){e||(e=this.world.bodies.entries);for(var i=Number.MAX_VALUE,s=null,n=t.x,r=t.y,o=e.length,h=0;hi&&(s=l,i=c)}}return s},moveTo:function(t,e,i,s,n){void 0===s&&(s=60),void 0===n&&(n=0);var a=Math.atan2(i-t.y,e-t.x);return n>0&&(s=r(t.x,t.y,e,i)/(n/1e3)),t.body.velocity.setToPolar(a,s),a},moveToObject:function(t,e,i,s){return this.moveTo(t,e.x,e.y,i,s)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(n(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(t,e)},overlapRect:function(t,e,i,s,n,r){return c(this.world,t,e,i,s,n,r)},overlapCirc:function(t,e,i,s,n){return u(this.world,t,e,i,s,n)},shutdown:function(){if(this.world){var t=this.systems.events;t.off(f.UPDATE,this.world.update,this.world),t.off(f.POST_UPDATE,this.world.postUpdate,this.world),t.off(f.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null}},destroy:function(){this.shutdown(),this.scene.sys.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});d.register("ArcadePhysics",g,"arcadePhysics"),t.exports=g},25084:(t,e,i)=>{var s=i(56694),n=i(7864),r=i(13747),a=new s({Extends:r,Mixins:[n.Acceleration,n.Angular,n.Bounce,n.Debug,n.Drag,n.Enable,n.Friction,n.Gravity,n.Immovable,n.Mass,n.Pushable,n.Size,n.Velocity],initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.body=null}});t.exports=a},97602:(t,e,i)=>{var s=i(56694),n=i(47401),r=i(27037),a=i(23701),o=i(74118),h=i(94287),l=i(93736),u=new s({initialize:function(t,e){var i=64,s=64,r=void 0!==e;r&&e.displayWidth&&(i=e.displayWidth,s=e.displayHeight),r||(e={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=t,this.gameObject=r?e:void 0,this.isBody=!0,this.transform={x:e.x,y:e.y,rotation:e.angle,scaleX:e.scaleX,scaleY:e.scaleY,displayOriginX:e.displayOriginX,displayOriginY:e.displayOriginY},this.debugShowBody=t.defaults.debugShowBody,this.debugShowVelocity=t.defaults.debugShowVelocity,this.debugBodyColor=t.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new l,this.position=new l(e.x-e.scaleX*e.displayOriginX,e.y-e.scaleY*e.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=e.angle,this.preRotation=e.angle,this.width=i,this.height=s,this.sourceWidth=i,this.sourceHeight=s,e.frame&&(this.sourceWidth=e.frame.realWidth,this.sourceHeight=e.frame.realHeight),this.halfWidth=Math.abs(i/2),this.halfHeight=Math.abs(s/2),this.center=new l(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new l,this.newVelocity=new l,this.deltaMax=new l,this.acceleration=new l,this.allowDrag=!0,this.drag=new l,this.allowGravity=!0,this.gravity=new l,this.bounce=new l,this.worldBounce=null,this.customBoundsRectangle=t.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new l(1e4,1e4),this.maxSpeed=-1,this.friction=new l(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=n.FACING_NONE,this.immovable=!1,this.pushable=!0,this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.syncBounds=!1,this.physicsType=n.DYNAMIC_BODY,this._sx=e.scaleX,this._sy=e.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new o},updateBounds:function(){var t=this.gameObject,e=this.transform;if(t.parentContainer){var i=t.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);e.x=i.tx,e.y=i.ty,e.rotation=a(i.rotation),e.scaleX=i.scaleX,e.scaleY=i.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY}else e.x=t.x,e.y=t.y,e.rotation=t.angle,e.scaleX=t.scaleX,e.scaleY=t.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY;var s=!1;if(this.syncBounds){var n=t.getBounds(this._bounds);this.width=n.width,this.height=n.height,s=!0}else{var r=Math.abs(e.scaleX),o=Math.abs(e.scaleY);this._sx===r&&this._sy===o||(this.width=this.sourceWidth*r,this.height=this.sourceHeight*o,this._sx=r,this._sy=o,s=!0)}s&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var t=this.transform;this.position.x=t.x+t.scaleX*(this.offset.x-t.displayOriginX),this.position.y=t.y+t.scaleY*(this.offset.y-t.displayOriginY),this.updateCenter()},resetFlags:function(t){void 0===t&&(t=!1);var e=this.wasTouching,i=this.touching,s=this.blocked;t?(e.none=!0,e.up=!1,e.down=!1,e.left=!1,e.right=!1):(e.none=i.none,e.up=i.up,e.down=i.down,e.left=i.left,e.right=i.right),i.none=!0,i.up=!1,i.down=!1,i.left=!1,i.right=!1,s.none=!0,s.up=!1,s.down=!1,s.left=!1,s.right=!1,this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(t,e){t&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves&&(this.prev.x=this.position.x,this.prev.y=this.position.y,this.prevFrame.x=this.position.x,this.prevFrame.y=this.position.y),t&&this.update(e)},update:function(t){if(this.prev.x=this.position.x,this.prev.y=this.position.y,this.moves){this.world.updateMotion(this,t);var e=this.velocity.x,i=this.velocity.y;this.newVelocity.set(e*t,i*t),this.position.add(this.newVelocity),this.updateCenter(),this.angle=Math.atan2(i,e),this.speed=Math.sqrt(e*e+i*i),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds&&this.world.emit(r.WORLD_BOUNDS,this,this.blocked.up,this.blocked.down,this.blocked.left,this.blocked.right)}this._dx=this.position.x-this.prev.x,this._dy=this.position.y-this.prev.y},postUpdate:function(){var t=this.position.x-this.prevFrame.x,e=this.position.y-this.prevFrame.y,i=this.gameObject;if(this.moves){var s=this.deltaMax.x,r=this.deltaMax.y;0!==s&&0!==t&&(t<0&&t<-s?t=-s:t>0&&t>s&&(t=s)),0!==r&&0!==e&&(e<0&&e<-r?e=-r:e>0&&e>r&&(e=r)),i&&(i.x+=t,i.y+=e)}t<0?this.facing=n.FACING_LEFT:t>0&&(this.facing=n.FACING_RIGHT),e<0?this.facing=n.FACING_UP:e>0&&(this.facing=n.FACING_DOWN),this.allowRotation&&i&&(i.angle+=this.deltaZ()),this._tx=t,this._ty=e},setBoundsRectangle:function(t){return this.customBoundsRectangle=t||this.world.bounds,this},checkWorldBounds:function(){var t=this.position,e=this.customBoundsRectangle,i=this.world.checkCollision,s=this.worldBounce?-this.worldBounce.x:-this.bounce.x,n=this.worldBounce?-this.worldBounce.y:-this.bounce.y,r=!1;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=s,this.blocked.right=!0,r=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=n,this.blocked.down=!0,r=!0),r&&(this.blocked.none=!1,this.updateCenter()),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setGameObject:function(t,e){return void 0===e&&(e=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=t,t.body&&(t.body=this),this.setSize(),this.world.add(this),this.enable=e,this},setSize:function(t,e,i){void 0===i&&(i=!0);var s=this.gameObject;if(s&&(!t&&s.frame&&(t=s.frame.realWidth),!e&&s.frame&&(e=s.frame.realHeight)),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&s&&s.getCenter){var n=(s.width-t)/2,r=(s.height-e)/2;this.offset.set(n,r)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i&&(i.setPosition(t,e),this.rotation=i.angle,this.preRotation=i.angle);var s=this.position;i&&i.getTopLeft?i.getTopLeft(s):s.set(t,e),this.prev.copy(s),this.prevFrame.copy(s),i&&this.updateBounds(),this.updateCenter(),this.collideWorldBounds&&this.checkWorldBounds(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?this.radius>0&&t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:h(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,s=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor),this.isCircle?t.strokeCircle(i,s,this.width/2):(this.checkCollision.up&&t.lineBetween(e.x,e.y,e.x+this.width,e.y),this.checkCollision.right&&t.lineBetween(e.x+this.width,e.y,e.x+this.width,e.y+this.height),this.checkCollision.down&&t.lineBetween(e.x,e.y+this.height,e.x+this.width,e.y+this.height),this.checkCollision.left&&t.lineBetween(e.x,e.y,e.x,e.y+this.height))),this.debugShowVelocity&&(t.lineStyle(t.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,s,i+this.velocity.x/2,s+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t,e,i,s){void 0===t&&(t=!0),this.collideWorldBounds=t;var n=void 0!==e,r=void 0!==i;return(n||r)&&(this.worldBounce||(this.worldBounce=new l),n&&(this.worldBounce.x=e),r&&(this.worldBounce.y=i)),void 0!==s&&(this.onWorldBounds=s),this},setVelocity:function(t,e){return this.velocity.set(t,e),t=this.velocity.x,e=this.velocity.y,this.speed=Math.sqrt(t*t+e*e),this},setVelocityX:function(t){return this.setVelocity(t,this.velocity.y)},setVelocityY:function(t){return this.setVelocity(this.velocity.x,t)},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),this},setMaxVelocityX:function(t){return this.maxVelocity.x=t,this},setMaxVelocityY:function(t){return this.maxVelocity.y=t,this},setMaxSpeed:function(t){return this.maxSpeed=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setAllowDrag:function(t){return void 0===t&&(t=!0),this.allowDrag=t,this},setAllowGravity:function(t){return void 0===t&&(t=!0),this.allowGravity=t,this},setAllowRotation:function(t){return void 0===t&&(t=!0),this.allowRotation=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDamping:function(t){return this.useDamping=t,this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return void 0===t&&(t=!0),this.immovable=t,this},setEnable:function(t){return void 0===t&&(t=!0),this.enable=t,this},processX:function(t,e,i,s){this.x+=t,this.updateCenter(),null!==e&&(this.velocity.x=e);var n=this.blocked;i&&(n.left=!0),s&&(n.right=!0)},processY:function(t,e,i,s){this.y+=t,this.updateCenter(),null!==e&&(this.velocity.y=e);var n=this.blocked;i&&(n.up=!0),s&&(n.down=!0)},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},3909:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s,n,r,a){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=s,this.collideCallback=n,this.processCallback=r,this.callbackContext=a},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=s},99523:(t,e,i)=>{var s=i(62832),n=i(25084),r=i(97602),a=i(56694),o=i(47401),h=i(10481),l=i(66634),u=i(46346),c=new a({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,s,n){return this.world.addCollider(t,e,i,s,n)},overlap:function(t,e,i,s,n){return this.world.addOverlap(t,e,i,s,n)},existing:function(t,e){var i=e?o.STATIC_BODY:o.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},image:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticSprite:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},sprite:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticGroup:function(t,e){return this.sys.updateList.add(new u(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},body:function(t,e,i,s){var n=new r(this.world);return n.position.set(t,e),i&&s&&n.setSize(i,s),this.world.add(n,o.DYNAMIC_BODY),n},staticBody:function(t,e,i,s){var n=new l(this.world);return n.position.set(t,e),i&&s&&n.setSize(i,s),this.world.add(n,o.STATIC_BODY),n},destroy:function(){this.world=null,this.scene=null,this.sys=null}});t.exports=c},75671:(t,e,i)=>{var s=i(47401);t.exports=function(t,e,i,n){var r=0,a=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?(r=t.right-e.x)>a&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?r=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.right=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.left=!0)):t._dxa&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?r=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.left=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=r,e.overlapX=r,r}},66185:(t,e,i)=>{var s=i(47401);t.exports=function(t,e,i,n){var r=0,a=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(r=t.bottom-e.y)>a&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?r=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.down=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.up=!0)):t._dya&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?r=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.up=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=r,e.overlapY=r,r}},10481:(t,e,i)=>{var s=i(25084),n=i(56694),r=i(47401),a=i(72632),o=i(59192),h=i(42911),l=new n({Extends:o,initialize:function(t,e,i,n){if(i||n)if(h(i))n=i,i=null,n.internalCreateCallback=this.createCallbackHandler,n.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(i)&&h(i[0])){n=i[0];var l=this;i.forEach((function(t){t.internalCreateCallback=l.createCallbackHandler,t.internalRemoveCallback=l.removeCallbackHandler})),i=null}else n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=t,n.classType=a(n,"classType",s),this.physicsType=r.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:a(n,"collideWorldBounds",!1),setBoundsRectangle:a(n,"customBoundsRectangle",null),setAccelerationX:a(n,"accelerationX",0),setAccelerationY:a(n,"accelerationY",0),setAllowDrag:a(n,"allowDrag",!0),setAllowGravity:a(n,"allowGravity",!0),setAllowRotation:a(n,"allowRotation",!0),setDamping:a(n,"useDamping",!1),setBounceX:a(n,"bounceX",0),setBounceY:a(n,"bounceY",0),setDragX:a(n,"dragX",0),setDragY:a(n,"dragY",0),setEnable:a(n,"enable",!0),setGravityX:a(n,"gravityX",0),setGravityY:a(n,"gravityY",0),setFrictionX:a(n,"frictionX",0),setFrictionY:a(n,"frictionY",0),setMaxSpeed:a(n,"maxSpeed",-1),setMaxVelocityX:a(n,"maxVelocityX",1e4),setMaxVelocityY:a(n,"maxVelocityY",1e4),setVelocityX:a(n,"velocityX",0),setVelocityY:a(n,"velocityY",0),setAngularVelocity:a(n,"angularVelocity",0),setAngularAcceleration:a(n,"angularAcceleration",0),setAngularDrag:a(n,"angularDrag",0),setMass:a(n,"mass",1),setImmovable:a(n,"immovable",!1)},o.call(this,e,i,n),this.type="PhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,r.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var s=this.getChildren(),n=0;n{var e,i,s,n,r,a,o,h,l,u,c,d,f,p,v,g,m,y=function(){return u&&v&&i.blocked.right?(e.processX(-m,o,!1,!0),1):l&&g&&i.blocked.left?(e.processX(m,o,!0),1):f&&g&&e.blocked.right?(i.processX(-m,h,!1,!0),2):d&&v&&e.blocked.left?(i.processX(m,h,!0),2):0},x=function(t){if(s&&n)m*=.5,0===t||3===t?(e.processX(m,r),i.processX(-m,a)):(e.processX(-m,r),i.processX(m,a));else if(s&&!n)0===t||3===t?e.processX(m,o,!0):e.processX(-m,o,!1,!0);else if(!s&&n)0===t||3===t?i.processX(-m,h,!1,!0):i.processX(m,h,!0);else{var v=.5*m;0===t?p?(e.processX(m,0,!0),i.processX(0,null,!1,!0)):f?(e.processX(v,0,!0),i.processX(-v,0,!1,!0)):(e.processX(v,i.velocity.x,!0),i.processX(-v,null,!1,!0)):1===t?c?(e.processX(0,null,!1,!0),i.processX(m,0,!0)):u?(e.processX(-v,0,!1,!0),i.processX(v,0,!0)):(e.processX(-v,null,!1,!0),i.processX(v,e.velocity.x,!0)):2===t?p?(e.processX(-m,0,!1,!0),i.processX(0,null,!0)):d?(e.processX(-v,0,!1,!0),i.processX(v,0,!0)):(e.processX(-v,i.velocity.x,!1,!0),i.processX(v,null,!0)):3===t&&(c?(e.processX(0,null,!0),i.processX(-m,0,!1,!0)):l?(e.processX(v,0,!0),i.processX(-v,0,!1,!0)):(e.processX(v,i.velocity.y,!0),i.processX(-v,null,!1,!0)))}return!0};t.exports={BlockCheck:y,Check:function(){var t=e.velocity.x,s=i.velocity.x,n=Math.sqrt(s*s*i.mass/e.mass)*(s>0?1:-1),o=Math.sqrt(t*t*e.mass/i.mass)*(t>0?1:-1),h=.5*(n+o);return o-=h,r=h+(n-=h)*e.bounce.x,a=h+o*i.bounce.x,l&&g?x(0):d&&v?x(1):u&&v?x(2):!(!f||!g)&&x(3)},Set:function(t,r,a){i=r;var x=(e=t).velocity.x,T=i.velocity.x;return s=e.pushable,l=e._dx<0,u=e._dx>0,c=0===e._dx,v=Math.abs(e.right-i.x)<=Math.abs(i.right-e.x),o=T-x*e.bounce.x,n=i.pushable,d=i._dx<0,f=i._dx>0,p=0===i._dx,g=!v,h=x-T*i.bounce.x,m=Math.abs(a),y()},Run:x,RunImmovableBody1:function(t){1===t?i.velocity.x=0:v?i.processX(m,h,!0):i.processX(-m,h,!1,!0),e.moves&&(i.y+=(e.y-e.prev.y)*e.friction.y,i._dy=i.y-i.prev.y)},RunImmovableBody2:function(t){2===t?e.velocity.x=0:g?e.processX(m,o,!0):e.processX(-m,o,!1,!0),i.moves&&(e.y+=(i.y-i.prev.y)*i.friction.y,e._dy=e.y-e.prev.y)}}},67050:t=>{var e,i,s,n,r,a,o,h,l,u,c,d,f,p,v,g,m,y=function(){return u&&v&&i.blocked.down?(e.processY(-m,o,!1,!0),1):l&&g&&i.blocked.up?(e.processY(m,o,!0),1):f&&g&&e.blocked.down?(i.processY(-m,h,!1,!0),2):d&&v&&e.blocked.up?(i.processY(m,h,!0),2):0},x=function(t){if(s&&n)m*=.5,0===t||3===t?(e.processY(m,r),i.processY(-m,a)):(e.processY(-m,r),i.processY(m,a));else if(s&&!n)0===t||3===t?e.processY(m,o,!0):e.processY(-m,o,!1,!0);else if(!s&&n)0===t||3===t?i.processY(-m,h,!1,!0):i.processY(m,h,!0);else{var v=.5*m;0===t?p?(e.processY(m,0,!0),i.processY(0,null,!1,!0)):f?(e.processY(v,0,!0),i.processY(-v,0,!1,!0)):(e.processY(v,i.velocity.y,!0),i.processY(-v,null,!1,!0)):1===t?c?(e.processY(0,null,!1,!0),i.processY(m,0,!0)):u?(e.processY(-v,0,!1,!0),i.processY(v,0,!0)):(e.processY(-v,null,!1,!0),i.processY(v,e.velocity.y,!0)):2===t?p?(e.processY(-m,0,!1,!0),i.processY(0,null,!0)):d?(e.processY(-v,0,!1,!0),i.processY(v,0,!0)):(e.processY(-v,i.velocity.y,!1,!0),i.processY(v,null,!0)):3===t&&(c?(e.processY(0,null,!0),i.processY(-m,0,!1,!0)):l?(e.processY(v,0,!0),i.processY(-v,0,!1,!0)):(e.processY(v,i.velocity.y,!0),i.processY(-v,null,!1,!0)))}return!0};t.exports={BlockCheck:y,Check:function(){var t=e.velocity.y,s=i.velocity.y,n=Math.sqrt(s*s*i.mass/e.mass)*(s>0?1:-1),o=Math.sqrt(t*t*e.mass/i.mass)*(t>0?1:-1),h=.5*(n+o);return o-=h,r=h+(n-=h)*e.bounce.y,a=h+o*i.bounce.y,l&&g?x(0):d&&v?x(1):u&&v?x(2):!(!f||!g)&&x(3)},Set:function(t,r,a){i=r;var x=(e=t).velocity.y,T=i.velocity.y;return s=e.pushable,l=e._dy<0,u=e._dy>0,c=0===e._dy,v=Math.abs(e.bottom-i.y)<=Math.abs(i.bottom-e.y),o=T-x*e.bounce.y,n=i.pushable,d=i._dy<0,f=i._dy>0,p=0===i._dy,g=!v,h=x-T*i.bounce.y,m=Math.abs(a),y()},Run:x,RunImmovableBody1:function(t){1===t?i.velocity.y=0:v?i.processY(m,h,!0):i.processY(-m,h,!1,!0),e.moves&&(i.x+=(e.x-e.prev.x)*e.friction.x,i._dx=i.x-i.prev.x)},RunImmovableBody2:function(t){2===t?e.velocity.y=0:g?e.processY(m,o,!0):e.processY(-m,o,!1,!0),i.moves&&(e.x+=(i.x-i.prev.x)*i.friction.x,e._dx=e.x-e.prev.x)}}},61777:(t,e,i)=>{var s=i(75671),n=i(22916);t.exports=function(t,e,i,r){var a=s(t,e,i,r),o=t.immovable,h=e.immovable;if(i||0===a||o&&h||t.customSeparateX||e.customSeparateX)return 0!==a||t.embedded&&e.embedded;var l=n.Set(t,e,a);return o||h?(o?n.RunImmovableBody1(l):h&&n.RunImmovableBody2(l),!0):l>0||n.Check()}},25299:(t,e,i)=>{var s=i(66185),n=i(67050);t.exports=function(t,e,i,r){var a=s(t,e,i,r),o=t.immovable,h=e.immovable;if(i||0===a||o&&h||t.customSeparateY||e.customSeparateY)return 0!==a||t.embedded&&e.embedded;var l=n.Set(t,e,a);return o||h?(o?n.RunImmovableBody1(l):h&&n.RunImmovableBody2(l),!0):l>0||n.Check()}},66634:(t,e,i)=>{var s=i(65650),n=i(56694),r=i(47401),a=i(94287),o=i(93736),h=new n({initialize:function(t,e){var i=64,s=64,n=void 0!==e;n&&e.displayWidth&&(i=e.displayWidth,s=e.displayHeight),n||(e={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=t,this.gameObject=n?e:void 0,this.isBody=!0,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new o,this.position=new o(e.x-i*e.originX,e.y-s*e.originY),this.width=i,this.height=s,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new o(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=o.ZERO,this.allowGravity=!1,this.gravity=o.ZERO,this.bounce=o.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var s=this.gameObject;if(!t&&s.frame&&(t=s.frame.realWidth),!e&&s.frame&&(e=s.frame.realHeight),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&s.getCenter){var n=s.displayWidth/2,r=s.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(n-this.halfWidth,r-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.setPosition(t,e),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?s(this,t,e):a(this,t,e)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,s=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?t.strokeCircle(i,s,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},46346:(t,e,i)=>{var s=i(25084),n=i(56694),r=i(47401),a=i(72632),o=i(59192),h=i(42911),l=new n({Extends:o,initialize:function(t,e,i,n){i||n?h(i)?(n=i,i=null,n.internalCreateCallback=this.createCallbackHandler,n.internalRemoveCallback=this.removeCallbackHandler,n.createMultipleCallback=this.createMultipleCallbackHandler,n.classType=a(n,"classType",s)):Array.isArray(i)&&h(i[0])?(n=i,i=null,n.forEach((function(t){t.internalCreateCallback=this.createCallbackHandler,t.internalRemoveCallback=this.removeCallbackHandler,t.createMultipleCallback=this.createMultipleCallbackHandler,t.classType=a(t,"classType",s)}))):n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler}:n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:s},this.world=t,this.physicsType=r.STATIC_BODY,o.call(this,e,i,n),this.type="StaticPhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,r.STATIC_BODY)},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var t=this.children.entries,e=0;e{var s=i(94240),n=i(97602),r=i(82897),a=i(56694),o=i(3909),h=i(47401),l=i(53996),u=i(6659),c=i(27037),d=i(88456),f=i(41935),p=i(54726),v=i(75671),g=i(66185),m=i(44662),y=i(10850),x=i(83392),T=i(74623),w=i(25163),E=i(74118),S=i(68687),b=i(27354),A=i(61777),_=i(25299),C=i(58403),R=i(66634),M=i(28808),P=i(69360),O=i(93736),L=i(1071),F=new a({Extends:u,initialize:function(t,e){u.call(this),this.scene=t,this.bodies=new C,this.staticBodies=new C,this.pendingDestroy=new C,this.colliders=new T,this.gravity=new O(y(e,"gravity.x",0),y(e,"gravity.y",0)),this.bounds=new E(y(e,"x",0),y(e,"y",0),y(e,"width",t.sys.scale.width),y(e,"height",t.sys.scale.height)),this.checkCollision={up:y(e,"checkCollision.up",!0),down:y(e,"checkCollision.down",!0),left:y(e,"checkCollision.left",!0),right:y(e,"checkCollision.right",!0)},this.fps=y(e,"fps",60),this.fixedStep=y(e,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=y(e,"timeScale",1),this.OVERLAP_BIAS=y(e,"overlapBias",4),this.TILE_BIAS=y(e,"tileBias",16),this.forceX=y(e,"forceX",!1),this.isPaused=y(e,"isPaused",!1),this._total=0,this.drawDebug=y(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:y(e,"debugShowBody",!0),debugShowStaticBody:y(e,"debugShowStaticBody",!0),debugShowVelocity:y(e,"debugShowVelocity",!0),bodyDebugColor:y(e,"debugBodyColor",16711935),staticBodyDebugColor:y(e,"debugStaticBodyColor",255),velocityDebugColor:y(e,"debugVelocityColor",65280)},this.maxEntries=y(e,"maxEntries",16),this.useTree=y(e,"useTree",!0),this.tree=new S(this.maxEntries),this.staticTree=new S(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new P,this._tempMatrix2=new P,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(t,e){void 0===e&&(e=h.DYNAMIC_BODY),Array.isArray(t)||(t=[t]);for(var i=0;i=r;for(this.fixedStep||(n=.001*e,o=!0,this._elapsed=0),i=0;i=r;)this._elapsed-=r,this.step(n)}},step:function(t){var e,i,s=this.bodies.entries,n=s.length;for(e=0;e0){var l=this.tree,u=this.staticTree;for(s=(i=o.entries).length,t=0;t-1&&c>v&&(t.velocity.normalize().scale(v),c=v),t.speed=c},separate:function(t,e,i,s,n){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(s,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,n);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,a=t.isCircle?t:e,o={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=a.center;if((h.yo.bottom)&&(h.xo.right))return this.separateCircle(t,e,n)}var l=!1,u=!1;n?(l=A(t,e,n,this.OVERLAP_BIAS),u=_(t,e,n,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)a.right&&(r=l(o.x,o.y,a.right,a.y)-o.radius):o.y>a.bottom&&(o.xa.right&&(r=l(o.x,o.y,a.right,a.bottom)-o.radius)),r*=-1}else r=t.halfWidth+e.halfWidth-l(t.center.x,t.center.y,e.center.x,e.center.y);if(t.overlapR=r,e.overlapR=r,i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r&&(t.onOverlap||e.onOverlap)&&this.emit(c.OVERLAP,t.gameObject,e.gameObject,t,e),0!==r;var h=t.center.x-e.center.x,u=t.center.y-e.center.y,d=Math.sqrt(Math.pow(h,2)+Math.pow(u,2)),f=(e.center.x-t.center.x)/d||0,p=(e.center.y-t.center.y)/d||0,m=2*(t.velocity.x*f+t.velocity.y*p-e.velocity.x*f-e.velocity.y*p)/(t.mass+e.mass);(t.immovable||e.immovable)&&(m*=2),t.immovable||(t.velocity.x=t.velocity.x-m/t.mass*f,t.velocity.y=t.velocity.y-m/t.mass*p),e.immovable||(e.velocity.x=e.velocity.x+m/e.mass*f,e.velocity.y=e.velocity.y+m/e.mass*p),t.immovable||e.immovable||(r/=2);var y=s(t.center,e.center),T=(r+x.EPSILON)*Math.cos(y),w=(r+x.EPSILON)*Math.sin(y);return t.immovable||(t.x-=T,t.y-=w,t.updateCenter()),e.immovable||(e.x+=T,e.y+=w,e.updateCenter()),t.velocity.x*=t.bounce.x,t.velocity.y*=t.bounce.y,e.velocity.x*=e.bounce.x,e.velocity.y*=e.bounce.y,(t.onCollide||e.onCollide)&&this.emit(c.COLLIDE,t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?l(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.position.x||t.bottom<=e.position.y||t.position.x>=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=r(t.center.x,e.left,e.right),s=r(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-s)*(t.center.y-s)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.collideObjects(t,e,i,s,n,!0)},collide:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.collideObjects(t,e,i,s,n,!1)},collideObjects:function(t,e,i,s,n,r){var a,o;!t.isParent||void 0!==t.physicsType&&void 0!==e&&t!==e||(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var h=Array.isArray(t),l=Array.isArray(e);if(this._total=0,h||l)if(!h&&l)for(a=0;a0},collideHandler:function(t,e,i,s,n,r){if(void 0===e&&t.isParent)return this.collideGroupVsGroup(t,t,i,s,n,r);if(!t||!e)return!1;if(t.body||t.isBody){if(e.body||e.isBody)return this.collideSpriteVsSprite(t,e,i,s,n,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,s,n,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,s,n,r)}else if(t.isParent){if(e.body||e.isBody)return this.collideSpriteVsGroup(e,t,i,s,n,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,s,n,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,s,n,r)}else if(t.isTilemap){if(e.body||e.isBody)return this.collideSpriteVsTilemapLayer(e,t,i,s,n,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,s,n,r)}},collideSpriteVsSprite:function(t,e,i,s,n,r){var a=t.isBody?t:t.body,o=e.isBody?e:e.body;return!(!a||!o)&&(this.separate(a,o,s,n,r)&&(i&&i.call(n,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,s,n,r){var a,o,l,u=t.isBody?t:t.body;if(0!==e.length&&u&&u.enable&&!u.checkCollision.none)if(this.useTree||e.physicsType===h.STATIC_BODY){var c=this.treeMinMax;c.minX=u.left,c.minY=u.top,c.maxX=u.right,c.maxY=u.bottom;var d=e.physicsType===h.DYNAMIC_BODY?this.tree.search(c):this.staticTree.search(c);for(o=d.length,a=0;ac.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;o-=d,l+=d}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var f=r?null:this.tileFilterOptions,p=m(o,h,l,u,f,e.scene.cameras.main,e.layer);return 0!==p.length&&this.collideSpriteVsTilesHandler(t,p,i,s,n,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,s,n,r,a){for(var o,h,l=t.isBody?t:t.body,u={left:0,right:0,top:0,bottom:0},d=!1,f=0;f{t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},29257:t=>{t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},62122:t=>{t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,e,i,s){return this.body.setCollideWorldBounds(t,e,i,s),this}}},99803:t=>{t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},87145:t=>{t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}}},96174:t=>{var e={enableBody:function(t,e,i,s,n){return t&&this.body.reset(e,i),s&&(this.body.gameObject.active=!0),n&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=e},51702:t=>{t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},25578:t=>{t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},72029:t=>{var e={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=e},34566:t=>{t.exports={setMass:function(t){return this.body.mass=t,this}}},2732:(t,e,i)=>{var s=i(15147),n=i(26673),r=i(22184),a=i(26535);t.exports=function(t,e,i,o,h,l){var u=s(t,e-o,i-o,2*o,2*o,h,l);if(0===u.length)return u;for(var c=new n(e,i,o),d=new n,f=[],p=0;p{t.exports=function(t,e,i,s,n,r,a){void 0===r&&(r=!0),void 0===a&&(a=!1);var o=[],h=[],l=t.treeMinMax;if(l.minX=e,l.minY=i,l.maxX=e+s,l.maxY=i+n,a&&(h=t.staticTree.search(l)),r&&t.useTree)o=t.tree.search(l);else if(r){var u=t.bodies,c={position:{x:e,y:i},left:e,top:i,right:e+s,bottom:i+n,isCircle:!1},d=t.intersects;u.iterate((function(t){d(t,c)&&o.push(t)}))}return h.concat(o)}},57527:t=>{var e={setPushable:function(t){return void 0===t&&(t=!0),this.body.pushable=t,this}};t.exports=e},77687:t=>{t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setBodySize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},66536:t=>{t.exports={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}}},7864:(t,e,i)=>{t.exports={Acceleration:i(5321),Angular:i(29257),Bounce:i(62122),Debug:i(99803),Drag:i(87145),Enable:i(96174),Friction:i(51702),Gravity:i(25578),Immovable:i(72029),Mass:i(34566),OverlapCirc:i(2732),OverlapRect:i(15147),Pushable:i(57527),Size:i(77687),Velocity:i(66536)}},47401:t=>{t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},22346:t=>{t.exports="collide"},95092:t=>{t.exports="overlap"},15775:t=>{t.exports="pause"},74142:t=>{t.exports="resume"},22825:t=>{t.exports="tilecollide"},10851:t=>{t.exports="tileoverlap"},7543:t=>{t.exports="worldbounds"},1487:t=>{t.exports="worldstep"},27037:(t,e,i)=>{t.exports={COLLIDE:i(22346),OVERLAP:i(95092),PAUSE:i(15775),RESUME:i(74142),TILE_COLLIDE:i(22825),TILE_OVERLAP:i(10851),WORLD_BOUNDS:i(7543),WORLD_STEP:i(1487)}},39977:(t,e,i)=>{var s=i(47401),n=i(98611),r={ArcadePhysics:i(66150),Body:i(97602),Collider:i(3909),Components:i(7864),Events:i(27037),Factory:i(99523),GetOverlapX:i(75671),GetOverlapY:i(66185),SeparateX:i(61777),SeparateY:i(25299),Group:i(10481),Image:i(62832),Sprite:i(25084),StaticBody:i(66634),StaticGroup:i(46346),Tilemap:i(8413),World:i(85233)};r=n(!1,r,s),t.exports=r},25163:t=>{t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},98209:t=>{t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):e>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,t.updateCenter(),0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},72792:t=>{t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):e>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,t.updateCenter(),0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},27354:(t,e,i)=>{var s=i(14405),n=i(52926),r=i(28808);t.exports=function(t,e,i,a,o,h,l){var u=a.left,c=a.top,d=a.right,f=a.bottom,p=i.faceLeft||i.faceRight,v=i.faceTop||i.faceBottom;if(l||(p=!0,v=!0),!p&&!v)return!1;var g=0,m=0,y=0,x=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX(){var s=i(98209);t.exports=function(t,e,i,n,r,a){var o=0,h=e.faceLeft,l=e.faceRight,u=e.collideLeft,c=e.collideRight;return a||(h=!0,l=!0,u=!0,c=!0),t.deltaX()<0&&c&&t.checkCollision.left?l&&t.x0&&u&&t.checkCollision.right&&h&&t.right>i&&(o=t.right-i)>r&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:s(t,o)),o}},52926:(t,e,i)=>{var s=i(72792);t.exports=function(t,e,i,n,r,a){var o=0,h=e.faceTop,l=e.faceBottom,u=e.collideUp,c=e.collideDown;return a||(h=!0,l=!0,u=!0,c=!0),t.deltaY()<0&&c&&t.checkCollision.up?l&&t.y0&&u&&t.checkCollision.down&&h&&t.bottom>i&&(o=t.bottom-i)>r&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:s(t,o)),o}},28808:t=>{t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},8413:(t,e,i)=>{var s={ProcessTileCallbacks:i(25163),ProcessTileSeparationX:i(98209),ProcessTileSeparationY:i(72792),SeparateTile:i(27354),TileCheckX:i(14405),TileCheckY:i(52926),TileIntersectsBody:i(28808)};t.exports=s},88257:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=s},18360:t=>{t.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},91963:t=>{var e={},i={},s={register:function(t,i,s,n){void 0===n&&(n=!1),e[t]={plugin:i,mapping:s,custom:n}},registerCustom:function(t,e,s,n){i[t]={plugin:e,mapping:s,data:n}},hasCore:function(t){return e.hasOwnProperty(t)},hasCustom:function(t){return i.hasOwnProperty(t)},getCore:function(t){return e[t]},getCustom:function(t){return i[t]},getCustomClass:function(t){return i.hasOwnProperty(t)?i[t].plugin:null},remove:function(t){e.hasOwnProperty(t)&&delete e[t]},removeCustom:function(t){i.hasOwnProperty(t)&&delete i[t]},destroyCorePlugins:function(){for(var t in e)e.hasOwnProperty(t)&&delete e[t]},destroyCustomPlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]}};t.exports=s},49274:(t,e,i)=>{var s=i(56694),n=i(97081),r=i(6659),a=i(76846),o=i(99325),h=i(61286),l=i(72632),u=i(91963),c=i(66458),d=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],t.isBooted?this.boot():t.events.once(n.BOOT,this.boot,this)},boot:function(){var t,e,i,s,r,a,o,h=this.game.config,u=h.installGlobalPlugins;for(u=u.concat(this._pendingGlobal),t=0;t{var s=i(88257),n=i(56694),r=i(7599),a=new n({Extends:s,initialize:function(t,e,i){s.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,t.sys.events.once(r.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=a},45615:(t,e,i)=>{t.exports={BasePlugin:i(88257),DefaultPlugins:i(18360),PluginCache:i(91963),PluginManager:i(49274),ScenePlugin:i(39283)}},95723:t=>{t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},27394:t=>{t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},91135:(t,e,i)=>{var s=i(89787),n=i(61840),r=i(56694),a=i(86459),o=i(6659),h=i(81044),l=i(32834),u=i(40444),c=i(38203),d=i(69360),f=new r({Extends:o,initialize:function(t){o.call(this);var e=t.config;this.config={clearBeforeRender:e.clearBeforeRender,backgroundColor:e.backgroundColor,antialias:e.antialias,roundPixels:e.roundPixels},this.game=t,this.type=a.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=t.canvas;var i={alpha:t.config.transparent,desynchronized:t.config.desynchronized,willReadFrequently:!1};this.gameContext=e.context?e.context:this.gameCanvas.getContext("2d",i),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=l(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new d,this._tempMatrix2=new d,this._tempMatrix3=new d,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(c.READY,this.boot,this)},boot:function(){var t=this.game,e=t.scale.baseSize;this.width=e.width,this.height=e.height,this.isBooted=!0,t.scale.on(u.RESIZE,this.onResize,this),this.resize(e.width,e.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e,this.emit(h.RESIZE,t,e)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,s=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&(t.clearRect(0,0,i,s),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,s))),t.save(),this.drawCount=0,this.emit(h.PRE_RENDER)},render:function(t,e,i){var n=e.length;this.emit(h.RENDER,t,i);var r=i.x,a=i.y,o=i.width,l=i.height,u=i.renderToTexture?i.context:t.sys.context;u.save(),this.game.scene.customViewports&&(u.beginPath(),u.rect(r,a,o,l),u.clip()),i.emit(s.PRE_RENDER,i),this.currentContext=u;var c=i.mask;c&&c.preRenderCanvas(this,null,i._maskCamera),i.transparent||(u.fillStyle=i.backgroundColor.rgba,u.fillRect(r,a,o,l)),u.globalAlpha=i.alpha,u.globalCompositeOperation="source-over",this.drawCount+=n,i.renderToTexture&&i.emit(s.PRE_RENDER,i),i.matrix.copyToContext(u);for(var d=0;d=0?m=-(m+c):m<0&&(m=Math.abs(m)-c)),t.flipY&&(y>=0?y=-(y+d):y<0&&(y=Math.abs(y)-d))}var T=1,w=1;t.flipX&&(f||(m+=-e.realWidth+2*v),T=-1),t.flipY&&(f||(y+=-e.realHeight+2*g),w=-1);var E=t.x,S=t.y;i.roundPixels&&(E=Math.floor(E),S=Math.floor(S)),o.applyITRS(E,S,t.rotation,t.scaleX*T,t.scaleY*w),a.copyFrom(i.matrix),s?(a.multiplyWithOffset(s,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),o.e=E,o.f=S):(o.e-=i.scrollX*t.scrollFactorX,o.f-=i.scrollY*t.scrollFactorY),a.multiply(o),i.roundPixels&&(a.e=Math.round(a.e),a.f=Math.round(a.f)),r.save(),a.setToContext(r),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=n,r.imageSmoothingEnabled=!e.source.scaleMode,t.mask&&t.mask.preRenderCanvas(this,t,i),c>0&&d>0&&r.drawImage(e.source.image,l,u,c,d,m,y,c/p,d/p),t.mask&&t.mask.postRenderCanvas(this,t,i),r.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});t.exports=f},6046:(t,e,i)=>{t.exports={CanvasRenderer:i(91135),GetBlendModes:i(32834),SetTransform:i(49584)}},32834:(t,e,i)=>{var s=i(95723),n=i(98581);t.exports=function(){var t=[],e=n.supportNewBlendModes,i="source-over";return t[s.NORMAL]=i,t[s.ADD]="lighter",t[s.MULTIPLY]=e?"multiply":i,t[s.SCREEN]=e?"screen":i,t[s.OVERLAY]=e?"overlay":i,t[s.DARKEN]=e?"darken":i,t[s.LIGHTEN]=e?"lighten":i,t[s.COLOR_DODGE]=e?"color-dodge":i,t[s.COLOR_BURN]=e?"color-burn":i,t[s.HARD_LIGHT]=e?"hard-light":i,t[s.SOFT_LIGHT]=e?"soft-light":i,t[s.DIFFERENCE]=e?"difference":i,t[s.EXCLUSION]=e?"exclusion":i,t[s.HUE]=e?"hue":i,t[s.SATURATION]=e?"saturation":i,t[s.COLOR]=e?"color":i,t[s.LUMINOSITY]=e?"luminosity":i,t[s.ERASE]="destination-out",t[s.SOURCE_IN]="source-in",t[s.SOURCE_OUT]="source-out",t[s.SOURCE_ATOP]="source-atop",t[s.DESTINATION_OVER]="destination-over",t[s.DESTINATION_IN]="destination-in",t[s.DESTINATION_OUT]="destination-out",t[s.DESTINATION_ATOP]="destination-atop",t[s.LIGHTER]="lighter",t[s.COPY]="copy",t[s.XOR]="xor",t}},49584:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n,r){var a=n.alpha*i.alpha;if(a<=0)return!1;var o=s(i,n,r).calc;return e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=a,e.save(),o.setToContext(e),e.imageSmoothingEnabled=i.frame?!i.frame.source.scaleMode:t.antialias,!0}},70936:t=>{t.exports="postrender"},99298:t=>{t.exports="prerender"},7743:t=>{t.exports="render"},99519:t=>{t.exports="resize"},81044:(t,e,i)=>{t.exports={POST_RENDER:i(70936),PRE_RENDER:i(99298),RENDER:i(7743),RESIZE:i(99519)}},42069:(t,e,i)=>{t.exports={Canvas:i(6046),Events:i(81044),Snapshot:i(95528),WebGL:i(55478)}},61840:(t,e,i)=>{var s=i(61068),n=i(27119),r=i(72632);t.exports=function(t,e){var i=r(e,"callback"),a=r(e,"type","image/png"),o=r(e,"encoder",.92),h=Math.abs(Math.round(r(e,"x",0))),l=Math.abs(Math.round(r(e,"y",0))),u=Math.floor(r(e,"width",t.width)),c=Math.floor(r(e,"height",t.height));if(r(e,"getPixel",!1)){var d=t.getContext("2d").getImageData(h,l,1,1).data;i.call(null,new n(d[0],d[1],d[2],d[3]))}else if(0!==h||0!==l||u!==t.width||c!==t.height){var f=s.createWebGL(this,u,c),p=f.getContext("2d");u>0&&c>0&&p.drawImage(t,h,l,u,c,0,0,u,c);var v=new Image;v.onerror=function(){i.call(null),s.remove(f)},v.onload=function(){i.call(null,v),s.remove(f)},v.src=f.toDataURL(a,o)}else{var g=new Image;g.onerror=function(){i.call(null)},g.onload=function(){i.call(null,g)},g.src=t.toDataURL(a,o)}}},1217:(t,e,i)=>{var s=i(61068),n=i(27119),r=i(72632);t.exports=function(t,e){var i=t,a=r(e,"callback"),o=r(e,"type","image/png"),h=r(e,"encoder",.92),l=Math.abs(Math.round(r(e,"x",0))),u=Math.abs(Math.round(r(e,"y",0))),c=r(e,"getPixel",!1),d=r(e,"isFramebuffer",!1),f=d?r(e,"bufferWidth",1):i.drawingBufferWidth,p=d?r(e,"bufferHeight",1):i.drawingBufferHeight;if(c){var v=new Uint8Array(4),g=d?u:p-u;i.readPixels(l,g,1,1,i.RGBA,i.UNSIGNED_BYTE,v),a.call(null,new n(v[0],v[1],v[2],v[3]))}else{var m=Math.floor(r(e,"width",f)),y=Math.floor(r(e,"height",p)),x=m*y*4,T=new Uint8Array(x);i.readPixels(l,p-u-y,m,y,i.RGBA,i.UNSIGNED_BYTE,T);for(var w=s.createWebGL(this,m,y),E=w.getContext("2d"),S=E.getImageData(0,0,m,y),b=S.data,A=0;A{t.exports={Canvas:i(61840),WebGL:i(1217)}},35217:(t,e,i)=>{var s=i(56694),n=i(65641),r=i(33885),a=i(77290),o=i(72632),h=i(37410),l=i(82127),u=i(5583),c=i(66901),d=i(71264),f=i(77310),p=i(10919),v=i(21213),g=i(51212),m=i(60848),y=new s({initialize:function(t){this.game=t.game,this.renderer=t,this.classes=new r([[n.UTILITY_PIPELINE,m],[n.MULTI_PIPELINE,f],[n.BITMAPMASK_PIPELINE,u],[n.SINGLE_PIPELINE,g],[n.ROPE_PIPELINE,v],[n.LIGHT_PIPELINE,c],[n.POINTLIGHT_PIPELINE,p],[n.MOBILE_PIPELINE,d]]),this.postPipelineClasses=new r,this.pipelines=new r,this.default=null,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.MOBILE_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderTargets=[],this.maxDimension=0,this.frameInc=32,this.targetIndex=0},boot:function(t,e,i){var s=this.renderer,r=this.renderTargets;this.frameInc=Math.floor(o(t,"frameInc",32));for(var l,u,c=s.width,d=s.height,f=Math.min(c,d),p=Math.ceil(f/this.frameInc),v=1;v=0;i--){var s=e[i];s.active&&s.preBatch(t)}}},postBatch:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;i=0;i--){var s=e[i];s.active&&s.preBatch(t)}}},postBatchCamera:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;ithis.maxDimension)return this.targetIndex=e.length-3,e[this.targetIndex];var i=3*(l(t,this.frameInc,0,!0)-1);return this.targetIndex=i,e[i]},getSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+1]},getAltSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+2]},destroy:function(){this.flush(),this.classes.clear(),this.postPipelineClasses.clear(),this.pipelines.clear(),this.renderer=null,this.game=null,this.classes=null,this.postPipelineClasses=null,this.pipelines=null,this.default=null,this.current=null,this.previous=null}});t.exports=y},37410:(t,e,i)=>{var s=i(56694),n=i(81044),r=new s({initialize:function(t,e,i,s,n,r,a){void 0===s&&(s=1),void 0===n&&(n=0),void 0===r&&(r=!0),void 0===a&&(a=!1),this.renderer=t,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=s,this.minFilter=n,this.autoClear=r,this.autoResize=!1,this.resize(e,i),a&&this.setAutoResize(!0)},setAutoResize:function(t){return t&&!this.autoResize?(this.renderer.on(n.RESIZE,this.resize,this),this.autoResize=!0):!t&&this.autoResize&&(this.renderer.off(n.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(t,e){var i=t*this.scale,s=e*this.scale;if(i!==this.width||s!==this.height){var n=this.renderer;n.deleteFramebuffer(this.framebuffer),n.deleteTexture(this.texture),t*=this.scale,e*=this.scale,(t=Math.round(t))<=0&&(t=1),(e=Math.round(e))<=0&&(e=1),this.texture=n.createTextureFromSource(null,t,e,this.minFilter,!0),this.framebuffer=n.createFramebuffer(t,e,this.texture,!0),this.width=t,this.height=e}return this},bind:function(t,e,i){if(void 0===t&&(t=!1),t&&this.renderer.flush(),e&&i&&this.resize(e,i),this.renderer.pushFramebuffer(this.framebuffer,!1,!1,!1),t&&this.adjustViewport(),this.autoClear){var s=this.renderer.gl;s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT)}},adjustViewport:function(){var t=this.renderer.gl;t.viewport(0,0,this.width,this.height),t.disable(t.SCISSOR_TEST)},clear:function(){var t=this.renderer,e=t.gl;t.pushFramebuffer(this.framebuffer),e.disable(e.SCISSOR_TEST),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),t.popFramebuffer(),t.resetScissor()},unbind:function(t){void 0===t&&(t=!1);var e=this.renderer;return t&&e.flush(),e.popFramebuffer()},destroy:function(){var t=this.renderer;t.deleteFramebuffer(this.framebuffer),t.deleteTexture(this.texture),t.off(n.RESIZE,this.resize,this),this.renderer=null,this.framebuffer=null,this.texture=null}});t.exports=r},75512:t=>{t.exports={getTintFromFloats:function(t,e,i,s){return((255&(255*s|0))<<24|(255&(255*t|0))<<16|(255&(255*e|0))<<8|255&(255*i|0))>>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},checkShaderMax:function(t,e){var i=Math.min(16,t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS));return e&&-1!==e?Math.min(i,e):i},parseFragmentShaderMaxTextures:function(t,e){if(!t)return"";for(var i="",s=0;s0&&(i+="\n\telse "),s{var s=i(56694),n=i(28699),r=i(6659),a=i(18970),o=i(72632),h=i(16650),l=i(81044),u=i(37410),c=i(75512),d=i(71305),f=new s({Extends:r,initialize:function(t){r.call(this);var e=t.game,i=e.renderer,s=i.gl;this.name=o(t,"name","WebGLPipeline"),this.game=e,this.renderer=i,this.manager,this.gl=s,this.view=e.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=o(t,"topology",s.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=o(t,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.isSpriteFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=t,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[]},boot:function(){var t,e=this.gl,i=this.config,s=this.renderer;this.isPostFX||(this.projectionMatrix=(new h).identity());var n=this.renderTargets,r=o(i,"renderTarget",!1);"boolean"==typeof r&&r&&(r=1);var c=s.width,d=s.height;if("number"==typeof r)for(t=0;tx&&(x=y[t].vertexSize);var T=o(i,"batchSize",s.config.batchSize);this.vertexCapacity=6*T;var w=new ArrayBuffer(this.vertexCapacity*x);this.vertexData=w,this.bytes=new Uint8Array(w),this.vertexViewF32=new Float32Array(w),this.vertexViewU32=new Uint32Array(w);var E=o(i,"vertices",null);for(E?(this.vertexViewF32.set(E),this.vertexBuffer=s.createVertexBuffer(w,e.STATIC_DRAW)):this.vertexBuffer=s.createVertexBuffer(w.byteLength,e.DYNAMIC_DRAW),this.setVertexBuffer(),t=y.length-1;t>=0;t--)y[t].rebind();this.hasBooted=!0,s.on(l.RESIZE,this.resize,this),s.on(l.PRE_RENDER,this.onPreRender,this),s.on(l.RENDER,this.onRender,this),s.on(l.POST_RENDER,this.onPostRender,this),this.emit(a.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(t,e,i){var s=this.renderer;t===this.currentShader&&s.currentProgram===this.currentShader.program||(this.flush(),this.setVertexBuffer(i)&&!e&&(e=!0),t.bind(e,!1),this.currentShader=t);return this},getShaderByName:function(t){for(var e=this.shaders,i=0;ithis.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(t,e){t===this.width&&e===this.height||this.flush(),this.width=t,this.height=e;for(var i=this.renderTargets,s=0;s=0;i--){var s=e[i].rebind();t&&s!==t||(this.currentShader=s)}return this.activeTextures.length=0,this.emit(a.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},setVertexBuffer:function(t){if(void 0===t&&(t=this.vertexBuffer),t!==this.activeBuffer){var e=this.gl;return this.gl.bindBuffer(e.ARRAY_BUFFER,t),this.activeBuffer=t,!0}return!1},preBatch:function(t){return this.currentRenderTarget&&this.currentRenderTarget.bind(),this.onPreBatch(t),this},postBatch:function(t){return this.onDraw(this.currentRenderTarget),this.onPostBatch(t),this},onDraw:function(){},unbind:function(){this.currentRenderTarget&&this.currentRenderTarget.unbind()},flush:function(t){if(void 0===t&&(t=!1),this.vertexCount>0){this.emit(a.BEFORE_FLUSH,this,t),this.onBeforeFlush(t);var e=this.gl,i=this.vertexCount,s=this.currentShader.vertexSize,n=this.topology;if(this.active){var r,o,h;this.setVertexBuffer(),i===this.vertexCapacity?e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.DYNAMIC_DRAW):e.bufferSubData(e.ARRAY_BUFFER,0,this.bytes.subarray(0,i*s));var l=this.batch,u=this.activeTextures;if(this.forceZero)for(u[0]||e.activeTexture(e.TEXTURE0),r=0;r{var s=i(66458),n=i(89787),r=i(56694),a=i(86459),o=i(6659),h=i(81044),l=i(28621),u=i(16650),c=i(72283),d=i(35217),f=i(37410),p=i(40444),v=i(38203),g=i(75512),m=i(1217),y=!1,x=new r({Extends:o,initialize:function(t){o.call(this);var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!1,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference,preserveDrawingBuffer:e.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,roundPixels:e.roundPixels,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=a.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=t.canvas,this.blendModes=[],this.contextLost=!1,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.maxTextures=0,this.textureIndexes,this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=c,this.contextRestoredHandler=c,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats,this.compression,this.drawingBufferHeight=0,this.blankTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.maskSource=null,this.maskTarget=null,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(t){var e,i=this.game,s=this.canvas,n=t.backgroundColor;if(!(e=i.config.context?i.config.context:s.getContext("webgl",t.contextCreation)||s.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=e;var r=this;this.contextLostHandler=function(t){r.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),t.preventDefault()},s.addEventListener("webglcontextlost",this.contextLostHandler,!1),i.context=e;for(var o=0;o<=27;o++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[e.ZERO,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_REVERSE_SUBTRACT},this.glFormats=[e.BYTE,e.SHORT,e.UNSIGNED_BYTE,e.UNSIGNED_SHORT,e.FLOAT],this.glFuncMap={mat2:{func:e.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:e.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:e.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:e.uniform1f,length:1},"1fv":{func:e.uniform1fv,length:1},"1i":{func:e.uniform1i,length:1},"1iv":{func:e.uniform1iv,length:1},"2f":{func:e.uniform2f,length:2},"2fv":{func:e.uniform2fv,length:1},"2i":{func:e.uniform2i,length:2},"2iv":{func:e.uniform2iv,length:1},"3f":{func:e.uniform3f,length:3},"3fv":{func:e.uniform3fv,length:1},"3i":{func:e.uniform3i,length:3},"3iv":{func:e.uniform3iv,length:1},"4f":{func:e.uniform4f,length:4},"4fv":{func:e.uniform4fv,length:1},"4i":{func:e.uniform4i,length:4},"4iv":{func:e.uniform4iv,length:1}};var h=e.getSupportedExtensions();t.maxTextures&&-1!==t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),this.supportedExtensions=h;var l="ANGLE_instanced_arrays";this.instancedArraysExtension=h.indexOf(l)>-1?e.getExtension(l):null;var c="OES_vertex_array_object";this.vaoExtension=h.indexOf(c)>-1?e.getExtension(c):null,e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(n.redGL,n.greenGL,n.blueGL,n.alphaGL),this.mipmapFilter=e[t.mipmapFilter],this.maxTextures=g.checkShaderMax(e,t.maxTextures),this.textureIndexes=[];for(var f=0;f0&&s>0;if(a&&o){var h=a[0],l=a[1],u=a[2],c=a[3];o=h!==t||l!==e||u!==i||c!==s}o&&(this.flush(),r.scissor(t,n-e-s,i,s))},resetScissor:function(){var t=this.gl;t.enable(t.SCISSOR_TEST);var e=this.currentScissor;if(e){var i=e[0],s=e[1],n=e[2],r=e[3];n>0&&r>0&&t.scissor(i,this.drawingBufferHeight-s-r,n,r)}},popScissor:function(){var t=this.scissorStack;t.pop();var e=t[t.length-1];e&&this.setScissor(e[0],e[1],e[2],e[3]),this.currentScissor=e},hasActiveStencilMask:function(){var t=this.currentMask.mask,e=this.currentCameraMask.mask;return t&&t.isStencil||e&&e.isStencil},resetViewport:function(){var t=this.gl;t.viewport(0,0,this.width,this.height),this.drawingBufferHeight=t.drawingBufferHeight},setBlendMode:function(t,e){void 0===e&&(e=!1);var i=this.gl,s=this.blendModes[t];return!!(e||t!==a.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(s.equation),s.func.length>2?i.blendFuncSeparate(s.func[0],s.func[1],s.func[2],s.func[3]):i.blendFunc(s.func[0],s.func[1]),this.currentBlendMode=t,!0)},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>17&&this.blendModes[t]&&this.blendModes.splice(t,1),this},pushFramebuffer:function(t,e,i){return t===this.currentFramebuffer?this:(this.fboStack.push(t),this.setFramebuffer(t,e,i))},setFramebuffer:function(t,e,i){if(void 0===e&&(e=!1),void 0===i&&(i=!0),t===this.currentFramebuffer)return this;var s=this.gl,n=this.width,r=this.height;return t&&t.renderTexture&&i?(n=t.renderTexture.width,r=t.renderTexture.height):this.flush(),s.bindFramebuffer(s.FRAMEBUFFER,t),i&&s.viewport(0,0,n,r),e&&(t?(this.drawingBufferHeight=r,this.pushScissor(0,0,n,r)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=t,this},popFramebuffer:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!0);var i=this.fboStack;i.pop();var s=i[i.length-1];return s||(s=null),this.setFramebuffer(s,t,e),s},setProgram:function(t){return t!==this.currentProgram&&(this.flush(),this.gl.useProgram(t),this.currentProgram=t,!0)},resetProgram:function(){return this.gl.useProgram(this.currentProgram),this},createTextureFromSource:function(t,e,i,s,n){void 0===n&&(n=!1);var r=this.gl,o=r.NEAREST,h=r.NEAREST,u=r.CLAMP_TO_EDGE;e=t?t.width:e,i=t?t.height:i;var c=l(e,i);return c&&!n&&(u=r.REPEAT),s===a.ScaleModes.LINEAR&&this.config.antialias&&(o=c?this.mipmapFilter:r.LINEAR,h=r.LINEAR),t&&t.compressed&&(o=r.LINEAR,h=r.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,o,h,u,u,r.RGBA,t):this.createTexture2D(0,o,h,u,u,r.RGBA,null,e,i)},createTexture2D:function(t,e,i,s,n,r,a,o,h,u,c,d){u=null==u||u,void 0===c&&(c=!1),void 0===d&&(d=!1);var f=this.gl,p=f.createTexture();f.activeTexture(f.TEXTURE0);var v=f.getParameter(f.TEXTURE_BINDING_2D);f.bindTexture(f.TEXTURE_2D,p),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,e),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,i),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,n),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,s),f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),d&&f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,!0);var g=!1;if(null==a)f.texImage2D(f.TEXTURE_2D,t,r,o,h,0,r,f.UNSIGNED_BYTE,null),g=l(o,h);else if(a.compressed){o=a.width,h=a.height,g=a.generateMipmap;for(var m=0;m0)&&this.pipelines.setMulti().drawFillRect(e,i,s,r,g.getTintFromFloats(a.blueGL,a.greenGL,a.redGL,1),a.alphaGL)},getCurrentStencilMask:function(){var t=null,e=this.maskStack,i=this.currentCameraMask;return e.length>0?t=e[e.length-1]:i.mask&&i.mask.isStencil&&(t=i),t},postRenderCamera:function(t){var e=t.flashEffect,i=t.fadeEffect;if(e.isRunning||i.isRunning||i.isComplete){var s=this.pipelines.setMulti();e.postRenderWebGL(s,g.getTintFromFloats),i.postRenderWebGL(s,g.getTintFromFloats)}t.dirty=!1,this.popScissor(),t.mask&&(this.currentCameraMask.mask=null,t.mask.postRenderWebGL(this,t._maskCamera)),this.pipelines.postBatchCamera(t),t.emit(n.POST_RENDER,t)},preRender:function(){if(!this.contextLost){var t=this.gl;if(t.bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender){var e=this.config.backgroundColor;t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)}t.enable(t.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(h.PRE_RENDER)}},render:function(t,e,i){if(!this.contextLost){var s=e.length;if(this.emit(h.RENDER,t,i),this.preRenderCamera(i),0===s)return this.setBlendMode(a.BlendModes.NORMAL),void this.postRenderCamera(i);this.currentType="";for(var n=this.currentMask,r=0;r0&&r>0){s.activeTexture(s.TEXTURE0);var a=s.getParameter(s.TEXTURE_BINDING_2D);s.bindTexture(s.TEXTURE_2D,e),i&&s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!0),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,t),e.width=n,e.height=r,a&&s.bindTexture(s.TEXTURE_2D,a)}return e},createVideoTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var s=this.gl,n=s.NEAREST,r=s.NEAREST,a=t.videoWidth,o=t.videoHeight,h=s.CLAMP_TO_EDGE,u=l(a,o);return!e&&u&&(h=s.REPEAT),this.config.antialias&&(n=u?this.mipmapFilter:s.LINEAR,r=s.LINEAR),this.createTexture2D(0,n,r,h,h,s.RGBA,t,a,o,!0,!0,i)},updateVideoTexture:function(t,e,i){void 0===i&&(i=!1);var s=this.gl,n=t.videoWidth,r=t.videoHeight;if(n>0&&r>0){s.activeTexture(s.TEXTURE0);var a=s.getParameter(s.TEXTURE_BINDING_2D);s.bindTexture(s.TEXTURE_2D,e),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,i),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,t),e.width=n,e.height=r,a&&s.bindTexture(s.TEXTURE_2D,a)}return e},setTextureFilter:function(t,e){var i=this.gl,s=[i.LINEAR,i.NEAREST][e];i.activeTexture(i.TEXTURE0);var n=i.getParameter(i.TEXTURE_BINDING_2D);return i.bindTexture(i.TEXTURE_2D,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,s),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,s),n&&i.bindTexture(i.TEXTURE_2D,n),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.maskTarget.destroy(),this.maskSource.destroy(),this.pipelines.destroy(),this.removeAllListeners(),this.fboStack=[],this.maskStack=[],this.extensions={},this.textureIndexes=[],this.gl=null,this.game=null,this.canvas=null,this.contextLost=!0,this.currentMask=null,this.currentCameraMask=null}});t.exports=x},71305:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(71402),a=new s({initialize:function(t,e,i,s,n){this.pipeline=t,this.name=e,this.renderer=t.renderer,this.gl=this.renderer.gl,this.fragSrc=s,this.vertSrc=i,this.program=this.renderer.createProgram(i,s),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(n),this.createUniforms()},createAttributes:function(t){var e=0,i=0,s=[];this.vertexComponentCount=0;for(var a=0;a=0?(e.enableVertexAttribArray(f),e.vertexAttribPointer(f,o,h,d,i,l),a.enabled=!0,a.location=f):-1!==f&&e.disableVertexAttribArray(f)}else u?e.vertexAttribPointer(c,o,h,d,i,l):!u&&c>-1&&(e.disableVertexAttribArray(c),a.location=-1)}return this},createUniforms:function(){var t,e,i,s=this.gl,n=this.program,r=this.uniforms,a=s.getProgramParameter(n,s.ACTIVE_UNIFORMS);for(t=0;t0&&(e=e.substr(0,h),r.hasOwnProperty(e)||null!==(i=s.getUniformLocation(n,e))&&(r[e]={name:e,location:i,value1:null,value2:null,value3:null,value4:null}))}}return this},hasUniform:function(t){return this.uniforms.hasOwnProperty(t)},resetUniform:function(t){var e=this.uniforms[t];return e&&(e.value1=null,e.value2=null,e.value3=null,e.value4=null),this},setUniform1:function(t,e,i,s){var n=this.uniforms[e];return n?((s||n.value1!==i)&&(n.value1=i,this.renderer.setProgram(this.program),t.call(this.gl,n.location,i),this.pipeline.currentShader=this),this):this},setUniform2:function(t,e,i,s,n){var r=this.uniforms[e];return r?((n||r.value1!==i||r.value2!==s)&&(r.value1=i,r.value2=s,this.renderer.setProgram(this.program),t.call(this.gl,r.location,i,s),this.pipeline.currentShader=this),this):this},setUniform3:function(t,e,i,s,n,r){var a=this.uniforms[e];return a?((r||a.value1!==i||a.value2!==s||a.value3!==n)&&(a.value1=i,a.value2=s,a.value3=n,this.renderer.setProgram(this.program),t.call(this.gl,a.location,i,s,n),this.pipeline.currentShader=this),this):this},setUniform4:function(t,e,i,s,n,r,a){var o=this.uniforms[e];return o?((a||o.value1!==i||o.value2!==s||o.value3!==n||o.value4!==r)&&(o.value1=i,o.value2=s,o.value3=n,o.value4=r,this.renderer.setProgram(this.program),t.call(this.gl,o.location,i,s,n,r),this.pipeline.currentShader=this),this):this},setBoolean:function(t,e){return this.setUniform1(this.gl.uniform1i,t,Number(e))},set1f:function(t,e){return this.setUniform1(this.gl.uniform1f,t,e)},set2f:function(t,e,i){return this.setUniform2(this.gl.uniform2f,t,e,i)},set3f:function(t,e,i,s){return this.setUniform3(this.gl.uniform3f,t,e,i,s)},set4f:function(t,e,i,s,n){return this.setUniform4(this.gl.uniform4f,t,e,i,s,n)},set1fv:function(t,e){return this.setUniform1(this.gl.uniform1fv,t,e,!0)},set2fv:function(t,e){return this.setUniform1(this.gl.uniform2fv,t,e,!0)},set3fv:function(t,e){return this.setUniform1(this.gl.uniform3fv,t,e,!0)},set4fv:function(t,e){return this.setUniform1(this.gl.uniform4fv,t,e,!0)},set1iv:function(t,e){return this.setUniform1(this.gl.uniform1iv,t,e,!0)},set2iv:function(t,e){return this.setUniform1(this.gl.uniform2iv,t,e,!0)},set3iv:function(t,e){return this.setUniform1(this.gl.uniform3iv,t,e,!0)},set4iv:function(t,e){return this.setUniform1(this.gl.uniform4iv,t,e,!0)},set1i:function(t,e){return this.setUniform1(this.gl.uniform1i,t,e)},set2i:function(t,e,i){return this.setUniform2(this.gl.uniform2i,t,e,i)},set3i:function(t,e,i,s){return this.setUniform3(this.gl.uniform3i,t,e,i,s)},set4i:function(t,e,i,s,n){return this.setUniform4(this.gl.uniform4i,t,e,i,s,n)},setMatrix2fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix2fv,t,e,i,!0)},setMatrix3fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix3fv,t,e,i,!0)},setMatrix4fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix4fv,t,e,i,!0)},createProgram:function(t,e){void 0===t&&(t=this.vertSrc),void 0===e&&(e=this.fragSrc);var i=this.gl;return this.program&&i.deleteProgram(this.program),this.vertSrc=t,this.fragSrc=e,this.program=this.renderer.createProgram(t,e),this.createUniforms(),this.rebind()},destroy:function(){this.gl.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null,this.attributes=null,this.uniforms=null}});t.exports=a},71402:t=>{t.exports={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}}},55478:(t,e,i)=>{var s=i(71402),n=i(98611),r={PipelineManager:i(35217),Pipelines:i(62253),RenderTarget:i(37410),Utils:i(75512),WebGLPipeline:i(44775),WebGLRenderer:i(11857),WebGLShader:i(71305)};r=n(!1,r,s),t.exports=r},5583:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(91679),a=i(89053),o=i(71402),h=i(44775),l=new s({Extends:h,initialize:function(t){t.fragShader=n(t,"fragShader",r),t.vertShader=n(t,"vertShader",a),t.batchSize=n(t,"batchSize",1),t.vertices=n(t,"vertices",[-1,1,-1,-7,7,1]),t.attributes=n(t,"attributes",[{name:"inPosition",size:2,type:o.FLOAT}]),h.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(t,e){h.prototype.resize.call(this,t,e),this.set2f("uResolution",t,e)},beginMask:function(t,e,i){this.renderer.beginBitmapMask(t,i)},endMask:function(t,e,i){var s=this.gl,n=this.renderer,r=t.bitmapMask;r&&s&&(n.drawBitmapMask(r,e,this),i&&this.set2f("uResolution",i.width,i.height),this.set1i("uInvertMaskAlpha",t.invertAlpha),s.drawArrays(this.topology,0,3),i&&this.set2f("uResolution",this.width,this.height),s.bindTexture(s.TEXTURE_2D,null))}});t.exports=l},66901:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(65045),a=i(77310),o=i(69360),h=i(93736),l=i(44775),u=new s({Extends:a,initialize:function(t){var e=n(t,"fragShader",r);t.fragShader=e.replace("%LIGHT_COUNT%",t.game.renderer.config.maxLights),a.call(this,t),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.defaultNormalMap,this.currentNormalMap,this.lightsActive=!0,this.tempVec2=new h,this._tempMatrix=new o,this._tempMatrix2=new o},boot:function(){l.prototype.boot.call(this);var t=this.gl,e=t.createTexture();t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([127,127,255,255])),this.defaultNormalMap={glTexture:e}},onRender:function(t,e){var i=t.sys.lights;if(this.lightsActive=!1,i&&i.active){var s,n=i.getLights(e),r=n.length;this.lightsActive=!0;var a=this.renderer.height,o=e.matrix,h=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",e.x,e.y,e.rotation,e.zoom),this.set3f("uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),this.set1i("uLightCount",r),s=0;s0&&this.flush();var e=this.inverseRotationMatrix;if(t){var i=-t,s=Math.cos(i),n=Math.sin(i);e[1]=n,e[3]=-n,e[0]=e[4]=s}else e[0]=e[4]=1,e[1]=e[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,e),this.currentNormalMapRotation=t}},setTexture2D:function(t,e){var i=this.renderer;void 0===t&&(t=i.whiteTexture);var s=this.getNormalMap(e);this.isNewNormalMap(t,s)&&(this.flush(),this.createBatch(t),this.addTextureToBatch(s),this.currentNormalMap=s);var n=0;e&&e.parentContainer?n=e.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2).rotationNormalized:e&&(n=e.rotation);return this.setNormalMapRotation(n),0},setGameObject:function(t,e){void 0===e&&(e=t.frame);var i=e.glTexture,s=this.getNormalMap(t);if(this.isNewNormalMap(i,s)&&(this.flush(),this.createBatch(i),this.addTextureToBatch(s),this.currentNormalMap=s),t.parentContainer){var n=t.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(n.rotationNormalized)}else this.setNormalMapRotation(t.rotation);return 0},isNewNormalMap:function(t,e){return this.currentTexture!==t||this.currentNormalMap!==e},getNormalMap:function(t){var e;return t?t.displayTexture?e=t.displayTexture.dataSource[t.displayFrame.sourceIndex]:t.texture?e=t.texture.dataSource[t.frame.sourceIndex]:t.tileset&&(e=Array.isArray(t.tileset)?t.tileset[0].image.dataSource[0]:t.tileset.image.dataSource[0]):e=this.defaultNormalMap,e||(e=this.defaultNormalMap),e.glTexture},batchSprite:function(t,e,i){this.lightsActive&&a.prototype.batchSprite.call(this,t,e,i)},batchTexture:function(t,e,i,s,n,r,o,h,l,u,c,d,f,p,v,g,m,y,x,T,w,E,S,b,A,_,C,R,M,P,O,L){this.lightsActive&&a.prototype.batchTexture.call(this,t,e,i,s,n,r,o,h,l,u,c,d,f,p,v,g,m,y,x,T,w,E,S,b,A,_,C,R,M,P,O,L)},batchTextureFrame:function(t,e,i,s,n,r,o){this.lightsActive&&a.prototype.batchTextureFrame.call(this,t,e,i,s,n,r,o)}});t.exports=u},71264:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(77310),a=i(85060),o=i(18166),h=i(71402),l=i(44775),u=new s({Extends:r,initialize:function(t){t.fragShader=n(t,"fragShader",a),t.vertShader=n(t,"vertShader",o),t.attributes=n(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:h.UNSIGNED_BYTE,normalized:!0}]),t.forceZero=!0,r.call(this,t)},boot:function(){l.prototype.boot.call(this),this.set1i("uMainSampler",0)}});t.exports=u},77310:(t,e,i)=>{var s=i(56694),n=i(11117),r=i(72632),a=i(53787),o=i(15968),h=i(69360),l=i(75512),u=i(71402),c=i(44775),d=new s({Extends:c,initialize:function(t){var e=t.game.renderer,i=r(t,"fragShader",a);t.fragShader=l.parseFragmentShaderMaxTextures(i,e.maxTextures),t.vertShader=r(t,"vertShader",o),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:u.UNSIGNED_BYTE,normalized:!0}]),c.call(this,t),this._tempMatrix1=new h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.calcMatrix=new h,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){c.prototype.boot.call(this),this.currentShader.set1iv("uMainSampler",this.renderer.textureIndexes)},batchSprite:function(t,e,i){this.manager.set(this,t);var s=this._tempMatrix1,n=this._tempMatrix2,r=this._tempMatrix3,a=t.frame,o=a.glTexture,h=a.u0,u=a.v0,c=a.u1,d=a.v1,f=a.x,p=a.y,v=a.cutWidth,g=a.cutHeight,m=a.customPivot,y=t.displayOriginX,x=t.displayOriginY,T=-y+f,w=-x+p;if(t.isCropped){var E=t._crop;E.flipX===t.flipX&&E.flipY===t.flipY||a.updateCropUVs(E,t.flipX,t.flipY),h=E.u0,u=E.v0,c=E.u1,d=E.v1,v=E.width,g=E.height,T=-y+(f=E.x),w=-x+(p=E.y)}var S=1,b=1;t.flipX&&(m||(T+=-a.realWidth+2*y),S=-1),(t.flipY||a.source.isGLTexture&&!o.flipY)&&(m||(w+=-a.realHeight+2*x),b=-1);var A=t.x,_=t.y;e.roundPixels&&(A=Math.floor(A),_=Math.floor(_)),n.applyITRS(A,_,t.rotation,t.scaleX*S,t.scaleY*b),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),n.e=A,n.f=_):(n.e-=e.scrollX*t.scrollFactorX,n.f-=e.scrollY*t.scrollFactorY),s.multiply(n,r);var C=r.setQuad(T,w,T+v,w+g,!1),R=l.getTintAppendFloatAlpha,M=e.alpha,P=R(t.tintTopLeft,M*t._alphaTL),O=R(t.tintTopRight,M*t._alphaTR),L=R(t.tintBottomLeft,M*t._alphaBL),F=R(t.tintBottomRight,M*t._alphaBR);this.shouldFlush(6)&&this.flush();var D=this.setGameObject(t,a);this.manager.preBatch(t),this.batchQuad(t,C[0],C[1],C[2],C[3],C[4],C[5],C[6],C[7],h,u,c,d,P,O,L,F,t.tintFill,o,D),this.manager.postBatch(t)},batchTexture:function(t,e,i,s,n,r,a,o,h,l,u,c,d,f,p,v,g,m,y,x,T,w,E,S,b,A,_,C,R,M,P,O){this.manager.set(this,t);var L=this._tempMatrix1,F=this._tempMatrix2,D=this._tempMatrix3,k=m/i+_,I=y/s+C,B=(m+x)/i+_,N=(y+T)/s+C,Y=a,U=o,X=-v,z=-g;if(t.isCropped){var G=t._crop,W=G.width,V=G.height;Y=W,U=V,a=W,o=V;var H=m=G.x,j=y=G.y;c&&(H=x-G.x-W),d&&(j=T-G.y-V),k=H/i+_,I=j/s+C,B=(H+W)/i+_,N=(j+V)/s+C,X=-v+m,z=-g+y}c&&(Y*=-1,X+=a),(d^=!P&&e.isRenderTexture?1:0)&&(U*=-1,z+=o),R.roundPixels&&(n=Math.floor(n),r=Math.floor(r)),F.applyITRS(n,r,u,h,l),L.copyFrom(R.matrix),M?(L.multiplyWithOffset(M,-R.scrollX*f,-R.scrollY*p),F.e=n,F.f=r):(F.e-=R.scrollX*f,F.f-=R.scrollY*p),L.multiply(F,D);var K=D.setQuad(X,z,X+Y,z+U,!1);void 0===O&&(O=this.setTexture2D(e)),t&&this.manager.preBatch(t),this.batchQuad(t,K[0],K[1],K[2],K[3],K[4],K[5],K[6],K[7],k,I,B,N,w,E,S,b,A,e,O),t&&this.manager.postBatch(t)},batchTextureFrame:function(t,e,i,s,n,r,a){this.manager.set(this);var o=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2;a?o.multiply(a,h):h=o;var u=h.setQuad(e,i,e+t.width,i+t.height,!1),c=this.setTexture2D(t.source.glTexture);s=l.getTintAppendFloatAlpha(s,n),this.batchQuad(null,u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],t.u0,t.v0,t.u1,t.v1,s,s,s,s,0,t.glTexture,c)},batchFillRect:function(t,e,i,s,n,r){this.renderer.pipelines.set(this);var a=this.calcMatrix;r&&r.multiply(n,a);var o=a.setQuad(t,e,t+i,e+s,!1),h=this.fillTint;this.batchQuad(null,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],0,0,1,1,h.TL,h.TR,h.BL,h.BR,2)},batchFillTriangle:function(t,e,i,s,n,r,a,o){this.renderer.pipelines.set(this);var h=this.calcMatrix;o&&o.multiply(a,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,s),d=h.getY(i,s),f=h.getX(n,r),p=h.getY(n,r),v=this.fillTint;this.batchTri(null,l,u,c,d,f,p,0,0,1,1,v.TL,v.TR,v.BL,2)},batchStrokeTriangle:function(t,e,i,s,n,r,a,o,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=a,l[1].x=i,l[1].y=s,l[1].width=a,l[2].x=n,l[2].y=r,l[2].width=a,l[3].x=t,l[3].y=e,l[3].width=a,this.batchStrokePath(l,a,!1,o,h)},batchFillPath:function(t,e,i){this.renderer.pipelines.set(this);var s=this.calcMatrix;i&&i.multiply(e,s);for(var r,a,o=t.length,h=this.polygonCache,l=this.fillTint.TL,u=this.fillTint.TR,c=this.fillTint.BL,d=0;d0&&U[4]?this.batchQuad(null,F,D,M,P,U[0],U[1],U[2],U[3],0,0,1,1,I,B,N,Y,2):(X[0]=F,X[1]=D,X[2]=M,X[3]=P,X[4]=1),h&&X[4]?this.batchQuad(null,C,R,O,L,X[0],X[1],X[2],X[3],0,0,1,1,I,B,N,Y,2):(U[0]=C,U[1]=R,U[2]=O,U[3]=L,U[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,c.prototype.destroy.call(this),this}});t.exports=d},10919:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(83327),a=i(54677),o=i(44775),h=new s({Extends:o,initialize:function(t){t.vertShader=n(t,"vertShader",a),t.fragShader=n(t,"fragShader",r),t.attributes=n(t,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),o.call(this,t)},onRender:function(t,e){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",e.zoom)},batchPointLight:function(t,e,i,s,n,r,a,o,h,l,u,c){var d=t.color,f=t.intensity,p=t.radius,v=t.attenuation,g=d.r*f,m=d.g*f,y=d.b*f,x=e.alpha*t.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(i,s,u,c,p,v,g,m,y,x),this.batchLightVert(n,r,u,c,p,v,g,m,y,x),this.batchLightVert(a,o,u,c,p,v,g,m,y,x),this.batchLightVert(i,s,u,c,p,v,g,m,y,x),this.batchLightVert(a,o,u,c,p,v,g,m,y,x),this.batchLightVert(h,l,u,c,p,v,g,m,y,x),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(t,e,i,s,n,r,a,o,h,l){var u=this.vertexViewF32,c=this.vertexCount*this.currentShader.vertexComponentCount-1;u[++c]=t,u[++c]=e,u[++c]=i,u[++c]=s,u[++c]=n,u[++c]=r,u[++c]=a,u[++c]=o,u[++c]=h,u[++c]=l,this.vertexCount++}});t.exports=h},80486:(t,e,i)=>{var s=i(56694),n=i(65246),r=i(72632),a=i(12569),o=i(99365),h=i(44775),l=new s({Extends:h,initialize:function(t){t.renderTarget=r(t,"renderTarget",1),t.fragShader=r(t,"fragShader",a),t.vertShader=r(t,"vertShader",o),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.batchSize=1,t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],h.call(this,t),this.isPostFX=!0,this.gameObject,this.colorMatrix=new n,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){h.prototype.boot.call(this);var t=this.manager.UTILITY_PIPELINE;this.fullFrame1=t.fullFrame1,this.fullFrame2=t.fullFrame2,this.halfFrame1=t.halfFrame1,this.halfFrame2=t.halfFrame2,this.set1i("uMainSampler",0)},onDraw:function(t){this.bindAndDraw(t)},copyFrame:function(t,e,i,s,n){this.manager.copyFrame(t,e,i,s,n)},copyToGame:function(t){this.manager.copyToGame(t)},drawFrame:function(t,e,i){this.manager.drawFrame(t,e,i,this.colorMatrix)},blendFrames:function(t,e,i,s,n){this.manager.blendFrames(t,e,i,s,n)},blendFramesAdditive:function(t,e,i,s,n){this.manager.blendFramesAdditive(t,e,i,s,n)},clearFrame:function(t,e){this.manager.clearFrame(t,e)},blitFrame:function(t,e,i,s,n,r){this.manager.blitFrame(t,e,i,s,n,r)},copyFrameRect:function(t,e,i,s,n,r,a,o){this.manager.copyFrameRect(t,e,i,s,n,r,a,o)},bindAndDraw:function(t,e,i,s,n){void 0===i&&(i=!0),void 0===s&&(s=!0);var r=this.gl,a=this.renderer;this.bind(n),this.set1i("uMainSampler",0),e?(r.viewport(0,0,e.width,e.height),r.bindFramebuffer(r.FRAMEBUFFER,e.framebuffer),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.texture,0),i&&(s?r.clearColor(0,0,0,0):r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT))):(a.popFramebuffer(!1,!1,!1),a.currentFramebuffer||r.viewport(0,0,a.width,a.height)),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,t.texture),r.bufferData(r.ARRAY_BUFFER,this.vertexData,r.STATIC_DRAW),r.drawArrays(r.TRIANGLES,0,6),e&&(r.bindTexture(r.TEXTURE_2D,null),r.bindFramebuffer(r.FRAMEBUFFER,null))}});t.exports=l},21213:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(77310),a=new s({Extends:r,initialize:function(t){t.topology=5,t.batchSize=n(t,"batchSize",256),r.call(this,t)}});t.exports=a},51212:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(77310),a=i(85060),o=i(18166),h=i(44775),l=new s({Extends:r,initialize:function(t){t.fragShader=n(t,"fragShader",a),t.vertShader=n(t,"vertShader",o),t.forceZero=!0,r.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0)}});t.exports=l},38964:(t,e,i)=>{var s=i(95723),n=i(79993),r=i(56694),a=i(72632),o=i(77310),h=i(12569),l=i(74118),u=i(37410),c=i(85060),d=i(18166),f=i(44775),p=new r({Extends:o,initialize:function(t){var e=a(t,"fragShader",h),i=a(t,"vertShader",d),s=a(t,"drawShader",h),n=[{name:"DrawSprite",fragShader:c,vertShader:d},{name:"CopySprite",fragShader:e,vertShader:i},{name:"DrawGame",fragShader:s,vertShader:d}],r=a(t,"shaders",[]);t.shaders=n.concat(r),t.vertShader||(t.vertShader=i),t.batchSize=1,o.call(this,t),this.isSpriteFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new l,this.targetBounds=new l,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){f.prototype.boot.call(this);var t=this.shaders,e=this.renderer;this.drawSpriteShader=t[0],this.copyShader=t[1],this.gameShader=t[2],this.fsTarget=new u(e,e.width,e.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var i=new ArrayBuffer(168);this.quadVertexData=i,this.quadVertexViewF32=new Float32Array(i),this.quadVertexBuffer=e.createVertexBuffer(i,this.gl.STATIC_DRAW),this.onResize(e.width,e.height),this.currentShader=this.copyShader},onResize:function(t,e){var i=this.quadVertexViewF32;i[1]=e,i[22]=e,i[14]=t,i[28]=t,i[35]=t,i[36]=e},batchQuad:function(t,e,i,s,r,a,o,h,l,u,c,d,f,p,v,g,m,y,x){var T=Math.min(e,s,a,h),w=Math.min(i,r,o,l),E=Math.max(e,s,a,h)-T,S=Math.max(i,r,o,l)-w,b=this.spriteBounds.setTo(T,w,E,S),A=t?t.fxPadding:0,_=E+2*A,C=S+2*A,R=Math.abs(Math.max(_,C)),M=this.manager.getRenderTarget(R),P=this.targetBounds.setTo(0,0,M.width,M.height);n(P,b.centerX,b.centerY),this.tempSprite=t;var O=this.gl,L=this.renderer;this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.flipProjectionMatrix(!0),t&&(this.onDrawSprite(t,M),t.onFX(this));var F=this.fsTarget;return this.flush(),O.viewport(0,0,L.width,L.height),O.bindFramebuffer(O.FRAMEBUFFER,F.framebuffer),O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,F.texture,0),O.clearColor(0,0,0,0),O.clear(O.COLOR_BUFFER_BIT),this.setTexture2D(x),this.batchVert(e,i,u,c,0,y,p),this.batchVert(s,r,u,f,0,y,g),this.batchVert(a,o,d,f,0,y,m),this.batchVert(e,i,u,c,0,y,p),this.batchVert(a,o,d,f,0,y,m),this.batchVert(h,l,d,c,0,y,v),this.flush(),this.flipProjectionMatrix(!1),O.activeTexture(O.TEXTURE0),O.bindTexture(O.TEXTURE_2D,M.texture),O.copyTexSubImage2D(O.TEXTURE_2D,0,0,0,P.x,P.y,P.width,P.height),O.bindFramebuffer(O.FRAMEBUFFER,null),O.bindTexture(O.TEXTURE_2D,null),this.onBatch(t),this.currentShader=this.copyShader,this.onDraw(M,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(t,e,i,n,r,a){void 0===i&&(i=!0),void 0===n&&(n=!0),void 0===r&&(r=!1),void 0===a&&(a=this.copyShader);var o=this.gl,h=this.tempSprite;this.currentShader=a;var l=this.setVertexBuffer(this.quadVertexBuffer);if(a.bind(l,!1),this.set1i("uMainSampler",0),h.onFXCopy(this),this.onCopySprite(t,e,h),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,t.texture),t.height>e.height)o.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e);else{var u=e.height-t.height;o.viewport(0,u,t.width,t.height),this.resetUVs()}if(o.bindFramebuffer(o.FRAMEBUFFER,e.framebuffer),o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,e.texture,0),i&&(o.clearColor(0,0,0,Number(!n)),o.clear(o.COLOR_BUFFER_BIT)),r){var c=this.renderer.currentBlendMode;this.renderer.setBlendMode(s.ERASE)}o.bufferData(o.ARRAY_BUFFER,this.quadVertexData,o.STATIC_DRAW),o.drawArrays(o.TRIANGLES,0,6),r&&this.renderer.setBlendMode(c),o.bindFramebuffer(o.FRAMEBUFFER,null)},blendFrames:function(t,e,i,s,n){this.manager.blendFrames(t,e,i,s,n)},blendFramesAdditive:function(t,e,i,s,n){this.manager.blendFramesAdditive(t,e,i,s,n)},drawToGame:function(t){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(t)},copyToGame:function(t){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(t)},bindAndDraw:function(t){var e=this.gl,i=this.renderer;this.set1i("uMainSampler",0),i.popFramebuffer(!1,!1,!1),i.currentFramebuffer||e.viewport(0,0,i.width,i.height),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(t.texture);var s=this._tempMatrix1.loadIdentity(),n=this.targetBounds.x,r=this.targetBounds.y,a=n+t.width,o=r+t.height,h=s.getX(n,r),l=s.getX(n,o),u=s.getX(a,o),c=s.getX(a,r),d=s.getY(n,r),f=s.getY(n,o),p=s.getY(a,o),v=s.getY(a,r);this.batchVert(h,d,0,0,0,0,16777215),this.batchVert(l,f,0,1,0,0,16777215),this.batchVert(u,p,1,1,0,0,16777215),this.batchVert(h,d,0,0,0,0,16777215),this.batchVert(u,p,1,1,0,0,16777215),this.batchVert(c,v,1,0,0,0,16777215),this.flush(),this.tempSprite=null},onDraw:function(t){this.drawToGame(t)},setUVs:function(t,e,i,s,n,r,a,o){var h=this.quadVertexViewF32;h[2]=t,h[3]=e,h[9]=i,h[10]=s,h[16]=n,h[17]=r,h[23]=t,h[24]=e,h[30]=n,h[31]=r,h[37]=a,h[38]=o},setTargetUVs:function(t,e){var i=e.height/t.height;i=i>.5?.5-(i-.5):.5-i+.5,this.setUVs(0,i,0,1+i,1,1+i,1,i)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)},destroy:function(){return this.gl.deleteBuffer(this.quadVertexBuffer),this.drawSpriteShader=null,this.copyShader=null,this.gameShader=null,this.quadVertexData=null,this.quadVertexBuffer=null,this.quadVertexViewF32=null,this.fsTarget=null,this.tempSprite=null,o.prototype.destroy.call(this),this}});t.exports=p},60848:(t,e,i)=>{var s=i(2529),n=i(95723),r=i(56694),a=i(65246),o=i(37486),h=i(79060),l=i(72632),u=i(98921),c=i(99365),d=i(44775),f=new r({Extends:d,initialize:function(t){t.renderTarget=l(t,"renderTarget",[{scale:1},{scale:1},{scale:.5},{scale:.5}]),t.vertShader=l(t,"vertShader",c),t.shaders=l(t,"shaders",[{name:"Copy",fragShader:h},{name:"AddBlend",fragShader:s},{name:"LinearBlend",fragShader:u},{name:"ColorMatrix",fragShader:o}]),t.attributes=l(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],t.batchSize=1,d.call(this,t),this.colorMatrix=new a,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){d.prototype.boot.call(this);var t=this.shaders,e=this.renderTargets;this.copyShader=t[0],this.addShader=t[1],this.linearShader=t[2],this.colorMatrixShader=t[3],this.fullFrame1=e[0],this.fullFrame2=e[1],this.halfFrame1=e[2],this.halfFrame2=e[3]},copyFrame:function(t,e,i,s,n){void 0===i&&(i=1),void 0===s&&(s=!0),void 0===n&&(n=!0);var r=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,t.texture),e?(r.viewport(0,0,e.width,e.height),r.bindFramebuffer(r.FRAMEBUFFER,e.framebuffer),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.texture,0)):r.viewport(0,0,t.width,t.height),s&&(n?r.clearColor(0,0,0,0):r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT)),r.bufferData(r.ARRAY_BUFFER,this.vertexData,r.STATIC_DRAW),r.drawArrays(r.TRIANGLES,0,6),r.bindFramebuffer(r.FRAMEBUFFER,null),r.bindTexture(r.TEXTURE_2D,null)},blitFrame:function(t,e,i,s,r,a,o){void 0===i&&(i=1),void 0===s&&(s=!0),void 0===r&&(r=!0),void 0===a&&(a=!1),void 0===o&&(o=!1);var h=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,t.texture),t.height>e.height)h.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e);else{var l=e.height-t.height;h.viewport(0,l,t.width,t.height)}if(h.bindFramebuffer(h.FRAMEBUFFER,e.framebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,e.texture,0),s&&(r?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),a){var u=this.renderer.currentBlendMode;this.renderer.setBlendMode(n.ERASE)}o&&this.flipY(),h.bufferData(h.ARRAY_BUFFER,this.vertexData,h.STATIC_DRAW),h.drawArrays(h.TRIANGLES,0,6),a&&this.renderer.setBlendMode(u),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(t,e,i,s,n,r,a,o){void 0===a&&(a=!0),void 0===o&&(o=!0);var h=this.gl;h.bindFramebuffer(h.FRAMEBUFFER,t.framebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,t.texture,0),a&&(o?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,e.texture),h.copyTexSubImage2D(h.TEXTURE_2D,0,0,0,i,s,n,r),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null)},copyToGame:function(t){var e=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,t.texture),e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.STATIC_DRAW),e.drawArrays(e.TRIANGLES,0,6)},drawFrame:function(t,e,i,s){void 0===i&&(i=!0),void 0===s&&(s=this.colorMatrix);var n=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",s.getData()),this.set1f("uAlpha",s.alpha),n.activeTexture(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,t.texture),e?(n.viewport(0,0,e.width,e.height),n.bindFramebuffer(n.FRAMEBUFFER,e.framebuffer),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e.texture,0)):n.viewport(0,0,t.width,t.height),i?n.clearColor(0,0,0,0):n.clearColor(0,0,0,1),n.clear(n.COLOR_BUFFER_BIT),n.bufferData(n.ARRAY_BUFFER,this.vertexData,n.STATIC_DRAW),n.drawArrays(n.TRIANGLES,0,6),n.bindFramebuffer(n.FRAMEBUFFER,null),n.bindTexture(n.TEXTURE_2D,null)},blendFrames:function(t,e,i,s,n,r){void 0===s&&(s=1),void 0===n&&(n=!0),void 0===r&&(r=this.linearShader);var a=this.gl;this.setShader(r),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",s),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,t.texture),a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,e.texture),i?(a.bindFramebuffer(a.FRAMEBUFFER,i.framebuffer),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,i.texture,0),a.viewport(0,0,i.width,i.height)):a.viewport(0,0,t.width,t.height),n?a.clearColor(0,0,0,0):a.clearColor(0,0,0,1),a.clear(a.COLOR_BUFFER_BIT),a.bufferData(a.ARRAY_BUFFER,this.vertexData,a.STATIC_DRAW),a.drawArrays(a.TRIANGLES,0,6),a.bindFramebuffer(a.FRAMEBUFFER,null),a.bindTexture(a.TEXTURE_2D,null)},blendFramesAdditive:function(t,e,i,s,n){this.blendFrames(t,e,i,s,n,this.addShader)},clearFrame:function(t,e){void 0===e&&(e=!0);var i=this.gl;i.viewport(0,0,t.width,t.height),i.bindFramebuffer(i.FRAMEBUFFER,t.framebuffer),e?i.clearColor(0,0,0,0):i.clearColor(0,0,0,1),i.clear(i.COLOR_BUFFER_BIT);var s=this.renderer.currentFramebuffer;i.bindFramebuffer(i.FRAMEBUFFER,s)},setUVs:function(t,e,i,s,n,r,a,o){var h=this.vertexViewF32;h[2]=t,h[3]=e,h[6]=i,h[7]=s,h[10]=n,h[11]=r,h[14]=t,h[15]=e,h[18]=n,h[19]=r,h[22]=a,h[23]=o},setTargetUVs:function(t,e){var i=e.height/t.height;i=i>.5?.5-(i-.5):.5-i+.5,this.setUVs(0,i,0,1+i,1,1+i,1,i)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});t.exports=f},65641:t=>{t.exports={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline",MOBILE_PIPELINE:"MobilePipeline"}},68726:t=>{t.exports="pipelineafterflush"},67186:t=>{t.exports="pipelinebeforeflush"},22709:t=>{t.exports="pipelinebind"},74469:t=>{t.exports="pipelineboot"},93953:t=>{t.exports="pipelinedestroy"},51687:t=>{t.exports="pipelinerebind"},25034:t=>{t.exports="pipelineresize"},18970:(t,e,i)=>{t.exports={AFTER_FLUSH:i(68726),BEFORE_FLUSH:i(67186),BIND:i(22709),BOOT:i(74469),DESTROY:i(93953),REBIND:i(51687),RESIZE:i(25034)}},62253:(t,e,i)=>{var s=i(65641),n=i(98611),r={BitmapMaskPipeline:i(5583),Events:i(18970),LightPipeline:i(66901),MobilePipeline:i(71264),MultiPipeline:i(77310),PointLightPipeline:i(10919),PostFXPipeline:i(80486),RopePipeline:i(21213),SinglePipeline:i(51212),SpriteFXPipeline:i(38964),UtilityPipeline:i(60848)};r=n(!1,r,s),t.exports=r},2529:t=>{t.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = frame1 + frame2 * uStrength;","}",""].join("\n")},91679:t=>{t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;",""," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);",""," if (!uInvertMaskAlpha)"," {"," mainColor *= maskColor.a;"," }"," else"," {"," mainColor *= (1.0 - maskColor.a);"," }",""," gl_FragColor = mainColor;","}",""].join("\n")},89053:t=>{t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join("\n")},37486:t=>{t.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);",""," if (uAlpha == 0.0)"," {"," gl_FragColor = c;",""," return;"," }",""," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }",""," vec4 result;",""," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];",""," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);",""," rgb *= result.a;",""," gl_FragColor = vec4(rgb, result.a);","}",""].join("\n")},79060:t=>{t.exports=["#define SHADER_NAME PHASER_COPY_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uBrightness;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}",""].join("\n")},65045:t=>{t.exports=["#define SHADER_NAME PHASER_LIGHT_FS","","precision mediump float;","","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","","const int kMaxLights = %LIGHT_COUNT%;","","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","uniform int uLightCount;","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);",""," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;",""," for (int index = 0; index < kMaxLights; ++index)"," {"," if (index < uLightCount)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }"," }",""," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);",""," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}",""].join("\n")},98921:t=>{t.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}",""].join("\n")},53787:t=>{t.exports=["#define SHADER_NAME PHASER_MULTI_FS","","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","","uniform sampler2D uMainSampler[%count%];","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec4 texture;",""," %forloop%",""," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},15968:t=>{t.exports=["#define SHADER_NAME PHASER_MULTI_VS","","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join("\n")},83327:t=>{t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform float uCameraZoom;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);",""," float distToSurf = length(center - gl_FragCoord.xy);",""," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);",""," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);",""," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;",""," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}",""].join("\n")},54677:t=>{t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);",""," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}",""].join("\n")},12569:t=>{t.exports=["#define SHADER_NAME PHASER_POSTFX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}",""].join("\n")},99365:t=>{t.exports=["#define SHADER_NAME PHASER_QUAD_VS","","precision mediump float;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","","varying vec2 outFragCoord;","varying vec2 outTexCoord;","","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;",""," gl_Position = vec4(inPosition, 0, 1);","}",""].join("\n")},85060:t=>{t.exports=["#define SHADER_NAME PHASER_SINGLE_FS","","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},18166:t=>{t.exports=["#define SHADER_NAME PHASER_SINGLE_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join("\n")},756:(t,e,i)=>{var s=i(55301),n=i(56694),r=i(6659),a=i(40444),o=i(97081),h=i(74181),l=i(2893),u=i(9229),c=i(72283),d=i(74118),f=i(90881),p=i(84314),v=i(93736),g=i(47751),m=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.canvas,this.canvasBounds=new d,this.parent=null,this.parentIsWindow=!1,this.parentSize=new f,this.gameSize=new f,this.baseSize=new f,this.displaySize=new f,this.scaleMode=s.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new v(1,1),this.autoRound=!1,this.autoCenter=s.CENTER.NO_CENTER,this.orientation=s.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.domlisteners={orientationChange:c,windowResize:c,fullScreenChange:c,fullScreenError:c}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(o.BOOT,this.boot,this)},boot:function(){var t=this.game;this.canvas=t.canvas,this.fullscreen=t.device.fullscreen,this.scaleMode!==s.SCALE_MODE.RESIZE&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===s.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),t.events.on(o.PRE_STEP,this.step,this),t.events.once(o.READY,this.refresh,this),t.events.once(o.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e=t.width,i=t.height,n=t.scaleMode,r=t.zoom,a=t.autoRound;if("string"==typeof e){var o=this.parentSize.width;0===o&&(o=window.innerWidth);var h=parseInt(e,10)/100;e=Math.floor(o*h)}if("string"==typeof i){var l=this.parentSize.height;0===l&&(l=window.innerHeight);var c=parseInt(i,10)/100;i=Math.floor(l*c)}this.scaleMode=n,this.autoRound=a,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,a&&(e=Math.floor(e),i=Math.floor(i)),this.gameSize.setSize(e,i),r===s.ZOOM.MAX_ZOOM&&(r=this.getMaxZoom()),this.zoom=r,1!==r&&(this._resetZoom=!0),this.baseSize.setSize(e,i),a&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),t.minWidth>0&&this.displaySize.setMin(t.minWidth*r,t.minHeight*r),t.maxWidth>0&&this.displaySize.setMax(t.maxWidth*r,t.maxHeight*r),this.displaySize.setSize(e,i),this.orientation=u(e,i)},getParent:function(t){var e=t.parent;if(null!==e){if(this.parent=l(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==s.SCALE_MODE.NONE){var i=this.parent.getBoundingClientRect();(this.parentIsWindow||0===i.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",i=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==i.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(t.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var t=this.parentSize,e=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(e.height=h(!0));var i=e.width,s=e.height;if(t.width!==i||t.height!==s)return t.setSize(i,s),!0;if(this.canvas){var n=this.canvasBounds,r=this.canvas.getBoundingClientRect();if(r.x!==n.x||r.y!==n.y)return!0}return!1},lockOrientation:function(t){var e=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!e&&e.call(screen,t)},setParentSize:function(t,e){return this.parentSize.setSize(t,e),this.refresh()},setGameSize:function(t,e){var i=this.autoRound;i&&(t=Math.floor(t),e=Math.floor(e));var s=this.width,n=this.height;return this.gameSize.resize(t,e),this.baseSize.resize(t,e),i&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(t/e),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(s,n)},resize:function(t,e){var i=this.zoom,s=this.autoRound;s&&(t=Math.floor(t),e=Math.floor(e));var n=this.width,r=this.height;this.gameSize.resize(t,e),this.baseSize.resize(t,e),s&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t*i,e*i),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var a=this.canvas.style,o=t*i,h=e*i;return s&&(o=Math.floor(o),h=Math.floor(h)),o===t&&h===e||(a.width=o+"px",a.height=h+"px"),this.refresh(n,r)},setZoom:function(t){return this.zoom=t,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var i=this.game.domContainer;if(i){this.baseSize.setCSS(i);var s=this.canvas.style,n=i.style;n.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",n.marginLeft=s.marginLeft,n.marginTop=s.marginTop}return this.emit(a.RESIZE,this.gameSize,this.baseSize,this.displaySize,t,e),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var t=u(this.width,this.height);t!==this.orientation&&(this.orientation=t,this.emit(a.ORIENTATION_CHANGE,t))}},updateScale:function(){var t,e,i=this.canvas.style,n=this.gameSize.width,r=this.gameSize.height,a=this.zoom,o=this.autoRound;this.scaleMode===s.SCALE_MODE.NONE?(this.displaySize.setSize(n*a,r*a),t=this.displaySize.width,e=this.displaySize.height,o&&(t=Math.floor(t),e=Math.floor(e)),this._resetZoom&&(i.width=t+"px",i.height=e+"px",this._resetZoom=!1)):this.scaleMode===s.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),t=this.displaySize.width,e=this.displaySize.height,o&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width,e=this.displaySize.height,o&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=p(this.parentSize.width,this.gameSize.width,0,!0),e=p(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t=this.autoCenter;if(t!==s.CENTER.NO_CENTER){var e=this.canvas,i=e.style,n=e.getBoundingClientRect(),r=n.width,a=n.height,o=Math.floor((this.parentSize.width-r)/2),h=Math.floor((this.parentSize.height-a)/2);t===s.CENTER.CENTER_HORIZONTALLY?h=0:t===s.CENTER.CENTER_VERTICALLY&&(o=0),i.marginLeft=o+"px",i.marginTop=h+"px"}},updateBounds:function(){var t=this.canvasBounds,e=this.canvas.getBoundingClientRect();t.x=e.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),t.y=e.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),t.width=e.width,t.height=e.height},transformX:function(t){return(t-this.canvasBounds.left)*this.displayScale.x},transformY:function(t){return(t-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(t){void 0===t&&(t={navigationUI:"hide"});var e=this.fullscreen;if(e.available){if(!e.active){var i=this.getFullscreenTarget();e.keyboard?i[e.request](Element.ALLOW_KEYBOARD_INPUT):i[e.request](t)}}else this.emit(a.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(a.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(a.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var t=document.createElement("div");t.style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0}this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas));return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var t=this.fullscreenTarget;if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(this.canvas,t),e.removeChild(t)}}},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(a.FULLSCREEN_UNSUPPORTED),!1;t.active&&document[t.cancel](),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(a.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var t=this,e=this.domlisteners;if(e.orientationChange=function(){t.updateBounds(),t._checkOrientation=!0,t.dirty=!0},e.windowResize=function(){t.updateBounds(),t.dirty=!0},window.addEventListener("orientationchange",e.orientationChange,!1),window.addEventListener("resize",e.windowResize,!1),this.fullscreen.available){e.fullScreenChange=function(e){return t.onFullScreenChange(e)},e.fullScreenError=function(e){return t.onFullScreenError(e)};["webkit","moz",""].forEach((function(t){document.addEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",e.fullScreenError,!1)})),document.addEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.addEventListener("MSFullscreenError",e.fullScreenError,!1)}},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():this.stopFullscreen()},onFullScreenError:function(){this.removeFullscreenTarget()},getViewPort:function(t,e){t instanceof g||(e=t,t=void 0),void 0===e&&(e=new d);var i,s,n=this.baseSize,r=this.parentSize,a=this.canvasBounds,o=this.displayScale,h=a.x>=0?0:-a.x*o.x,l=a.y>=0?0:-a.y*o.y;return i=r.width>=a.width?n.width:n.width-(a.width-r.width)*o.x,s=r.height>=a.height?n.height:n.height-(a.height-r.height)*o.y,e.setTo(h,l,i,s),t&&(e.width/=t.zoomX,e.height/=t.zoomY,e.centerX=t.centerX+t.scrollX,e.centerY=t.centerY+t.scrollY),e},step:function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var t=this.domlisteners;window.removeEventListener("orientationchange",t.orientationChange,!1),window.removeEventListener("resize",t.windowResize,!1);["webkit","moz",""].forEach((function(e){document.removeEventListener(e+"fullscreenchange",t.fullScreenChange,!1),document.removeEventListener(e+"fullscreenerror",t.fullScreenError,!1)})),document.removeEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",t.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===s.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===s.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=m},35098:t=>{t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},53539:t=>{t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},12637:t=>{t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},10217:t=>{t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},55301:(t,e,i)=>{var s={CENTER:i(35098),ORIENTATION:i(53539),SCALE_MODE:i(12637),ZOOM:i(10217)};t.exports=s},82085:t=>{t.exports="enterfullscreen"},11826:t=>{t.exports="fullscreenfailed"},56691:t=>{t.exports="fullscreenunsupported"},34739:t=>{t.exports="leavefullscreen"},26681:t=>{t.exports="orientationchange"},11428:t=>{t.exports="resize"},40444:(t,e,i)=>{t.exports={ENTER_FULLSCREEN:i(82085),FULLSCREEN_FAILED:i(11826),FULLSCREEN_UNSUPPORTED:i(56691),LEAVE_FULLSCREEN:i(34739),ORIENTATION_CHANGE:i(26681),RESIZE:i(11428)}},86754:(t,e,i)=>{var s=i(98611),n=i(55301),r={Center:i(35098),Events:i(40444),Orientation:i(53539),ScaleManager:i(756),ScaleModes:i(12637),Zoom:i(10217)};r=s(!1,r,n.CENTER),r=s(!1,r,n.ORIENTATION),r=s(!1,r,n.SCALE_MODE),r=s(!1,r,n.ZOOM),t.exports=r},47736:(t,e,i)=>{var s=i(72632),n=i(40587);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=s(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(n(e+"Physics")),i)for(var a in i)a=n(a.concat("Physics")),-1===r.indexOf(a)&&r.push(a);return r}}},91088:(t,e,i)=>{var s=i(72632);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=s(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},90415:t=>{t.exports={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},87157:(t,e,i)=>{var s=i(56694),n=i(63946),r=new s({initialize:function(t){this.sys=new n(this,t),this.game,this.anims,this.cache,this.registry,this.sound,this.textures,this.events,this.cameras,this.add,this.make,this.scene,this.children,this.lights,this.data,this.input,this.load,this.time,this.tweens,this.physics,this.matter,this.scale,this.plugins,this.renderer},update:function(){}});t.exports=r},13553:(t,e,i)=>{var s=i(56694),n=i(92980),r=i(7599),a=i(97081),o=i(10850),h=i(683),l=i(72283),u=i(87157),c=i(63946),d=new s({initialize:function(t,e){if(this.game=t,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,e){Array.isArray(e)||(e=[e]);for(var i=0;i-1&&(delete this.keys[s],this.scenes.splice(i,1),this._start.indexOf(s)>-1&&(i=this._start.indexOf(s),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,s=i.settings;i.sceneUpdate=l,t.init&&(t.init.call(t,s.data),s.status=n.INIT,s.isTransition&&i.events.emit(r.TRANSITION_INIT,s.transitionFrom,s.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),s.status=n.LOADING,e.once(h.COMPLETE,this.loadComplete,this),e.start()):this.create(t)},loadComplete:function(t){this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(t.scene)},payloadComplete:function(t){this.bootScene(t.scene)},update:function(t,e){this.processQueue(),this.isProcessing=!0;for(var i=this.scenes.length-1;i>=0;i--){var s=this.scenes[i].sys;s.settings.status>n.START&&s.settings.status<=n.RUNNING&&s.step(t,e)}},render:function(t){for(var e=0;e=n.LOADING&&i.settings.status=n.START&&a<=n.CREATING)return this;if(a>=n.RUNNING&&a<=n.SLEEPING)r.shutdown(),r.sceneUpdate=l,r.start(e);else if(r.sceneUpdate=l,r.start(e),r.load&&(s=r.load),s&&r.settings.hasOwnProperty("pack")&&(s.reset(),s.addPack({payload:r.settings.pack})))return r.settings.status=n.LOADING,s.once(h.COMPLETE,this.payloadComplete,this),s.start(),this;return this.bootScene(i),this},stop:function(t,e){var i=this.getScene(t);if(i&&!i.sys.isTransitioning()&&i.sys.settings.status!==n.SHUTDOWN){var s=i.sys.load;s.off(h.COMPLETE,this.loadComplete,this),s.off(h.COMPLETE,this.payloadComplete,this),i.sys.shutdown(e)}return this},switch:function(t,e){var i=this.getScene(t),s=this.getScene(e);return i&&s&&i!==s&&(this.sleep(t),this.isSleeping(e)?this.wake(e):this.start(e)),this},getAt:function(t){return this.scenes[t]},getIndex:function(t){var e=this.getScene(t);return this.scenes.indexOf(e)},bringToTop:function(t){if(this.isProcessing)this._queue.push({op:"bringToTop",keyA:t,keyB:null});else{var e=this.getIndex(t);if(-1!==e&&e0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,s=this.getScene(t),n=this.getAt(i);this.scenes[e]=n,this.scenes[i]=s}}return this},moveUp:function(t){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(ei),0,n)}}return this},moveBelow:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:t,keyB:e});else{var i=this.getIndex(t),s=this.getIndex(e);if(-1!==i&&-1!==s&&s>i){var n=this.getAt(s);this.scenes.splice(s,1),0===i?this.scenes.unshift(n):this.scenes.splice(i-(s{var s=i(82897),n=i(56694),r=i(7599),a=i(72632),o=i(91963),h=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.pluginStart,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=a(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var s=a(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=s,this._willSleep=a(t,"sleep",!1),this._willRemove=a(t,"remove",!1);var n=a(t,"onUpdate",null);n&&(this._onUpdate=n,this._onUpdateScope=a(t,"onUpdateScope",this.scene));var o=a(t,"allowInput",!1);this.settings.transitionAllowInput=o;var h=i.sys.settings;h.isTransition=!0,h.transitionFrom=this.scene,h.transitionDuration=s,h.transitionAllowInput=o,a(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):a(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake(a(t,"data")):this.manager.start(e,a(t,"data"));var l=a(t,"onStart",null),u=a(t,"onStartScope",this.scene);return l&&l.call(u,this.scene,i,s),this.systems.events.emit(r.TRANSITION_OUT,i,s),this.systems.events.on(r.UPDATE,this.step,this),!0},checkValidTransition:function(t){return!(!t||t.sys.isActive()||t.sys.isTransitioning()||t===this.scene||this.systems.isTransitioning())},step:function(t,e){this._elapsed+=e,this.transitionProgress=s(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off(r.UPDATE,this.step,this),t.events.emit(r.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(t,e,i,s){return this.manager.add(t,e,i,s)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var s=this.manager.getScene(e);return s&&s.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getStatus:function(t){var e=this.manager.getScene(t);if(e)return e.sys.getStatus()},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(r.SHUTDOWN,this.shutdown,this),t.off(r.POST_UPDATE,this.step,this),t.off(r.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});o.register("ScenePlugin",h,"scenePlugin"),t.exports=h},36765:(t,e,i)=>{var s=i(92980),n=i(10850),r=i(30657),a=i(90415),o={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:s.PENDING,key:n(t,"key",""),active:n(t,"active",!1),visible:n(t,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:n(t,"pack",!1),cameras:n(t,"cameras",null),map:n(t,"map",r(a,n(t,"mapAdd",{}))),physics:n(t,"physics",{}),loader:n(t,"loader",{}),plugins:n(t,"plugins",!1),input:n(t,"input",{})}}};t.exports=o},63946:(t,e,i)=>{var s=i(56694),n=i(92980),r=i(18360),a=i(7599),o=i(47736),h=i(91088),l=i(72283),u=i(36765),c=new s({initialize:function(t,e){this.scene=t,this.game,this.renderer,this.config=e,this.settings=u.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.scale,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList,this.sceneUpdate=l},init:function(t){this.settings.status=n.INIT,this.sceneUpdate=l,this.game=t,this.renderer=t.renderer,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.addToScene(this,r.Global,[r.CoreScene,h(this),o(this)]),this.events.emit(a.BOOT,this),this.settings.isBooted=!0},step:function(t,e){var i=this.events;i.emit(a.PRE_UPDATE,t,e),i.emit(a.UPDATE,t,e),this.sceneUpdate.call(this.scene,t,e),i.emit(a.POST_UPDATE,t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.events.emit(a.PRE_RENDER,t),this.cameras.render(t,e),this.events.emit(a.RENDER,t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(t){var e=this.settings,i=this.getStatus();return i!==n.CREATING&&i!==n.RUNNING?console.warn("Cannot pause non-running Scene",e.key):this.settings.active&&(e.status=n.PAUSED,e.active=!1,this.events.emit(a.PAUSE,this,t)),this},resume:function(t){var e=this.events,i=this.settings;return this.settings.active||(i.status=n.RUNNING,i.active=!0,e.emit(a.RESUME,this,t)),this},sleep:function(t){var e=this.settings,i=this.getStatus();return i!==n.CREATING&&i!==n.RUNNING?console.warn("Cannot sleep non-running Scene",e.key):(e.status=n.SLEEPING,e.active=!1,e.visible=!1,this.events.emit(a.SLEEP,this,t)),this},wake:function(t){var e=this.events,i=this.settings;return i.status=n.RUNNING,i.active=!0,i.visible=!0,e.emit(a.WAKE,this,t),i.isTransition&&e.emit(a.TRANSITION_WAKE,i.transitionFrom,i.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var t=this.settings.status;return t>n.PENDING&&t<=n.RUNNING},isSleeping:function(){return this.settings.status===n.SLEEPING},isActive:function(){return this.settings.status===n.RUNNING},isPaused:function(){return this.settings.status===n.PAUSED},isTransitioning:function(){return this.settings.isTransition||null!==this.scenePlugin._target},isTransitionOut:function(){return null!==this.scenePlugin._target&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){var e=this.events,i=this.settings;t&&(i.data=t),i.status=n.START,i.active=!0,i.visible=!0,e.emit(a.START,this),e.emit(a.READY,this,t)},shutdown:function(t){var e=this.events,i=this.settings;e.off(a.TRANSITION_INIT),e.off(a.TRANSITION_START),e.off(a.TRANSITION_COMPLETE),e.off(a.TRANSITION_OUT),i.status=n.SHUTDOWN,i.active=!1,i.visible=!1,e.emit(a.SHUTDOWN,this,t)},destroy:function(){var t=this.events,e=this.settings;e.status=n.DESTROYED,e.active=!1,e.visible=!1,t.emit(a.DESTROY,this),t.removeAllListeners();for(var i=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],s=0;s{t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},31803:t=>{t.exports="addedtoscene"},94817:t=>{t.exports="boot"},28977:t=>{t.exports="create"},91959:t=>{t.exports="destroy"},363:t=>{t.exports="pause"},15643:t=>{t.exports="postupdate"},17058:t=>{t.exports="prerender"},77125:t=>{t.exports="preupdate"},76018:t=>{t.exports="ready"},28620:t=>{t.exports="removedfromscene"},41538:t=>{t.exports="render"},34268:t=>{t.exports="resume"},2342:t=>{t.exports="shutdown"},96541:t=>{t.exports="sleep"},74244:t=>{t.exports="start"},17046:t=>{t.exports="transitioncomplete"},13637:t=>{t.exports="transitioninit"},14733:t=>{t.exports="transitionout"},33899:t=>{t.exports="transitionstart"},52418:t=>{t.exports="transitionwake"},31735:t=>{t.exports="update"},8470:t=>{t.exports="wake"},7599:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(31803),BOOT:i(94817),CREATE:i(28977),DESTROY:i(91959),PAUSE:i(363),POST_UPDATE:i(15643),PRE_RENDER:i(17058),PRE_UPDATE:i(77125),READY:i(76018),REMOVED_FROM_SCENE:i(28620),RENDER:i(41538),RESUME:i(34268),SHUTDOWN:i(2342),SLEEP:i(96541),START:i(74244),TRANSITION_COMPLETE:i(17046),TRANSITION_INIT:i(13637),TRANSITION_OUT:i(14733),TRANSITION_START:i(33899),TRANSITION_WAKE:i(52418),UPDATE:i(31735),WAKE:i(8470)}},20436:(t,e,i)=>{var s=i(92980),n=i(98611),r={Events:i(7599),GetPhysicsPlugins:i(47736),GetScenePlugins:i(91088),SceneManager:i(13553),ScenePlugin:i(64051),Settings:i(36765),Systems:i(63946)};r=n(!1,r,s),t.exports=r},25798:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(76038),a=i(98611),o=i(72283),h=new s({Extends:n,initialize:function(t,e,i){n.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=a(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),!1):(t=a(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=a(!0,this.markers[t.name],t),!0):(console.warn("Audio Marker: "+t.name+" missing in Sound: "+this.key),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return console.warn("Marker: "+t+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=a(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop,this.pan=this.currentConfig.pan},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:o,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e},destroy:function(){this.pendingRemove||(this.emit(r.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});t.exports=h},12486:(t,e,i)=>{var s=i(56694),n=i(32742),r=i(6659),a=i(76038),o=i(97081),h=i(72283),l=i(71608),u=i(51463),c=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.jsonCache=t.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,t.events.on(o.BLUR,this.onGameBlur,this),t.events.on(o.FOCUS,this.onGameFocus,this),t.events.on(o.PRE_STEP,this.update,this),t.events.once(o.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var s in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(s)){var r=n(e),a=i.spritemap[s];r.loop=!!a.hasOwnProperty("loop")&&a.loop,i.addMarker({name:s,start:a.start,duration:a.end-a.start,config:r})}return i},get:function(t){return u(this.sounds,"key",t)},getAll:function(t){return t?l(this.sounds,"key",t):l(this.sounds)},getAllPlaying:function(){return l(this.sounds,"isPlaying",!0)},play:function(t,e){var i=this.add(t);return i.once(a.COMPLETE,i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var s=this.addAudioSprite(t);return s.once(a.COMPLETE,s.destroy,s),s.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeAll:function(){this.sounds.forEach((function(t){t.destroy()})),this.sounds.length=0},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var s=this.sounds[i];s.key===t&&(s.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound((function(t){t.pause()})),this.emit(a.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound((function(t){t.resume()})),this.emit(a.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound((function(t){t.stop()})),this.emit(a.STOP_ALL,this)},stopByKey:function(t){var e=0;return this.getAll(t).forEach((function(t){t.stop()&&e++})),e},unlock:h,onBlur:h,onFocus:h,onGameBlur:function(){this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.pauseOnBlur&&this.onFocus()},update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(a.UNLOCKED,this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach((function(i){i.update(t,e)}))},destroy:function(){this.game.events.off(o.BLUR,this.onGameBlur,this),this.game.events.off(o.FOCUS,this.onGameFocus,this),this.game.events.off(o.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach((function(s,n){s&&!s.pendingRemove&&t.call(e||i,s,n,i.sounds)}))},setRate:function(t){return this.rate=t,this},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound((function(t){t.calculateRate()})),this.emit(a.GLOBAL_RATE,this,t)}},setDetune:function(t){return this.detune=t,this},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound((function(t){t.calculateRate()})),this.emit(a.GLOBAL_DETUNE,this,t)}}});t.exports=c},84191:(t,e,i)=>{var s=i(27622),n=i(17546),r=i(55491),a={create:function(t){var e=t.config.audio,i=t.device.audio;return e.noAudio||!i.webAudio&&!i.audioData?new n(t):i.webAudio&&!e.disableWebAudio?new r(t):new s(t)}};t.exports=a},77578:t=>{t.exports="complete"},19679:t=>{t.exports="decodedall"},56951:t=>{t.exports="decoded"},16436:t=>{t.exports="destroy"},55154:t=>{t.exports="detune"},57818:t=>{t.exports="detune"},57890:t=>{t.exports="mute"},83022:t=>{t.exports="rate"},99170:t=>{t.exports="volume"},64289:t=>{t.exports="looped"},67214:t=>{t.exports="loop"},53128:t=>{t.exports="mute"},73078:t=>{t.exports="pan"},76763:t=>{t.exports="pauseall"},88426:t=>{t.exports="pause"},13765:t=>{t.exports="play"},80291:t=>{t.exports="rate"},11124:t=>{t.exports="resumeall"},55382:t=>{t.exports="resume"},71157:t=>{t.exports="seek"},31776:t=>{t.exports="stopall"},39450:t=>{t.exports="stop"},21939:t=>{t.exports="unlocked"},33019:t=>{t.exports="volume"},76038:(t,e,i)=>{t.exports={COMPLETE:i(77578),DECODED:i(56951),DECODED_ALL:i(19679),DESTROY:i(16436),DETUNE:i(55154),GLOBAL_DETUNE:i(57818),GLOBAL_MUTE:i(57890),GLOBAL_RATE:i(83022),GLOBAL_VOLUME:i(99170),LOOP:i(67214),LOOPED:i(64289),MUTE:i(53128),PAN:i(73078),PAUSE_ALL:i(76763),PAUSE:i(88426),PLAY:i(13765),RATE:i(80291),RESUME_ALL:i(11124),RESUME:i(55382),SEEK:i(71157),STOP_ALL:i(31776),STOP:i(39450),UNLOCKED:i(21939),VOLUME:i(33019)}},34350:(t,e,i)=>{var s=i(25798),n=i(56694),r=i(76038),a=i(82897),o=new n({Extends:s,initialize:function(t,e,i){if(void 0===i&&(i={}),this.tags=t.game.cache.audio.get(e),!this.tags)throw new Error('No cached audio asset with key "'+e);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,s.call(this,t,e,i)},play:function(t,e){return!this.manager.isLocked(this,"play",[t,e])&&(!!s.prototype.play.call(this,t,e)&&(!!this.pickAndPlayAudioTag()&&(this.emit(r.PLAY,this),!0)))},pause:function(){return!this.manager.isLocked(this,"pause")&&(!(this.startTime>0)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(r.PAUSE,this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!s.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit(r.RESUME,this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!s.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(r.STOP,this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=i-this.manager.loopEndOffset?(this.audio.currentTime=e+Math.max(0,s-i),s=this.audio.currentTime):s=i)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(r.COMPLETE,this);this.previousTime=s}},destroy:function(){s.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=a(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){s.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.updateMute(),this.emit(r.MUTE,this,t))}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.updateVolume(),this.emit(r.VOLUME,this,t))}},setVolume:function(t){return this.volume=t,this},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,r.RATE,t)||(this.calculateRate(),this.emit(r.RATE,this,t))}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,r.DETUNE,t)||(this.calculateRate(),this.emit(r.DETUNE,this,t))}},setDetune:function(t){return this.detune=t,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit(r.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit(r.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this},pan:{get:function(){return this.currentConfig.pan},set:function(t){this.currentConfig.pan=t,this.emit(r.PAN,this,t)}},setPan:function(t){return this.pan=t,this}});t.exports=o},27622:(t,e,i)=>{var s=i(12486),n=i(56694),r=i(76038),a=i(34350),o=new n({Extends:s,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,s.call(this,t)},add:function(t,e){var i=new a(this,t,e);return this.sounds.push(i),i},unlock:function(){this.locked=!1;var t=this;if(this.game.cache.audio.entries.each((function(e,i){for(var s=0;s{t.exports={SoundManagerCreator:i(84191),Events:i(76038),BaseSound:i(25798),BaseSoundManager:i(12486),WebAudioSound:i(96008),WebAudioSoundManager:i(55491),HTML5AudioSound:i(34350),HTML5AudioSoundManager:i(27622),NoAudioSound:i(38662),NoAudioSoundManager:i(17546)}},38662:(t,e,i)=>{var s=i(25798),n=i(56694),r=i(6659),a=i(98611),o=i(72283),h=function(){return!1},l=function(){return null},u=function(){return this},c=new n({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=a({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.pan=0,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:h,updateMarker:h,removeMarker:l,play:h,pause:h,resume:h,stop:h,setMute:u,setVolume:u,setRate:u,setDetune:u,setSeek:u,setLoop:u,setPan:u,applyConfig:l,resetConfig:l,update:o,calculateRate:l,destroy:function(){s.prototype.destroy.call(this)}});t.exports=c},17546:(t,e,i)=>{var s=i(12486),n=i(56694),r=i(6659),a=i(38662),o=i(72283),h=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new a(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},get:function(t){return s.prototype.get.call(this,t)},getAll:function(t){return s.prototype.getAll.call(this,t)},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return s.prototype.remove.call(this,t)},removeAll:function(){return s.prototype.removeAll.call(this)},removeByKey:function(t){return s.prototype.removeByKey.call(this,t)},stopByKey:function(t){return s.prototype.stopByKey.call(this,t)},onBlur:o,onFocus:o,onGameBlur:o,onGameFocus:o,pauseAll:o,resumeAll:o,stopAll:o,update:o,setRate:o,setDetune:o,setMute:o,setVolume:o,unlock:o,forEachActiveSound:function(t,e){s.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){s.prototype.destroy.call(this)}});t.exports=h},96008:(t,e,i)=>{var s=i(25798),n=i(56694),r=i(76038),a=new n({Extends:s,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('Audio key "'+e+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.pannerNode=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),t.context.createStereoPanner?(this.pannerNode=t.context.createStereoPanner(),this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(t.destination)):this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,s.call(this,t,e,i)},play:function(t,e){return!!s.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime{var s=i(82329),n=i(12486),r=i(56694),a=i(76038),o=i(97081),h=i(96008),l=new r({Extends:n,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),n.call(this,t),this.locked&&t.isBooted?this.unlock():t.events.once(o.BOOT,this.unlock,this)},createAudioContext:function(t){var e=t.config.audio;return e.context?(e.context.resume(),e.context):window.hasOwnProperty("AudioContext")?new AudioContext:window.hasOwnProperty("webkitAudioContext")?new window.webkitAudioContext:void 0},setAudioContext:function(t){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=t,this.masterMuteNode=t.createGain(),this.masterVolumeNode=t.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(t.destination),this.destination=this.masterMuteNode,this},add:function(t,e){var i=new h(this,t,e);return this.sounds.push(i),i},decodeAudio:function(t,e){var i;i=Array.isArray(t)?t:[{key:t,data:e}];for(var n=this.game.cache.audio,r=i.length,o=0;o{var s=i(59959),n=i(56694),r=i(72283),a=i(17922),o=new n({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=r,this.removeCallback=r,this._sortKey=""},add:function(t,e){return e?s.Add(this.list,t):s.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?s.AddAt(this.list,t,e):s.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),a(this.list,e),this):this},getByName:function(t){return s.GetFirst(this.list,"name",t)},getRandom:function(t,e){return s.GetRandom(this.list,t,e)},getFirst:function(t,e,i,n){return s.GetFirst(this.list,t,e,i,n)},getAll:function(t,e,i,n){return s.GetAll(this.list,t,e,i,n)},count:function(t,e){return s.CountAllMatching(this.list,t,e)},swap:function(t,e){s.Swap(this.list,t,e)},moveTo:function(t,e){return s.MoveTo(this.list,t,e)},moveAbove:function(t,e){return s.MoveAbove(this.list,t,e)},moveBelow:function(t,e){return s.MoveBelow(this.list,t,e)},remove:function(t,e){return e?s.Remove(this.list,t):s.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?s.RemoveAt(this.list,t):s.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?s.RemoveBetween(this.list,t,e):s.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return s.BringToTop(this.list,t)},sendToBack:function(t){return s.SendToBack(this.list,t)},moveUp:function(t){return s.MoveUp(this.list,t),t},moveDown:function(t){return s.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return s.Shuffle(this.list),this},replace:function(t,e){return s.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,n){return s.SetAll(this.list,t,e,i,n),this},each:function(t,e){for(var i=[null],s=2;s0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=o},33885:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e{var s=i(56694),n=i(6659),r=i(36716),a=new s({Extends:n,initialize:function(){n.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(t){return this._active.indexOf(t)>-1},isPending:function(t){return this._toProcess>0&&this._pending.indexOf(t)>-1},isDestroying:function(t){return this._destroy.indexOf(t)>-1},add:function(t){return this.checkQueue&&this.isActive()&&!this.isDestroying()||this.isPending()||(this._pending.push(t),this._toProcess++),t},remove:function(t){if(this.isPending(t)){var e=this._pending,i=e.indexOf(t);-1!==i&&e.splice(i,1)}else this.isActive(t)&&(this._destroy.push(t),this._toProcess++);return t},removeAll:function(){for(var t=this._active,e=this._destroy,i=t.length;i--;)e.push(t[i]),this._toProcess++;return this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,s=this._active;for(t=0;t{var s=i(53466);function n(t){if(!(this instanceof n))return new n(t,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function r(t,e,i){if(!i)return e.indexOf(t);for(var s=0;s=t.minX&&e.maxY>=t.minY}function v(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,e,i,n,r){for(var a,o=[e,i];o.length;)(i=o.pop())-(e=o.pop())<=n||(a=e+Math.ceil((i-e)/n/2)*n,s(t,a,e,i,r),o.push(e,a,a,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],s=this.toBBox;if(!p(t,e))return i;for(var n,r,a,o,h=[];e;){for(n=0,r=e.children.length;n=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},_split:function(t,e){var i=t[e],s=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,s);var r=this._chooseSplitIndex(i,n,s),o=v(i.children.splice(r,i.children.length-r));o.height=i.height,o.leaf=i.leaf,a(i,this.toBBox),a(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)},_splitRoot:function(t,e){this.data=v([t,e]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var s,n,r,a,h,l,u,d,f,p,v,g,m,y;for(l=u=1/0,s=e;s<=i-e;s++)n=o(t,0,s,this.toBBox),r=o(t,s,i,this.toBBox),f=n,p=r,v=void 0,g=void 0,m=void 0,y=void 0,v=Math.max(f.minX,p.minX),g=Math.max(f.minY,p.minY),m=Math.min(f.maxX,p.maxX),y=Math.min(f.maxY,p.maxY),a=Math.max(0,m-v)*Math.max(0,y-g),h=c(n)+c(r),a=e;n--)r=t.children[n],h(u,t.leaf?a(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var s=i;s>=0;s--)h(e[s],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():a(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=n},58403:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){if(this.entries=[],Array.isArray(t))for(var e=0;e-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new s;return t.entries.forEach((function(t){e.set(t)})),this.entries.forEach((function(t){e.set(t)})),e},intersect:function(t){var e=new s;return this.entries.forEach((function(i){t.contains(i)&&e.set(i)})),e},difference:function(t){var e=new s;return this.entries.forEach((function(i){t.contains(i)||e.set(i)})),e},size:{get:function(){return this.entries.length},set:function(t){return t{var s=i(82897),n=i(56694),r=i(84314),a=i(93736),o=new n({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=null),this._width=t,this._height=e,this._parent=s,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new a},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=s(t,0,this.maxWidth),this.minHeight=s(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=s(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=s(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case o.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case o.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case o.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case o.FIT:this.constrain(t,e,!0);break;case o.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=s(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=s(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var s=this.snapTo,n=0===e?1:t/e;return i&&this.aspectRatio>n||!i&&this.aspectRatio0&&(t=(e=r(e,s.y))*this.aspectRatio)):(i&&this.aspectRation)&&(t=(e=r(e,s.y))*this.aspectRatio,s.x>0&&(e=(t=r(t,s.x))*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(t){t&&t.style&&(t.style.width=this._width+"px",t.style.height=this._height+"px")},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});o.NONE=0,o.WIDTH_CONTROLS_HEIGHT=1,o.HEIGHT_CONTROLS_WIDTH=2,o.FIT=3,o.ENVELOP=4,t.exports=o},94160:t=>{t.exports="add"},95393:t=>{t.exports="remove"},36716:(t,e,i)=>{t.exports={PROCESS_QUEUE_ADD:i(94160),PROCESS_QUEUE_REMOVE:i(95393)}},20010:(t,e,i)=>{t.exports={Events:i(36716),List:i(71207),Map:i(33885),ProcessQueue:i(74623),RTree:i(68687),Set:i(58403),Size:i(90881)}},17487:(t,e,i)=>{var s=i(56694),n=i(82897),r=i(27119),a=i(86459),o=i(28621),h=i(31673),l=new s({Extends:h,initialize:function(t,e,i,s,n){h.call(this,t,e,i,s,n),this.add("__BASE",0,0,0,s,n),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=s,this.height=n,this.imageData=this.context.getImageData(0,0,s,n),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===a.WEBGL&&this.refresh(),this},draw:function(t,e,i){return this.context.drawImage(i,t,e),this.update()},drawFrame:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0);var n=this.manager.getFrame(t,e);if(n){var r=n.canvasData,a=n.cutWidth,o=n.cutHeight,h=n.source.resolution;return this.context.drawImage(n.source.image,r.x,r.y,a,o,i,s,a/h,o/h),this.update()}return this},setPixel:function(t,e,i,s,n,r){if(void 0===r&&(r=255),t=Math.abs(Math.floor(t)),e=Math.abs(Math.floor(e)),this.getIndex(t,e)>-1){var a=this.context.getImageData(t,e,1,1);a.data[0]=i,a.data[1]=s,a.data[2]=n,a.data[3]=r,this.context.putImageData(a,t,e)}return this},putData:function(t,e,i,s,n,r,a){return void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=t.width),void 0===a&&(a=t.height),this.context.putImageData(t,e,i,s,n,r,a),this},getData:function(t,e,i,s){return t=n(Math.floor(t),0,this.width-1),e=n(Math.floor(e),0,this.height-1),i=n(i,1,this.width-t),s=n(s,1,this.height-e),this.context.getImageData(t,e,i,s)},getPixel:function(t,e,i){i||(i=new r);var s=this.getIndex(t,e);if(s>-1){var n=this.data,a=n[s+0],o=n[s+1],h=n[s+2],l=n[s+3];i.setTo(a,o,h,l)}return i},getPixels:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===s&&(s=i),t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e));for(var a=n(t,0,this.width),o=n(t+i,0,this.width),h=n(e,0,this.height),l=n(e+s,0,this.height),u=new r,c=[],d=h;d{var s=i(95723),n=i(51052),r=i(61068),a=i(56694),o=i(86459),h=i(82047),l=i(72632),u=i(65641),c=i(37410),d=i(31673),f=i(75512),p=new a({Extends:d,initialize:function(t,e,i,s){void 0===i&&(i=256),void 0===s&&(s=256),this.type="DynamicTexture";var a=t.game.renderer,h=a&&a.type===o.CANVAS,l=h?r.create2D(this,i,s):[this];d.call(this,t,e,l,i,s),this.add("__BASE",0,0,0,i,s),this.renderer=a,this.isDrawing=!1,this.canvas=h?l:null,this.context=h?l.getContext("2d"):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new n(0,0,i,s).setScene(t.game.scene.systemScene,!1),this.renderTarget=h?null:new c(a,i,s,1,0,!1),this.pipeline=h?null:a.pipelines.get(u.SINGLE_PIPELINE),this.setSize(i,s)},setSize:function(t,e){void 0===e&&(e=t);var i=this.get(),s=i.source;if(t!==this.width||e!==this.height){this.canvas&&(this.canvas.width=t,this.canvas.height=e);var n=this.renderTarget;n&&(n.resize(t,e),i.glTexture=n.texture,s.isRenderTexture=!0,s.isGLTexture=!0,s.glTexture=n.texture,s.glTexture.flipY=!0),this.camera.setSize(t,e),s.width=t,s.height=e,i.setSize(t,e),this.width=t,this.height=e}else{var r=this.getSourceImage();i.cutX+t>r.width&&(t=r.width-i.cutX),i.cutY+e>r.height&&(e=r.height-i.cutY),i.setSize(t,e,i.cutX,i.cutY)}return this},setIsSpriteTexture:function(t){return this.isSpriteTexture=t,this},fill:function(t,e,i,s,n,r){var a=this.camera,o=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=this.width),void 0===r&&(r=this.height);var h=t>>16&255,l=t>>8&255,u=255&t,c=this.renderTarget;if(a.preRender(),c){c.bind(!0);var d=this.pipeline.manager.set(this.pipeline),p=o.width/c.width,v=o.height/c.height;d.drawFillRect(i*p,s*v,n*p,r*v,f.getTintFromFloats(u/255,l/255,h/255,1),e),c.unbind(!0)}else{var g=this.context;o.setContext(g),g.globalCompositeOperation="source-over",g.fillStyle="rgba("+h+","+l+","+u+","+e+")",g.fillRect(i,s,n,r),o.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var t=this.context,e=this.renderTarget;e?e.clear():t&&(t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,this.width,this.height),t.restore()),this.dirty=!1}return this},stamp:function(t,e,i,s,n){void 0===i&&(i=0),void 0===s&&(s=0);var r=l(n,"alpha",1),a=l(n,"tint",16777215),o=l(n,"angle",0),h=l(n,"rotation",0),u=l(n,"scale",1),c=l(n,"scaleX",u),d=l(n,"scaleY",u),f=l(n,"originX",.5),p=l(n,"originY",.5),v=l(n,"blendMode",0),g=l(n,"erase",!1),m=this.manager.resetStamp(r,a);return m.setAngle(0),0!==o?m.setAngle(o):0!==h&&m.setRotation(h),m.setScale(c,d),m.setTexture(t,e),m.setOrigin(f,p),m.setBlendMode(v),g&&(this._eraseMode=!0),this.draw(m,i,s),g&&(this._eraseMode=!1),this},erase:function(t,e,i){return this._eraseMode=!0,this.draw(t,e,i),this._eraseMode=!1,this},draw:function(t,e,i,s,n){return this.beginDraw(),this.batchDraw(t,e,i,s,n),this.endDraw(),this},drawFrame:function(t,e,i,s,n,r){return this.beginDraw(),this.batchDrawFrame(t,e,i,s,n,r),this.endDraw(),this},repeat:function(t,e,i,s,n,r,a,o,l){if(void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=this.width),void 0===r&&(r=this.height),void 0===a&&(a=1),void 0===o&&(o=16777215),void 0===l&&(l=!1),!(e=t instanceof h?t:this.manager.getFrame(t,e)))return this;var u=this.manager.resetStamp(a,o);u.setFrame(e),u.setOrigin(0);var c=e.width,d=e.height;n=Math.floor(n),r=Math.floor(r);var f=Math.ceil(n/c),p=Math.ceil(r/d),v=f*c-n,g=p*d-r;v>0&&(v=c-v),g>0&&(g=d-g),i<0&&(f+=Math.ceil(Math.abs(i)/c)),s<0&&(p+=Math.ceil(Math.abs(s)/d));var m=i,y=s,x=!1,T=this.manager.stampCrop.setTo(0,0,c,d);l||this.beginDraw();for(var w=0;w0&&E===f-1&&(x=!0,T.width=v),g>0&&w===p-1&&(x=!0,T.height=g),x&&u.setCrop(T),this.batchGameObject(u,m,y),u.isCropped=!1,T.setTo(0,0,c,d)),m+=c;m=i,y+=d}return l||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var t=this.camera,e=this.renderer,i=this.renderTarget;t.preRender(),i?e.beginCapture(i.width,i.height):e.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(t,e,i,s,n){return Array.isArray(t)||(t=[t]),this.batchList(t,e,i,s,n),this},batchDrawFrame:function(t,e,i,s,n,r){void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=1),void 0===r&&(r=16777215);var a=this.manager.getFrame(t,e);return a&&(this.renderTarget?this.pipeline.batchTextureFrame(a,i,s,r,n,this.camera.matrix,null):this.batchTextureFrame(a,i,s,n,r)),this},endDraw:function(t){if(void 0===t&&(t=this._eraseMode),this.isDrawing){var e=this.renderer,i=this.renderTarget;if(i){var s=e.endCapture();e.pipelines.setUtility().blitFrame(s,i,1,!1,!1,t,this.isSpriteTexture),e.resetScissor(),e.resetViewport()}else e.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(t,e,i,s,n){var r=t.length;if(0!==r)for(var a=0;a0&&o.height>0&&a.drawImage(h,o.x,o.y,o.width,o.height,e,i,o.width,o.height),a.restore()}},snapshotArea:function(t,e,i,s,n,r,a){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,n,!1,t,e,i,s,r,a):this.renderer.snapshotCanvas(this.canvas,n,!1,t,e,i,s,r,a),this},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.width,this.height,t,e,i)},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i,"pixel")},renderWebGL:function(t,e,i,s){var n=this.manager.resetStamp();n.setTexture(this),n.setOrigin(0),n.renderWebGL(t,n,i,s)},renderCanvas:function(){},preDestroy:function(){r.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.stamp.destroy(),this.canvas=null,this.context=null,this.renderer=null,this.scene=null}});t.exports=p},82047:(t,e,i)=>{var s=i(56694),n=i(82897),r=i(98611),a=new s({initialize:function(t,e,i,s,n,r,a){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(r,a,s,n)},setSize:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0),this.cutX=i,this.cutY=s,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var n=this.data,r=n.cut;r.x=i,r.y=s,r.w=t,r.h=e,r.r=i+t,r.b=s+e,n.sourceSize.w=t,n.sourceSize.h=e,n.spriteSourceSize.w=t,n.spriteSourceSize.h=e,n.radius=.5*Math.sqrt(t*t+e*e);var a=n.drawImage;return a.x=i,a.y=s,a.width=t,a.height=e,this.updateUVs()},setTrim:function(t,e,i,s,n,r){var a=this.data,o=a.spriteSourceSize;return a.trim=!0,a.sourceSize.w=t,a.sourceSize.h=e,o.x=i,o.y=s,o.w=n,o.h=r,o.r=i+n,o.b=s+r,this.x=i,this.y=s,this.width=n,this.height=r,this.halfWidth=.5*n,this.halfHeight=.5*r,this.centerX=Math.floor(n/2),this.centerY=Math.floor(r/2),this.updateUVs()},setCropUVs:function(t,e,i,s,r,a,o){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=n(e,0,d)),v=l+(i=n(i,0,f)),g=s=n(s,0,d-e),m=r=n(r,0,f-i),y=this.data;if(y.trim){var x=y.spriteSourceSize,T=e+(s=n(s,0,u-e)),w=i+(r=n(r,0,c-i));if(!(x.rT||x.y>w)){var E=Math.max(x.x,e),S=Math.max(x.y,i),b=Math.min(x.r,T)-E,A=Math.min(x.b,w)-S;g=b,m=A,p=a?h+(u-(E-x.x)-b):h+(E-x.x),v=o?l+(c-(S-x.y)-A):l+(S-x.y),e=E,i=S,s=b,r=A}else p=0,v=0,g=0,m=0}else a&&(p=h+(u-e-s)),o&&(v=l+(c-i-r));var _=this.source.width,C=this.source.height;return t.u0=Math.max(0,p/_),t.v0=Math.max(0,v/C),t.u1=Math.min(1,(p+g)/_),t.v1=Math.min(1,(v+m)/C),t.x=e,t.y=i,t.cx=p,t.cy=v,t.cw=g,t.ch=m,t.width=s,t.height=r,t.flipX=a,t.flipY=o,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,s,n,r){var a=this.data.drawImage;return a.width=t,a.height=e,this.u0=i,this.v0=s,this.u1=n,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,s=this.cutHeight,n=this.data.drawImage;n.width=i,n.height=s;var r=this.source.width,a=this.source.height;return this.u0=t/r,this.v0=e/a,this.u1=(t+i)/r,this.v1=(e+s)/a,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new a(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=r(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=a},31673:(t,e,i)=>{var s=i(56694),n=i(82047),r=i(32547),a='Texture "%s" has no frame "%s"',o=new s({initialize:function(t,e,i,s,n){Array.isArray(i)||(i=[i]),this.manager=t,this.key=e,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var a=0;a{var s=i(61068),n=i(17487),r=i(56694),a=i(27119),o=i(86459),h=i(845),l=i(6659),u=i(38203),c=i(82047),d=i(97081),f=i(52780),p=i(10850),v=i(1539),g=i(42911),m=i(69150),y=i(74118),x=i(31673),T=new r({Extends:l,initialize:function(t){l.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=s.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new y,this.silentWarnings=!1,t.events.once(d.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(u.LOAD,this.updatePending,this),this.on(u.ERROR,this.updatePending,this);var t=this.game.config;this.addBase64("__DEFAULT",t.defaultImage),this.addBase64("__MISSING",t.missingImage),this.addBase64("__WHITE",t.whiteImage),this.game.events.once(d.DESTROY,this.destroy,this)},updatePending:function(){this._pending--,0===this._pending&&(this.off(u.LOAD),this.off(u.ERROR),this.emit(u.READY),this.stamp=new v(this.game.scene.systemScene).setOrigin(0))},checkKey:function(t){return!this.exists(t)||(this.silentWarnings||console.error("Texture key already in use: "+t),!1)},remove:function(t){if("string"==typeof t){if(!this.exists(t))return this.silentWarnings||console.warn("No texture found matching key: "+t),this;t=this.get(t)}return this.list.hasOwnProperty(t.key)&&(t.destroy(),this.emit(u.REMOVE,t.key),this.emit(u.REMOVE_KEY+t.key)),this},removeKey:function(t){return this.list.hasOwnProperty(t)&&delete this.list[t],this},addBase64:function(t,e){if(this.checkKey(t)){var i=this,s=new Image;s.onerror=function(){i.emit(u.ERROR,t)},s.onload=function(){var e=i.create(t,s);m.Image(e,0),i.emit(u.ADD,t,e),i.emit(u.ADD_KEY+t,e),i.emit(u.LOAD,t,e)},s.src=e}return this},getBase64:function(t,e,i,n){void 0===i&&(i="image/png"),void 0===n&&(n=.92);var r="",a=this.getFrame(t,e);if(a&&(a.source.isRenderTexture||a.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(a){var o=a.canvasData,h=s.create2D(this,o.width,o.height),l=h.getContext("2d");o.width>0&&o.height>0&&l.drawImage(a.source.image,o.x,o.y,o.width,o.height,0,0,o.width,o.height),r=h.toDataURL(i,n),s.remove(h)}return r},addImage:function(t,e,i){var s=null;return this.checkKey(t)&&(s=this.create(t,e),m.Image(s,0),i&&s.setDataSource(i),this.emit(u.ADD,t,s),this.emit(u.ADD_KEY+t,s)),s},addGLTexture:function(t,e,i,s){var n=null;return this.checkKey(t)&&(void 0===i&&(i=e.width),void 0===s&&(s=e.height),(n=this.create(t,e,i,s)).add("__BASE",0,0,0,i,s),this.emit(u.ADD,t,n),this.emit(u.ADD_KEY+t,n)),n},addCompressedTexture:function(t,e,i){var s=null;if(this.checkKey(t)){if((s=this.create(t,e)).add("__BASE",0,0,0,e.width,e.height),i)if(Array.isArray(i))for(var n=0;n=r.x&&t=r.y&&e=r.x&&t=r.y&&e{var s=i(61068),n=i(56694),r=i(28621),a=i(27394),o=new n({initialize:function(t,e,i,s,n){void 0===n&&(n=!1);var o=t.manager.game;this.renderer=o.renderer,this.texture=t,this.source=e,this.image=e.compressed?null:e,this.compressionAlgorithm=e.compressed?e.format:null,this.resolution=1,this.width=i||e.naturalWidth||e.videoWidth||e.width||0,this.height=s||e.naturalHeight||e.videoHeight||e.height||0,this.scaleMode=a.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&e instanceof HTMLVideoElement,this.isRenderTexture="RenderTexture"===e.type||"DynamicTexture"===e.type,this.isGLTexture=window.hasOwnProperty("WebGLTexture")&&e instanceof WebGLTexture,this.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.flipY=n,this.init(o)},init:function(t){var e=this.renderer;if(e){var i=this.source;if(e.gl){var s=this.image,n=this.flipY,r=this.width,a=this.height,o=this.scaleMode;this.isCanvas?this.glTexture=e.createCanvasTexture(s,!1,n):this.isVideo?this.glTexture=e.createVideoTexture(s,!1,n):this.isRenderTexture?this.glTexture=e.createTextureFromSource(null,r,a,o):this.isGLTexture?this.glTexture=i:this.compressionAlgorithm?this.glTexture=e.createTextureFromSource(i):this.glTexture=e.createTextureFromSource(s,r,a,o)}else this.isRenderTexture&&(this.image=i.canvas)}t.config.antialias||this.setFilter(1)},setFilter:function(t){this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,t),this.scaleMode=t},setFlipY:function(t){return void 0===t&&(t=!0),this.flipY=t,this},update:function(){var t=this.renderer,e=this.image,i=this.flipY,s=t.gl;s&&this.isCanvas?this.glTexture=t.updateCanvasTexture(e,this.glTexture,i):s&&this.isVideo&&(this.glTexture=t.updateVideoTexture(e,this.glTexture,i))},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture,!0),this.isCanvas&&s.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});t.exports=o},65154:t=>{t.exports={LINEAR:0,NEAREST:1}},49644:t=>{t.exports="addtexture"},29569:t=>{t.exports="addtexture-"},60079:t=>{t.exports="onerror"},72665:t=>{t.exports="onload"},93006:t=>{t.exports="ready"},69018:t=>{t.exports="removetexture"},85549:t=>{t.exports="removetexture-"},38203:(t,e,i)=>{t.exports={ADD:i(49644),ADD_KEY:i(29569),ERROR:i(60079),LOAD:i(72665),READY:i(93006),REMOVE:i(69018),REMOVE_KEY:i(85549)}},87499:(t,e,i)=>{var s=i(98611),n=i(65154),r={CanvasTexture:i(17487),DynamicTexture:i(845),Events:i(38203),FilterMode:n,Frame:i(82047),Parsers:i(69150),Texture:i(31673),TextureManager:i(6237),TextureSource:i(32547)};r=s(!1,r,n),t.exports=r},35082:t=>{t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var n,r=i.getElementsByTagName("SubTexture"),a=0;a{t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},21560:t=>{t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},64423:(t,e,i)=>{var s=i(32742);t.exports=function(t,e,i){if(i.frames||i.textures){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var r,a=Array.isArray(i.textures)?i.textures[e].frames:i.frames,o=0;o{var s=i(32742);t.exports=function(t,e,i){if(i.frames){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);var r,a=i.frames;for(var o in a)if(a.hasOwnProperty(o)){var h=a[o];if(r=t.add(o,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h)){h.trimmed&&r.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(r.rotated=!0,r.updateUVsInverted());var l=h.anchor||h.pivot;l&&(r.customPivot=!0,r.pivotX=l.x,r.pivotY=l.y),r.customData=s(h)}else console.warn("Invalid atlas json, frame already exists: "+o)}for(var u in i)"frames"!==u&&(Array.isArray(i[u])?t.customData[u]=i[u].slice(0):t.customData[u]=i[u]);return t}console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object")}},67409:t=>{t.exports=function(t){var e,i=[171,75,84,88,32,49,49,187,13,10,26,10],s=new Uint8Array(t,0,12);for(e=0;e>1),v=Math.max(1,v>>1),f+=g}return{mipmaps:d,width:h,height:l,internalFormat:o,compressed:!0,generateMipmap:!1}}console.warn("KTXParser - Only compressed formats supported")}},24904:t=>{function e(t,e,i,s,n,r,a){return void 0===a&&(a=16),Math.floor((t+i)/n)*Math.floor((e+s)/r)*a}function i(t,e){return(t=Math.max(t,16))*(e=Math.max(e,8))/4}function s(t,e){return(t=Math.max(t,8))*(e=Math.max(e,8))/2}function n(t,i){return e(t,i,3,3,4,4,8)}function r(t,i){return e(t,i,3,3,4,4)}var a={0:{sizeFunc:i,glFormat:35841},1:{sizeFunc:i,glFormat:35843},2:{sizeFunc:s,glFormat:35840},3:{sizeFunc:s,glFormat:35842},6:{sizeFunc:n,glFormat:36196},7:{sizeFunc:n,glFormat:33776},8:{sizeFunc:r,glFormat:33777},9:{sizeFunc:r,glFormat:33778},11:{sizeFunc:r,glFormat:33779},22:{sizeFunc:n,glFormat:37492},23:{sizeFunc:r,glFormat:37496},24:{sizeFunc:n,glFormat:37494},25:{sizeFunc:n,glFormat:37488},26:{sizeFunc:r,glFormat:37490},27:{sizeFunc:r,glFormat:37808},28:{sizeFunc:function(t,i){return e(t,i,4,3,5,4)},glFormat:37809},29:{sizeFunc:function(t,i){return e(t,i,4,4,5,5)},glFormat:37810},30:{sizeFunc:function(t,i){return e(t,i,5,4,6,5)},glFormat:37811},31:{sizeFunc:function(t,i){return e(t,i,5,5,6,6)},glFormat:37812},32:{sizeFunc:function(t,i){return e(t,i,7,4,8,5)},glFormat:37813},33:{sizeFunc:function(t,i){return e(t,i,7,5,8,6)},glFormat:37814},34:{sizeFunc:function(t,i){return e(t,i,7,7,8,8)},glFormat:37815},35:{sizeFunc:function(t,i){return e(t,i,9,4,10,5)},glFormat:37816},36:{sizeFunc:function(t,i){return e(t,i,9,5,10,6)},glFormat:37817},37:{sizeFunc:function(t,i){return e(t,i,9,7,10,8)},glFormat:37818},38:{sizeFunc:function(t,i){return e(t,i,9,9,10,10)},glFormat:37819},39:{sizeFunc:function(t,i){return e(t,i,11,9,12,10)},glFormat:37820},40:{sizeFunc:function(t,i){return e(t,i,11,11,12,12)},glFormat:37821}};t.exports=function(t){for(var e=new Uint32Array(t,0,13),i=e[2],s=a[i].glFormat,n=a[i].sizeFunc,r=e[11],o=e[7],h=e[6],l=52+e[12],u=new Uint8Array(t,l),c=new Array(r),d=0,f=o,p=h,v=0;v>1),p=Math.max(1,p>>1),d+=g}return{mipmaps:c,width:o,height:h,internalFormat:s,compressed:!0,generateMipmap:!1}}},6143:(t,e,i)=>{var s=i(72632);t.exports=function(t,e,i,n,r,a,o){var h=s(o,"frameWidth",null),l=s(o,"frameHeight",h);if(null===h)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var u=t.source[e];t.add("__BASE",e,0,0,u.width,u.height);var c=s(o,"startFrame",0),d=s(o,"endFrame",-1),f=s(o,"margin",0),p=s(o,"spacing",0),v=Math.floor((r-f+p)/(h+p))*Math.floor((a-f+p)/(l+p));0===v&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",t.key),(c>v||c<-v)&&(c=0),c<0&&(c=v+c),(-1===d||d>v||dr&&(y=E-r),S>a&&(x=S-a),w>=c&&w<=d&&(t.add(T,e,i+g,n+m,h-y,l-x),T++),(g+=h+p)+h>r&&(g=f,m+=l+p)}return t}},20030:(t,e,i)=>{var s=i(72632);t.exports=function(t,e,i){var n=s(i,"frameWidth",null),r=s(i,"frameHeight",n);if(!n)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var a=t.source[0];t.add("__BASE",0,0,0,a.width,a.height);var o,h=s(i,"startFrame",0),l=s(i,"endFrame",-1),u=s(i,"margin",0),c=s(i,"spacing",0),d=e.cutX,f=e.cutY,p=e.cutWidth,v=e.cutHeight,g=e.realWidth,m=e.realHeight,y=Math.floor((g-u+c)/(n+c)),x=Math.floor((m-u+c)/(r+c)),T=y*x,w=e.x,E=n-w,S=n-(g-p-w),b=e.y,A=r-b,_=r-(m-v-b);(h>T||h<-T)&&(h=0),h<0&&(h=T+h),-1!==l&&(T=h+(l+1));for(var C=u,R=u,M=0,P=e.sourceIndex,O=0;O{var e=0,i=function(t,i,s,n){var r=e-n.y-n.height;t.add(s,i,n.x,r,n.width,n.height)};t.exports=function(t,s,n){var r=t.source[s];t.add("__BASE",s,0,0,r.width,r.height),e=r.height;for(var a=n.split("\n"),o=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",l="",u={x:0,y:0,width:0,height:0},c=0;c{t.exports={AtlasXML:i(35082),Canvas:i(83332),Image:i(21560),JSONArray:i(64423),JSONHash:i(17264),KTXParser:i(67409),PVRParser:i(24904),SpriteSheet:i(6143),SpriteSheetFromAtlas:i(20030),UnityYAML:i(89187)}},93560:t=>{t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},97042:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s,n,r,a){(void 0===i||i<=0)&&(i=32),(void 0===s||s<=0)&&(s=32),void 0===n&&(n=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|s,this.imageMargin=0|n,this.imageSpacing=0|r,this.properties=a||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&t{var s=new(i(56694))({initialize:function(t){if(this.gids=[],void 0!==t)for(var e=0;e{var s=i(93560),n=i(16586),r=i(90715),a=i(89797);t.exports=function(t,e,i,o,h,l,u,c){void 0===i&&(i=32),void 0===o&&(o=32),void 0===h&&(h=10),void 0===l&&(l=10),void 0===c&&(c=!1);var d=null;if(Array.isArray(u))d=r(void 0!==e?e:"map",s.ARRAY_2D,u,i,o,c);else if(void 0!==e){var f=t.cache.tilemap.get(e);f?d=r(e,f.format,f.data,i,o,c):console.warn("No map data found for key "+e)}return null===d&&(d=new n({tileWidth:i,tileHeight:o,width:h,height:l})),new a(t,d)}},29633:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(12920),a=i(28699),o=i(66658),h=new s({Mixins:[n.Alpha,n.Flip,n.Visible],initialize:function(t,e,i,s,n,r,a,o){this.layer=t,this.index=e,this.x=i,this.y=s,this.width=n,this.height=r,this.right,this.bottom,this.baseWidth=void 0!==a?a:n,this.baseHeight=void 0!==o?o:r,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,this.collisionCallbackContext=this,this.tint=16777215,this.physics={}},containsPoint:function(t,e){return!(tthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=a(t.properties),this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldXY(this.x,this.y,void 0,t).x:this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldXY(this.x,this.y,void 0,t).y:this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new o),e.x=this.getLeft(t),e.y=this.getTop(t),e.width=this.getRight(t)-e.x,e.height=this.getBottom(t)-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},intersects:function(t,e,i,s){return!(i<=this.pixelX||s<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,s,n){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===s&&(s=t),void 0===n&&(n=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=s,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=s,n)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,s){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==s&&(this.baseHeight=s),this.updatePixelXY(),this},updatePixelXY:function(){var t=this.layer.orientation;if(t===r.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(t===r.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(t===r.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(t===r.HEXAGONAL){var e=this.layer.hexSideLength,i=(this.baseHeight-e)/2+e;this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*i}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||void 0!==this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=h},89797:(t,e,i)=>{var s=i(56694),n=i(75606),r=i(93560),a=i(72632),o=i(94990),h=i(46422),l=i(12920),u=i(52257),c=i(72677),d=i(13747),f=i(29633),p=i(5047),v=i(87177),g=i(47975),m=new s({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.renderOrder=e.renderOrder,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0,this.hexSideLength=e.hexSideLength;var i=this.orientation;this._convert={WorldToTileXY:p.GetWorldToTileXYFunction(i),WorldToTileX:p.GetWorldToTileXFunction(i),WorldToTileY:p.GetWorldToTileYFunction(i),TileToWorldXY:p.GetTileToWorldXYFunction(i),TileToWorldX:p.GetTileToWorldXFunction(i),TileToWorldY:p.GetTileToWorldYFunction(i),GetTileCorners:p.GetTileCornersFunction(i)}},setRenderOrder:function(t){var e=["right-down","left-down","right-up","left-up"];return"number"==typeof t&&(t=e[t]),e.indexOf(t)>-1&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,s,n,a,o){if(void 0===t)return null;if(null==e&&(e=t),!this.scene.sys.textures.exists(e))return console.warn("Invalid Tileset Image: "+e),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===r.TILED_JSON)return console.warn("No data found for Tileset: "+t),null;var u=this.tilesets[l];return u?(u.setTileSize(i,s),u.setSpacing(n,a),u.setImage(h),u):(void 0===i&&(i=this.tileWidth),void 0===s&&(s=this.tileHeight),void 0===n&&(n=0),void 0===a&&(a=0),void 0===o&&(o=0),(u=new g(t,o,i,s,n,a)).setImage(h),this.tilesets.push(u),u)},copy:function(t,e,i,s,n,r,a,o){return null!==(o=this.getLayer(o))?(p.Copy(t,e,i,s,n,r,a,o),this):null},createBlankLayer:function(t,e,i,s,n,r,a,h){if(void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=this.width),void 0===r&&(r=this.height),void 0===a&&(a=this.tileWidth),void 0===h&&(h=this.tileHeight),null!==this.getLayerIndex(t))return console.warn("Invalid Tilemap Layer ID: "+t),null;for(var l,u=new o({name:t,tileWidth:a,tileHeight:h,width:n,height:r,orientation:this.orientation}),c=0;c-1&&this.putTileAt(e,r.x,r.y,i,r.tilemapLayer)}return s},removeTileAt:function(t,e,i,s,n){return void 0===i&&(i=!0),void 0===s&&(s=!0),null===(n=this.getLayer(n))?null:p.RemoveTileAt(t,e,i,s,n)},removeTileAtWorldXY:function(t,e,i,s,n,r){return void 0===i&&(i=!0),void 0===s&&(s=!0),null===(r=this.getLayer(r))?null:p.RemoveTileAtWorldXY(t,e,i,s,n,r)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(this.orientation===l.ORTHOGONAL&&p.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,s=0;s{var s=i(99325),n=i(15043);s.register("tilemap",(function(t){var e=void 0!==t?t:{};return n(this.scene,e.key,e.tileWidth,e.tileHeight,e.width,e.height,e.data,e.insertNull)}))},37940:(t,e,i)=>{var s=i(61286),n=i(15043);s.register("tilemap",(function(t,e,i,s,r,a,o){return null===t&&(t=void 0),null===e&&(e=void 0),null===i&&(i=void 0),null===s&&(s=void 0),null===r&&(r=void 0),n(this.scene,t,e,i,s,r,a,o)}))},87177:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),a=i(5047),o=i(96193),h=i(93736),l=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.ComputedSize,n.Depth,n.Flip,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.Transform,n.Visible,n.ScrollFactor,o],initialize:function(t,e,i,s,n,o){r.call(this,t,"TilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],this.layer.tilemapLayer=this,this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=a.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new h,this.setTilesets(s),this.setAlpha(this.layer.alpha),this.setPosition(n,o),this.setOrigin(0,0),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.initPipeline()},setTilesets:function(t){var e=[],i=[],s=this.tilemap;Array.isArray(t)||(t=[t]);for(var n=0;n=0&&t<4&&(this._renderOrder=t),this},calculateFacesAt:function(t,e){return a.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,s){return a.CalculateFacesWithin(t,e,i,s,this.layer),this},createFromTiles:function(t,e,i,s,n){return a.CreateFromTiles(t,e,i,s,n,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,s,n,r,o){return a.Copy(t,e,i,s,n,r,o,this.layer),this},fill:function(t,e,i,s,n,r){return a.Fill(t,e,i,s,n,r,this.layer),this},filterTiles:function(t,e,i,s,n,r,o){return a.FilterTiles(t,e,i,s,n,r,o,this.layer)},findByIndex:function(t,e,i){return a.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,s,n,r,o){return a.FindTile(t,e,i,s,n,r,o,this.layer)},forEachTile:function(t,e,i,s,n,r,o){return a.ForEachTile(t,e,i,s,n,r,o,this.layer),this},setTint:function(t,e,i,s,n,r){void 0===t&&(t=16777215);return this.forEachTile((function(e){e.tint=t}),this,e,i,s,n,r)},getTileAt:function(t,e,i){return a.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,s){return a.GetTileAtWorldXY(t,e,i,s,this.layer)},getIsoTileAtWorldXY:function(t,e,i,s,n){void 0===i&&(i=!0);var r=this.tempVec;return a.IsometricWorldToTileXY(t,e,!0,r,n,this.layer,i),this.getTileAt(r.x,r.y,s)},getTilesWithin:function(t,e,i,s,n){return a.GetTilesWithin(t,e,i,s,n,this.layer)},getTilesWithinShape:function(t,e,i){return a.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,s,n,r){return a.GetTilesWithinWorldXY(t,e,i,s,n,r,this.layer)},hasTileAt:function(t,e){return a.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return a.HasTileAtWorldXY(t,e,i,this.layer)},putTileAt:function(t,e,i,s){return a.PutTileAt(t,e,i,s,this.layer)},putTileAtWorldXY:function(t,e,i,s,n){return a.PutTileAtWorldXY(t,e,i,s,n,this.layer)},putTilesAt:function(t,e,i,s){return a.PutTilesAt(t,e,i,s,this.layer),this},randomize:function(t,e,i,s,n){return a.Randomize(t,e,i,s,n,this.layer),this},removeTileAt:function(t,e,i,s){return a.RemoveTileAt(t,e,i,s,this.layer)},removeTileAtWorldXY:function(t,e,i,s,n){return a.RemoveTileAtWorldXY(t,e,i,s,n,this.layer)},renderDebug:function(t,e){return a.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,s,n,r){return a.ReplaceByIndex(t,e,i,s,n,r,this.layer),this},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this},setCollision:function(t,e,i,s){return a.SetCollision(t,e,i,this.layer,s),this},setCollisionBetween:function(t,e,i,s){return a.SetCollisionBetween(t,e,i,s,this.layer),this},setCollisionByProperty:function(t,e,i){return a.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return a.SetCollisionByExclusion(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return a.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileIndexCallback:function(t,e,i){return a.SetTileIndexCallback(t,e,i,this.layer),this},setTileLocationCallback:function(t,e,i,s,n,r){return a.SetTileLocationCallback(t,e,i,s,n,r,this.layer),this},shuffle:function(t,e,i,s){return a.Shuffle(t,e,i,s,this.layer),this},swapByIndex:function(t,e,i,s,n,r){return a.SwapByIndex(t,e,i,s,n,r,this.layer),this},tileToWorldX:function(t,e){return this.tilemap.tileToWorldX(t,e,this)},tileToWorldY:function(t,e){return this.tilemap.tileToWorldY(t,e,this)},tileToWorldXY:function(t,e,i,s){return this.tilemap.tileToWorldXY(t,e,i,s,this)},getTileCorners:function(t,e,i){return this.tilemap.getTileCorners(t,e,i,this)},weightedRandomize:function(t,e,i,s,n){return a.WeightedRandomize(e,i,s,n,t,this.layer),this},worldToTileX:function(t,e,i){return this.tilemap.worldToTileX(t,e,i,this)},worldToTileY:function(t,e,i){return this.tilemap.worldToTileY(t,e,i,this)},worldToTileXY:function(t,e,i,s,n){return this.tilemap.worldToTileXY(t,e,i,s,n,this)},destroy:function(t){void 0===t&&(t=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),t&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],r.prototype.destroy.call(this))}});t.exports=l},17394:(t,e,i)=>{var s=i(69360),n=new s,r=new s,a=new s;t.exports=function(t,e,i,s){var o=e.cull(i),h=o.length,l=i.alpha*e.alpha;if(!(0===h||l<=0)){var u=n,c=r,d=a;c.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),u.copyFrom(i.matrix);var f=t.currentContext,p=e.gidMap;f.save(),s?(u.multiplyWithOffset(s,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),c.e=e.x,c.f=e.y,u.multiply(c,d),d.copyToContext(f)):(c.e-=i.scrollX*e.scrollFactorX,c.f-=i.scrollY*e.scrollFactorY,c.copyToContext(f)),(!t.antialias||e.scaleX>1||e.scaleY>1)&&(f.imageSmoothingEnabled=!1);for(var v=0;v{var s=i(72283),n=s,r=s;n=i(51395),r=i(17394),t.exports={renderWebGL:n,renderCanvas:r}},51395:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i){var n=e.cull(i),r=n.length,a=i.alpha*e.alpha;if(!(0===r||a<=0)){var o=e.gidMap,h=t.pipelines.set(e.pipeline,e),l=s.getTintAppendFloatAlpha,u=e.scrollFactorX,c=e.scrollFactorY,d=e.x,f=e.y,p=e.scaleX,v=e.scaleY;t.pipelines.preBatch(e);for(var g=0;g{var s=i(56694),n=i(93736),r=new s({initialize:function(t,e,i,s,r,a,o,h,l){(void 0===i||i<=0)&&(i=32),(void 0===s||s<=0)&&(s=32),void 0===r&&(r=0),void 0===a&&(a=0),void 0===o&&(o={}),void 0===h&&(h={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=s,this.tileMargin=r,this.tileSpacing=a,this.tileProperties=o,this.tileData=h,this.tileOffset=new n,void 0!==l&&this.tileOffset.set(l.x,l.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t{var s=i(15494);t.exports=function(t,e,i){var n=s(t,e,!0,i),r=s(t,e-1,!0,i),a=s(t,e+1,!0,i),o=s(t-1,e,!0,i),h=s(t+1,e,!0,i),l=n&&n.collides;return l&&(n.faceTop=!0,n.faceBottom=!0,n.faceLeft=!0,n.faceRight=!0),r&&r.collides&&(l&&(n.faceTop=!1),r.faceBottom=!l),a&&a.collides&&(l&&(n.faceBottom=!1),a.faceTop=!l),o&&o.collides&&(l&&(n.faceLeft=!1),o.faceRight=!l),h&&h.collides&&(l&&(n.faceRight=!1),h.faceLeft=!l),n&&!n.collides&&n.resetFaces(),n}},60386:(t,e,i)=>{var s=i(15494),n=i(50811);t.exports=function(t,e,i,r,a){for(var o=null,h=null,l=null,u=null,c=n(t,e,i,r,null,a),d=0;d{var s=new(i(93736));t.exports=function(t,e,i,n){var r=i.tilemapLayer,a=r.cullPaddingX,o=r.cullPaddingY,h=r.tilemap.tileToWorldXY(t,e,s,n,r);return h.x>n.worldView.x+r.scaleX*i.tileWidth*(-a-.5)&&h.xn.worldView.y+r.scaleY*i.tileHeight*(-o-1)&&h.y{var s=i(60386),n=i(50811),r=i(62839),a=i(29633);t.exports=function(t,e,i,o,h,l,u,c){void 0===u&&(u=!0);var d=n(t,e,i,o,null,c),f=[];d.forEach((function(t){var e=new a(t.layer,t.index,t.x,t.y,t.width,t.height,t.baseWidth,t.baseHeight);e.copy(t),f.push(e)}));for(var p=h-t,v=l-e,g=0;g{var s=i(50811),n=i(51202);t.exports=function(t,e,i,r,a,o){i||(i={}),Array.isArray(t)||(t=[t]);var h=o.tilemapLayer;r||(r=h.scene),a||(a=r.cameras.main);var l,u=s(0,0,o.width,o.height,null,o),c=[];for(l=0;l{var s=i(74118),n=i(82127),r=i(84314),a=new s;t.exports=function(t,e){var i=t.tilemapLayer.tilemap,s=t.tilemapLayer,o=Math.floor(i.tileWidth*s.scaleX),h=Math.floor(i.tileHeight*s.scaleY),l=r(e.worldView.x-s.x,o,0,!0)-s.cullPaddingX,u=n(e.worldView.right-s.x,o,0,!0)+s.cullPaddingX,c=r(e.worldView.y-s.y,h,0,!0)-s.cullPaddingY,d=n(e.worldView.bottom-s.y,h,0,!0)+s.cullPaddingY;return a.setTo(l,c,u-l,d-c)}},381:(t,e,i)=>{var s=i(71586),n=i(6987);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var a=t.tilemapLayer,o=s(t,e);return(a.skipCull||1!==a.scrollFactorX||1!==a.scrollFactorY)&&(o.left=0,o.right=t.width,o.top=0,o.bottom=t.height),n(t,o,r,i),i}},97734:(t,e,i)=>{var s=i(50811),n=i(60386),r=i(68234);t.exports=function(t,e,i,a,o,h,l){for(var u=-1!==l.collideIndexes.indexOf(t),c=s(e,i,a,o,null,l),d=0;d{var s=i(50811);t.exports=function(t,e,i,n,r,a,o,h){return s(i,n,r,a,o,h).filter(t,e)}},37982:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=0),void 0===i&&(i=!1);var n,r,a,o=0;if(i){for(r=s.height-1;r>=0;r--)for(n=s.width-1;n>=0;n--)if((a=s.data[r][n])&&a.index===t){if(o===e)return a;o+=1}}else for(r=0;r{var s=i(50811);t.exports=function(t,e,i,n,r,a,o,h){return s(i,n,r,a,o,h).find(t,e)||null}},80916:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,n,r,a,o,h){s(i,n,r,a,o,h).forEach(t,e)}},31493:(t,e,i)=>{var s=i(12920),n=i(381),r=i(37524),a=i(20887),o=i(72283),h=i(19242);t.exports=function(t){return t===s.ORTHOGONAL?n:t===s.HEXAGONAL?r:t===s.STAGGERED?h:t===s.ISOMETRIC?a:o}},15494:(t,e,i)=>{var s=i(62839);t.exports=function(t,e,i,n){if(void 0===i&&(i=!1),s(t,e,n)){var r=n.data[e][t]||null;return r?-1===r.index?i?r:null:r:null}return null}},24640:(t,e,i)=>{var s=i(15494),n=new(i(93736));t.exports=function(t,e,i,r,a){return a.tilemapLayer.worldToTileXY(t,e,!0,n,r),s(n.x,n.y,i,a)}},48495:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n){var r=n.baseTileWidth,a=n.baseTileHeight,o=n.tilemapLayer,h=0,l=0;o&&(i||(i=o.scene.cameras.main),h=o.x+i.scrollX*(1-o.scrollFactorX),l=o.y+i.scrollY*(1-o.scrollFactorY),r*=o.scaleX,a*=o.scaleY);var u=h+t*r,c=l+e*a;return[new s(u,c),new s(u+r,c),new s(u+r,c+a),new s(u,c+a)]}},7160:(t,e,i)=>{var s=i(12920),n=i(63634),r=i(72283),a=i(48495);t.exports=function(t){return t===s.ORTHOGONAL?a:t===s.ISOMETRIC?r:t===s.HEXAGONAL?n:(s.STAGGERED,r)}},16884:(t,e,i)=>{var s=i(12920),n=i(72283),r=i(44150);t.exports=function(t){return t===s.ORTHOGONAL?r:n}},68182:(t,e,i)=>{var s=i(12920),n=i(21715),r=i(21808),a=i(72283),o=i(33388),h=i(46836);t.exports=function(t){return t===s.ORTHOGONAL?h:t===s.ISOMETRIC?r:t===s.HEXAGONAL?n:t===s.STAGGERED?o:a}},3752:(t,e,i)=>{var s=i(12920),n=i(72283),r=i(84132),a=i(42477);t.exports=function(t){return t===s.ORTHOGONAL?a:t===s.STAGGERED?r:n}},50811:(t,e,i)=>{var s=i(72632);t.exports=function(t,e,i,n,r,a){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=a.width),void 0===n&&(n=a.height),r||(r={});var o=s(r,"isNotEmpty",!1),h=s(r,"isColliding",!1),l=s(r,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(n+=e,e=0),t+i>a.width&&(i=Math.max(a.width-t,0)),e+n>a.height&&(n=Math.max(a.height-e,0));for(var u=[],c=e;c{var s=i(84068),n=i(50811),r=i(7563),a=i(72283),o=i(93736),h=function(t,e){return r.RectangleToTriangle(e,t)},l=new o,u=new o,c=new o;t.exports=function(t,e,i,o){if(void 0===t)return[];var d=a;t instanceof s.Circle?d=r.CircleToRectangle:t instanceof s.Rectangle?d=r.RectangleToRectangle:t instanceof s.Triangle?d=h:t instanceof s.Line&&(d=r.LineToRectangle),o.tilemapLayer.worldToTileXY(t.left,t.top,!0,u,i);var f=u.x,p=u.y;o.tilemapLayer.worldToTileXY(t.right,t.bottom,!1,c,i);var v=Math.ceil(c.x),g=Math.ceil(c.y),m=Math.max(v-f,1),y=Math.max(g-p,1),x=n(f,p,m,y,e,o),T=o.tileWidth,w=o.tileHeight;o.tilemapLayer&&(T*=o.tilemapLayer.scaleX,w*=o.tilemapLayer.scaleY);for(var E=[],S=new s.Rectangle(0,0,T,w),b=0;b{var s=i(50811),n=i(93736),r=new n,a=new n;t.exports=function(t,e,i,n,o,h,l){var u=l.tilemapLayer.tilemap._convert.WorldToTileXY;u(t,e,!0,r,h,l);var c=r.x,d=r.y;u(t+i,e+n,!1,a,h,l);var f=Math.ceil(a.x),p=Math.ceil(a.y);return s(c,d,f-c,p-d,o,l)}},29296:(t,e,i)=>{var s=i(12920),n=i(10618),r=i(806);t.exports=function(t){return t===s.ORTHOGONAL?r:n}},32688:(t,e,i)=>{var s=i(12920),n=i(11516),r=i(18750),a=i(72283),o=i(90562),h=i(45676);t.exports=function(t){return t===s.ORTHOGONAL?h:t===s.ISOMETRIC?r:t===s.HEXAGONAL?n:t===s.STAGGERED?o:a}},74326:(t,e,i)=>{var s=i(12920),n=i(10618),r=i(3689),a=i(70520);t.exports=function(t){return t===s.ORTHOGONAL?a:t===s.STAGGERED?r:n}},46598:(t,e,i)=>{var s=i(62839);t.exports=function(t,e,i){if(s(t,e,i)){var n=i.data[e][t];return null!==n&&n.index>-1}return!1}},28654:(t,e,i)=>{var s=i(46598),n=new(i(93736));t.exports=function(t,e,i,r){r.tilemapLayer.worldToTileXY(t,e,!0,n,i);var a=n.x,o=n.y;return s(a,o,r)}},6358:(t,e,i)=>{var s=i(82127),n=i(84314);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,r=t.tilemapLayer,a=Math.floor(i.tileWidth*r.scaleX),o=Math.floor(i.tileHeight*r.scaleY),h=t.hexSideLength,l=(o-h)/2+h;return{left:n(e.worldView.x-r.x,a,0,!0)-r.cullPaddingX,right:s(e.worldView.right-r.x,a,0,!0)+r.cullPaddingX,top:n(e.worldView.y-r.y,l,0,!0)-r.cullPaddingY,bottom:s(e.worldView.bottom-r.y,l,0,!0)+r.cullPaddingY}}},37524:(t,e,i)=>{var s=i(6358),n=i(6987);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var a=t.tilemapLayer;if(!a.skipCull&&1===a.scrollFactorX&&1===a.scrollFactorY){var o=s(t,e);n(t,o,r,i)}return i}},63634:(t,e,i)=>{var s=i(21715),n=i(93736),r=new n;t.exports=function(t,e,i,a){var o=a.baseTileWidth,h=a.baseTileHeight,l=a.tilemapLayer;l&&(o*=l.scaleX,h*=l.scaleY);for(var u=s(t,e,r,i,a),c=[],d=.5773502691896257*o,f=h/2,p=0;p<6;p++){var v=2*Math.PI*(.5-p)/6;c.push(new n(u.x+d*Math.cos(v),u.y+f*Math.sin(v)))}return c}},21715:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){i||(i=new s);var a=r.baseTileWidth,o=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(n||(n=h.scene.cameras.main),l=h.x+n.scrollX*(1-h.scrollFactorX),u=h.y+n.scrollY*(1-h.scrollFactorY),a*=h.scaleX,o*=h.scaleY);var c=o/2,d=l+a*t+a,f=u+1.5*e*c+c;return e%2==0&&(d-=a/2),i.set(d,f)}},11516:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,a){n||(n=new s);var o=a.baseTileWidth,h=a.baseTileHeight,l=a.tilemapLayer;l&&(r||(r=l.scene.cameras.main),t-=l.x+r.scrollX*(1-l.scrollFactorX),e-=l.y+r.scrollY*(1-l.scrollFactorY),o*=l.scaleX,h*=l.scaleY);var u=.5773502691896257,c=h/2,d=(t-o/2)/(u*o),f=(e-c)/c,p=u*d+-.3333333333333333*f,v=0*d+.6666666666666666*f,g=-p-v,m=Math.round(p),y=Math.round(v),x=Math.round(g),T=Math.abs(m-p),w=Math.abs(y-v),E=Math.abs(x-g);T>w&&T>E?m=-y-x:w>E&&(y=-m-x);var S=y,b=S%2==0?y/2+m:y/2+m-.5;return n.set(b,S)}},62839:t=>{t.exports=function(t,e,i){return t>=0&&t=0&&e{var s=i(13125);t.exports=function(t,e,i,n){void 0===i&&(i=[]),void 0===n&&(n=0),i.length=0;var r,a,o,h=t.tilemapLayer,l=t.data,u=t.width,c=t.height,d=u,f=c;if(!h.skipCull)if(0===n){for(a=0;a=0;r--)if(s(r,a,t,e)){if(!(o=l[a][r])||-1===o.index||!o.visible||0===o.alpha)continue;i.push(o)}}else if(2===n){for(a=f;a>=0;a--)for(r=0;l[a]&&r=0;a--)for(r=d;l[a]&&r>=0;r--)if(s(r,a,t,e)){if(!(o=l[a][r])||-1===o.index||!o.visible||0===o.alpha)continue;i.push(o)}return h.tilesDrawn=i.length,h.tilesTotal=u*c,i}},21808:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){i||(i=new s);var a=r.baseTileWidth,o=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(n||(n=h.scene.cameras.main),l=h.x+n.scrollX*(1-h.scrollFactorX),a*=h.scaleX,u=h.y+n.scrollY*(1-h.scrollFactorY),o*=h.scaleY);var c=l+a/2*(t-e),d=u+(t+e)*(o/2);return i.set(c,d)}},18750:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,a,o){n||(n=new s);var h=a.baseTileWidth,l=a.baseTileHeight,u=a.tilemapLayer;u&&(r||(r=u.scene.cameras.main),e-=u.y+r.scrollY*(1-u.scrollFactorY),l*=u.scaleY,t-=u.x+r.scrollX*(1-u.scrollFactorX),h*=u.scaleX);var c=h/2,d=l/2;o||(e-=l);var f=.5*((t-=c)/c+e/d),p=.5*(-t/c+e/d);return i&&(f=Math.floor(f),p=Math.floor(p)),n.set(f,p)}},29003:(t,e,i)=>{var s=i(29633),n=i(62839),r=i(92839),a=i(68234),o=i(14556);t.exports=function(t,e,i,h,l){if(void 0===h&&(h=!0),!n(e,i,l))return null;var u,c=l.data[i][e],d=c&&c.collides;t instanceof s?(null===l.data[i][e]&&(l.data[i][e]=new s(l,t.index,e,i,l.tileWidth,l.tileHeight)),l.data[i][e].copy(t)):(u=t,null===l.data[i][e]?l.data[i][e]=new s(l,u,e,i,l.tileWidth,l.tileHeight):l.data[i][e].index=u);var f=l.data[i][e],p=-1!==l.collideIndexes.indexOf(f.index),v=o(l.tilemapLayer.tilemap)[u=t instanceof s?t.index:t][2],g=l.tilemapLayer.tileset[v];return f.width=g.tileWidth,f.height=g.tileHeight,a(f,p),h&&d!==f.collides&&r(e,i,l),f}},48565:(t,e,i)=>{var s=i(29003),n=new(i(93736));t.exports=function(t,e,i,r,a,o){return o.tilemapLayer.worldToTileXY(e,i,!0,n,a,o),s(t,n.x,n.y,r,o)}},56547:(t,e,i)=>{var s=i(60386),n=i(29003);t.exports=function(t,e,i,r,a){if(void 0===r&&(r=!0),!Array.isArray(t))return null;Array.isArray(t[0])||(t=[t]);for(var o=t.length,h=t[0].length,l=0;l{var s=i(50811),n=i(72861);t.exports=function(t,e,i,r,a,o){var h,l=s(t,e,i,r,{},o);if(!a)for(a=[],h=0;h{var s=i(29633),n=i(62839),r=i(92839);t.exports=function(t,e,i,a,o){if(void 0===i&&(i=!0),void 0===a&&(a=!0),!n(t,e,o))return null;var h=o.data[e][t];return h?(o.data[e][t]=i?null:new s(o,-1,t,e,o.tileWidth,o.tileHeight),a&&h&&h.collides&&r(t,e,o),h):null}},17384:(t,e,i)=>{var s=i(929),n=new(i(93736));t.exports=function(t,e,i,r,a,o){return o.tilemapLayer.worldToTileXY(t,e,!0,n,a,o),s(n.x,n.y,i,r,o)}},93763:(t,e,i)=>{var s=i(50811),n=i(95509),r=new n(105,210,231,150),a=new n(243,134,48,200),o=new n(40,39,37,150);t.exports=function(t,e,i){void 0===e&&(e={});var n=void 0!==e.tileColor?e.tileColor:r,h=void 0!==e.collidingTileColor?e.collidingTileColor:a,l=void 0!==e.faceColor?e.faceColor:o,u=s(0,0,i.width,i.height,null,i);t.translateCanvas(i.tilemapLayer.x,i.tilemapLayer.y),t.scaleCanvas(i.tilemapLayer.scaleX,i.tilemapLayer.scaleY);for(var c=0;c{var s=i(50811);t.exports=function(t,e,i,n,r,a,o){for(var h=s(i,n,r,a,null,o),l=0;l{t.exports=function(t,e,i,s){var n,r,a,o=t.data,h=t.width,l=t.height,u=t.tilemapLayer,c=Math.max(0,e.left),d=Math.min(h,e.right),f=Math.max(0,e.top),p=Math.min(l,e.bottom);if(0===i)for(r=f;r=c;n--)(a=o[r][n])&&-1!==a.index&&a.visible&&0!==a.alpha&&s.push(a);else if(2===i)for(r=p;r>=f;r--)for(n=c;o[r]&&n=f;r--)for(n=d;o[r]&&n>=c;n--)(a=o[r][n])&&-1!==a.index&&a.visible&&0!==a.alpha&&s.push(a);return u.tilesDrawn=s.length,u.tilesTotal=h*l,s}},51710:(t,e,i)=>{var s=i(68234),n=i(60386),r=i(91181);t.exports=function(t,e,i,a,o){void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===o&&(o=!0),Array.isArray(t)||(t=[t]);for(var h=0;h{var s=i(68234),n=i(60386),r=i(91181);t.exports=function(t,e,i,a,o,h){if(void 0===i&&(i=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),!(t>e)){for(var l=t;l<=e;l++)r(l,i,o);if(h)for(var u=0;u=t&&d.index<=e&&s(d,i)}a&&n(0,0,o.width,o.height,o)}}},33158:(t,e,i)=>{var s=i(68234),n=i(60386),r=i(91181);t.exports=function(t,e,i,a){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var o=0;o{var s=i(68234),n=i(60386),r=i(19256);t.exports=function(t,e,i,a){void 0===e&&(e=!0),void 0===i&&(i=!0);for(var o=0;o{var s=i(68234),n=i(60386);t.exports=function(t,e,i){void 0===t&&(t=!0),void 0===e&&(e=!0);for(var r=0;r0&&s(o,t)}}e&&n(0,0,i.width,i.height,i)}},91181:t=>{t.exports=function(t,e,i){var s=i.collideIndexes.indexOf(t);e&&-1===s?i.collideIndexes.push(t):e||-1===s||i.collideIndexes.splice(s,1)}},68234:t=>{t.exports=function(t,e){e?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)}},11628:t=>{t.exports=function(t,e,i,s){if("number"==typeof t)s.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var n=0,r=t.length;n{var s=i(50811);t.exports=function(t,e,i,n,r,a,o){for(var h=s(t,e,i,n,null,o),l=0;l{var s=i(50811),n=i(18592);t.exports=function(t,e,i,r,a){var o=s(t,e,i,r,null,a),h=o.map((function(t){return t.index}));n(h);for(var l=0;l{var s=i(82127),n=i(84314);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,r=t.tilemapLayer,a=Math.floor(i.tileWidth*r.scaleX),o=Math.floor(i.tileHeight*r.scaleY);return{left:n(e.worldView.x-r.x,a,0,!0)-r.cullPaddingX,right:s(e.worldView.right-r.x,a,0,!0)+r.cullPaddingX,top:n(e.worldView.y-r.y,o/2,0,!0)-r.cullPaddingY,bottom:s(e.worldView.bottom-r.y,o/2,0,!0)+r.cullPaddingY}}},19242:(t,e,i)=>{var s=i(53945),n=i(6987);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var a=t.tilemapLayer;if(!a.skipCull&&1===a.scrollFactorX&&1===a.scrollFactorY){var o=s(t,e);n(t,o,r,i)}return i}},33388:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){i||(i=new s);var a=r.baseTileWidth,o=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(n||(n=h.scene.cameras.main),l=h.x+n.scrollX*(1-h.scrollFactorX),a*=h.scaleX,u=h.y+n.scrollY*(1-h.scrollFactorY),o*=h.scaleY);var c=l+t*a+e%2*(a/2),d=u+e*(o/2);return i.set(c,d)}},84132:t=>{t.exports=function(t,e,i){var s=i.baseTileHeight,n=i.tilemapLayer,r=0;return n&&(void 0===e&&(e=n.scene.cameras.main),r=n.y+e.scrollY*(1-n.scrollFactorY),s*=n.scaleY),r+t*(s/2)+s}},90562:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,a){n||(n=new s);var o=a.baseTileWidth,h=a.baseTileHeight,l=a.tilemapLayer;l&&(r||(r=l.scene.cameras.main),e-=l.y+r.scrollY*(1-l.scrollFactorY),h*=l.scaleY,t-=l.x+r.scrollX*(1-l.scrollFactorX),o*=l.scaleX);var u=i?Math.floor(e/(h/2)):e/(h/2),c=i?Math.floor((t+u%2*.5*o)/o):(t+u%2*.5*o)/o;return n.set(c,u)}},3689:t=>{t.exports=function(t,e,i,s){var n=s.baseTileHeight,r=s.tilemapLayer;return r&&(i||(i=r.scene.cameras.main),t-=r.y+i.scrollY*(1-r.scrollFactorY),n*=r.scaleY),e?Math.floor(t/(n/2)):t/(n/2)}},55217:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,n,r,a,o){for(var h=s(i,n,r,a,null,o),l=0;l{t.exports=function(t,e,i){var s=i.baseTileWidth,n=i.tilemapLayer,r=0;return n&&(e||(e=n.scene.cameras.main),r=n.x+e.scrollX*(1-n.scrollFactorX),s*=n.scaleX),r+t*s}},46836:(t,e,i)=>{var s=i(44150),n=i(42477),r=i(93736);t.exports=function(t,e,i,a,o){return i||(i=new r(0,0)),i.x=s(t,a,o),i.y=n(e,a,o),i}},42477:t=>{t.exports=function(t,e,i){var s=i.baseTileHeight,n=i.tilemapLayer,r=0;return n&&(e||(e=n.scene.cameras.main),r=n.y+e.scrollY*(1-n.scrollFactorY),s*=n.scaleY),r+t*s}},39677:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,n,r,a){if(r){var o,h=s(t,e,i,n,null,a),l=0;for(o=0;o{var s=i(45676),n=new(i(93736));t.exports=function(t,e,i,r){return s(t,0,e,n,i,r),n.x}},45676:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,a){void 0===i&&(i=!0),n||(n=new s);var o=a.baseTileWidth,h=a.baseTileHeight,l=a.tilemapLayer;l&&(r||(r=l.scene.cameras.main),t-=l.x+r.scrollX*(1-l.scrollFactorX),e-=l.y+r.scrollY*(1-l.scrollFactorY),o*=l.scaleX,h*=l.scaleY);var u=t/o,c=e/h;return i&&(u=Math.floor(u),c=Math.floor(c)),n.set(u,c)}},70520:(t,e,i)=>{var s=i(45676),n=new(i(93736));t.exports=function(t,e,i,r){return s(0,t,e,n,i,r),n.y}},5047:(t,e,i)=>{t.exports={CalculateFacesAt:i(92839),CalculateFacesWithin:i(60386),CheckIsoBounds:i(13125),Copy:i(17347),CreateFromTiles:i(93604),CullBounds:i(71586),CullTiles:i(381),Fill:i(97734),FilterTiles:i(63555),FindByIndex:i(37982),FindTile:i(48297),ForEachTile:i(80916),GetCullTilesFunction:i(31493),GetTileAt:i(15494),GetTileAtWorldXY:i(24640),GetTileCorners:i(48495),GetTileCornersFunction:i(7160),GetTilesWithin:i(50811),GetTilesWithinShape:i(31674),GetTilesWithinWorldXY:i(44662),GetTileToWorldXFunction:i(16884),GetTileToWorldXYFunction:i(68182),GetTileToWorldYFunction:i(3752),GetWorldToTileXFunction:i(29296),GetWorldToTileXYFunction:i(32688),GetWorldToTileYFunction:i(74326),HasTileAt:i(46598),HasTileAtWorldXY:i(28654),HexagonalCullBounds:i(6358),HexagonalCullTiles:i(37524),HexagonalGetTileCorners:i(63634),HexagonalTileToWorldXY:i(21715),HexagonalWorldToTileXY:i(11516),IsInLayerBounds:i(62839),IsometricCullTiles:i(20887),IsometricTileToWorldXY:i(21808),IsometricWorldToTileXY:i(18750),PutTileAt:i(29003),PutTileAtWorldXY:i(48565),PutTilesAt:i(56547),Randomize:i(91180),RemoveTileAt:i(929),RemoveTileAtWorldXY:i(17384),RenderDebug:i(93763),ReplaceByIndex:i(51202),RunCull:i(6987),SetCollision:i(51710),SetCollisionBetween:i(15216),SetCollisionByExclusion:i(33158),SetCollisionByProperty:i(4180),SetCollisionFromCollisionGroup:i(18625),SetLayerCollisionIndex:i(91181),SetTileCollision:i(68234),SetTileIndexCallback:i(11628),SetTileLocationCallback:i(72732),Shuffle:i(34397),StaggeredCullBounds:i(53945),StaggeredCullTiles:i(19242),StaggeredTileToWorldXY:i(33388),StaggeredTileToWorldY:i(84132),StaggeredWorldToTileXY:i(90562),StaggeredWorldToTileY:i(3689),SwapByIndex:i(55217),TileToWorldX:i(44150),TileToWorldXY:i(46836),TileToWorldY:i(42477),WeightedRandomize:i(39677),WorldToTileX:i(806),WorldToTileXY:i(45676),WorldToTileY:i(70520)}},12920:t=>{t.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},84758:(t,e,i)=>{var s={ORIENTATION:i(12920)};t.exports=s},52678:(t,e,i)=>{var s=i(98611),n=i(84758),r={Components:i(5047),Parsers:i(34124),Formats:i(93560),ImageCollection:i(97042),ParseToTilemap:i(15043),Tile:i(29633),Tilemap:i(89797),TilemapCreator:i(4843),TilemapFactory:i(37940),Tileset:i(47975),TilemapLayer:i(87177),Orientation:i(12920),LayerData:i(94990),MapData:i(16586),ObjectLayer:i(15256)};r=s(!1,r,n.ORIENTATION),t.exports=r},94990:(t,e,i)=>{var s=i(56694),n=i(12920),r=i(72632),a=new s({initialize:function(t){void 0===t&&(t={}),this.name=r(t,"name","layer"),this.x=r(t,"x",0),this.y=r(t,"y",0),this.width=r(t,"width",0),this.height=r(t,"height",0),this.tileWidth=r(t,"tileWidth",0),this.tileHeight=r(t,"tileHeight",0),this.baseTileWidth=r(t,"baseTileWidth",this.tileWidth),this.baseTileHeight=r(t,"baseTileHeight",this.tileHeight),this.orientation=r(t,"orientation",n.ORTHOGONAL),this.widthInPixels=r(t,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=r(t,"heightInPixels",this.height*this.baseTileHeight),this.alpha=r(t,"alpha",1),this.visible=r(t,"visible",!0),this.properties=r(t,"properties",[]),this.indexes=r(t,"indexes",[]),this.collideIndexes=r(t,"collideIndexes",[]),this.callbacks=r(t,"callbacks",[]),this.bodies=r(t,"bodies",[]),this.data=r(t,"data",[]),this.tilemapLayer=r(t,"tilemapLayer",null),this.hexSideLength=r(t,"hexSideLength",0)}});t.exports=a},16586:(t,e,i)=>{var s=i(56694),n=i(12920),r=i(72632),a=new s({initialize:function(t){void 0===t&&(t={}),this.name=r(t,"name","map"),this.width=r(t,"width",0),this.height=r(t,"height",0),this.infinite=r(t,"infinite",!1),this.tileWidth=r(t,"tileWidth",0),this.tileHeight=r(t,"tileHeight",0),this.widthInPixels=r(t,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=r(t,"heightInPixels",this.height*this.tileHeight),this.format=r(t,"format",null),this.orientation=r(t,"orientation",n.ORTHOGONAL),this.renderOrder=r(t,"renderOrder","right-down"),this.version=r(t,"version","1"),this.properties=r(t,"properties",{}),this.layers=r(t,"layers",[]),this.images=r(t,"images",[]),this.objects=r(t,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=r(t,"collision",{}),this.tilesets=r(t,"tilesets",[]),this.imageCollections=r(t,"imageCollections",[]),this.tiles=r(t,"tiles",[]),this.hexSideLength=r(t,"hexSideLength",0),this.staggerAxis=r(t,"staggerAxis","y"),this.staggerIndex=r(t,"staggerIndex","odd")}});t.exports=a},15256:(t,e,i)=>{var s=i(56694),n=i(72632),r=new s({initialize:function(t){void 0===t&&(t={}),this.name=n(t,"name","object layer"),this.opacity=n(t,"opacity",1),this.properties=n(t,"properties",{}),this.propertyTypes=n(t,"propertytypes",{}),this.type=n(t,"type","objectgroup"),this.visible=n(t,"visible",!0),this.objects=n(t,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});t.exports=r},21394:(t,e,i)=>{var s=i(12920);t.exports=function(t){return"isometric"===(t=t.toLowerCase())?s.ISOMETRIC:"staggered"===t?s.STAGGERED:"hexagonal"===t?s.HEXAGONAL:s.ORTHOGONAL}},90715:(t,e,i)=>{var s=i(93560),n=i(84346),r=i(96097),a=i(2378),o=i(44909);t.exports=function(t,e,i,h,l,u){var c;switch(e){case s.ARRAY_2D:c=n(t,i,h,l,u);break;case s.CSV:c=r(t,i,h,l,u);break;case s.TILED_JSON:c=a(t,i,u);break;case s.WELTMEISTER:c=o(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},84346:(t,e,i)=>{var s=i(93560),n=i(94990),r=i(16586),a=i(29633);t.exports=function(t,e,i,o,h){for(var l=new n({tileWidth:i,tileHeight:o}),u=new r({name:t,tileWidth:i,tileHeight:o,format:s.ARRAY_2D,layers:[l]}),c=[],d=e.length,f=0,p=0;p{var s=i(93560),n=i(84346);t.exports=function(t,e,i,r,a){var o=e.trim().split("\n").map((function(t){return t.split(",")})),h=n(t,o,i,r,a);return h.format=s.CSV,h}},30951:(t,e,i)=>{var s=i(94990),n=i(29633);t.exports=function(t,e){for(var i=[],r=0;r-1?new n(o,f,c,u,a.tilesize,a.tilesize):e?null:new n(o,-1,c,u,a.tilesize,a.tilesize),h.push(d)}l.push(h),h=[]}o.data=l,i.push(o)}return i}},47488:(t,e,i)=>{var s=i(47975);t.exports=function(t){for(var e=[],i=[],n=0;n{var s=i(93560),n=i(16586),r=i(30951),a=i(47488);t.exports=function(t,e,i){if(0===e.layer.length)return console.warn("No layers found in the Weltmeister map: "+t),null;for(var o=0,h=0,l=0;lo&&(o=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new n({width:o,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:s.WELTMEISTER});return u.layers=r(e,i),u.tilesets=a(e),u}},24507:(t,e,i)=>{t.exports={ParseTileLayers:i(30951),ParseTilesets:i(47488),ParseWeltmeister:i(44909)}},34124:(t,e,i)=>{t.exports={FromOrientationString:i(21394),Parse:i(90715),Parse2DArray:i(84346),ParseCSV:i(96097),Impact:i(24507),Tiled:i(50044)}},48646:(t,e,i)=>{var s=i(98611);t.exports=function(t){for(var e,i,n,r,a,o=0;o{t.exports=function(t){for(var e=window.atob(t),i=e.length,s=new Array(i/4),n=0;n>>0;return s}},14556:(t,e,i)=>{var s=i(47975);t.exports=function(t){var e,i,n=[];for(e=0;e{var s=i(72632);t.exports=function(t,e,i){if(!e)return{i:0,layers:t.layers,name:"",opacity:1,visible:!0,x:0,y:0};var n=e.x+s(e,"startx",0)*t.tilewidth+s(e,"offsetx",0),r=e.y+s(e,"starty",0)*t.tileheight+s(e,"offsety",0);return{i:0,layers:e.layers,name:i.name+e.name+"/",opacity:i.opacity*e.opacity,visible:i.visible&&e.visible,x:i.x+n,y:i.y+r}}},8847:t=>{var e=2147483648,i=1073741824,s=536870912;t.exports=function(t){var n=Boolean(t&e),r=Boolean(t&i),a=Boolean(t&s);t&=536870911;var o=0,h=!1;return n&&r&&a?(o=Math.PI/2,h=!0):n&&r&&!a?(o=Math.PI,h=!1):n&&!r&&a?(o=Math.PI/2,h=!1):!n||r||a?!n&&r&&a?(o=3*Math.PI/2,h=!1):n||!r||a?n||r||!a?n||r||a||(o=0,h=!1):(o=3*Math.PI/2,h=!0):(o=Math.PI,h=!0):(o=0,h=!0),{gid:t,flippedHorizontal:n,flippedVertical:r,flippedAntiDiagonal:a,rotation:o,flipped:h}}},78339:(t,e,i)=>{var s=i(72632),n=i(92044);t.exports=function(t){for(var e=[],i=[],r=n(t);r.i0;)if(r.i>=r.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=i.pop()}else{var a=r.layers[r.i];if(r.i++,"imagelayer"===a.type){var o=s(a,"offsetx",0)+s(a,"startx",0),h=s(a,"offsety",0)+s(a,"starty",0);e.push({name:r.name+a.name,image:a.image,x:r.x+o+a.x,y:r.y+h+a.y,alpha:r.opacity*a.opacity,visible:r.visible&&a.visible,properties:s(a,"properties",{})})}else if("group"===a.type){var l=n(t,a,r);i.push(r),r=l}}return e}},2378:(t,e,i)=>{var s=i(48646),n=i(14556),r=i(12920),a=i(28699),o=i(93560),h=i(21394),l=i(16586),u=i(78339),c=i(61136),d=i(95925),f=i(93392);t.exports=function(t,e,i){var p=a(e),v=new l({width:p.width,height:p.height,name:t,tileWidth:p.tilewidth,tileHeight:p.tileheight,orientation:h(p.orientation),format:o.TILED_JSON,version:p.version,properties:p.properties,renderOrder:p.renderorder,infinite:p.infinite});v.orientation===r.HEXAGONAL&&(v.hexSideLength=p.hexsidelength,v.staggerAxis=p.staggeraxis,v.staggerIndex=p.staggerindex),v.layers=d(p,i),v.images=u(p);var g=f(p);return v.tilesets=g.tilesets,v.imageCollections=g.imageCollections,v.objects=c(p),v.tiles=n(v),s(v),v}},4281:(t,e,i)=>{var s=i(28820),n=i(8847),r=function(t){return{x:t.x,y:t.y}},a=["id","name","type","rotation","properties","visible","x","y","width","height"];t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var o=s(t,a);if(o.x+=e,o.y+=i,t.gid){var h=n(t.gid);o.gid=h.gid,o.flippedHorizontal=h.flippedHorizontal,o.flippedVertical=h.flippedVertical,o.flippedAntiDiagonal=h.flippedAntiDiagonal}else t.polyline?o.polyline=t.polyline.map(r):t.polygon?o.polygon=t.polygon.map(r):t.ellipse?o.ellipse=t.ellipse:t.text?o.text=t.text:t.point?o.point=!0:o.rectangle=!0;return o}},61136:(t,e,i)=>{var s=i(72632),n=i(4281),r=i(15256),a=i(92044);t.exports=function(t){for(var e=[],i=[],o=a(t);o.i0;)if(o.i>=o.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}o=i.pop()}else{var h=o.layers[o.i];if(o.i++,h.opacity*=o.opacity,h.visible=o.visible&&h.visible,"objectgroup"===h.type){h.name=o.name+h.name;for(var l=o.x+s(h,"startx",0)+s(h,"offsetx",0),u=o.y+s(h,"starty",0)+s(h,"offsety",0),c=[],d=0;d{var s=i(43908),n=i(12920),r=i(92044),a=i(21394),o=i(72632),h=i(94990),l=i(8847),u=i(29633);t.exports=function(t,e){for(var i=o(t,"infinite",!1),c=[],d=[],f=r(t);f.i0;)if(f.i>=f.layers.length){if(d.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}f=d.pop()}else{var p=f.layers[f.i];if(f.i++,"tilelayer"===p.type)if(p.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+p.name+"'");else{if(p.encoding&&"base64"===p.encoding){if(p.chunks)for(var v=0;v0?((y=new u(g,m.gid,L,F,t.tilewidth,t.tileheight)).rotation=m.rotation,y.flipX=m.flipped,T[F][L]=y):(x=e?null:new u(g,-1,L,F,t.tilewidth,t.tileheight),T[F][L]=x),++w===_.width&&(M++,w=0)}}else{(g=new h({name:f.name+p.name,x:f.x+o(p,"offsetx",0)+p.x,y:f.y+o(p,"offsety",0)+p.y,width:p.width,height:p.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:f.opacity*p.opacity,visible:f.visible&&p.visible,properties:o(p,"properties",[]),orientation:a(t.orientation)})).orientation===n.HEXAGONAL&&(g.hexSideLength=t.hexsidelength);for(var D=[],k=0,I=p.data.length;k0?((y=new u(g,m.gid,w,T.length,t.tilewidth,t.tileheight)).rotation=m.rotation,y.flipX=m.flipped,D.push(y)):(x=e?null:new u(g,-1,w,T.length,t.tilewidth,t.tileheight),D.push(x)),++w===p.width&&(T.push(D),w=0,D=[])}g.data=T,c.push(g)}else if("group"===p.type){var B=r(t,p,f);d.push(f),f=B}}return c}},93392:(t,e,i)=>{var s=i(47975),n=i(97042),r=i(4281),a=i(39642);t.exports=function(t){for(var e,i=[],o=[],h=null,l=0;l1){var d=void 0,f=void 0;if(Array.isArray(u.tiles)){d=d||{},f=f||{};for(var p=0;p{t.exports=function(t,e){for(var i=0;i0){var r,a,o,h={},l={};if(Array.isArray(s.edgecolors))for(r=0;r{t.exports={AssignTileProperties:i(48646),Base64Decode:i(43908),BuildTilesetIndex:i(14556),CreateGroupLayer:i(92044),ParseGID:i(8847),ParseImageLayers:i(78339),ParseJSONTiled:i(2378),ParseObject:i(4281),ParseObjectLayers:i(61136),ParseTileLayers:i(95925),ParseTilesets:i(93392)}},73779:(t,e,i)=>{var s=i(56694),n=i(91963),r=i(7599),a=i(57911),o=i(66458),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.now=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(r.PRE_UPDATE,this.preUpdate,this),t.on(r.UPDATE,this.update,this),t.once(r.SHUTDOWN,this.shutdown,this)},addEvent:function(t){var e;return t instanceof a?(e=t,this.removeEvent(e),e.elapsed=e.startAt,e.hasDispatched=!1,e.repeatCount=-1===e.repeat||e.loop?999999999999:e.repeat):e=new a(t),this._pendingInsertion.push(e),e},delayedCall:function(t,e,i,s){return this.addEvent({delay:t,callback:e,args:i,callbackScope:s})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e-1&&this._active.splice(n,1),s.destroy()}for(i=0;i=s.delay)){var n=s.elapsed-s.delay;if(s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),s.repeatCount>0){if(s.repeatCount--,n>=s.delay)for(;n>=s.delay&&s.repeatCount>0;)s.callback&&s.callback.apply(s.callbackScope,s.args),n-=s.delay,s.repeatCount--;s.elapsed=n,s.hasDispatched=!1}else s.hasDispatched&&this._pendingRemoval.push(s)}}}},shutdown:function(){var t;for(t=0;t{var s=i(56694),n=i(72632),r=new s({initialize:function(t){this.delay=0,this.repeat=0,this.repeatCount=0,this.loop=!1,this.callback,this.callbackScope,this.args,this.timeScale=1,this.startAt=0,this.elapsed=0,this.paused=!1,this.hasDispatched=!1,this.reset(t)},reset:function(t){if(this.delay=n(t,"delay",0),this.repeat=n(t,"repeat",0),this.loop=n(t,"loop",!1),this.callback=n(t,"callback",void 0),this.callbackScope=n(t,"callbackScope",this.callback),this.args=n(t,"args",[]),this.timeScale=n(t,"timeScale",1),this.startAt=n(t,"startAt",0),this.paused=n(t,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=-1===this.repeat||this.loop?999999999999:this.repeat,0===this.delay&&(this.repeat>0||this.loop))throw new Error("TimerEvent infinite loop created via zero delay");return this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return.001*this.getRemaining()},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return.001*this.getOverallRemaining()},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},97121:(t,e,i)=>{t.exports={Clock:i(73779),TimerEvent:i(57911)}},64532:(t,e,i)=>{var s=i(66458),n=i(56694),r=i(5454),a=i(68710),o=i(91963),h=i(7599),l=i(91944),u=i(39366),c=i(68061),d=i(45641),f=i(56034),p=new n({initialize:function(t){this.scene=t,this.events=t.sys.events,this.timeScale=1,this.paused=!1,this.processing=!1,this.tweens=[],this.time=0,this.startTime=0,this.nextTime=0,this.prevTime=0,this.maxLag=500,this.lagSkip=33,this.gap=1e3/240,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.events.once(h.DESTROY,this.destroy,this)},start:function(){this.timeScale=1,this.paused=!1,this.startTime=Date.now(),this.prevTime=this.startTime,this.nextTime=this.gap,this.events.on(h.UPDATE,this.update,this),this.events.once(h.SHUTDOWN,this.shutdown,this)},create:function(t){Array.isArray(t)||(t=[t]);for(var e=[],i=0;i-1},existing:function(t){return this.has(t)||this.tweens.push(t.reset()),this},addCounter:function(t){var e=a(this,t);return this.tweens.push(e.reset()),e},stagger:function(t,e){return l(t,e)},setLagSmooth:function(t,e){return void 0===t&&(t=1/1e-8),void 0===e&&(e=0),this.maxLag=t,this.lagSkip=Math.min(e,this.maxLag),this},setFps:function(t){return void 0===t&&(t=240),this.gap=1e3/t,this.nextTime=1e3*this.time+this.gap,this},getDelta:function(t){var e=Date.now()-this.prevTime;e>this.maxLag&&(this.startTime+=e-this.lagSkip),this.prevTime+=e;var i=this.prevTime-this.startTime,s=i-this.nextTime,n=i-1e3*this.time;return s>0||t?(i/=1e3,this.time=i,this.nextTime+=s+(s>=this.gap?4:this.gap-s)):n=0,n},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(t){void 0===t&&(t=!1);var e=this.getDelta(t);if(!(e<=0)){var i,s;this.processing=!0;var n=[],r=this.tweens;for(i=0;i0){for(i=0;i-1&&(s.isPendingRemove()||s.isDestroyed())&&(r.splice(o,1),s.destroy())}n.length=0}this.processing=!1}},remove:function(t){return this.processing?t.setPendingRemoveState():(s(this.tweens,t),t.setRemovedState()),this},reset:function(t){return this.existing(t),t.seek(),t.setActiveState(),this},makeActive:function(t){return this.existing(t),t.setActiveState(),this},each:function(t,e){var i,s=[null];for(i=1;i{t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},21902:(t,e,i)=>{var s=i(35060),n=i(40587);t.exports=function(t,e){var i=s.Power0;if("string"==typeof t)if(s.hasOwnProperty(t))i=s[t];else{var r="";if(t.indexOf(".")){var a=(r=t.substring(t.indexOf(".")+1)).toLowerCase();"in"===a?r="easeIn":"out"===a?r="easeOut":"inout"===a&&(r="easeInOut")}t=n(t.substring(0,t.indexOf(".")+1)+r),s.hasOwnProperty(t)&&(i=s[t])}else"function"==typeof t&&(i=t);if(!e)return i;var o=e.slice(0);return o.unshift(0),function(t){return o[0]=t,i.apply(this,o)}}},4840:(t,e,i)=>{var s=i(63210),n=i(88332),r={bezier:s,catmull:n,catmullrom:n,linear:i(47614)};t.exports=function(t){if(null===t)return null;var e=r.linear;return"string"==typeof t?r.hasOwnProperty(t)&&(e=r[t]):"function"==typeof t&&(e=t),e}},28348:t=>{t.exports=function(t,e,i){var s;t.hasOwnProperty(e)?s="function"===typeof t[e]?function(i,s,n,r,a,o){return t[e](i,s,n,r,a,o)}:function(){return t[e]}:s="function"==typeof i?i:function(){return i};return s}},92407:(t,e,i)=>{var s=i(53709);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substring(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===s.indexOf(e)&&"_"!==e.substring(0,1)&&i.push({key:e,value:t[e]});return i}},65868:(t,e,i)=>{var s=i(10850);t.exports=function(t){var e=s(t,"targets",null);return null===e||("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e])),e}},9744:(t,e,i)=>{var s=i(17489),n=i(61616);function r(t){return!!t.getActive&&"function"==typeof t.getActive}function a(t){return!!t.getStart&&"function"==typeof t.getStart}function o(t){return!!t.getEnd&&"function"==typeof t.getEnd}var h=function(t,e){var i,l,u=function(t,e,i){return i},c=function(t,e,i){return i},d=null,f=typeof e;if("number"===f)u=function(){return e};else if(Array.isArray(e))c=function(){return e[0]},u=function(){return e[e.length-1]};else if("string"===f){var p=e.toLowerCase(),v="random"===p.substring(0,6),g="int"===p.substring(0,3);if(v||g){var m=p.indexOf("("),y=p.indexOf(")"),x=p.indexOf(",");if(!(m&&y&&x))throw new Error("invalid random() format");var T=parseFloat(p.substring(m+1,x)),w=parseFloat(p.substring(x+1,y));u=v?function(){return n(T,w)}:function(){return s(T,w)}}else{p=p[0];var E=parseFloat(e.substr(2));switch(p){case"+":u=function(t,e,i){return i+E};break;case"-":u=function(t,e,i){return i-E};break;case"*":u=function(t,e,i){return i*E};break;case"/":u=function(t,e,i){return i/E};break;default:u=function(){return parseFloat(e)}}}}else if("function"===f)u=e;else if("object"===f)if(a(l=e)||o(l)||r(l))r(e)&&(d=e.getActive),o(e)&&(u=e.getEnd),a(e)&&(c=e.getStart);else if(e.hasOwnProperty("value"))i=h(t,e.value);else{var S=e.hasOwnProperty("to"),b=e.hasOwnProperty("from"),A=e.hasOwnProperty("start");if(S&&(b||A)){if(i=h(t,e.to),A){var _=h(t,e.start);i.getActive=_.getEnd}if(b){var C=h(t,e.from);i.getStart=C.getEnd}}}return i||(i={getActive:d,getEnd:u,getStart:c}),i};t.exports=h},68710:(t,e,i)=>{var s=i(502),n=i(99730),r=i(20494),a=i(63130),o=i(21902),h=i(28348),l=i(10850),u=i(9744),c=i(72066),d=i(39366);t.exports=function(t,e,i){if(e instanceof d)return e.parent=t,e;i=void 0===i?n:c(n,i);var f=l(e,"from",0),p=l(e,"to",1),v=[{value:f}],g=l(e,"delay",i.delay),m=l(e,"easeParams",i.easeParams),y=l(e,"ease",i.ease),x=u("value",p),T=new d(t,v),w=T.add(0,"value",x.getEnd,x.getStart,x.getActive,o(l(e,"ease",y),l(e,"easeParams",m)),h(e,"delay",g),l(e,"duration",i.duration),a(e,"yoyo",i.yoyo),l(e,"hold",i.hold),l(e,"repeat",i.repeat),l(e,"repeatDelay",i.repeatDelay),!1,!1);w.start=f,w.current=f,T.completeDelay=r(e,"completeDelay",0),T.loop=Math.round(r(e,"loop",0)),T.loopDelay=Math.round(r(e,"loopDelay",0)),T.paused=a(e,"paused",!1),T.persist=a(e,"persist",!1),T.callbackScope=l(e,"callbackScope",T);for(var E=s.TYPES,S=0;S{var s=i(21902),n=i(10850),r=i(83392);t.exports=function(t,e){var i;void 0===e&&(e={});var a=n(e,"start",0),o=n(e,"ease",null),h=n(e,"grid",null),l=n(e,"from",0),u="first"===l,c="center"===l,d="last"===l,f="number"==typeof l,p=Array.isArray(t),v=p?parseFloat(t[0]):parseFloat(t),g=p?parseFloat(t[1]):0,m=Math.max(v,g);if(p&&(a+=v),h){var y=h[0],x=h[1],T=0,w=0,E=0,S=0,b=[];d?(T=y-1,w=x-1):f?(T=l%y,w=Math.floor(l/y)):c&&(T=(y-1)/2,w=(x-1)/2);for(var A=r.MIN_SAFE_INTEGER,_=0;_A&&(A=R),b[_][C]=R}}}var M=o?s(o):null;return i=h?function(t,e,i,s){var n,r=0,o=s%y,h=Math.floor(s/y);if(o>=0&&o=0&&h{var s=i(502),n=i(99730),r=i(20494),a=i(63130),o=i(21902),h=i(4840),l=i(28348),u=i(92407),c=i(65868),d=i(10850),f=i(9744),p=i(72066),v=i(39366);t.exports=function(t,e,i){if(e instanceof v)return e.parent=t,e;i=void 0===i?n:p(n,i);var g=c(e);!g&&i.targets&&(g=i.targets);for(var m=u(e),y=d(e,"delay",i.delay),x=d(e,"duration",i.duration),T=d(e,"easeParams",i.easeParams),w=d(e,"ease",i.ease),E=d(e,"hold",i.hold),S=d(e,"repeat",i.repeat),b=d(e,"repeatDelay",i.repeatDelay),A=a(e,"yoyo",i.yoyo),_=a(e,"flipX",i.flipX),C=a(e,"flipY",i.flipY),R=d(e,"interpolation",i.interpolation),M=function(t,e,i,s){if("texture"===i){var n=s,r=void 0;Array.isArray(s)?(n=s[0],r=s[1]):s.hasOwnProperty("value")?(n=s.value,Array.isArray(s.value)?(n=s.value[0],r=s.value[1]):"string"==typeof s.value&&(n=s.value)):"string"==typeof s&&(n=s),t.addFrame(e,n,r,l(s,"delay",y),d(s,"duration",x),d(s,"hold",E),d(s,"repeat",S),d(s,"repeatDelay",b),a(s,"flipX",_),a(s,"flipY",C))}else{var u=f(i,s),c=h(d(s,"interpolation",R));t.add(e,i,u.getEnd,u.getStart,u.getActive,o(d(s,"ease",w),d(s,"easeParams",T)),l(s,"delay",y),d(s,"duration",x),a(s,"yoyo",A),d(s,"hold",E),d(s,"repeat",S),d(s,"repeatDelay",b),a(s,"flipX",_),a(s,"flipY",C),c,c?s:null)}},P=new v(t,g),O=0;O{var s=i(502),n=i(20494),r=i(63130),a=i(65868),o=i(10850),h=i(68061),l=i(45641);t.exports=function(t,e){if(e instanceof l)return e.parent=t,e;var i,u=new l(t);u.startDelay=o(e,"delay",0),u.completeDelay=n(e,"completeDelay",0),u.loop=Math.round(n(e,"loop",o(e,"repeat",0))),u.loopDelay=Math.round(n(e,"loopDelay",o(e,"repeatDelay",0))),u.paused=r(e,"paused",!1),u.persist=r(e,"persist",!0),u.callbackScope=o(e,"callbackScope",u);var c=s.TYPES;for(i=0;i{t.exports={GetBoolean:i(63130),GetEaseFunction:i(21902),GetInterpolationFunction:i(4840),GetNewValue:i(28348),GetProps:i(92407),GetTargets:i(65868),GetValueOp:i(9744),NumberTweenBuilder:i(68710),StaggerBuilder:i(91944),TweenBuilder:i(68061)}},5570:t=>{t.exports="active"},6383:t=>{t.exports="complete"},72582:t=>{t.exports="loop"},90281:t=>{t.exports="pause"},80803:t=>{t.exports="repeat"},13640:t=>{t.exports="resume"},10472:t=>{t.exports="start"},5379:t=>{t.exports="stop"},43449:t=>{t.exports="update"},61541:t=>{t.exports="yoyo"},54272:(t,e,i)=>{t.exports={TWEEN_ACTIVE:i(5570),TWEEN_COMPLETE:i(6383),TWEEN_LOOP:i(72582),TWEEN_PAUSE:i(90281),TWEEN_RESUME:i(13640),TWEEN_REPEAT:i(80803),TWEEN_START:i(10472),TWEEN_STOP:i(5379),TWEEN_UPDATE:i(43449),TWEEN_YOYO:i(61541)}},75193:(t,e,i)=>{var s={States:i(55303),Builders:i(79619),Events:i(54272),TweenManager:i(64532),Tween:i(39366),TweenData:i(15718),TweenFrameData:i(96490),BaseTween:i(502),TweenChain:i(45641)};t.exports=s},502:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(54272),a=i(55303),o=new s({Extends:n,initialize:function(t){n.call(this),this.parent=t,this.data=[],this.totalData=0,this.startDelay=0,this.hasStarted=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=a.PENDING,this.paused=!1,this.callbacks={onActive:null,onComplete:null,onLoop:null,onPause:null,onRepeat:null,onResume:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope,this.persist=!1},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return!this.paused&&this.isActive()},isPaused:function(){return this.paused},pause:function(){return this.paused||(this.paused=!0,this.dispatchEvent(r.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(r.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(r.TWEEN_COMPLETE,"onComplete")},complete:function(t){return void 0===t&&(t=0),t?(this.setCompleteDelayState(),this.countdown=t):this.onCompleteHandler(),this},completeAfterLoop:function(t){return void 0===t&&(t=0),this.loopCounter>t&&(this.loopCounter=t),this},remove:function(){return this.parent.remove(this),this},stop:function(){return this.isRemoved()||this.isPendingRemove()||this.isDestroyed()||(this.dispatchEvent(r.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(t){this.countdown-=t,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(r.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(t){return this.countdown-=t,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(r.TWEEN_START,"onStart"),t=0),t},updateCompleteDelay:function(t){this.countdown-=t,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(t,e,i){return void 0===i&&(i=[]),this.callbacks.hasOwnProperty(t)&&(this.callbacks[t]={func:e,params:i}),this},setPendingState:function(){this.state=a.PENDING},setActiveState:function(){this.state=a.ACTIVE},setLoopDelayState:function(){this.state=a.LOOP_DELAY},setCompleteDelayState:function(){this.state=a.COMPLETE_DELAY},setStartDelayState:function(){this.state=a.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=a.PENDING_REMOVE},setRemovedState:function(){this.state=a.REMOVED},setFinishedState:function(){this.state=a.FINISHED},setDestroyedState:function(){this.state=a.DESTROYED},isPending:function(){return this.state===a.PENDING},isActive:function(){return this.state===a.ACTIVE},isLoopDelayed:function(){return this.state===a.LOOP_DELAY},isCompleteDelayed:function(){return this.state===a.COMPLETE_DELAY},isStartDelayed:function(){return this.state===a.START_DELAY},isPendingRemove:function(){return this.state===a.PENDING_REMOVE},isRemoved:function(){return this.state===a.REMOVED},isFinished:function(){return this.state===a.FINISHED},isDestroyed:function(){return this.state===a.DESTROYED},destroy:function(){this.data&&this.data.forEach((function(t){t.destroy()})),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});o.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],t.exports=o},65521:(t,e,i)=>{var s=i(56694),n=i(54272),r=i(55303),a=new s({initialize:function(t,e,i,s,n,r,a,o,h,l){this.tween=t,this.targetIndex=e,this.duration=s,this.totalDuration=0,this.delay=0,this.getDelay=i,this.yoyo=n,this.hold=r,this.repeat=a,this.repeatDelay=o,this.repeatCounter=0,this.flipX=h,this.flipY=l,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(t){void 0===t&&(t=this.current),this.tween.targets[this.targetIndex][this.key]=t},setCreatedState:function(){this.state=r.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=r.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=r.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=r.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=r.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=r.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=r.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=r.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===r.CREATED},isDelayed:function(){return this.state===r.DELAY},isPendingRender:function(){return this.state===r.PENDING_RENDER},isPlayingForward:function(){return this.state===r.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===r.PLAYING_BACKWARD},isHolding:function(){return this.state===r.HOLD_DELAY},isRepeating:function(){return this.state===r.REPEAT_DELAY},isComplete:function(){return this.state===r.COMPLETE},setStateFromEnd:function(t){this.yoyo?this.onRepeat(t,!0,!0):this.repeatCounter>0?this.onRepeat(t,!0,!1):this.setCompleteState()},setStateFromStart:function(t){this.repeatCounter>0?this.onRepeat(t,!1):this.setCompleteState()},reset:function(){var t=this.tween,e=t.totalTargets,i=this.targetIndex,s=t.targets[i],n=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(s,n,0,i,e,t),this.repeatCounter=-1===this.repeat?r.MAX:this.repeat,this.setPendingRenderState();var a=this.duration+this.hold;this.yoyo&&(a+=this.duration);var o=a+this.repeatDelay;this.totalDuration=this.delay+a,-1===this.repeat?(this.totalDuration+=o*r.MAX,t.isInfinite=!0):this.repeat>0&&(this.totalDuration+=o*this.repeat),this.totalDuration>t.duration&&(t.duration=this.totalDuration),this.delay0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(t,e,i){var s=this.tween,r=s.totalTargets,a=this.targetIndex,o=s.targets[a],h=this.key,l="texture"!==h;if(this.elapsed=t,this.progress=t/this.duration,this.flipX&&o.toggleFlipX(),this.flipY&&o.toggleFlipY(),l&&(e||i)&&(this.start=this.getStartValue(o,h,this.start,a,r,s)),i)return this.setPlayingBackwardState(),void this.dispatchEvent(n.TWEEN_YOYO,"onYoyo");this.repeatCounter--,l&&(this.end=this.getEndValue(o,h,this.start,a,r,s)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-t,l&&(this.current=this.start,o[h]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(n.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});t.exports=a},99730:t=>{t.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1,persist:!1,interpolation:null}},53709:t=>{t.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","interpolation","loop","loopDelay","onActive","onActiveParams","onComplete","onCompleteParams","onLoop","onLoopParams","onPause","onPauseParams","onRepeat","onRepeatParams","onResume","onResumeParams","onStart","onStartParams","onStop","onStopParams","onUpdate","onUpdateParams","onYoyo","onYoyoParams","paused","persist","props","repeat","repeatDelay","targets","yoyo"]},39366:(t,e,i)=>{var s=i(502),n=i(56694),r=i(54272),a=i(99325),o=i(61286),h=i(83392),l=i(55303),u=i(15718),c=i(96490),d=new n({Extends:s,initialize:function(t,e){s.call(this,t),this.targets=e,this.totalTargets=e.length,this.isSeeking=!1,this.isInfinite=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0},add:function(t,e,i,s,n,r,a,o,h,l,c,d,f,p,v,g){var m=new u(this,t,e,i,s,n,r,a,o,h,l,c,d,f,p,v,g);return this.totalData=this.data.push(m),m},addFrame:function(t,e,i,s,n,r,a,o,h,l){var u=new c(this,t,e,i,s,n,r,a,o,h,l);return this.totalData=this.data.push(u),u},getValue:function(t){void 0===t&&(t=0);var e=null;return this.data&&(e=this.data[t].current),e},hasTarget:function(t){return this.targets&&-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){if(void 0===i&&(i=!1),"texture"!==t&&(this.isPlayingForward()||this.isPlayingBackward()))for(var s=0;s0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(r.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,s.prototype.onCompleteHandler.call(this)},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed Tween",this),this):((this.isPendingRemove()||this.isFinished())&&this.seek(),this.paused=!1,this.setActiveState(),this)},seek:function(t,e,i){if(void 0===t&&(t=0),void 0===e&&(e=16.6),void 0===i&&(i=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;i||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive");var s=this.paused;if(this.paused=!1,t>0){for(var n=Math.floor(t/e),a=t-n*e,o=0;o0&&this.update(a)}return this.paused=s,this.isSeeking=!1,this},initTweenData:function(t){void 0===t&&(t=!1),this.duration=0,this.startDelay=h.MAX_SAFE_INTEGER;for(var e=this.data,i=0;i0?s+n+(s+a)*r:s+n},reset:function(t){return void 0===t&&(t=!1),this.elapsed=0,this.totalElapsed=0,this.progress=0,this.totalProgress=0,this.loopCounter=this.loop,-1===this.loop&&(this.isInfinite=!0,this.loopCounter=l.MAX),t||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive")),this},update:function(t){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(t*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(t),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(t),!1;this.hasStarted||(this.startDelay-=t,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(r.TWEEN_START,"onStart"),t=0));var e=!1;if(this.isActive())for(var i=this.data,s=0;s{var s=i(66458),n=i(502),r=i(56694),a=i(54272),o=i(99325),h=i(61286),l=i(55303),u=new r({Extends:n,initialize:function(t){n.call(this,t),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=-1===this.loop?l.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this.dispatchEvent(a.TWEEN_ACTIVE,"onActive"),this},add:function(t){var e=this.parent.create(t);Array.isArray(e)||(e=[e]);for(var i=this.data,s=0;s0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(a.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed TweenChain",this),this):((this.isPendingRemove()||this.isPending())&&this.resetTweens(),this.paused=!1,this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this)},resetTweens:function(){for(var t=this.data,e=this.totalData,i=0;i{var s=i(65521),n=i(82897),r=i(56694),a=i(54272),o=new r({Extends:s,initialize:function(t,e,i,n,r,a,o,h,l,u,c,d,f,p,v,g,m){s.call(this,t,e,h,l,u,c,d,f,p,v),this.key=i,this.getActiveValue=a,this.getEndValue=n,this.getStartValue=r,this.ease=o,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=g,this.interpolationData=m},reset:function(t){s.prototype.reset.call(this);var e=this.tween.targets[this.targetIndex],i=this.key;t&&(e[i]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(e[i]=this.getActiveValue(e,i,0))},update:function(t){var e=this.tween,i=e.totalTargets,s=this.targetIndex,r=e.targets[s],o=this.key;if(!r)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=t,this.elapsed<=0&&(this.elapsed=0,t=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(a.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(r,o,r[o],s,i,e),this.end=this.getEndValue(r,o,this.start,s,i,e),this.current=this.start,r[o]=this.start,this.setPlayingForwardState(),!0;var h=this.isPlayingForward(),l=this.isPlayingBackward();if(h||l){var u=this.elapsed,c=this.duration,d=0,f=!1;(u+=t)>=c?(d=u-c,u=c,f=!0):u<0&&(u=0);var p=n(u/c,0,1);if(this.elapsed=u,this.progress=p,this.previous=this.current,f)h?(this.current=this.end,r[o]=this.end,this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(d)):(this.current=this.start,r[o]=this.start,this.setStateFromStart(d));else{h||(p=1-p);var v=this.ease(p);this.interpolation?this.current=this.interpolation(this.interpolationData,v):this.current=this.start+(this.end-this.start)*v,r[o]=this.current}this.dispatchEvent(a.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(t,e){var i=this.tween;if(!i.isSeeking){var s=i.targets[this.targetIndex],n=this.key,r=this.current,a=this.previous;i.emit(t,i,n,s,r,a);var o=i.callbacks[e];o&&o.func.apply(i.callbackScope,[i,s,n,r,a].concat(o.params))}},destroy:function(){s.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});t.exports=o},96490:(t,e,i)=>{var s=i(65521),n=i(82897),r=i(56694),a=i(54272),o=new r({Extends:s,initialize:function(t,e,i,n,r,a,o,h,l,u,c){s.call(this,t,e,r,a,!1,o,h,l,u,c),this.key="texture",this.startTexture=null,this.endTexture=i,this.startFrame=null,this.endFrame=n,this.yoyo=0!==h},reset:function(t){s.prototype.reset.call(this);var e=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=e.texture.key,this.startFrame=e.frame.name),t&&e.setTexture(this.startTexture,this.startFrame)},update:function(t){var e=this.tween,i=this.targetIndex,s=e.targets[i];if(!s)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=t,this.elapsed<=0&&(this.elapsed=0,t=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(a.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&s.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var r=this.isPlayingForward(),o=this.isPlayingBackward();if(r||o){var h=this.elapsed,l=this.duration,u=0,c=!1;(h+=t)>=l?(u=h-l,h=l,c=!0):h<0&&(h=0);var d=n(h/l,0,1);this.elapsed=h,this.progress=d,c&&(r?(s.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(u)):(s.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(u))),this.dispatchEvent(a.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(t,e){var i=this.tween;if(!i.isSeeking){var s=i.targets[this.targetIndex],n=this.key;i.emit(t,i,n,s);var r=i.callbacks[e];r&&r.func.apply(i.callbackScope,[i,s,n].concat(r.params))}},destroy:function(){s.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});t.exports=o},55303:t=>{t.exports={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999}},56694:t=>{function e(t,e,i){var s=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&s.value&&"object"==typeof s.value&&(s=s.value),!(!s||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(s))&&(void 0===s.enumerable&&(s.enumerable=!0),void 0===s.configurable&&(s.configurable=!0),s)}function i(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,s,n,a){for(var o in s)if(s.hasOwnProperty(o)){var h=e(s,o,n);if(!1!==h){if(i((a||t).prototype,o)){if(r.ignoreFinals)continue;throw new Error("cannot override final property '"+o+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,o,h)}else t.prototype[o]=s[o]}}function n(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i{t.exports=function(){}},10618:t=>{t.exports=function(){return null}},78991:t=>{t.exports=function(t,e,i,s,n){if(void 0===n&&(n=t),i>0){var r=i-t.length;if(r<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),s&&s.call(n,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.splice(a,1),a--;if(0===(a=e.length))return null;i>0&&a>r&&(e.splice(r),a=r);for(var o=0;o{t.exports=function(t,e,i,s,n,r){if(void 0===i&&(i=0),void 0===r&&(r=t),s>0){var a=s-t.length;if(a<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),n&&n.call(r,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.pop(),o--;if(0===(o=e.length))return null;s>0&&o>a&&(e.splice(a),o=a);for(var h=o-1;h>=0;h--){var l=e[h];t.splice(i,0,l),n&&n.call(r,l)}return e}},58742:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i{var s=i(45838);t.exports=function(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);var a=0;if(s(t,n,r))for(var o=n;o{t.exports=function(t,e,i){var s,n=[null];for(s=3;s{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r)){var a,o=[null];for(a=5;a{t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var s,n,r=1;if(i){if(te.length&&(r=e.length),i?(s=e[r-1][i],(n=e[r][i])-t<=t-s?e[r]:e[r-1]):(s=e[r-1],(n=e[r])-t<=t-s?n:s)}},5454:t=>{var e=function(t,i){void 0===i&&(i=[]);for(var s=0;s{var s=i(45838);t.exports=function(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);var a=[];if(s(t,n,r))for(var o=n;o{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r))for(var a=n;a{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var s=e+Math.floor(Math.random()*i);return void 0===t[s]?null:t[s]}},24218:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),n=t.indexOf(i);if(s<0||n<0)throw new Error("Supplied items must be elements of the same array");return s>n||(t.splice(s,1),n===t.length-1?t.push(e):t.splice(n,0,e)),t}},58258:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),n=t.indexOf(i);if(s<0||n<0)throw new Error("Supplied items must be elements of the same array");return s{t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var s=t[i-1],n=t.indexOf(s);t[i]=s,t[n]=e}return t}},68396:t=>{t.exports=function(t,e,i){var s=t.indexOf(e);if(-1===s||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return s!==i&&(t.splice(s,1),t.splice(i,0,e)),e}},27555:t=>{t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i{t.exports=function(t,e,i,s){var n,r=[],a=!1;if((i||s)&&(a=!0,i||(i=""),s||(s="")),e=e;n--)a?r.push(i+n.toString()+s):r.push(n);else for(n=t;n<=e;n++)a?r.push(i+n.toString()+s):r.push(n);return r}},89955:(t,e,i)=>{var s=i(67233);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var n=[],r=Math.max(s((e-t)/(i||1)),0),a=0;a{function e(t,e,i){var s=t[e];t[e]=t[i],t[i]=s}function i(t,e){return te?1:0}var s=function(t,n,r,a,o){for(void 0===r&&(r=0),void 0===a&&(a=t.length-1),void 0===o&&(o=i);a>r;){if(a-r>600){var h=a-r+1,l=n-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(r,Math.floor(n-l*c/h+d)),p=Math.min(a,Math.floor(n+(h-l)*c/h+d));s(t,n,f,p,o)}var v=t[n],g=r,m=a;for(e(t,r,n),o(t[a],v)>0&&e(t,r,a);g0;)m--}0===o(t[r],v)?e(t,r,m):e(t,++m,a),m<=n&&(r=m+1),n<=m&&(a=m-1)}};t.exports=s},75757:(t,e,i)=>{var s=i(10850),n=i(18592),r=function(t,e,i){for(var s=[],n=0;n{var s=i(72677);t.exports=function(t,e,i,n){var r;if(void 0===n&&(n=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(s(t,r),i&&i.call(n,e),e):null;for(var a=e.length-1,o=[];a>=0;){var h=e[a];-1!==(r=t.indexOf(h))&&(s(t,r),o.push(h),i&&i.call(n,h)),a--}return o}},8324:(t,e,i)=>{var s=i(72677);t.exports=function(t,e,i,n){if(void 0===n&&(n=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var r=s(t,e);return i&&i.call(n,r),r}},47427:(t,e,i)=>{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),s(t,e,i)){var a=i-e,o=t.splice(e,a);if(n)for(var h=0;h{var s=i(72677);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var n=e+Math.floor(Math.random()*i);return s(t,n)}},80402:t=>{t.exports=function(t,e,i){var s=t.indexOf(e),n=t.indexOf(i);return-1!==s&&-1===n&&(t[s]=i,!0)}},77640:t=>{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e,i,s){var n=t.length;if(e<0||e>n||e>=i||i>n){if(s)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},27847:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},6034:(t,e,i)=>{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r))for(var a=n;a{t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[i],t[i]=s}return t}},28834:t=>{t.exports=function(t){var e=/\D/g;return t.sort((function(t,i){return parseInt(t.replace(e,""),10)-parseInt(i.replace(e,""),10)})),t}},72677:t=>{t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,s=t[e],n=e;n{var s=i(77290);function n(t,e){return String(t).localeCompare(e)}function r(t,e,i,s){var n,r,a,o,h,l=t.length,u=0,c=2*i;for(n=0;nl&&(r=l),a>l&&(a=l),o=n,h=r;;)if(o{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),n=t.indexOf(i);if(s<0||n<0)throw new Error("Supplied items must be elements of the same array");return t[s]=i,t[n]=e,t}},59959:(t,e,i)=>{t.exports={Matrix:i(13515),Add:i(78991),AddAt:i(48522),BringToTop:i(58742),CountAllMatching:i(30164),Each:i(36337),EachInRange:i(46208),FindClosestInSorted:i(2406),Flatten:i(5454),GetAll:i(71608),GetFirst:i(51463),GetRandom:i(72861),MoveDown:i(51172),MoveTo:i(68396),MoveUp:i(27555),MoveAbove:i(24218),MoveBelow:i(58258),NumberArray:i(13401),NumberArrayStep:i(89955),QuickSelect:i(53466),Range:i(75757),Remove:i(66458),RemoveAt:i(8324),RemoveBetween:i(47427),RemoveRandomElement:i(50147),Replace:i(80402),RotateLeft:i(77640),RotateRight:i(38487),SafeRange:i(45838),SendToBack:i(27847),SetAll:i(6034),Shuffle:i(18592),SortByDigits:i(28834),SpliceOne:i(72677),StableSort:i(17922),Swap:i(96928)}},97494:t=>{t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i{var s=i(76400),n=i(97494);t.exports=function(t){var e="";if(!n(t))return e;for(var i=0;i{t.exports=function(t){return t.reverse()}},51995:t=>{t.exports=function(t){for(var e=0;e{var s=i(63515);t.exports=function(t){return s(t,180)}},42549:(t,e,i)=>{var s=i(63515);t.exports=function(t){return s(t,90)}},63515:(t,e,i)=>{var s=i(97494),n=i(78581);t.exports=function(t,e){if(void 0===e&&(e=90),!s(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=n(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=n(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i{var s=i(63515);t.exports=function(t){return s(t,-90)}},27365:(t,e,i)=>{var s=i(77640),n=i(38487);t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?s(t,Math.abs(i)):n(t,i)),0!==e)for(var r=0;r{t.exports=function(t){for(var e=t.length,i=t[0].length,s=new Array(i),n=0;n-1;r--)s[n][r]=t[r][n]}return s}},13515:(t,e,i)=>{t.exports={CheckMatrix:i(97494),MatrixToString:i(68428),ReverseColumns:i(59521),ReverseRows:i(51995),Rotate180:i(89011),RotateLeft:i(42549),RotateMatrix:i(63515),RotateRight:i(14305),Translate:i(27365),TransposeMatrix:i(78581)}},40581:t=>{var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";t.exports=function(t,i){for(var s=new Uint8Array(t),n=s.length,r=i?"data:"+i+";base64,":"",a=0;a>2],r+=e[(3&s[a])<<4|s[a+1]>>4],r+=e[(15&s[a+1])<<2|s[a+2]>>6],r+=e[63&s[a+2]];return n%3==2?r=r.substring(0,r.length-1)+"=":n%3==1&&(r=r.substring(0,r.length-2)+"=="),r}},82329:t=>{for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(256),s=0;s>4,u[h++]=(15&s)<<4|n>>2,u[h++]=(3&n)<<6|63&r;return l}},78417:(t,e,i)=>{t.exports={ArrayBufferToBase64:i(40581),Base64ToArrayBuffer:i(82329)}},22178:(t,e,i)=>{t.exports={Array:i(59959),Base64:i(78417),Objects:i(64615),String:i(50379),NOOP:i(72283),NULL:i(10618)}},32742:t=>{t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},28699:t=>{var e=function(t){var i,s,n;if("object"!=typeof t||null===t)return t;for(n in i=Array.isArray(t)?[]:{},t)s=t[n],i[n]=e(s);return i};t.exports=e},98611:(t,e,i)=>{var s=i(42911),n=function(){var t,e,i,r,a,o,h=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},l=2),u===l&&(h=this,--l);l{var s=i(5923),n=i(10850);t.exports=function(t,e,i){var r=n(t,e,null);if(null===r)return i;if(Array.isArray(r))return s.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return s.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return s.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},72632:t=>{t.exports=function(t,e,i){var s=typeof t;return t&&"number"!==s&&"string"!==s&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},94324:(t,e,i)=>{var s=i(10850),n=i(82897);t.exports=function(t,e,i,r,a){void 0===a&&(a=i);var o=s(t,e,a);return n(o,i,r)}},10850:t=>{t.exports=function(t,e,i,s){if(!t&&!s||"number"==typeof t)return i;if(t&&t.hasOwnProperty(e))return t[e];if(s&&s.hasOwnProperty(e))return s[e];if(-1!==e.indexOf(".")){for(var n=e.split("."),r=t,a=s,o=i,h=i,l=!0,u=!0,c=0;c{t.exports=function(t,e){for(var i=0;i{t.exports=function(t,e){for(var i=0;i{t.exports=function(t,e){return t.hasOwnProperty(e)}},42911:t=>{t.exports=function(t){if(!t||"object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},30657:(t,e,i)=>{var s=i(32742);t.exports=function(t,e){var i=s(t);for(var n in e)i.hasOwnProperty(n)||(i[n]=e[n]);return i}},72066:(t,e,i)=>{var s=i(32742);t.exports=function(t,e){var i=s(t);for(var n in e)i.hasOwnProperty(n)&&(i[n]=e[n]);return i}},28820:(t,e,i)=>{var s=i(19256);t.exports=function(t,e){for(var i={},n=0;n{t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))return t[e]=i,!0;if(-1!==e.indexOf(".")){for(var s=e.split("."),n=t,r=t,a=0;a{t.exports={Clone:i(32742),DeepCopy:i(28699),Extend:i(98611),GetAdvancedValue:i(20494),GetFastValue:i(72632),GetMinMaxValue:i(94324),GetValue:i(10850),HasAll:i(87701),HasAny:i(53523),HasValue:i(19256),IsPlainObject:i(42911),Merge:i(30657),MergeRight:i(72066),Pick:i(28820),SetValue:i(22440)}},69429:t=>{t.exports=function(t,e){return t.replace(/%([0-9]+)/g,(function(t,i){return e[Number(i)-1]}))}},76400:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===s&&(s=3);var n=0;if(e+1>=(t=t.toString()).length)switch(s){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((n=e-t.length)/2);t=new Array(n-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},76872:t=>{t.exports=function(t,e){return 0===e?t.slice(1):t.slice(0,e-1)+t.slice(e)}},8051:t=>{t.exports=function(t){return t.split("").reverse().join("")}},76583:t=>{t.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}},40587:t=>{t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},50379:(t,e,i)=>{t.exports={Format:i(69429),Pad:i(76400),RemoveAt:i(76872),Reverse:i(8051),UppercaseFirst:i(40587),UUID:i(76583)}}},e={};function i(s){var n=e[s];if(void 0!==n)return n.exports;var r=e[s]={exports:{}};return t[s](r,r.exports,i),r.exports}return i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i(85780)})())); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Phaser",[],e):"object"==typeof exports?exports.Phaser=e():t.Phaser=e()}(this,(()=>(()=>{var t={6659:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function s(){}function n(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function r(t,e,s,r,a){if("function"!=typeof s)throw new TypeError("The listener must be a function");var o=new n(s,r||t,a),h=i?i+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],o]:t._events[h].push(o):(t._events[h]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new s:delete t._events[e]}function o(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(i=!1)),o.prototype.eventNames=function(){var t,s,n=[];if(0===this._eventsCount)return n;for(s in t=this._events)e.call(t,s)&&n.push(i?s.slice(1):s);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},o.prototype.listeners=function(t){var e=i?i+t:t,s=this._events[e];if(!s)return[];if(s.fn)return[s.fn];for(var n=0,r=s.length,a=new Array(r);n{var s=i(82590);t.exports=function(t,e,i,n){for(var r=t[0],a=1;a{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"angle",e,i,n,r)}},22015:t=>{t.exports=function(t,e,i){for(var s=0;s{t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=i;s{t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=i;s{var s=i(40327),n=i(84093),r=i(72632),a=i(72283),o=new(i(71030))({sys:{queueDepthSort:a,events:{once:a}}},0,0,1,1).setOrigin(0,0);t.exports=function(t,e){void 0===e&&(e={});var i=e.hasOwnProperty("width"),a=e.hasOwnProperty("height"),h=r(e,"width",-1),l=r(e,"height",-1),u=r(e,"cellWidth",1),c=r(e,"cellHeight",u),d=r(e,"position",n.TOP_LEFT),f=r(e,"x",0),p=r(e,"y",0),v=0,g=0,m=h*u,y=l*c;o.setPosition(f,p),o.setSize(u,c);for(var x=0;x{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"alpha",e,i,n,r)}},3877:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"x",e,i,n,r)}},71020:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r,a,o){return null==i&&(i=e),s(t,"x",e,n,a,o),s(t,"y",i,r,a,o)}},28970:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"y",e,i,n,r)}},82249:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=6.28);for(var n=i,r=(s-i)/t.length,a=e.x,o=e.y,h=e.radius,l=0;l{t.exports=function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=6.28);for(var n=i,r=(s-i)/t.length,a=e.width/2,o=e.height/2,h=0;h{var s=i(8570);t.exports=function(t,e){for(var i=s(e,t.length),n=0;n{var s=i(40053),n=i(77640),r=i(38487);t.exports=function(t,e,i){void 0===i&&(i=0);var a=s(e,!1,t.length);i>0?n(a,i):i<0&&r(a,Math.abs(i));for(var o=0;o{var s=i(58813);t.exports=function(t,e,i){var n=s({x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},i),r=s({x1:e.x2,y1:e.y2,x2:e.x3,y2:e.y3},i),a=s({x1:e.x3,y1:e.y3,x2:e.x1,y2:e.y1},i);n.pop(),r.pop(),a.pop();for(var o=(n=n.concat(r,a)).length/t.length,h=0,l=0;l{t.exports=function(t,e,i){for(var s=0;s{t.exports=function(t,e,i,s,n,r){var a;void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=1);var o=0,h=t.length;if(1===r)for(a=n;a=0;a--)t[a][e]+=i+o*s,o++;return t}},23646:t=>{t.exports=function(t,e,i,s,n,r){var a;void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=1);var o=0,h=t.length;if(1===r)for(a=n;a=0;a--)t[a][e]=i+o*s,o++;return t}},4392:(t,e,i)=>{var s=i(30977);t.exports=function(t,e){for(var i=0;i{var s=i(72006);t.exports=function(t,e){for(var i=0;i{var s=i(74077);t.exports=function(t,e){for(var i=0;i{var s=i(30001);t.exports=function(t,e){for(var i=0;i{var s=i(99761);t.exports=function(t,e){for(var i=0;i{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"rotation",e,i,n,r)}},87299:(t,e,i)=>{var s=i(72395),n=i(53996);t.exports=function(t,e,i){for(var r=e.x,a=e.y,o=0;o{var s=i(72395);t.exports=function(t,e,i,n){var r=e.x,a=e.y;if(0===n)return t;for(var o=0;o{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"scaleX",e,i,n,r)}},51449:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r,a,o){return null==i&&(i=e),s(t,"scaleX",e,n,a,o),s(t,"scaleY",i,r,a,o)}},64895:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"scaleY",e,i,n,r)}},30329:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"alpha",e,i,n,r)}},43954:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n){return s(t,"blendMode",e,0,i,n)}},70688:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"depth",e,i,n,r)}},8314:t=>{t.exports=function(t,e,i){for(var s=0;s{var s=i(23646);t.exports=function(t,e,i,n,r,a,o){return null==i&&(i=e),s(t,"originX",e,n,a,o),s(t,"originY",i,r,a,o),t.forEach((function(t){t.updateDisplayOrigin()})),t}},38767:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"rotation",e,i,n,r)}},18584:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r,a,o){return null==i&&(i=e),s(t,"scaleX",e,n,a,o),s(t,"scaleY",i,r,a,o)}},17381:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scaleX",e,i,n,r)}},74370:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scaleY",e,i,n,r)}},27773:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r,a,o){return null==i&&(i=e),s(t,"scrollFactorX",e,n,a,o),s(t,"scrollFactorY",i,r,a,o)}},75257:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scrollFactorX",e,i,n,r)}},54512:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scrollFactorY",e,i,n,r)}},69423:t=>{t.exports=function(t,e,i,s,n){for(var r=0;r{var s=i(23646);t.exports=function(t,e,i,n){return s(t,"visible",e,0,i,n)}},94833:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"x",e,i,n,r)}},14284:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r,a,o){return null==i&&(i=e),s(t,"x",e,n,a,o),s(t,"y",i,r,a,o)}},96574:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"y",e,i,n,r)}},74086:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){var a,o;void 0===n&&(n=0),void 0===r&&(r=new s);var h=t.length;if(1===h)a=t[0].x,o=t[0].y,t[0].x=e,t[0].y=i;else{var l=1,u=0;0===n&&(u=h-1,l=h-2),a=t[u].x,o=t[u].y,t[u].x=e,t[u].y=i;for(var c=0;c=h||-1===l)){var d=t[l],f=d.x,p=d.y;d.x=a,d.y=o,a=f,o=p,0===n?l--:l++}}return r.x=a,r.y=o,r}},86347:(t,e,i)=>{var s=i(18592);t.exports=function(t){return s(t)}},1558:(t,e,i)=>{var s=i(5514);t.exports=function(t,e,i,n,r){void 0===r&&(r=!1);var a,o=Math.abs(n-i)/t.length;if(r)for(a=0;a{var s=i(87736);t.exports=function(t,e,i,n,r){void 0===r&&(r=!1);var a,o=Math.abs(n-i)/t.length;if(r)for(a=0;a{t.exports=function(t,e,i,s,n){if(void 0===n&&(n=!1),0===t.length)return t;if(1===t.length)return n?t[0][e]+=(s+i)/2:t[0][e]=(s+i)/2,t;var r,a=Math.abs(s-i)/(t.length-1);if(n)for(r=0;r{t.exports=function(t){for(var e=0;e{var s=i(1071);t.exports=function(t,e,i){void 0===i&&(i=0);for(var n=0;n{t.exports={AlignTo:i(62270),Angle:i(61148),Call:i(22015),GetFirst:i(31060),GetLast:i(52367),GridAlign:i(12673),IncAlpha:i(691),IncX:i(3877),IncXY:i(71020),IncY:i(28970),PlaceOnCircle:i(82249),PlaceOnEllipse:i(30285),PlaceOnLine:i(61557),PlaceOnRectangle:i(63549),PlaceOnTriangle:i(51629),PlayAnimation:i(1045),PropertyValueInc:i(6124),PropertyValueSet:i(23646),RandomCircle:i(4392),RandomEllipse:i(94985),RandomLine:i(63305),RandomRectangle:i(90739),RandomTriangle:i(91417),Rotate:i(26182),RotateAround:i(87299),RotateAroundDistance:i(92194),ScaleX:i(30363),ScaleXY:i(51449),ScaleY:i(64895),SetAlpha:i(30329),SetBlendMode:i(43954),SetDepth:i(70688),SetHitArea:i(8314),SetOrigin:i(12894),SetRotation:i(38767),SetScale:i(18584),SetScaleX:i(17381),SetScaleY:i(74370),SetScrollFactor:i(27773),SetScrollFactorX:i(75257),SetScrollFactorY:i(54512),SetTint:i(69423),SetVisible:i(58291),SetX:i(94833),SetXY:i(14284),SetY:i(96574),ShiftPosition:i(74086),Shuffle:i(86347),SmootherStep:i(9938),SmoothStep:i(1558),Spread:i(71060),ToggleVisible:i(11207),WrapInRectangle:i(24404)}},85463:(t,e,i)=>{var s=i(82897),n=i(56694),r=i(16938),a=i(2406),o=i(71519),h=i(10850),l=i(28834),u=new n({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,h(i,"frames",[]),h(i,"defaultTextureKey",null),h(i,"sortFrames",!0)),this.frameRate=h(i,"frameRate",null),this.duration=h(i,"duration",null),this.msPerFrame,this.skipMissedFrames=h(i,"skipMissedFrames",!0),this.delay=h(i,"delay",0),this.repeat=h(i,"repeat",0),this.repeatDelay=h(i,"repeatDelay",0),this.yoyo=h(i,"yoyo",!1),this.showBeforeDelay=h(i,"showBeforeDelay",!1),this.showOnStart=h(i,"showOnStart",!1),this.hideOnComplete=h(i,"hideOnComplete",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(r.PAUSE_ALL,this.pause,this),this.manager.on(r.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(t,e,i,s){null===i&&null===s?(t.frameRate=24,t.duration=24/e*1e3):i&&null===s?(t.duration=i,t.frameRate=e/(i/1e3)):(t.frameRate=s,t.duration=e/s*1e3),t.msPerFrame=1e3/t.frameRate},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i=this.getFrames(this.manager.textureManager,e);if(i.length>0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var s=this.frames.slice(0,t),n=this.frames.slice(t);this.frames=s.concat(i,n)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t0){r.isLast=!0,r.nextFrame=c[0],c[0].prevFrame=r;var y=1/(c.length-1);for(a=0;a0?t.inReverse&&t.forward?t.forward=!1:this.repeatAnimation(t):t.complete():this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e||(e=!1),t.inReverse===!e&&t.repeatCounter>0)return(0===t.repeatDelay||t.pendingRepeat)&&(t.forward=e),void this.repeatAnimation(t);if(t.inReverse===e||0!==t.repeatCounter){t.forward=e;var i=e?t.currentFrame.nextFrame:t.currentFrame.prevFrame;this.updateAndGetNextTick(t,i)}else t.complete()},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.yoyo?this.handleYoyoFrame(t,!0):t.repeatCounter>0?(t.inReverse&&!t.forward||(t.forward=!0),this.repeatAnimation(t)):t.complete():this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.setCurrentFrame(e),this.getNextTick(t)},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop){if(0===t._pendingStopValue)return t.stop();t._pendingStopValue--}t.repeatDelay>0&&!t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t.repeatDelay):(t.repeatCounter--,t.forward?t.setCurrentFrame(t.currentFrame.nextFrame):t.setCurrentFrame(t.currentFrame.prevFrame),t.isPlaying&&(this.getNextTick(t),t.handleRepeat()))},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showBeforeDelay:this.showBeforeDelay,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach((function(e){t.frames.push(e.toJSON())})),t},updateFrameSequence:function(){for(var t,e=this.frames.length,i=1/(e-1),s=0;s1?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):e>1&&(t.prevFrame=this.frames[s-1],t.nextFrame=this.frames[s+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(r.PAUSE_ALL,this.pause,this),this.manager.off(r.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var t=0;t{var s=new(i(56694))({initialize:function(t,e,i,s,n){void 0===n&&(n=!1),this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=s,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=n},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});t.exports=s},90249:(t,e,i)=>{var s=i(85463),n=i(56694),r=i(33885),a=i(6659),o=i(16938),h=i(97081),l=i(72632),u=i(10850),c=i(83392),d=i(13401),f=i(76400),p=new n({Extends:a,initialize:function(t){a.call(this),this.game=t,this.textureManager=null,this.globalTimeScale=1,this.anims=new r,this.mixes=new r,this.paused=!1,this.name="AnimationManager",t.events.once(h.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(h.DESTROY,this.destroy,this)},addMix:function(t,e,i){var s=this.anims,n=this.mixes,r="string"==typeof t?t:t.key,a="string"==typeof e?e:e.key;if(s.has(r)&&s.has(a)){var o=n.get(r);o||(o={}),o[a]=i,n.set(r,o)}return this},removeMix:function(t,e){var i=this.mixes,s="string"==typeof t?t:t.key,n=i.get(s);if(n)if(e){var r="string"==typeof e?e:e.key;n.hasOwnProperty(r)&&delete n[r]}else e||i.delete(s);return this},getMix:function(t,e){var i=this.mixes,s="string"==typeof t?t:t.key,n="string"==typeof e?e:e.key,r=i.get(s);return r&&r.hasOwnProperty(n)?r[n]:0},add:function(t,e){return this.anims.has(t)?(console.warn("Animation key exists: "+t),this):(e.key=t,this.anims.set(t,e),this.emit(o.ADD_ANIMATION,t,e),this)},exists:function(t){return this.anims.has(t)},createFromAseprite:function(t,e,i){var s=[],n=this.game.cache.json.get(t);if(!n)return s;var r=this,a=u(n,"meta",null),o=u(n,"frames",null);a&&o&&u(a,"frameTags",[]).forEach((function(n){var a=[],h=l(n,"name",null),u=l(n,"from",0),d=l(n,"to",0),f=l(n,"direction","forward");if(h&&(!e||e&&e.indexOf(h)>-1)){for(var p=0,v=u;v<=d;v++){var g=v.toString(),m=o[g];if(m){var y=l(m,"duration",c.MAX_SAFE_INTEGER);a.push({key:t,frame:g,duration:y}),p+=y}}var x=p/a.length;a.forEach((function(t){t.duration-=x})),"reverse"===f&&(a=a.reverse());var T,w={key:h,frames:a,duration:p,yoyo:"pingpong"===f};i?i.anims&&(T=i.anims.create(w)):T=r.create(w),T&&s.push(T)}}));return s},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))||(i=new s(this,e,t),this.anims.set(e,i),this.emit(o.ADD_ANIMATION,e,i))),i},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var s=0;s{var s=i(56694),n=i(33885),r=i(72632),a=i(16938),o=i(85463),h=new s({initialize:function(t){this.parent=t,this.animationManager=t.scene.sys.anims,this.animationManager.on(a.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.showBeforeDelay=!1,this.showOnStart=!1,this.hideOnComplete=!1,this.forward=!0,this.inReverse=!1,this.accumulator=0,this.nextTick=0,this.delayCounter=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},chain:function(t){var e=this.parent;if(void 0===t)return this.nextAnimsQueue.length=0,this.nextAnim=null,e;Array.isArray(t)||(t=[t]);for(var i=0;is.getTotalFrames()&&(h=0);var l=s.frames[h];0!==h||this.forward||(l=s.getLastFrame()),this.currentFrame=l}else console.warn("Missing animation: "+i);return this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.setCurrentFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.setCurrentFrame(t),this.parent},playAfterDelay:function(t,e){if(this.isPlaying){var i=this.nextAnim,s=this.nextAnimsQueue;i&&s.unshift(i),this.nextAnim=t,this._pendingStop=1,this._pendingStopValue=e}else this.delayCounter=e,this.play(t,!0);return this.parent},playAfterRepeat:function(t,e){if(void 0===e&&(e=1),this.isPlaying){var i=this.nextAnim,s=this.nextAnimsQueue;i&&s.unshift(i),-1!==this.repeatCounter&&e>this.repeatCounter&&(e=this.repeatCounter),this.nextAnim=t,this._pendingStop=2,this._pendingStopValue=e}else this.play(t);return this.parent},play:function(t,e){void 0===e&&(e=!1);var i=this.currentAnim,s=this.parent,n="string"==typeof t?t:t.key;if(e&&this.isPlaying&&i.key===n)return s;if(i&&this.isPlaying){var r=this.animationManager.getMix(i.key,t);if(r>0)return this.playAfterDelay(t,r)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t)},playReverse:function(t,e){void 0===e&&(e=!1);var i="string"==typeof t?t:t.key;return e&&this.isPlaying&&this.currentAnim.key===i?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t))},startAnimation:function(t){this.load(t);var e=this.currentAnim,i=this.parent;return e?(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat,e.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,0===this.delayCounter?this.handleStart():this.showBeforeDelay&&this.setCurrentFrame(this.currentFrame),i):i},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(a.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(a.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(a.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(a.ANIMATION_COMPLETE,a.ANIMATION_COMPLETE_KEY)},emitEvents:function(t,e){var i=this.currentAnim;if(i){var s=this.currentFrame,n=this.parent,r=s.textureFrame;n.emit(t,i,s,n,r),e&&n.emit(e+i.key,i,s,n,r)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var t=this.currentFrame;if(!t)return 0;var e=t.progress;return this.inReverse&&(e*=-1),e},setProgress:function(t){return this.forward||(t=1-t),this.setCurrentFrame(this.currentAnim.getFrameByProgress(t)),this.parent},setRepeat:function(t){return this.repeatCounter=-1===t?Number.MAX_VALUE:t,this.parent},globalRemove:function(t,e){void 0===e&&(e=this.currentAnim),this.isPlaying&&e.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var i=this.currentAnim,s=this.parent;return i?(e&&(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat),i.getFirstTick(this),this.emitEvents(a.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!t,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(i.frames[0]),this.parent):s},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(t)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(t)}return this.parent},stopAfterDelay:function(t){return this._pendingStop=1,this._pendingStopValue=t,this.parent},stopAfterRepeat:function(t){return void 0===t&&(t=1),-1!==this.repeatCounter&&t>this.repeatCounter&&(t=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=t,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(t,e){var i=this.currentAnim;if(this.isPlaying&&i&&!i.paused){if(this.accumulator+=e*this.timeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.stop();if(this.hasStarted){if(this.accumulator>=this.nextTick&&(this.forward?i.nextFrame(this):i.previousFrame(this),this.isPlaying&&0===this._pendingStop&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var s=0;do{this.forward?i.nextFrame(this):i.previousFrame(this),s++}while(this.isPlaying&&this.accumulator>this.nextTick&&s<60)}}else this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart())}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),t.setAlpha&&(e.alpha=t.alpha),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(a.ANIMATION_UPDATE),3===this._pendingStop&&this._pendingStopValue===t&&this.stop()),e},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(t){return this.anims?this.anims.get(t):null},exists:function(t){return!!this.anims&&this.anims.has(t)},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))||(i=new o(this,e,t),this.anims||(this.anims=new n),this.anims.set(e,i))),i},createFromAseprite:function(t,e){return this.animationManager.createFromAseprite(t,e,this.parent)},generateFrameNames:function(t,e){return this.animationManager.generateFrameNames(t,e)},generateFrameNumbers:function(t,e){return this.animationManager.generateFrameNumbers(t,e)},remove:function(t){var e=this.get(t);return e&&(this.currentAnim===e&&this.stop(),this.anims.delete(t)),e},destroy:function(){this.animationManager.off(a.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});t.exports=h},44509:t=>{t.exports="add"},84563:t=>{t.exports="animationcomplete"},61586:t=>{t.exports="animationcomplete-"},72175:t=>{t.exports="animationrepeat"},568:t=>{t.exports="animationrestart"},37690:t=>{t.exports="animationstart"},58525:t=>{t.exports="animationstop"},5243:t=>{t.exports="animationupdate"},10598:t=>{t.exports="pauseall"},4860:t=>{t.exports="remove"},31865:t=>{t.exports="resumeall"},16938:(t,e,i)=>{t.exports={ADD_ANIMATION:i(44509),ANIMATION_COMPLETE:i(84563),ANIMATION_COMPLETE_KEY:i(61586),ANIMATION_REPEAT:i(72175),ANIMATION_RESTART:i(568),ANIMATION_START:i(37690),ANIMATION_STOP:i(58525),ANIMATION_UPDATE:i(5243),PAUSE_ALL:i(10598),REMOVE_ANIMATION:i(4860),RESUME_ALL:i(31865)}},13517:(t,e,i)=>{t.exports={Animation:i(85463),AnimationFrame:i(71519),AnimationManager:i(90249),AnimationState:i(16569),Events:i(16938)}},23740:(t,e,i)=>{var s=i(56694),n=i(33885),r=i(6659),a=i(69773),o=new s({initialize:function(){this.entries=new n,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit(a.ADD,this,t,e),this},has:function(t){return this.entries.has(t)},exists:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit(a.REMOVE,this,t,e.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=o},43474:(t,e,i)=>{var s=i(23740),n=i(56694),r=i(97081),a=new n({initialize:function(t){this.game=t,this.binary=new s,this.bitmapFont=new s,this.json=new s,this.physics=new s,this.shader=new s,this.audio=new s,this.video=new s,this.text=new s,this.html=new s,this.obj=new s,this.tilemap=new s,this.xml=new s,this.custom={},this.game.events.once(r.DESTROY,this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new s),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],e=0;e{t.exports="add"},75968:t=>{t.exports="remove"},69773:(t,e,i)=>{t.exports={ADD:i(94762),REMOVE:i(75968)}},45820:(t,e,i)=>{t.exports={BaseCache:i(23740),CacheManager:i(43474),Events:i(69773)}},51052:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(75606),a=i(6659),o=i(89787),h=i(74118),l=i(69360),u=i(93222),c=i(93736),d=new s({Extends:a,Mixins:[n.Alpha,n.Visible],initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),a.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new h,this.dirty=!0,this._x=t,this._y=e,this._width=i,this._height=s,this._bounds=new h,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new l,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new c(i/2,s/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0},addToRenderList:function(t){this.renderList.push(t)},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this},getScroll:function(t,e,i){void 0===i&&(i=new c);var s=.5*this.width,n=.5*this.height;return i.x=t-s,i.y=e-n,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOnX:function(t){var e=.5*this.width;return this.midPoint.x=t,this.scrollX=t-e,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(t){var e=.5*this.height;return this.midPoint.y=t,this.scrollY=t-e,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(t,e){return this.centerOnX(t),this.centerOnY(e),this},centerToBounds:function(){if(this.useBounds){var t=this._bounds,e=.5*this.width,i=.5*this.height;this.midPoint.set(t.centerX,t.centerY),this.scrollX=t.centerX-e,this.scrollY=t.centerY-i}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(t){if(this.disableCull)return t;var e=this.matrix.matrix,i=e[0],s=e[1],n=e[2],r=e[3],a=i*r-s*n;if(!a)return t;var o=e[4],h=e[5],l=this.scrollX,u=this.scrollY,c=this.width,d=this.height,f=this.y,p=f+d,v=this.x,g=v+c,m=this.culledObjects,y=t.length;a=1/a,m.length=0;for(var x=0;xv&&S*i+b*n+of&&S*s+b*r+hn&&(t=n),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,s=e.y+(i-this.height)/2,n=Math.max(s,s+e.height-i);return tn&&(t=n),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=r(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,s,n){return void 0===n&&(n=!1),this._bounds.setTo(t,e,i,s),this.dirty=!0,this.useBounds=!0,n?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t,e){void 0===e&&(e=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=t,this.isSceneCamera=e;var i=t.sys;return this.sceneManager=i.game.scene,this.scaleManager=i.scale,this.cameraManager=i.cameras,this.updateSystem(),this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setZoom:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),0===t&&(t=.001),0===e&&(e=.001),this.zoomX=t,this.zoomY=e,this},setMask:function(t,e){return void 0===e&&(e=!0),this.mask=t,this._maskCamera=e?this.cameraManager.default:this,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},update:function(){},setIsSceneCamera:function(t){return this.isSceneCamera=t,this},updateSystem:function(){if(this.scaleManager&&this.isSceneCamera){var t=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,e=this.sceneManager;t&&!this._customViewport?e.customViewports++:!t&&this._customViewport&&e.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit(o.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(t){this._x=t,this.updateSystem()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.updateSystem()}},width:{get:function(){return this._width},set:function(t){this._width=t,this.updateSystem()}},height:{get:function(){return this._height},set:function(t){this._height=t,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(t){t!==this._scrollX&&(this._scrollX=t,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(t){t!==this._scrollY&&(this._scrollY=t,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(t){this._zoomX=t,this._zoomY=t,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(t){this._zoomX=t,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(t){this._zoomY=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});t.exports=d},47751:(t,e,i)=>{var s=i(51052),n=i(79993),r=i(82897),a=i(56694),o=i(64937),h=i(53030),l=i(89787),u=i(42798),c=i(74118),d=i(93736),f=new a({Extends:s,Mixins:[o.Pipeline],initialize:function(t,e,i,n){s.call(this,t,e,i,n),this.postPipelines=[],this.pipelineData={},this.inputEnabled=!0,this.fadeEffect=new h.Fade(this),this.flashEffect=new h.Flash(this),this.shakeEffect=new h.Shake(this),this.panEffect=new h.Pan(this),this.rotateToEffect=new h.RotateTo(this),this.zoomEffect=new h.Zoom(this),this.lerp=new d(1,1),this.followOffset=new d,this.deadzone=null,this._follow=null},setDeadzone:function(t,e){if(void 0===t)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=t,this.deadzone.height=e):this.deadzone=new c(0,0,t,e),this._follow){var i=this.width/2,s=this.height/2,r=this._follow.x-this.followOffset.x,a=this._follow.y-this.followOffset.y;this.midPoint.set(r,a),this.scrollX=r-i,this.scrollY=a-s}n(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(t,e,i,s,n,r){return this.fadeEffect.start(!1,t,e,i,s,!0,n,r)},fadeOut:function(t,e,i,s,n,r){return this.fadeEffect.start(!0,t,e,i,s,!0,n,r)},fadeFrom:function(t,e,i,s,n,r,a){return this.fadeEffect.start(!1,t,e,i,s,n,r,a)},fade:function(t,e,i,s,n,r,a){return this.fadeEffect.start(!0,t,e,i,s,n,r,a)},flash:function(t,e,i,s,n,r,a){return this.flashEffect.start(t,e,i,s,n,r,a)},shake:function(t,e,i,s,n){return this.shakeEffect.start(t,e,i,s,n)},pan:function(t,e,i,s,n,r,a){return this.panEffect.start(t,e,i,s,n,r,a)},rotateTo:function(t,e,i,s,n,r,a){return this.rotateToEffect.start(t,e,i,s,n,r,a)},zoomTo:function(t,e,i,s,n,r){return this.zoomEffect.start(t,e,i,s,n,r)},preRender:function(){this.renderList.length=0;var t=this.width,e=this.height,i=.5*t,s=.5*e,r=this.zoom,a=this.matrix,o=t*this.originX,h=e*this.originY,c=this._follow,d=this.deadzone,f=this.scrollX,p=this.scrollY;d&&n(d,this.midPoint.x,this.midPoint.y);var v=!1;if(this.roundPixels&&(o=Math.floor(o),h=Math.floor(h)),c&&!this.panEffect.isRunning){var g=this.lerp,m=c.x-this.followOffset.x,y=c.y-this.followOffset.y;this.roundPixels&&(m=Math.floor(m),y=Math.floor(y)),d?(md.right&&(f=u(f,f+(m-d.right),g.x)),yd.bottom&&(p=u(p,p+(y-d.bottom),g.y))):(f=u(f,m-o,g.x),p=u(p,y-h,g.y)),v=!0}this.useBounds&&(f=this.clampX(f),p=this.clampY(p)),this.roundPixels&&(f=Math.floor(f),p=Math.floor(p)),this.scrollX=f,this.scrollY=p;var x=f+i,T=p+s;this.midPoint.set(x,T);var w=t/r,E=e/r,S=x-w/2,b=T-E/2;this.roundPixels&&(S=Math.floor(S),b=Math.floor(b)),this.worldView.setTo(S,b,w,E),a.applyITRS(Math.floor(this.x+o),Math.floor(this.y+h),this.rotation,r,r),a.translate(-o,-h),this.shakeEffect.preRender(),v&&this.emit(l.FOLLOW_UPDATE,this,c)},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,s,n,a){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===s&&(s=i),void 0===n&&(n=0),void 0===a&&(a=n),this._follow=t,this.roundPixels=e,i=r(i,0,1),s=r(s,0,1),this.lerp.set(i,s),this.followOffset.set(n,a);var o=this.width/2,h=this.height/2,l=t.x-n,u=t.y-a;return this.midPoint.set(l,u),this.scrollX=l-o,this.scrollY=u-h,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.rotateToEffect.update(t,e),this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.resetFX(),s.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=f},62382:(t,e,i)=>{var s=i(47751),n=i(56694),r=i(72632),a=i(91963),o=i(94287),h=i(40444),l=i(7599),u=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.roundPixels=t.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,t.sys.events.once(l.BOOT,this.boot,this),t.sys.events.on(l.START,this.start,this)},boot:function(){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new s(0,0,t.scale.width,t.scale.height).setScene(this.scene),t.game.scale.on(h.RESIZE,this.onResize,this),this.systems.events.once(l.DESTROY,this.destroy,this)},start:function(){if(!this.main){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0]}var e=this.systems.events;e.on(l.UPDATE,this.update,this),e.once(l.SHUTDOWN,this.shutdown,this)},add:function(t,e,i,n,r,a){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===r&&(r=!1),void 0===a&&(a="");var o=new s(t,e,i,n);return o.setName(a),o.setScene(this.scene),o.setRoundPixels(this.roundPixels),o.id=this.getNextID(),this.cameras.push(o),r&&(this.main=o),o},addExisting:function(t,e){return void 0===e&&(e=!1),-1===this.cameras.indexOf(t)?(t.id=this.getNextID(),t.setRoundPixels(this.roundPixels),this.cameras.push(t),e&&(this.main=t),t):null},getNextID:function(){for(var t=this.cameras,e=1,i=0;i<32;i++){for(var s=!1,n=0;n0){r.preRender();var a=this.getVisibleChildren(e.getChildren(),r);t.render(i,a,r)}}},getVisibleChildren:function(t,e){return t.filter((function(t){return t.willRender(e)}))},resetAll:function(){for(var t=0;t{var s=i(82897),n=i(56694),r=i(89787),a=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,a,o,h){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===a&&(a=!1),void 0===o&&(o=null),void 0===h&&(h=this.camera.scene),!a&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=s,this.blue=n,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=h;var l=t?r.FADE_OUT_START:r.FADE_IN_START;return this.camera.emit(l,this.camera,this,e,i,s,n),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var s=i(82897),n=i(56694),r=i(89787),a=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=1,this.progress=0,this._elapsed=0,this._alpha,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,a,o){return void 0===t&&(t=250),void 0===e&&(e=255),void 0===i&&(i=255),void 0===s&&(s=255),void 0===n&&(n=!1),void 0===a&&(a=null),void 0===o&&(o=this.camera.scene),!n&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,this.red=e,this.green=i,this.blue=s,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=o,this.camera.emit(r.FLASH_START,this.camera,this,t,e,i,s)),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var s=i(82897),n=i(56694),r=i(35060),a=i(89787),o=i(93736),h=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=new o,this.current=new o,this.destination=new o,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,o,h){void 0===i&&(i=1e3),void 0===s&&(s=r.Linear),void 0===n&&(n=!1),void 0===o&&(o=null),void 0===h&&(h=this.camera.scene);var l=this.camera;return!n&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(l.scrollX,l.scrollY),this.destination.set(t,e),l.getScroll(t,e,this.current),"string"==typeof s&&r.hasOwnProperty(s)?this.ease=r[s]:"function"==typeof s&&(this.ease=s),this._elapsed=0,this._onUpdate=o,this._onUpdateScope=h,this.camera.emit(a.PAN_START,this.camera,this,i,t,e)),l},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=s(this._elapsed/this.duration,0,1);this.progress=i;var n=this.camera;if(this._elapsed{var s=i(82897),n=i(56694),r=i(89787),a=i(35060),o=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope,this.clockwise=!0,this.shortestPath=!1},start:function(t,e,i,s,n,o,h){void 0===i&&(i=1e3),void 0===s&&(s=a.Linear),void 0===n&&(n=!1),void 0===o&&(o=null),void 0===h&&(h=this.camera.scene),void 0===e&&(e=!1),this.shortestPath=e;var l=t;t<0?(l=-1*t,this.clockwise=!1):this.clockwise=!0;var u=360*Math.PI/180;l-=Math.floor(l/u)*u;var c=this.camera;if(!n&&this.isRunning)return c;if(this.isRunning=!0,this.duration=i,this.progress=0,this.source=c.rotation,this.destination=l,"string"==typeof s&&a.hasOwnProperty(s)?this.ease=a[s]:"function"==typeof s&&(this.ease=s),this._elapsed=0,this._onUpdate=o,this._onUpdateScope=h,this.shortestPath){var d=0,f=0;(d=this.destination>this.source?Math.abs(this.destination-this.source):Math.abs(this.destination+u)-this.source)<(f=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+u)-this.destination)?this.clockwise=!0:d>f&&(this.clockwise=!1)}return this.camera.emit(r.ROTATE_START,this.camera,this,i,l),c},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=s(this._elapsed/this.duration,0,1);this.progress=i;var n=this.camera;if(this._elapsed=l?Math.abs(h-l):Math.abs(h+o)-l;var u=0;u=this.clockwise?n.rotation+a*r:n.rotation-a*r,n.rotation=u,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,n,i,u)}else n.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,n,i,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(r.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});t.exports=o},3241:(t,e,i)=>{var s=i(82897),n=i(56694),r=i(89787),a=i(93736),o=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new a,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===i&&(i=!1),void 0===s&&(s=null),void 0===n&&(n=this.camera.scene),!i&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,"number"==typeof e?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=s,this._onUpdateScope=n,this.camera.emit(r.SHAKE_START,this.camera,this,t,e)),this.camera},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){if(this.isRunning)if(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var s=i(82897),n=i(56694),r=i(35060),a=i(89787),o=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,o){void 0===e&&(e=1e3),void 0===i&&(i=r.Linear),void 0===s&&(s=!1),void 0===n&&(n=null),void 0===o&&(o=this.camera.scene);var h=this.camera;return!s&&this.isRunning||(this.isRunning=!0,this.duration=e,this.progress=0,this.source=h.zoom,this.destination=t,"string"==typeof i&&r.hasOwnProperty(i)?this.ease=r[i]:"function"==typeof i&&(this.ease=i),this._elapsed=0,this._onUpdate=n,this._onUpdateScope=o,this.camera.emit(a.ZOOM_START,this.camera,this,e,t)),h},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._elapsed{t.exports={Fade:i(92522),Flash:i(22151),Pan:i(37551),Shake:i(3241),RotateTo:i(1771),Zoom:i(13383)}},39577:t=>{t.exports="cameradestroy"},85373:t=>{t.exports="camerafadeincomplete"},92057:t=>{t.exports="camerafadeinstart"},1903:t=>{t.exports="camerafadeoutcomplete"},96131:t=>{t.exports="camerafadeoutstart"},85409:t=>{t.exports="cameraflashcomplete"},25500:t=>{t.exports="cameraflashstart"},44071:t=>{t.exports="followupdate"},19818:t=>{t.exports="camerapancomplete"},80002:t=>{t.exports="camerapanstart"},87966:t=>{t.exports="postrender"},74217:t=>{t.exports="prerender"},34805:t=>{t.exports="camerarotatecomplete"},30408:t=>{t.exports="camerarotatestart"},49856:t=>{t.exports="camerashakecomplete"},69189:t=>{t.exports="camerashakestart"},67657:t=>{t.exports="camerazoomcomplete"},14229:t=>{t.exports="camerazoomstart"},89787:(t,e,i)=>{t.exports={DESTROY:i(39577),FADE_IN_COMPLETE:i(85373),FADE_IN_START:i(92057),FADE_OUT_COMPLETE:i(1903),FADE_OUT_START:i(96131),FLASH_COMPLETE:i(85409),FLASH_START:i(25500),FOLLOW_UPDATE:i(44071),PAN_COMPLETE:i(19818),PAN_START:i(80002),POST_RENDER:i(87966),PRE_RENDER:i(74217),ROTATE_COMPLETE:i(34805),ROTATE_START:i(30408),SHAKE_COMPLETE:i(49856),SHAKE_START:i(69189),ZOOM_COMPLETE:i(67657),ZOOM_START:i(14229)}},32356:(t,e,i)=>{t.exports={Camera:i(47751),BaseCamera:i(51052),CameraManager:i(62382),Effects:i(53030),Events:i(89787)}},84219:(t,e,i)=>{var s=i(56694),n=i(10850),r=new s({initialize:function(t){this.camera=n(t,"camera",null),this.left=n(t,"left",null),this.right=n(t,"right",null),this.up=n(t,"up",null),this.down=n(t,"down",null),this.zoomIn=n(t,"zoomIn",null),this.zoomOut=n(t,"zoomOut",null),this.zoomSpeed=n(t,"zoomSpeed",.01),this.minZoom=n(t,"minZoom",.001),this.maxZoom=n(t,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=n(t,"speed",null);"number"==typeof e?(this.speedX=e,this.speedY=e):(this.speedX=n(t,"speed.x",0),this.speedY=n(t,"speed.y",0)),this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this.up&&this.up.isDown?e.scrollY-=this.speedY*t|0:this.down&&this.down.isDown&&(e.scrollY+=this.speedY*t|0),this.left&&this.left.isDown?e.scrollX-=this.speedX*t|0:this.right&&this.right.isDown&&(e.scrollX+=this.speedX*t|0),this.zoomIn&&this.zoomIn.isDown?(e.zoom-=this.zoomSpeed,e.zoomthis.maxZoom&&(e.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},69370:(t,e,i)=>{var s=i(56694),n=i(10850),r=new s({initialize:function(t){this.camera=n(t,"camera",null),this.left=n(t,"left",null),this.right=n(t,"right",null),this.up=n(t,"up",null),this.down=n(t,"down",null),this.zoomIn=n(t,"zoomIn",null),this.zoomOut=n(t,"zoomOut",null),this.zoomSpeed=n(t,"zoomSpeed",.01),this.minZoom=n(t,"minZoom",.001),this.maxZoom=n(t,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=n(t,"acceleration",null);"number"==typeof e?(this.accelX=e,this.accelY=e):(this.accelX=n(t,"acceleration.x",0),this.accelY=n(t,"acceleration.y",0)),this.dragX=0,this.dragY=0;var i=n(t,"drag",null);"number"==typeof i?(this.dragX=i,this.dragY=i):(this.dragX=n(t,"drag.x",0),this.dragY=n(t,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var s=n(t,"maxSpeed",null);"number"==typeof s?(this.maxSpeedX=s,this.maxSpeedY=s):(this.maxSpeedX=n(t,"maxSpeed.x",0),this.maxSpeedY=n(t,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this._speedX>0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoomthis.maxZoom&&(e.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},6524:(t,e,i)=>{t.exports={FixedKeyControl:i(84219),SmoothedKeyControl:i(69370)}},44143:(t,e,i)=>{t.exports={Controls:i(6524),Scene2D:i(32356)}},86459:(t,e,i)=>{var s={VERSION:"3.60.0-beta.18",BlendModes:i(95723),ScaleModes:i(27394),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=s},14033:(t,e,i)=>{var s=i(56694),n=i(86459),r=i(18360),a=i(77290),o=i(72632),h=i(10850),l=i(42911),u=i(72283),c=i(5923),d=i(65641),f=i(93222),p=new s({initialize:function(t){void 0===t&&(t={});var e=h(t,"scale",null);this.width=h(e,"width",1024,t),this.height=h(e,"height",768,t),this.zoom=h(e,"zoom",1,t),this.parent=h(e,"parent",void 0,t),this.scaleMode=h(e,e?"mode":"scaleMode",0,t),this.expandParent=h(e,"expandParent",!0,t),this.autoRound=h(e,"autoRound",!1,t),this.autoCenter=h(e,"autoCenter",0,t),this.resizeInterval=h(e,"resizeInterval",500,t),this.fullscreenTarget=h(e,"fullscreenTarget",null,t),this.minWidth=h(e,"minWidth",0,t),this.maxWidth=h(e,"maxWidth",0,t),this.minHeight=h(e,"minHeight",0,t),this.maxHeight=h(e,"maxHeight",0,t),this.renderType=h(t,"type",n.AUTO),this.canvas=h(t,"canvas",null),this.context=h(t,"context",null),this.canvasStyle=h(t,"canvasStyle",null),this.customEnvironment=h(t,"customEnvironment",!1),this.sceneConfig=h(t,"scene",null),this.seed=h(t,"seed",[(Date.now()*Math.random()).toString()]),c.RND=new c.RandomDataGenerator(this.seed),this.gameTitle=h(t,"title",""),this.gameURL=h(t,"url","https://phaser.io"),this.gameVersion=h(t,"version",""),this.autoFocus=h(t,"autoFocus",!0),this.stableSort=h(t,"stableSort",-1),-1===this.stableSort&&(this.stableSort=a.browser.es2019?1:0),a.features.stableSort=this.stableSort,this.domCreateContainer=h(t,"dom.createContainer",!1),this.domPointerEvents=h(t,"dom.pointerEvents","none"),this.inputKeyboard=h(t,"input.keyboard",!0),this.inputKeyboardEventTarget=h(t,"input.keyboard.target",window),this.inputKeyboardCapture=h(t,"input.keyboard.capture",[]),this.inputMouse=h(t,"input.mouse",!0),this.inputMouseEventTarget=h(t,"input.mouse.target",null),this.inputMousePreventDefaultDown=h(t,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=h(t,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=h(t,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=h(t,"input.mouse.preventDefaultWheel",!0),this.inputTouch=h(t,"input.touch",a.input.touch),this.inputTouchEventTarget=h(t,"input.touch.target",null),this.inputTouchCapture=h(t,"input.touch.capture",!0),this.inputActivePointers=h(t,"input.activePointers",1),this.inputSmoothFactor=h(t,"input.smoothFactor",0),this.inputWindowEvents=h(t,"input.windowEvents",!0),this.inputGamepad=h(t,"input.gamepad",!1),this.inputGamepadEventTarget=h(t,"input.gamepad.target",window),this.disableContextMenu=h(t,"disableContextMenu",!1),this.audio=h(t,"audio",{}),this.hideBanner=!1===h(t,"banner",null),this.hidePhaser=h(t,"banner.hidePhaser",!1),this.bannerTextColor=h(t,"banner.text","#ffffff"),this.bannerBackgroundColor=h(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=h(t,"fps",null);var i=h(t,"render",null);this.pipeline=h(i,"pipeline",null,t),this.autoMobilePipeline=h(i,"autoMobilePipeline",!0,t),this.defaultPipeline=h(i,"defaultPipeline",d.MULTI_PIPELINE,t),this.antialias=h(i,"antialias",!0,t),this.antialiasGL=h(i,"antialiasGL",!0,t),this.mipmapFilter=h(i,"mipmapFilter","LINEAR",t),this.desynchronized=h(i,"desynchronized",!1,t),this.roundPixels=h(i,"roundPixels",!1,t),this.pixelArt=h(i,"pixelArt",1!==this.zoom,t),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=h(i,"transparent",!1,t),this.clearBeforeRender=h(i,"clearBeforeRender",!0,t),this.preserveDrawingBuffer=h(i,"preserveDrawingBuffer",!1,t),this.premultipliedAlpha=h(i,"premultipliedAlpha",!0,t),this.failIfMajorPerformanceCaveat=h(i,"failIfMajorPerformanceCaveat",!1,t),this.powerPreference=h(i,"powerPreference","default",t),this.batchSize=h(i,"batchSize",4096,t),this.maxTextures=h(i,"maxTextures",-1,t),this.maxLights=h(i,"maxLights",10,t);var s=h(t,"backgroundColor",0);this.backgroundColor=f(s),this.transparent&&(this.backgroundColor=f(0),this.backgroundColor.alpha=0),this.preBoot=h(t,"callbacks.preBoot",u),this.postBoot=h(t,"callbacks.postBoot",u),this.physics=h(t,"physics",{}),this.defaultPhysicsSystem=h(this.physics,"default",!1),this.loaderBaseURL=h(t,"loader.baseURL",""),this.loaderPath=h(t,"loader.path",""),this.loaderMaxParallelDownloads=h(t,"loader.maxParallelDownloads",a.os.android?6:32),this.loaderCrossOrigin=h(t,"loader.crossOrigin",void 0),this.loaderResponseType=h(t,"loader.responseType",""),this.loaderAsync=h(t,"loader.async",!0),this.loaderUser=h(t,"loader.user",""),this.loaderPassword=h(t,"loader.password",""),this.loaderTimeout=h(t,"loader.timeout",0),this.loaderWithCredentials=h(t,"loader.withCredentials",!1),this.loaderImageLoadType=h(t,"loader.imageLoadType","XHR"),this.loaderLocalScheme=h(t,"loader.localScheme",["file://","capacitor://"]),this.installGlobalPlugins=[],this.installScenePlugins=[];var p=h(t,"plugins",null),v=r.DefaultScene;p&&(Array.isArray(p)?this.defaultPlugins=p:l(p)&&(this.installGlobalPlugins=o(p,"global",[]),this.installScenePlugins=o(p,"scene",[]),Array.isArray(p.default)?v=p.default:Array.isArray(p.defaultMerge)&&(v=v.concat(p.defaultMerge)))),this.defaultPlugins=v;var g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=h(t,"images.default",g+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=h(t,"images.missing",g+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=h(t,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=n.WEBGL:window.FORCE_CANVAS&&(this.renderType=n.CANVAS))}});t.exports=p},50150:(t,e,i)=>{var s=i(70616),n=i(61068),r=i(86459),a=i(90185);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===r.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==r.HEADLESS)if(e.renderType===r.AUTO&&(e.renderType=a.webGL?r.WEBGL:r.CANVAS),e.renderType===r.WEBGL){if(!a.webGL)throw new Error("Cannot create WebGL context, aborting.")}else{if(e.renderType!==r.CANVAS)throw new Error("Unknown value for renderer type: "+e.renderType);if(!a.canvas)throw new Error("Cannot create Canvas context, aborting.")}e.antialias||n.disableSmoothing();var o,h,l=t.scale.baseSize,u=l.width,c=l.height;(e.canvas?(t.canvas=e.canvas,t.canvas.width=u,t.canvas.height=c):t.canvas=n.create(t,u,c,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||s.setCrisp(t.canvas),e.renderType!==r.HEADLESS)&&(o=i(91135),h=i(11857),e.renderType===r.WEBGL?t.renderer=new h(t):(t.renderer=new o(t),t.context=t.renderer.gameContext))}},77291:(t,e,i)=>{var s=i(86459);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===s.CANVAS?i="Canvas":e.renderType===s.HEADLESS&&(i="Headless");var n,r=e.audio,a=t.device.audio;if(n=a.webAudio&&!r.disableWebAudio?"Web Audio":r.noAudio||!a.webAudio&&!a.audioData?"No Audio":"HTML5 Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+s.VERSION+" / https://phaser.io");else{var o,h="",l=[h];if(Array.isArray(e.bannerBackgroundColor))e.bannerBackgroundColor.forEach((function(t){h=h.concat("%c "),l.push("background: "+t),o=t})),l[l.length-1]="color: "+e.bannerTextColor+"; background: "+o;else h=h.concat("%c "),l.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor);l.push("background: transparent"),e.gameTitle&&(h=h.concat(e.gameTitle),e.gameVersion&&(h=h.concat(" v"+e.gameVersion)),e.hidePhaser||(h=h.concat(" / ")));e.hidePhaser||(h=h.concat("Phaser v"+s.VERSION+" ("+i+" | "+n+")")),h=h.concat(" %c "+e.gameURL),l[0]=h,console.log.apply(console,l)}}}},15213:(t,e,i)=>{var s=i(99584),n=i(90249),r=i(43474),a=i(61068),o=i(56694),h=i(14033),l=i(85178),u=i(50150),c=i(81078),d=i(77291),f=i(77290),p=i(21546),v=i(6659),g=i(97081),m=i(69898),y=i(91963),x=i(49274),T=i(756),w=i(13553),E=i(38203),S=i(6237),b=i(26617),A=i(26493),_=i(84191),C=new o({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new v,this.anims=new n(this),this.textures=new S(this),this.cache=new r(this),this.registry=new c(this,new v),this.input=new m(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=f,this.scale=new T(this,this.config),this.sound=null,this.sound=_.create(this),this.loop=new b(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,p(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),d(this),s(this.canvas,this.config.parent),this.textures.once(E.READY,this.texturesReady,this),this.events.emit(g.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(g.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),A(this);var t=this.events;t.on(g.HIDDEN,this.onHidden,this),t.on(g.VISIBLE,this.onVisible,this),t.on(g.BLUR,this.onBlur,this),t.on(g.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(g.PRE_STEP,t,e),i.emit(g.STEP,t,e),this.scene.update(t,e),i.emit(g.POST_STEP,t,e);var s=this.renderer;s.preRender(),i.emit(g.PRE_RENDER,s,t,e),this.scene.render(s),s.postRender(),i.emit(g.POST_RENDER,s,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(g.PRE_STEP,t,e),i.emit(g.STEP,t,e),this.scene.update(t,e),i.emit(g.POST_STEP,t,e),this.scene.isProcessing=!1,i.emit(g.PRE_RENDER,null,t,e),i.emit(g.POST_RENDER,null,t,e)},onHidden:function(){this.loop.pause(),this.events.emit(g.PAUSE)},pause:function(){this.onHidden()},onVisible:function(){this.loop.resume(),this.events.emit(g.RESUME)},resume:function(){this.onVisible()},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.scene.destroy(),this.events.emit(g.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(a.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=C},26617:(t,e,i)=>{var s=i(56694),n=i(10850),r=i(72283),a=i(27385),o=new s({initialize:function(t,e){this.game=t,this.raf=new a,this.started=!1,this.running=!1,this.minFps=n(e,"min",5),this.targetFps=n(e,"target",60),this.fpsLimit=n(e,"limit",0),this.hasFpsLimit=this.fpsLimit>0,this._limitRate=this.hasFpsLimit?1e3/this.fpsLimit:0,this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=n(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=n(e,"deltaHistory",10),this.panicMax=n(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=n(e,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0;for(var e=0;e0||!this.inFocus)&&(this._coolDown--,t=Math.min(t,this._target)),t>this._min&&(t=i[e],t=Math.min(t,this._min)),i[e]=t,this.deltaIndex++,this.deltaIndex>=s&&(this.deltaIndex=0);for(var n=0,r=0;r=this.nextFpsUpdate&&this.updateFPS(t),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(t,this.delta),this.delta=0),this.lastTime=t,this.frame++},step:function(t){this.now=t;var e=Math.max(0,t-this.lastTime);this.rawDelta=e,this.time+=this.rawDelta,this.smoothStep&&(e=this.smoothDelta(e)),this.delta=e,t>=this.nextFpsUpdate&&this.updateFPS(t),this.framesThisSecond++,this.callback(t,e),this.lastTime=t,this.frame++},tick:function(){var t=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(t):this.step(t)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){void 0===t&&(t=!1);var e=window.performance.now();if(!this.running){t&&(this.startTime+=-this.lastTime+(this.lastTime+e));var i=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(i,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0,this.fpsLimitTriggered=!1,this.tick()}},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.raf.destroy(),this.raf=null,this.game=null,this.callback=null}});t.exports=o},26493:(t,e,i)=>{var s=i(97081);t.exports=function(t){var e,i=t.events;if(void 0!==document.hidden)e="visibilitychange";else{["webkit","moz","ms"].forEach((function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")}))}e&&document.addEventListener(e,(function(t){document.hidden||"pause"===t.type?i.emit(s.HIDDEN):i.emit(s.VISIBLE)}),!1),window.onblur=function(){i.emit(s.BLUR)},window.onfocus=function(){i.emit(s.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},41651:t=>{t.exports="blur"},5520:t=>{t.exports="boot"},51673:t=>{t.exports="contextlost"},25055:t=>{t.exports="destroy"},23767:t=>{t.exports="focus"},57564:t=>{t.exports="hidden"},38327:t=>{t.exports="pause"},43807:t=>{t.exports="postrender"},73652:t=>{t.exports="poststep"},780:t=>{t.exports="prerender"},13781:t=>{t.exports="prestep"},38247:t=>{t.exports="ready"},29129:t=>{t.exports="resume"},34994:t=>{t.exports="step"},98704:t=>{t.exports="visible"},97081:(t,e,i)=>{t.exports={BLUR:i(41651),BOOT:i(5520),CONTEXT_LOST:i(51673),DESTROY:i(25055),FOCUS:i(23767),HIDDEN:i(57564),PAUSE:i(38327),POST_RENDER:i(43807),POST_STEP:i(73652),PRE_RENDER:i(780),PRE_STEP:i(13781),READY:i(38247),RESUME:i(29129),STEP:i(34994),VISIBLE:i(98704)}},80293:(t,e,i)=>{t.exports={Config:i(14033),CreateRenderer:i(50150),DebugHeader:i(77291),Events:i(97081),TimeStep:i(26617),VisibilityHandler:i(26493)}},52780:(t,e,i)=>{var s=i(81543),n=i(61068),r=i(10850);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),a=r(t,"palette",s),o=r(t,"pixelWidth",1),h=r(t,"pixelHeight",o),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),f=Math.floor(Math.abs(e[0].length*o)),p=Math.floor(Math.abs(e.length*h));i||(i=n.create2D(this,f,p),l=!1,u=!1),l&&(i.width=f,i.height=p);var v=i.getContext("2d");u&&v.clearRect(0,0,f,p),c&&c(i,v);for(var g=0;g{t.exports={GenerateTexture:i(52780),Palettes:i(25235)}},81543:t=>{t.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},75846:t=>{t.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},83206:t=>{t.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},13194:t=>{t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},50686:t=>{t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},25235:(t,e,i)=>{t.exports={ARNE16:i(81543),C64:i(75846),CGA:i(83206),JMP:i(13194),MSX:i(50686)}},63120:(t,e,i)=>{var s=i(56694),n=i(34631),r=i(38517),a=i(93736),o=new s({Extends:r,initialize:function(t,e,i,s){r.call(this,"CubicBezierCurve"),Array.isArray(t)&&(s=new a(t[6],t[7]),i=new a(t[4],t[5]),e=new a(t[2],t[3]),t=new a(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i,this.p3=s},getStartPoint:function(t){return void 0===t&&(t=new a),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new a);var i=this.p0,s=this.p1,r=this.p2,o=this.p3;return e.set(n(t,i.x,s.x,r.x,o.x),n(t,i.y,s.y,r.y,o.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var s=1;s{var s=i(56694),n=i(80222),r=i(74118),a=i(93736),o=new s({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new a,this._tmpVec2B=new a},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var s=Math.max(1,Math.round(i/e));return n(this.getSpacedPoints(s),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new a),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],s=this.getPoint(0,this._tmpVec2A),n=0;i.push(0);for(var r=1;r<=t;r++)n+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(s),i.push(n),s.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var s=0;s<=t;s++)i.push(this.getPoint(s/t));return i},getRandomPoint:function(t){return void 0===t&&(t=new a),this.getPoint(Math.random(),t)},getSpacedPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var s=0;s<=t;s++){var n=this.getUtoTmapping(s/t,null,t);i.push(this.getPoint(n))}return i},getStartPoint:function(t){return void 0===t&&(t=new a),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new a);var i=1e-4,s=t-i,n=t+i;return s<0&&(s=0),n>1&&(n=1),this.getPoint(s,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var s,n=this.getLengths(i),r=0,a=n.length;s=e?Math.min(e,n[a-1]):t*n[a-1];for(var o,h=0,l=a-1;h<=l;)if((o=n[r=Math.floor(h+(l-h)/2)]-s)<0)h=r+1;else{if(!(o>0)){l=r;break}l=r-1}if(n[r=l]===s)return r/(a-1);var u=n[r];return(r+(s-u)/(n[r+1]-u))/(a-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=o},48835:(t,e,i)=>{var s=i(56694),n=i(38517),r=i(75606),a=i(10850),o=i(23701),h=i(93736),l=new s({Extends:n,initialize:function(t,e,i,s,o,l,u,c){if("object"==typeof t){var d=t;t=a(d,"x",0),e=a(d,"y",0),i=a(d,"xRadius",0),s=a(d,"yRadius",i),o=a(d,"startAngle",0),l=a(d,"endAngle",360),u=a(d,"clockwise",!1),c=a(d,"rotation",0)}else void 0===s&&(s=i),void 0===o&&(o=0),void 0===l&&(l=360),void 0===u&&(u=!1),void 0===c&&(c=0);n.call(this,"EllipseCurve"),this.p0=new h(t,e),this._xRadius=i,this._yRadius=s,this._startAngle=r(o),this._endAngle=r(l),this._clockwise=u,this._rotation=r(c)},getStartPoint:function(t){return void 0===t&&(t=new h),this.getPoint(0,t)},getResolution:function(t){return 2*t},getPoint:function(t,e){void 0===e&&(e=new h);for(var i=2*Math.PI,s=this._endAngle-this._startAngle,n=Math.abs(s)i;)s-=i;s{var s=i(56694),n=i(38517),r=i(80222),a=i(74118),o=i(93736),h=new s({Extends:n,initialize:function(t,e){n.call(this,"LineCurve"),Array.isArray(t)&&(e=new o(t[2],t[3]),t=new o(t[0],t[1])),this.p0=t,this.p1=e,this.arcLengthDivisions=1},getBounds:function(t){return void 0===t&&(t=new a),r([this.p0,this.p1],t)},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.p0)},getResolution:function(t){return void 0===t&&(t=1),t},getPoint:function(t,e){return void 0===e&&(e=new o),1===t?e.copy(this.p1):(e.copy(this.p1).subtract(this.p0).scale(t).add(this.p0),e)},getPointAt:function(t,e){return this.getPoint(t,e)},getTangent:function(t,e){return void 0===e&&(e=new o),e.copy(this.p1).subtract(this.p0).normalize(),e},getUtoTmapping:function(t,e,i){var s;if(e){var n=this.getLengths(i),r=n[n.length-1];s=Math.min(e,r)/r}else s=t;return s},draw:function(t){return t.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});h.fromJSON=function(t){var e=t.points,i=new o(e[0],e[1]),s=new o(e[2],e[3]);return new h(i,s)},t.exports=h},64761:(t,e,i)=>{var s=i(56694),n=i(38517),r=i(16252),a=i(93736),o=new s({Extends:n,initialize:function(t,e,i){n.call(this,"QuadraticBezierCurve"),Array.isArray(t)&&(i=new a(t[4],t[5]),e=new a(t[2],t[3]),t=new a(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i},getStartPoint:function(t){return void 0===t&&(t=new a),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new a);var i=this.p0,s=this.p1,n=this.p2;return e.set(r(t,i.x,s.x,n.x),r(t,i.y,s.y,n.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var s=1;s{var s=i(14976),n=i(56694),r=i(38517),a=i(93736),o=new n({Extends:r,initialize:function(t){void 0===t&&(t=[]),r.call(this,"SplineCurve"),this.points=[],this.addPoints(t)},addPoints:function(t){for(var e=0;ei.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(s(o,h.x,l.x,u.x,c.x),s(o,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e{t.exports={Path:i(12822),MoveTo:i(53639),CubicBezier:i(63120),Curve:i(38517),Ellipse:i(48835),Line:i(58084),QuadraticBezier:i(64761),Spline:i(11956)}},53639:(t,e,i)=>{var s=i(56694),n=i(93736),r=new s({initialize:function(t,e){this.active=!1,this.p0=new n(t,e)},getPoint:function(t,e){return void 0===e&&(e=new n),e.copy(this.p0)},getPointAt:function(t,e){return this.getPoint(t,e)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});t.exports=r},12822:(t,e,i)=>{var s=i(56694),n=i(63120),r=i(48835),a=i(61286),o=i(58084),h=i(53639),l=i(64761),u=i(74118),c=i(11956),d=i(93736),f=i(83392),p=new s({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new d,this._tmpVec2A=new d,this._tmpVec2B=new d,"object"==typeof t?this.fromJSON(t):this.startPoint.set(t,e)},add:function(t){return this.curves.push(t),this},circleTo:function(t,e,i){return void 0===e&&(e=!1),this.ellipseTo(t,t,0,360,e,i)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);return t.equals(e)||this.curves.push(new o(e,t)),this},cubicBezierTo:function(t,e,i,s,r,a){var o,h,l,u=this.getEndPoint();return t instanceof d?(o=t,h=e,l=i):(o=new d(i,s),h=new d(r,a),l=new d(t,e)),this.add(new n(u,o,h,l))},quadraticBezierTo:function(t,e,i,s){var n,r,a=this.getEndPoint();return t instanceof d?(n=t,r=e):(n=new d(i,s),r=new d(t,e)),this.add(new l(a,n,r))},draw:function(t,e){for(var i=0;i=e)return this.curves[s];s++}return null},getEndPoint:function(t){return void 0===t&&(t=new d),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),s=this.getCurveLengths(),n=0;n=i){var r=s[n]-i,a=this.curves[n],o=a.getLength(),h=0===o?0:1-r/o;return a.getPointAt(h,e)}n++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],s=0;s1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new d),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new d),t.copy(this.startPoint)},getTangent:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),s=this.getCurveLengths(),n=0;n=i){var r=s[n]-i,a=this.curves[n],o=a.getLength(),h=0===o?0:1-r/o;return a.getTangentAt(h,e)}n++}return null},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new o([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new h(t.x,t.y)):this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e{var s=i(56694),n=i(35026),r=new s({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(n.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],s=0;s{var s=i(56694),n=i(81078),r=i(91963),a=i(7599),o=new s({Extends:n,initialize:function(t){n.call(this,t,t.sys.events),this.scene=t,this.systems=t.sys,t.sys.events.once(a.BOOT,this.boot,this),t.sys.events.on(a.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(a.DESTROY,this.destroy,this)},start:function(){this.events.once(a.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){n.prototype.destroy.call(this),this.events.off(a.START,this.start,this),this.scene=null,this.systems=null}});r.register("DataManagerPlugin",o,"data"),t.exports=o},73569:t=>{t.exports="changedata"},15590:t=>{t.exports="changedata-"},37669:t=>{t.exports="destroy"},87090:t=>{t.exports="removedata"},90142:t=>{t.exports="setdata"},35026:(t,e,i)=>{t.exports={CHANGE_DATA:i(73569),CHANGE_DATA_KEY:i(15590),DESTROY:i(37669),REMOVE_DATA:i(87090),SET_DATA:i(90142)}},1999:(t,e,i)=>{t.exports={DataManager:i(81078),DataManagerPlugin:i(76508),Events:i(35026)}},10720:(t,e,i)=>{var s=i(1350),n={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return n;n.audioData=!!window.Audio,n.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e){var i=function(e,i){var s=t.canPlayType("audio/"+e).replace(/^no$/,"");return i?Boolean(s||t.canPlayType("audio/"+i).replace(/^no$/,"")):Boolean(s)};if(n.ogg=i('ogg; codecs="vorbis"'),n.opus=i('ogg; codecs="opus"',"opus"),n.mp3=i("mpeg"),n.wav=i("wav"),n.m4a=i("x-m4a"),n.aac=i("aac"),n.flac=i("flac","x-flac"),n.webm=i('webm; codecs="vorbis"'),""!==t.canPlayType('audio/mp4; codecs="ec-3"'))if(s.edge)n.dolby=!0;else if(s.safari&&s.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var r=parseInt(RegExp.$1,10),a=parseInt(RegExp.$2,10);(10===r&&a>=11||r>10)&&(n.dolby=!0)}}}catch(t){}return n}()},1350:(t,e,i)=>{var s,n=i(36580),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};t.exports=(s=navigator.userAgent,/Edg\/\d+/.test(s)?(r.edge=!0,r.es2019=!0):/OPR/.test(s)?(r.opera=!0,r.es2019=!0):/Chrome\/(\d+)/.test(s)&&!n.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10),r.es2019=r.chromeVersion>69):/Firefox\D+(\d+)/.test(s)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10),r.es2019=r.firefoxVersion>10):/AppleWebKit/.test(s)&&n.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(s)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+) Safari/.test(s)&&!n.windowsPhone?(r.safari=!0,r.safariVersion=parseInt(RegExp.$1,10),r.es2019=r.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(s)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(s)&&(r.silk=!0),r)},98581:(t,e,i)=>{var s,n,r,a=i(61068),o={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(o.supportNewBlendModes=(s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",n="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=a.create2D(t,6).getContext("2d",{willReadFrequently:!0});if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;a.remove(t),o.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=s+"/wCKxvRF"+n},r.src=s+"AP804Oa6"+n,!1),o.supportInverseAlpha=function(){var t=a.create2D(this,2).getContext("2d",{willReadFrequently:!0});t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1),s=i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3];return a.remove(this),s}()),o)},90185:(t,e,i)=>{var s=i(36580),n=i(1350),r=i(61068),a={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){if("function"==typeof importScripts)return a;a.canvas=!!window.CanvasRenderingContext2D;try{a.localStorage=!!localStorage.getItem}catch(t){a.localStorage=!1}a.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),a.fileSystem=!!window.requestFileSystem;var t,e,i,o=!1;return a.webGL=function(){if(window.WebGLRenderingContext)try{var t=r.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=r.create2D(this),s=i.getContext("2d",{willReadFrequently:!0}).createImageData(1,1);return o=s.data instanceof Uint8ClampedArray,r.remove(t),r.remove(i),!!e}catch(t){return!1}return!1}(),a.worker=!!window.Worker,a.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,a.getUserMedia=a.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,n.firefox&&n.firefoxVersion<21&&(a.getUserMedia=!1),!s.iOS&&(n.ie||n.firefox||n.chrome)&&(a.canvasBitBltShift=!0),(n.safari||n.mobileSafari)&&(a.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(a.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(a.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),a.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==a.littleEndian&&o,a}()},33553:t=>{var e={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"==typeof importScripts)return e;var t,i="Fullscreen",s="FullScreen",n=["request"+i,"request"+s,"webkitRequest"+i,"webkitRequest"+s,"msRequest"+i,"msRequest"+s,"mozRequest"+s,"mozRequest"+i];for(t=0;t{var s=i(1350),n={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=("function"==typeof importScripts||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(n.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(n.mspointer=!0),navigator.getGamepads&&(n.gamepads=!0),"onwheel"in window||s.ie&&"WheelEvent"in window?n.wheelEvent="wheel":"onmousewheel"in window?n.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(n.wheelEvent="DOMMouseScroll")),n)},36580:t=>{var e={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){if("function"==typeof importScripts)return e;var t=navigator.userAgent;/Windows/.test(t)?e.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(e.iOS=!0,e.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),e.iOSVersion=parseInt(RegExp.$1,10)):e.macOS=!0:/Android/.test(t)?e.android=!0:/Linux/.test(t)?e.linux=!0:/iP[ao]d|iPhone/i.test(t)?(e.iOS=!0,navigator.appVersion.match(/OS (\d+)/),e.iOSVersion=parseInt(RegExp.$1,10),e.iPhone=-1!==t.toLowerCase().indexOf("iphone"),e.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?e.kindle=!0:/CrOS/.test(t)&&(e.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(e.android=!1,e.iOS=!1,e.macOS=!1,e.windows=!0,e.windowsPhone=!0);var i=/Silk/.test(t);return(e.windows||e.macOS||e.linux&&!i||e.chromeOS)&&(e.desktop=!0),(e.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(e.desktop=!1),navigator.standalone&&(e.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(e.cordova=!0),void 0!==window.ejecta&&(e.ejecta=!0)),"undefined"!=typeof process&&process.versions&&process.versions.node&&(e.node=!0),e.node&&"object"==typeof process.versions&&(e.nodeWebkit=!!process.versions["node-webkit"],e.electron=!!process.versions.electron),/Crosswalk/.test(t)&&(e.crosswalk=!0),e.pixelRatio=window.devicePixelRatio||1,e}()},53861:t=>{var e={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return e;var t=document.createElement("video"),i=!!t.canPlayType,s=/^no$/;try{i&&(t.canPlayType('video/ogg; codecs="theora"').replace(s,"")&&(e.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(s,"")&&(e.h264=!0,e.mp4=!0),t.canPlayType("video/x-m4v").replace(s,"")&&(e.m4v=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(s,"")&&(e.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(s,"")&&(e.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(s,"")&&(e.hls=!0))}catch(t){}return e}()},77290:(t,e,i)=>{t.exports={os:i(36580),browser:i(1350),features:i(90185),input:i(95872),audio:i(10720),video:i(53861),fullscreen:i(33553),canvasFeatures:i(98581)}},65246:(t,e,i)=>{var s=new(i(56694))({initialize:function(){this._matrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],this.alpha=1,this._dirty=!0,this._data},set:function(t){return this._matrix=t,this._dirty=!0,this},reset:function(){var t=this._matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=1,t[13]=0,t[14]=0,t[15]=0,t[16]=0,t[17]=0,t[18]=1,t[19]=0,this._dirty=!0,this},getData:function(){if(this._dirty){var t=new Float32Array(this._matrix);t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,this._data=t,this._dirty=!1}return this._data},brightness:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t;return this.multiply([i,0,0,0,0,0,i,0,0,0,0,0,i,0,0,0,0,0,1,0],e)},saturate:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=2*t/3+1,s=-.5*(i-1);return this.multiply([i,s,s,0,0,s,i,s,0,0,s,s,i,0,0,0,0,0,1,0],e)},desaturate:function(t){return void 0===t&&(t=!1),this.saturate(-1,t)},hue:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1),t=t/180*Math.PI;var i=Math.cos(t),s=Math.sin(t),n=.213,r=.715,a=.072;return this.multiply([n+.787*i+s*-n,r+i*-r+s*-r,a+i*-a+.928*s,0,0,n+i*-n+.143*s,r+i*(1-r)+.14*s,a+i*-a+-.283*s,0,0,n+i*-n+-.787*s,r+i*-r+s*r,a+.928*i+s*a,0,0,0,0,0,1,0],e)},grayscale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=!1),this.saturate(-t,e)},blackWhite:function(t){return void 0===t&&(t=!1),this.multiply([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t)},contrast:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t+1,s=-.5*(i-1);return this.multiply([i,0,0,0,s,0,i,0,0,s,0,0,i,0,s,0,0,0,1,0],e)},negative:function(t){return void 0===t&&(t=!1),this.multiply([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],t)},desaturateLuminance:function(t){return void 0===t&&(t=!1),this.multiply([.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],t)},sepia:function(t){return void 0===t&&(t=!1),this.multiply([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t)},night:function(t,e){return void 0===t&&(t=.1),void 0===e&&(e=!1),this.multiply([-2*t,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0],e)},lsd:function(t){return void 0===t&&(t=!1),this.multiply([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},brown:function(t){return void 0===t&&(t=!1),this.multiply([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t)},vintagePinhole:function(t){return void 0===t&&(t=!1),this.multiply([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t)},kodachrome:function(t){return void 0===t&&(t=!1),this.multiply([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],t)},technicolor:function(t){return void 0===t&&(t=!1),this.multiply([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],t)},polaroid:function(t){return void 0===t&&(t=!1),this.multiply([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t)},shiftToBGR:function(t){return void 0===t&&(t=!1),this.multiply([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t)},multiply:function(t,e){e||this.reset();for(var i=this._matrix,s=[],n=0;n<20;n++)s[n]=i[n];return i[0]=s[0]*t[0]+s[1]*t[5]+s[2]*t[10]+s[3]*t[15],i[1]=s[0]*t[1]+s[1]*t[6]+s[2]*t[11]+s[3]*t[16],i[2]=s[0]*t[2]+s[1]*t[7]+s[2]*t[12]+s[3]*t[17],i[3]=s[0]*t[3]+s[1]*t[8]+s[2]*t[13]+s[3]*t[18],i[4]=s[0]*t[4]+s[1]*t[9]+s[2]*t[14]+s[3]*t[19]+s[4],i[5]=s[5]*t[0]+s[6]*t[5]+s[7]*t[10]+s[8]*t[15],i[6]=s[5]*t[1]+s[6]*t[6]+s[7]*t[11]+s[8]*t[16],i[7]=s[5]*t[2]+s[6]*t[7]+s[7]*t[12]+s[8]*t[17],i[8]=s[5]*t[3]+s[6]*t[8]+s[7]*t[13]+s[8]*t[18],i[9]=s[5]*t[4]+s[6]*t[9]+s[7]*t[14]+s[8]*t[19]+s[9],i[10]=s[10]*t[0]+s[11]*t[5]+s[12]*t[10]+s[13]*t[15],i[11]=s[10]*t[1]+s[11]*t[6]+s[12]*t[11]+s[13]*t[16],i[12]=s[10]*t[2]+s[11]*t[7]+s[12]*t[12]+s[13]*t[17],i[13]=s[10]*t[3]+s[11]*t[8]+s[12]*t[13]+s[13]*t[18],i[14]=s[10]*t[4]+s[11]*t[9]+s[12]*t[14]+s[13]*t[19]+s[14],i[15]=s[15]*t[0]+s[16]*t[5]+s[17]*t[10]+s[18]*t[15],i[16]=s[15]*t[1]+s[16]*t[6]+s[17]*t[11]+s[18]*t[16],i[17]=s[15]*t[2]+s[16]*t[7]+s[17]*t[12]+s[18]*t[17],i[18]=s[15]*t[3]+s[16]*t[8]+s[17]*t[13]+s[18]*t[18],i[19]=s[15]*t[4]+s[16]*t[9]+s[17]*t[14]+s[18]*t[19]+s[19],this._dirty=!0,this}});t.exports=s},39298:(t,e,i)=>{var s=i(56694),n=i(72283),r=new s({initialize:function(t,e,i){this._rgb=[0,0,0],this.onChangeCallback=n,this.dirty=!1,this.set(t,e,i)},set:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this._rgb=[t,e,i],this.onChange(),this},equals:function(t,e,i){var s=this._rgb;return s[0]===t&&s[1]===e&&s[2]===i},onChange:function(){this.dirty=!0;var t=this._rgb;this.onChangeCallback.call(this,t[0],t[1],t[2])},r:{get:function(){return this._rgb[0]},set:function(t){this._rgb[0]=t,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(t){this._rgb[1]=t,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(t){this._rgb[2]=t,this.onChange()}},destroy:function(){this.onChangeCallback=null}});t.exports=r},84093:t=>{t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},32058:(t,e,i)=>{var s=i(97328),n=i(59994),r=i(73174),a=i(28417);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,n(e)+i),r(t,s(e)+o),t}},85535:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(73174),a=i(74465);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,n(e)-i),r(t,s(e)+o),t}},9605:(t,e,i)=>{var s=i(97328),n=i(70271),r=i(73174),a=i(19298);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,n(e)+i),r(t,s(e)+o),t}},22529:(t,e,i)=>{var s=i(21843),n=i(59994),r=i(29568);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),s(t,n(e)+i,r(e)+a),t}},5739:(t,e,i)=>{var s=i(29568),n=i(40163),r=i(81711),a=i(74465);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,n(e)-i),r(t,s(e)+o),t}},40327:(t,e,i)=>{var s=i(84093),n=[];n[s.BOTTOM_CENTER]=i(32058),n[s.BOTTOM_LEFT]=i(85535),n[s.BOTTOM_RIGHT]=i(9605),n[s.CENTER]=i(22529),n[s.LEFT_CENTER]=i(5739),n[s.RIGHT_CENTER]=i(27683),n[s.TOP_CENTER]=i(96439),n[s.TOP_LEFT]=i(81447),n[s.TOP_RIGHT]=i(47888),n[s.LEFT_BOTTOM]=n[s.BOTTOM_LEFT],n[s.LEFT_TOP]=n[s.TOP_LEFT],n[s.RIGHT_BOTTOM]=n[s.BOTTOM_RIGHT],n[s.RIGHT_TOP]=n[s.TOP_RIGHT];t.exports=function(t,e,i,s,r){return n[i](t,e,s,r)}},27683:(t,e,i)=>{var s=i(29568),n=i(70271),r=i(81711),a=i(19298);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,n(e)+i),r(t,s(e)+o),t}},96439:(t,e,i)=>{var s=i(59994),n=i(47196),r=i(28417),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),r(t,s(e)+i),a(t,n(e)-o),t}},81447:(t,e,i)=>{var s=i(40163),n=i(47196),r=i(74465),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),r(t,s(e)-i),a(t,n(e)-o),t}},47888:(t,e,i)=>{var s=i(70271),n=i(47196),r=i(19298),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),r(t,s(e)+i),a(t,n(e)-o),t}},46997:(t,e,i)=>{t.exports={BottomCenter:i(32058),BottomLeft:i(85535),BottomRight:i(9605),Center:i(22529),LeftCenter:i(5739),QuickSet:i(40327),RightCenter:i(27683),TopCenter:i(96439),TopLeft:i(81447),TopRight:i(47888)}},93545:(t,e,i)=>{var s=i(84093),n=i(98611),r={In:i(46997),To:i(86639)};r=n(!1,r,s),t.exports=r},27118:(t,e,i)=>{var s=i(97328),n=i(59994),r=i(28417),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),r(t,n(e)+i),a(t,s(e)+o),t}},84469:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(74465),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),r(t,n(e)-i),a(t,s(e)+o),t}},51577:(t,e,i)=>{var s=i(97328),n=i(70271),r=i(19298),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),r(t,n(e)+i),a(t,s(e)+o),t}},90271:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(73174),a=i(19298);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,n(e)-i),r(t,s(e)+o),t}},30466:(t,e,i)=>{var s=i(29568),n=i(40163),r=i(81711),a=i(19298);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,n(e)-i),r(t,s(e)+o),t}},50087:(t,e,i)=>{var s=i(40163),n=i(47196),r=i(19298),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),r(t,s(e)-i),a(t,n(e)-o),t}},82590:(t,e,i)=>{var s=i(84093),n=[];n[s.BOTTOM_CENTER]=i(27118),n[s.BOTTOM_LEFT]=i(84469),n[s.BOTTOM_RIGHT]=i(51577),n[s.LEFT_BOTTOM]=i(90271),n[s.LEFT_CENTER]=i(30466),n[s.LEFT_TOP]=i(50087),n[s.RIGHT_BOTTOM]=i(13555),n[s.RIGHT_CENTER]=i(99049),n[s.RIGHT_TOP]=i(67788),n[s.TOP_CENTER]=i(78170),n[s.TOP_LEFT]=i(54145),n[s.TOP_RIGHT]=i(75548);t.exports=function(t,e,i,s,r){return n[i](t,e,s,r)}},13555:(t,e,i)=>{var s=i(97328),n=i(70271),r=i(73174),a=i(74465);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,n(e)+i),r(t,s(e)+o),t}},99049:(t,e,i)=>{var s=i(29568),n=i(70271),r=i(81711),a=i(74465);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,n(e)+i),r(t,s(e)+o),t}},67788:(t,e,i)=>{var s=i(70271),n=i(47196),r=i(74465),a=i(84349);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),r(t,s(e)+i),a(t,n(e)-o),t}},78170:(t,e,i)=>{var s=i(59994),n=i(47196),r=i(73174),a=i(28417);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,s(e)+i),r(t,n(e)-o),t}},54145:(t,e,i)=>{var s=i(40163),n=i(47196),r=i(73174),a=i(74465);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,s(e)-i),r(t,n(e)-o),t}},75548:(t,e,i)=>{var s=i(70271),n=i(47196),r=i(73174),a=i(19298);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),a(t,s(e)+i),r(t,n(e)-o),t}},86639:(t,e,i)=>{t.exports={BottomCenter:i(27118),BottomLeft:i(84469),BottomRight:i(51577),LeftBottom:i(90271),LeftCenter:i(30466),LeftTop:i(50087),QuickSet:i(82590),RightBottom:i(13555),RightCenter:i(99049),RightTop:i(67788),TopCenter:i(78170),TopLeft:i(54145),TopRight:i(75548)}},21843:(t,e,i)=>{var s=i(28417),n=i(81711);t.exports=function(t,e,i){return s(t,e),n(t,i)}},97328:t=>{t.exports=function(t){return t.y+t.height-t.height*t.originY}},7126:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(70271),a=i(47196);t.exports=function(t,e){void 0===e&&(e={});var i=n(t),o=a(t);return e.x=i,e.y=o,e.width=r(t)-i,e.height=s(t)-o,e}},59994:t=>{t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},29568:t=>{t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},40163:t=>{t.exports=function(t){return t.x-t.width*t.originX}},52088:t=>{t.exports=function(t){return t.width*t.originX}},23379:t=>{t.exports=function(t){return t.height*t.originY}},70271:t=>{t.exports=function(t){return t.x+t.width-t.width*t.originX}},47196:t=>{t.exports=function(t){return t.y-t.height*t.originY}},73174:t=>{t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},28417:t=>{t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},81711:t=>{t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},74465:t=>{t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},19298:t=>{t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},84349:t=>{t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},15252:(t,e,i)=>{t.exports={CenterOn:i(21843),GetBottom:i(97328),GetBounds:i(7126),GetCenterX:i(59994),GetCenterY:i(29568),GetLeft:i(40163),GetOffsetX:i(52088),GetOffsetY:i(23379),GetRight:i(70271),GetTop:i(47196),SetBottom:i(73174),SetCenterX:i(28417),SetCenterY:i(81711),SetLeft:i(74465),SetRight:i(19298),SetTop:i(84349)}},70616:t=>{t.exports={setCrisp:function(t){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach((function(e){t.style["image-rendering"]=e})),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},61068:(t,e,i)=>{var s,n,r,a=i(86459),o=i(8213),h=[],l=!1;t.exports=(r=function(){var t=0;return h.forEach((function(e){e.parent&&t++})),t},{create2D:function(t,e,i){return s(t,e,i,a.CANVAS)},create:s=function(t,e,i,s,r){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=a.CANVAS),void 0===r&&(r=!1);var c=n(s);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:s},s===a.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),r&&(c.parent=u),u.width=e,u.height=i,l&&s===a.CANVAS&&o.disable(u.getContext("2d")),u},createWebGL:function(t,e,i){return s(t,e,i,a.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:n=function(t){if(void 0===t&&(t=a.CANVAS),t===a.WEBGL)return null;for(var e=0;e{var e,i="";t.exports={disable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!1),t},enable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!0),t},getPrefix:e=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i{t.exports=function(t,e){return void 0===e&&(e="none"),t.style.msTouchAction=e,t.style["ms-touch-action"]=e,t.style["touch-action"]=e,t}},36505:t=>{t.exports=function(t,e){void 0===e&&(e="none");return["-webkit-","-khtml-","-moz-","-ms-",""].forEach((function(i){t.style[i+"user-select"]=e})),t.style["-webkit-touch-callout"]=e,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t}},23514:(t,e,i)=>{t.exports={CanvasInterpolation:i(70616),CanvasPool:i(61068),Smoothing:i(8213),TouchAction:i(59271),UserSelect:i(36505)}},27119:(t,e,i)=>{var s=i(56694),n=i(22946),r=i(5657),a=i(24650),o=i(68033),h=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,s)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(t,e,i,s,n){return void 0===s&&(s=255),void 0===n&&(n=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=s,this._locked=!1,this.update(n)},setGLTo:function(t,e,i,s){return void 0===s&&(s=1),this._locked=!0,this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=s,this._locked=!1,this.update(!0)},setFromRGB:function(t){return this._locked=!0,this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this._locked=!1,this.update(!0)},setFromHSV:function(t,e,i){return a(t,e,i,this)},update:function(t){if(void 0===t&&(t=!1),this._locked)return this;var e=this.r,i=this.g,s=this.b,a=this.a;return this._color=n(e,i,s),this._color32=r(e,i,s,a),this._rgba="rgba("+e+","+i+","+s+","+a/255+")",t&&o(e,i,s,this),this},updateHSV:function(){var t=this.r,e=this.g,i=this.b;return o(t,e,i,this),this},clone:function(){return new h(this.r,this.g,this.b,this.a)},gray:function(t){return this.setTo(t,t,t)},random:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t)),s=Math.floor(t+Math.random()*(e-t)),n=Math.floor(t+Math.random()*(e-t));return this.setTo(i,s,n)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t));return this.setTo(i,i,i)},saturate:function(t){return this.s+=t/100,this},desaturate:function(t){return this.s-=t/100,this},lighten:function(t){return this.v+=t/100,this},darken:function(t){return this.v-=t/100,this},brighten:function(t){var e=this.r,i=this.g,s=this.b;return e=Math.max(0,Math.min(255,e-Math.round(-t/100*255))),i=Math.max(0,Math.min(255,i-Math.round(-t/100*255))),s=Math.max(0,Math.min(255,s-Math.round(-t/100*255))),this.setTo(e,i,s)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(t){this.gl[0]=Math.min(Math.abs(t),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(t){this.gl[1]=Math.min(Math.abs(t),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(t){this.gl[2]=Math.min(Math.abs(t),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(t){this.gl[3]=Math.min(Math.abs(t),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(t){t=Math.floor(Math.abs(t)),this.r=Math.min(t,255),this.gl[0]=t/255,this.update(!0)}},green:{get:function(){return this.g},set:function(t){t=Math.floor(Math.abs(t)),this.g=Math.min(t,255),this.gl[1]=t/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(t){t=Math.floor(Math.abs(t)),this.b=Math.min(t,255),this.gl[2]=t/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(t){t=Math.floor(Math.abs(t)),this.a=Math.min(t,255),this.gl[3]=t/255,this.update()}},h:{get:function(){return this._h},set:function(t){this._h=t,a(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,a(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,a(this._h,this._s,t,this)}}});t.exports=h},30245:(t,e,i)=>{var s=i(22946);t.exports=function(t){void 0===t&&(t=1024);var e,i=[],n=255,r=255,a=0,o=0;for(e=0;e<=n;e++)i.push({r:r,g:e,b:o,color:s(r,e,o)});for(a=255,e=n;e>=0;e--)i.push({r:e,g:a,b:o,color:s(e,a,o)});for(r=0,e=0;e<=n;e++,a--)i.push({r:r,g:a,b:e,color:s(r,a,e)});for(a=0,o=255,e=0;e<=n;e++,o--,r++)i.push({r:r,g:a,b:o,color:s(r,a,o)});if(1024===t)return i;var h=[],l=0,u=1024/t;for(e=0;e{t.exports=function(t){var e={r:t>>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},25409:t=>{t.exports=function(t){var e=t.toString(16);return 1===e.length?"0"+e:e}},22946:t=>{t.exports=function(t,e,i){return t<<16|e<<8|i}},5657:t=>{t.exports=function(t,e,i,s){return s<<24|t<<16|e<<8|i}},74777:(t,e,i)=>{var s=i(27119),n=i(59998);t.exports=function(t,e,i){var r=i,a=i,o=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=n(l,h,t+1/3),a=n(l,h,t),o=n(l,h,t-1/3)}return(new s).setGLTo(r,a,o,1)}},89263:(t,e,i)=>{var s=i(24650);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],n=0;n<=359;n++)i.push(s(n/359,t,e));return i}},24650:(t,e,i)=>{var s=i(22946);function n(t,e,i,s){var n=(t+6*e)%6,r=Math.min(n,4-n,1);return Math.round(255*(s-s*i*Math.max(0,r)))}t.exports=function(t,e,i,r){void 0===e&&(e=1),void 0===i&&(i=1);var a=n(5,t,e,i),o=n(3,t,e,i),h=n(1,t,e,i);return r?r.setTo?r.setTo(a,o,h,r.alpha,!0):(r.r=a,r.g=o,r.b=h,r.color=s(a,o,h),r):{r:a,g:o,b:h,color:s(a,o,h)}}},91487:(t,e,i)=>{var s=i(27119);t.exports=function(t){var e=new s;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,i,s){return e+e+i+i+s+s}));var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var n=parseInt(i[1],16),r=parseInt(i[2],16),a=parseInt(i[3],16);e.setTo(n,r,a)}return e}},59998:t=>{t.exports=function(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},74853:(t,e,i)=>{var s=i(27119),n=i(15978);t.exports=function(t){var e=n(t);return new s(e.r,e.g,e.b,e.a)}},15978:t=>{t.exports=function(t){return t>16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},53756:(t,e,i)=>{var s=i(42798),n=function(t,e,i,n,r,a,o,h){void 0===o&&(o=100),void 0===h&&(h=0);var l=h/o;return{r:s(t,n,l),g:s(e,r,l),b:s(i,a,l)}};t.exports={RGBWithRGB:n,ColorWithRGB:function(t,e,i,s,r,a){return void 0===r&&(r=100),void 0===a&&(a=0),n(t.r,t.g,t.b,e,i,s,r,a)},ColorWithColor:function(t,e,i,s){return void 0===i&&(i=100),void 0===s&&(s=0),n(t.r,t.g,t.b,e.r,e.g,e.b,i,s)}}},73904:(t,e,i)=>{var s=i(27119);t.exports=function(t){return new s(t.r,t.g,t.b,t.a)}},26841:(t,e,i)=>{var s=i(27119);t.exports=function(t){var e=new s,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var n=parseInt(i[1],10),r=parseInt(i[2],10),a=parseInt(i[3],10),o=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(n,r,a,255*o)}return e}},68033:t=>{t.exports=function(t,e,i,s){void 0===s&&(s={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var n=Math.min(t,e,i),r=Math.max(t,e,i),a=r-n,o=0,h=0===r?0:a/r,l=r;return r!==n&&(r===t?o=(e-i)/a+(e{var s=i(25409);t.exports=function(t,e,i,n,r){return void 0===n&&(n=255),void 0===r&&(r="#"),"#"===r?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1,7):"0x"+s(n)+s(t)+s(e)+s(i)}},37243:(t,e,i)=>{var s=i(17489),n=i(27119);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new n(s(t,e),s(t,e),s(t,e))}},93222:(t,e,i)=>{var s=i(91487),n=i(74853),r=i(73904),a=i(26841);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?a(t):s(t);case"number":return n(t);case"object":return r(t)}}},95509:(t,e,i)=>{var s=i(27119);s.ColorSpectrum=i(30245),s.ColorToRGBA=i(86672),s.ComponentToHex=i(25409),s.GetColor=i(22946),s.GetColor32=i(5657),s.HexStringToColor=i(91487),s.HSLToColor=i(74777),s.HSVColorWheel=i(89263),s.HSVToRGB=i(24650),s.HueToComponent=i(59998),s.IntegerToColor=i(74853),s.IntegerToRGB=i(15978),s.Interpolate=i(53756),s.ObjectToColor=i(73904),s.RandomRGB=i(37243),s.RGBStringToColor=i(26841),s.RGBToHSV=i(68033),s.RGBToString=i(4880),s.ValueToColor=i(93222),t.exports=s},24816:(t,e,i)=>{t.exports={Align:i(93545),BaseShader:i(31053),Bounds:i(15252),Canvas:i(23514),Color:i(95509),ColorMatrix:i(65246),Masks:i(93310),RGB:i(39298)}},76756:(t,e,i)=>{var s=i(56694),n=i(61286),r=new s({initialize:function(t,e,i,s,n,r){e||(e=t.sys.make.image({x:i,y:s,key:n,frame:r,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e,i)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});n.register("bitmapMask",(function(t,e,i,s,n){return new r(this.scene,t,e,i,s,n)})),t.exports=r},63037:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var s=t.gl;t.flush(),0===t.maskStack.length&&(s.enable(s.STENCIL_TEST),s.clear(s.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var s=t.gl,n=this.geometryMask,r=t.maskCount;s.colorMask(!1,!1,!1,!1),i?(s.stencilFunc(s.EQUAL,r,255),s.stencilOp(s.KEEP,s.KEEP,s.INCR)):(s.stencilFunc(s.EQUAL,r+1,255),s.stencilOp(s.KEEP,s.KEEP,s.DECR)),n.renderWebGL(t,n,e),t.flush(),s.colorMask(!0,!0,!0,!0),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),i?this.invertAlpha?s.stencilFunc(s.NOTEQUAL,r+1,255):s.stencilFunc(s.EQUAL,r+1,255):this.invertAlpha?s.stencilFunc(s.NOTEQUAL,r,255):s.stencilFunc(s.EQUAL,r,255)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;if(0===t.maskStack.length)i.mask=null,e.disable(e.STENCIL_TEST);else{var s=t.maskStack[t.maskStack.length-1];s.mask.applyStencil(t,s.camera,!1),t.currentCameraMask.mask!==s.mask?(i.mask=s.mask,i.camera=s.camera):i.mask=null}},preRenderCanvas:function(t,e,i){var s=this.geometryMask;t.currentContext.save(),s.renderCanvas(t,s,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=s},93310:(t,e,i)=>{t.exports={BitmapMask:i(76756),GeometryMask:i(63037)}},31053:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s){e&&""!==e||(e=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join("\n")),i&&""!==i||(i=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join("\n")),void 0===s&&(s=null),this.key=t,this.fragmentSrc=e,this.vertexSrc=i,this.uniforms=s}});t.exports=s},99584:t=>{t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement||null===e)return t;return i||(i=document.body),i.appendChild(t),t}},85178:(t,e,i)=>{var s=i(99584);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+e.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=i,s(i,e.parent)}}},21546:(t,e,i)=>{var s=i(36580);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?s.cordova?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},74181:t=>{t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},s=document.createElement("div");return s.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(s),i.w=90===e?s.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:s.offsetHeight,document.documentElement.removeChild(s),s=null,90!==Math.abs(window.orientation)?i.h:i.w}},9229:(t,e,i)=>{var s=i(55301);t.exports=function(t,e){var i=window.screen,n=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);return n&&"string"==typeof n.type?n.type:"string"==typeof n?n:"number"==typeof window.orientation?0===window.orientation||180===window.orientation?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE:window.matchMedia?window.matchMedia("(orientation: portrait)").matches?s.ORIENTATION.PORTRAIT:window.matchMedia("(orientation: landscape)").matches?s.ORIENTATION.LANDSCAPE:void 0:e>t?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE}},2893:t=>{t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||(e=document.body),e}},89200:t=>{t.exports=function(t){var e="";try{if(window.DOMParser)e=(new DOMParser).parseFromString(t,"text/xml");else(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},55638:t=>{t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},27385:(t,e,i)=>{var s=i(56694),n=i(72283),r=new s({initialize:function(){this.isRunning=!1,this.callback=n,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var t=this;this.step=function e(i){t.callback(i),t.isRunning&&(t.timeOutID=window.requestAnimationFrame(e))},this.stepTimeout=function e(){t.isRunning&&(t.timeOutID=window.setTimeout(e,t.delay)),t.callback(window.performance.now())}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.delay=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=n}});t.exports=r},3590:(t,e,i)=>{var s={AddToDOM:i(99584),DOMContentLoaded:i(21546),GetInnerHeight:i(74181),GetScreenOrientation:i(9229),GetTarget:i(2893),ParseXML:i(89200),RemoveFromDOM:i(55638),RequestAnimationFrame:i(27385)};t.exports=s},78491:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(91963),a=new s({Extends:n,initialize:function(){n.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",a,"events"),t.exports=a},95146:(t,e,i)=>{t.exports={EventEmitter:i(78491)}},88933:(t,e,i)=>{var s=i(95723),n=i(20494);t.exports=function(t,e,i){e.x=n(i,"x",0),e.y=n(i,"y",0),e.depth=n(i,"depth",0),e.flipX=n(i,"flipX",!1),e.flipY=n(i,"flipY",!1);var r=n(i,"scale",null);"number"==typeof r?e.setScale(r):null!==r&&(e.scaleX=n(r,"x",1),e.scaleY=n(r,"y",1));var a=n(i,"scrollFactor",null);"number"==typeof a?e.setScrollFactor(a):null!==a&&(e.scrollFactorX=n(a,"x",1),e.scrollFactorY=n(a,"y",1)),e.rotation=n(i,"rotation",0);var o=n(i,"angle",null);null!==o&&(e.angle=o),e.alpha=n(i,"alpha",1);var h=n(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=n(h,"x",.5),u=n(h,"y",.5);e.setOrigin(l,u)}return e.blendMode=n(i,"blendMode",s.NORMAL),e.visible=n(i,"visible",!0),n(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},32291:(t,e,i)=>{var s=i(20494);t.exports=function(t,e){var i=s(e,"anims",null);if(null===i)return t;if("string"==typeof i)t.anims.play(i);else if("object"==typeof i){var n=t.anims,r=s(i,"key",void 0);if(r){var a=s(i,"startFrame",void 0),o=s(i,"delay",0),h=s(i,"repeat",0),l=s(i,"repeatDelay",0),u=s(i,"yoyo",!1),c=s(i,"play",!1),d=s(i,"delayedPlay",0),f={key:r,delay:o,repeat:h,repeatDelay:l,yoyo:u,startFrame:a};c?n.play(f):d>0?n.playAfterDelay(f,d):n.load(f)}}return t}},91713:(t,e,i)=>{var s=i(56694),n=i(71207),r=i(91963),a=i(56631),o=i(7599),h=i(17922),l=new s({Extends:n,initialize:function(t){n.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(o.BOOT,this.boot,this),this.events.on(o.START,this.start,this)},boot:function(){this.events.once(o.DESTROY,this.destroy,this)},addChildCallback:function(t){t.displayList&&t.displayList!==this&&t.removeFromDisplayList(),t.parentContainer&&t.parentContainer.remove(t),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(a.ADDED_TO_SCENE,t,this.scene),this.events.emit(o.ADDED_TO_SCENE,t,this.scene))},removeChildCallback:function(t){this.queueDepthSort(),t.displayList=null,t.emit(a.REMOVED_FROM_SCENE,t,this.scene),this.events.emit(o.REMOVED_FROM_SCENE,t,this.scene)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(h(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},shutdown:function(){for(var t=this.list;t.length;)t[0].destroy(!0);this.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});r.register("DisplayList",l,"displayList"),t.exports=l},89980:(t,e,i)=>{var s=i(56694),n=i(48129),r=i(81078),a=i(6659),o=i(56631),h=i(7599),l=new s({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(o.ADDED_TO_SCENE,this.addedToScene,this),this.on(o.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(t,e){return this.data||(this.data=new r(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new r(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new r(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new r(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return n(this)},willRender:function(t){return!(!(!this.displayList||!this.displayList.active||this.displayList.willRender(t))||l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(o.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t&&t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(o.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(o.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},99325:(t,e,i)=>{var s=i(56694),n=i(91963),r=i(7599),a=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});a.register=function(t,e){a.prototype.hasOwnProperty(t)||(a.prototype[t]=e)},a.remove=function(t){a.prototype.hasOwnProperty(t)&&delete a.prototype[t]},n.register("GameObjectCreator",a,"make"),t.exports=a},61286:(t,e,i)=>{var s=i(56694),n=i(91963),r=i(7599),a=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});a.register=function(t,e){a.prototype.hasOwnProperty(t)||(a.prototype[t]=e)},a.remove=function(t){a.prototype.hasOwnProperty(t)&&delete a.prototype[t]},n.register("GameObjectFactory",a,"add"),t.exports=a},73329:(t,e,i)=>{var s=i(69360),n=new s,r=new s,a=new s,o={camera:n,sprite:r,calc:a};t.exports=function(t,e,i){var s=n,h=r,l=a;return h.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),h.e=t.x,h.f=t.y):(h.e-=e.scrollX*t.scrollFactorX,h.f-=e.scrollY*t.scrollFactorY),s.multiply(h,l),o}},92034:(t,e,i)=>{var s=i(56694),n=i(74623),r=i(91963),a=i(7599),o=new s({Extends:n,initialize:function(t){n.call(this),this.checkQueue=!0,this.scene=t,this.systems=t.sys,t.sys.events.once(a.BOOT,this.boot,this),t.sys.events.on(a.START,this.start,this)},boot:function(){this.systems.events.once(a.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(a.PRE_UPDATE,this.update,this),t.on(a.UPDATE,this.sceneUpdate,this),t.once(a.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(t,e){for(var i=this._active,s=i.length,n=0;n{t.exports=function(t,e,i,s,n,r,a,o,h,l,u,c,d,f,p){var v=i.x-e.displayOriginX+n,g=i.y-e.displayOriginY+r,m=v+i.w,y=g+i.h,x=a.getXRound(v,g,o),T=a.getYRound(v,g,o),w=a.getXRound(v,y,o),E=a.getYRound(v,y,o),S=a.getXRound(m,y,o),b=a.getYRound(m,y,o),A=a.getXRound(m,g,o),_=a.getYRound(m,g,o);t.batchQuad(e,x,T,w,E,S,b,A,_,s.u0,s.v0,s.u1,s.v1,h,l,u,c,d,f,p)}},82173:t=>{t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),void 0===s)return s={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0};var n,r,a,o,h=t.text,l=h.length,u=t.maxWidth,c=t.wordWrapCharCode,d=Number.MAX_VALUE,f=Number.MAX_VALUE,p=0,v=0,g=t.fontData.chars,m=t.fontData.lineHeight,y=t.letterSpacing,x=t.lineSpacing,T=0,w=0,E=0,S=null,b=t._align,A=0,_=0,C=t.fontSize/t.fontData.size,R=C*t.scaleX,M=C*t.scaleY,P=null,O=0,L=[],F=Number.MAX_VALUE,D=0,k=0,I=0,B=[],N=[],Y=null;if(u>0){for(n=0;nu||H-z>u?(G.push(W.i-1),W.cr?(G.push(W.i+W.word.length),z=0,X=null):X=W):W.cr&&(G.push(W.i+W.word.length),z=0,X=null)}for(n=G.length-1;n>=0;n--)r=h,a=G[n],o="\n",h=r.substr(0,a)+o+r.substr(a+1);s.wrappedText=h,l=h.length,B=[],Y=null}var j=0;for(n=0;nA&&(d=A),f>_&&(f=_);var q=A+S.xAdvance,Z=_+m;pD&&(D=I),ID&&(D=I),I0)for(var Q=0;Q{var s=i(31476);t.exports=function(t,e,i,n,r,a,o){var h=t.sys.textures.get(i),l=h.get(n),u=t.sys.cache.xml.get(r);if(l&&u){var c=s(u,l,a,o,h);return t.sys.cache.bitmapFont.add(e,{data:c,texture:i,frame:n,fromAtlas:!0}),!0}return!1}},39860:(t,e,i)=>{var s=i(10850);t.exports=function(t,e){var i=e.width,n=e.height,r=Math.floor(i/2),a=Math.floor(n/2),o=s(e,"chars","");if(""!==o){var h=s(e,"image",""),l=t.sys.textures.getFrame(h),u=l.cutX,c=l.cutY,d=l.source.width,f=l.source.height,p=s(e,"offset.x",0),v=s(e,"offset.y",0),g=s(e,"spacing.x",0),m=s(e,"spacing.y",0),y=s(e,"lineSpacing",0),x=s(e,"charsPerRow",null);null===x&&(x=d/i)>o.length&&(x=o.length);for(var T=p,w=v,E={retroFont:!0,font:h,size:i,lineHeight:n+y,chars:{}},S=0,b=0;b{function e(t,e){return parseInt(t.getAttribute(e),10)}t.exports=function(t,i,s,n,r){void 0===s&&(s=0),void 0===n&&(n=0);var a=i.cutX,o=i.cutY,h=i.source.width,l=i.source.height,u=i.sourceIndex,c={},d=t.getElementsByTagName("info")[0],f=t.getElementsByTagName("common")[0];c.font=d.getAttribute("face"),c.size=e(d,"size"),c.lineHeight=e(f,"lineHeight")+n,c.chars={};var p=t.getElementsByTagName("char"),v=void 0!==i&&i.trimmed;if(v)var g=i.height,m=i.width;for(var y=0;y{var s=i(66863),n=i(98611),r={Parse:i(39860)};r=n(!1,r,s),t.exports=r},66863:t=>{t.exports={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},13468:(t,e,i)=>{var s=i(44616),n=i(56694),r=i(88899),a=new n({Extends:s,Mixins:[r],initialize:function(t,e,i,n,r,a,o){s.call(this,t,e,i,n,r,a,o),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}});t.exports=a},93438:(t,e,i)=>{var s=i(49584);t.exports=function(t,e,i,n){var r=e._text,a=r.length,o=t.currentContext;if(0!==a&&s(t,o,e,i,n)){i.addToRenderList(e);var h=e.fromAtlas?e.frame:e.texture.frames.__BASE,l=e.displayCallback,u=e.callbackData,c=e.fontData.chars,d=e.fontData.lineHeight,f=e._letterSpacing,p=0,v=0,g=0,m=null,y=0,x=0,T=0,w=0,E=0,S=0,b=null,A=0,_=e.frame.source.image,C=h.cutX,R=h.cutY,M=0,P=0,O=e._fontSize/e.fontData.size,L=e._align,F=0,D=0;e.getTextBounds(!1);var k=e._bounds.lines;1===L?D=(k.longest-k.lengths[0])/2:2===L&&(D=k.longest-k.lengths[0]),o.translate(-e.displayOriginX,-e.displayOriginY);var I=i.roundPixels;e.cropWidth>0&&e.cropHeight>0&&(o.beginPath(),o.rect(0,0,e.cropWidth,e.cropHeight),o.clip());for(var B=0;B{var s=i(13468),n=i(88933),r=i(99325),a=i(20494);r.register("dynamicBitmapText",(function(t,e){void 0===t&&(t={});var i=a(t,"font",""),r=a(t,"text",""),o=a(t,"size",!1),h=new s(this.scene,0,0,i,r,o);return void 0!==e&&(t.add=e),n(this.scene,h,t),h}))},94145:(t,e,i)=>{var s=i(13468);i(61286).register("dynamicBitmapText",(function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,n,r))}))},88899:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(16873),r=i(93438),t.exports={renderWebGL:n,renderCanvas:r}},16873:(t,e,i)=>{var s=i(73329),n=i(69360),r=i(75512),a=new n;t.exports=function(t,e,i,n){var o=e.text,h=o.length;if(0!==h){i.addToRenderList(e);var l=t.pipelines.set(e.pipeline,e),u=s(e,i,n),c=u.sprite,d=u.calc,f=a,p=e.cropWidth>0||e.cropHeight>0;p&&(l.flush(),t.pushScissor(d.tx,d.ty,e.cropWidth*d.scaleX,e.cropHeight*d.scaleY));var v,g,m=e.frame.glTexture,y=e.tintFill,x=r.getTintAppendFloatAlpha(e.tintTopLeft,i.alpha*e._alphaTL),T=r.getTintAppendFloatAlpha(e.tintTopRight,i.alpha*e._alphaTR),w=r.getTintAppendFloatAlpha(e.tintBottomLeft,i.alpha*e._alphaBL),E=r.getTintAppendFloatAlpha(e.tintBottomRight,i.alpha*e._alphaBR),S=l.setGameObject(e),b=0,A=0,_=0,C=0,R=e.letterSpacing,M=0,P=0,O=e.scrollX,L=e.scrollY,F=e.fontData,D=F.chars,k=F.lineHeight,I=e.fontSize/F.size,B=0,N=e._align,Y=0,U=0,X=e.getTextBounds(!1);e.maxWidth>0&&(h=(o=X.wrappedText).length);var z=e._bounds.lines;1===N?U=(z.longest-z.lengths[0])/2:2===N&&(U=z.longest-z.lengths[0]);var G=i.roundPixels,W=e.displayCallback,V=e.callbackData;t.pipelines.preBatch(e);for(var H=0;H{var s=i(56694),n=i(82897),r=i(64937),a=i(89980),o=i(82173),h=i(68298),l=i(31476),u=i(74118),c=i(84557),d=new s({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Texture,r.Tint,r.Transform,r.Visible,c],initialize:function(t,e,i,s,n,r,h){void 0===n&&(n=""),void 0===h&&(h=0),a.call(this,t,"BitmapText"),this.font=s;var l=this.scene.sys.cache.bitmapFont.get(s);l||console.warn("Invalid BitmapText key: "+s),this.fontData=l.data,this._text="",this._fontSize=r||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=h,this._bounds=o(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=l.fromAtlas,this.setTexture(l.texture,l.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.setText(n)},setLeftAlign:function(){return this._align=d.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=d.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=d.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(t){return this._fontSize=t,this._dirty=!0,this},setLetterSpacing:function(t){return void 0===t&&(t=0),this._letterSpacing=t,this._dirty=!0,this},setLineSpacing:function(t){return void 0===t&&(t=0),this.lineSpacing=t,this},setText:function(t){return t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t!==this.text&&(this._text=t.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=.5),this.dropShadowX=t,this.dropShadowY=e,this.dropShadowColor=i,this.dropShadowAlpha=s,this},setCharacterTint:function(t,e,i,s,r,a,o){void 0===t&&(t=0),void 0===e&&(e=1),void 0===i&&(i=!1),void 0===s&&(s=-1),void 0===r&&(r=s,a=s,o=s);var h=this.text.length;-1===e&&(e=h),t<0&&(t=h+t),t=n(t,0,h-1);for(var l=n(t+e,t,h),u=this.charColors,c=t;c{var s=i(49584);t.exports=function(t,e,i,n){var r=e._text,a=r.length,o=t.currentContext;if(0!==a&&s(t,o,e,i,n)){i.addToRenderList(e);var h=e.fromAtlas?e.frame:e.texture.frames.__BASE,l=e.fontData.chars,u=e.fontData.lineHeight,c=e._letterSpacing,d=e._lineSpacing,f=0,p=0,v=0,g=null,m=0,y=0,x=0,T=0,w=0,E=0,S=null,b=0,A=h.source.image,_=h.cutX,C=h.cutY,R=e._fontSize/e.fontData.size,M=e._align,P=0,O=0,L=e.getTextBounds(!1);e.maxWidth>0&&(a=(r=L.wrappedText).length);var F=e._bounds.lines;1===M?O=(F.longest-F.lengths[0])/2:2===M&&(O=F.longest-F.lengths[0]),o.translate(-e.displayOriginX,-e.displayOriginY);for(var D=i.roundPixels,k=0;k{var s=i(44616),n=i(88933),r=i(99325),a=i(20494),o=i(10850);r.register("bitmapText",(function(t,e){void 0===t&&(t={});var i=o(t,"font",""),r=a(t,"text",""),h=a(t,"size",!1),l=o(t,"align",0),u=new s(this.scene,0,0,i,r,h,l);return void 0!==e&&(t.add=e),n(this.scene,u,t),u}))},21797:(t,e,i)=>{var s=i(44616);i(61286).register("bitmapText",(function(t,e,i,n,r,a){return this.displayList.add(new s(this.scene,t,e,i,n,r,a))}))},84557:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(26372),r=i(97545),t.exports={renderWebGL:n,renderCanvas:r}},26372:(t,e,i)=>{var s=i(8810),n=i(73329),r=i(75512);t.exports=function(t,e,i,a){if(0!==e._text.length){i.addToRenderList(e);var o,h,l,u=t.pipelines.set(e.pipeline,e),c=n(e,i,a).calc,d=i.roundPixels,f=i.alpha,p=e.charColors,v=e.tintFill,g=r.getTintAppendFloatAlpha,m=g(e.tintTopLeft,f*e._alphaTL),y=g(e.tintTopRight,f*e._alphaTR),x=g(e.tintBottomLeft,f*e._alphaBL),T=g(e.tintBottomRight,f*e._alphaBR),w=e.frame.glTexture,E=u.setGameObject(e),S=e.getTextBounds(!1).characters,b=e.dropShadowX,A=e.dropShadowY,_=0!==b||0!==A;if(t.pipelines.preBatch(e),_){var C=e.dropShadowColor,R=e.dropShadowAlpha,M=g(C,f*R*e._alphaTL),P=g(C,f*R*e._alphaTR),O=g(C,f*R*e._alphaBL),L=g(C,f*R*e._alphaBR);for(o=0;o{var s=i(92246),n=i(41664),r=i(56694),a=i(64937),o=i(82047),h=i(89980),l=i(71207),u=new r({Extends:h,Mixins:[a.Alpha,a.BlendMode,a.Depth,a.Mask,a.Pipeline,a.ScrollFactor,a.Size,a.Texture,a.Transform,a.Visible,s],initialize:function(t,e,i,s,n){h.call(this,t,"Blitter"),this.setTexture(s,n),this.setPosition(e,i),this.initPipeline(),this.children=new l,this.renderList=[],this.dirty=!1},create:function(t,e,i,s,r){void 0===s&&(s=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof o||(i=this.texture.get(i));var a=new n(this,t,e,i,s);return this.children.addAt(a,r,!1),this.dirty=!0,a},createFromCallback:function(t,e,i,s){for(var n=this.createMultiple(e,i,s),r=0;r0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});t.exports=u},33177:t=>{t.exports=function(t,e,i,s){var n=e.getRenderList();if(0!==n.length){var r=t.currentContext,a=i.alpha*e.alpha;if(0!==a){i.addToRenderList(e),r.globalCompositeOperation=t.blendModes[e.blendMode],r.imageSmoothingEnabled=!e.frame.source.scaleMode;var o=e.x-i.scrollX*e.scrollFactorX,h=e.y-i.scrollY*e.scrollFactorY;r.save(),s&&s.copyToContext(r);for(var l=i.roundPixels,u=0;u0&&p.height>0&&(r.save(),r.translate(c.x+o,c.y+h),r.scale(m,y),r.drawImage(f.source.image,p.x,p.y,p.width,p.height,v,g,p.width,p.height),r.restore())):(l&&(v=Math.round(v),g=Math.round(g)),p.width>0&&p.height>0&&r.drawImage(f.source.image,p.x,p.y,p.width,p.height,v+c.x+o,g+c.y+h,p.width,p.height)))}r.restore()}}}},68452:(t,e,i)=>{var s=i(52816),n=i(88933),r=i(99325),a=i(20494);r.register("blitter",(function(t,e){void 0===t&&(t={});var i=a(t,"key",null),r=a(t,"frame",null),o=new s(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),n(this.scene,o,t),o}))},38906:(t,e,i)=>{var s=i(52816);i(61286).register("blitter",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},92246:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(89165),r=i(33177),t.exports={renderWebGL:n,renderCanvas:r}},89165:(t,e,i)=>{var s=i(69360),n=i(75512),r=new s;t.exports=function(t,e,i,s){var a=e.getRenderList(),o=i.alpha*e.alpha;if(0!==a.length&&0!==o){i.addToRenderList(e);var h=t.pipelines.set(this.pipeline,e),l=i.scrollX*e.scrollFactorX,u=i.scrollY*e.scrollFactorY,c=r.copyFrom(i.matrix);s&&(c.multiplyWithOffset(s,-l,-u),l=0,u=0);var d=e.x-l,f=e.y-u,p=-1,v=i.roundPixels;t.pipelines.preBatch(e);for(var g=0;g{var s=i(56694),n=i(82047),r=new s({initialize:function(t,e,i,s,n){this.parent=t,this.x=e,this.y=i,this.frame=s,this.data={},this.tint=16777215,this._visible=n,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(t){return void 0===t?this.frame=this.parent.frame:t instanceof n&&t.texture===this.parent.texture?this.frame=t:this.frame=this.parent.texture.get(t),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(t,e,i){return this.x=t,this.y=e,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,i&&this.setFrame(i),this},setPosition:function(t,e){return this.x=t,this.y=e,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},setVisible:function(t){return this.visible=t,this},setAlpha:function(t){return this.alpha=t,this},setTint:function(t){return this.tint=t,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(t){this.parent.dirty|=this._visible!==t,this._visible=t}},alpha:{get:function(){return this._alpha},set:function(t){this.parent.dirty|=this._alpha>0!=t>0,this._alpha=t}}});t.exports=r},97123:(t,e,i)=>{var s=i(82897),n={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,n){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=s(t,0,1),this._alphaTR=s(e,0,1),this._alphaBL=s(i,0,1),this._alphaBR=s(n,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=s(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=s(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=s(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=s(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=n},15720:(t,e,i)=>{var s=i(82897),n={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=n},69732:(t,e,i)=>{var s=i(95723),n={_blendMode:s.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=s[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=n},28284:t=>{t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},85293:t=>{var e={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var n=t;this.frame.setCropUVs(this._crop,n.x,n.y,n.width,n.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=e},14975:t=>{var e={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=e},88677:t=>{var e={fxPadding:0,setFXPadding:function(t){return void 0===t&&(t=0),this.fxPadding=t,this},onFXCopy:function(){},onFX:function(){}};t.exports=e},92972:t=>{t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},80693:(t,e,i)=>{var s=i(74118),n=i(2386),r=i(93736),a={prepareBoundsOutput:function(t,e){(void 0===e&&(e=!1),0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,n,r,a,o,h,l;if(void 0===t&&(t=new s),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),u.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),n=t.x,r=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),a=t.x,o=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),n=t.x,r=t.y,this.getBottomLeft(t),a=t.x,o=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,n,a,h),t.y=Math.min(i,r,o,l),t.width=Math.max(e,n,a,h)-t.x,t.height=Math.max(i,r,o,l)-t.y,t}};t.exports=a},39171:(t,e,i)=>{var s=i(76756),n=i(63037),r={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t,e,i,n,r){return void 0===t&&(this.texture||this.shader||this.geom)&&(t=this),new s(this.scene,t,e,i,n,r)},createGeometryMask:function(t){return void 0!==t||"Graphics"!==this.type&&!this.geom||(t=this),new n(this.scene,t)}};t.exports=r},28072:t=>{var e={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=e},54211:(t,e,i)=>{var s=i(75606),n=i(63130),r=i(10850),a=i(55303),o=i(93736),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:a.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=r(t,"from",0),t.to=r(t,"to",1);var h=n(t,"positionOnPath",!1);this.rotateToPath=n(t,"rotateToPath",!1),this.pathRotationOffset=r(t,"rotationOffset",0);var l=r(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.setTargetValue()}),this.pathOffset||(this.pathOffset=new o(this.x,this.y)),this.pathVector||(this.pathVector=new o),this.pathDelta||(this.pathDelta=new o),this.pathDelta.reset(),t.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=a.PLAYING_FORWARD,this.rotateToPath){var u=this.path.getPoint(.1);this.rotation=Math.atan2(u.y-this.y,u.x-this.x)+s(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t){var e=t.data[0],i=this.pathDelta,n=this.pathVector;if(i.copy(n).negate(),e.state===a.COMPLETE)return this.path.getPoint(e.end,n),i.add(n),n.add(this.pathOffset),void this.setPosition(n.x,n.y);if(e.state!==a.PLAYING_FORWARD&&e.state!==a.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),n),i.add(n),n.add(this.pathOffset);var r=this.x,o=this.y;this.setPosition(n.x,n.y);var h=this.x-r,l=this.y-o;if(0===h&&0===l)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(l,h)+s(this.pathRotationOffset))}}};t.exports=h},58210:(t,e,i)=>{var s=i(28699),n=i(72677),r={defaultPipeline:null,pipeline:null,hasPostPipeline:!1,postPipelines:null,pipelineData:null,initPipeline:function(t){var e=this.scene.sys.renderer;if(!e)return!1;var i=e.pipelines;if(this.postPipelines=[],this.pipelineData={},i){void 0===t&&(t=i.default);var s=i.get(t);if(s)return this.defaultPipeline=s,this.pipeline=s,!0}return!1},setPipeline:function(t,e,i){var n=this.scene.sys.renderer;if(!n)return this;var r=n.pipelines;if(r){var a=r.get(t);a&&(this.pipeline=a),e&&(this.pipelineData=i?s(e):e)}return this},setPostPipeline:function(t,e,i){var n=this.scene.sys.renderer;if(!n)return this;var r=n.pipelines;if(r){Array.isArray(t)||(t=[t]);for(var a=0;a0,this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e="string"==typeof t,i=this.postPipelines,s=[],n=0;n=0;i--){var s=e[i];("string"==typeof t&&s.name===t||"string"!=typeof t&&s instanceof t)&&(s.destroy(),n(e,i))}return this.hasPostPipeline=this.postPipelines.length>0,this},getPipelineName:function(){return this.pipeline.name}};t.exports=r},45900:t=>{var e={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=e},31654:t=>{var e={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=this.width,e.hitArea.height=this.height),this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=e},82081:(t,e,i)=>{var s=i(82047),n={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=n},21850:(t,e,i)=>{var s=i(82047),n={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var n=t;this.frame.setCropUVs(this._crop,n.x,n.y,n.width,n.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=n},58072:t=>{var e={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,i=t,s=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=s,this.tintFill=!1,this},setTintFill:function(t,e,i,s){return this.setTint(t,e,i,s),this.tintFill=!0,this},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};t.exports=e},48129:t=>{t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},56584:(t,e,i)=>{var s=i(83392),n=i(69360),r=i(64462),a=i(35786),o=i(62138),h=i(93736),l={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return o(this._rotation*s.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*s.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=a(t)}},setPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=0),this.x=t,this.y=e,this.z=i,this.w=s,this},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===s&&(s=this.scene.sys.scale.height),this.x=t+Math.random()*i,this.y=e+Math.random()*s,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new n),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new n),void 0===e&&(e=new n);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);i;)e.applyITRS(i.x,i.y,i._rotation,i._scaleX,i._scaleY),e.multiply(t,t),i=i.parentContainer;return t},getLocalPoint:function(t,e,i,s){i||(i=new h),s||(s=this.scene.sys.cameras.main);var n=s.scrollX,a=s.scrollY,o=t+n*this.scrollFactorX-n,l=e+a*this.scrollFactorY-a;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(o,l,i):r(o,l,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=l},69360:(t,e,i)=>{var s=i(56694),n=i(83392),r=i(93736),a=new s({initialize:function(t,e,i,s,n,r){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=1),void 0===n&&(n=0),void 0===r&&(r=0),this.matrix=new Float32Array([t,e,i,s,n,r,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],r=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):s||r?n.TAU-(r>0?Math.acos(-s/this.scaleY):-Math.acos(s/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),s=this.matrix,n=s[0],r=s[1],a=s[2],o=s[3];return s[0]=n*i+a*e,s[1]=r*i+o*e,s[2]=n*-e+a*i,s[3]=r*-e+o*i,this},multiply:function(t,e){var i=this.matrix,s=t.matrix,n=i[0],r=i[1],a=i[2],o=i[3],h=i[4],l=i[5],u=s[0],c=s[1],d=s[2],f=s[3],p=s[4],v=s[5],g=void 0===e?i:e.matrix;return g[0]=u*n+c*a,g[1]=u*r+c*o,g[2]=d*n+f*a,g[3]=d*r+f*o,g[4]=p*n+v*a+h,g[5]=p*r+v*o+l,g},multiplyWithOffset:function(t,e,i){var s=this.matrix,n=t.matrix,r=s[0],a=s[1],o=s[2],h=s[3],l=e*r+i*o+s[4],u=e*a+i*h+s[5],c=n[0],d=n[1],f=n[2],p=n[3],v=n[4],g=n[5];return s[0]=c*r+d*o,s[1]=c*a+d*h,s[2]=f*r+p*o,s[3]=f*a+p*h,s[4]=v*r+g*o+l,s[5]=v*a+g*h+u,this},transform:function(t,e,i,s,n,r){var a=this.matrix,o=a[0],h=a[1],l=a[2],u=a[3],c=a[4],d=a[5];return a[0]=t*o+e*l,a[1]=t*h+e*u,a[2]=i*o+s*l,a[3]=i*h+s*u,a[4]=n*o+r*l+c,a[5]=n*h+r*u+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var s=this.matrix,n=s[0],r=s[1],a=s[2],o=s[3],h=s[4],l=s[5];return i.x=t*n+e*a+h,i.y=t*r+e*o+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],o=e*n-i*s;return t[0]=n/o,t[1]=-i/o,t[2]=-s/o,t[3]=e/o,t[4]=(s*a-n*r)/o,t[5]=-(e*a-i*r)/o,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,s,n,r){var a=this.matrix;return a[0]=t,a[1]=e,a[2]=i,a[3]=s,a[4]=n,a[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],s=e[1],n=e[2],r=e[3],a=i*r-s*n;if(t.translateX=e[4],t.translateY=e[5],i||s){var o=Math.sqrt(i*i+s*s);t.rotation=s>0?Math.acos(i/o):-Math.acos(i/o),t.scaleX=o,t.scaleY=a/o}else if(n||r){var h=Math.sqrt(n*n+r*r);t.rotation=.5*Math.PI-(r>0?Math.acos(-n/h):-Math.acos(n/h)),t.scaleX=a/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,s,n){var r=this.matrix,a=Math.sin(i),o=Math.cos(i);return r[4]=t,r[5]=e,r[0]=o*s,r[1]=a*s,r[2]=-a*n,r[3]=o*n,this},applyInverse:function(t,e,i){void 0===i&&(i=new r);var s=this.matrix,n=s[0],a=s[1],o=s[2],h=s[3],l=s[4],u=s[5],c=1/(n*h+o*-a);return i.x=h*c*t+-o*c*e+(u*o-l*h)*c,i.y=n*c*e+-a*c*t+(-u*n+l*a)*c,i},setQuad:function(t,e,i,s,n,r){void 0===r&&(r=this.quad);var a=this.matrix,o=a[0],h=a[1],l=a[2],u=a[3],c=a[4],d=a[5];return r[0]=t*o+e*l+c,r[1]=t*h+e*u+d,r[2]=t*o+s*l+c,r[3]=t*h+s*u+d,r[4]=i*o+s*l+c,r[5]=i*h+s*u+d,r[6]=i*o+e*l+c,r[7]=i*h+e*u+d,n&&r.forEach((function(t,e){r[e]=Math.round(t)})),r},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var s=this.getX(t,e);return i&&(s=Math.round(s)),s},getYRound:function(t,e,i){var s=this.getY(t,e);return i&&(s=Math.round(s)),s},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});t.exports=a},59694:t=>{var e={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=e},64937:(t,e,i)=>{t.exports={Alpha:i(97123),AlphaSingle:i(15720),BlendMode:i(69732),ComputedSize:i(28284),Crop:i(85293),Depth:i(14975),Flip:i(92972),FX:i(88677),GetBounds:i(80693),Mask:i(39171),Origin:i(28072),PathFollower:i(54211),Pipeline:i(58210),ScrollFactor:i(45900),Size:i(31654),Texture:i(82081),TextureCrop:i(21850),Tint:i(58072),ToJSON:i(48129),Transform:i(56584),TransformMatrix:i(69360),Visible:i(59694)}},70339:(t,e,i)=>{var s=i(59959),n=i(95723),r=i(56694),a=i(64937),o=i(56631),h=i(89980),l=i(74118),u=i(98524),c=i(58795),d=i(93736),f=new r({Extends:h,Mixins:[a.AlphaSingle,a.BlendMode,a.ComputedSize,a.Depth,a.Mask,a.Pipeline,a.Transform,a.Visible,u],initialize:function(t,e,i,s){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new a.TransformMatrix,this.tempTransformMatrix=new a.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPipeline(),this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(n.SKIP_CHECK),s&&this.add(s)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,s=new l,n=!1;t.setEmpty();for(var r=0;r-1},setAll:function(t,e,i,n){return s.SetAll(this.list,t,e,i,n),this},each:function(t,e){var i,s=[null],n=this.list.slice(),r=n.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=f},13916:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var n=e.list;if(0!==n.length){var r=e.localTransform;s?(r.loadIdentity(),r.multiply(s),r.translate(e.x,e.y),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY)):r.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);var o=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var u=0;u{var s=i(88933),n=i(70339),r=i(99325),a=i(20494);r.register("container",(function(t,e){void 0===t&&(t={});var i=a(t,"x",0),r=a(t,"y",0),o=a(t,"children",null),h=new n(this.scene,i,r,o);return void 0!==e&&(t.add=e),s(this.scene,h,t),h}))},23400:(t,e,i)=>{var s=i(70339);i(61286).register("container",(function(t,e,i){return this.displayList.add(new s(this.scene,t,e,i))}))},98524:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(36934),r=i(13916),t.exports={renderWebGL:n,renderCanvas:r}},36934:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var n=e.list,r=n.length;if(0!==r){var a=e.localTransform;s?(a.loadIdentity(),a.multiply(s),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY)):a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.pipelines.preBatch(e);var o=-1!==e.blendMode;o||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=0;c{t.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},38943:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(11603),a=i(89980),o=i(42911),h=i(55638),l=i(7599),u=i(51729),c=new s({Extends:a,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Origin,n.ScrollFactor,n.Transform,n.Visible,r],initialize:function(t,e,i,s,n,r){a.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new u,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),"string"==typeof s?"#"===s[0]?this.setElement(s.substr(1),n,r):this.createElement(s,n,r):s&&this.setElement(s,n,r),t.sys.events.on(l.SLEEP,this.handleSceneEvent,this),t.sys.events.on(l.WAKE,this.handleSceneEvent,this),t.sys.events.on(l.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(t){var e=this.node,i=e.style;e&&(i.display=t.settings.visible?"block":"none")},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e{var s=i(2452),n=i(89980),r=i(69360),a=new r,o=new r,h=new r;t.exports=function(t,e,i,r){if(e.node){var l=e.node.style,u=e.scene.sys.settings;if(!l||!u.visible||n.RENDER_MASK!==e.renderFlags||0!==e.cameraFilter&&e.cameraFilter&i.id||e.parentContainer&&!e.parentContainer.willRender())l.display="none";else{var c=e.parentContainer,d=i.alpha*e.alpha;c&&(d*=c.alpha);var f=a,p=o,v=h,g=0,m=0,y="0%",x="0%";r?(g=e.width*e.scaleX*e.originX,m=e.height*e.scaleY*e.originY,p.applyITRS(e.x-g,e.y-m,e.rotation,e.scaleX,e.scaleY),f.copyFrom(i.matrix),f.multiplyWithOffset(r,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),p.e=e.x-g,p.f=e.y-m,f.multiply(p,v)):(g=e.width*e.originX,m=e.height*e.originY,p.applyITRS(e.x-g,e.y-m,e.rotation,e.scaleX,e.scaleY),f.copyFrom(i.matrix),y=100*e.originX+"%",x=100*e.originY+"%",p.e-=i.scrollX*e.scrollFactorX,p.f-=i.scrollY*e.scrollFactorY,f.multiply(p,v)),e.transformOnly||(l.display="block",l.opacity=d,l.zIndex=e._depth,l.pointerEvents=e.pointerEvents,l.mixBlendMode=s[e._blendMode]),l.transform=v.getCSSMatrix()+" skew("+e.skewX+"rad, "+e.skewY+"rad) rotate3d("+e.rotate3d.x+","+e.rotate3d.y+","+e.rotate3d.z+","+e.rotate3d.w+e.rotate3dAngle+")",l.transformOrigin=y+" "+x}}}},66788:(t,e,i)=>{var s=i(38943);i(61286).register("dom",(function(t,e,i,n,r){var a=new s(this.scene,t,e,i,n,r);return this.displayList.add(a),a}))},11603:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(66070),r=i(66070),t.exports={renderWebGL:n,renderCanvas:r}},65492:t=>{t.exports="addedtoscene"},98398:t=>{t.exports="destroy"},40239:t=>{t.exports="removedfromscene"},17286:t=>{t.exports="complete"},31496:t=>{t.exports="created"},89587:t=>{t.exports="error"},96342:t=>{t.exports="loop"},49614:t=>{t.exports="play"},24418:t=>{t.exports="seeked"},87318:t=>{t.exports="seeking"},61922:t=>{t.exports="stop"},13991:t=>{t.exports="timeout"},4052:t=>{t.exports="unlocked"},56631:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(65492),DESTROY:i(98398),REMOVED_FROM_SCENE:i(40239),VIDEO_COMPLETE:i(17286),VIDEO_CREATED:i(31496),VIDEO_ERROR:i(89587),VIDEO_LOOP:i(96342),VIDEO_PLAY:i(49614),VIDEO_SEEKED:i(24418),VIDEO_SEEKING:i(87318),VIDEO_STOP:i(61922),VIDEO_TIMEOUT:i(13991),VIDEO_UNLOCKED:i(4052)}},39419:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),a=i(79394),o=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.Origin,n.ScrollFactor,n.Size,n.Texture,n.Tint,n.Transform,n.Visible,a],initialize:function(t){r.call(this,t,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});t.exports=o},96699:()=>{},41155:(t,e,i)=>{var s=i(39419);i(61286).register("extern",(function(){var t=new s(this.scene);return this.displayList.add(t),t}))},79394:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(81410),r=i(96699),t.exports={renderWebGL:n,renderCanvas:r}},81410:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){t.pipelines.clear();var r=s(e,i,n).calc;e.render.call(e,t,i,r),t.pipelines.rebind()}},36266:t=>{t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},33182:(t,e,i)=>{var s=i(51052),n=i(56694),r=i(36266),a=i(15720),o=i(69732),h=i(14975),l=i(39171),u=i(58210),c=i(45900),d=i(56584),f=i(59694),p=i(95669),v=i(89980),g=i(72632),m=i(10850),y=i(83392),x=i(60898),T=new n({Extends:v,Mixins:[a,o,h,l,u,d,f,c,x],initialize:function(t,e){var i=m(e,"x",0),s=m(e,"y",0);v.call(this,t,"Graphics"),this.setPosition(i,s),this.initPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return m(t,"lineStyle",null)&&(this.defaultStrokeWidth=m(t,"lineStyle.width",1),this.defaultStrokeColor=m(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=m(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),m(t,"fillStyle",null)&&(this.defaultFillColor=m(t,"fillStyle.color",16777215),this.defaultFillAlpha=m(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},fillGradientStyle:function(t,e,i,s,n,a,o,h){return void 0===n&&(n=1),void 0===a&&(a=n),void 0===o&&(o=n),void 0===h&&(h=n),this.commandBuffer.push(r.GRADIENT_FILL_STYLE,n,a,o,h,t,e,i,s),this},lineGradientStyle:function(t,e,i,s,n,a){return void 0===a&&(a=1),this.commandBuffer.push(r.GRADIENT_LINE_STYLE,t,a,e,i,s,n),this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},fill:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,y.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,y.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,s){return this.commandBuffer.push(r.FILL_RECT,t,e,i,s),this},strokeRect:function(t,e,i,s){var n=this._lineWidth/2,r=t-n,a=t+n;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+s),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+s),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(a+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+s),this.lineTo(a+i,e+s),this.strokePath(),this},fillRoundedRect:function(t,e,i,s,n){void 0===n&&(n=20);var r=n,a=n,o=n,h=n;"number"!=typeof n&&(r=g(n,"tl",20),a=g(n,"tr",20),o=g(n,"bl",20),h=g(n,"br",20));var l=r>=0,u=a>=0,c=o>=0,d=h>=0;return r=Math.abs(r),a=Math.abs(a),o=Math.abs(o),h=Math.abs(h),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-a,e),u?this.arc(t+i-a,e+a,a,-y.TAU,0):this.arc(t+i,e,a,Math.PI,y.TAU,!0),this.lineTo(t+i,e+s-h),d?this.arc(t+i-h,e+s-h,h,0,y.TAU):this.arc(t+i,e+s,h,-y.TAU,Math.PI,!0),this.lineTo(t+o,e+s),c?this.arc(t+o,e+s-o,o,y.TAU,Math.PI):this.arc(t,e+s,o,0,-y.TAU,!0),this.lineTo(t,e+r),l?this.arc(t+r,e+r,r,-Math.PI,-y.TAU):this.arc(t,e,r,y.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(t,e,i,s,n){void 0===n&&(n=20);var r=n,a=n,o=n,h=n,l=Math.min(i,s)/2;"number"!=typeof n&&(r=g(n,"tl",20),a=g(n,"tr",20),o=g(n,"bl",20),h=g(n,"br",20));var u=r>=0,c=a>=0,d=o>=0,f=h>=0;return r=Math.min(Math.abs(r),l),a=Math.min(Math.abs(a),l),o=Math.min(Math.abs(o),l),h=Math.min(Math.abs(h),l),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-a,e),this.moveTo(t+i-a,e),c?this.arc(t+i-a,e+a,a,-y.TAU,0):this.arc(t+i,e,a,Math.PI,y.TAU,!0),this.lineTo(t+i,e+s-h),this.moveTo(t+i,e+s-h),f?this.arc(t+i-h,e+s-h,h,0,y.TAU):this.arc(t+i,e+s,h,-y.TAU,Math.PI,!0),this.lineTo(t+o,e+s),this.moveTo(t+o,e+s),d?this.arc(t+o,e+s-o,o,y.TAU,Math.PI):this.arc(t,e+s,o,0,-y.TAU,!0),this.lineTo(t,e+r),this.moveTo(t,e+r),u?this.arc(t+r,e+r,r,-Math.PI,-y.TAU):this.arc(t,e,r,y.TAU,0,!0),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,s,n,a){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,s,n,a),this},strokeTriangle:function(t,e,i,s,n,a){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,s,n,a),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,s){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,s),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},strokePoints:function(t,e,i,s){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===s&&(s=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var n=1;n-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var s,n,r=this.scene.sys,a=r.game.renderer;if(void 0===e&&(e=r.scale.width),void 0===i&&(i=r.scale.height),T.TargetCamera.setScene(this.scene),T.TargetCamera.setViewport(0,0,e,i),T.TargetCamera.scrollX=this.x,T.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var o=(s=r.textures.get(t)).getSourceImage();o instanceof HTMLCanvasElement&&(n=o.getContext("2d"))}else n=(s=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(n=t.getContext("2d"));return n&&(this.renderCanvas(a,this,T.TargetCamera,null,n,!1),s&&s.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});T.TargetCamera=new s,t.exports=T},91543:(t,e,i)=>{var s=i(36266),n=i(49584);t.exports=function(t,e,i,r,a,o){var h=e.commandBuffer,l=h.length,u=a||t.currentContext;if(0!==l&&n(t,u,e,i,r)){i.addToRenderList(e);var c=1,d=1,f=0,p=0,v=1,g=0,m=0,y=0;u.beginPath();for(var x=0;x>>16,m=(65280&f)>>>8,y=255&f,u.strokeStyle="rgba("+g+","+m+","+y+","+c+")",u.lineWidth=v,x+=3;break;case s.FILL_STYLE:p=h[x+1],d=h[x+2],g=(16711680&p)>>>16,m=(65280&p)>>>8,y=255&p,u.fillStyle="rgba("+g+","+m+","+y+","+d+")",x+=2;break;case s.BEGIN_PATH:u.beginPath();break;case s.CLOSE_PATH:u.closePath();break;case s.FILL_PATH:o||u.fill();break;case s.STROKE_PATH:o||u.stroke();break;case s.FILL_RECT:o?u.rect(h[x+1],h[x+2],h[x+3],h[x+4]):u.fillRect(h[x+1],h[x+2],h[x+3],h[x+4]),x+=4;break;case s.FILL_TRIANGLE:u.beginPath(),u.moveTo(h[x+1],h[x+2]),u.lineTo(h[x+3],h[x+4]),u.lineTo(h[x+5],h[x+6]),u.closePath(),o||u.fill(),x+=6;break;case s.STROKE_TRIANGLE:u.beginPath(),u.moveTo(h[x+1],h[x+2]),u.lineTo(h[x+3],h[x+4]),u.lineTo(h[x+5],h[x+6]),u.closePath(),o||u.stroke(),x+=6;break;case s.LINE_TO:u.lineTo(h[x+1],h[x+2]),x+=2;break;case s.MOVE_TO:u.moveTo(h[x+1],h[x+2]),x+=2;break;case s.LINE_FX_TO:u.lineTo(h[x+1],h[x+2]),x+=5;break;case s.MOVE_FX_TO:u.moveTo(h[x+1],h[x+2]),x+=5;break;case s.SAVE:u.save();break;case s.RESTORE:u.restore();break;case s.TRANSLATE:u.translate(h[x+1],h[x+2]),x+=2;break;case s.SCALE:u.scale(h[x+1],h[x+2]),x+=2;break;case s.ROTATE:u.rotate(h[x+1]),x+=1;break;case s.GRADIENT_FILL_STYLE:x+=5;break;case s.GRADIENT_LINE_STYLE:x+=6}}u.restore()}}},41286:(t,e,i)=>{var s=i(99325),n=i(33182);s.register("graphics",(function(t,e){void 0===t&&(t={}),void 0!==e&&(t.add=e);var i=new n(this.scene,t);return t.add&&this.scene.sys.displayList.add(i),i}))},13122:(t,e,i)=>{var s=i(33182);i(61286).register("graphics",(function(t){return this.displayList.add(new s(this.scene,t))}))},60898:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(34429),r=i(91543),r=i(91543),t.exports={renderWebGL:n,renderCanvas:r}},34429:(t,e,i)=>{var s=i(36266),n=i(73329),r=i(69360),a=i(75512),o=function(t,e,i){this.x=t,this.y=e,this.width=i},h=function(t,e,i){this.points=[],this.pointsLength=1,this.points[0]=new o(t,e,i)},l=[],u=new r;t.exports=function(t,e,i,r){if(0!==e.commandBuffer.length){i.addToRenderList(e);var c=t.pipelines.set(e.pipeline,e);t.pipelines.preBatch(e);for(var d=n(e,i,r).calc,f=u.loadIdentity(),p=e.commandBuffer,v=i.alpha*e.alpha,g=1,m=c.fillTint,y=c.strokeTint,x=0,T=0,w=0,E=2*Math.PI,S=[],b=0,A=!0,_=null,C=a.getTintAppendFloatAlpha,R=0;R0&&(X=X%E-E):X>E?X=E:X<0&&(X=E+X%E),null===_&&(_=new h(B+Math.cos(U)*Y,N+Math.sin(U)*Y,g),S.push(_),I+=.01);I<1+G;)w=X*I+U,x=B+Math.cos(w)*Y,T=N+Math.sin(w)*Y,_.points.push(new o(x,T,g)),I+=.01;w=X+U,x=B+Math.cos(w)*Y,T=N+Math.sin(w)*Y,_.points.push(new o(x,T,g));break;case s.FILL_RECT:c.batchFillRect(p[++R],p[++R],p[++R],p[++R],f,d);break;case s.FILL_TRIANGLE:c.batchFillTriangle(p[++R],p[++R],p[++R],p[++R],p[++R],p[++R],f,d);break;case s.STROKE_TRIANGLE:c.batchStrokeTriangle(p[++R],p[++R],p[++R],p[++R],p[++R],p[++R],g,f,d);break;case s.LINE_TO:null!==_?_.points.push(new o(p[++R],p[++R],g)):(_=new h(p[++R],p[++R],g),S.push(_));break;case s.MOVE_TO:_=new h(p[++R],p[++R],g),S.push(_);break;case s.SAVE:l.push(f.copyToArray());break;case s.RESTORE:f.copyFromArray(l.pop());break;case s.TRANSLATE:B=p[++R],N=p[++R],f.translate(B,N);break;case s.SCALE:B=p[++R],N=p[++R],f.scale(B,N);break;case s.ROTATE:f.rotate(p[++R])}t.pipelines.postBatch(e)}}},59192:(t,e,i)=>{var s=i(83979),n=i(56694),r=i(56631),a=i(6659),o=i(71608),h=i(72632),l=i(10850),u=i(19256),c=i(42911),d=i(75757),f=i(58403),p=i(13747),v=new n({Extends:a,initialize:function(t,e,i){a.call(this),i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?c(e[0])&&(i=e,e=null):c(e)&&(i=e,e=null),this.scene=t,this.children=new f,this.isParent=!0,this.type="Group",this.classType=h(i,"classType",p),this.name=h(i,"name",""),this.active=h(i,"active",!0),this.maxSize=h(i,"maxSize",-1),this.defaultKey=h(i,"defaultKey",null),this.defaultFrame=h(i,"defaultFrame",null),this.runChildUpdate=h(i,"runChildUpdate",!1),this.createCallback=h(i,"createCallback",null),this.removeCallback=h(i,"removeCallback",null),this.createMultipleCallback=h(i,"createMultipleCallback",null),this.internalCreateCallback=h(i,"internalCreateCallback",null),this.internalRemoveCallback=h(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i),this.on(r.ADDED_TO_SCENE,this.addedToScene,this),this.on(r.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(t,e,i,s,n,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===s&&(s=this.defaultFrame),void 0===n&&(n=!0),void 0===r&&(r=!0),this.isFull())return null;var a=new this.classType(this.scene,t,e,i,s);return a.addToDisplayList(this.scene.sys.displayList),a.addToUpdateList(),a.visible=n,a.setActive(r),this.add(a),a},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof n&&(l.x=n),"number"==typeof r&&(l.y=r),l):s?this.create(n,r,a,o,h):null},get:function(t,e,i,s,n){return this.getFirst(!1,!0,t,e,i,s,n)},getFirstAlive:function(t,e,i,s,n,r){return this.getFirst(!0,t,e,i,s,n,r)},getFirstDead:function(t,e,i,s,n,r){return this.getFirst(!1,t,e,i,s,n,r)},playAnimation:function(t,e){return s.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i{var s=i(99325),n=i(59192);s.register("group",(function(t){return new n(this.scene,null,t)}))},62598:(t,e,i)=>{var s=i(59192);i(61286).register("group",(function(t,e){return this.updateList.add(new s(this.scene,t,e))}))},1539:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),a=i(57322),o=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.FX,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.ScrollFactor,n.Size,n.TextureCrop,n.Tint,n.Transform,n.Visible,a],initialize:function(t,e,i,s,n){r.call(this,t,"Image"),this._crop=this.resetCropObject(),this.setTexture(s,n),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()}});t.exports=o},57786:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},83556:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),a=i(1539);n.register("image",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),o=new a(this.scene,0,0,i,n);return void 0!==e&&(t.add=e),s(this.scene,o,t),o}))},20927:(t,e,i)=>{var s=i(1539);i(61286).register("image",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},57322:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(59390),r=i(57786),t.exports={renderWebGL:n,renderCanvas:r}},59390:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),this.pipeline.batchSprite(e,i,s)}},48013:(t,e,i)=>{var s={Events:i(56631),DisplayList:i(91713),GameObjectCreator:i(99325),GameObjectFactory:i(61286),UpdateList:i(92034),Components:i(64937),GetCalcMatrix:i(73329),BuildGameObject:i(88933),BuildGameObjectAnimation:i(32291),GameObject:i(89980),BitmapText:i(44616),Blitter:i(52816),Bob:i(41664),Container:i(70339),DOMElement:i(38943),DynamicBitmapText:i(13468),Extern:i(39419),Graphics:i(33182),Group:i(59192),Image:i(1539),Layer:i(85305),Particles:i(27684),PathFollower:i(29598),RenderTexture:i(15996),RetroFont:i(55873),Rope:i(79968),Sprite:i(13747),Text:i(76555),GetTextSize:i(32979),MeasureText:i(27030),TextStyle:i(74744),TileSprite:i(35856),Zone:i(71030),Video:i(8630),Shape:i(91461),Arc:i(28593),Curve:i(15220),Ellipse:i(28591),Grid:i(39169),IsoBox:i(4415),IsoTriangle:i(65159),Line:i(579),Polygon:i(91249),Rectangle:i(517),Star:i(77843),Triangle:i(21873),Factories:{Blitter:i(38906),Container:i(23400),DOMElement:i(66788),DynamicBitmapText:i(94145),Extern:i(41155),Graphics:i(13122),Group:i(62598),Image:i(20927),Layer:i(17676),Particles:i(81212),PathFollower:i(19626),RenderTexture:i(29599),Rope:i(31982),Sprite:i(66135),StaticBitmapText:i(21797),Text:i(94627),TileSprite:i(20509),Zone:i(34546),Video:i(215),Arc:i(10369),Curve:i(10147),Ellipse:i(99869),Grid:i(9326),IsoBox:i(88154),IsoTriangle:i(67765),Line:i(85665),Polygon:i(88203),Rectangle:i(94355),Star:i(23962),Triangle:i(79296)},Creators:{Blitter:i(68452),Container:i(44516),DynamicBitmapText:i(67513),Graphics:i(41286),Group:i(61295),Image:i(83556),Layer:i(56378),Particles:i(765),RenderTexture:i(85692),Rope:i(96027),Sprite:i(89219),StaticBitmapText:i(95499),Text:i(75397),TileSprite:i(63950),Zone:i(24067),Video:i(65601)}};s.Shader=i(27902),s.Mesh=i(83321),s.NineSlice=i(44139),s.PointLight=i(13171),s.Factories.Shader=i(51979),s.Factories.Mesh=i(8767),s.Factories.NineSlice=i(53778),s.Factories.PointLight=i(91201),s.Creators.Shader=i(13908),s.Creators.Mesh=i(41839),s.Creators.NineSlice=i(40964),s.Creators.PointLight=i(162),s.Light=i(14455),s.LightsManager=i(26193),s.LightsPlugin=i(50296),t.exports=s},85305:(t,e,i)=>{var s=i(95723),n=i(56694),r=i(64937),a=i(48129),o=i(81078),h=i(6659),l=i(56631),u=i(71207),c=i(58010),d=i(7599),f=i(17922),p=new n({Extends:u,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.Visible,h,c],initialize:function(t,e){u.call(this,t),h.call(this),this.scene=t,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=t.sys,this.events=t.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPipeline(),this.clearAlpha(),this.setBlendMode(s.SKIP_CHECK),e&&this.add(e),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new o(this)),this},setData:function(t,e){return this.data||(this.data=new o(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new o(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new o(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new o(this)),this.data.get(t)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return a(this)},willRender:function(t){return!(15!==this.renderFlags||0===this.list.length||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return i.unshift(this.displayList.getIndex(t)),i},addChildCallback:function(t){t.displayList&&t.displayList!==this&&t.removeFromDisplayList(),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(l.ADDED_TO_SCENE,t,this.scene),this.events.emit(d.ADDED_TO_SCENE,t,this.scene))},removeChildCallback:function(t){this.queueDepthSort(),t.displayList=null,t.emit(l.REMOVED_FROM_SCENE,t,this.scene),this.events.emit(d.REMOVED_FROM_SCENE,t,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(f(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(l.ADDED_TO_SCENE,this,this.scene),t.events.emit(d.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(l.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(d.REMOVED_FROM_SCENE,this,this.scene)),this},destroy:function(t){if(this.scene&&!this.ignoreDestroy){this.emit(l.DESTROY,this);for(var e=this.list;e.length;)e[0].destroy(t);this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});t.exports=p},834:t=>{t.exports=function(t,e,i){var s=e.list;if(0!==s.length){e.depthSort();var n=-1!==e.blendMode;n||t.setBlendMode(0);var r=e._alpha;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var a=0;a{var s=i(88933),n=i(85305),r=i(99325),a=i(20494);r.register("layer",(function(t,e){void 0===t&&(t={});var i=a(t,"children",null),r=new n(this.scene,i);return void 0!==e&&(t.add=e),s(this.scene,r,t),r}))},17676:(t,e,i)=>{var s=i(85305);i(61286).register("layer",(function(t){return this.displayList.add(new s(this.scene,t))}))},58010:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(17576),r=i(834),t.exports={renderWebGL:n,renderCanvas:r}},17576:t=>{t.exports=function(t,e,i){var s=e.list,n=s.length;if(0!==n){e.depthSort(),t.pipelines.preBatch(e);var r=-1!==e.blendMode;r||t.setBlendMode(0);for(var a=e.alpha,o=0;o{var s=i(26673),n=i(56694),r=i(64937),a=i(39298),o=i(75512),h=new n({Extends:s,Mixins:[r.Origin,r.ScrollFactor,r.Transform,r.Visible],initialize:function(t,e,i,n,r,o,h){s.call(this,t,e,i),this.color=new a(n,r,o),this.intensity=h,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(i)},displayWidth:{get:function(){return this.diameter},set:function(t){this.diameter=t}},displayHeight:{get:function(){return this.diameter},set:function(t){this.diameter=t}},width:{get:function(){return this.diameter},set:function(t){this.diameter=t}},height:{get:function(){return this.diameter},set:function(t){this.diameter=t}},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setColor:function(t){var e=o.getFloatsFromUintRGB(t);return this.color.set(e[0],e[1],e[2]),this},setIntensity:function(t){return this.intensity=t,this},setRadius:function(t){return this.radius=t,this}});h.RENDER_MASK=15,t.exports=h},26193:(t,e,i)=>{var s=i(26535),n=i(56694),r=i(53996),a=i(14455),o=i(13171),h=i(39298),l=i(72677),u=i(17922),c=i(75512),d=new n({initialize:function(){this.lights=[],this.ambientColor=new h(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(t,e,i,s,n,r){return this.systems.displayList.add(new o(this.scene,t,e,i,s,n,r))},enable:function(){return-1===this.maxLights&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(t){for(var e=this.lights,i=t.worldView,n=[],a=0;athis.maxLights&&(u(n,this.sortByDistance),n=n.slice(0,this.maxLights)),this.visibleLights=n.length,n},sortByDistance:function(t,e){return t.distance>=e.distance},setAmbientColor:function(t){var e=c.getFloatsFromUintRGB(t);return this.ambientColor.set(e[0],e[1],e[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(t,e,i,s,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=128),void 0===s&&(s=16777215),void 0===n&&(n=1);var r=c.getFloatsFromUintRGB(s),o=new a(t,e,i,r[0],r[1],r[2],n);return this.lights.push(o),o},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&l(this.lights,e),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=d},50296:(t,e,i)=>{var s=i(56694),n=i(26193),r=i(91963),a=i(7599),o=new s({Extends:n,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once(a.BOOT,this.boot,this),n.call(this)},boot:function(){var t=this.systems.events;t.on(a.SHUTDOWN,this.shutdown,this),t.on(a.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",o,"lights"),t.exports=o},83321:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(75606),a=i(18693),o=i(89980),h=i(67623),l=i(53267),u=i(73329),c=i(16650),d=i(23464),f=i(17922),p=i(70015),v=i(85769),g=new s({Extends:o,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Mask,n.Pipeline,n.Size,n.Texture,n.Transform,n.Visible,n.ScrollFactor,d],initialize:function(t,e,i,s,n,r,a,h,l,u,d,f){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s="__WHITE"),o.call(this,t,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new p,this.modelScale=new p(1,1,1),this.modelRotation=new p,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new c,this.viewPosition=new p,this.viewMatrix=new c,this.projectionMatrix=new c,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1;var v=t.sys.renderer;this.setPosition(e,i),this.setTexture(s,n),this.setSize(v.width,v.height),this.initPipeline(),this.setPerspective(v.width,v.height),r&&this.addVertices(r,a,h,l,u,d,f)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(t){return this.viewPosition.addScale(p.LEFT,t),this.dirtyCache[10]=1,this},panY:function(t){return this.viewPosition.y+=p.DOWN.y*t,this.dirtyCache[10]=1,this},panZ:function(t){return this.viewPosition.z+=t,this.dirtyCache[10]=1,this},setPerspective:function(t,e,i,s,n){return void 0===i&&(i=45),void 0===s&&(s=.01),void 0===n&&(n=1e3),this.projectionMatrix.perspective(r(i),t/e,s,n),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(t,e,i,s){return void 0===t&&(t=this.scene.sys.renderer.getAspectRatio()),void 0===e&&(e=1),void 0===i&&(i=-1e3),void 0===s&&(s=1e3),this.projectionMatrix.ortho(-t,t,-e,e,i,s),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach((function(t){t.destroy()})),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(t,e,i,s,n,r,a,o,h){var u,c=this.scene.sys.cache.obj.get(t);return c&&(u=l(c,this,e,i,s,n,r,a,o,h)),u&&0!==u.verts.length||console.warn("Mesh.addVerticesFromObj data empty:",t),this},sortByDepth:function(t,e){return t.depth-e.depth},depthSort:function(){return f(this.faces,this.sortByDepth),this},addVertex:function(t,e,i,s,n,r,a){var o=new v(t,e,i,s,n,r,a);return this.vertices.push(o),o},addFace:function(t,e,i){var s=new a(t,e,i);return this.faces.push(s),this.dirtyCache[9]=-1,s},addVertices:function(t,e,i,s,n,r,a){var o=h(t,e,i,s,n,r,a);return o?(this.faces=this.faces.concat(o.faces),this.vertices=this.vertices.concat(o.vertices)):console.warn("Mesh.addVertices data empty or invalid"),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(t){return this.faces[t]},getFaceAt:function(t,e,i){void 0===i&&(i=this.scene.sys.cameras.main);for(var s=u(this,i).calc,n=this.faces,r=[],a=0;a{t.exports=function(){}},41839:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),a=i(10850),o=i(83321);n.register("mesh",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),h=a(t,"vertices",[]),l=a(t,"uvs",[]),u=a(t,"indicies",[]),c=a(t,"containsZ",!1),d=a(t,"normals",[]),f=a(t,"colors",16777215),p=a(t,"alphas",1),v=new o(this.scene,0,0,i,n,h,l,u,c,d,f,p);return void 0!==e&&(t.add=e),s(this.scene,v,t),v}))},8767:(t,e,i)=>{var s=i(83321);i(61286).register("mesh",(function(t,e,i,n,r,a,o,h,l,u,c){return this.displayList.add(new s(this.scene,t,e,i,n,r,a,o,h,l,u,c))}))},23464:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(57410),r=i(6317),t.exports={renderWebGL:n,renderCanvas:r}},57410:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){var r=e.faces,a=r.length;if(0!==a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline,e),h=s(e,i,n).calc,l=o.setGameObject(e),u=o.vertexViewF32,c=o.vertexViewU32,d=o.vertexCount*o.currentShader.vertexComponentCount-1,f=e.tintFill,p=[],v=e.debugCallback,g=h.a,m=h.b,y=h.c,x=h.d,T=h.e,w=h.f,E=e.viewPosition.z,S=e.hideCCW,b=i.roundPixels,A=i.alpha*e.alpha,_=0;t.pipelines.preBatch(e);for(var C=0;C{var s=i(56694),n=i(64937),r=i(89980),a=i(94456),o=i(85769),h=new s({Extends:r,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.FX,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.ScrollFactor,n.Texture,n.Transform,n.Visible,a],initialize:function(t,e,i,s,n,a,h,l,u,c,d){void 0===a&&(a=256),void 0===h&&(h=256),void 0===l&&(l=10),void 0===u&&(u=10),void 0===c&&(c=0),void 0===d&&(d=0),r.call(this,t,"NineSlice"),this._width=a,this._height=h,this._originX=.5,this._originY=.5,this._sizeComponent=!0,this.vertices=[],this.leftWidth=l,this.rightWidth=u,this.topHeight=c,this.bottomHeight=d,this.tint=16777215,this.tintFill=!1,this.is3Slice=0===c&&0===d;for(var f=this.is3Slice?18:54,p=0;p{var s=i(88933),n=i(99325),r=i(20494),a=i(10850),o=i(44139);n.register("nineslice",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),h=a(t,"width",256),l=a(t,"height",256),u=a(t,"leftWidth",10),c=a(t,"rightWidth",10),d=a(t,"topHeight",0),f=a(t,"bottomHeight",0),p=new o(this.scene,0,0,i,n,h,l,u,c,d,f);return void 0!==e&&(t.add=e),s(this.scene,p,t),p}))},53778:(t,e,i)=>{var s=i(44139);i(61286).register("nineslice",(function(t,e,i,n,r,a,o,h,l,u){return this.displayList.add(new s(this.scene,t,e,i,n,r,a,o,h,l,u))}))},94456:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(27420),t.exports={renderWebGL:n,renderCanvas:r}},27420:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){var a=e.vertices,o=a.length;if(0!==o){i.addToRenderList(e);var h=t.pipelines.set(e.pipeline,e),l=s(e,i,r,!1).calc,u=h.setGameObject(e),c=h.vertexViewF32,d=h.vertexViewU32,f=h.vertexCount*h.currentShader.vertexComponentCount-1,p=i.roundPixels,v=e.tintFill,g=i.alpha*e.alpha,m=n.getTintAppendFloatAlpha(e.tint,g);t.pipelines.preBatch(e);var y=h.vertexAvailable(),x=-1;y{var s=i(56694),n=i(93025),r=i(22946),a=i(21902),o=i(4840),h=i(15978),l=new s({Extends:n,initialize:function(t){n.call(this,t,null,!1),this.active=!1,this.easeName="Linear",this.r=[],this.g=[],this.b=[]},getMethod:function(){return null===this.propertyValue?0:9},setMethods:function(){var t=this.propertyValue,e=t,i=this.defaultEmit,s=this.defaultUpdate;if(9===this.method){this.start=t[0],this.ease=a("Linear"),this.interpolation=o("linear"),i=this.easedValueEmit,s=this.easeValueUpdate,e=t[0],this.active=!0;for(var n=0;n{var s=i(17489),n=i(82897),r=i(56694),a=i(61616),o=i(21902),h=i(72632),l=i(4840),u=i(88462),c=i(1071),d=new r({initialize:function(t,e,i){void 0===i&&(i=!1),this.propertyKey=t,this.propertyValue=e,this.defaultValue=e,this.steps=0,this.counter=0,this.yoyo=!1,this.direction=0,this.start=0,this.current=0,this.end=0,this.ease=null,this.interpolation=null,this.emitOnly=i,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=h(t,this.propertyKey,this.defaultValue),this.method=this.getMethod(),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(t){var e;switch(this.method){case 1:case 3:case 8:e=t;break;case 2:this.propertyValue.indexOf(t)>=0&&(e=t);break;case 4:var i=(this.end-this.start)/this.steps;e=u(t,i),this.counter=e;break;case 5:case 6:case 7:e=n(t,this.start,this.end);break;case 9:e=this.start[0]}return this.current=e,this},getMethod:function(){var t=this.propertyValue;if(null===t)return 0;var e=typeof t;if("number"===e)return 1;if(Array.isArray(t))return 2;if("function"===e)return 3;if("object"===e){if(this.hasBoth(t,"start","end"))return this.has(t,"steps")?4:5;if(this.hasBoth(t,"min","max"))return 6;if(this.has(t,"random"))return 7;if(this.hasEither(t,"onEmit","onUpdate"))return 8;if(this.has(t,"interpolation"))return 9}return 0},setMethods:function(){var t=this.propertyValue,e=t,i=this.defaultEmit,s=this.defaultUpdate;switch(this.method){case 1:i=this.staticValueEmit;break;case 2:i=this.randomStaticValueEmit,e=t[0];break;case 3:this._onEmit=t,i=this.proxyEmit;break;case 4:this.start=t.start,this.end=t.end,this.steps=t.steps,this.counter=this.start,this.yoyo=!!this.has(t,"yoyo")&&t.yoyo,this.direction=0,i=this.steppedEmit,e=this.start;break;case 5:this.start=t.start,this.end=t.end;var n=this.has(t,"ease")?t.ease:"Linear";this.ease=o(n,t.easeParams),i=this.has(t,"random")&&t.random?this.randomRangedValueEmit:this.easedValueEmit,s=this.easeValueUpdate,e=this.start;break;case 6:this.start=t.min,this.end=t.max,i=this.has(t,"int")&&t.int?this.randomRangedIntEmit:this.randomRangedValueEmit,e=this.start;break;case 7:var r=t.random;Array.isArray(r)&&(this.start=r[0],this.end=r[1]),i=this.randomRangedIntEmit,e=this.start;break;case 8:this._onEmit=this.has(t,"onEmit")?t.onEmit:this.defaultEmit,this._onUpdate=this.has(t,"onUpdate")?t.onUpdate:this.defaultUpdate,i=this.proxyEmit,s=this.proxyUpdate;break;case 9:this.start=t.values;var a=this.has(t,"ease")?t.ease:"Linear";this.ease=o(a,t.easeParams),this.interpolation=l(t.interpolation),i=this.easedValueEmit,s=this.easeValueUpdate,e=this.start[0]}return this.onEmit=i,this.onUpdate=s,this.current=e,this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,s){return s},proxyEmit:function(t,e,i){var s=this._onEmit(t,e,i);return this.current=s,s},proxyUpdate:function(t,e,i,s){var n=this._onUpdate(t,e,i,s);return this.current=n,n},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[t],this.current},randomRangedValueEmit:function(t,e){var i=a(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i,t.data[e].max=this.end),this.current=i,i},randomRangedIntEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i,t.data[e].max=this.end),this.current=i,i},steppedEmit:function(){var t,e=this.counter,i=e,s=(this.end-this.start)/this.steps;this.yoyo?(0===this.direction?(i+=s)>=this.end&&(t=i-this.end,i=this.end-t,this.direction=1):(i-=s)<=this.start&&(t=this.start-i,i=this.start+t,this.direction=0),this.counter=i):this.counter=c(i+s,this.start,this.end);return this.current=e,e},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(t,e,i){var s,n=t.data[e],r=this.ease(i);return s=this.interpolation?this.interpolation(this.start,r):(n.max-n.min)*r+n.min,this.current=s,s},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});t.exports=d},87811:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(30891),a=new s({Extends:r,initialize:function(t,e,i,s,a){if("object"==typeof t){var o=t;t=n(o,"x",0),e=n(o,"y",0),i=n(o,"power",0),s=n(o,"epsilon",100),a=n(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=100),void 0===a&&(a=50);r.call(this,t,e,!0),this._gravity=a,this._power=0,this._epsilon=0,this.power=i,this.epsilon=s},update:function(t,e){var i=this.x-t.x,s=this.y-t.y,n=i*i+s*s;if(0!==n){var r=Math.sqrt(n);n{var s=i(16569),n=i(56694),r=i(75606),a=i(74118),o=i(2386),h=i(93736),l=new n({initialize:function(t){this.emitter=t,this.texture=null,this.frame=null,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1},x:{min:0,max:0},y:{min:0,max:0},accelerationX:{min:0,max:0},accelerationY:{min:0,max:0},maxVelocityX:{min:0,max:0},maxVelocityY:{min:0,max:0},moveToX:{min:0,max:0},moveToY:{min:0,max:0},bounce:{min:0,max:0}},this.isCropped=!1,this.scene=t.scene,this.anims=new s(this),this.bounds=new a},emit:function(t,e,i,s,n,r){return this.emitter.emit(t,e,i,s,n,r)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e},fire:function(t,e){var i=this.emitter,s=i.ops,n=i.getAnim();if(n?this.anims.play(n):(this.frame=i.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(i.getEmitZone(this),void 0===t?this.x+=s.x.onEmit(this,"x"):s.x.steps>0?this.x+=t+s.x.onEmit(this,"x"):this.x+=t,void 0===e?this.y+=s.y.onEmit(this,"y"):s.y.steps>0?this.y+=e+s.y.onEmit(this,"y"):this.y+=e,this.life=s.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=s.delay.onEmit(this,"delay"),this.scaleX=s.scaleX.onEmit(this,"scaleX"),this.scaleY=s.scaleY.active?s.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=s.rotate.onEmit(this,"rotate"),this.rotation=r(this.angle),0===this.delayCurrent&&i.getDeathZone(this))return this.lifeCurrent=0,!1;var a=s.speedX.onEmit(this,"speedX"),o=s.speedY.active?s.speedY.onEmit(this,"speedY"):a;if(i.radial){var h=r(s.angle.onEmit(this,"angle"));this.velocityX=Math.cos(h)*Math.abs(a),this.velocityY=Math.sin(h)*Math.abs(o)}else if(i.moveTo){var l=s.moveToX.onEmit(this,"moveToX"),u=s.moveToY.onEmit(this,"moveToY"),c=this.life/1e3;this.velocityX=(l-this.x)/c,this.velocityY=(u-this.y)/c}else this.velocityX=a,this.velocityY=o;return i.acceleration&&(this.accelerationX=s.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=s.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=s.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=s.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=s.bounce.onEmit(this,"bounce"),this.alpha=s.alpha.onEmit(this,"alpha"),s.color.active?this.tint=s.color.onEmit(this,"tint"):this.tint=s.tint.onEmit(this,"tint"),!0},computeVelocity:function(t,e,i,s,n){var r=t.ops,a=this.velocityX,o=this.velocityY,h=r.accelerationX.onUpdate(this,"accelerationX",n,this.accelerationX),l=r.accelerationY.onUpdate(this,"accelerationY",n,this.accelerationY),u=r.maxVelocityX.onUpdate(this,"maxVelocityX",n,this.maxVelocityX),c=r.maxVelocityY.onUpdate(this,"maxVelocityY",n,this.maxVelocityY);a+=t.gravityX*i,o+=t.gravityY*i,h&&(a+=h*i),l&&(o+=l*i),a>u?a=u:a<-u&&(a=-u),o>c?o=c:o<-c&&(o=-c),this.velocityX=a,this.velocityY=o;for(var d=0;de.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(0===this.lifeCurrent)return!0;if(this.delayCurrent>0)return this.delayCurrent-=t,!1;this.anims.update(0,t);var s=this.emitter,n=s.ops,a=1-this.lifeCurrent/this.life;if(this.lifeT=a,this.x=n.x.onUpdate(this,"x",a,this.x),this.y=n.y.onUpdate(this,"y",a,this.y),s.moveTo){var o=n.moveToX.onUpdate(this,"moveToX",a,s.moveToX),h=n.moveToY.onUpdate(this,"moveToY",a,s.moveToY),l=this.lifeCurrent/1e3;this.velocityX=(o-this.x)/l,this.velocityY=(h-this.y)/l}return this.computeVelocity(s,t,e,i,a),this.x+=this.velocityX*e,this.y+=this.velocityY*e,s.bounds&&(this.bounce=n.bounce.onUpdate(this,"bounce",a,this.bounce),this.checkBounds(s)),this.scaleX=n.scaleX.onUpdate(this,"scaleX",a,this.scaleX),this.scaleY=this.scaleX,n.scaleY.active&&(this.scaleY=n.scaleY.onUpdate(this,"scaleY",a,this.scaleY)),this.angle=n.rotate.onUpdate(this,"rotate",a,this.angle),this.rotation=r(this.angle),s.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=n.alpha.onUpdate(this,"alpha",a,this.alpha),n.color.active?this.tint=n.color.onUpdate(this,"color",a,this.tint):this.tint=n.tint.onUpdate(this,"tint",a,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0)},setSizeToFrame:function(){},getBounds:function(t){void 0===t&&(t=this.emitter.getWorldTransformMatrix());var e=Math.abs(t.scaleX)*this.scaleX,i=Math.abs(t.scaleY)*this.scaleY,s=this.x,n=this.y,r=this.rotation,a=this.frame.width*e/2,l=this.frame.height*i/2,u=this.bounds,c=new h(s-a,n-l),d=new h(s+a,n-l),f=new h(s-a,n+l),p=new h(s+a,n+l);return 0!==r&&(o(c,s,n,r),o(d,s,n,r),o(f,s,n,r),o(p,s,n,r)),t.transformPoint(c.x,c.y,c),t.transformPoint(d.x,d.y,d),t.transformPoint(f.x,f.y,f),t.transformPoint(p.x,p.y,p),u.x=Math.min(c.x,d.x,f.x,p.x),u.y=Math.min(c.y,d.y,f.y,p.y),u.width=Math.max(c.x,d.x,f.x,p.x)-u.x,u.height=Math.max(c.y,d.y,f.y,p.y)-u.y,u},destroy:function(){this.anims.destroy(),this.anims=null,this.emitter=null,this.texture=null,this.frame=null,this.scene=null}});t.exports=l},9216:(t,e,i)=>{var s=i(78991),n=i(56694),r=i(64937),a=i(48129),o=i(29538),h=i(69361),l=i(54213),u=i(19737),c=i(93025),d=i(40629),f=i(89980),p=i(72632),v=i(72861),g=i(87811),m=i(53523),y=i(19256),x=i(7782),T=i(71207),w=i(14655),E=i(14909),S=i(68433),b=i(74118),A=i(90205),_=i(66458),C=i(69116),R=i(17922),M=i(69360),P=i(93736),O=i(1071),L=["active","advance","blendMode","collideBottom","collideLeft","collideRight","collideTop","colorEase","deathCallback","deathCallbackScope","duration","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxAliveParticles","maxParticles","name","emitting","particleBringToTop","particleClass","radial","sortCallback","sortOrderAsc","sortProperty","stopAfter","tintFill","timeScale","trackVisible","visible"],F=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],D=new n({Extends:f,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.FX,r.Mask,r.Pipeline,r.ScrollFactor,r.Texture,r.Transform,r.Visible,C],initialize:function(t,e,i,s,n){f.call(this,t,"ParticleEmitter"),this.particleClass=E,this.ops={accelerationX:new c("accelerationX",0),accelerationY:new c("accelerationY",0),alpha:new c("alpha",1),angle:new c("angle",{min:0,max:360},!0),bounce:new c("bounce",0),color:new u("color"),delay:new c("delay",0,!0),lifespan:new c("lifespan",1e3,!0),maxVelocityX:new c("maxVelocityX",1e4),maxVelocityY:new c("maxVelocityY",1e4),moveToX:new c("moveToX",0),moveToY:new c("moveToY",0),quantity:new c("quantity",1,!0),rotate:new c("rotate",0),scaleX:new c("scaleX",1),scaleY:new c("scaleY",1),speedX:new c("speedX",0,!0),speedY:new c("speedY",0,!0),tint:new c("tint",16777215),x:new c("x",0),y:new c("y",0)},this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.moveTo=!1,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.maxAliveParticles=0,this.stopAfter=0,this.duration=0,this.frequency=0,this.emitting=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZones=[],this.deathZones=[],this.viewBounds=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.follow=null,this.followOffset=new P,this.trackVisible=!1,this.frames=[],this.randomFrame=!0,this.frameQuantity=1,this.anims=[],this.randomAnim=!0,this.animQuantity=1,this.dead=[],this.alive=[],this.counters=new Float32Array(10),this._frameLength=0,this._animLength=0,this.skipping=!1,this.worldMatrix=new M,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new T(this),this.tintFill=!1,this.initPipeline(),this.setPosition(e,i),this.setTexture(s),n&&this.setConfig(n)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},getProcessors:function(){return this.processors.getAll("active",!0)},setConfig:function(t){if(!t)return this;var e=0,i="",s=this.ops;for(e=0;e=this.frameQuantity&&(this.frameCounter=0,this.currentFrame=O(this.currentFrame+1,0,this._frameLength))),this.texture.get(t)},setEmitterFrame:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=1),this.randomFrame=e,this.frameQuantity=i,this.currentFrame=0;var s=typeof t;if(this.frames.length=0,Array.isArray(t))this.frames=this.frames.concat(t);else if("string"===s||"number"===s)this.frames.push(t);else if("object"===s){var n=t;(t=p(n,"frames",null))&&(this.frames=this.frames.concat(t));var r=p(n,"cycle",!1);this.randomFrame=!r,this.frameQuantity=p(n,"quantity",i)}return this._frameLength=this.frames.length,1===this._frameLength&&(this.frameQuantity=1,this.randomFrame=!1),this},getAnim:function(){var t=this.anims;if(0===t.length)return null;if(1===t.length)return t[0];if(this.randomAnim)return v(t);var e=t[this.currentAnim];return this.animCounter++,this.animCounter>=this.animQuantity&&(this.animCounter=0,this.currentAnim=O(this.currentAnim+1,0,this._animLength)),e},setAnim:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=1),this.randomAnim=e,this.animQuantity=i,this.currentAnim=0;var s=typeof t;if(this.anims.length=0,Array.isArray(t))this.anims=this.anims.concat(t);else if("string"===s)this.anims.push(t);else if("object"===s){var n=t;(t=p(n,"anims",null))&&(this.anims=this.anims.concat(t));var r=p(n,"cycle",!1);this.randomAnim=!r,this.animQuantity=p(n,"quantity",i)}return this._animLength=this.anims.length,1===this._animLength&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(t){return void 0===t&&(t=!0),this.radial=t,this},setParticleBounds:function(t,e,i,s){if("object"==typeof t){var n=t;t=n.x,e=n.y,i=y(n,"w")?n.w:n.width,s=y(n,"h")?n.h:n.height}return this.bounds?this.bounds.setTo(t,e,i,s):this.bounds=new b(t,e,i,s),this},setParticleSpeed:function(t,e){return void 0===e&&(e=t),this.ops.speedX.onChange(t),t===e?this.ops.speedY.active=!1:this.ops.speedY.onChange(e),this.radial=!0,this},setParticleScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.ops.scaleX.onChange(t),this.ops.scaleY.onChange(e),this},setParticleGravity:function(t,e){return this.gravityX=t,this.gravityY=e,this},setParticleAlpha:function(t){return this.ops.alpha.onChange(t),this},setParticleTint:function(t){return this.ops.tint.onChange(t),this},setEmitterAngle:function(t){return this.ops.angle.onChange(t),this},setParticleLifespan:function(t){return this.lifespan.onChange(t),this},setQuantity:function(t){return this.quantity=t,this},setFrequency:function(t,e){return this.frequency=t,this.flowCounter=t>0?t:0,e&&(this.quantity=e),this},addDeathZone:function(t){var e;Array.isArray(t)||(t=[t]);for(var i=0;i-1&&(this.zoneTotal++,this.zoneTotal>=s.total&&(this.zoneTotal=0,this.zoneIndex=O(this.zoneIndex+1,0,i)))}},getDeathZone:function(t){for(var e=this.deathZones,i=0;i=0&&(this.zoneIndex=e),this},addParticleProcessor:function(t){return this.processors.exists(t)||(t.emitter&&t.emitter.removeParticleProcessor(t),this.processors.add(t),t.emitter=this),t},removeParticleProcessor:function(t){return this.processors.exists(t)&&(this.processors.remove(t,!0),t.emitter=null),t},createGravityWell:function(t){return this.addParticleProcessor(new g(t))},reserve:function(t){var e=this.dead;if(this.maxParticles>0){var i=this.getParticleCount();i+t>this.maxParticles&&(t=this.maxParticles-(i+t))}for(var s=0;s0&&this.getParticleCount()>=this.maxParticles||this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,s=i.length,n=0;n0&&this.fastForward(t),this.emitting=!0,this.resetCounters(this.frequency,!0),void 0!==e&&(this.duration=Math.abs(e)),this.emit(d.START,this)),this},stop:function(t){return void 0===t&&(t=!1),this.emitting&&(this.emitting=!1,t&&this.killAll(),this.emit(d.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(t,e){return void 0===t&&(t=""),void 0===e&&(e=this.true),this.sortProperty=t,this.sortOrderAsc=e,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(t){return t=""!==this.sortProperty?this.depthSortCallback:null,this.sortCallback=t,this},depthSort:function(){return R(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(t,e){var i=this.sortProperty;return this.sortOrderAsc?t[i]-e[i]:e[i]-t[i]},flow:function(t,e,i){return void 0===e&&(e=1),this.emitting=!1,this.frequency=t,this.quantity=e,void 0!==i&&(this.stopAfter=i),this.start()},explode:function(t,e,i){this.frequency=-1,this.resetCounters(-1,!0);var s=this.emitParticle(t,e,i);return this.emit(d.EXPLODE,this,s),s},emitParticleAt:function(t,e,i){return this.emitParticle(i,t,e)},emitParticle:function(t,e,i){if(!this.atLimit()){void 0===t&&(t=this.ops.quantity.onEmit());for(var s=this.dead,n=this.stopAfter,r=this.follow?this.follow.x+this.followOffset.x:e,a=this.follow?this.follow.y+this.followOffset.y:i,o=0;o0&&(this.stopCounter++,this.stopCounter>=n))break;if(this.atLimit())break}return h}},fastForward:function(t,e){void 0===e&&(e=1e3/60);var i=0;for(this.skipping=!0;i0&&(this.worldMatrix=this.getWorldTransformMatrix());var s=this.getProcessors(),n=this.alive,r=this.dead,a=0,o=[],h=n.length;for(a=0;a0){var u=this.deathCallback,c=this.deathCallbackScope;for(a=h-1;a>=0;a--){var f=o[a];n.splice(f.index,1),r.push(f.particle),u&&u.call(c,f.particle),f.particle.setPosition()}}if(this.emitting||this.skipping){if(0===this.frequency)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=e;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=e,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())}else 1===this.completeFlag&&0===n.length&&(this.completeFlag=0,this.emit(d.COMPLETE,this))},overlap:function(t){for(var e=this.getWorldTransformMatrix(),i=this.alive,s=i.length,n=[],r=0;r0){var u=0;for(this.skipping=!0;u0&&x(s,t,t),s},particleX:{get:function(){return this.ops.x.current},set:function(t){this.ops.x.onChange(t)}},particleY:{get:function(){return this.ops.y.current},set:function(t){this.ops.y.onChange(t)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(t){this.ops.accelerationX.onChange(t)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(t){this.ops.accelerationY.onChange(t)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(t){this.ops.maxVelocityX.onChange(t)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(t){this.ops.maxVelocityY.onChange(t)}},speed:{get:function(){return this.ops.speedX.current},set:function(t){this.ops.speedX.onChange(t),this.ops.speedY.onChange(t)}},speedX:{get:function(){return this.ops.speedX.current},set:function(t){this.ops.speedX.onChange(t)}},speedY:{get:function(){return this.ops.speedY.current},set:function(t){this.ops.speedY.onChange(t)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(t){this.ops.moveToX.onChange(t)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(t){this.ops.moveToY.onChange(t)}},bounce:{get:function(){return this.ops.bounce.current},set:function(t){this.ops.bounce.onChange(t)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(t){this.ops.scaleX.onChange(t)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(t){this.ops.scaleY.onChange(t)}},particleColor:{get:function(){return this.ops.color.current},set:function(t){this.ops.color.onChange(t)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(t){this.ops.color.setEase(t)}},particleTint:{get:function(){return this.ops.tint.current},set:function(t){this.ops.tint.onChange(t)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(t){this.ops.alpha.onChange(t)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(t){this.ops.lifespan.onChange(t)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(t){this.ops.angle.onChange(t)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(t){this.ops.rotate.onChange(t)}},quantity:{get:function(){return this.ops.quantity.current},set:function(t){this.ops.quantity.onChange(t)}},delay:{get:function(){return this.ops.delay.current},set:function(t){this.ops.delay.onChange(t)}},flowCounter:{get:function(){return this.counters[0]},set:function(t){this.counters[0]=t}},frameCounter:{get:function(){return this.counters[1]},set:function(t){this.counters[1]=t}},animCounter:{get:function(){return this.counters[2]},set:function(t){this.counters[2]=t}},elapsed:{get:function(){return this.counters[3]},set:function(t){this.counters[3]=t}},stopCounter:{get:function(){return this.counters[4]},set:function(t){this.counters[4]=t}},completeFlag:{get:function(){return this.counters[5]},set:function(t){this.counters[5]=t}},zoneIndex:{get:function(){return this.counters[6]},set:function(t){this.counters[6]=t}},zoneTotal:{get:function(){return this.counters[7]},set:function(t){this.counters[7]=t}},currentFrame:{get:function(){return this.counters[8]},set:function(t){this.counters[8]=t}},currentAnim:{get:function(){return this.counters[9]},set:function(t){this.counters[9]=t}},preDestroy:function(){var t;this.texture=null,this.frames=null,this.anims=null,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.emitZones=null,this.deathZones=null,this.bounds=null,this.follow=null,this.counters=null;var e=this.ops;for(t=0;t{var s=i(90205),n=i(69360),r=new n,a=new n,o=new n,h=new n;t.exports=function(t,e,i,n){var l=r,u=a,c=o,d=h;n?(d.loadIdentity(),d.multiply(n),d.translate(e.x,e.y),d.rotate(e.rotation),d.scale(e.scaleX,e.scaleY)):d.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var f=t.currentContext,p=i.roundPixels,v=i.alpha,g=e.alpha,m=e.alive,y=m.length,x=e.viewBounds;if(e.visible&&0!==y&&(!x||s(x,i.worldView))){e.sortCallback&&e.depthSort(),i.addToRenderList(e);var T=e.scrollFactorX,w=e.scrollFactorY;f.save(),f.globalCompositeOperation=t.blendModes[e.blendMode];for(var E=0;E0&&_.height>0){var C=-A.halfWidth,R=-A.halfHeight;f.globalAlpha=b,f.save(),u.setToContext(f),p&&(C=Math.round(C),R=Math.round(R)),f.imageSmoothingEnabled=!A.source.scaleMode,f.drawImage(A.source.image,_.x,_.y,_.width,_.height,C,R,_.width,_.height),f.restore()}}}f.restore()}}},765:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),a=i(72632),o=i(9216);n.register("particles",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=a(t,"config",null),h=new o(this.scene,0,0,i);return void 0!==e&&(t.add=e),s(this.scene,h,t),n&&h.setConfig(n),h}))},81212:(t,e,i)=>{var s=i(61286),n=i(9216);s.register("particles",(function(t,e,i,s){return void 0!==t&&"string"==typeof t&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new n(this.scene,t,e,i,s))}))},69116:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(10275),r=i(10456),t.exports={renderWebGL:n,renderCanvas:r}},10275:(t,e,i)=>{var s=i(90205),n=i(69360),r=i(75512),a=new n,o=new n,h=new n,l=new n;t.exports=function(t,e,i,n){var u=t.pipelines.set(e.pipeline),c=a,d=o,f=h,p=l;n?(p.loadIdentity(),p.multiply(n),p.translate(e.x,e.y),p.rotate(e.rotation),p.scale(e.scaleX,e.scaleY)):p.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var v=i.roundPixels,g=r.getTintAppendFloatAlpha,m=i.alpha,y=e.alpha,x=e.texture.glTexture;t.pipelines.preBatch(e);var T=e.alive,w=T.length,E=e.viewBounds;if(e.visible&&0!==w&&(!E||s(E,i.worldView))){e.sortCallback&&e.depthSort();var S=u.setGameObject(e,e.frame);i.addToRenderList(e);var b=e.scrollFactorX,A=e.scrollFactorY;t.setBlendMode(e.blendMode),e.mask&&(e.mask.preRenderWebGL(t,e,i),t.pipelines.set(e.pipeline));for(var _=e.tintFill,C=0;C{var s=new(i(56694))({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=!0),this.emitter,this.x=t,this.y=e,this.active=i},update:function(){},destroy:function(){this.emitter=null}});t.exports=s},76100:t=>{t.exports="complete"},26677:t=>{t.exports="deathzone"},62736:t=>{t.exports="explode"},56490:t=>{t.exports="start"},85715:t=>{t.exports="stop"},40629:(t,e,i)=>{t.exports={COMPLETE:i(76100),DEATH_ZONE:i(26677),EXPLODE:i(62736),START:i(56490),STOP:i(85715)}},27684:(t,e,i)=>{t.exports={EmitterColorOp:i(19737),EmitterOp:i(93025),Events:i(40629),GravityWell:i(87811),Particle:i(14909),ParticleEmitter:i(9216),ParticleProcessor:i(30891),Zones:i(25962)}},69361:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t,e){var i=this.source.contains(t,e);return i&&this.killOnEnter||!i&&!this.killOnEnter}});t.exports=s},54213:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s,n,r){void 0===s&&(s=!1),void 0===n&&(n=!0),void 0===r&&(r=-1),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=s,this.counter=-1,this.seamless=n,this._length=0,this._direction=0,this.total=r,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=s},68433:(t,e,i)=>{var s=i(56694),n=i(93736),r=new s({initialize:function(t){this.source=t,this._tempVec=new n,this.total=-1},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},25962:(t,e,i)=>{t.exports={DeathZone:i(69361),EdgeZone:i(54213),RandomZone:i(68433)}},29598:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(13747),a=new s({Extends:r,Mixins:[n.PathFollower],initialize:function(t,e,i,s,n,a){r.call(this,t,i,s,n,a),this.path=e},preUpdate:function(t,e){this.anims.update(t,e),this.pathUpdate(t)}});t.exports=a},19626:(t,e,i)=>{var s=i(61286),n=i(29598);s.register("follower",(function(t,e,i,s,r){var a=new n(this.scene,t,e,i,s,r);return this.displayList.add(a),this.updateList.add(a),a}))},13171:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),a=i(74853),o=i(65641),h=i(71606),l=new s({Extends:r,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Mask,n.Pipeline,n.ScrollFactor,n.Transform,n.Visible,h],initialize:function(t,e,i,s,n,h,l){void 0===s&&(s=16777215),void 0===n&&(n=128),void 0===h&&(h=1),void 0===l&&(l=.1),r.call(this,t,"PointLight"),this.initPipeline(o.POINTLIGHT_PIPELINE),this.setPosition(e,i),this.color=a(s),this.intensity=h,this.attenuation=l,this.width=2*n,this.height=2*n,this._radius=n},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this.width=2*t,this.height=2*t}},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});t.exports=l},162:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),a=i(13171);n.register("pointlight",(function(t,e){void 0===t&&(t={});var i=r(t,"color",16777215),n=r(t,"radius",128),o=r(t,"intensity",1),h=r(t,"attenuation",.1),l=new a(this.scene,0,0,i,n,o,h);return void 0!==e&&(t.add=e),s(this.scene,l,t),l}))},91201:(t,e,i)=>{var s=i(61286),n=i(13171);s.register("pointlight",(function(t,e,i,s,r,a){return this.displayList.add(new n(this.scene,t,e,i,s,r,a))}))},71606:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(80590),t.exports={renderWebGL:n,renderCanvas:r}},80590:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),a=s(e,i,n).calc,o=e.width,h=e.height,l=-e._radius,u=-e._radius,c=l+o,d=u+h,f=a.getX(0,0),p=a.getY(0,0),v=a.getX(l,u),g=a.getY(l,u),m=a.getX(l,d),y=a.getY(l,d),x=a.getX(c,d),T=a.getY(c,d),w=a.getX(c,u),E=a.getY(c,u);t.pipelines.preBatch(e),r.batchPointLight(e,i,v,g,m,y,x,T,w,E,f,p),t.pipelines.postBatch(e)}},15996:(t,e,i)=>{var s=i(56694),n=i(845),r=i(1539),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=32),void 0===a&&(a=32);var o=new n(t.sys.textures,"",s,a);r.call(this,t,e,i,o),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(t,e){this.width=t,this.height=e,this.texture.setSize(t,e),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this},resize:function(t,e){return this.setSize(t,e),this},saveTexture:function(t){var e=this.texture;return e.key=t,e.manager.addDynamicTexture(e)&&(this._saved=!0),e},fill:function(t,e,i,s,n,r){return this.texture.fill(t,e,i,s,n,r),this},clear:function(){return this.texture.clear(),this},stamp:function(t,e,i,s,n){return this.texture.stamp(t,e,i,s,n),this},erase:function(t,e,i){return this.texture.erase(t,e,i),this},draw:function(t,e,i,s,n){return this.texture.draw(t,e,i,s,n),this},drawFrame:function(t,e,i,s,n,r){return this.texture.drawFrame(t,e,i,s,n,r),this},repeat:function(t,e,i,s,n,r,a,o,h){return this.texture.repeat(t,e,i,s,n,r,a,o,h),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(t,e,i,s,n){return this.texture.batchDraw(t,e,i,s,n),this},batchDrawFrame:function(t,e,i,s,n,r){return this.texture.batchDrawFrame(t,e,i,s,n,r),this},endDraw:function(t){return this.texture.endDraw(t),this},snapshotArea:function(t,e,i,s,n,r,a){return this.texture.snapshotArea(t,e,i,s,n,r,a),this},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.width,this.height,t,e,i)},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i,"pixel")},preDestroy:function(){this._saved||this.texture.destroy()}});t.exports=a},85692:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),a=i(15996);n.register("renderTexture",(function(t,e){void 0===t&&(t={});var i=r(t,"x",0),n=r(t,"y",0),o=r(t,"width",32),h=r(t,"height",32),l=new a(this.scene,i,n,o,h);return void 0!==e&&(t.add=e),s(this.scene,l,t),l}))},29599:(t,e,i)=>{var s=i(61286),n=i(15996);s.register("renderTexture",(function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))}))},79968:(t,e,i)=>{var s=i(16569),n=i(56694),r=i(64937),a=i(89980),o=i(65641),h=i(58912),l=i(93736),u=new n({Extends:a,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Flip,r.Mask,r.Pipeline,r.Size,r.Texture,r.Transform,r.Visible,r.ScrollFactor,h],initialize:function(t,e,i,n,r,h,u,c,d){void 0===n&&(n="__DEFAULT"),void 0===h&&(h=2),void 0===u&&(u=!0),a.call(this,t,"Rope"),this.anims=new s(this),this.points=h,this.vertices,this.uv,this.colors,this.alphas,this.tintFill="__DEFAULT"===n,this.dirty=!1,this.horizontal=u,this._flipX=!1,this._flipY=!1,this._perp=new l,this.debugCallback=null,this.debugGraphic=null,this.setTexture(n,r),this.setPosition(e,i),this.setSizeToFrame(),this.initPipeline(o.ROPE_PIPELINE),Array.isArray(h)&&this.resizeArrays(h.length),this.setPoints(h,c,d),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){var i=this.anims.currentFrame;this.anims.update(t,e),this.anims.currentFrame!==i&&(this.updateUVs(),this.updateVertices())},play:function(t,e,i){return this.anims.play(t,e,i),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(t,e,i){return void 0===t&&(t=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(t,e,i))},setVertical:function(t,e,i){return void 0===t&&(t=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(t,e,i)):this},setTintFill:function(t){return void 0===t&&(t=!1),this.tintFill=t,this},setAlphas:function(t,e){var i=this.points.length;if(i<1)return this;var s,n=this.alphas;void 0===t?t=[1]:Array.isArray(t)||void 0!==e||(t=[t]);var r=0;if(void 0!==e)for(s=0;sr&&(a=t[r]),n[r]=a,t.length>r+1&&(a=t[r+1]),n[r+1]=a}return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i,s=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var n=0;if(t.length===e)for(i=0;in&&(r=t[n]),s[n]=r,t.length>n+1&&(r=t[n+1]),s[n+1]=r}return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var s,n,r,a=t;if(a<2&&(a=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,n=this.frame.width/(a-1),s=0;s{t.exports=function(){}},96027:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),a=i(10850),o=i(79968);n.register("rope",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),h=r(t,"horizontal",!0),l=a(t,"points",void 0),u=a(t,"colors",void 0),c=a(t,"alphas",void 0),d=new o(this.scene,0,0,i,n,l,h,u,c);return void 0!==e&&(t.add=e),s(this.scene,d,t),d}))},31982:(t,e,i)=>{var s=i(79968);i(61286).register("rope",(function(t,e,i,n,r,a,o,h){return this.displayList.add(new s(this.scene,t,e,i,n,r,a,o,h))}))},58912:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(49489),r=i(44598),t.exports={renderWebGL:n,renderCanvas:r}},49489:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline,e),o=s(e,i,r).calc,h=e.vertices,l=e.uv,u=e.colors,c=e.alphas,d=e.alpha,f=n.getTintAppendFloatAlpha,p=i.roundPixels,v=h.length,g=Math.floor(.5*v);a.flush(),t.pipelines.preBatch(e);var m=a.setGameObject(e),y=a.vertexViewF32,x=a.vertexViewU32,T=a.vertexCount*a.currentShader.vertexComponentCount-1,w=0,E=e.tintFill;e.dirty&&e.updateVertices();for(var S=e.debugCallback,b=[],A=0;A{var s=i(56694),n=i(64937),r=i(89980),a=i(72632),o=i(98611),h=i(22440),l=i(24252),u=i(69360),c=new s({Extends:r,Mixins:[n.ComputedSize,n.Depth,n.GetBounds,n.Mask,n.Origin,n.ScrollFactor,n.Transform,n.Visible,l],initialize:function(t,e,i,s,n,a,o,h){void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=128),void 0===a&&(a=128),r.call(this,t,"Shader"),this.blendMode=-1,this.shader;var l=t.sys.renderer;this.renderer=l,this.gl=l.gl,this.vertexData=new ArrayBuffer(2*Float32Array.BYTES_PER_ELEMENT*6),this.vertexBuffer=l.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new u,this._tempMatrix2=new u,this._tempMatrix3=new u,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=l.width,this._rendererHeight=l.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(i,s),this.setSize(n,a),this.setOrigin(.5,.5),this.setShader(e,o,h)},willRender:function(t){return!!this.renderToTexture||!(r.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setRenderToTexture:function(t,e){if(void 0===e&&(e=!1),!this.renderToTexture){var i=this.width,s=this.height,n=this.renderer;this.glTexture=n.createTextureFromSource(null,i,s,0),this.glTexture.flipY=e,this.framebuffer=n.createFramebuffer(i,s,this.glTexture,!1),this._rendererWidth=i,this._rendererHeight=s,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),t&&(this.texture=this.scene.sys.textures.addGLTexture(t,this.glTexture,i,s))}return this.shader&&(n.pipelines.clear(),this.load(),this.flush(),n.pipelines.rebind()),this},setShader:function(t,e,i){if(void 0===e&&(e=[]),"string"==typeof t){var s=this.scene.sys.cache.shader;if(!s.has(t))return console.warn("Shader missing: "+t),this;this.shader=s.get(t)}else this.shader=t;var n=this.gl,r=this.renderer;this.program&&n.deleteProgram(this.program);var a=r.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);n.uniformMatrix4fv(n.getUniformLocation(a,"uViewMatrix"),!1,this.viewMatrix),n.uniformMatrix4fv(n.getUniformLocation(a,"uProjectionMatrix"),!1,this.projectionMatrix),n.uniform2f(n.getUniformLocation(a,"uResolution"),this.width,this.height),this.program=a;var h=new Date,l={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[h.getFullYear(),h.getMonth(),h.getDate(),60*h.getHours()*60+60*h.getMinutes()+h.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=o(!0,{},this.shader.uniforms,l):this.uniforms=l;for(var u=0;u<4;u++)e[u]&&this.setSampler2D("iChannel"+u,e[u],u,i);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(t){return this.pointer=t,this},projOrtho:function(t,e,i,s){var n=1/(t-e),r=1/(i-s),a=this.projectionMatrix;a[0]=-2*n,a[5]=-2*r,a[10]=-.001,a[12]=(t+e)*n,a[13]=(s+i)*r,a[14]=-0;var o=this.program,h=this.gl;this.renderer.setProgram(o),h.uniformMatrix4fv(h.getUniformLocation(o,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=e,this._rendererHeight=i},initUniforms:function(){var t=this.gl,e=this.renderer.glFuncMap,i=this.program;for(var s in this._textureCount=0,this.uniforms){var n=this.uniforms[s],r=n.type,a=e[r];n.uniformLocation=t.getUniformLocation(i,s),"sampler2D"!==r&&(n.glMatrix=a.matrix,n.glValueLength=a.length,n.glFunc=a.func)}},setSampler2DBuffer:function(t,e,i,s,n,r){void 0===n&&(n=0),void 0===r&&(r={});var a=this.uniforms[t];return a.value=e,r.width=i,r.height=s,a.textureData=r,this._textureCount=n,this.initSampler2D(a),this},setSampler2D:function(t,e,i,s){void 0===i&&(i=0);var n=this.scene.sys.textures;if(n.exists(e)){var r=n.getFrame(e);if(r.glTexture&&r.glTexture.isRenderTexture)return this.setSampler2DBuffer(t,r.glTexture,r.width,r.height,i,s);var a=this.uniforms[t],o=r.source;a.textureKey=e,a.source=o.image,a.value=r.glTexture,o.isGLTexture&&(s||(s={}),s.width=o.width,s.height=o.height),s&&(a.textureData=s),this._textureCount=i,this.initSampler2D(a)}return this},setUniform:function(t,e){return h(this.uniforms,t,e),this},getUniform:function(t){return a(this.uniforms,t,null)},setChannel0:function(t,e){return this.setSampler2D("iChannel0",t,0,e)},setChannel1:function(t,e){return this.setSampler2D("iChannel1",t,1,e)},setChannel2:function(t,e){return this.setSampler2D("iChannel2",t,2,e)},setChannel3:function(t,e){return this.setSampler2D("iChannel3",t,3,e)},initSampler2D:function(t){if(t.value){var e=this.gl;e.activeTexture(e.TEXTURE0+this._textureCount),e.bindTexture(e.TEXTURE_2D,t.value);var i=t.textureData;if(i&&!t.value.isRenderTexture){var s=e[a(i,"magFilter","linear").toUpperCase()],n=e[a(i,"minFilter","linear").toUpperCase()],r=e[a(i,"wrapS","repeat").toUpperCase()],o=e[a(i,"wrapT","repeat").toUpperCase()],h=e[a(i,"format","rgba").toUpperCase()];if(i.repeat&&(r=e.REPEAT,o=e.REPEAT),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!!i.flipY),i.width){var l=a(i,"width",512),u=a(i,"height",2),c=a(i,"border",0);e.texImage2D(e.TEXTURE_2D,0,h,l,u,c,h,e.UNSIGNED_BYTE,null)}else e.texImage2D(e.TEXTURE_2D,0,h,e.RGBA,e.UNSIGNED_BYTE,t.source);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,s),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,o)}this.renderer.setProgram(this.program),e.uniform1i(t.uniformLocation,this._textureCount),this._textureCount++}},syncUniforms:function(){var t,e,i,s,n,r=this.gl,a=this.uniforms,o=0;for(var h in a)i=(t=a[h]).glFunc,e=t.glValueLength,s=t.uniformLocation,null!==(n=t.value)&&(1===e?t.glMatrix?i.call(r,s,t.transpose,n):i.call(r,s,n):2===e?i.call(r,s,n.x,n.y):3===e?i.call(r,s,n.x,n.y,n.z):4===e?i.call(r,s,n.x,n.y,n.z,n.w):"sampler2D"===t.type&&(r.activeTexture(r.TEXTURE0+o),r.bindTexture(r.TEXTURE_2D,n),r.uniform1i(s,o),o++))},load:function(t){var e=this.gl,i=this.width,s=this.height,n=this.renderer,r=this.program,a=this.viewMatrix;if(!this.renderToTexture){var o=-this._displayOriginX,h=-this._displayOriginY;a[0]=t[0],a[1]=t[1],a[4]=t[2],a[5]=t[3],a[8]=t[4],a[9]=t[5],a[12]=a[0]*o+a[4]*h,a[13]=a[1]*o+a[5]*h}e.useProgram(r),e.uniformMatrix4fv(e.getUniformLocation(r,"uViewMatrix"),!1,a),e.uniform2f(e.getUniformLocation(r,"uResolution"),this.width,this.height);var l=this.uniforms,u=l.resolution;u.value.x=i,u.value.y=s,l.time.value=n.game.loop.getDuration();var c=this.pointer;if(c){var d=l.mouse,f=c.x/i,p=1-c.y/s;d.value.x=f.toFixed(2),d.value.y=p.toFixed(2)}this.syncUniforms()},flush:function(){var t=this.width,e=this.height,i=this.program,s=this.gl,n=this.vertexBuffer,r=this.renderer,a=2*Float32Array.BYTES_PER_ELEMENT;this.renderToTexture&&(r.setFramebuffer(this.framebuffer),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT)),s.bindBuffer(s.ARRAY_BUFFER,n);var o=s.getAttribLocation(i,"inPosition");-1!==o&&(s.enableVertexAttribArray(o),s.vertexAttribPointer(o,2,s.FLOAT,!1,a,0));var h=this.vertexViewF32;h[3]=e,h[4]=t,h[5]=e,h[8]=t,h[9]=e,h[10]=t;s.bufferSubData(s.ARRAY_BUFFER,0,this.bytes.subarray(0,6*a)),s.drawArrays(s.TRIANGLES,0,6),this.renderToTexture&&r.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},preDestroy:function(){var t=this.gl;t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(this.renderer.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null)}});t.exports=c},10612:t=>{t.exports=function(){}},13908:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),a=i(27902);n.register("shader",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"x",0),o=r(t,"y",0),h=r(t,"width",128),l=r(t,"height",128),u=new a(this.scene,i,n,o,h,l);return void 0!==e&&(t.add=e),s(this.scene,u,t),u}))},51979:(t,e,i)=>{var s=i(27902);i(61286).register("shader",(function(t,e,i,n,r,a,o){return this.displayList.add(new s(this.scene,t,e,i,n,r,a,o))}))},24252:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(19782),r=i(10612),t.exports={renderWebGL:n,renderCanvas:r}},19782:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){if(e.shader){if(i.addToRenderList(e),t.pipelines.clear(),e.renderToTexture)e.load(),e.flush();else{var r=s(e,i,n).calc;t.width===e._rendererWidth&&t.height===e._rendererHeight||e.projOrtho(0,t.width,t.height,0),e.load(r.matrix),e.flush()}t.pipelines.rebind()}}},19543:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n,r,a){for(var o=s.getTintAppendFloatAlpha(i.fillColor,i.fillAlpha*n),h=i.pathData,l=i.pathIndexes,u=0;u{t.exports=function(t,e,i,s){var n=i||e.fillColor,r=s||e.fillAlpha,a=(16711680&n)>>>16,o=(65280&n)>>>8,h=255&n;t.fillStyle="rgba("+a+","+o+","+h+","+r+")"}},17876:t=>{t.exports=function(t,e,i,s){var n=i||e.strokeColor,r=s||e.strokeAlpha,a=(16711680&n)>>>16,o=(65280&n)>>>8,h=255&n;t.strokeStyle="rgba("+a+","+o+","+h+","+r+")",t.lineWidth=e.lineWidth}},91461:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),a=i(88829),o=new s({Extends:r,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.GetBounds,n.FX,n.Mask,n.Origin,n.Pipeline,n.ScrollFactor,n.Transform,n.Visible],initialize:function(t,e,i){void 0===e&&(e="Shape"),r.call(this,t,e),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new a,this.width=0,this.height=0,this.initPipeline()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.isFilled=!1:(this.fillColor=t,this.fillAlpha=e,this.isFilled=!0),this},setStrokeStyle:function(t,e,i){return void 0===i&&(i=1),void 0===t?this.isStroked=!1:(this.lineWidth=t,this.strokeColor=e,this.strokeAlpha=i,this.isStroked=!0),this},setClosePath:function(t){return this.closePath=t,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}}});t.exports=o},50262:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n,r){var a=t.strokeTint,o=s.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*i);a.TL=o,a.TR=o,a.BL=o,a.BR=o;var h=e.pathData,l=h.length-1,u=e.lineWidth,c=u/2,d=h[0]-n,f=h[1]-r;e.closePath||(l-=2);for(var p=2;p{var s=i(2213),n=i(56694),r=i(75606),a=i(11117),o=i(26673),h=i(83392),l=i(91461),u=new n({Extends:l,Mixins:[s],initialize:function(t,e,i,s,n,r,a,h,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===n&&(n=0),void 0===r&&(r=360),void 0===a&&(a=!1),l.call(this,t,"Arc",new o(0,0,s)),this._startAngle=n,this._endAngle=r,this._anticlockwise=a,this._iterations=.01,this.setPosition(e,i);var c=2*this.geom.radius;this.setSize(c,c),void 0!==h&&this.setFillStyle(h,u),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(t){this._iterations=t,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(t){this.geom.radius=t;var e=2*t;this.setSize(e,e),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(t){this._startAngle=t,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(t){this._endAngle=t,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(t){this._anticlockwise=t,this.updateData()}},setRadius:function(t){return this.radius=t,this},setIterations:function(t){return void 0===t&&(t=.01),this.iterations=t,this},setStartAngle:function(t,e){return this._startAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},setEndAngle:function(t,e){return this._endAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},updateData:function(){var t=this._iterations,e=t,i=this.geom.radius,s=r(this._startAngle),n=r(this._endAngle),o=i,l=i;n-=s,this._anticlockwise?n<-h.PI2?n=-h.PI2:n>0&&(n=-h.PI2+n%h.PI2):n>h.PI2?n=h.PI2:n<0&&(n=h.PI2+n%h.PI2);for(var u,c=[o+Math.cos(s)*i,l+Math.sin(s)*i];e<1;)u=n*e+s,c.push(o+Math.cos(u)*i,l+Math.sin(u)*i),e+=t;return u=n+s,c.push(o+Math.cos(u)*i,l+Math.sin(u)*i),c.push(o+Math.cos(s)*i,l+Math.sin(s)*i),this.pathIndexes=a(c),this.pathData=c,this}});t.exports=u},23560:(t,e,i)=>{var s=i(75606),n=i(15608),r=i(17876),a=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var h=t.currentContext;if(a(t,h,e,i,o)){var l=e.radius;h.beginPath(),h.arc(l-e.originX*(2*l),l-e.originY*(2*l),l,s(e._startAngle),s(e._endAngle),e.anticlockwise),e.closePath&&h.closePath(),e.isFilled&&(n(h,e),h.fill()),e.isStroked&&(r(h,e),h.stroke()),h.restore()}}},10369:(t,e,i)=>{var s=i(28593),n=i(61286);n.register("arc",(function(t,e,i,n,r,a,o,h){return this.displayList.add(new s(this.scene,t,e,i,n,r,a,o,h))})),n.register("circle",(function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,0,360,!1,n,r))}))},2213:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(58356),r=i(23560),t.exports={renderWebGL:n,renderCanvas:r}},58356:(t,e,i)=>{var s=i(73329),n=i(19543),r=i(50262);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),h=s(e,i,a),l=o.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&n(o,l,e,d,u,c),e.isStroked&&r(o,e,d,u,c),t.pipelines.postBatch(e)}},15220:(t,e,i)=>{var s=i(56694),n=i(87203),r=i(11117),a=i(74118),o=i(91461),h=new s({Extends:o,Mixins:[n],initialize:function(t,e,i,s,n,r){void 0===e&&(e=0),void 0===i&&(i=0),o.call(this,t,"Curve",s),this._smoothness=32,this._curveBounds=new a,this.closePath=!1,this.setPosition(e,i),void 0!==n&&this.setFillStyle(n,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],s=this.geom.getPoints(e),n=0;n{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.currentContext;if(r(t,o,e,i,a)){var h=e._displayOriginX+e._curveBounds.x,l=e._displayOriginY+e._curveBounds.y,u=e.pathData,c=u.length-1,d=u[0]-h,f=u[1]-l;o.beginPath(),o.moveTo(d,f),e.closePath||(c-=2);for(var p=2;p{var s=i(61286),n=i(15220);s.register("curve",(function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))}))},87203:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(82958),r=i(4024),t.exports={renderWebGL:n,renderCanvas:r}},82958:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),h=n(e,i,a),l=o.calcMatrix.copyFrom(h.calc),u=e._displayOriginX+e._curveBounds.x,c=e._displayOriginY+e._curveBounds.y,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(o,l,e,d,u,c),e.isStroked&&r(o,e,d,u,c),t.pipelines.postBatch(e)}},28591:(t,e,i)=>{var s=i(56694),n=i(11117),r=i(84171),a=i(95669),o=i(91461),h=new s({Extends:o,Mixins:[r],initialize:function(t,e,i,s,n,r,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===n&&(n=128),o.call(this,t,"Ellipse",new a(s/2,n/2,s,n)),this._smoothness=64,this.setPosition(e,i),this.width=s,this.height=n,void 0!==r&&this.setFillStyle(r,h),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSize:function(t,e){return this.width=t,this.height=e,this.geom.setPosition(t/2,e/2),this.geom.setSize(t,e),this.updateData()},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){for(var t=[],e=this.geom.getPoints(this._smoothness),i=0;i{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.currentContext;if(r(t,o,e,i,a)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,f=u[1]-l;o.beginPath(),o.moveTo(d,f),e.closePath||(c-=2);for(var p=2;p{var s=i(28591);i(61286).register("ellipse",(function(t,e,i,n,r,a){return this.displayList.add(new s(this.scene,t,e,i,n,r,a))}))},84171:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(17554),r=i(55881),t.exports={renderWebGL:n,renderCanvas:r}},17554:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),h=n(e,i,a),l=o.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(o,l,e,d,u,c),e.isStroked&&r(o,e,d,u,c),t.pipelines.postBatch(e)}},39169:(t,e,i)=>{var s=i(56694),n=i(91461),r=i(88059),a=new s({Extends:n,Mixins:[r],initialize:function(t,e,i,s,r,a,o,h,l,u,c){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===r&&(r=128),void 0===a&&(a=32),void 0===o&&(o=32),n.call(this,t,"Grid",null),this.cellWidth=a,this.cellHeight=o,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(e,i),this.setSize(s,r),this.setFillStyle(h,l),void 0!==u&&this.setOutlineStyle(u,c),this.updateDisplayOrigin()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showCells=!1:(this.fillColor=t,this.fillAlpha=e,this.showCells=!0),this},setAltFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showAltCells=!1:(this.altFillColor=t,this.altFillAlpha=e,this.showAltCells=!0),this},setOutlineStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showOutline=!1:(this.outlineFillColor=t,this.outlineFillAlpha=e,this.showOutline=!0),this}});t.exports=a},95525:(t,e,i)=>{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.currentContext;if(r(t,o,e,i,a)){var h=-e._displayOriginX,l=-e._displayOriginY,u=i.alpha*e.alpha,c=e.width,d=e.height,f=e.cellWidth,p=e.cellHeight,v=Math.ceil(c/f),g=Math.ceil(d/p),m=f,y=p,x=f-(v*f-c),T=p-(g*p-d),w=e.showCells,E=e.showAltCells,S=e.showOutline,b=0,A=0,_=0,C=0,R=0;if(S&&(m--,y--,x===f&&x--,T===p&&T--),w&&e.fillAlpha>0)for(s(o,e),A=0;A0)for(s(o,e,e.altFillColor,e.altFillAlpha*u),A=0;A0){for(n(o,e,e.outlineFillColor,e.outlineFillAlpha*u),b=1;b{var s=i(61286),n=i(39169);s.register("grid",(function(t,e,i,s,r,a,o,h,l,u){return this.displayList.add(new n(this.scene,t,e,i,s,r,a,o,h,l,u))}))},88059:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(50639),r=i(95525),t.exports={renderWebGL:n,renderCanvas:r}},50639:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),o=s(e,i,r);a.calcMatrix.copyFrom(o.calc).translate(-e._displayOriginX,-e._displayOriginY);var h,l,u=i.alpha*e.alpha,c=e.width,d=e.height,f=e.cellWidth,p=e.cellHeight,v=Math.ceil(c/f),g=Math.ceil(d/p),m=f,y=p,x=f-(v*f-c),T=p-(g*p-d),w=e.showCells,E=e.showAltCells,S=e.showOutline,b=0,A=0,_=0,C=0,R=0;if(S&&(m--,y--,x===f&&x--,T===p&&T--),t.pipelines.preBatch(e),w&&e.fillAlpha>0)for(h=a.fillTint,l=n.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*u),h.TL=l,h.TR=l,h.BL=l,h.BR=l,A=0;A0)for(h=a.fillTint,l=n.getTintAppendFloatAlpha(e.altFillColor,e.altFillAlpha*u),h.TL=l,h.TR=l,h.BL=l,h.BR=l,A=0;A0){var M=a.strokeTint,P=n.getTintAppendFloatAlpha(e.outlineFillColor,e.outlineFillAlpha*u);for(M.TL=P,M.TR=P,M.BL=P,M.BR=P,b=1;b{var s=i(72296),n=i(56694),r=i(91461),a=new n({Extends:r,Mixins:[s],initialize:function(t,e,i,s,n,a,o,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=48),void 0===n&&(n=32),void 0===a&&(a=15658734),void 0===o&&(o=10066329),void 0===h&&(h=13421772),r.call(this,t,"IsoBox",null),this.projection=4,this.fillTop=a,this.fillLeft=o,this.fillRight=h,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(e,i),this.setSize(s,n),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=a},32884:(t,e,i)=>{var s=i(15608),n=i(49584);t.exports=function(t,e,i,r){i.addToRenderList(e);var a=t.currentContext;if(n(t,a,e,i,r)&&e.isFilled){var o=e.width,h=e.height,l=o/2,u=o/e.projection;e.showTop&&(s(a,e,e.fillTop),a.beginPath(),a.moveTo(-l,-h),a.lineTo(0,-u-h),a.lineTo(l,-h),a.lineTo(l,-1),a.lineTo(0,u-1),a.lineTo(-l,-1),a.lineTo(-l,-h),a.fill()),e.showLeft&&(s(a,e,e.fillLeft),a.beginPath(),a.moveTo(-l,0),a.lineTo(0,u),a.lineTo(0,u-h),a.lineTo(-l,-h),a.lineTo(-l,0),a.fill()),e.showRight&&(s(a,e,e.fillRight),a.beginPath(),a.moveTo(l,0),a.lineTo(0,u),a.lineTo(0,u-h),a.lineTo(l,-h),a.lineTo(l,0),a.fill()),a.restore()}}},88154:(t,e,i)=>{var s=i(61286),n=i(4415);s.register("isobox",(function(t,e,i,s,r,a,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,a,o))}))},72296:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(33101),r=i(32884),t.exports={renderWebGL:n,renderCanvas:r}},33101:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var a,o,h,l,u,c,d,f,p,v=t.pipelines.set(e.pipeline),g=s(e,i,r),m=v.calcMatrix.copyFrom(g.calc),y=e.width,x=e.height,T=y/2,w=y/e.projection,E=i.alpha*e.alpha;e.isFilled&&(t.pipelines.preBatch(e),e.showTop&&(a=n.getTintAppendFloatAlpha(e.fillTop,E),o=m.getX(-T,-x),h=m.getY(-T,-x),l=m.getX(0,-w-x),u=m.getY(0,-w-x),c=m.getX(T,-x),d=m.getY(T,-x),f=m.getX(0,w-x),p=m.getY(0,w-x),v.batchQuad(e,o,h,l,u,c,d,f,p,0,0,1,1,a,a,a,a,2)),e.showLeft&&(a=n.getTintAppendFloatAlpha(e.fillLeft,E),o=m.getX(-T,0),h=m.getY(-T,0),l=m.getX(0,w),u=m.getY(0,w),c=m.getX(0,w-x),d=m.getY(0,w-x),f=m.getX(-T,-x),p=m.getY(-T,-x),v.batchQuad(e,o,h,l,u,c,d,f,p,0,0,1,1,a,a,a,a,2)),e.showRight&&(a=n.getTintAppendFloatAlpha(e.fillRight,E),o=m.getX(T,0),h=m.getY(T,0),l=m.getX(0,w),u=m.getY(0,w),c=m.getX(0,w-x),d=m.getY(0,w-x),f=m.getX(T,-x),p=m.getY(T,-x),v.batchQuad(e,o,h,l,u,c,d,f,p,0,0,1,1,a,a,a,a,2)),t.pipelines.postBatch(e))}},65159:(t,e,i)=>{var s=i(56694),n=i(93387),r=i(91461),a=new s({Extends:r,Mixins:[n],initialize:function(t,e,i,s,n,a,o,h,l){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=48),void 0===n&&(n=32),void 0===a&&(a=!1),void 0===o&&(o=15658734),void 0===h&&(h=10066329),void 0===l&&(l=13421772),r.call(this,t,"IsoTriangle",null),this.projection=4,this.fillTop=o,this.fillLeft=h,this.fillRight=l,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=a,this.isFilled=!0,this.setPosition(e,i),this.setSize(s,n),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setReversed:function(t){return this.isReversed=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=a},9923:(t,e,i)=>{var s=i(15608),n=i(49584);t.exports=function(t,e,i,r){i.addToRenderList(e);var a=t.currentContext;if(n(t,a,e,i,r)&&e.isFilled){var o=e.width,h=e.height,l=o/2,u=o/e.projection,c=e.isReversed;e.showTop&&c&&(s(a,e,e.fillTop),a.beginPath(),a.moveTo(-l,-h),a.lineTo(0,-u-h),a.lineTo(l,-h),a.lineTo(0,u-h),a.fill()),e.showLeft&&(s(a,e,e.fillLeft),a.beginPath(),c?(a.moveTo(-l,-h),a.lineTo(0,u),a.lineTo(0,u-h)):(a.moveTo(-l,0),a.lineTo(0,u),a.lineTo(0,u-h)),a.fill()),e.showRight&&(s(a,e,e.fillRight),a.beginPath(),c?(a.moveTo(l,-h),a.lineTo(0,u),a.lineTo(0,u-h)):(a.moveTo(l,0),a.lineTo(0,u),a.lineTo(0,u-h)),a.fill()),a.restore()}}},67765:(t,e,i)=>{var s=i(61286),n=i(65159);s.register("isotriangle",(function(t,e,i,s,r,a,o,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,a,o,h))}))},93387:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(54946),r=i(9923),t.exports={renderWebGL:n,renderCanvas:r}},54946:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),o=s(e,i,r),h=a.calcMatrix.copyFrom(o.calc),l=e.width,u=e.height,c=l/2,d=l/e.projection,f=e.isReversed,p=i.alpha*e.alpha;if(e.isFilled){var v,g,m,y,x,T,w;if(t.pipelines.preBatch(e),e.showTop&&f){v=n.getTintAppendFloatAlpha(e.fillTop,p),g=h.getX(-c,-u),m=h.getY(-c,-u),y=h.getX(0,-d-u),x=h.getY(0,-d-u),T=h.getX(c,-u),w=h.getY(c,-u);var E=h.getX(0,d-u),S=h.getY(0,d-u);a.batchQuad(e,g,m,y,x,T,w,E,S,0,0,1,1,v,v,v,v,2)}e.showLeft&&(v=n.getTintAppendFloatAlpha(e.fillLeft,p),f?(g=h.getX(-c,-u),m=h.getY(-c,-u),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)):(g=h.getX(-c,0),m=h.getY(-c,0),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)),a.batchTri(e,g,m,y,x,T,w,0,0,1,1,v,v,v,2)),e.showRight&&(v=n.getTintAppendFloatAlpha(e.fillRight,p),f?(g=h.getX(c,-u),m=h.getY(c,-u),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)):(g=h.getX(c,0),m=h.getY(c,0),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)),a.batchTri(e,g,m,y,x,T,w,0,0,1,1,v,v,v,2)),t.pipelines.postBatch(e)}}},579:(t,e,i)=>{var s=i(56694),n=i(91461),r=i(88829),a=i(52660),o=new s({Extends:n,Mixins:[a],initialize:function(t,e,i,s,a,o,h,l,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===a&&(a=0),void 0===o&&(o=128),void 0===h&&(h=0),n.call(this,t,"Line",new r(s,a,o,h));var c=Math.max(1,this.geom.right-this.geom.left),d=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(e,i),this.setSize(c,d),void 0!==l&&this.setStrokeStyle(1,l,u),this.updateDisplayOrigin()},setLineWidth:function(t,e){return void 0===e&&(e=t),this._startWidth=t,this._endWidth=e,this.lineWidth=t,this},setTo:function(t,e,i,s){return this.geom.setTo(t,e,i,s),this}});t.exports=o},52044:(t,e,i)=>{var s=i(17876),n=i(49584);t.exports=function(t,e,i,r){i.addToRenderList(e);var a=t.currentContext;if(n(t,a,e,i,r)){var o=e._displayOriginX,h=e._displayOriginY;e.isStroked&&(s(a,e),a.beginPath(),a.moveTo(e.geom.x1-o,e.geom.y1-h),a.lineTo(e.geom.x2-o,e.geom.y2-h),a.stroke()),a.restore()}}},85665:(t,e,i)=>{var s=i(61286),n=i(579);s.register("line",(function(t,e,i,s,r,a,o,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,a,o,h))}))},52660:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(46952),r=i(52044),t.exports={renderWebGL:n,renderCanvas:r}},46952:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),o=s(e,i,r);a.calcMatrix.copyFrom(o.calc);var h=e._displayOriginX,l=e._displayOriginY,u=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isStroked){var c=a.strokeTint,d=n.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*u);c.TL=d,c.TR=d,c.BL=d,c.BR=d;var f=e._startWidth,p=e._endWidth;a.batchLine(e.geom.x1-h,e.geom.y1-l,e.geom.x2-h,e.geom.y2-l,f,p,1,0,!1,o.sprite,o.camera)}t.pipelines.postBatch(e)}},91249:(t,e,i)=>{var s=i(70573),n=i(56694),r=i(11117),a=i(14045),o=i(8580),h=i(91461),l=i(18974),u=new n({Extends:h,Mixins:[s],initialize:function(t,e,i,s,n,r){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Polygon",new o(s));var l=a(this.geom);this.setPosition(e,i),this.setSize(l.width,l.height),void 0!==n&&this.setFillStyle(n,r),this.updateDisplayOrigin(),this.updateData()},smooth:function(t){void 0===t&&(t=1);for(var e=0;e{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.currentContext;if(r(t,o,e,i,a)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,f=u[1]-l;o.beginPath(),o.moveTo(d,f),e.closePath||(c-=2);for(var p=2;p{var s=i(61286),n=i(91249);s.register("polygon",(function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))}))},70573:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(72841),r=i(40834),t.exports={renderWebGL:n,renderCanvas:r}},72841:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),h=n(e,i,a),l=o.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(o,l,e,d,u,c),e.isStroked&&r(o,e,d,u,c),t.pipelines.postBatch(e)}},517:(t,e,i)=>{var s=i(56694),n=i(74118),r=i(91461),a=i(37673),o=new s({Extends:r,Mixins:[a],initialize:function(t,e,i,s,a,o,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===a&&(a=128),r.call(this,t,"Rectangle",new n(0,0,s,a)),this.setPosition(e,i),this.setSize(s,a),void 0!==o&&this.setFillStyle(o,h),this.updateDisplayOrigin(),this.updateData()},setSize:function(t,e){this.width=t,this.height=e,this.geom.setSize(t,e),this.updateData(),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=o},4091:(t,e,i)=>{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.currentContext;if(r(t,o,e,i,a)){var h=e._displayOriginX,l=e._displayOriginY;e.isFilled&&(s(o,e),o.fillRect(-h,-l,e.width,e.height)),e.isStroked&&(n(o,e),o.beginPath(),o.rect(-h,-l,e.width,e.height),o.stroke()),o.restore()}}},94355:(t,e,i)=>{var s=i(61286),n=i(517);s.register("rectangle",(function(t,e,i,s,r,a){return this.displayList.add(new n(this.scene,t,e,i,s,r,a))}))},37673:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(43532),r=i(4091),t.exports={renderWebGL:n,renderCanvas:r}},43532:(t,e,i)=>{var s=i(73329),n=i(50262),r=i(75512);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),h=s(e,i,a);o.calcMatrix.copyFrom(h.calc);var l=e._displayOriginX,u=e._displayOriginY,c=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isFilled){var d=o.fillTint,f=r.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*c);d.TL=f,d.TR=f,d.BL=f,d.BR=f,o.batchFillRect(-l,-u,e.width,e.height)}e.isStroked&&n(o,e,c,l,u),t.pipelines.postBatch(e)}},77843:(t,e,i)=>{var s=i(87956),n=i(56694),r=i(11117),a=i(91461),o=new n({Extends:a,Mixins:[s],initialize:function(t,e,i,s,n,r,o,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=5),void 0===n&&(n=32),void 0===r&&(r=64),a.call(this,t,"Star",null),this._points=s,this._innerRadius=n,this._outerRadius=r,this.setPosition(e,i),this.setSize(2*r,2*r),void 0!==o&&this.setFillStyle(o,h),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,s=this._outerRadius,n=Math.PI/2*3,a=Math.PI/e,o=s,h=s;t.push(o,h+-s);for(var l=0;l{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.currentContext;if(r(t,o,e,i,a)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,f=u[1]-l;o.beginPath(),o.moveTo(d,f),e.closePath||(c-=2);for(var p=2;p{var s=i(77843);i(61286).register("star",(function(t,e,i,n,r,a,o){return this.displayList.add(new s(this.scene,t,e,i,n,r,a,o))}))},87956:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(12037),r=i(11401),t.exports={renderWebGL:n,renderCanvas:r}},12037:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),h=n(e,i,a),l=o.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(o,l,e,d,u,c),e.isStroked&&r(o,e,d,u,c),t.pipelines.postBatch(e)}},21873:(t,e,i)=>{var s=i(56694),n=i(91461),r=i(66349),a=i(70498),o=new s({Extends:n,Mixins:[a],initialize:function(t,e,i,s,a,o,h,l,u,c,d){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===a&&(a=128),void 0===o&&(o=64),void 0===h&&(h=0),void 0===l&&(l=128),void 0===u&&(u=128),n.call(this,t,"Triangle",new r(s,a,o,h,l,u));var f=this.geom.right-this.geom.left,p=this.geom.bottom-this.geom.top;this.setPosition(e,i),this.setSize(f,p),void 0!==c&&this.setFillStyle(c,d),this.updateDisplayOrigin(),this.updateData()},setTo:function(t,e,i,s,n,r){return this.geom.setTo(t,e,i,s,n,r),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=o},60213:(t,e,i)=>{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.currentContext;if(r(t,o,e,i,a)){var h=e._displayOriginX,l=e._displayOriginY,u=e.geom.x1-h,c=e.geom.y1-l,d=e.geom.x2-h,f=e.geom.y2-l,p=e.geom.x3-h,v=e.geom.y3-l;o.beginPath(),o.moveTo(u,c),o.lineTo(d,f),o.lineTo(p,v),o.closePath(),e.isFilled&&(s(o,e),o.fill()),e.isStroked&&(n(o,e),o.stroke()),o.restore()}}},79296:(t,e,i)=>{var s=i(61286),n=i(21873);s.register("triangle",(function(t,e,i,s,r,a,o,h,l,u){return this.displayList.add(new n(this.scene,t,e,i,s,r,a,o,h,l,u))}))},70498:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(72291),r=i(60213),t.exports={renderWebGL:n,renderCanvas:r}},72291:(t,e,i)=>{var s=i(73329),n=i(50262),r=i(75512);t.exports=function(t,e,i,a){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),h=s(e,i,a);o.calcMatrix.copyFrom(h.calc);var l=e._displayOriginX,u=e._displayOriginY,c=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isFilled){var d=o.fillTint,f=r.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*c);d.TL=f,d.TR=f,d.BL=f,d.BR=f;var p=e.geom.x1-l,v=e.geom.y1-u,g=e.geom.x2-l,m=e.geom.y2-u,y=e.geom.x3-l,x=e.geom.y3-u;o.batchFillTriangle(p,v,g,m,y,x,h.sprite,h.camera)}e.isStroked&&n(o,e,c,l,u),t.pipelines.postBatch(e)}},13747:(t,e,i)=>{var s=i(16569),n=i(56694),r=i(64937),a=i(89980),o=i(20791),h=new n({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.FX,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,o],initialize:function(t,e,i,n,r){a.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s(this),this.setTexture(n,r),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e){return this.anims.play(t,e)},playReverse:function(t,e){return this.anims.playReverse(t,e)},playAfterDelay:function(t,e){return this.anims.playAfterDelay(t,e)},playAfterRepeat:function(t,e){return this.anims.playAfterRepeat(t,e)},chain:function(t){return this.anims.chain(t)},stop:function(){return this.anims.stop()},stopAfterDelay:function(t){return this.anims.stopAfterDelay(t)},stopAfterRepeat:function(t){return this.anims.stopAfterRepeat(t)},stopOnFrame:function(t){return this.anims.stopOnFrame(t)},toJSON:function(){return r.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=h},27573:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},89219:(t,e,i)=>{var s=i(88933),n=i(32291),r=i(99325),a=i(20494),o=i(13747);r.register("sprite",(function(t,e){void 0===t&&(t={});var i=a(t,"key",null),r=a(t,"frame",null),h=new o(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),s(this.scene,h,t),n(h,t),h}))},66135:(t,e,i)=>{var s=i(61286),n=i(13747);s.register("sprite",(function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))}))},20791:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(21034),r=i(27573),t.exports={renderWebGL:n,renderCanvas:r}},21034:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),e.pipeline.batchSprite(e,i,s)}},32979:t=>{t.exports=function(t,e,i){var s=t.canvas,n=t.context,r=t.style,a=[],o=0,h=i.length;r.maxLines>0&&r.maxLines1&&(d+=f*(h-1)),{width:o,height:d,lines:h,lineWidths:a,lineSpacing:f,lineHeight:c}}},27030:(t,e,i)=>{var s=i(61068);t.exports=function(t){var e=s.create(this),i=e.getContext("2d",{willReadFrequently:!0});t.syncFont(e,i);var n=i.measureText(t.testString);if("actualBoundingBoxAscent"in n){var r=n.actualBoundingBoxAscent,a=n.actualBoundingBoxDescent;return s.remove(e),{ascent:r,descent:a,fontSize:r+a}}var o=Math.ceil(n.width*t.baselineX),h=o,l=2*h;h=h*t.baselineY|0,e.width=o,e.height=l,i.fillStyle="#f00",i.fillRect(0,0,o,l),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,h);var u={ascent:0,descent:0,fontSize:0},c=i.getImageData(0,0,o,l);if(!c)return u.ascent=h,u.descent=h+6,u.fontSize=u.ascent+u.descent,s.remove(e),u;var d,f,p=c.data,v=p.length,g=4*o,m=0,y=!1;for(d=0;dh;d--){for(f=0;f{var s=i(99584),n=i(61068),r=i(56694),a=i(64937),o=i(89980),h=i(32979),l=i(10850),u=i(55638),c=i(80032),d=i(74744),f=new r({Extends:o,Mixins:[a.Alpha,a.BlendMode,a.ComputedSize,a.Crop,a.Depth,a.Flip,a.FX,a.GetBounds,a.Mask,a.Origin,a.Pipeline,a.ScrollFactor,a.Tint,a.Transform,a.Visible,c],initialize:function(t,e,i,s,r){void 0===e&&(e=0),void 0===i&&(i=0),o.call(this,t,"Text"),this.renderer=t.sys.renderer,this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.canvas=n.create(this),this.context=this.canvas.getContext("2d"),this.style=new d(this,r),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this._text=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.lineSpacing=0,this.dirty=!1,0===this.style.resolution&&(this.style.resolution=1),this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(s),r&&r.padding&&this.setPadding(r.padding),r&&r.lineSpacing&&this.setLineSpacing(r.lineSpacing)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",s(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(t){var e=this.style;if(e.wordWrapCallback){var i=e.wordWrapCallback.call(e.wordWrapCallbackScope,t,this);return Array.isArray(i)&&(i=i.join("\n")),i}return e.wordWrapWidth?e.wordWrapUseAdvanced?this.advancedWordWrap(t,this.context,this.style.wordWrapWidth):this.basicWordWrap(t,this.context,this.style.wordWrapWidth):t},advancedWordWrap:function(t,e,i){for(var s="",n=t.replace(/ +/gi," ").split(this.splitRegExp),r=n.length,a=0;al){if(0===c){for(var v=f;v.length&&(v=v.slice(0,-1),!((p=e.measureText(v).width)<=l)););if(!v.length)throw new Error("wordWrapWidth < a single character");var g=d.substr(v.length);u[c]=g,h+=v}var m=u[c].length?c:c+1,y=u.slice(m).join(" ").replace(/[ \n]*$/gi,"");n.splice(a+1,0,y),r=n.length;break}h+=f,l-=p}s+=h.replace(/[ \n]*$/gi,"")+"\n"}}return s=s.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var s="",n=t.split(this.splitRegExp),r=n.length-1,a=e.measureText(" ").width,o=0;o<=r;o++){for(var h=i,l=n[o].split(" "),u=l.length-1,c=0;c<=u;c++){var d=l[c],f=e.measureText(d).width,p=f;ch&&c>0&&(s+="\n",h=i),s+=d,c0&&(d+=l.lineSpacing*v),i.rtl)c=f-c-u.left-u.right;else if("right"===i.align)c+=a-l.lineWidths[v];else if("center"===i.align)c+=(a-l.lineWidths[v])/2;else if("justify"===i.align){if(l.lineWidths[v]/l.width>=.85){var g=l.width-l.lineWidths[v],m=e.measureText(" ").width,y=o[v].trim(),x=y.split(" ");g+=(o[v].length-y.length)*m;for(var T=Math.floor(g/m),w=0;T>0;)x[w]+=" ",w=(w+1)%(x.length-1||1),--T;o[v]=x.join(" ")}}this.autoRound&&(c=Math.round(c),d=Math.round(d)),i.strokeThickness&&(i.syncShadow(e,i.shadowStroke),e.strokeText(o[v],c,d)),i.color&&(i.syncShadow(e,i.shadowFill),e.fillText(o[v],c,d))}e.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var E=this.input;return E&&!E.customHitArea&&(E.hitArea.width=this.width,E.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(t){this.setText(t)}},toJSON:function(){var t=a.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&u(this.canvas),n.remove(this.canvas),this.texture.destroy()}});t.exports=f},71649:t=>{t.exports=function(t,e,i,s){0!==e.width&&0!==e.height&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,s))}},75397:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),a=i(76555);n.register("text",(function(t,e){void 0===t&&(t={});var i=r(t,"text",""),n=r(t,"style",null),o=r(t,"padding",null);null!==o&&(n.padding=o);var h=new a(this.scene,0,0,i,n);return void 0!==e&&(t.add=e),s(this.scene,h,t),h.autoRound=r(t,"autoRound",!0),h.resolution=r(t,"resolution",1),h}))},94627:(t,e,i)=>{var s=i(76555);i(61286).register("text",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},80032:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(76128),r=i(71649),t.exports={renderWebGL:n,renderCanvas:r}},74744:(t,e,i)=>{var s=i(56694),n=i(20494),r=i(10850),a=i(27030),o={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new s({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this.wordWrapWidth,this.wordWrapCallback,this.wordWrapCallbackScope,this.wordWrapUseAdvanced,this._font,this.setStyle(e,!1,!0)},setStyle:function(t,e,i){for(var s in void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),o){var h=i?o[s][1]:this[s];this[s]="wordWrapCallback"===s||"wordWrapCallbackScope"===s?r(t,o[s][0],h):n(t,o[s][0],h)}var l=r(t,"font",null);null!==l&&this.setFont(l,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var u=r(t,"fill",null);null!==u&&(this.color=u);var c=r(t,"metrics",!1);return c?this.metrics={ascent:r(c,"ascent",0),descent:r(c,"descent",0),fontSize:r(c,"fontSize",0)}:!e&&this.metrics||(this.metrics=a(this)),e?this.parent.updateText():this.parent},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow: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)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=a(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i=t,s="",n="";if("string"!=typeof t)i=r(t,"fontFamily","Courier"),s=r(t,"fontSize","16px"),n=r(t,"fontStyle","");else{var a=t.split(" "),o=0;n=a.length>2?a[o++]:"",s=a[o++]||"16px",i=a[o++]||"Courier"}return i===this.fontFamily&&s===this.fontSize&&n===this.fontStyle||(this.fontFamily=i,this.fontSize=s,this.fontStyle=n,e&&this.update(!0)),this.parent},setFontFamily:function(t){return this.fontFamily!==t&&(this.fontFamily=t,this.update(!0)),this.parent},setFontStyle:function(t){return this.fontStyle!==t&&(this.fontStyle=t,this.update(!0)),this.parent},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize!==t&&(this.fontSize=t,this.update(!0)),this.parent},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setResolution:function(t){return this.resolution=t,this.update(!1)},setStroke:function(t,e){return void 0===e&&(e=this.strokeThickness),void 0===t&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):this.stroke===t&&this.strokeThickness===e||(this.stroke=t,this.strokeThickness=e,this.update(!0)),this.parent},setShadow:function(t,e,i,s,n,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===s&&(s=0),void 0===n&&(n=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=s,this.shadowStroke=n,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in o)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},76128:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n){if(0!==e.width&&0!==e.height){i.addToRenderList(e);var r=e.frame,a=r.width,o=r.height,h=s.getTintAppendFloatAlpha,l=t.pipelines.set(e.pipeline,e),u=l.setTexture2D(r.glTexture,e);l.batchTexture(e,r.glTexture,a,o,e.x,e.y,a/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,a,o,h(e.tintTopLeft,i.alpha*e._alphaTL),h(e.tintTopRight,i.alpha*e._alphaTR),h(e.tintBottomLeft,i.alpha*e._alphaBL),h(e.tintBottomRight,i.alpha*e._alphaBR),e.tintFill,0,0,i,n,!1,u)}}},35856:(t,e,i)=>{var s=i(61068),n=i(56694),r=i(64937),a=i(89980),o=i(3504),h=i(8213),l=i(9271),u=i(93736),c=new n({Extends:a,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.FX,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,l],initialize:function(t,e,i,n,r,h,l){var c=t.sys.renderer;a.call(this,t,"TileSprite");var d=t.sys.textures.get(h),f=d.get(l);f.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed textures"),f=(d=t.sys.textures.get("__MISSING")).get()),n&&r?(n=Math.floor(n),r=Math.floor(r)):(n=f.width,r=f.height),this._tilePosition=new u,this._tileScale=new u(1,1),this.dirty=!1,this.renderer=c,this.canvas=s.create(this,n,r),this.context=this.canvas.getContext("2d"),this.displayTexture=d,this.displayFrame=f,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=o(f.width),this.potHeight=o(f.height),this.fillCanvas=s.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(e,i),this.setSize(n,r),this.setFrame(l),this.setOriginFromFrame(),this.initPipeline()},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){var e=this.displayTexture.get(t);return this.potWidth=o(e.width),this.potHeight=o(e.height),this.canvas.width=0,e.cutWidth&&e.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=e,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileScale:function(t,e){return void 0===t&&(t=this.tileScaleX),void 0===e&&(e=t),this.tileScaleX=t,this.tileScaleY=e,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var t=this.displayFrame;if(t.source.isRenderTexture||t.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var e=this.fillContext,i=this.fillCanvas,s=this.potWidth,n=this.potHeight;this.renderer&&this.renderer.gl||(s=t.cutWidth,n=t.cutHeight),e.clearRect(0,0,s,n),i.width=s,i.height=n,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,s,n),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var t=this.canvas;if(t.width===this.width&&t.height===this.height||(t.width=this.width,t.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context;this.scene.sys.game.config.antialias||h.disable(e);var i=this._tileScale.x,s=this._tileScale.y,n=this._tilePosition.x,r=this._tilePosition.y;e.clearRect(0,0,this.width,this.height),e.save(),e.scale(i,s),e.translate(-n,-r),e.fillStyle=this.fillPattern,e.fillRect(n,r,this.width/i,this.height/s),e.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),s.remove(this.canvas),s.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}});t.exports=c},93305:t=>{t.exports=function(t,e,i,s){e.updateCanvas(),i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},63950:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),a=i(35856);n.register("tileSprite",(function(t,e){void 0===t&&(t={});var i=r(t,"x",0),n=r(t,"y",0),o=r(t,"width",512),h=r(t,"height",512),l=r(t,"key",""),u=r(t,"frame",""),c=new a(this.scene,i,n,o,h,l,u);return void 0!==e&&(t.add=e),s(this.scene,c,t),c}))},20509:(t,e,i)=>{var s=i(35856);i(61286).register("tileSprite",(function(t,e,i,n,r,a){return this.displayList.add(new s(this.scene,t,e,i,n,r,a))}))},9271:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(74287),r=i(93305),t.exports={renderWebGL:n,renderCanvas:r}},74287:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n){e.updateCanvas();var r=e.width,a=e.height;if(0!==r&&0!==a){i.addToRenderList(e);var o=s.getTintAppendFloatAlpha,h=t.pipelines.set(e.pipeline,e),l=h.setTexture2D(e.fillPattern,e);h.batchTexture(e,e.fillPattern,e.displayFrame.width*e.tileScaleX,e.displayFrame.height*e.tileScaleY,e.x,e.y,r,a,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.originX*r,e.originY*a,0,0,r,a,o(e.tintTopLeft,i.alpha*e._alphaTL),o(e.tintTopRight,i.alpha*e._alphaTR),o(e.tintBottomLeft,i.alpha*e._alphaBL),o(e.tintBottomRight,i.alpha*e._alphaBR),e.tintFill,e.tilePositionX%e.displayFrame.width/e.displayFrame.width,e.tilePositionY%e.displayFrame.height/e.displayFrame.height,i,n,!1,l)}}},8630:(t,e,i)=>{var s=i(56694),n=i(82897),r=i(64937),a=i(56631),o=i(97081),h=i(33963),l=i(89980),u=i(76038),c=i(76583),d=i(77974),f=i(83392),p=new s({Extends:l,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.FX,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,d],initialize:function(t,e,i,s){l.call(this,t,"Video"),this.video=null,this.videoTexture=null,this.videoTextureSource=null,this.snapshotTexture=null,this.flipY=!1,this._key=c(),this.touchLocked=!0,this.playWhenUnlocked=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={play:this.playHandler.bind(this),load:this.loadHandler.bind(this),error:this.loadErrorHandler.bind(this),end:this.completeHandler.bind(this),time:this.timeUpdateHandler.bind(this),seeking:this.seekingHandler.bind(this),seeked:this.seekedHandler.bind(this)},this._crop=this.resetCropObject(),this.markers={},this._markerIn=-1,this._markerOut=f.MAX_SAFE_INTEGER,this._lastUpdate=0,this._cacheKey="",this._isSeeking=!1,this.removeVideoElementOnDestroy=!1,this.setPosition(e,i),this.setSize(256,256),this.initPipeline(),s&&this.changeSource(s,!1);var n=t.sys.game.events;n.on(o.PAUSE,this.globalPause,this),n.on(o.RESUME,this.globalResume,this);var r=t.sys.sound;r&&r.on(u.GLOBAL_MUTE,this.globalMute,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},play:function(t,e,i){if(this.touchLocked&&this.playWhenUnlocked||this.isPlaying())return this;var s=this.video;if(!s)return console.warn("Video not loaded"),this;void 0===t&&(t=s.loop);var n=this.scene.sys.sound;return n&&n.mute&&this.setMute(!0),isNaN(e)||(this._markerIn=e),!isNaN(i)&&i>e&&(this._markerOut=i),s.loop=t,this.createPlayPromise()},createPlayPromise:function(){var t=this.video,e=this._callbacks;this.isPlaying();var i=t.play();return void 0!==i?i.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)):(t.addEventListener("playing",e.play),t.readyState<2&&(this.retry=this.retryLimit,this._retryID&&window.clearTimeout(this._retryID),this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))),t.addEventListener("error",e.error),t.addEventListener("abort",e.error),t.addEventListener("stalled",e.error),t.addEventListener("suspend",e.error),t.addEventListener("waiting",e.error),t.addEventListener("ended",e.end),t.addEventListener("timeupdate",e.time),t.addEventListener("seeking",e.seeking),t.addEventListener("seeked",e.seeked),t.addEventListener("play",this.playHandler2.bind(this)),t.addEventListener("pause",this.pauseHandler.bind(this)),this},playHandler2:function(t){console.log("play",this._cacheKey)},pauseHandler:function(t){console.log("paused",this._cacheKey)},changeSource:function(t,e,i,s,n){void 0===e&&(e=!0),this.video&&this.stop();var r=this.scene.sys.cache.video.get(t);return r?(this.video=r,this._cacheKey=t,this._codePaused=r.paused,this._codeMuted=r.muted,this.videoTexture?(this.scene.sys.textures.remove(this._key),this.videoTexture=this.scene.sys.textures.create(this._key,r,r.videoWidth,r.videoHeight),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,r.videoWidth,r.videoHeight),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(a.VIDEO_CREATED,this,r.videoWidth,r.videoHeight)):this.updateTexture(),r.currentTime=0,this._lastUpdate=0,e&&this.play(i,s,n)):this.video=null,this},addMarker:function(t,e,i){return!isNaN(e)&&e>=0&&!isNaN(i)&&(this.markers[t]=[e,i]),this},playMarker:function(t,e){var i=this.markers[t];return i&&this.play(e,i[0],i[1]),this},removeMarker:function(t){return delete this.markers[t],this},snapshot:function(t,e){return void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.snapshotArea(0,0,this.width,this.height,t,e)},snapshotArea:function(t,e,i,s,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===s&&(s=this.height),void 0===n&&(n=i),void 0===r&&(r=s);var a=this.video,o=this.snapshotTexture;return o?(o.setSize(n,r),a&&o.context.drawImage(a,t,e,i,s,0,0,n,r)):(o=this.scene.sys.textures.createCanvas(c(),n,r),this.snapshotTexture=o,a&&o.context.drawImage(a,t,e,i,s,0,0,n,r)),o.update()},saveSnapshotTexture:function(t){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,t):this.snapshotTexture=this.scene.sys.textures.createCanvas(t,this.width,this.height),this.snapshotTexture},loadURL:function(t,e,i,s){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var n=document.createElement("video");return n.controls=!1,i&&(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")),n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),void 0!==s&&n.setAttribute("crossorigin",s),n.addEventListener("error",this._callbacks.error),n.addEventListener(e,this._callbacks.load),n.src=t,n.load(),this.video=n,this},loadMediaStream:function(t,e,i){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var s=document.createElement("video");s.controls=!1,i&&(s.muted=!0,s.defaultMuted=!0,s.setAttribute("autoplay","autoplay")),s.setAttribute("playsinline","playsinline"),s.setAttribute("preload","auto"),s.addEventListener("error",this._callbacks.error,!0),s.addEventListener(e,this._callbacks.load,!0);try{s.srcObject=t}catch(e){s.src=window.URL.createObjectURL(t)}return s.load(),this.video=s,this},playPromiseSuccessHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(a.VIDEO_PLAY,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn)},playPromiseErrorHandler:function(t){console.log("pp error handler",t),this.scene.sys.input.once(h.POINTER_DOWN,this.unlockHandler,this),this.touchLocked=!0,this.playWhenUnlocked=!0,this.emit(a.VIDEO_ERROR,this,t)},playHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(a.VIDEO_PLAY,this),this.video.removeEventListener("playing",this._callbacks.play,!0)},loadHandler:function(){this.updateTexture()},loadErrorHandler:function(t){this.stop(),this.emit(a.VIDEO_ERROR,this,t)},unlockHandler:function(){this.touchLocked=!1,this.playWhenUnlocked=!1,this.emit(a.VIDEO_UNLOCKED,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn),this.createPlayPromise()},completeHandler:function(){console.log("ended"),this.emit(a.VIDEO_COMPLETE,this)},timeUpdateHandler:function(){this.video&&this.video.currentTime=this._markerOut&&(t.loop?(t.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=e,this.emit(a.VIDEO_LOOP,this)):(this.emit(a.VIDEO_COMPLETE,this),console.log("prEUp stop"),this.stop())))}},checkVideoProgress:function(){this.video.readyState>=2?this.updateTexture():(this.retry--,this.retry>0?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):this.emit(a.VIDEO_TIMEOUT,this))},updateTexture:function(){var t=this.video,e=t.videoWidth,i=t.videoHeight;if(this.videoTexture){var s=this.videoTextureSource;s.source!==t&&(s.source=t,s.width=e,s.height=i),s.update()}else this.videoTexture=this.scene.sys.textures.create(this._key,t,e,i),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,e,i),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(a.VIDEO_CREATED,this,e,i)},getVideoKey:function(){return this._cacheKey},seekTo:function(t){var e=this.video;if(e){var i=e.duration;if(i!==1/0&&!isNaN(i)){var s=i*t;this.setCurrentTime(s)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e=this.video;if(e){if("string"==typeof t){var i=t[0],s=parseFloat(t.substr(1));"+"===i?t=e.currentTime+s:"-"===i&&(t=e.currentTime-s)}e.currentTime=t,this._lastUpdate=t}return this},isSeeking:function(){return this._isSeeking},seekingHandler:function(){this._isSeeking=!0,this.emit(a.VIDEO_SEEKING,this)},seekedHandler:function(){this._isSeeking=!1,this.emit(a.VIDEO_SEEKED,this),this.video&&this.updateTexture()},getProgress:function(){var t=this.video;if(t){var e=t.currentTime,i=t.duration;if(i!==1/0&&!isNaN(i))return e/i}return 0},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){void 0===t&&(t=!0),this._codeMuted=t;var e=this.video;return e&&(e.muted=!!this._systemMuted||t),this},isMuted:function(){return this._codeMuted},globalMute:function(t,e){this._systemMuted=e;var i=this.video;i&&(i.muted=!!this._codeMuted||e)},globalPause:function(){this._systemPaused=!0,this.video&&this.video.pause()},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&this.createPlayPromise()},setPaused:function(t){void 0===t&&(t=!0);var e=this.video;return this._codePaused=t,e&&(t?e.paused||e.pause():t||e.paused&&!this._systemPaused&&this.createPlayPromise()),this},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(t){return void 0===t&&(t=1),this.video&&(this.video.volume=n(t,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(t){return this.video&&(this.video.playbackRate=t),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(t){return void 0===t&&(t=!0),this.video&&(this.video.loop=t),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!1),this.videoTexture&&this.scene.sys.textures.renameTexture(this._key,t),this._key=t,this.flipY=e,this.videoTextureSource&&this.videoTextureSource.setFlipY(e),this.videoTexture},stop:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.removeEventListener(i,e[i]);t.pause()}return this._retryID&&window.clearTimeout(this._retryID),this.emit(a.VIDEO_STOP,this),this},removeVideoElement:function(){var t=this.video;if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("autoplay"),t.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(),this.removeVideoElementOnDestroy&&this.removeVideoElement();var t=this.scene.sys.game.events;t.off(o.PAUSE,this.globalPause,this),t.off(o.RESUME,this.globalResume,this);var e=this.scene.sys.sound;e&&e.off(u.GLOBAL_MUTE,this.globalMute,this),this._retryID&&window.clearTimeout(this._retryID)}});t.exports=p},56933:t=>{t.exports=function(t,e,i,s){e.videoTexture&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,s))}},65601:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),a=i(8630);n.register("video",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=new a(this.scene,0,0,i);return void 0!==e&&(t.add=e),s(this.scene,n,t),n}))},215:(t,e,i)=>{var s=i(8630);i(61286).register("video",(function(t,e,i){return this.displayList.add(new s(this.scene,t,e,i))}))},77974:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(83572),r=i(56933),t.exports={renderWebGL:n,renderCanvas:r}},83572:t=>{t.exports=function(t,e,i,s){e.videoTexture&&(i.addToRenderList(e),e.pipeline.batchSprite(e,i,s))}},71030:(t,e,i)=>{var s=i(95723),n=i(26673),r=i(65650),a=i(56694),o=i(64937),h=i(89980),l=i(74118),u=i(94287),c=new a({Extends:h,Mixins:[o.Depth,o.GetBounds,o.Origin,o.Transform,o.ScrollFactor,o.Visible],initialize:function(t,e,i,n,r){void 0===n&&(n=1),void 0===r&&(r=n),h.call(this,t,"Zone"),this.setPosition(e,i),this.width=n,this.height=r,this.blendMode=s.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e,i){void 0===i&&(i=!0),this.width=t,this.height=e,this.updateDisplayOrigin();var s=this.input;return i&&s&&!s.customHitArea&&(s.hitArea.width=t,s.hitArea.height=e),this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},setCircleDropZone:function(t){return this.setDropZone(new n(0,0,t),r)},setRectangleDropZone:function(t,e){return this.setDropZone(new l(0,0,t,e),u)},setDropZone:function(t,e){return this.input||this.setInteractive(t,e,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(t,e,i){i.addToRenderList(e)},renderWebGL:function(t,e,i){i.addToRenderList(e)}});t.exports=c},24067:(t,e,i)=>{var s=i(99325),n=i(20494),r=i(71030);s.register("zone",(function(t){var e=n(t,"x",0),i=n(t,"y",0),s=n(t,"width",1),a=n(t,"height",s);return new r(this.scene,e,i,s,a)}))},34546:(t,e,i)=>{var s=i(71030);i(61286).register("zone",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},95847:t=>{t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},26673:(t,e,i)=>{var s=i(56694),n=i(65650),r=i(94026),a=i(62941),o=i(52394),h=i(30977),l=new s({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.type=o.CIRCLE,this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=l},37964:t=>{t.exports=function(t){return Math.PI*t.radius*2}},72233:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x+t.radius*Math.cos(e),i.y=t.y+t.radius*Math.sin(e),i}},61761:(t,e,i)=>{var s=i(26673);t.exports=function(t){return new s(t.x,t.y,t.radius)}},65650:t=>{t.exports=function(t,e,i){return t.radius>0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},39187:(t,e,i)=>{var s=i(65650);t.exports=function(t,e){return s(t,e.x,e.y)}},58672:(t,e,i)=>{var s=i(65650);t.exports=function(t,e){return s(t,e.x,e.y)&&s(t,e.right,e.y)&&s(t,e.x,e.bottom)&&s(t,e.right,e.bottom)}},42997:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},94894:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},48027:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},94026:(t,e,i)=>{var s=i(72233),n=i(91806),r=i(83392),a=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new a);var o=n(e,0,r.PI2);return s(t,o,i)}},62941:(t,e,i)=>{var s=i(37964),n=i(72233),r=i(91806),a=i(83392);t.exports=function(t,e,i,o){void 0===o&&(o=[]),!e&&i>0&&(e=s(t)/i);for(var h=0;h{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},88665:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},30977:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=2*Math.PI*Math.random(),n=Math.random()+Math.random(),r=n>1?2-n:n,a=r*Math.cos(i),o=r*Math.sin(i);return e.x=t.x+a*t.radius,e.y=t.y+o*t.radius,e}},6112:(t,e,i)=>{var s=i(26673);s.Area=i(95847),s.Circumference=i(37964),s.CircumferencePoint=i(72233),s.Clone=i(61761),s.Contains=i(65650),s.ContainsPoint=i(39187),s.ContainsRect=i(58672),s.CopyFrom=i(42997),s.Equals=i(94894),s.GetBounds=i(48027),s.GetPoint=i(94026),s.GetPoints=i(62941),s.Offset=i(34585),s.OffsetPoint=i(88665),s.Random=i(30977),t.exports=s},52394:t=>{t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},58605:t=>{t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},39507:t=>{t.exports=function(t){var e=t.width/2,i=t.height/2,s=Math.pow(e-i,2)/Math.pow(e+i,2);return Math.PI*(e+i)*(1+3*s/(10+Math.sqrt(4-3*s)))}},86998:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.width/2,r=t.height/2;return i.x=t.x+n*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},81773:(t,e,i)=>{var s=i(95669);t.exports=function(t){return new s(t.x,t.y,t.width,t.height)}},72313:t=>{t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var s=(e-t.x)/t.width,n=(i-t.y)/t.height;return(s*=s)+(n*=n)<.25}},34368:(t,e,i)=>{var s=i(72313);t.exports=function(t,e){return s(t,e.x,e.y)}},71431:(t,e,i)=>{var s=i(72313);t.exports=function(t,e){return s(t,e.x,e.y)&&s(t,e.right,e.y)&&s(t,e.x,e.bottom)&&s(t,e.right,e.bottom)}},75459:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},95669:(t,e,i)=>{var s=i(56694),n=i(72313),r=i(95340),a=i(54978),o=i(52394),h=i(72006),l=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=o.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=l},98068:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},72897:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},95340:(t,e,i)=>{var s=i(86998),n=i(91806),r=i(83392),a=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new a);var o=n(e,0,r.PI2);return s(t,o,i)}},54978:(t,e,i)=>{var s=i(39507),n=i(86998),r=i(91806),a=i(83392);t.exports=function(t,e,i,o){void 0===o&&(o=[]),!e&&i>0&&(e=s(t)/i);for(var h=0;h{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},36233:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},72006:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random()*Math.PI*2,n=Math.sqrt(Math.random());return e.x=t.x+n*Math.cos(i)*t.width/2,e.y=t.y+n*Math.sin(i)*t.height/2,e}},40652:(t,e,i)=>{var s=i(95669);s.Area=i(58605),s.Circumference=i(39507),s.CircumferencePoint=i(86998),s.Clone=i(81773),s.Contains=i(72313),s.ContainsPoint=i(34368),s.ContainsRect=i(71431),s.CopyFrom=i(75459),s.Equals=i(98068),s.GetBounds=i(72897),s.GetPoint=i(95340),s.GetPoints=i(54978),s.Offset=i(77951),s.OffsetPoint=i(36233),s.Random=i(72006),t.exports=s},84068:(t,e,i)=>{var s=i(52394),n=i(98611),r={Circle:i(6112),Ellipse:i(40652),Intersects:i(7563),Line:i(28482),Mesh:i(14293),Point:i(63472),Polygon:i(44359),Rectangle:i(66658),Triangle:i(87619)};r=n(!1,r,s),t.exports=r},22184:(t,e,i)=>{var s=i(53996);t.exports=function(t,e){return s(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},26535:t=>{t.exports=function(t,e){var i=e.width/2,s=e.height/2,n=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-s),a=i+t.radius,o=s+t.radius;if(n>a||r>o)return!1;if(n<=i||r<=s)return!0;var h=n-i,l=r-s;return h*h+l*l<=t.radius*t.radius}},71145:(t,e,i)=>{var s=i(79967),n=i(22184);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r,a,o,h,l=t.x,u=t.y,c=t.radius,d=e.x,f=e.y,p=e.radius;if(u===f)0===(o=(a=-2*f)*a-4*(r=1)*(d*d+(h=(p*p-c*c-d*d+l*l)/(2*(l-d)))*h-2*d*h+f*f-p*p))?i.push(new s(h,-a/(2*r))):o>0&&(i.push(new s(h,(-a+Math.sqrt(o))/(2*r))),i.push(new s(h,(-a-Math.sqrt(o))/(2*r))));else{var v=(l-d)/(u-f),g=(p*p-c*c-d*d+l*l-f*f+u*u)/(2*(u-f));0===(o=(a=2*u*v-2*g*v-2*l)*a-4*(r=v*v+1)*(l*l+u*u+g*g-c*c-2*u*g))?(h=-a/(2*r),i.push(new s(h,g-h*v))):o>0&&(h=(-a+Math.sqrt(o))/(2*r),i.push(new s(h,g-h*v)),h=(-a-Math.sqrt(o))/(2*r),i.push(new s(h,g-h*v)))}}return i}},62508:(t,e,i)=>{var s=i(26111),n=i(26535);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),a=e.getLineB(),o=e.getLineC(),h=e.getLineD();s(r,t,i),s(a,t,i),s(o,t,i),s(h,t,i)}return i}},26111:(t,e,i)=>{var s=i(79967),n=i(61472);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r,a,o=t.x1,h=t.y1,l=t.x2,u=t.y2,c=e.x,d=e.y,f=e.radius,p=l-o,v=u-h,g=o-c,m=h-d,y=p*p+v*v,x=2*(p*g+v*m),T=x*x-4*y*(g*g+m*m-f*f);if(0===T){var w=-x/(2*y);r=o+w*p,a=h+w*v,w>=0&&w<=1&&i.push(new s(r,a))}else if(T>0){var E=(-x-Math.sqrt(T))/(2*y);r=o+E*p,a=h+E*v,E>=0&&E<=1&&i.push(new s(r,a));var S=(-x+Math.sqrt(T))/(2*y);r=o+S*p,a=h+S*v,S>=0&&S<=1&&i.push(new s(r,a))}}return i}},96537:(t,e,i)=>{var s=i(70015);t.exports=function(t,e,i,n){void 0===i&&(i=!1);var r,a,o,h=t.x1,l=t.y1,u=t.x2,c=t.y2,d=e.x1,f=e.y1,p=u-h,v=c-l,g=e.x2-d,m=e.y2-f,y=p*m-v*g;if(0===y)return null;if(i){if((a=(d+g*(r=(p*(f-l)+v*(h-d))/(g*v-m*p))-h)/p)<0||r<0||r>1)return null;o=a}else{if(a=((l-f)*p-(h-d)*v)/y,(r=((d-h)*m-(f-l)*g)/y)<0||r>1||a<0||a>1)return null;o=r}return void 0===n&&(n=new s),n.set(h+p*o,l+v*o,o)}},17647:(t,e,i)=>{var s=i(96537),n=i(88829),r=i(70015),a=new n,o=new r;t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=new r);var h=!1;n.set(),o.set();for(var l=e[0],u=1;u{var s=i(70015),n=i(51729),r=i(17647),a=new s;t.exports=function(t,e,i,s){void 0===s&&(s=new n),Array.isArray(e)||(e=[e]);var o=!1;s.set(),a.set();for(var h=0;h{var s=i(79967),n=i(25227),r=i(47910);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e))for(var a=e.getLineA(),o=e.getLineB(),h=e.getLineC(),l=e.getLineD(),u=[new s,new s,new s,new s],c=[n(a,t,u[0]),n(o,t,u[1]),n(h,t,u[2]),n(l,t,u[3])],d=0;d<4;d++)c[d]&&i.push(u[d]);return i}},7449:(t,e,i)=>{var s=i(51729),n=i(68439),r=new(i(88829));function a(t,e,i,a,o){var h=Math.cos(t),l=Math.sin(t);r.setTo(e,i,e+h,i+l);var u=n(r,a,!0);u&&o.push(new s(u.x,u.y,t,u.w))}function o(t,e){return t.z-e.z}t.exports=function(t,e,i){Array.isArray(i)||(i=[i]);for(var s=[],n=[],r=0;r{var s=i(74118),n=i(90205);t.exports=function(t,e,i){return void 0===i&&(i=new s),n(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},1946:(t,e,i)=>{var s=i(9569),n=i(90205);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=t.getLineA(),a=t.getLineB(),o=t.getLineC(),h=t.getLineD();s(r,e,i),s(a,e,i),s(o,e,i),s(h,e,i)}return i}},34211:(t,e,i)=>{var s=i(20370),n=i(9569);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),a=e.getLineB(),o=e.getLineC();n(r,t,i),n(a,t,i),n(o,t,i)}return i}},80511:(t,e,i)=>{var s=i(26111),n=i(48411);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=t.getLineA(),a=t.getLineB(),o=t.getLineC();s(r,e,i),s(a,e,i),s(o,e,i)}return i}},31343:(t,e,i)=>{var s=i(79967),n=i(86117),r=i(25227);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e))for(var a=t.getLineA(),o=t.getLineB(),h=t.getLineC(),l=[new s,new s,new s],u=[r(a,e,l[0]),r(o,e,l[1]),r(h,e,l[2])],c=0;c<3;c++)u[c]&&i.push(l[c]);return i}},70534:(t,e,i)=>{var s=i(23589),n=i(31343);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),a=e.getLineB(),o=e.getLineC();n(t,r,i),n(t,a,i),n(t,o,i)}return i}},61472:(t,e,i)=>{var s=i(65650),n=new(i(79967));t.exports=function(t,e,i){if(void 0===i&&(i=n),s(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(s(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,a=t.y2-t.y1,o=e.x-t.x1,h=e.y-t.y1,l=r*r+a*a,u=r,c=a;if(l>0){var d=(o*r+h*a)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*a>=0&&s(e,i.x,i.y)}},25227:t=>{t.exports=function(t,e,i){var s=t.x1,n=t.y1,r=t.x2,a=t.y2,o=e.x1,h=e.y1,l=e.x2,u=e.y2;if(s===r&&n===a||o===l&&h===u)return!1;var c=(u-h)*(r-s)-(l-o)*(a-n);if(0===c)return!1;var d=((l-o)*(n-h)-(u-h)*(s-o))/c,f=((r-s)*(n-h)-(a-n)*(s-o))/c;return!(d<0||d>1||f<0||f>1)&&(i&&(i.x=s+d*(r-s),i.y=n+d*(a-n)),!0)}},47910:t=>{t.exports=function(t,e){var i=t.x1,s=t.y1,n=t.x2,r=t.y2,a=e.x,o=e.y,h=e.right,l=e.bottom,u=0;if(i>=a&&i<=h&&s>=o&&s<=l||n>=a&&n<=h&&r>=o&&r<=l)return!0;if(i=a){if((u=s+(r-s)*(a-i)/(n-i))>o&&u<=l)return!0}else if(i>h&&n<=h&&(u=s+(r-s)*(h-i)/(n-i))>=o&&u<=l)return!0;if(s=o){if((u=i+(n-i)*(o-s)/(r-s))>=a&&u<=h)return!0}else if(s>l&&r<=l&&(u=i+(n-i)*(l-s)/(r-s))>=a&&u<=h)return!0;return!1}},34426:t=>{t.exports=function(t,e,i){void 0===i&&(i=1);var s=e.x1,n=e.y1,r=e.x2,a=e.y2,o=t.x,h=t.y,l=(r-s)*(r-s)+(a-n)*(a-n);if(0===l)return!1;var u=((o-s)*(r-s)+(h-n)*(a-n))/l;if(u<0)return Math.sqrt((s-o)*(s-o)+(n-h)*(n-h))<=i;if(u>=0&&u<=1){var c=((n-h)*(r-s)-(s-o)*(a-n))/l;return Math.abs(c)*Math.sqrt(l)<=i}return Math.sqrt((r-o)*(r-o)+(a-h)*(a-h))<=i}},81414:(t,e,i)=>{var s=i(34426);t.exports=function(t,e){if(!s(t,e))return!1;var i=Math.min(e.x1,e.x2),n=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),a=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=n&&t.y>=r&&t.y<=a}},90205:t=>{t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0)&&!(t.righte.right||t.y>e.bottom)}},20370:(t,e,i)=>{var s=i(25227),n=i(94287),r=i(86875),a=i(87279);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},8786:t=>{t.exports=function(t,e,i,s,n,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||n{var s=i(61472),n=i(60689);t.exports=function(t,e){return!(t.left>e.right||t.righte.bottom||t.bottom{var s=i(25227);t.exports=function(t,e){return!(!t.contains(e.x1,e.y1)&&!t.contains(e.x2,e.y2))||(!!s(t.getLineA(),e)||(!!s(t.getLineB(),e)||!!s(t.getLineC(),e)))}},23589:(t,e,i)=>{var s=i(86875),n=i(18680),r=i(25227);t.exports=function(t,e){if(t.left>e.right||t.righte.bottom||t.bottom0||(c=n(e),(d=s(t,c,!0)).length>0)}},7563:(t,e,i)=>{t.exports={CircleToCircle:i(22184),CircleToRectangle:i(26535),GetCircleToCircle:i(71145),GetCircleToRectangle:i(62508),GetLineToCircle:i(26111),GetLineToLine:i(96537),GetLineToPoints:i(17647),GetLineToPolygon:i(68439),GetLineToRectangle:i(9569),GetRaysFromPointToPolygon:i(7449),GetRectangleIntersection:i(82931),GetRectangleToRectangle:i(1946),GetRectangleToTriangle:i(34211),GetTriangleToCircle:i(80511),GetTriangleToLine:i(31343),GetTriangleToTriangle:i(70534),LineToCircle:i(61472),LineToLine:i(25227),LineToRectangle:i(47910),PointToLine:i(34426),PointToLineSegment:i(81414),RectangleToRectangle:i(90205),RectangleToTriangle:i(20370),RectangleToValues:i(8786),TriangleToCircle:i(48411),TriangleToLine:i(86117),TriangleToTriangle:i(23589)}},50599:t=>{t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},58813:t=>{t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=[]);var s=Math.round(t.x1),n=Math.round(t.y1),r=Math.round(t.x2),a=Math.round(t.y2),o=Math.abs(r-s),h=Math.abs(a-n),l=s-h&&(c-=h,s+=l),f{t.exports=function(t,e,i){var s=e-(t.x1+t.x2)/2,n=i-(t.y1+t.y2)/2;return t.x1+=s,t.y1+=n,t.x2+=s,t.y2+=n,t}},26718:(t,e,i)=>{var s=i(88829);t.exports=function(t){return new s(t.x1,t.y1,t.x2,t.y2)}},88930:t=>{t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},90656:t=>{t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},30897:(t,e,i)=>{var s=i(16028);t.exports=function(t,e,i){void 0===i&&(i=e);var n=s(t),r=t.x2-t.x1,a=t.y2-t.y1;return e&&(t.x1=t.x1-r/n*e,t.y1=t.y1-a/n*e),i&&(t.x2=t.x2+r/n*i,t.y2=t.y2+a/n*i),t}},30684:(t,e,i)=>{var s=i(92951),n=i(21902),r=i(79967);t.exports=function(t,e,i,a,o){void 0===a&&(a=0),void 0===o&&(o=[]);var h,l,u=[],c=t.x1,d=t.y1,f=t.x2-c,p=t.y2-d,v=n(e,o),g=i-1;for(h=0;h0){var m=u[0],y=[m];for(h=1;h=a&&(y.push(x),m=x)}var T=u[u.length-1];return s(m,T){var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},11222:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.x1,r=t.y1,a=t.x2,o=t.y2,h=(a-n)*(a-n)+(o-r)*(o-r);if(0===h)return i;var l=((e.x-n)*(a-n)+(e.y-r)*(o-r))/h;return i.x=n+l*(a-n),i.y=r+l*(o-r),i}},7377:(t,e,i)=>{var s=i(83392),n=i(50599),r=i(79967);t.exports=function(t,e){void 0===e&&(e=new r);var i=n(t)-s.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},66464:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},8570:(t,e,i)=>{var s=i(16028),n=i(79967);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(e=s(t)/i);for(var a=t.x1,o=t.y1,h=t.x2,l=t.y2,u=0;u{t.exports=function(t,e){var i=t.x1,s=t.y1,n=t.x2,r=t.y2,a=(n-i)*(n-i)+(r-s)*(r-s);if(0===a)return!1;var o=((s-e.y)*(n-i)-(i-e.x)*(r-s))/a;return Math.abs(o)*Math.sqrt(a)}},82996:t=>{t.exports=function(t){return Math.abs(t.y1-t.y2)}},16028:t=>{t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},88829:(t,e,i)=>{var s=i(56694),n=i(66464),r=i(8570),a=i(52394),o=i(74077),h=i(93736),l=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=a.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=s},getPoint:function(t,e){return n(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},73273:(t,e,i)=>{var s=i(83392),n=i(1071),r=i(50599);t.exports=function(t){var e=r(t)-s.TAU;return n(e,-Math.PI,Math.PI)}},96936:(t,e,i)=>{var s=i(83392),n=i(50599);t.exports=function(t){return Math.cos(n(t)-s.TAU)}},43581:(t,e,i)=>{var s=i(83392),n=i(50599);t.exports=function(t){return Math.sin(n(t)-s.TAU)}},13990:t=>{t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},1298:t=>{t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},74077:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},30473:(t,e,i)=>{var s=i(50599),n=i(73273);t.exports=function(t,e){return 2*n(e)-Math.PI-s(t)}},25968:(t,e,i)=>{var s=i(1809);t.exports=function(t,e){var i=(t.x1+t.x2)/2,n=(t.y1+t.y2)/2;return s(t,i,n,e)}},24296:(t,e,i)=>{var s=i(1809);t.exports=function(t,e,i){return s(t,e.x,e.y,i)}},1809:t=>{t.exports=function(t,e,i,s){var n=Math.cos(s),r=Math.sin(s),a=t.x1-e,o=t.y1-i;return t.x1=a*n-o*r+e,t.y1=a*r+o*n+i,a=t.x2-e,o=t.y2-i,t.x2=a*n-o*r+e,t.y2=a*r+o*n+i,t}},88171:t=>{t.exports=function(t,e,i,s,n){return t.x1=e,t.y1=i,t.x2=e+Math.cos(s)*n,t.y2=i+Math.sin(s)*n,t}},82797:t=>{t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},41067:t=>{t.exports=function(t){return Math.abs(t.x1-t.x2)}},28482:(t,e,i)=>{var s=i(88829);s.Angle=i(50599),s.BresenhamPoints=i(58813),s.CenterOn=i(88513),s.Clone=i(26718),s.CopyFrom=i(88930),s.Equals=i(90656),s.Extend=i(30897),s.GetEasedPoints=i(30684),s.GetMidPoint=i(20487),s.GetNearestPoint=i(11222),s.GetNormal=i(7377),s.GetPoint=i(66464),s.GetPoints=i(8570),s.GetShortestDistance=i(65269),s.Height=i(82996),s.Length=i(16028),s.NormalAngle=i(73273),s.NormalX=i(96936),s.NormalY=i(43581),s.Offset=i(13990),s.PerpSlope=i(1298),s.Random=i(74077),s.ReflectAngle=i(30473),s.Rotate=i(25968),s.RotateAroundPoint=i(24296),s.RotateAroundXY=i(1809),s.SetToAngle=i(88171),s.Slope=i(82797),s.Width=i(41067),t.exports=s},18693:(t,e,i)=>{var s=i(56694),n=i(74118),r=i(93736);function a(t,e,i,s){var n=t-i,r=e-s,a=n*n+r*r;return Math.sqrt(a)}var o=new s({initialize:function(t,e,i){this.vertex1=t,this.vertex2=e,this.vertex3=i,this.bounds=new n,this._inCenter=new r},getInCenter:function(t){void 0===t&&(t=!0);var e,i,s,n,r,o,h=this.vertex1,l=this.vertex2,u=this.vertex3;t?(e=h.x,i=h.y,s=l.x,n=l.y,r=u.x,o=u.y):(e=h.vx,i=h.vy,s=l.vx,n=l.vy,r=u.vx,o=u.vy);var c=a(r,o,s,n),d=a(e,i,r,o),f=a(s,n,e,i),p=c+d+f;return this._inCenter.set((e*c+s*d+r*f)/p,(i*c+n*d+o*f)/p)},contains:function(t,e,i){var s=this.vertex1,n=this.vertex2,r=this.vertex3,a=s.vx,o=s.vy,h=n.vx,l=n.vy,u=r.vx,c=r.vy;if(i){var d=i.a,f=i.b,p=i.c,v=i.d,g=i.e,m=i.f;a=s.vx*d+s.vy*p+g,o=s.vx*f+s.vy*v+m,h=n.vx*d+n.vy*p+g,l=n.vx*f+n.vy*v+m,u=r.vx*d+r.vy*p+g,c=r.vx*f+r.vy*v+m}var y=u-a,x=c-o,T=h-a,w=l-o,E=t-a,S=e-o,b=y*y+x*x,A=y*T+x*w,_=y*E+x*S,C=T*T+w*w,R=T*E+w*S,M=b*C-A*A,P=0===M?0:1/M,O=(C*_-A*R)*P,L=(b*R-A*_)*P;return O>=0&&L>=0&&O+L<1},isCounterClockwise:function(t){var e=this.vertex1,i=this.vertex2,s=this.vertex3,n=(i.vx-e.vx)*(s.vy-e.vy)-(i.vy-e.vy)*(s.vx-e.vx);return t<=0?n>=0:n<0},load:function(t,e,i,s,n){return i=this.vertex1.load(t,e,i,s,n),i=this.vertex2.load(t,e,i,s,n),i=this.vertex3.load(t,e,i,s,n)},transformCoordinatesLocal:function(t,e,i,s){return this.vertex1.transformCoordinatesLocal(t,e,i,s),this.vertex2.transformCoordinatesLocal(t,e,i,s),this.vertex3.transformCoordinatesLocal(t,e,i,s),this},updateBounds:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3,s=this.bounds;return s.x=Math.min(t.vx,e.vx,i.vx),s.y=Math.min(t.vy,e.vy,i.vy),s.width=Math.max(t.vx,e.vx,i.vx)-s.x,s.height=Math.max(t.vy,e.vy,i.vy)-s.y,this},isInView:function(t,e,i,s,n,r,a,o,h,l,u){this.update(s,n,r,a,o,h,l,u);var c=this.vertex1,d=this.vertex2,f=this.vertex3;if(c.ta<=0&&d.ta<=0&&f.ta<=0)return!1;if(e&&!this.isCounterClockwise(i))return!1;var p=this.bounds;p.x=Math.min(c.tx,d.tx,f.tx),p.y=Math.min(c.ty,d.ty,f.ty),p.width=Math.max(c.tx,d.tx,f.tx)-p.x,p.height=Math.max(c.ty,d.ty,f.ty)-p.y;var v=t.x+t.width,g=t.y+t.height;return!(p.width<=0||p.height<=0||t.width<=0||t.height<=0)&&!(p.rightv||p.y>g)},update:function(t,e,i,s,n,r,a,o){return this.vertex1.update(e,i,s,n,r,a,o,t),this.vertex2.update(e,i,s,n,r,a,o,t),this.vertex3.update(e,i,s,n,r,a,o,t),this},translate:function(t,e){void 0===e&&(e=0);var i=this.vertex1,s=this.vertex2,n=this.vertex3;return i.x+=t,i.y+=e,s.x+=t,s.y+=e,n.x+=t,n.y+=e,this},x:{get:function(){return this.getInCenter().x},set:function(t){var e=this.getInCenter();this.translate(t-e.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(t){var e=this.getInCenter();this.translate(0,t-e.y)}},alpha:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.alpha+e.alpha+i.alpha)/3},set:function(t){this.vertex1.alpha=t,this.vertex2.alpha=t,this.vertex3.alpha=t}},depth:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.vz+e.vz+i.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});t.exports=o},99425:(t,e,i)=>{var s=i(18693),n=i(72632),r=i(16650),a=i(70015),o=i(85769),h=new a,l=new a,u=new r;t.exports=function(t){var e=n(t,"mesh"),i=n(t,"texture",null),r=n(t,"frame"),a=n(t,"width",1),c=n(t,"height",a),d=n(t,"widthSegments",1),f=n(t,"heightSegments",d),p=n(t,"x",0),v=n(t,"y",0),g=n(t,"z",0),m=n(t,"rotateX",0),y=n(t,"rotateY",0),x=n(t,"rotateZ",0),T=n(t,"zIsUp",!0),w=n(t,"isOrtho",!!e&&e.dirtyCache[11]),E=n(t,"colors",[16777215]),S=n(t,"alphas",[1]),b=n(t,"tile",!1),A=n(t,"flipY",!1),_=n(t,"width",null),C={faces:[],verts:[]};if(h.set(p,v,g),l.set(m,y,x),u.fromRotationXYTranslation(l,h,T),!i&&e)i=e.texture;else if(e&&"string"==typeof i)i=e.scene.sys.textures.get(i);else if(!i)return C;var R=i.get(r);!_&&w&&i&&e&&(a=R.width/e.height,c=R.height/e.height);var M,P,O=a/2,L=c/2,F=Math.floor(d),D=Math.floor(f),k=F+1,I=D+1,B=a/F,N=c/D,Y=[],U=[],X=0,z=1,G=0,W=1;R&&(X=R.u0,z=R.u1,A?(G=R.v1,W=R.v0):(G=R.v0,W=R.v1));var V=z-X,H=W-G;for(P=0;P{var s=i(18693),n=i(16650),r=i(70015),a=i(85769),o=new r,h=new r,l=new n;t.exports=function(t,e,i,n,r,u,c,d,f,p){void 0===i&&(i=1),void 0===n&&(n=0),void 0===r&&(r=0),void 0===u&&(u=0),void 0===c&&(c=0),void 0===d&&(d=0),void 0===f&&(f=0),void 0===p&&(p=!0);var v={faces:[],verts:[]},g=t.materials;o.set(n,r,u),h.set(c,d,f),l.fromRotationXYTranslation(h,o,p);for(var m=0;m{var s=i(18693),n=i(85769);t.exports=function(t,e,i,r,a,o,h,l){if(void 0===r&&(r=!1),void 0===o&&(o=16777215),void 0===h&&(h=1),void 0===l&&(l=!1),t.length===e.length||r){var u,c,d,f,p,v,g,m,y,x,T,w={faces:[],vertices:[]},E=r?3:2,S=Array.isArray(o),b=Array.isArray(h);if(Array.isArray(i)&&i.length>0)for(u=0;u{var e=!0,i="untitled",s="",n="";function r(t){var e=t.indexOf("#");return e>-1?t.substring(0,e):t}function a(t){return 0===t.models.length&&t.models.push({faces:[],name:i,textureCoords:[],vertexNormals:[],vertices:[]}),s="",t.models[t.models.length-1]}function o(t,e){var n=t.length>=2?t[1]:i;e.models.push({faces:[],name:n,textureCoords:[],vertexNormals:[],vertices:[]}),s=""}function h(t){2===t.length&&(s=t[1])}function l(t,e){var i=t.length,s=i>=2?parseFloat(t[1]):0,n=i>=3?parseFloat(t[2]):0,r=i>=4?parseFloat(t[3]):0;a(e).vertices.push({x:s,y:n,z:r})}function u(t,i){var s=t.length,n=s>=2?parseFloat(t[1]):0,r=s>=3?parseFloat(t[2]):0,o=s>=4?parseFloat(t[3]):0;isNaN(n)&&(n=0),isNaN(r)&&(r=0),isNaN(o)&&(o=0),e&&(r=1-r),a(i).textureCoords.push({u:n,v:r,w:o})}function c(t,e){var i=t.length,s=i>=2?parseFloat(t[1]):0,n=i>=3?parseFloat(t[2]):0,r=i>=4?parseFloat(t[3]):0;a(e).vertexNormals.push({x:s,y:n,z:r})}function d(t,e){var i=t.length-1;if(!(i<3)){for(var r={group:s,material:n,vertices:[]},o=0;o3)){var u=0,c=0,d=0;u=parseInt(h[0],10),l>1&&""!==h[1]&&(c=parseInt(h[1],10)),l>2&&(d=parseInt(h[2],10)),0!==u&&(u<0&&(u=a(e).vertices.length+1+u),c-=1,u-=1,d-=1,r.vertices.push({textureCoordsIndex:c,vertexIndex:u,vertexNormalIndex:d}))}}a(e).faces.push(r)}}function f(t,e){t.length>=2&&e.materialLibraries.push(t[1])}function p(t){t.length>=2&&(n=t[1])}t.exports=function(t,i){void 0===i&&(i=!0),e=i;var a={materials:{},materialLibraries:[],models:[]};s="",n="";for(var v=t.split("\n"),g=0;g{var s=i(22946);t.exports=function(t){for(var e={},i=t.split("\n"),n="",r=0;r=2?Math.floor(255*o[2]):h,u=o.length>=3?Math.floor(255*o[3]):h;e[n]=s(h,l,u)}}}return e}},15313:t=>{t.exports=function(t,e,i,s){var n,r;if(void 0===i&&void 0===s){var a=t.getInCenter();n=a.x,r=a.y}var o=Math.cos(e),h=Math.sin(e),l=t.vertex1,u=t.vertex2,c=t.vertex3,d=l.x-n,f=l.y-r;l.set(d*o-f*h+n,d*h+f*o+r),d=u.x-n,f=u.y-r,u.set(d*o-f*h+n,d*h+f*o+r),d=c.x-n,f=c.y-r,c.set(d*o-f*h+n,d*h+f*o+r)}},85769:(t,e,i)=>{var s=i(56694),n=i(75512),r=i(70015),a=new s({Extends:r,initialize:function(t,e,i,s,n,a,o,h,l,u){void 0===a&&(a=16777215),void 0===o&&(o=1),void 0===h&&(h=0),void 0===l&&(l=0),void 0===u&&(u=0),r.call(this,t,e,i),this.vx=0,this.vy=0,this.vz=0,this.nx=h,this.ny=l,this.nz=u,this.u=s,this.v=n,this.color=a,this.alpha=o,this.tx=0,this.ty=0,this.ta=0},setUVs:function(t,e){return this.u=t,this.v=e,this},transformCoordinatesLocal:function(t,e,i,s){var n=this.x,r=this.y,a=this.z,o=t.val,h=n*o[0]+r*o[4]+a*o[8]+o[12],l=n*o[1]+r*o[5]+a*o[9]+o[13],u=n*o[2]+r*o[6]+a*o[10]+o[14],c=n*o[3]+r*o[7]+a*o[11]+o[15];this.vx=h/c*e,this.vy=-l/c*i,this.vz=s<=0?u/c:-u/c},resize:function(t,e,i,s,n,r){return this.x=t,this.y=e,this.vx=this.x*i,this.vy=-this.y*s,this.vz=0,n<.5?this.vx+=i*(.5-n):n>.5&&(this.vx-=i*(n-.5)),r<.5?this.vy+=s*(.5-r):r>.5&&(this.vy-=s*(r-.5)),this},update:function(t,e,i,s,n,r,a,o){var h=this.vx*t+this.vy*i+n,l=this.vx*e+this.vy*s+r;return a&&(h=Math.round(h),l=Math.round(l)),this.tx=h,this.ty=l,this.ta=this.alpha*o,this},load:function(t,e,i,s,r){return t[++i]=this.tx,t[++i]=this.ty,t[++i]=this.u,t[++i]=this.v,t[++i]=s,t[++i]=r,e[++i]=n.getTintAppendFloatAlpha(this.color,this.ta),i}});t.exports=a},14293:(t,e,i)=>{var s={Face:i(18693),GenerateGridVerts:i(99425),GenerateObjVerts:i(53267),GenerateVerts:i(67623),ParseObj:i(27291),ParseObjMaterial:i(76799),RotateFace:i(15313),Vertex:i(85769)};t.exports=s},77601:t=>{t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},38933:(t,e,i)=>{var s=i(79967);t.exports=function(t){return new s(t.x,t.y)}},47103:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y)}},13625:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},12536:t=>{t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},54205:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){if(void 0===e&&(e=new s),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var n=0;n{t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},82712:t=>{t.exports=function(t){return t.x*t.x+t.y*t.y}},20052:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){void 0===e&&(e=new s);for(var i=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,o=0;oi&&(i=h.x),h.xr&&(r=h.y),h.y{var s=i(79967);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=new s),n.x=t.x+(e.x-t.x)*i,n.y=t.y+(e.y-t.y)*i,n}},42397:t=>{t.exports=function(t){return t.setTo(t.y,t.x)}},59464:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.setTo(-t.x,-t.y)}},79967:(t,e,i)=>{var s=i(56694),n=i(52394),r=new s({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=n.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=r},53581:(t,e,i)=>{var s=i(79967),n=i(82712);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=(t.x*e.x+t.y*e.y)/n(e);return 0!==r&&(i.x=r*e.x,i.y=r*e.y),i}},50817:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.x*e.x+t.y*e.y;return 0!==n&&(i.x=n*e.x,i.y=n*e.y),i}},40525:(t,e,i)=>{var s=i(50083);t.exports=function(t,e){if(0!==t.x||0!==t.y){var i=s(t);t.x/=i,t.y/=i}return t.x*=e,t.y*=e,t}},63472:(t,e,i)=>{var s=i(79967);s.Ceil=i(77601),s.Clone=i(38933),s.CopyFrom=i(47103),s.Equals=i(13625),s.Floor=i(12536),s.GetCentroid=i(54205),s.GetMagnitude=i(50083),s.GetMagnitudeSq=i(82712),s.GetRectangleFromPoints=i(20052),s.Interpolate=i(77154),s.Invert=i(42397),s.Negative=i(59464),s.Project=i(53581),s.ProjectUnit=i(50817),s.SetMagnitude=i(40525),t.exports=s},19631:(t,e,i)=>{var s=i(8580);t.exports=function(t){return new s(t.points)}},45604:t=>{t.exports=function(t,e,i){for(var s=!1,n=-1,r=t.points.length-1;++n{var s=i(45604);t.exports=function(t,e){return s(t,e.x,e.y)}},11117:t=>{"use strict";function e(t,e,s){s=s||2;var r,a,o,h,c,d,p,v=e&&e.length,g=v?e[0]*s:t.length,m=i(t,0,g,s,!0),y=[];if(!m||m.next===m.prev)return y;if(v&&(m=function(t,e,s,n){var r,a,o,h=[];for(r=0,a=e.length;r80*s){r=o=t[0],a=h=t[1];for(var x=s;xo&&(o=c),d>h&&(h=d);p=0!==(p=Math.max(o-r,h-a))?32767/p:0}return n(m,y,s,r,a,p,0),y}function i(t,e,i,s,n){var r,a;if(n===_(t,e,i,s)>0)for(r=e;r=e;r-=s)a=S(r,t[r],t[r+1],a);return a&&m(a,a.next)&&(b(a),a=a.next),a}function s(t,e){if(!t)return t;e||(e=t);var i,s=t;do{if(i=!1,s.steiner||!m(s,s.next)&&0!==g(s.prev,s,s.next))s=s.next;else{if(b(s),(s=e=s.prev)===s.next)break;i=!0}}while(i||s!==e);return e}function n(t,e,i,l,u,c,f){if(t){!f&&c&&function(t,e,i,s){var n=t;do{0===n.z&&(n.z=d(n.x,n.y,e,i,s)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,i,s,n,r,a,o,h,l=1;do{for(i=t,t=null,r=null,a=0;i;){for(a++,s=i,o=0,e=0;e0||h>0&&s;)0!==o&&(0===h||!s||i.z<=s.z)?(n=i,i=i.nextZ,o--):(n=s,s=s.nextZ,h--),r?r.nextZ=n:t=n,n.prevZ=r,r=n;i=s}r.nextZ=null,l*=2}while(a>1)}(n)}(t,l,u,c);for(var p,v,g=t;t.prev!==t.next;)if(p=t.prev,v=t.next,c?a(t,l,u,c):r(t))e.push(p.i/i|0),e.push(t.i/i|0),e.push(v.i/i|0),b(t),t=v.next,g=v.next;else if((t=v)===g){f?1===f?n(t=o(s(t),e,i),e,i,l,u,c,2):2===f&&h(t,e,i,l,u,c):n(s(t),e,i,l,u,c,1);break}}}function r(t){var e=t.prev,i=t,s=t.next;if(g(e,i,s)>=0)return!1;for(var n=e.x,r=i.x,a=s.x,o=e.y,h=i.y,l=s.y,u=nr?n>a?n:a:r>a?r:a,f=o>h?o>l?o:l:h>l?h:l,v=s.next;v!==e;){if(v.x>=u&&v.x<=d&&v.y>=c&&v.y<=f&&p(n,o,r,h,a,l,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function a(t,e,i,s){var n=t.prev,r=t,a=t.next;if(g(n,r,a)>=0)return!1;for(var o=n.x,h=r.x,l=a.x,u=n.y,c=r.y,f=a.y,v=oh?o>l?o:l:h>l?h:l,x=u>c?u>f?u:f:c>f?c:f,T=d(v,m,e,i,s),w=d(y,x,e,i,s),E=t.prevZ,S=t.nextZ;E&&E.z>=T&&S&&S.z<=w;){if(E.x>=v&&E.x<=y&&E.y>=m&&E.y<=x&&E!==n&&E!==a&&p(o,u,h,c,l,f,E.x,E.y)&&g(E.prev,E,E.next)>=0)return!1;if(E=E.prevZ,S.x>=v&&S.x<=y&&S.y>=m&&S.y<=x&&S!==n&&S!==a&&p(o,u,h,c,l,f,S.x,S.y)&&g(S.prev,S,S.next)>=0)return!1;S=S.nextZ}for(;E&&E.z>=T;){if(E.x>=v&&E.x<=y&&E.y>=m&&E.y<=x&&E!==n&&E!==a&&p(o,u,h,c,l,f,E.x,E.y)&&g(E.prev,E,E.next)>=0)return!1;E=E.prevZ}for(;S&&S.z<=w;){if(S.x>=v&&S.x<=y&&S.y>=m&&S.y<=x&&S!==n&&S!==a&&p(o,u,h,c,l,f,S.x,S.y)&&g(S.prev,S,S.next)>=0)return!1;S=S.nextZ}return!0}function o(t,e,i){var n=t;do{var r=n.prev,a=n.next.next;!m(r,a)&&y(r,n,n.next,a)&&w(r,a)&&w(a,r)&&(e.push(r.i/i|0),e.push(n.i/i|0),e.push(a.i/i|0),b(n),b(n.next),n=t=a),n=n.next}while(n!==t);return s(n)}function h(t,e,i,r,a,o){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&v(h,l)){var u=E(h,l);return h=s(h,h.next),u=s(u,u.next),n(h,e,i,r,a,o,0),void n(u,e,i,r,a,o,0)}l=l.next}h=h.next}while(h!==t)}function l(t,e){return t.x-e.x}function u(t,e){var i=function(t,e){var i,s=e,n=t.x,r=t.y,a=-1/0;do{if(r<=s.y&&r>=s.next.y&&s.next.y!==s.y){var o=s.x+(r-s.y)*(s.next.x-s.x)/(s.next.y-s.y);if(o<=n&&o>a&&(a=o,i=s.x=s.x&&s.x>=u&&n!==s.x&&p(ri.x||s.x===i.x&&c(i,s)))&&(i=s,f=h)),s=s.next}while(s!==l);return i}(t,e);if(!i)return e;var n=E(i,t);return s(n,n.next),s(i,i.next)}function c(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function d(t,e,i,s,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-i)*n|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-s)*n|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function f(t){var e=t,i=t;do{(e.x=(t-a)*(r-o)&&(t-a)*(s-o)>=(i-a)*(e-o)&&(i-a)*(r-o)>=(n-a)*(s-o)}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&y(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(w(t,e)&&w(e,t)&&function(t,e){var i=t,s=!1,n=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&n<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(s=!s),i=i.next}while(i!==t);return s}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||m(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function m(t,e){return t.x===e.x&&t.y===e.y}function y(t,e,i,s){var n=T(g(t,e,i)),r=T(g(t,e,s)),a=T(g(i,s,t)),o=T(g(i,s,e));return n!==r&&a!==o||(!(0!==n||!x(t,i,e))||(!(0!==r||!x(t,s,e))||(!(0!==a||!x(i,t,s))||!(0!==o||!x(i,e,s)))))}function x(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function T(t){return t>0?1:t<0?-1:0}function w(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function E(t,e){var i=new A(t.i,t.x,t.y),s=new A(e.i,e.x,e.y),n=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=n,n.prev=i,s.next=i,i.prev=s,r.next=s,s.prev=r,s}function S(t,e,i,s){var n=new A(t,e,i);return s?(n.next=s.next,n.prev=s,s.next.prev=n,s.next=n):(n.prev=n,n.next=n),n}function b(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function A(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function _(t,e,i,s){for(var n=0,r=e,a=i-s;r0&&(s+=t[n-1].length,i.holes.push(s))}return i},t.exports=e},14045:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){void 0===e&&(e=new s);for(var i,n=1/0,r=1/0,a=-n,o=-r,h=0;h{t.exports=function(t,e){void 0===e&&(e=[]);for(var i=0;i{var s=i(16028),n=i(88829),r=i(5159);t.exports=function(t,e,i,a){void 0===a&&(a=[]);var o=t.points,h=r(t);!e&&i>0&&(e=h/i);for(var l=0;lc+g)){var m=v.getPoint((u-c)/g);a.push(m);break}c+=g}return a}},5159:(t,e,i)=>{var s=i(16028),n=i(88829);t.exports=function(t){for(var e=t.points,i=0,r=0;r{var s=i(56694),n=i(45604),r=i(89294),a=i(52394),o=new s({initialize:function(t){this.type=a.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return n(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,s=0;s{t.exports=function(t){return t.points.reverse(),t}},95874:t=>{function e(t,e,i){var s=e.x,n=e.y,r=i.x-s,a=i.y-n;if(0!==r||0!==a){var o=((t.x-s)*r+(t.y-n)*a)/(r*r+a*a);o>1?(s=i.x,n=i.y):o>0&&(s+=r*o,n+=a*o)}return(r=t.x-s)*r+(a=t.y-n)*a}function i(t,s,n,r,a){for(var o,h=r,l=s+1;lh&&(o=l,h=u)}h>r&&(o-s>1&&i(t,s,o,r,a),a.push(t[o]),n-o>1&&i(t,o,n,r,a))}function s(t,e){var s=t.length-1,n=[t[0]];return i(t,0,s,e,n),n.push(t[s]),n}t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=!1);var n=t.points;if(n.length>2){var r=e*e;i||(n=function(t,e){for(var i,s,n,r,a,o=t[0],h=[o],l=1,u=t.length;le&&(h.push(i),o=i);return o!==i&&h.push(i),h}(n,r)),t.setTo(s(n,r))}return t}},18974:t=>{var e=function(t,e){return t[0]=e[0],t[1]=e[1],t};t.exports=function(t){var i,s=[],n=t.points;for(i=0;i0&&r.push(e([0,0],s[0])),i=0;i1&&r.push(e([0,0],s[s.length-1])),t.setTo(r)}},23490:t=>{t.exports=function(t,e,i){for(var s=t.points,n=0;n{var s=i(8580);s.Clone=i(19631),s.Contains=i(45604),s.ContainsPoint=i(87289),s.Earcut=i(11117),s.GetAABB=i(14045),s.GetNumberArray=i(98286),s.GetPoints=i(89294),s.Perimeter=i(5159),s.Reverse=i(32244),s.Simplify=i(95874),s.Smooth=i(18974),s.Translate=i(23490),t.exports=s},1653:t=>{t.exports=function(t){return t.width*t.height}},33943:t=>{t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t}},58662:t=>{t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t.width=Math.ceil(t.width),t.height=Math.ceil(t.height),t}},79993:t=>{t.exports=function(t,e,i){return t.x=e-t.width/2,t.y=i-t.height/2,t}},81572:(t,e,i)=>{var s=i(74118);t.exports=function(t){return new s(t.x,t.y,t.width,t.height)}},94287:t=>{t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i)}},28687:(t,e,i)=>{var s=i(94287);t.exports=function(t,e){return s(t,e.x,e.y)}},73222:t=>{t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&(e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom{t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},87279:t=>{t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},19989:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},92628:(t,e,i)=>{var s=i(6700);t.exports=function(t,e){var i=s(t);return i{var s=i(6700);t.exports=function(t,e){var i=s(t);return i>s(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},71356:t=>{t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},21687:t=>{t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},80222:(t,e,i)=>{var s=i(74118),n=i(83392);t.exports=function(t,e){if(void 0===e&&(e=new s),0===t.length)return e;for(var i,r,a,o=Number.MAX_VALUE,h=Number.MAX_VALUE,l=n.MIN_SAFE_INTEGER,u=n.MIN_SAFE_INTEGER,c=0;c{var s=i(74118);t.exports=function(t,e,i,n,r){return void 0===r&&(r=new s),r.setTo(Math.min(t,i),Math.min(e,n),Math.abs(t-i),Math.abs(e-n))}},6700:t=>{t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},35242:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.centerX,e.y=t.centerY,e}},47698:(t,e,i)=>{var s=i(85876),n=i(79967);t.exports=function(t,e,i){if(void 0===i&&(i=new n),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=s(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},54932:(t,e,i)=>{var s=i(47698),n=i(85876);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(e=n(t)/i);for(var a=0;a{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.width,e.y=t.height,e}},7782:(t,e,i)=>{var s=i(79993);t.exports=function(t,e,i){var n=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),s(t,n,r)}},66217:(t,e,i)=>{var s=i(74118),n=i(90205);t.exports=function(t,e,i){return void 0===i&&(i=new s),n(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},40053:(t,e,i)=>{var s=i(85876),n=i(79967);t.exports=function(t,e,i,r){if(void 0===r&&(r=[]),!e&&!i)return r;e?i=Math.round(s(t)/e):e=s(t)/i;for(var a=t.x,o=t.y,h=0,l=0;l=t.right&&(h=1,o+=a-t.right,a=t.right);break;case 1:(o+=e)>=t.bottom&&(h=2,a-=o-t.bottom,o=t.bottom);break;case 2:(a-=e)<=t.left&&(h=3,o-=t.left-a,a=t.left);break;case 3:(o-=e)<=t.top&&(h=0,o=t.top)}return r}},86673:t=>{t.exports=function(t,e){for(var i=t.x,s=t.right,n=t.y,r=t.bottom,a=0;a{t.exports=function(t,e){var i=Math.min(t.x,e.x),s=Math.max(t.right,e.right);t.x=i,t.width=s-i;var n=Math.min(t.y,e.y),r=Math.max(t.bottom,e.bottom);return t.y=n,t.height=r-n,t}},44755:t=>{t.exports=function(t,e,i){var s=Math.min(t.x,e),n=Math.max(t.right,e);t.x=s,t.width=n-s;var r=Math.min(t.y,i),a=Math.max(t.bottom,i);return t.y=r,t.height=a-r,t}},74466:t=>{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},55946:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},97474:t=>{t.exports=function(t,e){return t.xe.x&&t.ye.y}},85876:t=>{t.exports=function(t){return 2*(t.width+t.height)}},20243:(t,e,i)=>{var s=i(79967),n=i(75606);t.exports=function(t,e,i){void 0===i&&(i=new s),e=n(e);var r=Math.sin(e),a=Math.cos(e),o=a>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(o*r){var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},97691:(t,e,i)=>{var s=i(17489),n=i(73222),r=i(79967);t.exports=function(t,e,i){if(void 0===i&&(i=new r),n(t,e))switch(s(0,3)){case 0:i.x=t.x+Math.random()*(e.right-t.x),i.y=t.y+Math.random()*(e.top-t.y);break;case 1:i.x=e.x+Math.random()*(t.right-e.x),i.y=e.bottom+Math.random()*(t.bottom-e.bottom);break;case 2:i.x=t.x+Math.random()*(e.x-t.x),i.y=e.y+Math.random()*(t.bottom-e.y);break;case 3:i.x=e.right+Math.random()*(t.right-e.right),i.y=t.y+Math.random()*(e.bottom-t.y)}return i}},74118:(t,e,i)=>{var s=i(56694),n=i(94287),r=i(47698),a=i(54932),o=i(52394),h=i(88829),l=i(30001),u=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=o.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},51828:t=>{t.exports=function(t,e){return t.width===e.width&&t.height===e.height}},5691:t=>{t.exports=function(t,e,i){return void 0===i&&(i=e),t.width*=e,t.height*=i,t}},58795:(t,e,i)=>{var s=i(74118);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=Math.min(t.x,e.x),r=Math.min(t.y,e.y),a=Math.max(t.right,e.right)-n,o=Math.max(t.bottom,e.bottom)-r;return i.setTo(n,r,a,o)}},66658:(t,e,i)=>{var s=i(74118);s.Area=i(1653),s.Ceil=i(33943),s.CeilAll=i(58662),s.CenterOn=i(79993),s.Clone=i(81572),s.Contains=i(94287),s.ContainsPoint=i(28687),s.ContainsRect=i(73222),s.CopyFrom=i(29538),s.Decompose=i(87279),s.Equals=i(19989),s.FitInside=i(92628),s.FitOutside=i(85028),s.Floor=i(71356),s.FloorAll=i(21687),s.FromPoints=i(80222),s.FromXY=i(75785),s.GetAspectRatio=i(6700),s.GetCenter=i(35242),s.GetPoint=i(47698),s.GetPoints=i(54932),s.GetSize=i(31591),s.Inflate=i(7782),s.Intersection=i(66217),s.MarchingAnts=i(40053),s.MergePoints=i(86673),s.MergeRect=i(14655),s.MergeXY=i(44755),s.Offset=i(74466),s.OffsetPoint=i(55946),s.Overlaps=i(97474),s.Perimeter=i(85876),s.PerimeterPoint=i(20243),s.Random=i(30001),s.RandomOutside=i(97691),s.SameDimensions=i(51828),s.Scale=i(5691),s.Union=i(58795),t.exports=s},19108:t=>{t.exports=function(t){var e=t.x1,i=t.y1,s=t.x2,n=t.y2,r=t.x3,a=t.y3;return Math.abs(((r-e)*(n-i)-(s-e)*(a-i))/2)}},41199:(t,e,i)=>{var s=i(66349);t.exports=function(t,e,i){var n=i*(Math.sqrt(3)/2);return new s(t,e,t+i/2,e+n,t-i/2,e+n)}},88730:(t,e,i)=>{var s=i(11117),n=i(66349);t.exports=function(t,e,i,r,a){void 0===e&&(e=null),void 0===i&&(i=1),void 0===r&&(r=1),void 0===a&&(a=[]);for(var o,h,l,u,c,d,f,p,v,g=s(t,e),m=0;m{var s=i(66349);t.exports=function(t,e,i,n){return void 0===n&&(n=i),new s(t,e,t,e-n,t+i,e)}},1882:(t,e,i)=>{var s=i(56595),n=i(9640);t.exports=function(t,e,i,r){void 0===r&&(r=s);var a=r(t),o=e-a.x,h=i-a.y;return n(t,o,h)}},56595:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},91835:(t,e,i)=>{var s=i(93736);function n(t,e,i,s){return t*s-e*i}t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x3,r=t.y3,a=t.x1-i,o=t.y1-r,h=t.x2-i,l=t.y2-r,u=2*n(a,o,h,l),c=n(o,a*a+o*o,l,h*h+l*l),d=n(a,a*a+o*o,h,h*h+l*l);return e.x=i-c/u,e.y=r+d/u,e}},97073:(t,e,i)=>{var s=i(26673);t.exports=function(t,e){void 0===e&&(e=new s);var i,n,r=t.x1,a=t.y1,o=t.x2,h=t.y2,l=t.x3,u=t.y3,c=o-r,d=h-a,f=l-r,p=u-a,v=c*(r+o)+d*(a+h),g=f*(r+l)+p*(a+u),m=2*(c*(u-h)-d*(l-o));if(Math.abs(m)<1e-6){var y=Math.min(r,o,l),x=Math.min(a,h,u);i=.5*(Math.max(r,o,l)-y),n=.5*(Math.max(a,h,u)-x),e.x=y+i,e.y=x+n,e.radius=Math.sqrt(i*i+n*n)}else e.x=(p*v-d*g)/m,e.y=(c*g-f*v)/m,i=e.x-r,n=e.y-a,e.radius=Math.sqrt(i*i+n*n);return e}},75974:(t,e,i)=>{var s=i(66349);t.exports=function(t){return new s(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},60689:t=>{t.exports=function(t,e,i){var s=t.x3-t.x1,n=t.y3-t.y1,r=t.x2-t.x1,a=t.y2-t.y1,o=e-t.x1,h=i-t.y1,l=s*s+n*n,u=s*r+n*a,c=s*o+n*h,d=r*r+a*a,f=r*o+a*h,p=l*d-u*u,v=0===p?0:1/p,g=(d*c-u*f)*v,m=(l*f-u*c)*v;return g>=0&&m>=0&&g+m<1}},86875:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=!1),void 0===s&&(s=[]);for(var n,r,a,o,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,f=t.y2-t.y1,p=u*u+c*c,v=u*d+c*f,g=d*d+f*f,m=p*g-v*v,y=0===m?0:1/m,x=t.x1,T=t.y1,w=0;w=0&&r>=0&&n+r<1&&(s.push({x:e[w].x,y:e[w].y}),i)));w++);return s}},51532:(t,e,i)=>{var s=i(60689);t.exports=function(t,e){return s(t,e.x,e.y)}},42538:t=>{t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},18680:t=>{t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},29977:t=>{t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2&&t.x3===e.x3&&t.y3===e.y3}},56088:(t,e,i)=>{var s=i(79967),n=i(16028);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=t.getLineA(),a=t.getLineB(),o=t.getLineC();if(e<=0||e>=1)return i.x=r.x1,i.y=r.y1,i;var h=n(r),l=n(a),u=n(o),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d):(d=(c-=h)/l,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d),i}},24402:(t,e,i)=>{var s=i(16028),n=i(79967);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var a=t.getLineA(),o=t.getLineB(),h=t.getLineC(),l=s(a),u=s(o),c=s(h),d=l+u+c;!e&&i>0&&(e=d/i);for(var f=0;fl+u?(v=(p-=l+u)/c,g.x=h.x1+(h.x2-h.x1)*v,g.y=h.y1+(h.y2-h.y1)*v):(v=(p-=l)/u,g.x=o.x1+(o.x2-o.x1)*v,g.y=o.y1+(o.y2-o.y1)*v),r.push(g)}return r}},83648:(t,e,i)=>{var s=i(79967);function n(t,e,i,s){var n=t-i,r=e-s,a=n*n+r*r;return Math.sqrt(a)}t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x1,r=t.y1,a=t.x2,o=t.y2,h=t.x3,l=t.y3,u=n(h,l,a,o),c=n(i,r,h,l),d=n(a,o,i,r),f=u+c+d;return e.x=(i*u+a*c+h*d)/f,e.y=(r*u+o*c+l*d)/f,e}},9640:t=>{t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},95290:(t,e,i)=>{var s=i(16028);t.exports=function(t){var e=t.getLineA(),i=t.getLineB(),n=t.getLineC();return s(e)+s(i)+s(n)}},99761:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x2-t.x1,n=t.y2-t.y1,r=t.x3-t.x1,a=t.y3-t.y1,o=Math.random(),h=Math.random();return o+h>=1&&(o=1-o,h=1-h),e.x=t.x1+(i*o+r*h),e.y=t.y1+(n*o+a*h),e}},21934:(t,e,i)=>{var s=i(19211),n=i(83648);t.exports=function(t,e){var i=n(t);return s(t,i.x,i.y,e)}},68454:(t,e,i)=>{var s=i(19211);t.exports=function(t,e,i){return s(t,e.x,e.y,i)}},19211:t=>{t.exports=function(t,e,i,s){var n=Math.cos(s),r=Math.sin(s),a=t.x1-e,o=t.y1-i;return t.x1=a*n-o*r+e,t.y1=a*r+o*n+i,a=t.x2-e,o=t.y2-i,t.x2=a*n-o*r+e,t.y2=a*r+o*n+i,a=t.x3-e,o=t.y3-i,t.x3=a*n-o*r+e,t.y3=a*r+o*n+i,t}},66349:(t,e,i)=>{var s=i(56694),n=i(60689),r=i(56088),a=i(24402),o=i(52394),h=i(88829),l=i(99761),u=new s({initialize:function(t,e,i,s,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=0),this.type=o.TRIANGLE,this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.x3=n,this.y3=r},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,s,n,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.x3=n,this.y3=r,this},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.x3,this.y3,this.x1,this.y1),t},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=u},87619:(t,e,i)=>{var s=i(66349);s.Area=i(19108),s.BuildEquilateral=i(41199),s.BuildFromPolygon=i(88730),s.BuildRight=i(3635),s.CenterOn=i(1882),s.Centroid=i(56595),s.CircumCenter=i(91835),s.CircumCircle=i(97073),s.Clone=i(75974),s.Contains=i(60689),s.ContainsArray=i(86875),s.ContainsPoint=i(51532),s.CopyFrom=i(42538),s.Decompose=i(18680),s.Equals=i(29977),s.GetPoint=i(56088),s.GetPoints=i(24402),s.InCenter=i(83648),s.Perimeter=i(95290),s.Offset=i(9640),s.Random=i(99761),s.Rotate=i(21934),s.RotateAroundPoint=i(68454),s.RotateAroundXY=i(19211),t.exports=s},27395:t=>{t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}}},18104:t=>{t.exports=function(t,e){return function(i,s,n,r){var a=t.getPixelAlpha(s,n,r.texture.key,r.frame.name);return a&&a>=e}}},69898:(t,e,i)=>{var s=i(56694),n=i(72687),r=i(6659),a=i(33963),o=i(97081),h=i(71064),l=i(7905),u=i(40398),c=i(37579),d=i(69360),f=i(64462),p=new s({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new r,this.isOver=!0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new h(this):null,this.mouse=e.inputMouse?new l(this):null,this.touch=e.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var s=new u(this,i);s.smoothFactor=e.inputSmoothFactor,this.pointers.push(s)}this.mousePointer=e.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new d,this._tempMatrix2=new d,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(o.BOOT,this.boot,this)},boot:function(){var t=this.game,e=t.events;this.canvas=t.canvas,this.scaleManager=t.scale,this.events.emit(a.MANAGER_BOOT),e.on(o.PRE_RENDER,this.preRender,this),e.once(o.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(a.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(a.GAME_OUT,t)},preRender:function(){var t=this.game.loop.now,e=this.game.loop.delta,i=this.game.scene.getScenes(!0,!0);this.time=t,this.events.emit(a.MANAGER_UPDATE);for(var s=0;s10&&(t=10-this.pointersTotal);for(var i=0;i{var s=i(26673),n=i(65650),r=i(56694),a=i(72687),o=i(27395),h=i(18104),l=i(53996),u=i(95669),c=i(72313),d=i(33963),f=i(6659),p=i(72632),v=i(52394),g=i(63399),m=i(42911),y=i(91963),x=i(74118),T=i(94287),w=i(7599),E=i(66349),S=i(60689),b=new r({Extends:f,initialize:function(t){f.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.pluginEvents=new f,this.enabled=!0,this.displayList,this.cameras,g.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var e={cancelled:!1};this._eventContainer={stopPropagation:function(){e.cancelled=!0}},this._eventData=e,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,t.sys.events.once(w.BOOT,this.boot,this),t.sys.events.on(w.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(w.DESTROY,this.destroy,this),this.pluginEvents.emit(d.BOOT)},start:function(){var t=this.systems.events;t.on(w.TRANSITION_START,this.transitionIn,this),t.on(w.TRANSITION_OUT,this.transitionOut,this),t.on(w.TRANSITION_COMPLETE,this.transitionComplete,this),t.on(w.PRE_UPDATE,this.preUpdate,this),t.once(w.SHUTDOWN,this.shutdown,this),this.manager.events.on(d.GAME_OUT,this.onGameOut,this),this.manager.events.on(d.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(d.START)},onGameOver:function(t){this.isActive()&&this.emit(d.GAME_OVER,t.timeStamp,t)},onGameOut:function(t){this.isActive()&&this.emit(d.GAME_OUT,t.timeStamp,t)},preUpdate:function(){this.pluginEvents.emit(d.PRE_UPDATE);var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,s=e.length;if(0!==i||0!==s){for(var n=this._list,r=0;r-1&&(n.splice(o,1),this.clear(a,!0))}this._pendingRemoval.length=0,this._list=n.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.canInput()},updatePoll:function(t,e){if(!this.isActive())return!1;if(this.pluginEvents.emit(d.UPDATE,t,e),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var i,s=this.manager,n=s.pointers,r=s.pointersTotal;for(i=0;i0){if(this._pollTimer-=e,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var o=!1;for(i=0;i0&&(o=!0)}return o},update:function(t,e){if(!this.isActive())return!1;for(var i=e.length,s=!1,n=0;n0&&(s=!0)}return this._updatedThisFrame=!0,s},clear:function(t,e){void 0===e&&(e=!1),this.disable(t);var i=t.input;i&&(this.removeDebug(t),i.gameObject=void 0,i.target=void 0,i.hitArea=void 0,i.hitAreaCallback=void 0,i.callbackContext=void 0,t.input=null),e||this.queueForRemoval(t);var s=this._draggable.indexOf(t);return s>-1&&this._draggable.splice(s,1),t},disable:function(t){var e=t.input;e&&(e.enabled=!1,e.dragState=0);var i=this._temp,s=this._drag,n=this._over,r=this.manager,a=i.indexOf(t);a>-1&&i.splice(a,1);for(var o=0;o-1&&s[o].splice(a,1),(a=n[o].indexOf(t))>-1&&(n[o].splice(a,1),r.resetCursor(e));return this},enable:function(t,e,i,s){return void 0===s&&(s=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&s&&!t.input.dropZone&&(t.input.dropZone=s),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i0)return t.camera=s,n}return t.camera=e[0],[]},processDownEvents:function(t){var e=0,i=this._temp,s=this._eventData,n=this._eventContainer;s.cancelled=!1;for(var r=!1,a=0;a0&&l(t.x,t.y,t.downX,t.downY)>=n||s>0&&e>=t.downTime+s)&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;i1&&(this.sortGameObjects(i,t),this.topOnly&&i.splice(1)),this._drag[t.id]=i,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?(this.setDragState(t,3),this.processDragStartList(t)):(this.setDragState(t,2),0))},processDragMoveEvent:function(t){if(2===this.getDragState(t)&&this.processDragThresholdEvent(t,this.manager.game.loop.now),4!==this.getDragState(t))return 0;for(var e=this._tempZones,i=this._drag[t.id],s=0;s0?(a.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,a,h),o.target=e[0],h=o.target,a.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,a,h)):(a.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,a,h),e[0]?(o.target=e[0],h=o.target,a.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,a,h)):o.target=null)}else!h&&e[0]&&(o.target=e[0],h=o.target,a.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,a,h));if(a.parentContainer){var u=t.worldX-o.dragStartXGlobal,c=t.worldY-o.dragStartYGlobal,f=a.getParentRotation(),p=u*Math.cos(f)+c*Math.sin(f),v=c*Math.cos(f)-u*Math.sin(f);p*=1/a.parentContainer.scaleX,v*=1/a.parentContainer.scaleY,n=p+o.dragStartX,r=v+o.dragStartY}else n=t.worldX-o.dragX,r=t.worldY-o.dragY;a.emit(d.GAMEOBJECT_DRAG,t,n,r),this.emit(d.DRAG,t,a,n,r)}return i.length},processDragUpEvent:function(t){for(var e=this._drag[t.id],i=0;i0){var r=this.manager,a=this._eventData,o=this._eventContainer;a.cancelled=!1;for(var h=!1,l=0;l0){var n=this.manager,r=this._eventData,a=this._eventContainer;r.cancelled=!1;var o=!1;this.sortGameObjects(e,t);for(var h=0;h0){for(this.sortGameObjects(n,t),e=0;e0){for(this.sortGameObjects(r,t),e=0;e-1&&this._draggable.splice(n,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return h(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var s=!1,n=!1,r=!1,a=!1,h=!1,l=!0;if(m(e)){var u=e;e=p(u,"hitArea",null),i=p(u,"hitAreaCallback",null),s=p(u,"draggable",!1),n=p(u,"dropZone",!1),r=p(u,"cursor",!1),a=p(u,"useHandCursor",!1),h=p(u,"pixelPerfect",!1);var c=p(u,"alphaTolerance",1);h&&(e={},i=this.makePixelPerfect(c)),e&&i||(this.setHitAreaFromTexture(t),l=!1)}else"function"!=typeof e||i||(i=e,e={});for(var d=0;d{var s=i(10850),n={},r={register:function(t,e,i,s,r){n[t]={plugin:e,mapping:i,settingsKey:s,configKey:r}},getPlugin:function(t){return n[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,r=e.game.config;for(var a in n){var o=n[a].plugin,h=n[a].mapping,l=n[a].settingsKey,u=n[a].configKey;s(i,l,r[u])&&(t[h]=new o(t))}},remove:function(t){n.hasOwnProperty(t)&&delete n[t]}};t.exports=r},40398:(t,e,i)=>{var s=i(90447),n=i(56694),r=i(53996),a=i(88456),o=i(44521),h=i(93736),l=i(36580),u=new n({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new h,this.prevPosition=new h,this.midPoint=new h(-1,-1),this.velocity=new h,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===e,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(t){var e=t.getWorldPoint(this.x,this.y);return this.worldX=e.x,this.worldY=e.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t=this.position.x,e=this.position.y,i=this.midPoint.x,n=this.midPoint.y;if(t!==i||e!==n){var r=o(this.motionFactor,i,t),h=o(this.motionFactor,n,e);a(r,t,.1)&&(r=t),a(h,e,.1)&&(h=e),this.midPoint.set(r,h);var l=t-r,u=e-h;this.velocity.set(l,u),this.angle=s(r,h,t,e),this.distance=Math.sqrt(l*l+u*u)}},up:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),0===this.buttons&&(this.isDown=!1,this.upTime=t.timeStamp,this.wasTouch=!1)},down:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),l.macOS&&t.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=t.timeStamp),this.wasTouch=!1},move:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.locked&&(this.movementX=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.moveTime=t.timeStamp,this.wasTouch=!1},wheel:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=e,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(t,e){this.event=e,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.moveTime=e.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?s(this.downX,this.downY,this.x,this.y):s(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,s=this.prevPosition.y,n=this.position.x,r=this.position.y,a=0;a{t.exports={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8}},14874:t=>{t.exports="boot"},54168:t=>{t.exports="destroy"},526:t=>{t.exports="dragend"},81623:t=>{t.exports="dragenter"},94472:t=>{t.exports="drag"},9304:t=>{t.exports="dragleave"},34265:t=>{t.exports="dragover"},50151:t=>{t.exports="dragstart"},98134:t=>{t.exports="drop"},56773:t=>{t.exports="gameobjectdown"},45824:t=>{t.exports="dragend"},39578:t=>{t.exports="dragenter"},72072:t=>{t.exports="drag"},82569:t=>{t.exports="dragleave"},70833:t=>{t.exports="dragover"},81442:t=>{t.exports="dragstart"},32936:t=>{t.exports="drop"},99658:t=>{t.exports="gameobjectmove"},60515:t=>{t.exports="gameobjectout"},55254:t=>{t.exports="gameobjectover"},34782:t=>{t.exports="pointerdown"},41769:t=>{t.exports="pointermove"},65588:t=>{t.exports="pointerout"},61640:t=>{t.exports="pointerover"},49342:t=>{t.exports="pointerup"},82662:t=>{t.exports="wheel"},13058:t=>{t.exports="gameobjectup"},52426:t=>{t.exports="gameobjectwheel"},78072:t=>{t.exports="gameout"},1545:t=>{t.exports="gameover"},67137:t=>{t.exports="boot"},27678:t=>{t.exports="process"},22257:t=>{t.exports="update"},90379:t=>{t.exports="pointerlockchange"},88909:t=>{t.exports="pointerdown"},36548:t=>{t.exports="pointerdownoutside"},18483:t=>{t.exports="pointermove"},22355:t=>{t.exports="pointerout"},7997:t=>{t.exports="pointerover"},66318:t=>{t.exports="pointerup"},94812:t=>{t.exports="pointerupoutside"},37310:t=>{t.exports="wheel"},24196:t=>{t.exports="preupdate"},27053:t=>{t.exports="shutdown"},29413:t=>{t.exports="start"},25165:t=>{t.exports="update"},33963:(t,e,i)=>{t.exports={BOOT:i(14874),DESTROY:i(54168),DRAG_END:i(526),DRAG_ENTER:i(81623),DRAG:i(94472),DRAG_LEAVE:i(9304),DRAG_OVER:i(34265),DRAG_START:i(50151),DROP:i(98134),GAME_OUT:i(78072),GAME_OVER:i(1545),GAMEOBJECT_DOWN:i(56773),GAMEOBJECT_DRAG_END:i(45824),GAMEOBJECT_DRAG_ENTER:i(39578),GAMEOBJECT_DRAG:i(72072),GAMEOBJECT_DRAG_LEAVE:i(82569),GAMEOBJECT_DRAG_OVER:i(70833),GAMEOBJECT_DRAG_START:i(81442),GAMEOBJECT_DROP:i(32936),GAMEOBJECT_MOVE:i(99658),GAMEOBJECT_OUT:i(60515),GAMEOBJECT_OVER:i(55254),GAMEOBJECT_POINTER_DOWN:i(34782),GAMEOBJECT_POINTER_MOVE:i(41769),GAMEOBJECT_POINTER_OUT:i(65588),GAMEOBJECT_POINTER_OVER:i(61640),GAMEOBJECT_POINTER_UP:i(49342),GAMEOBJECT_POINTER_WHEEL:i(82662),GAMEOBJECT_UP:i(13058),GAMEOBJECT_WHEEL:i(52426),MANAGER_BOOT:i(67137),MANAGER_PROCESS:i(27678),MANAGER_UPDATE:i(22257),POINTER_DOWN:i(88909),POINTER_DOWN_OUTSIDE:i(36548),POINTER_MOVE:i(18483),POINTER_OUT:i(22355),POINTER_OVER:i(7997),POINTER_UP:i(66318),POINTER_UP_OUTSIDE:i(94812),POINTER_WHEEL:i(37310),POINTERLOCK_CHANGE:i(90379),PRE_UPDATE:i(24196),SHUTDOWN:i(27053),START:i(29413),UPDATE:i(25165)}},70848:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=.1},update:function(t){this.value=t},getValue:function(){return Math.abs(this.value){var s=i(56694),n=i(43200),r=new s({initialize:function(t,e){this.pad=t,this.events=t.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(t){this.value=t;var e=this.pad,i=this.index;t>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(n.BUTTON_DOWN,e,this,t),this.pad.emit(n.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(n.BUTTON_UP,e,this,t),this.pad.emit(n.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},75956:(t,e,i)=>{var s=i(70848),n=i(21274),r=i(56694),a=i(6659),o=i(93736),h=new r({Extends:a,initialize:function(t,e){a.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],r=0;r=2&&(this.leftStick.set(r[0].getValue(),r[1].getValue()),n>=4&&this.rightStick.set(r[2].getValue(),r[3].getValue()))}},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t{var s=i(56694),n=i(6659),r=i(43200),a=i(75956),o=i(10850),h=i(63399),l=i(33963),u=new s({Extends:n,initialize:function(t){n.call(this),this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,t.pluginEvents.once(l.BOOT,this.boot,this),t.pluginEvents.on(l.START,this.start,this)},boot:function(){var t=this.scene.sys.game,e=this.settings.input,i=t.config;this.enabled=o(e,"gamepad",i.inputGamepad)&&t.device.input.gamepads,this.target=o(e,"gamepad.target",i.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(l.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(l.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var t=this,e=this.target,i=function(e){!e.defaultPrevented&&t.isActive()&&(t.refreshPads(),t.queue.push(e))};this.onGamepadHandler=i,e.addEventListener("gamepadconnected",i,!1),e.addEventListener("gamepaddisconnected",i,!1),this.sceneInputPlugin.pluginEvents.on(l.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(l.UPDATE,this.update);for(var t=0;t{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},74982:t=>{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},43247:t=>{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},4898:(t,e,i)=>{t.exports={DUALSHOCK_4:i(74982),SNES_USB:i(33171),XBOX_360:i(43247)}},17344:t=>{t.exports="down"},36635:t=>{t.exports="up"},85724:t=>{t.exports="connected"},55832:t=>{t.exports="disconnected"},772:t=>{t.exports="down"},33608:t=>{t.exports="up"},43200:(t,e,i)=>{t.exports={BUTTON_DOWN:i(17344),BUTTON_UP:i(36635),CONNECTED:i(85724),DISCONNECTED:i(55832),GAMEPAD_BUTTON_DOWN:i(772),GAMEPAD_BUTTON_UP:i(33608)}},92636:(t,e,i)=>{t.exports={Axis:i(70848),Button:i(21274),Events:i(43200),Gamepad:i(75956),GamepadPlugin:i(1379),Configs:i(4898)}},20873:(t,e,i)=>{var s=i(72687),n=i(98611),r={CreatePixelPerfectHandler:i(18104),CreateInteractiveObject:i(27395),Events:i(33963),Gamepad:i(92636),InputManager:i(69898),InputPlugin:i(12499),InputPluginCache:i(63399),Keyboard:i(28388),Mouse:i(11343),Pointer:i(40398),Touch:i(77423)};r=n(!1,r,s),t.exports=r},71064:(t,e,i)=>{var s=i(66458),n=i(56694),r=i(97081),a=i(33963),o=i(11873),h=i(72283),l=new n({initialize:function(t){this.manager=t,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=h,this.onKeyUp=h,t.events.once(a.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.addCapture(t.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(r.POST_STEP,this.postUpdate,this)},startListeners:function(){var t=this;this.onKeyDown=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.events.emit(a.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}},this.onKeyUp=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.events.emit(a.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}};var e=this.target;e&&(e.addEventListener("keydown",this.onKeyDown,!1),e.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var t=this.target;t.removeEventListener("keydown",this.onKeyDown,!1),t.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},removeCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(r.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=l},89666:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(94030),a=i(97081),o=i(10850),h=i(33963),l=i(63399),u=i(50165),c=i(11873),d=i(95625),f=i(48044),p=i(7599),v=i(84314),g=new s({Extends:n,initialize:function(t){n.call(this),this.game=t.systems.game,this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.manager=t.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,t.pluginEvents.once(h.BOOT,this.boot,this),t.pluginEvents.on(h.START,this.start,this)},boot:function(){var t=this.settings.input;this.enabled=o(t,"keyboard",!0);var e=o(t,"keyboard.capture",null);e&&this.addCaptures(e),this.sceneInputPlugin.pluginEvents.once(h.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(h.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(h.SHUTDOWN,this.shutdown,this),this.game.events.on(a.BLUR,this.resetKeys,this),this.scene.sys.events.on(p.PAUSE,this.resetKeys,this),this.scene.sys.events.on(p.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(t){return this.manager.addCapture(t),this},removeCapture:function(t){return this.manager.removeCapture(t),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:c.UP,down:c.DOWN,left:c.LEFT,right:c.RIGHT,space:c.SPACE,shift:c.SHIFT})},addKeys:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var s={};if("string"==typeof t){t=t.split(",");for(var n=0;n-1?s[n]=t:s[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t}return"string"==typeof t&&(t=c[t.toUpperCase()]),s[t]||(s[t]=new u(this,t),e&&this.addCapture(t),s[t].setEmitOnRepeat(i)),s[t]},removeKey:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var s,n=this.keys;if(t instanceof u){var r=n.indexOf(t);r>-1&&(s=this.keys[r],this.keys[r]=void 0)}else"string"==typeof t&&(t=c[t.toUpperCase()]);return n[t]&&(s=n[t],n[t]=void 0),s&&(s.plugin=null,i&&this.removeCapture(s.keyCode),e&&s.destroy()),this},removeAllKeys:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);for(var i=this.keys,s=0;st._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,s=0;s{t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},95625:(t,e,i)=>{var s=i(56694),n=i(94030),r=i(72632),a=i(2544),o=i(88754),h=new s({initialize:function(t,e,i){if(void 0===i&&(i={}),e.length<2)return!1;this.manager=t,this.enabled=!0,this.keyCodes=[];for(var s=0;s{var s=i(60258);t.exports=function(t,e){if(e.matched)return!0;var i=!1,n=!1;if(t.keyCode===e.current)if(e.index>0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(n=!0,i=s(t,e))}else n=!0,i=s(t,e);return!n&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},88754:t=>{t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},5044:t=>{t.exports="keydown"},40813:t=>{t.exports="keyup"},89319:t=>{t.exports="keycombomatch"},43267:t=>{t.exports="down"},78595:t=>{t.exports="keydown-"},30056:t=>{t.exports="keyup-"},81939:t=>{t.exports="up"},94030:(t,e,i)=>{t.exports={ANY_KEY_DOWN:i(5044),ANY_KEY_UP:i(40813),COMBO_MATCH:i(89319),DOWN:i(43267),KEY_DOWN:i(78595),KEY_UP:i(30056),UP:i(81939)}},28388:(t,e,i)=>{t.exports={Events:i(94030),KeyboardManager:i(71064),KeyboardPlugin:i(89666),Key:i(50165),KeyCodes:i(11873),KeyCombo:i(95625),AdvanceKeyCombo:i(60258),ProcessKeyCombo:i(2544),ResetKeyCombo:i(88754),JustDown:i(42460),JustUp:i(53162),DownDuration:i(64964),UpDuration:i(70331)}},64964:t=>{t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeDown;return t.isDown&&i{t.exports=function(t){return!!t._justDown&&(t._justDown=!1,!0)}},53162:t=>{t.exports=function(t){return!!t._justUp&&(t._justUp=!1,!0)}},50165:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(94030),a=new s({Extends:n,initialize:function(t,e){n.call(this),this.plugin=t,this.keyCode=e,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(t){return this.emitOnRepeat=t,this},onDown:function(t){this.originalEvent=t,this.enabled&&(this.altKey=t.altKey,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.location=t.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(r.DOWN,this,t):(this.isDown=!0,this.isUp=!1,this.timeDown=t.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(r.DOWN,this,t)))},onUp:function(t){this.originalEvent=t,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=t.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(r.UP,this,t))},reset:function(){return this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});t.exports=a},11873:t=>{t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},48044:(t,e,i)=>{var s=i(11873),n={};for(var r in s)n[s[r]]=r;t.exports=n},70331:t=>{t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeUp;return t.isUp&&i{var s=i(56694),n=i(90185),r=i(33963),a=i(72283),o=new s({initialize:function(t){this.manager=t,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=a,this.onMouseDown=a,this.onMouseUp=a,this.onMouseDownWindow=a,this.onMouseUpWindow=a,this.onMouseOver=a,this.onMouseOut=a,this.onMouseWheel=a,this.pointerLockChange=a,this.isTop=!0,t.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.passive=t.inputMousePassive,this.preventDefaultDown=t.inputMousePreventDefaultDown,this.preventDefaultUp=t.inputMousePreventDefaultUp,this.preventDefaultMove=t.inputMousePreventDefaultMove,this.preventDefaultWheel=t.inputMousePreventDefaultWheel,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",(function(t){return t.preventDefault(),!1})),this},requestPointerLock:function(){if(n.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},releasePointerLock:function(){n.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this.target;if(t){var e=this,i=this.manager,s=i.canvas,r=window&&window.focus&&i.game.config.autoFocus;this.onMouseMove=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseMove(t),e.preventDefaultMove&&t.preventDefault())},this.onMouseDown=function(t){r&&window.focus(),!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseDown(t),e.preventDefaultDown&&t.target===s&&t.preventDefault())},this.onMouseDownWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onMouseDown(t)},this.onMouseUp=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseUp(t),e.preventDefaultUp&&t.target===s&&t.preventDefault())},this.onMouseUpWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onMouseUp(t)},this.onMouseOver=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOver(t)},this.onMouseOut=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOut(t)},this.onMouseWheel=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onMouseWheel(t),e.preventDefaultWheel&&t.target===s&&t.preventDefault()};var a={passive:!0};if(t.addEventListener("mousemove",this.onMouseMove),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("mouseover",this.onMouseOver,a),t.addEventListener("mouseout",this.onMouseOut,a),this.preventDefaultWheel?t.addEventListener("wheel",this.onMouseWheel,{passive:!1}):t.addEventListener("wheel",this.onMouseWheel,a),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,a),window.top.addEventListener("mouseup",this.onMouseUpWindow,a)}catch(t){window.addEventListener("mousedown",this.onMouseDownWindow,a),window.addEventListener("mouseup",this.onMouseUpWindow,a),this.isTop=!1}n.pointerLock&&(this.pointerLockChange=function(t){var s=e.target;e.locked=document.pointerLockElement===s||document.mozPointerLockElement===s||document.webkitPointerLockElement===s,i.onPointerLockChange(t)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&((t=this.isTop?window.top:window).removeEventListener("mousedown",this.onMouseDownWindow),t.removeEventListener("mouseup",this.onMouseUpWindow)),n.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=o},11343:(t,e,i)=>{t.exports={MouseManager:i(7905)}},37579:(t,e,i)=>{var s=i(56694),n=i(33963),r=i(72283),a=new s({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=r,this.onTouchStartWindow=r,this.onTouchMove=r,this.onTouchEnd=r,this.onTouchEndWindow=r,this.onTouchCancel=r,this.onTouchCancelWindow=r,this.isTop=!0,t.events.once(n.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputTouch,this.target=t.inputTouchEventTarget,this.capture=t.inputTouchCapture,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",(function(t){return t.preventDefault(),!1})),this},startListeners:function(){var t=this.target;if(t){var e=this,i=this.manager,s=i.canvas,n=window&&window.focus&&i.game.config.autoFocus;this.onTouchMove=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchMove(t),e.capture&&t.cancelable&&t.preventDefault())},this.onTouchStart=function(t){n&&window.focus(),!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchStart(t),e.capture&&t.cancelable&&t.target===s&&t.preventDefault())},this.onTouchStartWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onTouchStart(t)},this.onTouchEnd=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchEnd(t),e.capture&&t.cancelable&&t.target===s&&t.preventDefault())},this.onTouchEndWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onTouchEnd(t)},this.onTouchCancel=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchCancel(t),e.capture&&t.preventDefault())},this.onTouchCancelWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onTouchCancel(t)};var r=this.capture,a={passive:!0},o={passive:!1};if(t.addEventListener("touchstart",this.onTouchStart,r?o:a),t.addEventListener("touchmove",this.onTouchMove,r?o:a),t.addEventListener("touchend",this.onTouchEnd,r?o:a),t.addEventListener("touchcancel",this.onTouchCancel,r?o:a),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,o),window.top.addEventListener("touchend",this.onTouchEndWindow,o),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,o)}catch(t){window.addEventListener("touchstart",this.onTouchStartWindow,o),window.addEventListener("touchend",this.onTouchEndWindow,o),window.addEventListener("touchcancel",this.onTouchCancelWindow,o),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("touchstart",this.onTouchStart),t.removeEventListener("touchmove",this.onTouchMove),t.removeEventListener("touchend",this.onTouchEnd),t.removeEventListener("touchcancel",this.onTouchCancel),window&&((t=this.isTop?window.top:window).removeEventListener("touchstart",this.onTouchStartWindow),t.removeEventListener("touchend",this.onTouchEndWindow),t.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=a},77423:(t,e,i)=>{t.exports={TouchManager:i(37579)}},98035:(t,e,i)=>{var s=i(56694),n=i(12117),r=i(683),a=i(72632),o=i(30750),h=i(43531),l=i(88490),u=i(33868),c=new s({initialize:function(t,e){if(this.loader=t,this.cache=a(e,"cache",!1),this.type=a(e,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=a(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.key)throw new Error("Invalid File key: "+this.key);var s=a(e,"url");void 0===s?s=t.path+i+"."+a(e,"extension",""):"string"!=typeof s||s.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(s=t.path+s),this.url=s,this.src="",this.xhrSettings=u(a(e,"responseType",void 0)),a(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,a(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?n.FILE_POPULATED:n.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=a(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===n.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=n.FILE_LOADING,this.src=o(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&this.loader.localSchemes.some((function(e){return 0===t.responseURL.indexOf(e)}))&&0===e.target.status,s=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(s=!1),this.state=n.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,s)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(r.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=n.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=n.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=n.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(t){if(this.state!==n.FILE_PENDING_DESTROY){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(r.FILE_COMPLETE,e,i,t),this.loader.emit(r.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this),this.state=n.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var s=new FileReader;s.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+s.result.split(",")[1]},s.onerror=t.onerror,s.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},76846:t=>{var e={},i={install:function(t){for(var i in e)t[i]=e[i]},register:function(t,i){e[t]=i},destroy:function(){e={}}};t.exports=i},30750:t=>{t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},67285:(t,e,i)=>{var s=i(56694),n=i(12117),r=i(58403),a=i(6659),o=i(683),h=i(76846),l=i(72632),u=i(10850),c=i(91963),d=i(7599),f=i(33868),p=new s({Extends:a,initialize:function(t){a.call(this);var e=t.sys.game.config,i=t.sys.settings.loader;this.scene=t,this.systems=t.sys,this.cacheManager=t.sys.cache,this.textureManager=t.sys.textures,this.sceneManager=t.sys.game.scene,h.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(l(i,"baseURL",e.loaderBaseURL)),this.setPath(l(i,"path",e.loaderPath)),this.setPrefix(l(i,"prefix",e.loaderPrefix)),this.maxParallelDownloads=l(i,"maxParallelDownloads",e.loaderMaxParallelDownloads),this.xhr=f(l(i,"responseType",e.loaderResponseType),l(i,"async",e.loaderAsync),l(i,"user",e.loaderUser),l(i,"password",e.loaderPassword),l(i,"timeout",e.loaderTimeout),l(i,"withCredentials",e.loaderWithCredentials)),this.crossOrigin=l(i,"crossOrigin",e.loaderCrossOrigin),this.imageLoadType=l(i,"imageLoadType",e.loaderImageLoadType),this.localSchemes=l(i,"localScheme",e.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new r,this.inflight=new r,this.queue=new r,this._deleteQueue=new r,this.totalFailed=0,this.totalComplete=0,this.state=n.LOADER_IDLE,this.multiKeyIndex=0,t.sys.events.once(d.BOOT,this.boot,this),t.sys.events.on(d.START,this.pluginStart,this)},boot:function(){this.systems.events.once(d.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(d.SHUTDOWN,this.shutdown,this)},setBaseURL:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.baseURL=t,this},setPath:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.path=t,this},setPrefix:function(t){return void 0===t&&(t=""),this.prefix=t,this},setCORS:function(t){return this.crossOrigin=t,this},addFile:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e0},isLoading:function(){return this.state===n.LOADER_LOADING||this.state===n.LOADER_PROCESSING},isReady:function(){return this.state===n.LOADER_IDLE||this.state===n.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(o.START,this),0===this.list.size?this.loadComplete():(this.state=n.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(d.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(o.PROGRESS,this.progress)},update:function(){this.state===n.LOADER_LOADING&&this.list.size>0&&this.inflight.size{var s=i(98611),n=i(33868);t.exports=function(t,e){var i=void 0===t?n():s({},t);if(e)for(var r in e)void 0!==e[r]&&(i[r]=e[r]);return i}},45176:(t,e,i)=>{var s=i(56694),n=i(12117),r=i(683),a=new s({initialize:function(t,e,i,s){var r=[];s.forEach((function(t){t&&r.push(t)})),this.loader=t,this.type=e,this.key=i,this.multiKeyIndex=t.multiKeyIndex++,this.files=r,this.state=n.FILE_PENDING,this.complete=!1,this.pending=r.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var a=0;a{var s=i(43531);t.exports=function(t,e){var i=s(e,t.xhrSettings),n=new XMLHttpRequest;if(n.open("GET",t.src,i.async,i.user,i.password),n.responseType=t.xhrSettings.responseType,n.timeout=i.timeout,i.headers)for(var r in i.headers)n.setRequestHeader(r,i.headers[r]);return i.header&&i.headerValue&&n.setRequestHeader(i.header,i.headerValue),i.requestedWith&&n.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&n.overrideMimeType(i.overrideMimeType),i.withCredentials&&(n.withCredentials=!0),n.onload=t.onLoad.bind(t,n),n.onerror=t.onError.bind(t,n),n.onprogress=t.onProgress.bind(t),n.send(),n}},33868:t=>{t.exports=function(t,e,i,s,n,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===s&&(s=""),void 0===n&&(n=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:s,timeout:n,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},12117:t=>{t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20}},7398:t=>{t.exports="addfile"},52187:t=>{t.exports="complete"},36627:t=>{t.exports="filecomplete"},81925:t=>{t.exports="filecomplete-"},29774:t=>{t.exports="loaderror"},20943:t=>{t.exports="load"},74693:t=>{t.exports="fileprogress"},71176:t=>{t.exports="postprocess"},88984:t=>{t.exports="progress"},72753:t=>{t.exports="start"},683:(t,e,i)=>{t.exports={ADD:i(7398),COMPLETE:i(52187),FILE_COMPLETE:i(36627),FILE_KEY_COMPLETE:i(81925),FILE_LOAD_ERROR:i(29774),FILE_LOAD:i(20943),FILE_PROGRESS:i(74693),POST_PROCESS:i(71176),PROGRESS:i(88984),START:i(72753)}},46468:(t,e,i)=>{var s=i(56694),n=i(76846),r=i(70806),a=i(683),o=new s({Extends:r,initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.type="animationJSON"},onProcess:function(){this.loader.once(a.POST_PROCESS,this.onLoadComplete,this),r.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});n.register("animation",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(72632),a=i(42927),o=i(42911),h=i(70806),l=i(45176),u=new s({Extends:l,initialize:function(t,e,i,s,n,u){var c,d;if(o(e)){var f=e;e=r(f,"key"),c=new a(t,{key:e,url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),d=new h(t,{key:e,url:r(f,"atlasURL"),extension:r(f,"atlasExtension","json"),xhrSettings:r(f,"atlasXhrSettings")})}else c=new a(t,e,i,n),d=new h(t,e,s,u);c.linkFile?l.call(this,t,"atlasjson",e,[c,d,c.linkFile]):l.call(this,t,"atlasjson",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),e.addToCache(),this.complete=!0}}});n.register("aseprite",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var a=0;a{var s=i(56694),n=i(76846),r=i(72632),a=i(42927),o=i(42911),h=i(70806),l=i(45176),u=new s({Extends:l,initialize:function(t,e,i,s,n,u){var c,d;if(o(e)){var f=e;e=r(f,"key"),c=new a(t,{key:e,url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),d=new h(t,{key:e,url:r(f,"atlasURL"),extension:r(f,"atlasExtension","json"),xhrSettings:r(f,"atlasXhrSettings")})}else c=new a(t,e,i,n),d=new h(t,e,s,u);c.linkFile?l.call(this,t,"atlasjson",e,[c,d,c.linkFile]):l.call(this,t,"atlasjson",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),this.complete=!0}}});n.register("atlas",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var a=0;a{var s=i(56694),n=i(76846),r=i(72632),a=i(42927),o=i(42911),h=i(45176),l=i(15297),u=new s({Extends:h,initialize:function(t,e,i,s,n,u){var c,d;if(o(e)){var f=e;e=r(f,"key"),c=new a(t,{key:e,url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),d=new l(t,{key:e,url:r(f,"atlasURL"),extension:r(f,"atlasExtension","xml"),xhrSettings:r(f,"atlasXhrSettings")})}else c=new a(t,e,i,n),d=new l(t,e,s,u);c.linkFile?h.call(this,t,"atlasxml",e,[c,d,c.linkFile]):h.call(this,t,"atlasxml",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(t.key,t.data,e.data,i),this.complete=!0}}});n.register("atlasXML",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var a=0;a{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(30929),l=i(42911),u=new s({Extends:r,initialize:function(t,e,i,s,n){if(l(e)){var a=e;e=o(a,"key"),s=o(a,"xhrSettings"),n=o(a,"context",n)}var h={type:"audio",cache:t.cacheManager.audio,extension:i.type,responseType:"arraybuffer",key:e,url:i.url,xhrSettings:s,config:{context:n}};r.call(this,t,h)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this;this.config.context.decodeAudioData(this.xhrLoader.response,(function(e){t.data=e,t.onProcessComplete()}),(function(e){console.error("Error decoding audio: "+t.key+" - ",e?e.message:null),t.onProcessError()})),this.config.context=null}});u.create=function(t,e,i,s,n){var r=t.systems.game,a=r.config.audio,c=r.device.audio;l(e)&&(i=o(e,"url",[]),s=o(e,"config",{}));var d=u.getAudioURL(r,i);return d?c.webAudio&&!a.disableWebAudio?new u(t,e,d,n,r.sound.context):new h(t,e,d,s):null},u.getAudioURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i{var s=i(67448),n=i(56694),r=i(76846),a=i(72632),o=i(42911),h=i(70806),l=i(45176),u=new n({Extends:l,initialize:function(t,e,i,n,r,u,c){if(o(e)){var d=e;e=a(d,"key"),i=a(d,"jsonURL"),n=a(d,"audioURL"),r=a(d,"audioConfig"),u=a(d,"audioXhrSettings"),c=a(d,"jsonXhrSettings")}var f;if(n){var p=s.create(t,e,n,r,u);p&&(f=new h(t,e,i,c),l.call(this,t,"audiosprite",e,[p,f]),this.config.resourceLoad=!1)}else f=new h(t,e,i,c),l.call(this,t,"audiosprite",e,[f]),this.config.resourceLoad=!0,this.config.audioConfig=r,this.config.audioXhrSettings=u},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,this.config.resourceLoad&&"json"===t.type&&t.data.hasOwnProperty("resources"))){var e=t.data.resources,i=a(this.config,"audioConfig"),n=a(this.config,"audioXhrSettings"),r=s.create(this.loader,t.key,e,i,n);r&&(this.addToMultiFile(r),this.loader.addFile(r))}},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache(),e.addToCache(),this.complete=!0}}});r.register("audioSprite",(function(t,e,i,s,n,r){var a,o=this.systems.game,h=o.config.audio,l=o.device.audio;if(h&&h.noAudio||!l.webAudio&&!l.audioData)return this;if(Array.isArray(t))for(var c=0;c{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n){var a="bin";if(h(e)){var l=e;e=o(l,"key"),i=o(l,"url"),s=o(l,"xhrSettings"),a=o(l,"extension",a),n=o(l,"dataType",n)}var u={type:"binary",cache:t.cacheManager.binary,extension:a,responseType:"arraybuffer",key:e,url:i,xhrSettings:s,config:{dataType:n}};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this.config.dataType;this.data=t?new t(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});a.register("binary",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(72632),a=i(42927),o=i(42911),h=i(45176),l=i(31476),u=i(15297),c=new s({Extends:h,initialize:function(t,e,i,s,n,l){var c,d;if(o(e)){var f=e;e=r(f,"key"),c=new a(t,{key:e,url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),d=new u(t,{key:e,url:r(f,"fontDataURL"),extension:r(f,"fontDataExtension","xml"),xhrSettings:r(f,"fontDataXhrSettings")})}else c=new a(t,e,i,n),d=new u(t,e,s,l);c.linkFile?h.call(this,t,"bitmapfont",e,[c,d,c.linkFile]):h.call(this,t,"bitmapfont",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache();var i=t.cache.get(t.key),s=l(e.data,t.cache.getFrame(t.key),0,0,i);this.loader.cacheManager.bitmapFont.add(t.key,{data:s,texture:t.key,frame:null}),this.complete=!0}}});n.register("bitmapFont",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var a=0;a{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="css";if(h(e)){var a=e;e=o(a,"key"),i=o(a,"url"),s=o(a,"xhrSettings"),n=o(a,"extension",n)}var l={type:"script",cache:!1,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});a.register("css",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(73152),n=i(40612),r=i(56694),a=i(76846),o=i(72632),h=i(42927),l=i(42911),u=i(70806),c=i(67409),d=i(30657),f=i(80802),p=i(45176),v=i(24904),g=new r({Extends:p,initialize:function(t,e,i,s){if(i.multiAtlasURL){var r=new u(t,{key:e,url:i.multiAtlasURL,xhrSettings:s,config:i});p.call(this,t,"texture",e,[r])}else{var a=i.textureURL.substr(i.textureURL.length-3);i.type||(i.type="ktx"===a.toLowerCase()?"KTX":"PVR");var o=new n(t,{key:e,url:i.textureURL,extension:a,xhrSettings:s,config:i});if(i.atlasURL){var h=new u(t,{key:e,url:i.atlasURL,xhrSettings:s,config:i});p.call(this,t,"texture",e,[o,h])}else p.call(this,t,"texture",e,[o])}this.config=i},onFileComplete:function(t){if(-1!==this.files.indexOf(t)){if(this.pending--,!this.config.multiAtlasURL)return;if("json"===t.type&&t.data.hasOwnProperty("textures")){var e=t.data.textures,i=this.config,s=this.loader,r=s.baseURL,a=s.path,h=s.prefix,l=o(i,"multiBaseURL",this.baseURL),u=o(i,"multiPath",this.path),c=o(i,"prefix",this.prefix),d=o(i,"textureXhrSettings");l&&s.setBaseURL(l),u&&s.setPath(u),c&&s.setPrefix(c);for(var f=0;f{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=i(31053),u=new s({Extends:r,initialize:function(t,e,i,s,n){var a="glsl";if(h(e)){var l=e;e=o(l,"key"),i=o(l,"url"),s=o(l,"shaderType","fragment"),n=o(l,"xhrSettings"),a=o(l,"extension",a)}else void 0===s&&(s="fragment");var u={type:"glsl",cache:t.cacheManager.shader,extension:a,responseType:"text",key:e,url:i,config:{shaderType:s},xhrSettings:n};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.split("\n"),e=this.extractBlock(t,0);if(e)for(;e;){var i=this.getShaderName(e.header),s=this.getShaderType(e.header),n=this.getShaderUniforms(e.header),r=e.shader;if(this.cache.has(i)){var a=this.cache.get(i);"fragment"===s?a.fragmentSrc=r:a.vertexSrc=r,a.uniforms||(a.uniforms=n)}else"fragment"===s?this.cache.add(i,new l(i,r,"",n)):this.cache.add(i,new l(i,"",r,n));e=this.extractBlock(t,e.offset)}else"fragment"===this.config.shaderType?this.cache.add(this.key,new l(this.key,this.data)):this.cache.add(this.key,new l(this.key,"",this.data))},getShaderName:function(t){for(var e=0;e{var s=i(56694),n=i(683),r=i(98035),a=i(72632),o=i(30750),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){if(h(e)){var n=e;e=a(n,"key"),s=a(n,"config",s)}var o={type:"audio",cache:t.cacheManager.audio,extension:i.type,key:e,url:i.url,config:s};r.call(this,t,o),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="html";if(h(e)){var a=e;e=o(a,"key"),i=o(a,"url"),s=o(a,"xhrSettings"),n=o(a,"extension",n)}var l={type:"text",cache:t.cacheManager.html,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("html",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n,a){void 0===s&&(s=512),void 0===n&&(n=512);var l="html";if(h(e)){var u=e;e=o(u,"key"),i=o(u,"url"),a=o(u,"xhrSettings"),l=o(u,"extension",l),s=o(u,"width",s),n=o(u,"height",n)}var c={type:"html",cache:t.textureManager,extension:l,responseType:"text",key:e,url:i,xhrSettings:a,config:{width:s,height:n}};r.call(this,t,c)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this.config.width,e=this.config.height,i=[];i.push(''),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var s=[i.join("\n")],a=this;try{var o=new window.Blob(s,{type:"image/svg+xml;charset=utf-8"})}catch(t){return a.state=n.FILE_ERRORED,void a.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(a.data),a.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(a.data),a.onProcessError()},r.createObjectURL(this.data,o,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});a.register("htmlTexture",(function(t,e,i,s,n){if(Array.isArray(t))for(var r=0;r{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=i(30750),u=new s({Extends:r,initialize:function t(e,i,s,n,a){var l,u="png";if(h(i)){var c=i;i=o(c,"key"),s=o(c,"url"),l=o(c,"normalMap"),n=o(c,"xhrSettings"),u=o(c,"extension",u),a=o(c,"frameConfig")}Array.isArray(s)&&(l=s[1],s=s[0]);var d={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:s,xhrSettings:n,config:a};if(r.call(this,e,d),l){var f=new t(e,this.key,l,n,a);f.type="normalMap",this.setLink(f),e.addFile(f)}this.useImageElementLoad="HTMLImageElement"===e.imageLoadType,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){r.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(t.data),t.onProcessError()},r.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=n.FILE_PROCESSING,t===n.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){if(this.state=n.FILE_LOADING,this.src=l(this,this.loader.baseURL),0===this.src.indexOf("data:"))console.warn("Local data URIs are not supported: "+this.key);else{this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=n.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src}},addToCache:function(){var t=this.linkFile;t?t.state>=n.FILE_COMPLETE&&("normalMap"===this.type?this.cache.addImage(this.key,t.data,this.data):this.cache.addImage(this.key,this.data,t.data)):this.cache.addImage(this.key,this.data)}});a.register("image",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(10850),l=i(42911),u=new s({Extends:r,initialize:function(t,e,i,s,a){var u="json";if(l(e)){var c=e;e=o(c,"key"),i=o(c,"url"),s=o(c,"xhrSettings"),u=o(c,"extension",u),a=o(c,"dataKey",a)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:s,config:a};r.call(this,t,d),l(i)&&(this.data=a?h(i,a):i,this.state=n.FILE_POPULATED)},onProcess:function(){if(this.state!==n.FILE_POPULATED){this.state=n.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});a.register("json",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(72632),a=i(42927),o=i(42911),h=i(70806),l=i(45176),u=new s({Extends:l,initialize:function(t,e,i,s,n,a,u){if(o(e)){var c=e;e=r(c,"key"),i=r(c,"url",!1)?r(c,"url"):r(c,"atlasURL"),a=r(c,"xhrSettings"),s=r(c,"path"),n=r(c,"baseURL"),u=r(c,"textureXhrSettings")}var d=new h(t,e,i,a);l.call(this,t,"multiatlas",e,[d]),this.config.path=s,this.config.baseURL=n,this.config.textureXhrSettings=u},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"json"===t.type&&t.data.hasOwnProperty("textures"))){var e=t.data.textures,i=this.config,s=this.loader,n=s.baseURL,o=s.path,h=s.prefix,l=r(i,"baseURL",this.baseURL),u=r(i,"path",this.path),c=r(i,"prefix",this.prefix),d=r(i,"textureXhrSettings");s.setBaseURL(l),s.setPath(u),s.setPrefix(c);for(var f=0;f{var s=i(56694),n=i(76846),r=i(72632),a=i(42911),o=i(45176),h=i(55188),l=new s({Extends:o,initialize:function(t,e,i,s){var n="js",l=[];if(a(e)){var u=e;e=r(u,"key"),i=r(u,"url"),s=r(u,"xhrSettings"),n=r(u,"extension",n)}Array.isArray(i)||(i=[i]);for(var c=0;c{var s=i(56694),n=i(76846),r=i(72632),a=i(42911),o=i(45176),h=i(27291),l=i(76799),u=i(86897),c=new s({Extends:o,initialize:function(t,e,i,s,n,h){var l,c,d=t.cacheManager.obj;if(a(e)){var f=e;e=r(f,"key"),l=new u(t,{key:e,type:"obj",cache:d,url:r(f,"url"),extension:r(f,"extension","obj"),xhrSettings:r(f,"xhrSettings"),config:{flipUV:r(f,"flipUV",n)}}),(s=r(f,"matURL"))&&(c=new u(t,{key:e,type:"mat",cache:d,url:s,extension:r(f,"matExtension","mat"),xhrSettings:r(f,"xhrSettings")}))}else l=new u(t,{key:e,url:i,type:"obj",cache:d,extension:"obj",xhrSettings:h,config:{flipUV:n}}),s&&(c=new u(t,{key:e,url:s,type:"mat",cache:d,extension:"mat",xhrSettings:h}));o.call(this,t,"obj",e,[l,c])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=h(t.data,t.config.flipUV);e&&(i.materials=l(e.data)),t.cache.add(t.key,i),this.complete=!0}}});n.register("obj",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var a=0;a{var s=i(56694),n=i(12117),r=i(76846),a=i(70806),o=new s({Extends:a,initialize:function(t,e,i,s,n){a.call(this,t,e,i,s,n),this.type="packfile"},onProcess:function(){if(this.state!==n.FILE_POPULATED&&(this.state=n.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var t={};t[this.config]=this.data,this.data=t}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});r.register("pack",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,a,l){var u="js";if(h(e)){var c=e;e=o(c,"key"),i=o(c,"url"),l=o(c,"xhrSettings"),u=o(c,"extension",u),s=o(c,"start"),a=o(c,"mapping")}var d={type:"plugin",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:l,config:{start:s,mapping:a}};r.call(this,t,d),"function"==typeof i&&(this.data=i,this.state=n.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=o(e,"start",!1),s=o(e,"mapping",null);if(this.state===n.FILE_POPULATED)t.install(this.key,this.data,i,s);else{this.state=n.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var r=t.install(this.key,window[this.key],i,s);(i||s)&&(this.loader.systems[s]=r,this.loader.scene[s]=r)}this.onProcessComplete()}});a.register("plugin",(function(t,e,i,s,n){if(Array.isArray(t))for(var r=0;r{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n){var a="svg";if(h(e)){var l=e;e=o(l,"key"),i=o(l,"url"),s=o(l,"svgConfig",{}),n=o(l,"xhrSettings"),a=o(l,"extension",a)}var u={type:"svg",cache:t.textureManager,extension:a,responseType:"text",key:e,url:i,xhrSettings:n,config:{width:o(s,"width"),height:o(s,"height"),scale:o(s,"scale")}};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this.xhrLoader.responseText,e=[t],i=this.config.width,s=this.config.height,a=this.config.scale;t:if(i&&s||a){var o=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("svg")[0],h=o.hasAttribute("viewBox"),l=parseFloat(o.getAttribute("width")),u=parseFloat(o.getAttribute("height"));if(!h&&l&&u)o.setAttribute("viewBox","0 0 "+l+" "+u);else if(h&&!l&&!u){var c=o.getAttribute("viewBox").split(/\s+|,/);l=c[2],u=c[3]}if(a){if(!l||!u)break t;i=l*a,s=u*a}o.setAttribute("width",i.toString()+"px"),o.setAttribute("height",s.toString()+"px"),e=[(new XMLSerializer).serializeToString(o)]}try{var d=new window.Blob(e,{type:"image/svg+xml;charset=utf-8"})}catch(t){return void this.onProcessError()}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var f=this,p=!1;this.data.onload=function(){p||r.revokeObjectURL(f.data),f.onProcessComplete()},this.data.onerror=function(){p?f.onProcessError():(p=!0,r.revokeObjectURL(f.data),f.data.src="data:image/svg+xml,"+encodeURIComponent(e.join("")))},r.createObjectURL(this.data,d,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});a.register("svg",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="js";if(h(e)){var a=e;e=o(a,"key"),i=o(a,"url"),s=o(a,"xhrSettings"),n=o(a,"extension",n)}var l={type:"text",extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.concat("(function(){\nreturn new "+this.key+"();\n}).call(this);"),e=eval;this.loader.sceneManager.add(this.key,e(t)),this.complete=!0}});a.register("sceneFile",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,a,l){var u="js";if(h(e)){var c=e;e=o(c,"key"),i=o(c,"url"),l=o(c,"xhrSettings"),u=o(c,"extension",u),s=o(c,"systemKey"),a=o(c,"sceneKey")}var d={type:"scenePlugin",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:l,config:{systemKey:s,sceneKey:a}};r.call(this,t,d),"function"==typeof i&&(this.data=i,this.state=n.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=this.key,s=o(e,"systemKey",i),r=o(e,"sceneKey",i);this.state===n.FILE_POPULATED?t.installScenePlugin(s,this.data,r,this.loader.scene,!0):(this.state=n.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),t.installScenePlugin(s,window[this.key],r,this.loader.scene,!0)),this.onProcessComplete()}});a.register("scenePlugin",(function(t,e,i,s,n){if(Array.isArray(t))for(var r=0;r{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n){var a="js";if(h(e)){var l=e;e=o(l,"key"),i=o(l,"url"),s=o(l,"type","script"),n=o(l,"xhrSettings"),a=o(l,"extension",a)}else void 0===s&&(s="script");var u={type:s,cache:!1,extension:a,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});a.register("script",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(42927),a=new s({Extends:r,initialize:function(t,e,i,s,n){r.call(this,t,e,i,n,s),this.type="spritesheet"},addToCache:function(){this.cache.addSpriteSheet(this.key,this.data,this.config)}});n.register("spritesheet",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="text",a="txt",l=t.cacheManager.text;if(h(e)){var u=e;e=o(u,"key"),i=o(u,"url"),s=o(u,"xhrSettings"),a=o(u,"extension",a),n=o(u,"type",n),l=o(u,"cache",l)}var c={type:n,cache:l,extension:a,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,c)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("text",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=i(93560),u=new s({Extends:r,initialize:function(t,e,i,s){var n="csv";if(h(e)){var a=e;e=o(a,"key"),i=o(a,"url"),s=o(a,"xhrSettings"),n=o(a,"extension",n)}var u={type:"tilemapCSV",cache:t.cacheManager.tilemap,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,u),this.tilemapFormat=l.CSV},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,t)}});a.register("tilemapCSV",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(76846),r=i(70806),a=i(93560),o=new s({Extends:r,initialize:function(t,e,i,s){r.call(this,t,e,i,s),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:a.WELTMEISTER,data:this.data};this.cache.add(this.key,t)}});n.register("tilemapImpact",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(76846),r=i(70806),a=i(93560),o=new s({Extends:r,initialize:function(t,e,i,s){r.call(this,t,e,i,s),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:a.TILED_JSON,data:this.data};this.cache.add(this.key,t)}});n.register("tilemapTiledJSON",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(76846),r=i(72632),a=i(42927),o=i(42911),h=i(45176),l=i(86897),u=new s({Extends:h,initialize:function(t,e,i,s,n,u){var c,d;if(o(e)){var f=e;e=r(f,"key"),c=new a(t,{key:e,url:r(f,"textureURL"),extension:r(f,"textureExtension","png"),normalMap:r(f,"normalMap"),xhrSettings:r(f,"textureXhrSettings")}),d=new l(t,{key:e,url:r(f,"atlasURL"),extension:r(f,"atlasExtension","txt"),xhrSettings:r(f,"atlasXhrSettings")})}else c=new a(t,e,i,n),d=new l(t,e,s,u);c.linkFile?h.call(this,t,"unityatlas",e,[c,d,c.linkFile]):h.call(this,t,"unityatlas",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(t.key,t.data,e.data,i),this.complete=!0}}});n.register("unityAtlas",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var a=0;a{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(30750),h=i(72632),l=i(42911),u=new s({Extends:r,initialize:function(t,e,i,s,n,a,o){void 0===s&&(s="loadeddata"),void 0===n&&(n=!1),void 0===a&&(a=!1),"loadeddata"!==s&&"canplay"!==s&&"canplaythrough"!==s&&(s="loadeddata");var h={type:"video",cache:t.cacheManager.video,extension:i.type,responseType:"blob",key:e,url:i.url,xhrSettings:o,config:{loadEvent:s,asBlob:n,noAudio:a}};this.onLoadCallback=this.onVideoLoadHandler.bind(this),this.onErrorCallback=this.onVideoErrorHandler.bind(this),r.call(this,t,h)},onProcess:function(){if(this.state=n.FILE_PROCESSING,this.config.asBlob){var t=this.createVideoElement();this.data=t;var e=this;this.data.onloadeddata=function(){e.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(e.data),e.onProcessError()},r.createObjectURL(t,this.xhrLoader.response,""),t.load()}else this.onProcessComplete()},createVideoElement:function(){var t=document.createElement("video");return t.controls=!1,t.crossOrigin=this.loader.crossOrigin,this.config.noAudio&&(t.muted=!0,t.defaultMuted=!0,t.setAttribute("autoplay","autoplay")),t.setAttribute("playsinline","playsinline"),t.setAttribute("preload","auto"),t},onVideoLoadHandler:function(t){var e=t.target;e.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),e.removeEventListener("error",this.onErrorCallback,!0),this.data=e,this.resetXHR(),this.loader.nextFile(this,!0)},onVideoErrorHandler:function(t){var e=t.target;e&&(e.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),e.removeEventListener("error",this.onErrorCallback,!0)),this.resetXHR(),this.loader.nextFile(this,!1)},load:function(){var t=this.config.loadEvent;if(this.config.asBlob)r.prototype.load.call(this);else{this.percentComplete=0;var e=this.createVideoElement();e.addEventListener(t,this.onLoadCallback,!0),e.addEventListener("error",this.onErrorCallback,!0),e.src=o(this,this.loader.baseURL),e.load()}}});u.create=function(t,e,i,s,n,r,a){var o=t.systems.game;l(e)&&(i=h(e,"url",[]),s=h(e,"loadEvent","loadeddata"),n=h(e,"asBlob",!1),r=h(e,"noAudio",!1),a=h(e,"xhrSettings"),e=h(e,"key"));var c=u.getVideoURL(o,i);if(c)return new u(t,e,c,s,n,r,a)},u.getVideoURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i{var s=i(56694),n=i(12117),r=i(98035),a=i(76846),o=i(72632),h=i(42911),l=i(89200),u=new s({Extends:r,initialize:function(t,e,i,s){var n="xml";if(h(e)){var a=e;e=o(a,"key"),i=o(a,"url"),s=o(a,"xhrSettings"),n=o(a,"extension",n)}var l={type:"xml",cache:t.cacheManager.xml,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});a.register("xml",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{t.exports={AnimationJSONFile:i(46468),AsepriteFile:i(31648),AtlasJSONFile:i(73152),AtlasXMLFile:i(24616),AudioFile:i(67448),AudioSpriteFile:i(66109),BinaryFile:i(40612),BitmapFontFile:i(54565),CompressedTextureFile:i(47375),CSSFile:i(99898),GLSLFile:i(46568),HTML5AudioFile:i(30929),HTMLFile:i(77459),HTMLTextureFile:i(9755),ImageFile:i(42927),JSONFile:i(70806),MultiAtlasFile:i(80802),MultiScriptFile:i(39034),OBJFile:i(85527),PackFile:i(3616),PluginFile:i(12217),SceneFile:i(95171),ScenePluginFile:i(82458),ScriptFile:i(55188),SpriteSheetFile:i(33536),SVGFile:i(4474),TextFile:i(86897),TilemapCSVFile:i(58673),TilemapImpactFile:i(98896),TilemapJSONFile:i(50563),UnityAtlasFile:i(82857),VideoFile:i(22833),XMLFile:i(15297)}},95695:(t,e,i)=>{var s=i(12117),n=i(98611),r={Events:i(683),FileTypes:i(34034),File:i(98035),FileTypesManager:i(76846),GetURL:i(30750),LoaderPlugin:i(67285),MergeXHRSettings:i(43531),MultiFile:i(45176),XHRLoader:i(88490),XHRSettings:i(33868)};r=n(!1,r,s),t.exports=r},26042:t=>{t.exports=function(t){for(var e=0,i=0;i{var s=i(8034);t.exports=function(t,e){return s(t)/s(e)/s(t-e)}},17489:t=>{t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},14976:t=>{t.exports=function(t,e,i,s,n){var r=.5*(s-e),a=.5*(n-i),o=t*t;return(2*i-2*s+r+a)*(t*o)+(-3*i+3*s-2*r-a)*o+r*t+i}},89129:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.ceil(t*s)/s}},82897:t=>{t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},75606:(t,e,i)=>{var s=i(83392);t.exports=function(t){return t*s.DEG_TO_RAD}},767:t=>{t.exports=function(t,e){return Math.abs(t-e)}},9849:(t,e,i)=>{var s=i(82897),n=i(56694),r=i(16650),a=i(72283),o=new r,h=new n({initialize:function t(e,i,s,n){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=t.DefaultOrder),this._x=e,this._y=i,this._z=s,this._order=n,this.onChangeCallback=a},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,s){return void 0===s&&(s=this._order),this._x=t,this._y=e,this._z=i,this._order=s,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),o.fromQuat(t),this.setFromRotationMatrix(o,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var n=t.val,r=n[0],a=n[4],o=n[8],h=n[1],l=n[5],u=n[9],c=n[2],d=n[6],f=n[10],p=0,v=0,g=0,m=.99999;switch(e){case"XYZ":v=Math.asin(s(o,-1,1)),Math.abs(o){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},61616:t=>{t.exports=function(t,e){return Math.random()*(e-t)+t}},60679:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.floor(t*s)/s}},91806:(t,e,i)=>{var s=i(82897);t.exports=function(t,e,i){return(i-e)*(t=s(t,0,1))+e}},79366:t=>{t.exports=function(t,e){return t/e/1e3}},43776:t=>{t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},58442:t=>{t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},42798:t=>{t.exports=function(t,e,i){return(e-t)*i+t}},61072:t=>{t.exports=function(t,e,i){return void 0===i&&(i=0),t.clone().lerp(e,i)}},5341:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new s(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=s,this},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=l*r-a*h,c=-l*n+a*o,d=h*n-r*o,f=e*u+i*c+s*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+s*h)*f,t[2]=(a*i-s*r)*f,t[3]=c*f,t[4]=(l*e-s*o)*f,t[5]=(-a*e+s*n)*f,t[6]=d*f,t[7]=(-h*e+i*o)*f,t[8]=(r*e-i*n)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return t[0]=r*l-a*h,t[1]=s*h-i*l,t[2]=i*a-s*r,t[3]=a*o-n*l,t[4]=e*l-s*o,t[5]=s*n-e*a,t[6]=n*h-r*o,t[7]=i*o-e*h,t[8]=e*r-i*n,this},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return e*(l*r-a*h)+i*(-l*n+a*o)+s*(h*n-r*o)},multiply:function(t){var e=this.val,i=e[0],s=e[1],n=e[2],r=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],v=c[3],g=c[4],m=c[5],y=c[6],x=c[7],T=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*s+f*a+p*l,e[2]=d*n+f*o+p*u,e[3]=v*i+g*r+m*h,e[4]=v*s+g*a+m*l,e[5]=v*n+g*o+m*u,e[6]=y*i+x*r+T*h,e[7]=y*s+x*a+T*l,e[8]=y*n+x*o+T*u,this},translate:function(t){var e=this.val,i=t.x,s=t.y;return e[6]=i*e[0]+s*e[3]+e[6],e[7]=i*e[1]+s*e[4]+e[7],e[8]=i*e[2]+s*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],s=e[1],n=e[2],r=e[3],a=e[4],o=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*s+h*a,e[2]=l*n+h*o,e[3]=l*r-h*i,e[4]=l*a-h*s,e[5]=l*o-h*n,this},scale:function(t){var e=this.val,i=t.x,s=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=s*e[3],e[4]=s*e[4],e[5]=s*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,s=t.z,n=t.w,r=e+e,a=i+i,o=s+s,h=e*r,l=e*a,u=e*o,c=i*a,d=i*o,f=s*o,p=n*r,v=n*a,g=n*o,m=this.val;return m[0]=1-(c+f),m[3]=l+g,m[6]=u-v,m[1]=l-g,m[4]=1-(h+f),m[7]=d+p,m[2]=u+v,m[5]=d-p,m[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,s=e[0],n=e[1],r=e[2],a=e[3],o=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],v=e[12],g=e[13],m=e[14],y=e[15],x=s*h-n*o,T=s*l-r*o,w=s*u-a*o,E=n*l-r*h,S=n*u-a*h,b=r*u-a*l,A=c*g-d*v,_=c*m-f*v,C=c*y-p*v,R=d*m-f*g,M=d*y-p*g,P=f*y-p*m,O=x*P-T*M+w*R+E*C-S*_+b*A;return O?(O=1/O,i[0]=(h*P-l*M+u*R)*O,i[1]=(l*C-o*P-u*_)*O,i[2]=(o*M-h*C+u*A)*O,i[3]=(r*M-n*P-a*R)*O,i[4]=(s*P-r*C+a*_)*O,i[5]=(n*C-s*M-a*A)*O,i[6]=(g*b-m*S+y*E)*O,i[7]=(m*w-v*b-y*T)*O,i[8]=(v*S-g*w+y*x)*O,this):null}});t.exports=s},16650:(t,e,i)=>{var s=i(56694),n=i(70015),r=1e-6,a=new s({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new a(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,s,n,r,a,o,h,l,u,c,d,f,p,v){var g=this.val;return g[0]=t,g[1]=e,g[2]=i,g[3]=s,g[4]=n,g[5]=r,g[6]=a,g[7]=o,g[8]=h,g[9]=l,g[10]=u,g[11]=c,g[12]=d,g[13]=f,g[14]=p,g[15]=v,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var s=o.fromQuat(i).val,n=e.x,r=e.y,a=e.z;return this.setValues(s[0]*n,s[1]*n,s[2]*n,0,s[4]*r,s[5]*r,s[6]*r,0,s[8]*a,s[9]*a,s[10]*a,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var s=this.val;return s[12]=t,s[13]=e,s[14]=i,this},scaling:function(t,e,i){this.zero();var s=this.val;return s[0]=t,s[5]=e,s[10]=i,s[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[3],n=t[6],r=t[7],a=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=n,t[11]=t[14],t[12]=s,t[13]=r,t[14]=a,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],v=t[14],g=t[15],m=e*a-i*r,y=e*o-s*r,x=e*h-n*r,T=i*o-s*a,w=i*h-n*a,E=s*h-n*o,S=l*p-u*f,b=l*v-c*f,A=l*g-d*f,_=u*v-c*p,C=u*g-d*p,R=c*g-d*v,M=m*R-y*C+x*_+T*A-w*b+E*S;return M?(M=1/M,this.setValues((a*R-o*C+h*_)*M,(s*C-i*R-n*_)*M,(p*E-v*w+g*T)*M,(c*w-u*E-d*T)*M,(o*A-r*R-h*b)*M,(e*R-s*A+n*b)*M,(v*x-f*E-g*y)*M,(l*E-c*x+d*y)*M,(r*C-a*A+h*S)*M,(i*A-e*C-n*S)*M,(f*w-p*x+g*m)*M,(u*x-l*w-d*m)*M,(a*b-r*_-o*S)*M,(e*_-i*b+s*S)*M,(p*y-f*T-v*m)*M,(l*T-u*y+c*m)*M)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],v=t[14],g=t[15];return this.setValues(a*(c*g-d*v)-u*(o*g-h*v)+p*(o*d-h*c),-(i*(c*g-d*v)-u*(s*g-n*v)+p*(s*d-n*c)),i*(o*g-h*v)-a*(s*g-n*v)+p*(s*h-n*o),-(i*(o*d-h*c)-a*(s*d-n*c)+u*(s*h-n*o)),-(r*(c*g-d*v)-l*(o*g-h*v)+f*(o*d-h*c)),e*(c*g-d*v)-l*(s*g-n*v)+f*(s*d-n*c),-(e*(o*g-h*v)-r*(s*g-n*v)+f*(s*h-n*o)),e*(o*d-h*c)-r*(s*d-n*c)+l*(s*h-n*o),r*(u*g-d*p)-l*(a*g-h*p)+f*(a*d-h*u),-(e*(u*g-d*p)-l*(i*g-n*p)+f*(i*d-n*u)),e*(a*g-h*p)-r*(i*g-n*p)+f*(i*h-n*a),-(e*(a*d-h*u)-r*(i*d-n*u)+l*(i*h-n*a)),-(r*(u*v-c*p)-l*(a*v-o*p)+f*(a*c-o*u)),e*(u*v-c*p)-l*(i*v-s*p)+f*(i*c-s*u),-(e*(a*v-o*p)-r*(i*v-s*p)+f*(i*o-s*a)),e*(a*c-o*u)-r*(i*c-s*u)+l*(i*o-s*a))},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],v=t[14],g=t[15];return(e*a-i*r)*(c*g-d*v)-(e*o-s*r)*(u*g-d*p)+(e*h-n*r)*(u*v-c*p)+(i*o-s*a)*(l*g-d*f)-(i*h-n*a)*(l*v-c*f)+(s*h-n*o)*(l*p-u*f)},multiply:function(t){var e=this.val,i=e[0],s=e[1],n=e[2],r=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],v=e[13],g=e[14],m=e[15],y=t.val,x=y[0],T=y[1],w=y[2],E=y[3];return e[0]=x*i+T*a+w*u+E*p,e[1]=x*s+T*o+w*c+E*v,e[2]=x*n+T*h+w*d+E*g,e[3]=x*r+T*l+w*f+E*m,x=y[4],T=y[5],w=y[6],E=y[7],e[4]=x*i+T*a+w*u+E*p,e[5]=x*s+T*o+w*c+E*v,e[6]=x*n+T*h+w*d+E*g,e[7]=x*r+T*l+w*f+E*m,x=y[8],T=y[9],w=y[10],E=y[11],e[8]=x*i+T*a+w*u+E*p,e[9]=x*s+T*o+w*c+E*v,e[10]=x*n+T*h+w*d+E*g,e[11]=x*r+T*l+w*f+E*m,x=y[12],T=y[13],w=y[14],E=y[15],e[12]=x*i+T*a+w*u+E*p,e[13]=x*s+T*o+w*c+E*v,e[14]=x*n+T*h+w*d+E*g,e[15]=x*r+T*l+w*f+E*m,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,s=e.val,n=i[0],r=i[4],a=i[8],o=i[12],h=i[1],l=i[5],u=i[9],c=i[13],d=i[2],f=i[6],p=i[10],v=i[14],g=i[3],m=i[7],y=i[11],x=i[15],T=s[0],w=s[4],E=s[8],S=s[12],b=s[1],A=s[5],_=s[9],C=s[13],R=s[2],M=s[6],P=s[10],O=s[14],L=s[3],F=s[7],D=s[11],k=s[15];return this.setValues(n*T+r*b+a*R+o*L,h*T+l*b+u*R+c*L,d*T+f*b+p*R+v*L,g*T+m*b+y*R+x*L,n*w+r*A+a*M+o*F,h*w+l*A+u*M+c*F,d*w+f*A+p*M+v*F,g*w+m*A+y*M+x*F,n*E+r*_+a*P+o*D,h*E+l*_+u*P+c*D,d*E+f*_+p*P+v*D,g*E+m*_+y*P+x*D,n*S+r*C+a*O+o*k,h*S+l*C+u*O+c*k,d*S+f*C+p*O+v*k,g*S+m*C+y*O+x*k)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var s=this.val;return s[12]=s[0]*t+s[4]*e+s[8]*i+s[12],s[13]=s[1]*t+s[5]*e+s[9]*i+s[13],s[14]=s[2]*t+s[6]*e+s[10]*i+s[14],s[15]=s[3]*t+s[7]*e+s[11]*i+s[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var s=this.val;return s[0]=s[0]*t,s[1]=s[1]*t,s[2]=s[2]*t,s[3]=s[3]*t,s[4]=s[4]*e,s[5]=s[5]*e,s[6]=s[6]*e,s[7]=s[7]*e,s[8]=s[8]*i,s[9]=s[9]*i,s[10]=s[10]*i,s[11]=s[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),s=Math.sin(e),n=1-i,r=t.x,a=t.y,o=t.z,h=n*r,l=n*a;return this.setValues(h*r+i,h*a-s*o,h*o+s*a,0,h*a+s*o,l*a+i,l*o-s*r,0,h*o-s*a,l*o+s*r,n*o*o+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,s=e.x,n=e.y,a=e.z,o=Math.sqrt(s*s+n*n+a*a);if(Math.abs(o){t.exports=function(t,e,i){return Math.min(t+e,i)}},37394:t=>{t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort((function(t,e){return t-e}));var i=Math.floor(e/2);return e%2==0?(t[i]+t[i-1])/2:t[i]}},17259:t=>{t.exports=function(t,e,i){return Math.max(t-e,i)}},61820:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=e+1);var n=(t-e)/(i-e);return n>1?void 0!==s?(n=(s-t)/(s-i))<0&&(n=0):n=1:n<0&&(n=0),n}},75003:(t,e,i)=>{var s=i(56694),n=i(5341),r=i(72283),a=i(70015),o=1e-6,h=new Int8Array([1,2,0]),l=new Float32Array([0,0,0]),u=new a(1,0,0),c=new a(0,1,0),d=new a,f=new n,p=new s({initialize:function(t,e,i,s){this.onChangeCallback=r,this.set(t,e,i,s)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,s,n){return void 0===n&&(n=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=s||0),n&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,n=t*t+e*e+i*i+s*s;return n>0&&(n=1/Math.sqrt(n),this._x=t*n,this._y=e*n,this._z=i*n,this._w=s*n),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,n=this.z,r=this.w;return this.set(i+e*(t.x-i),s+e*(t.y-s),n+e*(t.z-n),r+e*(t.w-r))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(d.copy(u).cross(t).length().999999?this.set(0,0,0,1):(d.copy(t).cross(e),this._x=d.x,this._y=d.y,this._z=d.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var s=f.val;return s[0]=e.x,s[3]=e.y,s[6]=e.z,s[1]=i.x,s[4]=i.y,s[7]=i.z,s[2]=-t.x,s[5]=-t.y,s[8]=-t.z,this.fromMat3(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,s=this.z,n=this.w,r=t.x,a=t.y,o=t.z,h=t.w;return this.set(e*h+n*r+i*o-s*a,i*h+n*a+s*r-e*o,s*h+n*o+e*a-i*r,n*h-e*r-i*a-s*o)},slerp:function(t,e){var i=this.x,s=this.y,n=this.z,r=this.w,a=t.x,h=t.y,l=t.z,u=t.w,c=i*a+s*h+n*l+r*u;c<0&&(c=-c,a=-a,h=-h,l=-l,u=-u);var d=1-e,f=e;if(1-c>o){var p=Math.acos(c),v=Math.sin(p);d=Math.sin((1-e)*p)/v,f=Math.sin(e*p)/v}return this.set(d*i+f*a,d*s+f*h,d*n+f*l,d*r+f*u)},invert:function(){var t=this.x,e=this.y,i=this.z,s=this.w,n=t*t+e*e+i*i+s*s,r=n?1/n:0;return this.set(-t*r,-e*r,-i*r,s*r)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,n=this.w,r=Math.sin(t),a=Math.cos(t);return this.set(e*a+n*r,i*a+s*r,s*a-i*r,n*a-e*r)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,n=this.w,r=Math.sin(t),a=Math.cos(t);return this.set(e*a-s*r,i*a+n*r,s*a+e*r,n*a-i*r)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,n=this.w,r=Math.sin(t),a=Math.cos(t);return this.set(e*a+i*r,i*a-e*r,s*a+n*r,n*a-s*r)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,s=t.y/2,n=t.z/2,r=Math.cos(i),a=Math.cos(s),o=Math.cos(n),h=Math.sin(i),l=Math.sin(s),u=Math.sin(n);switch(t.order){case"XYZ":this.set(h*a*o+r*l*u,r*l*o-h*a*u,r*a*u+h*l*o,r*a*o-h*l*u,e);break;case"YXZ":this.set(h*a*o+r*l*u,r*l*o-h*a*u,r*a*u-h*l*o,r*a*o+h*l*u,e);break;case"ZXY":this.set(h*a*o-r*l*u,r*l*o+h*a*u,r*a*u+h*l*o,r*a*o-h*l*u,e);break;case"ZYX":this.set(h*a*o-r*l*u,r*l*o+h*a*u,r*a*u-h*l*o,r*a*o+h*l*u,e);break;case"YZX":this.set(h*a*o+r*l*u,r*l*o+h*a*u,r*a*u-h*l*o,r*a*o-h*l*u,e);break;case"XZY":this.set(h*a*o-r*l*u,r*l*o-h*a*u,r*a*u+h*l*o,r*a*o+h*l*u,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,s=i[0],n=i[4],r=i[8],a=i[1],o=i[5],h=i[9],l=i[2],u=i[6],c=i[10],d=s+o+c;return d>0?(e=.5/Math.sqrt(d+1),this.set((u-h)*e,(r-l)*e,(a-n)*e,.25/e)):s>o&&s>c?(e=2*Math.sqrt(1+s-o-c),this.set(.25*e,(n+a)/e,(r+l)/e,(u-h)/e)):o>c?(e=2*Math.sqrt(1+o-s-c),this.set((n+a)/e,.25*e,(h+u)/e,(r-l)/e)):(e=2*Math.sqrt(1+c-s-o),this.set((r+l)/e,(h+u)/e,.25*e,(a-n)/e)),this},fromMat3:function(t){var e,i=t.val,s=i[0]+i[4]+i[8];if(s>0)e=Math.sqrt(s+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var n=0;i[4]>i[0]&&(n=1),i[8]>i[3*n+n]&&(n=2);var r=h[n],a=h[r];e=Math.sqrt(i[3*n+n]-i[3*r+r]-i[3*a+a]+1),l[n]=.5*e,e=.5/e,l[r]=(i[3*r+n]+i[3*n+r])*e,l[a]=(i[3*a+n]+i[3*n+a])*e,this._x=l[0],this._y=l[1],this._z=l[2],this._w=(i[3*a+r]-i[3*r+a])*e}return this.onChangeCallback(this),this}});t.exports=p},23701:(t,e,i)=>{var s=i(83392);t.exports=function(t){return t*s.RAD_TO_DEG}},16906:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},52417:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,s=2*Math.random()-1,n=Math.sqrt(1-s*s)*e;return t.x=Math.cos(i)*n,t.y=Math.sin(i)*n,t.z=s*e,t}},17915:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},52257:t=>{t.exports=function(t,e){var i=t.x,s=t.y;return t.x=i*Math.cos(e)-s*Math.sin(e),t.y=i*Math.sin(e)+s*Math.cos(e),t}},2386:t=>{t.exports=function(t,e,i,s){var n=Math.cos(s),r=Math.sin(s),a=t.x-e,o=t.y-i;return t.x=a*n-o*r+e,t.y=a*r+o*n+i,t}},72395:t=>{t.exports=function(t,e,i,s,n){var r=s+Math.atan2(t.y-i,t.x-e);return t.x=e+n*Math.cos(r),t.y=i+n*Math.sin(r),t}},41061:t=>{t.exports=function(t,e,i,s,n){return t.x=e+n*Math.cos(s),t.y=i+n*Math.sin(s),t}},93709:(t,e,i)=>{var s=i(70015),n=i(16650),r=i(75003),a=new n,o=new r,h=new s;t.exports=function(t,e,i){return o.setAxisAngle(e,i),a.fromRotationTranslation(o,h.set(0,0,0)),t.transformMat4(a)}},67233:t=>{t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},64333:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.round(t*s)/s}},59533:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=1),s*=Math.PI/t;for(var n=[],r=[],a=0;a{t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},87736:t=>{t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},55805:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n){void 0===n&&(n=new s);var r=0,a=0;return t>0&&t<=e*i&&(r=t>e-1?t-(a=Math.floor(t/e))*e:t),n.set(r,a)}},64462:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,a,o,h){void 0===h&&(h=new s);var l=Math.sin(r),u=Math.cos(r),c=u*a,d=l*a,f=-l*o,p=u*o,v=1/(c*p+f*-d);return h.x=p*v*t+-f*v*e+(n*f-i*p)*v,h.y=c*v*e+-d*v*t+(-n*c+i*d)*v,h}},93736:(t,e,i)=>{var s=i(56694),n=i(88456),r=new s({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new r(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return n(this.x,t.x,e)&&n(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this},transformMat3:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[3]*i+s[6],this.y=s[1]*e+s[4]*i+s[7],this},transformMat4:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[4]*i+s[12],this.y=s[1]*e+s[5]*i+s[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)},project:function(t){var e=this.dot(t)/t.dot(t);return this.copy(t).scale(e)}});r.ZERO=new r,r.RIGHT=new r(1,0),r.LEFT=new r(-1,0),r.UP=new r(0,-1),r.DOWN=new r(0,1),r.ONE=new r(1,1),t.exports=r},70015:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new s(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var i=t.x,s=t.y,n=t.z,r=e.x,a=e.y,o=e.z;return this.x=s*o-n*a,this.y=n*r-i*o,this.z=i*a-s*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return Math.sqrt(e*e+i*i+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return e*e+i*i+s*s},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,s=t*t+e*e+i*i;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,s=this.z,n=t.x,r=t.y,a=t.z;return this.x=i*a-s*r,this.y=s*n-e*a,this.z=e*r-i*n,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,n=this.z;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=n+e*(t.z-n),this},applyMatrix3:function(t){var e=this.x,i=this.y,s=this.z,n=t.val;return this.x=n[0]*e+n[3]*i+n[6]*s,this.y=n[1]*e+n[4]*i+n[7]*s,this.z=n[2]*e+n[5]*i+n[8]*s,this},applyMatrix4:function(t){var e=this.x,i=this.y,s=this.z,n=t.val,r=1/(n[3]*e+n[7]*i+n[11]*s+n[15]);return this.x=(n[0]*e+n[4]*i+n[8]*s+n[12])*r,this.y=(n[1]*e+n[5]*i+n[9]*s+n[13])*r,this.z=(n[2]*e+n[6]*i+n[10]*s+n[14])*r,this},transformMat3:function(t){var e=this.x,i=this.y,s=this.z,n=t.val;return this.x=e*n[0]+i*n[3]+s*n[6],this.y=e*n[1]+i*n[4]+s*n[7],this.z=e*n[2]+i*n[5]+s*n[8],this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,n=t.val;return this.x=n[0]*e+n[4]*i+n[8]*s+n[12],this.y=n[1]*e+n[5]*i+n[9]*s+n[13],this.z=n[2]*e+n[6]*i+n[10]*s+n[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,s=this.z,n=t.val,r=e*n[0]+i*n[4]+s*n[8]+n[12],a=e*n[1]+i*n[5]+s*n[9]+n[13],o=e*n[2]+i*n[6]+s*n[10]+n[14],h=e*n[3]+i*n[7]+s*n[11]+n[15];return this.x=r/h,this.y=a/h,this.z=o/h,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,n=t.x,r=t.y,a=t.z,o=t.w,h=o*e+r*s-a*i,l=o*i+a*e-n*s,u=o*s+n*i-r*e,c=-n*e-r*i-a*s;return this.x=h*o+c*-n+l*-a-u*-r,this.y=l*o+c*-r+u*-n-h*-a,this.z=u*o+c*-a+h*-r-l*-n,this},project:function(t){var e=this.x,i=this.y,s=this.z,n=t.val,r=n[0],a=n[1],o=n[2],h=n[3],l=n[4],u=n[5],c=n[6],d=n[7],f=n[8],p=n[9],v=n[10],g=n[11],m=n[12],y=n[13],x=n[14],T=1/(e*h+i*d+s*g+n[15]);return this.x=(e*r+i*l+s*f+m)*T,this.y=(e*a+i*u+s*p+y)*T,this.z=(e*o+i*c+s*v+x)*T,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,s=t.y,n=t.z,r=t.w,a=this.x-i,o=r-this.y-1-s,h=this.z;return this.x=2*a/n-1,this.y=2*o/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});s.ZERO=new s,s.RIGHT=new s(1,0,0),s.LEFT=new s(-1,0,0),s.UP=new s(0,-1,0),s.DOWN=new s(0,1,0),s.FORWARD=new s(0,0,1),s.BACK=new s(0,0,-1),s.ONE=new s(1,1,1),t.exports=s},51729:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0)},clone:function(){return new s(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,s){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,n=t*t+e*e+i*i+s*s;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n,this.w=s*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,n=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=n+e*(t.z-n),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,n=t.w-this.w||0;return Math.sqrt(e*e+i*i+s*s+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,n=t.w-this.w||0;return e*e+i*i+s*s+n*n},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,n=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*s+r[12]*n,this.y=r[1]*e+r[5]*i+r[9]*s+r[13]*n,this.z=r[2]*e+r[6]*i+r[10]*s+r[14]*n,this.w=r[3]*e+r[7]*i+r[11]*s+r[15]*n,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,n=t.x,r=t.y,a=t.z,o=t.w,h=o*e+r*s-a*i,l=o*i+a*e-n*s,u=o*s+n*i-r*e,c=-n*e-r*i-a*s;return this.x=h*o+c*-n+l*-a-u*-r,this.y=l*o+c*-r+u*-n-h*-a,this.z=u*o+c*-a+h*-r-l*-n,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});s.prototype.sub=s.prototype.subtract,s.prototype.mul=s.prototype.multiply,s.prototype.div=s.prototype.divide,s.prototype.dist=s.prototype.distance,s.prototype.distSq=s.prototype.distanceSq,s.prototype.len=s.prototype.length,s.prototype.lenSq=s.prototype.lengthSq,t.exports=s},9557:t=>{t.exports=function(t,e,i){return Math.abs(t-e)<=i}},1071:t=>{t.exports=function(t,e,i){var s=i-e;return e+((t-e)%s+s)%s}},90447:t=>{t.exports=function(t,e,i,s){return Math.atan2(s-e,i-t)}},94240:t=>{t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},84066:t=>{t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},9678:t=>{t.exports=function(t,e,i,s){return Math.atan2(i-t,s-e)}},76861:(t,e,i)=>{var s=i(83392);t.exports=function(t){return t>Math.PI&&(t-=s.PI2),Math.abs(((t+s.TAU)%s.PI2-s.PI2)%s.PI2)}},37570:t=>{t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},87597:(t,e,i)=>{var s=i(61616);t.exports=function(){return s(-Math.PI,Math.PI)}},74493:(t,e,i)=>{var s=i(61616);t.exports=function(){return s(-180,180)}},19049:(t,e,i)=>{var s=i(37570);t.exports=function(t){return s(t+Math.PI)}},90612:(t,e,i)=>{var s=i(83392);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=s.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e{t.exports=function(t,e){var i=e-t;return 0===i?0:i-360*Math.floor((i- -180)/360)}},35786:(t,e,i)=>{var s=i(1071);t.exports=function(t){return s(t,-Math.PI,Math.PI)}},62138:(t,e,i)=>{var s=i(1071);t.exports=function(t){return s(t,-180,180)}},22153:(t,e,i)=>{t.exports={Between:i(90447),BetweenPoints:i(94240),BetweenPointsY:i(84066),BetweenY:i(9678),CounterClockwise:i(76861),Normalize:i(37570),Random:i(87597),RandomDegrees:i(74493),Reverse:i(19049),RotateTo:i(90612),ShortestBetween:i(93954),Wrap:i(35786),WrapDegrees:i(62138)}},83392:t=>{var e={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=e},53996:t=>{t.exports=function(t,e,i,s){var n=t-i,r=e-s;return Math.sqrt(n*n+r*r)}},92951:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return Math.sqrt(i*i+s*s)}},12161:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return i*i+s*s}},38057:t=>{t.exports=function(t,e,i,s){return Math.max(Math.abs(t-i),Math.abs(e-s))}},33297:t=>{t.exports=function(t,e,i,s,n){return void 0===n&&(n=2),Math.sqrt(Math.pow(i-t,n)+Math.pow(s-e,n))}},90366:t=>{t.exports=function(t,e,i,s){return Math.abs(t-i)+Math.abs(e-s)}},35032:t=>{t.exports=function(t,e,i,s){var n=t-i,r=e-s;return n*n+r*r}},10130:(t,e,i)=>{t.exports={Between:i(53996),BetweenPoints:i(92951),BetweenPointsSquared:i(12161),Chebyshev:i(38057),Power:i(33297),Snake:i(90366),Squared:i(35032)}},35060:(t,e,i)=>{var s=i(25265),n=i(57428),r=i(73214),a=i(71778),o=i(36468),h=i(88258),l=i(52910),u=i(67799),c=i(74083),d=i(92284),f=i(28035),p=i(8754);t.exports={Power0:l,Power1:u.Out,Power2:a.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:a.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:o.Out,Back:s.Out,Bounce:n.Out,Stepped:p,"Quad.easeIn":u.In,"Cubic.easeIn":a.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":o.In,"Back.easeIn":s.In,"Bounce.easeIn":n.In,"Quad.easeOut":u.Out,"Cubic.easeOut":a.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":o.Out,"Back.easeOut":s.Out,"Bounce.easeOut":n.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":a.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":o.InOut,"Back.easeInOut":s.InOut,"Bounce.easeInOut":n.InOut}},25860:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},45264:t=>{t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},36699:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},25265:(t,e,i)=>{t.exports={In:i(25860),Out:i(36699),InOut:i(45264)}},62191:t=>{t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},24799:t=>{t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},60819:t=>{t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},57428:(t,e,i)=>{t.exports={In:i(62191),Out:i(60819),InOut:i(24799)}},86855:t=>{t.exports=function(t){return 1-Math.sqrt(1-t*t)}},7280:t=>{t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},18058:t=>{t.exports=function(t){return Math.sqrt(1- --t*t)}},73214:(t,e,i)=>{t.exports={In:i(86855),Out:i(18058),InOut:i(7280)}},91532:t=>{t.exports=function(t){return t*t*t}},63180:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},16518:t=>{t.exports=function(t){return--t*t*t+1}},71778:(t,e,i)=>{t.exports={In:i(91532),Out:i(16518),InOut:i(63180)}},24729:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)}},50325:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*.5+1}},84074:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-s)*(2*Math.PI)/i)+1}},36468:(t,e,i)=>{t.exports={In:i(24729),Out:i(84074),InOut:i(50325)}},95638:t=>{t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},10357:t=>{t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},14894:t=>{t.exports=function(t){return 1-Math.pow(2,-10*t)}},88258:(t,e,i)=>{t.exports={In:i(95638),Out:i(14894),InOut:i(10357)}},33063:(t,e,i)=>{t.exports={Back:i(25265),Bounce:i(57428),Circular:i(73214),Cubic:i(71778),Elastic:i(36468),Expo:i(88258),Linear:i(52910),Quadratic:i(67799),Quartic:i(74083),Quintic:i(92284),Sine:i(28035),Stepped:i(8754)}},43927:t=>{t.exports=function(t){return t}},52910:(t,e,i)=>{t.exports=i(43927)},77471:t=>{t.exports=function(t){return t*t}},83863:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},44383:t=>{t.exports=function(t){return t*(2-t)}},67799:(t,e,i)=>{t.exports={In:i(77471),Out:i(44383),InOut:i(83863)}},48311:t=>{t.exports=function(t){return t*t*t*t}},55248:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},23135:t=>{t.exports=function(t){return 1- --t*t*t*t}},74083:(t,e,i)=>{t.exports={In:i(48311),Out:i(23135),InOut:i(55248)}},7313:t=>{t.exports=function(t){return t*t*t*t*t}},98759:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},26670:t=>{t.exports=function(t){return--t*t*t*t*t+1}},92284:(t,e,i)=>{t.exports={In:i(7313),Out:i(26670),InOut:i(98759)}},52929:t=>{t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},66333:t=>{t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},37255:t=>{t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},28035:(t,e,i)=>{t.exports={In:i(52929),Out:i(37255),InOut:i(66333)}},52770:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},8754:(t,e,i)=>{t.exports=i(52770)},17247:t=>{t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},88456:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},41935:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},54726:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t{t.exports={Ceil:i(17247),Equal:i(88456),Floor:i(61824),GreaterThan:i(41935),LessThan:i(54726)}},5923:(t,e,i)=>{var s=i(83392),n=i(98611),r={Angle:i(22153),Distance:i(10130),Easing:i(33063),Fuzzy:i(52778),Interpolation:i(48528),Pow2:i(73773),Snap:i(23679),RandomDataGenerator:i(81429),Average:i(26042),Bernstein:i(22824),Between:i(17489),CatmullRom:i(14976),CeilTo:i(89129),Clamp:i(82897),DegToRad:i(75606),Difference:i(767),Euler:i(9849),Factorial:i(8034),FloatBetween:i(61616),FloorTo:i(60679),FromPercent:i(91806),GetSpeed:i(79366),IsEven:i(43776),IsEvenStrict:i(58442),Linear:i(42798),LinearXY:i(61072),MaxAdd:i(69635),Median:i(37394),MinSub:i(17259),Percent:i(61820),RadToDeg:i(23701),RandomXY:i(16906),RandomXYZ:i(52417),RandomXYZW:i(17915),Rotate:i(52257),RotateAround:i(2386),RotateAroundDistance:i(72395),RotateTo:i(41061),RoundAwayFromZero:i(67233),RoundTo:i(64333),SinCosTableGenerator:i(59533),SmootherStep:i(87736),SmoothStep:i(5514),ToXY:i(55805),TransformXY:i(64462),Within:i(9557),Wrap:i(1071),Vector2:i(93736),Vector3:i(70015),Vector4:i(51729),Matrix3:i(5341),Matrix4:i(16650),Quaternion:i(75003),RotateVec3:i(93709)};r=n(!1,r,s),t.exports=r},63210:(t,e,i)=>{var s=i(22824);t.exports=function(t,e){for(var i=0,n=t.length-1,r=0;r<=n;r++)i+=Math.pow(1-e,n-r)*Math.pow(e,r)*t[r]*s(n,r);return i}},88332:(t,e,i)=>{var s=i(14976);t.exports=function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n);return t[0]===t[i]?(e<0&&(r=Math.floor(n=i*(1+e))),s(n-r,t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i])):e<0?t[0]-(s(-n,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(s(n-i,t[i],t[i],t[i-1],t[i-1])-t[i]):s(n-r,t[r?r-1:0],t[r],t[i{t.exports=function(t,e,i,s,n){return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,s)+function(t,e){return t*t*t*e}(t,n)}},47614:(t,e,i)=>{var s=i(42798);t.exports=function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n);return e<0?s(t[0],t[1],n):e>1?s(t[i],t[i-1],i-n):s(t[r],t[r+1>i?i:r+1],n-r)}},16252:t=>{t.exports=function(t,e,i,s){return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,s)}},44521:(t,e,i)=>{var s=i(5514);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},45507:(t,e,i)=>{var s=i(87736);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},48528:(t,e,i)=>{t.exports={Bezier:i(63210),CatmullRom:i(88332),CubicBezier:i(34631),Linear:i(47614),QuadraticBezier:i(16252),SmoothStep:i(44521),SmootherStep:i(45507)}},3504:t=>{t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<{t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},2018:t=>{t.exports=function(t){return t>0&&0==(t&t-1)}},73773:(t,e,i)=>{t.exports={GetNext:i(3504),IsSize:i(28621),IsValue:i(2018)}},81429:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),s=t[i];t[i]=t[e],t[e]=s}return t}});t.exports=s},82127:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),s?(i+t)/e:i+t)}},84314:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),s?(i+t)/e:i+t)}},88462:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),s?(i+t)/e:i+t)}},23679:(t,e,i)=>{t.exports={Ceil:i(82127),Floor:i(84314),To:i(88462)}},85780:(t,e,i)=>{var s=i(86459),n=i(98611),r={Actions:i(83979),Animations:i(13517),BlendModes:i(95723),Cache:i(45820),Cameras:i(44143),Core:i(80293),Class:i(56694),Create:i(84106),Curves:i(73962),Data:i(1999),Display:i(24816),DOM:i(3590),Events:i(95146),Game:i(15213),GameObjects:i(48013),Geom:i(84068),Input:i(20873),Loader:i(95695),Math:i(5923),Physics:{Arcade:i(39977)},Plugins:i(45615),Renderer:i(42069),Scale:i(86754),ScaleModes:i(27394),Scene:i(87157),Scenes:i(20436),Structs:i(20010),Textures:i(87499),Tilemaps:i(52678),Time:i(97121),Tweens:i(75193),Utils:i(22178)};r.Sound=i(56751),r=n(!1,r,s),t.exports=r,i.g.Phaser=r},62832:(t,e,i)=>{var s=i(56694),n=i(7864),r=i(1539),a=new s({Extends:r,Mixins:[n.Acceleration,n.Angular,n.Bounce,n.Debug,n.Drag,n.Enable,n.Friction,n.Gravity,n.Immovable,n.Mass,n.Pushable,n.Size,n.Velocity],initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.body=null}});t.exports=a},66150:(t,e,i)=>{var s=i(56694),n=i(75606),r=i(53996),a=i(35032),o=i(99523),h=i(72632),l=i(30657),u=i(2732),c=i(15147),d=i(91963),f=i(7599),p=i(93736),v=i(85233),g=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,t.sys.events.once(f.BOOT,this.boot,this),t.sys.events.on(f.START,this.start,this)},boot:function(){this.world=new v(this.scene,this.config),this.add=new o(this.world),this.systems.events.once(f.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new v(this.scene,this.config),this.add=new o(this.world));var t=this.systems.events;h(this.config,"customUpdate",!1)||t.on(f.UPDATE,this.world.update,this.world),t.on(f.POST_UPDATE,this.world.postUpdate,this.world),t.once(f.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(f.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(f.UPDATE,this.world.update,this.world)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return l(h(e,"arcade",{}),h(t,"arcade",{}))},overlap:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.world.collideObjects(t,e,i,s,n,!0)},collide:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.world.collideObjects(t,e,i,s,n,!1)},collideTiles:function(t,e,i,s,n){return this.world.collideTiles(t,e,i,s,n)},overlapTiles:function(t,e,i,s,n){return this.world.overlapTiles(t,e,i,s,n)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(t,e,i,s,n,r){void 0===s&&(s=60);var a=Math.atan2(i-t.y,e-t.x);return t.body.acceleration.setToPolar(a,s),void 0!==n&&void 0!==r&&t.body.maxVelocity.set(n,r),a},accelerateToObject:function(t,e,i,s,n){return this.accelerateTo(t,e.x,e.y,i,s,n)},closest:function(t,e){e||(e=this.world.bodies.entries);for(var i=Number.MAX_VALUE,s=null,n=t.x,r=t.y,o=e.length,h=0;hi&&(s=l,i=c)}}return s},moveTo:function(t,e,i,s,n){void 0===s&&(s=60),void 0===n&&(n=0);var a=Math.atan2(i-t.y,e-t.x);return n>0&&(s=r(t.x,t.y,e,i)/(n/1e3)),t.body.velocity.setToPolar(a,s),a},moveToObject:function(t,e,i,s){return this.moveTo(t,e.x,e.y,i,s)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(n(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new p),i.setToPolar(t,e)},overlapRect:function(t,e,i,s,n,r){return c(this.world,t,e,i,s,n,r)},overlapCirc:function(t,e,i,s,n){return u(this.world,t,e,i,s,n)},shutdown:function(){if(this.world){var t=this.systems.events;t.off(f.UPDATE,this.world.update,this.world),t.off(f.POST_UPDATE,this.world.postUpdate,this.world),t.off(f.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null}},destroy:function(){this.shutdown(),this.scene.sys.events.off(f.START,this.start,this),this.scene=null,this.systems=null}});d.register("ArcadePhysics",g,"arcadePhysics"),t.exports=g},25084:(t,e,i)=>{var s=i(56694),n=i(7864),r=i(13747),a=new s({Extends:r,Mixins:[n.Acceleration,n.Angular,n.Bounce,n.Debug,n.Drag,n.Enable,n.Friction,n.Gravity,n.Immovable,n.Mass,n.Pushable,n.Size,n.Velocity],initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.body=null}});t.exports=a},97602:(t,e,i)=>{var s=i(56694),n=i(47401),r=i(27037),a=i(23701),o=i(74118),h=i(94287),l=i(93736),u=new s({initialize:function(t,e){var i=64,s=64,r=void 0!==e;r&&e.displayWidth&&(i=e.displayWidth,s=e.displayHeight),r||(e={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=t,this.gameObject=r?e:void 0,this.isBody=!0,this.transform={x:e.x,y:e.y,rotation:e.angle,scaleX:e.scaleX,scaleY:e.scaleY,displayOriginX:e.displayOriginX,displayOriginY:e.displayOriginY},this.debugShowBody=t.defaults.debugShowBody,this.debugShowVelocity=t.defaults.debugShowVelocity,this.debugBodyColor=t.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new l,this.position=new l(e.x-e.scaleX*e.displayOriginX,e.y-e.scaleY*e.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=e.angle,this.preRotation=e.angle,this.width=i,this.height=s,this.sourceWidth=i,this.sourceHeight=s,e.frame&&(this.sourceWidth=e.frame.realWidth,this.sourceHeight=e.frame.realHeight),this.halfWidth=Math.abs(i/2),this.halfHeight=Math.abs(s/2),this.center=new l(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new l,this.newVelocity=new l,this.deltaMax=new l,this.acceleration=new l,this.allowDrag=!0,this.drag=new l,this.allowGravity=!0,this.gravity=new l,this.bounce=new l,this.worldBounce=null,this.customBoundsRectangle=t.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new l(1e4,1e4),this.maxSpeed=-1,this.friction=new l(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=n.FACING_NONE,this.immovable=!1,this.pushable=!0,this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.syncBounds=!1,this.physicsType=n.DYNAMIC_BODY,this._sx=e.scaleX,this._sy=e.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new o},updateBounds:function(){var t=this.gameObject,e=this.transform;if(t.parentContainer){var i=t.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);e.x=i.tx,e.y=i.ty,e.rotation=a(i.rotation),e.scaleX=i.scaleX,e.scaleY=i.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY}else e.x=t.x,e.y=t.y,e.rotation=t.angle,e.scaleX=t.scaleX,e.scaleY=t.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY;var s=!1;if(this.syncBounds){var n=t.getBounds(this._bounds);this.width=n.width,this.height=n.height,s=!0}else{var r=Math.abs(e.scaleX),o=Math.abs(e.scaleY);this._sx===r&&this._sy===o||(this.width=this.sourceWidth*r,this.height=this.sourceHeight*o,this._sx=r,this._sy=o,s=!0)}s&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var t=this.transform;this.position.x=t.x+t.scaleX*(this.offset.x-t.displayOriginX),this.position.y=t.y+t.scaleY*(this.offset.y-t.displayOriginY),this.updateCenter()},resetFlags:function(t){void 0===t&&(t=!1);var e=this.wasTouching,i=this.touching,s=this.blocked;t?(e.none=!0,e.up=!1,e.down=!1,e.left=!1,e.right=!1):(e.none=i.none,e.up=i.up,e.down=i.down,e.left=i.left,e.right=i.right),i.none=!0,i.up=!1,i.down=!1,i.left=!1,i.right=!1,s.none=!0,s.up=!1,s.down=!1,s.left=!1,s.right=!1,this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(t,e){t&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves&&(this.prev.x=this.position.x,this.prev.y=this.position.y,this.prevFrame.x=this.position.x,this.prevFrame.y=this.position.y),t&&this.update(e)},update:function(t){if(this.prev.x=this.position.x,this.prev.y=this.position.y,this.moves){this.world.updateMotion(this,t);var e=this.velocity.x,i=this.velocity.y;this.newVelocity.set(e*t,i*t),this.position.add(this.newVelocity),this.updateCenter(),this.angle=Math.atan2(i,e),this.speed=Math.sqrt(e*e+i*i),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds&&this.world.emit(r.WORLD_BOUNDS,this,this.blocked.up,this.blocked.down,this.blocked.left,this.blocked.right)}this._dx=this.position.x-this.prev.x,this._dy=this.position.y-this.prev.y},postUpdate:function(){var t=this.position.x-this.prevFrame.x,e=this.position.y-this.prevFrame.y,i=this.gameObject;if(this.moves){var s=this.deltaMax.x,r=this.deltaMax.y;0!==s&&0!==t&&(t<0&&t<-s?t=-s:t>0&&t>s&&(t=s)),0!==r&&0!==e&&(e<0&&e<-r?e=-r:e>0&&e>r&&(e=r)),i&&(i.x+=t,i.y+=e)}t<0?this.facing=n.FACING_LEFT:t>0&&(this.facing=n.FACING_RIGHT),e<0?this.facing=n.FACING_UP:e>0&&(this.facing=n.FACING_DOWN),this.allowRotation&&i&&(i.angle+=this.deltaZ()),this._tx=t,this._ty=e},setBoundsRectangle:function(t){return this.customBoundsRectangle=t||this.world.bounds,this},checkWorldBounds:function(){var t=this.position,e=this.customBoundsRectangle,i=this.world.checkCollision,s=this.worldBounce?-this.worldBounce.x:-this.bounce.x,n=this.worldBounce?-this.worldBounce.y:-this.bounce.y,r=!1;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=s,this.blocked.right=!0,r=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=n,this.blocked.down=!0,r=!0),r&&(this.blocked.none=!1,this.updateCenter()),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setGameObject:function(t,e){return void 0===e&&(e=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=t,t.body&&(t.body=this),this.setSize(),this.world.add(this),this.enable=e,this},setSize:function(t,e,i){void 0===i&&(i=!0);var s=this.gameObject;if(s&&(!t&&s.frame&&(t=s.frame.realWidth),!e&&s.frame&&(e=s.frame.realHeight)),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&s&&s.getCenter){var n=(s.width-t)/2,r=(s.height-e)/2;this.offset.set(n,r)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i&&(i.setPosition(t,e),this.rotation=i.angle,this.preRotation=i.angle);var s=this.position;i&&i.getTopLeft?i.getTopLeft(s):s.set(t,e),this.prev.copy(s),this.prevFrame.copy(s),i&&this.updateBounds(),this.updateCenter(),this.collideWorldBounds&&this.checkWorldBounds(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?this.radius>0&&t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:h(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,s=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor),this.isCircle?t.strokeCircle(i,s,this.width/2):(this.checkCollision.up&&t.lineBetween(e.x,e.y,e.x+this.width,e.y),this.checkCollision.right&&t.lineBetween(e.x+this.width,e.y,e.x+this.width,e.y+this.height),this.checkCollision.down&&t.lineBetween(e.x,e.y+this.height,e.x+this.width,e.y+this.height),this.checkCollision.left&&t.lineBetween(e.x,e.y,e.x,e.y+this.height))),this.debugShowVelocity&&(t.lineStyle(t.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,s,i+this.velocity.x/2,s+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t,e,i,s){void 0===t&&(t=!0),this.collideWorldBounds=t;var n=void 0!==e,r=void 0!==i;return(n||r)&&(this.worldBounce||(this.worldBounce=new l),n&&(this.worldBounce.x=e),r&&(this.worldBounce.y=i)),void 0!==s&&(this.onWorldBounds=s),this},setVelocity:function(t,e){return this.velocity.set(t,e),t=this.velocity.x,e=this.velocity.y,this.speed=Math.sqrt(t*t+e*e),this},setVelocityX:function(t){return this.setVelocity(t,this.velocity.y)},setVelocityY:function(t){return this.setVelocity(this.velocity.x,t)},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),this},setMaxVelocityX:function(t){return this.maxVelocity.x=t,this},setMaxVelocityY:function(t){return this.maxVelocity.y=t,this},setMaxSpeed:function(t){return this.maxSpeed=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setAllowDrag:function(t){return void 0===t&&(t=!0),this.allowDrag=t,this},setAllowGravity:function(t){return void 0===t&&(t=!0),this.allowGravity=t,this},setAllowRotation:function(t){return void 0===t&&(t=!0),this.allowRotation=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDamping:function(t){return this.useDamping=t,this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return void 0===t&&(t=!0),this.immovable=t,this},setEnable:function(t){return void 0===t&&(t=!0),this.enable=t,this},processX:function(t,e,i,s){this.x+=t,this.updateCenter(),null!==e&&(this.velocity.x=e);var n=this.blocked;i&&(n.left=!0),s&&(n.right=!0)},processY:function(t,e,i,s){this.y+=t,this.updateCenter(),null!==e&&(this.velocity.y=e);var n=this.blocked;i&&(n.up=!0),s&&(n.down=!0)},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},3909:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s,n,r,a){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=s,this.collideCallback=n,this.processCallback=r,this.callbackContext=a},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=s},99523:(t,e,i)=>{var s=i(62832),n=i(25084),r=i(97602),a=i(56694),o=i(47401),h=i(10481),l=i(66634),u=i(46346),c=new a({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,s,n){return this.world.addCollider(t,e,i,s,n)},overlap:function(t,e,i,s,n){return this.world.addOverlap(t,e,i,s,n)},existing:function(t,e){var i=e?o.STATIC_BODY:o.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},image:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticSprite:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.STATIC_BODY),r},sprite:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,o.DYNAMIC_BODY),r},staticGroup:function(t,e){return this.sys.updateList.add(new u(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},body:function(t,e,i,s){var n=new r(this.world);return n.position.set(t,e),i&&s&&n.setSize(i,s),this.world.add(n,o.DYNAMIC_BODY),n},staticBody:function(t,e,i,s){var n=new l(this.world);return n.position.set(t,e),i&&s&&n.setSize(i,s),this.world.add(n,o.STATIC_BODY),n},destroy:function(){this.world=null,this.scene=null,this.sys=null}});t.exports=c},75671:(t,e,i)=>{var s=i(47401);t.exports=function(t,e,i,n){var r=0,a=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?(r=t.right-e.x)>a&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?r=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.right=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.left=!0)):t._dxa&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?r=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.left=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=r,e.overlapX=r,r}},66185:(t,e,i)=>{var s=i(47401);t.exports=function(t,e,i,n){var r=0,a=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(r=t.bottom-e.y)>a&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?r=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.down=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.up=!0)):t._dya&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?r=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.up=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=r,e.overlapY=r,r}},10481:(t,e,i)=>{var s=i(25084),n=i(56694),r=i(47401),a=i(72632),o=i(59192),h=i(42911),l=new n({Extends:o,initialize:function(t,e,i,n){if(i||n)if(h(i))n=i,i=null,n.internalCreateCallback=this.createCallbackHandler,n.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(i)&&h(i[0])){n=i[0];var l=this;i.forEach((function(t){t.internalCreateCallback=l.createCallbackHandler,t.internalRemoveCallback=l.removeCallbackHandler})),i=null}else n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=t,n.classType=a(n,"classType",s),this.physicsType=r.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:a(n,"collideWorldBounds",!1),setBoundsRectangle:a(n,"customBoundsRectangle",null),setAccelerationX:a(n,"accelerationX",0),setAccelerationY:a(n,"accelerationY",0),setAllowDrag:a(n,"allowDrag",!0),setAllowGravity:a(n,"allowGravity",!0),setAllowRotation:a(n,"allowRotation",!0),setDamping:a(n,"useDamping",!1),setBounceX:a(n,"bounceX",0),setBounceY:a(n,"bounceY",0),setDragX:a(n,"dragX",0),setDragY:a(n,"dragY",0),setEnable:a(n,"enable",!0),setGravityX:a(n,"gravityX",0),setGravityY:a(n,"gravityY",0),setFrictionX:a(n,"frictionX",0),setFrictionY:a(n,"frictionY",0),setMaxSpeed:a(n,"maxSpeed",-1),setMaxVelocityX:a(n,"maxVelocityX",1e4),setMaxVelocityY:a(n,"maxVelocityY",1e4),setVelocityX:a(n,"velocityX",0),setVelocityY:a(n,"velocityY",0),setAngularVelocity:a(n,"angularVelocity",0),setAngularAcceleration:a(n,"angularAcceleration",0),setAngularDrag:a(n,"angularDrag",0),setMass:a(n,"mass",1),setImmovable:a(n,"immovable",!1)},o.call(this,e,i,n),this.type="PhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,r.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var s=this.getChildren(),n=0;n{var e,i,s,n,r,a,o,h,l,u,c,d,f,p,v,g,m,y=function(){return u&&v&&i.blocked.right?(e.processX(-m,o,!1,!0),1):l&&g&&i.blocked.left?(e.processX(m,o,!0),1):f&&g&&e.blocked.right?(i.processX(-m,h,!1,!0),2):d&&v&&e.blocked.left?(i.processX(m,h,!0),2):0},x=function(t){if(s&&n)m*=.5,0===t||3===t?(e.processX(m,r),i.processX(-m,a)):(e.processX(-m,r),i.processX(m,a));else if(s&&!n)0===t||3===t?e.processX(m,o,!0):e.processX(-m,o,!1,!0);else if(!s&&n)0===t||3===t?i.processX(-m,h,!1,!0):i.processX(m,h,!0);else{var v=.5*m;0===t?p?(e.processX(m,0,!0),i.processX(0,null,!1,!0)):f?(e.processX(v,0,!0),i.processX(-v,0,!1,!0)):(e.processX(v,i.velocity.x,!0),i.processX(-v,null,!1,!0)):1===t?c?(e.processX(0,null,!1,!0),i.processX(m,0,!0)):u?(e.processX(-v,0,!1,!0),i.processX(v,0,!0)):(e.processX(-v,null,!1,!0),i.processX(v,e.velocity.x,!0)):2===t?p?(e.processX(-m,0,!1,!0),i.processX(0,null,!0)):d?(e.processX(-v,0,!1,!0),i.processX(v,0,!0)):(e.processX(-v,i.velocity.x,!1,!0),i.processX(v,null,!0)):3===t&&(c?(e.processX(0,null,!0),i.processX(-m,0,!1,!0)):l?(e.processX(v,0,!0),i.processX(-v,0,!1,!0)):(e.processX(v,i.velocity.y,!0),i.processX(-v,null,!1,!0)))}return!0};t.exports={BlockCheck:y,Check:function(){var t=e.velocity.x,s=i.velocity.x,n=Math.sqrt(s*s*i.mass/e.mass)*(s>0?1:-1),o=Math.sqrt(t*t*e.mass/i.mass)*(t>0?1:-1),h=.5*(n+o);return o-=h,r=h+(n-=h)*e.bounce.x,a=h+o*i.bounce.x,l&&g?x(0):d&&v?x(1):u&&v?x(2):!(!f||!g)&&x(3)},Set:function(t,r,a){i=r;var x=(e=t).velocity.x,T=i.velocity.x;return s=e.pushable,l=e._dx<0,u=e._dx>0,c=0===e._dx,v=Math.abs(e.right-i.x)<=Math.abs(i.right-e.x),o=T-x*e.bounce.x,n=i.pushable,d=i._dx<0,f=i._dx>0,p=0===i._dx,g=!v,h=x-T*i.bounce.x,m=Math.abs(a),y()},Run:x,RunImmovableBody1:function(t){1===t?i.velocity.x=0:v?i.processX(m,h,!0):i.processX(-m,h,!1,!0),e.moves&&(i.y+=(e.y-e.prev.y)*e.friction.y,i._dy=i.y-i.prev.y)},RunImmovableBody2:function(t){2===t?e.velocity.x=0:g?e.processX(m,o,!0):e.processX(-m,o,!1,!0),i.moves&&(e.y+=(i.y-i.prev.y)*i.friction.y,e._dy=e.y-e.prev.y)}}},67050:t=>{var e,i,s,n,r,a,o,h,l,u,c,d,f,p,v,g,m,y=function(){return u&&v&&i.blocked.down?(e.processY(-m,o,!1,!0),1):l&&g&&i.blocked.up?(e.processY(m,o,!0),1):f&&g&&e.blocked.down?(i.processY(-m,h,!1,!0),2):d&&v&&e.blocked.up?(i.processY(m,h,!0),2):0},x=function(t){if(s&&n)m*=.5,0===t||3===t?(e.processY(m,r),i.processY(-m,a)):(e.processY(-m,r),i.processY(m,a));else if(s&&!n)0===t||3===t?e.processY(m,o,!0):e.processY(-m,o,!1,!0);else if(!s&&n)0===t||3===t?i.processY(-m,h,!1,!0):i.processY(m,h,!0);else{var v=.5*m;0===t?p?(e.processY(m,0,!0),i.processY(0,null,!1,!0)):f?(e.processY(v,0,!0),i.processY(-v,0,!1,!0)):(e.processY(v,i.velocity.y,!0),i.processY(-v,null,!1,!0)):1===t?c?(e.processY(0,null,!1,!0),i.processY(m,0,!0)):u?(e.processY(-v,0,!1,!0),i.processY(v,0,!0)):(e.processY(-v,null,!1,!0),i.processY(v,e.velocity.y,!0)):2===t?p?(e.processY(-m,0,!1,!0),i.processY(0,null,!0)):d?(e.processY(-v,0,!1,!0),i.processY(v,0,!0)):(e.processY(-v,i.velocity.y,!1,!0),i.processY(v,null,!0)):3===t&&(c?(e.processY(0,null,!0),i.processY(-m,0,!1,!0)):l?(e.processY(v,0,!0),i.processY(-v,0,!1,!0)):(e.processY(v,i.velocity.y,!0),i.processY(-v,null,!1,!0)))}return!0};t.exports={BlockCheck:y,Check:function(){var t=e.velocity.y,s=i.velocity.y,n=Math.sqrt(s*s*i.mass/e.mass)*(s>0?1:-1),o=Math.sqrt(t*t*e.mass/i.mass)*(t>0?1:-1),h=.5*(n+o);return o-=h,r=h+(n-=h)*e.bounce.y,a=h+o*i.bounce.y,l&&g?x(0):d&&v?x(1):u&&v?x(2):!(!f||!g)&&x(3)},Set:function(t,r,a){i=r;var x=(e=t).velocity.y,T=i.velocity.y;return s=e.pushable,l=e._dy<0,u=e._dy>0,c=0===e._dy,v=Math.abs(e.bottom-i.y)<=Math.abs(i.bottom-e.y),o=T-x*e.bounce.y,n=i.pushable,d=i._dy<0,f=i._dy>0,p=0===i._dy,g=!v,h=x-T*i.bounce.y,m=Math.abs(a),y()},Run:x,RunImmovableBody1:function(t){1===t?i.velocity.y=0:v?i.processY(m,h,!0):i.processY(-m,h,!1,!0),e.moves&&(i.x+=(e.x-e.prev.x)*e.friction.x,i._dx=i.x-i.prev.x)},RunImmovableBody2:function(t){2===t?e.velocity.y=0:g?e.processY(m,o,!0):e.processY(-m,o,!1,!0),i.moves&&(e.x+=(i.x-i.prev.x)*i.friction.x,e._dx=e.x-e.prev.x)}}},61777:(t,e,i)=>{var s=i(75671),n=i(22916);t.exports=function(t,e,i,r,a){void 0===a&&(a=s(t,e,i,r));var o=t.immovable,h=e.immovable;if(i||0===a||o&&h||t.customSeparateX||e.customSeparateX)return 0!==a||t.embedded&&e.embedded;var l=n.Set(t,e,a);return o||h?(o?n.RunImmovableBody1(l):h&&n.RunImmovableBody2(l),!0):l>0||n.Check()}},25299:(t,e,i)=>{var s=i(66185),n=i(67050);t.exports=function(t,e,i,r,a){void 0===a&&(a=s(t,e,i,r));var o=t.immovable,h=e.immovable;if(i||0===a||o&&h||t.customSeparateY||e.customSeparateY)return 0!==a||t.embedded&&e.embedded;var l=n.Set(t,e,a);return o||h?(o?n.RunImmovableBody1(l):h&&n.RunImmovableBody2(l),!0):l>0||n.Check()}},66634:(t,e,i)=>{var s=i(65650),n=i(56694),r=i(47401),a=i(94287),o=i(93736),h=new n({initialize:function(t,e){var i=64,s=64,n=void 0!==e;n&&e.displayWidth&&(i=e.displayWidth,s=e.displayHeight),n||(e={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=t,this.gameObject=n?e:void 0,this.isBody=!0,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new o,this.position=new o(e.x-i*e.originX,e.y-s*e.originY),this.width=i,this.height=s,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new o(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=o.ZERO,this.allowGravity=!1,this.gravity=o.ZERO,this.bounce=o.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var s=this.gameObject;if(!t&&s.frame&&(t=s.frame.realWidth),!e&&s.frame&&(e=s.frame.realHeight),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&s.getCenter){var n=s.displayWidth/2,r=s.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(n-this.halfWidth,r-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.setPosition(t,e),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?s(this,t,e):a(this,t,e)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,s=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?t.strokeCircle(i,s,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},46346:(t,e,i)=>{var s=i(25084),n=i(56694),r=i(47401),a=i(72632),o=i(59192),h=i(42911),l=new n({Extends:o,initialize:function(t,e,i,n){i||n?h(i)?(n=i,i=null,n.internalCreateCallback=this.createCallbackHandler,n.internalRemoveCallback=this.removeCallbackHandler,n.createMultipleCallback=this.createMultipleCallbackHandler,n.classType=a(n,"classType",s)):Array.isArray(i)&&h(i[0])?(n=i,i=null,n.forEach((function(t){t.internalCreateCallback=this.createCallbackHandler,t.internalRemoveCallback=this.removeCallbackHandler,t.createMultipleCallback=this.createMultipleCallbackHandler,t.classType=a(t,"classType",s)}))):n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler}:n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:s},this.world=t,this.physicsType=r.STATIC_BODY,o.call(this,e,i,n),this.type="StaticPhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,r.STATIC_BODY)},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var t=this.children.entries,e=0;e{var s=i(94240),n=i(97602),r=i(82897),a=i(56694),o=i(3909),h=i(47401),l=i(53996),u=i(92951),c=i(6659),d=i(27037),f=i(88456),p=i(41935),v=i(54726),g=i(75671),m=i(66185),y=i(44662),x=i(10850),T=i(83392),w=i(74623),E=i(25163),S=i(74118),b=i(68687),A=i(27354),_=i(61777),C=i(25299),R=i(58403),M=i(66634),P=i(28808),O=i(69360),L=i(93736),F=i(1071),D=new a({Extends:c,initialize:function(t,e){c.call(this),this.scene=t,this.bodies=new R,this.staticBodies=new R,this.pendingDestroy=new R,this.colliders=new w,this.gravity=new L(x(e,"gravity.x",0),x(e,"gravity.y",0)),this.bounds=new S(x(e,"x",0),x(e,"y",0),x(e,"width",t.sys.scale.width),x(e,"height",t.sys.scale.height)),this.checkCollision={up:x(e,"checkCollision.up",!0),down:x(e,"checkCollision.down",!0),left:x(e,"checkCollision.left",!0),right:x(e,"checkCollision.right",!0)},this.fps=x(e,"fps",60),this.fixedStep=x(e,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=x(e,"timeScale",1),this.OVERLAP_BIAS=x(e,"overlapBias",4),this.TILE_BIAS=x(e,"tileBias",16),this.forceX=x(e,"forceX",!1),this.isPaused=x(e,"isPaused",!1),this._total=0,this.drawDebug=x(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:x(e,"debugShowBody",!0),debugShowStaticBody:x(e,"debugShowStaticBody",!0),debugShowVelocity:x(e,"debugShowVelocity",!0),bodyDebugColor:x(e,"debugBodyColor",16711935),staticBodyDebugColor:x(e,"debugStaticBodyColor",255),velocityDebugColor:x(e,"debugVelocityColor",65280)},this.maxEntries=x(e,"maxEntries",16),this.useTree=x(e,"useTree",!0),this.tree=new b(this.maxEntries),this.staticTree=new b(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new O,this._tempMatrix2=new O,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(t,e){void 0===e&&(e=h.DYNAMIC_BODY),Array.isArray(t)||(t=[t]);for(var i=0;i=r;for(this.fixedStep||(n=.001*e,o=!0,this._elapsed=0),i=0;i=r;)this._elapsed-=r,this.step(n)}},step:function(t){var e,i,s=this.bodies.entries,n=s.length;for(e=0;e0){var l=this.tree,u=this.staticTree;for(s=(i=o.entries).length,t=0;t-1&&t.velocity.length()>d&&(t.velocity.normalize().scale(d),c=d),t.speed=c},separate:function(t,e,i,s,n){var r,a,o=!1,h=!0;if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return o;if(i&&!1===i.call(s,t.gameObject,e.gameObject))return o;if(t.isCircle||e.isCircle){var l=this.separateCircle(t,e,n);l.result?(o=!0,h=!1):(r=l.x,a=l.y,h=!0)}if(h){var u=!1,c=!1,f=this.OVERLAP_BIAS;n?(u=_(t,e,n,f,r),c=C(t,e,n,f,a)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)b&&(p=l(y,x,b,S)-w):x>A&&(yb&&(p=l(y,x,b,A)-w)),p*=-1}else p=t.halfWidth+e.halfWidth-u(a,o);t.overlapR=p,e.overlapR=p;var _=s(a,o),C=(p+T.EPSILON)*Math.cos(_),R=(p+T.EPSILON)*Math.sin(_);console.log("overlap",p,"xy",C,R);var M={overlap:p,result:!1,x:C,y:R};if(i&&(!v||v&&0!==p))return M.result=!0,M;if(!v&&0===p||h&&c||t.customSeparateX||e.customSeparateX)return M.x=void 0,M.y=void 0,M;var P=!t.pushable&&!e.pushable;if(v){var O=a.x-o.x,L=a.y-o.y,F=Math.sqrt(Math.pow(O,2)+Math.pow(L,2)),D=(o.x-a.x)/F||0,k=(o.y-a.y)/F||0,I=2*(d.x*D+d.y*k-f.x*D-f.y*k)/(t.mass+e.mass);(h||c)&&(I*=2),console.log("circ vel",d,f,"p",I,"nxy",D,k),h||(d.x=d.x-I/t.mass*D,d.y=d.y-I/t.mass*k,d.multiply(t.bounce),console.log("body1",d,"y",t.y)),c||(f.x=f.x+I/e.mass*D,f.y=f.y+I/e.mass*k,f.multiply(e.bounce),console.log("body2",f,"y",e.y)),h||c||(C*=.5,R*=.5),h||(t.x-=C,t.y-=R,t.updateCenter(),console.log("body1 sep",t.y)),c||(e.x+=C,e.y+=R,e.updateCenter()),M.result=!0}else!h||t.pushable||P?(t.x-=C,t.y-=R,t.updateCenter()):(!c||e.pushable||P)&&(e.x+=C,e.y+=R,e.updateCenter()),M.x=void 0,M.y=void 0;return M},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?u(t.center,e.center)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.left||t.bottom<=e.top||t.left>=e.right||t.top>=e.bottom))},circleBodyIntersects:function(t,e){var i=r(t.center.x,e.left,e.right),s=r(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-s)*(t.center.y-s)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.collideObjects(t,e,i,s,n,!0)},collide:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.collideObjects(t,e,i,s,n,!1)},collideObjects:function(t,e,i,s,n,r){var a,o;!t.isParent||void 0!==t.physicsType&&void 0!==e&&t!==e||(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var h=Array.isArray(t),l=Array.isArray(e);if(this._total=0,h||l)if(!h&&l)for(a=0;a0},collideHandler:function(t,e,i,s,n,r){if(void 0===e&&t.isParent)return this.collideGroupVsGroup(t,t,i,s,n,r);if(!t||!e)return!1;if(t.body||t.isBody){if(e.body||e.isBody)return this.collideSpriteVsSprite(t,e,i,s,n,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,s,n,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,s,n,r)}else if(t.isParent){if(e.body||e.isBody)return this.collideSpriteVsGroup(e,t,i,s,n,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,s,n,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,s,n,r)}else if(t.isTilemap){if(e.body||e.isBody)return this.collideSpriteVsTilemapLayer(e,t,i,s,n,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,s,n,r)}},collideSpriteVsSprite:function(t,e,i,s,n,r){var a=t.isBody?t:t.body,o=e.isBody?e:e.body;return!(!a||!o)&&(this.separate(a,o,s,n,r)&&(i&&i.call(n,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,s,n,r){var a,o,l,u=t.isBody?t:t.body;if(0!==e.length&&u&&u.enable&&!u.checkCollision.none)if(this.useTree||e.physicsType===h.STATIC_BODY){var c=this.treeMinMax;c.minX=u.left,c.minY=u.top,c.maxX=u.right,c.maxY=u.bottom;var d=e.physicsType===h.DYNAMIC_BODY?this.tree.search(c):this.staticTree.search(c);for(o=d.length,a=0;ac.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;o-=d,l+=d}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var f=r?null:this.tileFilterOptions,p=y(o,h,l,u,f,e.scene.cameras.main,e.layer);return 0!==p.length&&this.collideSpriteVsTilesHandler(t,p,i,s,n,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,s,n,r,a){for(var o,h,l=t.isBody?t:t.body,u={left:0,right:0,top:0,bottom:0},c=!1,f=0;f{t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},29257:t=>{t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},62122:t=>{t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,e,i,s){return this.body.setCollideWorldBounds(t,e,i,s),this}}},99803:t=>{t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},87145:t=>{t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}}},96174:t=>{var e={enableBody:function(t,e,i,s,n){return t&&this.body.reset(e,i),s&&(this.body.gameObject.active=!0),n&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=e},51702:t=>{t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},25578:t=>{t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},72029:t=>{var e={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=e},34566:t=>{t.exports={setMass:function(t){return this.body.mass=t,this}}},2732:(t,e,i)=>{var s=i(15147),n=i(26673),r=i(22184),a=i(26535);t.exports=function(t,e,i,o,h,l){var u=s(t,e-o,i-o,2*o,2*o,h,l);if(0===u.length)return u;for(var c=new n(e,i,o),d=new n,f=[],p=0;p{t.exports=function(t,e,i,s,n,r,a){void 0===r&&(r=!0),void 0===a&&(a=!1);var o=[],h=[],l=t.treeMinMax;if(l.minX=e,l.minY=i,l.maxX=e+s,l.maxY=i+n,a&&(h=t.staticTree.search(l)),r&&t.useTree)o=t.tree.search(l);else if(r){var u=t.bodies,c={position:{x:e,y:i},left:e,top:i,right:e+s,bottom:i+n,isCircle:!1},d=t.intersects;u.iterate((function(t){d(t,c)&&o.push(t)}))}return h.concat(o)}},57527:t=>{var e={setPushable:function(t){return void 0===t&&(t=!0),this.body.pushable=t,this}};t.exports=e},77687:t=>{t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setBodySize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},66536:t=>{t.exports={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}}},7864:(t,e,i)=>{t.exports={Acceleration:i(5321),Angular:i(29257),Bounce:i(62122),Debug:i(99803),Drag:i(87145),Enable:i(96174),Friction:i(51702),Gravity:i(25578),Immovable:i(72029),Mass:i(34566),OverlapCirc:i(2732),OverlapRect:i(15147),Pushable:i(57527),Size:i(77687),Velocity:i(66536)}},47401:t=>{t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},22346:t=>{t.exports="collide"},95092:t=>{t.exports="overlap"},15775:t=>{t.exports="pause"},74142:t=>{t.exports="resume"},22825:t=>{t.exports="tilecollide"},10851:t=>{t.exports="tileoverlap"},7543:t=>{t.exports="worldbounds"},1487:t=>{t.exports="worldstep"},27037:(t,e,i)=>{t.exports={COLLIDE:i(22346),OVERLAP:i(95092),PAUSE:i(15775),RESUME:i(74142),TILE_COLLIDE:i(22825),TILE_OVERLAP:i(10851),WORLD_BOUNDS:i(7543),WORLD_STEP:i(1487)}},39977:(t,e,i)=>{var s=i(47401),n=i(98611),r={ArcadePhysics:i(66150),Body:i(97602),Collider:i(3909),Components:i(7864),Events:i(27037),Factory:i(99523),GetOverlapX:i(75671),GetOverlapY:i(66185),SeparateX:i(61777),SeparateY:i(25299),Group:i(10481),Image:i(62832),Sprite:i(25084),StaticBody:i(66634),StaticGroup:i(46346),Tilemap:i(8413),World:i(85233)};r=n(!1,r,s),t.exports=r},25163:t=>{t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},98209:t=>{t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):e>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,t.updateCenter(),0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},72792:t=>{t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):e>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,t.updateCenter(),0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},27354:(t,e,i)=>{var s=i(14405),n=i(52926),r=i(28808);t.exports=function(t,e,i,a,o,h,l){var u=a.left,c=a.top,d=a.right,f=a.bottom,p=i.faceLeft||i.faceRight,v=i.faceTop||i.faceBottom;if(l||(p=!0,v=!0),!p&&!v)return!1;var g=0,m=0,y=0,x=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX(){var s=i(98209);t.exports=function(t,e,i,n,r,a){var o=0,h=e.faceLeft,l=e.faceRight,u=e.collideLeft,c=e.collideRight;return a||(h=!0,l=!0,u=!0,c=!0),t.deltaX()<0&&c&&t.checkCollision.left?l&&t.x0&&u&&t.checkCollision.right&&h&&t.right>i&&(o=t.right-i)>r&&(o=0),0!==o&&(t.customSeparateX?t.overlapX=o:s(t,o)),o}},52926:(t,e,i)=>{var s=i(72792);t.exports=function(t,e,i,n,r,a){var o=0,h=e.faceTop,l=e.faceBottom,u=e.collideUp,c=e.collideDown;return a||(h=!0,l=!0,u=!0,c=!0),t.deltaY()<0&&c&&t.checkCollision.up?l&&t.y0&&u&&t.checkCollision.down&&h&&t.bottom>i&&(o=t.bottom-i)>r&&(o=0),0!==o&&(t.customSeparateY?t.overlapY=o:s(t,o)),o}},28808:t=>{t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},8413:(t,e,i)=>{var s={ProcessTileCallbacks:i(25163),ProcessTileSeparationX:i(98209),ProcessTileSeparationY:i(72792),SeparateTile:i(27354),TileCheckX:i(14405),TileCheckY:i(52926),TileIntersectsBody:i(28808)};t.exports=s},88257:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=s},18360:t=>{t.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},91963:t=>{var e={},i={},s={register:function(t,i,s,n){void 0===n&&(n=!1),e[t]={plugin:i,mapping:s,custom:n}},registerCustom:function(t,e,s,n){i[t]={plugin:e,mapping:s,data:n}},hasCore:function(t){return e.hasOwnProperty(t)},hasCustom:function(t){return i.hasOwnProperty(t)},getCore:function(t){return e[t]},getCustom:function(t){return i[t]},getCustomClass:function(t){return i.hasOwnProperty(t)?i[t].plugin:null},remove:function(t){e.hasOwnProperty(t)&&delete e[t]},removeCustom:function(t){i.hasOwnProperty(t)&&delete i[t]},destroyCorePlugins:function(){for(var t in e)e.hasOwnProperty(t)&&delete e[t]},destroyCustomPlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]}};t.exports=s},49274:(t,e,i)=>{var s=i(56694),n=i(97081),r=i(6659),a=i(76846),o=i(99325),h=i(61286),l=i(72632),u=i(91963),c=i(66458),d=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],t.isBooted?this.boot():t.events.once(n.BOOT,this.boot,this)},boot:function(){var t,e,i,s,r,a,o,h=this.game.config,u=h.installGlobalPlugins;for(u=u.concat(this._pendingGlobal),t=0;t{var s=i(88257),n=i(56694),r=i(7599),a=new n({Extends:s,initialize:function(t,e,i){s.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,t.sys.events.once(r.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=a},45615:(t,e,i)=>{t.exports={BasePlugin:i(88257),DefaultPlugins:i(18360),PluginCache:i(91963),PluginManager:i(49274),ScenePlugin:i(39283)}},95723:t=>{t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},27394:t=>{t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},91135:(t,e,i)=>{var s=i(89787),n=i(61840),r=i(56694),a=i(86459),o=i(6659),h=i(81044),l=i(32834),u=i(40444),c=i(38203),d=i(69360),f=new r({Extends:o,initialize:function(t){o.call(this);var e=t.config;this.config={clearBeforeRender:e.clearBeforeRender,backgroundColor:e.backgroundColor,antialias:e.antialias,roundPixels:e.roundPixels},this.game=t,this.type=a.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=t.canvas;var i={alpha:t.config.transparent,desynchronized:t.config.desynchronized,willReadFrequently:!1};this.gameContext=e.context?e.context:this.gameCanvas.getContext("2d",i),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=l(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new d,this._tempMatrix2=new d,this._tempMatrix3=new d,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(c.READY,this.boot,this)},boot:function(){var t=this.game,e=t.scale.baseSize;this.width=e.width,this.height=e.height,this.isBooted=!0,t.scale.on(u.RESIZE,this.onResize,this),this.resize(e.width,e.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e,this.emit(h.RESIZE,t,e)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,s=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&(t.clearRect(0,0,i,s),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,s))),t.save(),this.drawCount=0,this.emit(h.PRE_RENDER)},render:function(t,e,i){var n=e.length;this.emit(h.RENDER,t,i);var r=i.x,a=i.y,o=i.width,l=i.height,u=i.renderToTexture?i.context:t.sys.context;u.save(),this.game.scene.customViewports&&(u.beginPath(),u.rect(r,a,o,l),u.clip()),i.emit(s.PRE_RENDER,i),this.currentContext=u;var c=i.mask;c&&c.preRenderCanvas(this,null,i._maskCamera),i.transparent||(u.fillStyle=i.backgroundColor.rgba,u.fillRect(r,a,o,l)),u.globalAlpha=i.alpha,u.globalCompositeOperation="source-over",this.drawCount+=n,i.renderToTexture&&i.emit(s.PRE_RENDER,i),i.matrix.copyToContext(u);for(var d=0;d=0?m=-(m+c):m<0&&(m=Math.abs(m)-c)),t.flipY&&(y>=0?y=-(y+d):y<0&&(y=Math.abs(y)-d))}var T=1,w=1;t.flipX&&(f||(m+=-e.realWidth+2*v),T=-1),t.flipY&&(f||(y+=-e.realHeight+2*g),w=-1);var E=t.x,S=t.y;i.roundPixels&&(E=Math.floor(E),S=Math.floor(S)),o.applyITRS(E,S,t.rotation,t.scaleX*T,t.scaleY*w),a.copyFrom(i.matrix),s?(a.multiplyWithOffset(s,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),o.e=E,o.f=S):(o.e-=i.scrollX*t.scrollFactorX,o.f-=i.scrollY*t.scrollFactorY),a.multiply(o),i.roundPixels&&(a.e=Math.round(a.e),a.f=Math.round(a.f)),r.save(),a.setToContext(r),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=n,r.imageSmoothingEnabled=!e.source.scaleMode,t.mask&&t.mask.preRenderCanvas(this,t,i),c>0&&d>0&&r.drawImage(e.source.image,l,u,c,d,m,y,c/p,d/p),t.mask&&t.mask.postRenderCanvas(this,t,i),r.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});t.exports=f},6046:(t,e,i)=>{t.exports={CanvasRenderer:i(91135),GetBlendModes:i(32834),SetTransform:i(49584)}},32834:(t,e,i)=>{var s=i(95723),n=i(98581);t.exports=function(){var t=[],e=n.supportNewBlendModes,i="source-over";return t[s.NORMAL]=i,t[s.ADD]="lighter",t[s.MULTIPLY]=e?"multiply":i,t[s.SCREEN]=e?"screen":i,t[s.OVERLAY]=e?"overlay":i,t[s.DARKEN]=e?"darken":i,t[s.LIGHTEN]=e?"lighten":i,t[s.COLOR_DODGE]=e?"color-dodge":i,t[s.COLOR_BURN]=e?"color-burn":i,t[s.HARD_LIGHT]=e?"hard-light":i,t[s.SOFT_LIGHT]=e?"soft-light":i,t[s.DIFFERENCE]=e?"difference":i,t[s.EXCLUSION]=e?"exclusion":i,t[s.HUE]=e?"hue":i,t[s.SATURATION]=e?"saturation":i,t[s.COLOR]=e?"color":i,t[s.LUMINOSITY]=e?"luminosity":i,t[s.ERASE]="destination-out",t[s.SOURCE_IN]="source-in",t[s.SOURCE_OUT]="source-out",t[s.SOURCE_ATOP]="source-atop",t[s.DESTINATION_OVER]="destination-over",t[s.DESTINATION_IN]="destination-in",t[s.DESTINATION_OUT]="destination-out",t[s.DESTINATION_ATOP]="destination-atop",t[s.LIGHTER]="lighter",t[s.COPY]="copy",t[s.XOR]="xor",t}},49584:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n,r){var a=n.alpha*i.alpha;if(a<=0)return!1;var o=s(i,n,r).calc;return e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=a,e.save(),o.setToContext(e),e.imageSmoothingEnabled=i.frame?!i.frame.source.scaleMode:t.antialias,!0}},70936:t=>{t.exports="postrender"},99298:t=>{t.exports="prerender"},7743:t=>{t.exports="render"},99519:t=>{t.exports="resize"},81044:(t,e,i)=>{t.exports={POST_RENDER:i(70936),PRE_RENDER:i(99298),RENDER:i(7743),RESIZE:i(99519)}},42069:(t,e,i)=>{t.exports={Canvas:i(6046),Events:i(81044),Snapshot:i(95528),WebGL:i(55478)}},61840:(t,e,i)=>{var s=i(61068),n=i(27119),r=i(72632);t.exports=function(t,e){var i=r(e,"callback"),a=r(e,"type","image/png"),o=r(e,"encoder",.92),h=Math.abs(Math.round(r(e,"x",0))),l=Math.abs(Math.round(r(e,"y",0))),u=Math.floor(r(e,"width",t.width)),c=Math.floor(r(e,"height",t.height));if(r(e,"getPixel",!1)){var d=t.getContext("2d").getImageData(h,l,1,1).data;i.call(null,new n(d[0],d[1],d[2],d[3]))}else if(0!==h||0!==l||u!==t.width||c!==t.height){var f=s.createWebGL(this,u,c),p=f.getContext("2d");u>0&&c>0&&p.drawImage(t,h,l,u,c,0,0,u,c);var v=new Image;v.onerror=function(){i.call(null),s.remove(f)},v.onload=function(){i.call(null,v),s.remove(f)},v.src=f.toDataURL(a,o)}else{var g=new Image;g.onerror=function(){i.call(null)},g.onload=function(){i.call(null,g)},g.src=t.toDataURL(a,o)}}},1217:(t,e,i)=>{var s=i(61068),n=i(27119),r=i(72632);t.exports=function(t,e){var i=t,a=r(e,"callback"),o=r(e,"type","image/png"),h=r(e,"encoder",.92),l=Math.abs(Math.round(r(e,"x",0))),u=Math.abs(Math.round(r(e,"y",0))),c=r(e,"getPixel",!1),d=r(e,"isFramebuffer",!1),f=d?r(e,"bufferWidth",1):i.drawingBufferWidth,p=d?r(e,"bufferHeight",1):i.drawingBufferHeight;if(c){var v=new Uint8Array(4),g=d?u:p-u;i.readPixels(l,g,1,1,i.RGBA,i.UNSIGNED_BYTE,v),a.call(null,new n(v[0],v[1],v[2],v[3]))}else{var m=Math.floor(r(e,"width",f)),y=Math.floor(r(e,"height",p)),x=m*y*4,T=new Uint8Array(x);i.readPixels(l,p-u-y,m,y,i.RGBA,i.UNSIGNED_BYTE,T);for(var w=s.createWebGL(this,m,y),E=w.getContext("2d",{willReadFrequently:!0}),S=E.getImageData(0,0,m,y),b=S.data,A=0;A{t.exports={Canvas:i(61840),WebGL:i(1217)}},35217:(t,e,i)=>{var s=i(56694),n=i(65641),r=i(33885),a=i(77290),o=i(72632),h=i(37410),l=i(82127),u=i(5583),c=i(66901),d=i(71264),f=i(77310),p=i(10919),v=i(21213),g=i(51212),m=i(60848),y=new s({initialize:function(t){this.game=t.game,this.renderer=t,this.classes=new r([[n.UTILITY_PIPELINE,m],[n.MULTI_PIPELINE,f],[n.BITMAPMASK_PIPELINE,u],[n.SINGLE_PIPELINE,g],[n.ROPE_PIPELINE,v],[n.LIGHT_PIPELINE,c],[n.POINTLIGHT_PIPELINE,p],[n.MOBILE_PIPELINE,d]]),this.postPipelineClasses=new r,this.pipelines=new r,this.default=null,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.MOBILE_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderTargets=[],this.maxDimension=0,this.frameInc=32,this.targetIndex=0},boot:function(t,e,i){var s=this.renderer,r=this.renderTargets;this.frameInc=Math.floor(o(t,"frameInc",32));for(var l,u,c=s.width,d=s.height,f=Math.min(c,d),p=Math.ceil(f/this.frameInc),v=1;v=0;i--){var s=e[i];s.active&&s.preBatch(t)}}},postBatch:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;i=0;i--){var s=e[i];s.active&&s.preBatch(t)}}},postBatchCamera:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;ithis.maxDimension)return this.targetIndex=e.length-3,e[this.targetIndex];var i=3*(l(t,this.frameInc,0,!0)-1);return this.targetIndex=i,e[i]},getSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+1]},getAltSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+2]},destroy:function(){this.flush(),this.classes.clear(),this.postPipelineClasses.clear(),this.pipelines.clear(),this.renderer=null,this.game=null,this.classes=null,this.postPipelineClasses=null,this.pipelines=null,this.default=null,this.current=null,this.previous=null}});t.exports=y},37410:(t,e,i)=>{var s=i(56694),n=i(81044),r=new s({initialize:function(t,e,i,s,n,r,a){void 0===s&&(s=1),void 0===n&&(n=0),void 0===r&&(r=!0),void 0===a&&(a=!1),this.renderer=t,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=s,this.minFilter=n,this.autoClear=r,this.autoResize=!1,this.resize(e,i),a&&this.setAutoResize(!0)},setAutoResize:function(t){return t&&!this.autoResize?(this.renderer.on(n.RESIZE,this.resize,this),this.autoResize=!0):!t&&this.autoResize&&(this.renderer.off(n.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(t,e){var i=t*this.scale,s=e*this.scale;if(i!==this.width||s!==this.height){var n=this.renderer;n.deleteFramebuffer(this.framebuffer),n.deleteTexture(this.texture),t*=this.scale,e*=this.scale,(t=Math.round(t))<=0&&(t=1),(e=Math.round(e))<=0&&(e=1),this.texture=n.createTextureFromSource(null,t,e,this.minFilter,!0),this.framebuffer=n.createFramebuffer(t,e,this.texture,!0),this.width=t,this.height=e}return this},bind:function(t,e,i){if(void 0===t&&(t=!1),t&&this.renderer.flush(),e&&i&&this.resize(e,i),this.renderer.pushFramebuffer(this.framebuffer,!1,!1,!1),t&&this.adjustViewport(),this.autoClear){var s=this.renderer.gl;s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT)}},adjustViewport:function(){var t=this.renderer.gl;t.viewport(0,0,this.width,this.height),t.disable(t.SCISSOR_TEST)},clear:function(){var t=this.renderer,e=t.gl;t.pushFramebuffer(this.framebuffer),e.disable(e.SCISSOR_TEST),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),t.popFramebuffer(),t.resetScissor()},unbind:function(t){void 0===t&&(t=!1);var e=this.renderer;return t&&e.flush(),e.popFramebuffer()},destroy:function(){var t=this.renderer;t.deleteFramebuffer(this.framebuffer),t.deleteTexture(this.texture),t.off(n.RESIZE,this.resize,this),this.renderer=null,this.framebuffer=null,this.texture=null}});t.exports=r},75512:t=>{t.exports={getTintFromFloats:function(t,e,i,s){return((255&(255*s|0))<<24|(255&(255*t|0))<<16|(255&(255*e|0))<<8|255&(255*i|0))>>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},checkShaderMax:function(t,e){var i=Math.min(16,t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS));return e&&-1!==e?Math.min(i,e):i},parseFragmentShaderMaxTextures:function(t,e){if(!t)return"";for(var i="",s=0;s0&&(i+="\n\telse "),s{var s=i(56694),n=i(28699),r=i(6659),a=i(18970),o=i(72632),h=i(16650),l=i(81044),u=i(37410),c=i(75512),d=i(71305),f=new s({Extends:r,initialize:function(t){r.call(this);var e=t.game,i=e.renderer,s=i.gl;this.name=o(t,"name","WebGLPipeline"),this.game=e,this.renderer=i,this.manager,this.gl=s,this.view=e.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=o(t,"topology",s.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=o(t,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.isSpriteFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=t,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[]},boot:function(){var t,e=this.gl,i=this.config,s=this.renderer;this.isPostFX||(this.projectionMatrix=(new h).identity());var n=this.renderTargets,r=o(i,"renderTarget",!1);"boolean"==typeof r&&r&&(r=1);var c=s.width,d=s.height;if("number"==typeof r)for(t=0;tx&&(x=y[t].vertexSize);var T=o(i,"batchSize",s.config.batchSize);this.vertexCapacity=6*T;var w=new ArrayBuffer(this.vertexCapacity*x);this.vertexData=w,this.bytes=new Uint8Array(w),this.vertexViewF32=new Float32Array(w),this.vertexViewU32=new Uint32Array(w);var E=o(i,"vertices",null);for(E?(this.vertexViewF32.set(E),this.vertexBuffer=s.createVertexBuffer(w,e.STATIC_DRAW)):this.vertexBuffer=s.createVertexBuffer(w.byteLength,e.DYNAMIC_DRAW),this.setVertexBuffer(),t=y.length-1;t>=0;t--)y[t].rebind();this.hasBooted=!0,s.on(l.RESIZE,this.resize,this),s.on(l.PRE_RENDER,this.onPreRender,this),s.on(l.RENDER,this.onRender,this),s.on(l.POST_RENDER,this.onPostRender,this),this.emit(a.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(t,e,i){var s=this.renderer;t===this.currentShader&&s.currentProgram===this.currentShader.program||(this.flush(),this.setVertexBuffer(i)&&!e&&(e=!0),t.bind(e,!1),this.currentShader=t);return this},getShaderByName:function(t){for(var e=this.shaders,i=0;ithis.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(t,e){t===this.width&&e===this.height||this.flush(),this.width=t,this.height=e;for(var i=this.renderTargets,s=0;s=0;i--){var s=e[i].rebind();t&&s!==t||(this.currentShader=s)}return this.activeTextures.length=0,this.emit(a.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},setVertexBuffer:function(t){if(void 0===t&&(t=this.vertexBuffer),t!==this.activeBuffer){var e=this.gl;return this.gl.bindBuffer(e.ARRAY_BUFFER,t),this.activeBuffer=t,!0}return!1},preBatch:function(t){return this.currentRenderTarget&&this.currentRenderTarget.bind(),this.onPreBatch(t),this},postBatch:function(t){return this.onDraw(this.currentRenderTarget),this.onPostBatch(t),this},onDraw:function(){},unbind:function(){this.currentRenderTarget&&this.currentRenderTarget.unbind()},flush:function(t){if(void 0===t&&(t=!1),this.vertexCount>0){this.emit(a.BEFORE_FLUSH,this,t),this.onBeforeFlush(t);var e=this.gl,i=this.vertexCount,s=this.currentShader.vertexSize,n=this.topology;if(this.active){var r,o,h;this.setVertexBuffer(),i===this.vertexCapacity?e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.DYNAMIC_DRAW):e.bufferSubData(e.ARRAY_BUFFER,0,this.bytes.subarray(0,i*s));var l=this.batch,u=this.activeTextures;if(this.forceZero)for(u[0]||e.activeTexture(e.TEXTURE0),r=0;r{var s=i(66458),n=i(89787),r=i(56694),a=i(86459),o=i(6659),h=i(81044),l=i(28621),u=i(16650),c=i(72283),d=i(35217),f=i(37410),p=i(40444),v=i(38203),g=i(75512),m=i(1217),y=!1,x=new r({Extends:o,initialize:function(t){o.call(this);var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!1,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference,preserveDrawingBuffer:e.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,roundPixels:e.roundPixels,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=a.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=t.canvas,this.blendModes=[],this.contextLost=!1,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.maxTextures=0,this.textureIndexes,this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=c,this.contextRestoredHandler=c,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats,this.compression,this.drawingBufferHeight=0,this.blankTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.maskSource=null,this.maskTarget=null,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(t){var e,i=this.game,s=this.canvas,n=t.backgroundColor;if(!(e=i.config.context?i.config.context:s.getContext("webgl",t.contextCreation)||s.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=e;var r=this;this.contextLostHandler=function(t){r.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),t.preventDefault()},s.addEventListener("webglcontextlost",this.contextLostHandler,!1),i.context=e;for(var o=0;o<=27;o++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[e.ZERO,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_REVERSE_SUBTRACT},this.glFormats=[e.BYTE,e.SHORT,e.UNSIGNED_BYTE,e.UNSIGNED_SHORT,e.FLOAT],this.glFuncMap={mat2:{func:e.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:e.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:e.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:e.uniform1f,length:1},"1fv":{func:e.uniform1fv,length:1},"1i":{func:e.uniform1i,length:1},"1iv":{func:e.uniform1iv,length:1},"2f":{func:e.uniform2f,length:2},"2fv":{func:e.uniform2fv,length:1},"2i":{func:e.uniform2i,length:2},"2iv":{func:e.uniform2iv,length:1},"3f":{func:e.uniform3f,length:3},"3fv":{func:e.uniform3fv,length:1},"3i":{func:e.uniform3i,length:3},"3iv":{func:e.uniform3iv,length:1},"4f":{func:e.uniform4f,length:4},"4fv":{func:e.uniform4fv,length:1},"4i":{func:e.uniform4i,length:4},"4iv":{func:e.uniform4iv,length:1}};var h=e.getSupportedExtensions();t.maxTextures&&-1!==t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),this.supportedExtensions=h;var l="ANGLE_instanced_arrays";this.instancedArraysExtension=h.indexOf(l)>-1?e.getExtension(l):null;var c="OES_vertex_array_object";this.vaoExtension=h.indexOf(c)>-1?e.getExtension(c):null,e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(n.redGL,n.greenGL,n.blueGL,n.alphaGL),this.mipmapFilter=e[t.mipmapFilter],this.maxTextures=g.checkShaderMax(e,t.maxTextures),this.textureIndexes=[];for(var f=0;f0&&s>0;if(a&&o){var h=a[0],l=a[1],u=a[2],c=a[3];o=h!==t||l!==e||u!==i||c!==s}o&&(this.flush(),r.scissor(t,n-e-s,i,s))},resetScissor:function(){var t=this.gl;t.enable(t.SCISSOR_TEST);var e=this.currentScissor;if(e){var i=e[0],s=e[1],n=e[2],r=e[3];n>0&&r>0&&t.scissor(i,this.drawingBufferHeight-s-r,n,r)}},popScissor:function(){var t=this.scissorStack;t.pop();var e=t[t.length-1];e&&this.setScissor(e[0],e[1],e[2],e[3]),this.currentScissor=e},hasActiveStencilMask:function(){var t=this.currentMask.mask,e=this.currentCameraMask.mask;return t&&t.isStencil||e&&e.isStencil},resetViewport:function(){var t=this.gl;t.viewport(0,0,this.width,this.height),this.drawingBufferHeight=t.drawingBufferHeight},setBlendMode:function(t,e){void 0===e&&(e=!1);var i=this.gl,s=this.blendModes[t];return!!(e||t!==a.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(s.equation),s.func.length>2?i.blendFuncSeparate(s.func[0],s.func[1],s.func[2],s.func[3]):i.blendFunc(s.func[0],s.func[1]),this.currentBlendMode=t,!0)},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>17&&this.blendModes[t]&&this.blendModes.splice(t,1),this},pushFramebuffer:function(t,e,i){return t===this.currentFramebuffer?this:(this.fboStack.push(t),this.setFramebuffer(t,e,i))},setFramebuffer:function(t,e,i){if(void 0===e&&(e=!1),void 0===i&&(i=!0),t===this.currentFramebuffer)return this;var s=this.gl,n=this.width,r=this.height;return t&&t.renderTexture&&i?(n=t.renderTexture.width,r=t.renderTexture.height):this.flush(),s.bindFramebuffer(s.FRAMEBUFFER,t),i&&s.viewport(0,0,n,r),e&&(t?(this.drawingBufferHeight=r,this.pushScissor(0,0,n,r)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=t,this},popFramebuffer:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!0);var i=this.fboStack;i.pop();var s=i[i.length-1];return s||(s=null),this.setFramebuffer(s,t,e),s},setProgram:function(t){return t!==this.currentProgram&&(this.flush(),this.gl.useProgram(t),this.currentProgram=t,!0)},resetProgram:function(){return this.gl.useProgram(this.currentProgram),this},createTextureFromSource:function(t,e,i,s,n){void 0===n&&(n=!1);var r=this.gl,o=r.NEAREST,h=r.NEAREST,u=r.CLAMP_TO_EDGE;e=t?t.width:e,i=t?t.height:i;var c=l(e,i);return c&&!n&&(u=r.REPEAT),s===a.ScaleModes.LINEAR&&this.config.antialias&&(o=c?this.mipmapFilter:r.LINEAR,h=r.LINEAR),t&&t.compressed&&(o=r.LINEAR,h=r.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,o,h,u,u,r.RGBA,t):this.createTexture2D(0,o,h,u,u,r.RGBA,null,e,i)},createTexture2D:function(t,e,i,s,n,r,a,o,h,u,c,d){u=null==u||u,void 0===c&&(c=!1),void 0===d&&(d=!1);var f=this.gl,p=f.createTexture();f.activeTexture(f.TEXTURE0);var v=f.getParameter(f.TEXTURE_BINDING_2D);f.bindTexture(f.TEXTURE_2D,p),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,e),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,i),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,n),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,s),f.pixelStorei(f.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),d&&f.pixelStorei(f.UNPACK_FLIP_Y_WEBGL,!0);var g=!1;if(null==a)f.texImage2D(f.TEXTURE_2D,t,r,o,h,0,r,f.UNSIGNED_BYTE,null),g=l(o,h);else if(a.compressed){o=a.width,h=a.height,g=a.generateMipmap;for(var m=0;m0)&&this.pipelines.setMulti().drawFillRect(e,i,s,r,g.getTintFromFloats(a.blueGL,a.greenGL,a.redGL,1),a.alphaGL)},getCurrentStencilMask:function(){var t=null,e=this.maskStack,i=this.currentCameraMask;return e.length>0?t=e[e.length-1]:i.mask&&i.mask.isStencil&&(t=i),t},postRenderCamera:function(t){var e=t.flashEffect,i=t.fadeEffect;if(e.isRunning||i.isRunning||i.isComplete){var s=this.pipelines.setMulti();e.postRenderWebGL(s,g.getTintFromFloats),i.postRenderWebGL(s,g.getTintFromFloats)}t.dirty=!1,this.popScissor(),t.mask&&(this.currentCameraMask.mask=null,t.mask.postRenderWebGL(this,t._maskCamera)),this.pipelines.postBatchCamera(t),t.emit(n.POST_RENDER,t)},preRender:function(){if(!this.contextLost){var t=this.gl;if(t.bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender){var e=this.config.backgroundColor;t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)}t.enable(t.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(h.PRE_RENDER)}},render:function(t,e,i){if(!this.contextLost){var s=e.length;if(this.emit(h.RENDER,t,i),this.preRenderCamera(i),0===s)return this.setBlendMode(a.BlendModes.NORMAL),void this.postRenderCamera(i);this.currentType="";for(var n=this.currentMask,r=0;r0&&r>0){s.activeTexture(s.TEXTURE0);var a=s.getParameter(s.TEXTURE_BINDING_2D);s.bindTexture(s.TEXTURE_2D,e),i&&s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!0),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,t),e.width=n,e.height=r,a&&s.bindTexture(s.TEXTURE_2D,a)}return e},createVideoTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var s=this.gl,n=s.NEAREST,r=s.NEAREST,a=t.videoWidth,o=t.videoHeight,h=s.CLAMP_TO_EDGE,u=l(a,o);return!e&&u&&(h=s.REPEAT),this.config.antialias&&(n=u?this.mipmapFilter:s.LINEAR,r=s.LINEAR),this.createTexture2D(0,n,r,h,h,s.RGBA,t,a,o,!0,!0,i)},updateVideoTexture:function(t,e,i){void 0===i&&(i=!1);var s=this.gl,n=t.videoWidth,r=t.videoHeight;if(n>0&&r>0){s.activeTexture(s.TEXTURE0);var a=s.getParameter(s.TEXTURE_BINDING_2D);s.bindTexture(s.TEXTURE_2D,e),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,i),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,t),e.width=n,e.height=r,a&&s.bindTexture(s.TEXTURE_2D,a)}return e},setTextureFilter:function(t,e){var i=this.gl,s=[i.LINEAR,i.NEAREST][e];i.activeTexture(i.TEXTURE0);var n=i.getParameter(i.TEXTURE_BINDING_2D);return i.bindTexture(i.TEXTURE_2D,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,s),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,s),n&&i.bindTexture(i.TEXTURE_2D,n),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.maskTarget.destroy(),this.maskSource.destroy(),this.pipelines.destroy(),this.removeAllListeners(),this.fboStack=[],this.maskStack=[],this.extensions={},this.textureIndexes=[],this.gl=null,this.game=null,this.canvas=null,this.contextLost=!0,this.currentMask=null,this.currentCameraMask=null}});t.exports=x},71305:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(71402),a=new s({initialize:function(t,e,i,s,n){this.pipeline=t,this.name=e,this.renderer=t.renderer,this.gl=this.renderer.gl,this.fragSrc=s,this.vertSrc=i,this.program=this.renderer.createProgram(i,s),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(n),this.createUniforms()},createAttributes:function(t){var e=0,i=0,s=[];this.vertexComponentCount=0;for(var a=0;a=0?(e.enableVertexAttribArray(f),e.vertexAttribPointer(f,o,h,d,i,l),a.enabled=!0,a.location=f):-1!==f&&e.disableVertexAttribArray(f)}else u?e.vertexAttribPointer(c,o,h,d,i,l):!u&&c>-1&&(e.disableVertexAttribArray(c),a.location=-1)}return this},createUniforms:function(){var t,e,i,s=this.gl,n=this.program,r=this.uniforms,a=s.getProgramParameter(n,s.ACTIVE_UNIFORMS);for(t=0;t0&&(e=e.substr(0,h),r.hasOwnProperty(e)||null!==(i=s.getUniformLocation(n,e))&&(r[e]={name:e,location:i,value1:null,value2:null,value3:null,value4:null}))}}return this},hasUniform:function(t){return this.uniforms.hasOwnProperty(t)},resetUniform:function(t){var e=this.uniforms[t];return e&&(e.value1=null,e.value2=null,e.value3=null,e.value4=null),this},setUniform1:function(t,e,i,s){var n=this.uniforms[e];return n?((s||n.value1!==i)&&(n.value1=i,this.renderer.setProgram(this.program),t.call(this.gl,n.location,i),this.pipeline.currentShader=this),this):this},setUniform2:function(t,e,i,s,n){var r=this.uniforms[e];return r?((n||r.value1!==i||r.value2!==s)&&(r.value1=i,r.value2=s,this.renderer.setProgram(this.program),t.call(this.gl,r.location,i,s),this.pipeline.currentShader=this),this):this},setUniform3:function(t,e,i,s,n,r){var a=this.uniforms[e];return a?((r||a.value1!==i||a.value2!==s||a.value3!==n)&&(a.value1=i,a.value2=s,a.value3=n,this.renderer.setProgram(this.program),t.call(this.gl,a.location,i,s,n),this.pipeline.currentShader=this),this):this},setUniform4:function(t,e,i,s,n,r,a){var o=this.uniforms[e];return o?((a||o.value1!==i||o.value2!==s||o.value3!==n||o.value4!==r)&&(o.value1=i,o.value2=s,o.value3=n,o.value4=r,this.renderer.setProgram(this.program),t.call(this.gl,o.location,i,s,n,r),this.pipeline.currentShader=this),this):this},setBoolean:function(t,e){return this.setUniform1(this.gl.uniform1i,t,Number(e))},set1f:function(t,e){return this.setUniform1(this.gl.uniform1f,t,e)},set2f:function(t,e,i){return this.setUniform2(this.gl.uniform2f,t,e,i)},set3f:function(t,e,i,s){return this.setUniform3(this.gl.uniform3f,t,e,i,s)},set4f:function(t,e,i,s,n){return this.setUniform4(this.gl.uniform4f,t,e,i,s,n)},set1fv:function(t,e){return this.setUniform1(this.gl.uniform1fv,t,e,!0)},set2fv:function(t,e){return this.setUniform1(this.gl.uniform2fv,t,e,!0)},set3fv:function(t,e){return this.setUniform1(this.gl.uniform3fv,t,e,!0)},set4fv:function(t,e){return this.setUniform1(this.gl.uniform4fv,t,e,!0)},set1iv:function(t,e){return this.setUniform1(this.gl.uniform1iv,t,e,!0)},set2iv:function(t,e){return this.setUniform1(this.gl.uniform2iv,t,e,!0)},set3iv:function(t,e){return this.setUniform1(this.gl.uniform3iv,t,e,!0)},set4iv:function(t,e){return this.setUniform1(this.gl.uniform4iv,t,e,!0)},set1i:function(t,e){return this.setUniform1(this.gl.uniform1i,t,e)},set2i:function(t,e,i){return this.setUniform2(this.gl.uniform2i,t,e,i)},set3i:function(t,e,i,s){return this.setUniform3(this.gl.uniform3i,t,e,i,s)},set4i:function(t,e,i,s,n){return this.setUniform4(this.gl.uniform4i,t,e,i,s,n)},setMatrix2fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix2fv,t,e,i,!0)},setMatrix3fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix3fv,t,e,i,!0)},setMatrix4fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix4fv,t,e,i,!0)},createProgram:function(t,e){void 0===t&&(t=this.vertSrc),void 0===e&&(e=this.fragSrc);var i=this.gl;return this.program&&i.deleteProgram(this.program),this.vertSrc=t,this.fragSrc=e,this.program=this.renderer.createProgram(t,e),this.createUniforms(),this.rebind()},destroy:function(){this.gl.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null,this.attributes=null,this.uniforms=null}});t.exports=a},71402:t=>{t.exports={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}}},55478:(t,e,i)=>{var s=i(71402),n=i(98611),r={PipelineManager:i(35217),Pipelines:i(62253),RenderTarget:i(37410),Utils:i(75512),WebGLPipeline:i(44775),WebGLRenderer:i(11857),WebGLShader:i(71305)};r=n(!1,r,s),t.exports=r},5583:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(91679),a=i(89053),o=i(71402),h=i(44775),l=new s({Extends:h,initialize:function(t){t.fragShader=n(t,"fragShader",r),t.vertShader=n(t,"vertShader",a),t.batchSize=n(t,"batchSize",1),t.vertices=n(t,"vertices",[-1,1,-1,-7,7,1]),t.attributes=n(t,"attributes",[{name:"inPosition",size:2,type:o.FLOAT}]),h.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(t,e){h.prototype.resize.call(this,t,e),this.set2f("uResolution",t,e)},beginMask:function(t,e,i){this.renderer.beginBitmapMask(t,i)},endMask:function(t,e,i){var s=this.gl,n=this.renderer,r=t.bitmapMask;r&&s&&(n.drawBitmapMask(r,e,this),i&&this.set2f("uResolution",i.width,i.height),this.set1i("uInvertMaskAlpha",t.invertAlpha),s.drawArrays(this.topology,0,3),i&&this.set2f("uResolution",this.width,this.height),s.bindTexture(s.TEXTURE_2D,null))}});t.exports=l},66901:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(65045),a=i(77310),o=i(69360),h=i(93736),l=i(44775),u=new s({Extends:a,initialize:function(t){var e=n(t,"fragShader",r);t.fragShader=e.replace("%LIGHT_COUNT%",t.game.renderer.config.maxLights),a.call(this,t),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.defaultNormalMap,this.currentNormalMap,this.lightsActive=!0,this.tempVec2=new h,this._tempMatrix=new o,this._tempMatrix2=new o},boot:function(){l.prototype.boot.call(this);var t=this.gl,e=t.createTexture();t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([127,127,255,255])),this.defaultNormalMap={glTexture:e}},onRender:function(t,e){var i=t.sys.lights;if(this.lightsActive=!1,i&&i.active){var s,n=i.getLights(e),r=n.length;this.lightsActive=!0;var a=this.renderer.height,o=e.matrix,h=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",e.x,e.y,e.rotation,e.zoom),this.set3f("uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),this.set1i("uLightCount",r),s=0;s0&&this.flush();var e=this.inverseRotationMatrix;if(t){var i=-t,s=Math.cos(i),n=Math.sin(i);e[1]=n,e[3]=-n,e[0]=e[4]=s}else e[0]=e[4]=1,e[1]=e[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,e),this.currentNormalMapRotation=t}},setTexture2D:function(t,e){var i=this.renderer;void 0===t&&(t=i.whiteTexture);var s=this.getNormalMap(e);this.isNewNormalMap(t,s)&&(this.flush(),this.createBatch(t),this.addTextureToBatch(s),this.currentNormalMap=s);var n=0;e&&e.parentContainer?n=e.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2).rotationNormalized:e&&(n=e.rotation);return this.setNormalMapRotation(n),0},setGameObject:function(t,e){void 0===e&&(e=t.frame);var i=e.glTexture,s=this.getNormalMap(t);if(this.isNewNormalMap(i,s)&&(this.flush(),this.createBatch(i),this.addTextureToBatch(s),this.currentNormalMap=s),t.parentContainer){var n=t.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(n.rotationNormalized)}else this.setNormalMapRotation(t.rotation);return 0},isNewNormalMap:function(t,e){return this.currentTexture!==t||this.currentNormalMap!==e},getNormalMap:function(t){var e;return t?t.displayTexture?e=t.displayTexture.dataSource[t.displayFrame.sourceIndex]:t.texture?e=t.texture.dataSource[t.frame.sourceIndex]:t.tileset&&(e=Array.isArray(t.tileset)?t.tileset[0].image.dataSource[0]:t.tileset.image.dataSource[0]):e=this.defaultNormalMap,e||(e=this.defaultNormalMap),e.glTexture},batchSprite:function(t,e,i){this.lightsActive&&a.prototype.batchSprite.call(this,t,e,i)},batchTexture:function(t,e,i,s,n,r,o,h,l,u,c,d,f,p,v,g,m,y,x,T,w,E,S,b,A,_,C,R,M,P,O,L){this.lightsActive&&a.prototype.batchTexture.call(this,t,e,i,s,n,r,o,h,l,u,c,d,f,p,v,g,m,y,x,T,w,E,S,b,A,_,C,R,M,P,O,L)},batchTextureFrame:function(t,e,i,s,n,r,o){this.lightsActive&&a.prototype.batchTextureFrame.call(this,t,e,i,s,n,r,o)}});t.exports=u},71264:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(77310),a=i(85060),o=i(18166),h=i(71402),l=i(44775),u=new s({Extends:r,initialize:function(t){t.fragShader=n(t,"fragShader",a),t.vertShader=n(t,"vertShader",o),t.attributes=n(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:h.UNSIGNED_BYTE,normalized:!0}]),t.forceZero=!0,r.call(this,t)},boot:function(){l.prototype.boot.call(this),this.set1i("uMainSampler",0)}});t.exports=u},77310:(t,e,i)=>{var s=i(56694),n=i(11117),r=i(72632),a=i(53787),o=i(15968),h=i(69360),l=i(75512),u=i(71402),c=i(44775),d=new s({Extends:c,initialize:function(t){var e=t.game.renderer,i=r(t,"fragShader",a);t.fragShader=l.parseFragmentShaderMaxTextures(i,e.maxTextures),t.vertShader=r(t,"vertShader",o),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:u.UNSIGNED_BYTE,normalized:!0}]),c.call(this,t),this._tempMatrix1=new h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.calcMatrix=new h,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){c.prototype.boot.call(this),this.currentShader.set1iv("uMainSampler",this.renderer.textureIndexes)},batchSprite:function(t,e,i){this.manager.set(this,t);var s=this._tempMatrix1,n=this._tempMatrix2,r=this._tempMatrix3,a=t.frame,o=a.glTexture,h=a.u0,u=a.v0,c=a.u1,d=a.v1,f=a.x,p=a.y,v=a.cutWidth,g=a.cutHeight,m=a.customPivot,y=t.displayOriginX,x=t.displayOriginY,T=-y+f,w=-x+p;if(t.isCropped){var E=t._crop;E.flipX===t.flipX&&E.flipY===t.flipY||a.updateCropUVs(E,t.flipX,t.flipY),h=E.u0,u=E.v0,c=E.u1,d=E.v1,v=E.width,g=E.height,T=-y+(f=E.x),w=-x+(p=E.y)}var S=1,b=1;t.flipX&&(m||(T+=-a.realWidth+2*y),S=-1),(t.flipY||a.source.isGLTexture&&!o.flipY)&&(m||(w+=-a.realHeight+2*x),b=-1);var A=t.x,_=t.y;e.roundPixels&&(A=Math.floor(A),_=Math.floor(_)),n.applyITRS(A,_,t.rotation,t.scaleX*S,t.scaleY*b),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),n.e=A,n.f=_):(n.e-=e.scrollX*t.scrollFactorX,n.f-=e.scrollY*t.scrollFactorY),s.multiply(n,r);var C=r.setQuad(T,w,T+v,w+g,!1),R=l.getTintAppendFloatAlpha,M=e.alpha,P=R(t.tintTopLeft,M*t._alphaTL),O=R(t.tintTopRight,M*t._alphaTR),L=R(t.tintBottomLeft,M*t._alphaBL),F=R(t.tintBottomRight,M*t._alphaBR);this.shouldFlush(6)&&this.flush();var D=this.setGameObject(t,a);this.manager.preBatch(t),this.batchQuad(t,C[0],C[1],C[2],C[3],C[4],C[5],C[6],C[7],h,u,c,d,P,O,L,F,t.tintFill,o,D),this.manager.postBatch(t)},batchTexture:function(t,e,i,s,n,r,a,o,h,l,u,c,d,f,p,v,g,m,y,x,T,w,E,S,b,A,_,C,R,M,P,O){this.manager.set(this,t);var L=this._tempMatrix1,F=this._tempMatrix2,D=this._tempMatrix3,k=m/i+_,I=y/s+C,B=(m+x)/i+_,N=(y+T)/s+C,Y=a,U=o,X=-v,z=-g;if(t.isCropped){var G=t._crop,W=G.width,V=G.height;Y=W,U=V,a=W,o=V;var H=m=G.x,j=y=G.y;c&&(H=x-G.x-W),d&&(j=T-G.y-V),k=H/i+_,I=j/s+C,B=(H+W)/i+_,N=(j+V)/s+C,X=-v+m,z=-g+y}c&&(Y*=-1,X+=a),(d^=!P&&e.isRenderTexture?1:0)&&(U*=-1,z+=o),R.roundPixels&&(n=Math.floor(n),r=Math.floor(r)),F.applyITRS(n,r,u,h,l),L.copyFrom(R.matrix),M?(L.multiplyWithOffset(M,-R.scrollX*f,-R.scrollY*p),F.e=n,F.f=r):(F.e-=R.scrollX*f,F.f-=R.scrollY*p),L.multiply(F,D);var K=D.setQuad(X,z,X+Y,z+U,!1);void 0===O&&(O=this.setTexture2D(e)),t&&this.manager.preBatch(t),this.batchQuad(t,K[0],K[1],K[2],K[3],K[4],K[5],K[6],K[7],k,I,B,N,w,E,S,b,A,e,O),t&&this.manager.postBatch(t)},batchTextureFrame:function(t,e,i,s,n,r,a){this.manager.set(this);var o=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2;a?o.multiply(a,h):h=o;var u=h.setQuad(e,i,e+t.width,i+t.height,!1),c=this.setTexture2D(t.source.glTexture);s=l.getTintAppendFloatAlpha(s,n),this.batchQuad(null,u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],t.u0,t.v0,t.u1,t.v1,s,s,s,s,0,t.glTexture,c)},batchFillRect:function(t,e,i,s,n,r){this.renderer.pipelines.set(this);var a=this.calcMatrix;r&&r.multiply(n,a);var o=a.setQuad(t,e,t+i,e+s,!1),h=this.fillTint;this.batchQuad(null,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],0,0,1,1,h.TL,h.TR,h.BL,h.BR,2)},batchFillTriangle:function(t,e,i,s,n,r,a,o){this.renderer.pipelines.set(this);var h=this.calcMatrix;o&&o.multiply(a,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,s),d=h.getY(i,s),f=h.getX(n,r),p=h.getY(n,r),v=this.fillTint;this.batchTri(null,l,u,c,d,f,p,0,0,1,1,v.TL,v.TR,v.BL,2)},batchStrokeTriangle:function(t,e,i,s,n,r,a,o,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=a,l[1].x=i,l[1].y=s,l[1].width=a,l[2].x=n,l[2].y=r,l[2].width=a,l[3].x=t,l[3].y=e,l[3].width=a,this.batchStrokePath(l,a,!1,o,h)},batchFillPath:function(t,e,i){this.renderer.pipelines.set(this);var s=this.calcMatrix;i&&i.multiply(e,s);for(var r,a,o=t.length,h=this.polygonCache,l=this.fillTint.TL,u=this.fillTint.TR,c=this.fillTint.BL,d=0;d0&&U[4]?this.batchQuad(null,F,D,M,P,U[0],U[1],U[2],U[3],0,0,1,1,I,B,N,Y,2):(X[0]=F,X[1]=D,X[2]=M,X[3]=P,X[4]=1),h&&X[4]?this.batchQuad(null,C,R,O,L,X[0],X[1],X[2],X[3],0,0,1,1,I,B,N,Y,2):(U[0]=C,U[1]=R,U[2]=O,U[3]=L,U[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,c.prototype.destroy.call(this),this}});t.exports=d},10919:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(83327),a=i(54677),o=i(44775),h=new s({Extends:o,initialize:function(t){t.vertShader=n(t,"vertShader",a),t.fragShader=n(t,"fragShader",r),t.attributes=n(t,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),o.call(this,t)},onRender:function(t,e){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",e.zoom)},batchPointLight:function(t,e,i,s,n,r,a,o,h,l,u,c){var d=t.color,f=t.intensity,p=t.radius,v=t.attenuation,g=d.r*f,m=d.g*f,y=d.b*f,x=e.alpha*t.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(i,s,u,c,p,v,g,m,y,x),this.batchLightVert(n,r,u,c,p,v,g,m,y,x),this.batchLightVert(a,o,u,c,p,v,g,m,y,x),this.batchLightVert(i,s,u,c,p,v,g,m,y,x),this.batchLightVert(a,o,u,c,p,v,g,m,y,x),this.batchLightVert(h,l,u,c,p,v,g,m,y,x),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(t,e,i,s,n,r,a,o,h,l){var u=this.vertexViewF32,c=this.vertexCount*this.currentShader.vertexComponentCount-1;u[++c]=t,u[++c]=e,u[++c]=i,u[++c]=s,u[++c]=n,u[++c]=r,u[++c]=a,u[++c]=o,u[++c]=h,u[++c]=l,this.vertexCount++}});t.exports=h},80486:(t,e,i)=>{var s=i(56694),n=i(65246),r=i(72632),a=i(12569),o=i(99365),h=i(44775),l=new s({Extends:h,initialize:function(t){t.renderTarget=r(t,"renderTarget",1),t.fragShader=r(t,"fragShader",a),t.vertShader=r(t,"vertShader",o),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.batchSize=1,t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],h.call(this,t),this.isPostFX=!0,this.gameObject,this.colorMatrix=new n,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){h.prototype.boot.call(this);var t=this.manager.UTILITY_PIPELINE;this.fullFrame1=t.fullFrame1,this.fullFrame2=t.fullFrame2,this.halfFrame1=t.halfFrame1,this.halfFrame2=t.halfFrame2,this.set1i("uMainSampler",0)},onDraw:function(t){this.bindAndDraw(t)},copyFrame:function(t,e,i,s,n){this.manager.copyFrame(t,e,i,s,n)},copyToGame:function(t){this.manager.copyToGame(t)},drawFrame:function(t,e,i){this.manager.drawFrame(t,e,i,this.colorMatrix)},blendFrames:function(t,e,i,s,n){this.manager.blendFrames(t,e,i,s,n)},blendFramesAdditive:function(t,e,i,s,n){this.manager.blendFramesAdditive(t,e,i,s,n)},clearFrame:function(t,e){this.manager.clearFrame(t,e)},blitFrame:function(t,e,i,s,n,r){this.manager.blitFrame(t,e,i,s,n,r)},copyFrameRect:function(t,e,i,s,n,r,a,o){this.manager.copyFrameRect(t,e,i,s,n,r,a,o)},bindAndDraw:function(t,e,i,s,n){void 0===i&&(i=!0),void 0===s&&(s=!0);var r=this.gl,a=this.renderer;this.bind(n),this.set1i("uMainSampler",0),e?(r.viewport(0,0,e.width,e.height),r.bindFramebuffer(r.FRAMEBUFFER,e.framebuffer),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.texture,0),i&&(s?r.clearColor(0,0,0,0):r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT))):(a.popFramebuffer(!1,!1,!1),a.currentFramebuffer||r.viewport(0,0,a.width,a.height)),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,t.texture),r.bufferData(r.ARRAY_BUFFER,this.vertexData,r.STATIC_DRAW),r.drawArrays(r.TRIANGLES,0,6),e&&(r.bindTexture(r.TEXTURE_2D,null),r.bindFramebuffer(r.FRAMEBUFFER,null))}});t.exports=l},21213:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(77310),a=new s({Extends:r,initialize:function(t){t.topology=5,t.batchSize=n(t,"batchSize",256),r.call(this,t)}});t.exports=a},51212:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(77310),a=i(85060),o=i(18166),h=i(44775),l=new s({Extends:r,initialize:function(t){t.fragShader=n(t,"fragShader",a),t.vertShader=n(t,"vertShader",o),t.forceZero=!0,r.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0)}});t.exports=l},38964:(t,e,i)=>{var s=i(95723),n=i(79993),r=i(56694),a=i(72632),o=i(77310),h=i(12569),l=i(74118),u=i(37410),c=i(85060),d=i(18166),f=i(44775),p=new r({Extends:o,initialize:function(t){var e=a(t,"fragShader",h),i=a(t,"vertShader",d),s=a(t,"drawShader",h),n=[{name:"DrawSprite",fragShader:c,vertShader:d},{name:"CopySprite",fragShader:e,vertShader:i},{name:"DrawGame",fragShader:s,vertShader:d}],r=a(t,"shaders",[]);t.shaders=n.concat(r),t.vertShader||(t.vertShader=i),t.batchSize=1,o.call(this,t),this.isSpriteFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new l,this.targetBounds=new l,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){f.prototype.boot.call(this);var t=this.shaders,e=this.renderer;this.drawSpriteShader=t[0],this.copyShader=t[1],this.gameShader=t[2],this.fsTarget=new u(e,e.width,e.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var i=new ArrayBuffer(168);this.quadVertexData=i,this.quadVertexViewF32=new Float32Array(i),this.quadVertexBuffer=e.createVertexBuffer(i,this.gl.STATIC_DRAW),this.onResize(e.width,e.height),this.currentShader=this.copyShader},onResize:function(t,e){var i=this.quadVertexViewF32;i[1]=e,i[22]=e,i[14]=t,i[28]=t,i[35]=t,i[36]=e},batchQuad:function(t,e,i,s,r,a,o,h,l,u,c,d,f,p,v,g,m,y,x){var T=Math.min(e,s,a,h),w=Math.min(i,r,o,l),E=Math.max(e,s,a,h)-T,S=Math.max(i,r,o,l)-w,b=this.spriteBounds.setTo(T,w,E,S),A=t?t.fxPadding:0,_=E+2*A,C=S+2*A,R=Math.abs(Math.max(_,C)),M=this.manager.getRenderTarget(R),P=this.targetBounds.setTo(0,0,M.width,M.height);n(P,b.centerX,b.centerY),this.tempSprite=t;var O=this.gl,L=this.renderer;this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.flipProjectionMatrix(!0),t&&(this.onDrawSprite(t,M),t.onFX(this));var F=this.fsTarget;return this.flush(),O.viewport(0,0,L.width,L.height),O.bindFramebuffer(O.FRAMEBUFFER,F.framebuffer),O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,F.texture,0),O.clearColor(0,0,0,0),O.clear(O.COLOR_BUFFER_BIT),this.setTexture2D(x),this.batchVert(e,i,u,c,0,y,p),this.batchVert(s,r,u,f,0,y,g),this.batchVert(a,o,d,f,0,y,m),this.batchVert(e,i,u,c,0,y,p),this.batchVert(a,o,d,f,0,y,m),this.batchVert(h,l,d,c,0,y,v),this.flush(),this.flipProjectionMatrix(!1),O.activeTexture(O.TEXTURE0),O.bindTexture(O.TEXTURE_2D,M.texture),O.copyTexSubImage2D(O.TEXTURE_2D,0,0,0,P.x,P.y,P.width,P.height),O.bindFramebuffer(O.FRAMEBUFFER,null),O.bindTexture(O.TEXTURE_2D,null),this.onBatch(t),this.currentShader=this.copyShader,this.onDraw(M,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(t,e,i,n,r,a){void 0===i&&(i=!0),void 0===n&&(n=!0),void 0===r&&(r=!1),void 0===a&&(a=this.copyShader);var o=this.gl,h=this.tempSprite;this.currentShader=a;var l=this.setVertexBuffer(this.quadVertexBuffer);if(a.bind(l,!1),this.set1i("uMainSampler",0),h.onFXCopy(this),this.onCopySprite(t,e,h),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,t.texture),t.height>e.height)o.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e);else{var u=e.height-t.height;o.viewport(0,u,t.width,t.height),this.resetUVs()}if(o.bindFramebuffer(o.FRAMEBUFFER,e.framebuffer),o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,e.texture,0),i&&(o.clearColor(0,0,0,Number(!n)),o.clear(o.COLOR_BUFFER_BIT)),r){var c=this.renderer.currentBlendMode;this.renderer.setBlendMode(s.ERASE)}o.bufferData(o.ARRAY_BUFFER,this.quadVertexData,o.STATIC_DRAW),o.drawArrays(o.TRIANGLES,0,6),r&&this.renderer.setBlendMode(c),o.bindFramebuffer(o.FRAMEBUFFER,null)},blendFrames:function(t,e,i,s,n){this.manager.blendFrames(t,e,i,s,n)},blendFramesAdditive:function(t,e,i,s,n){this.manager.blendFramesAdditive(t,e,i,s,n)},drawToGame:function(t){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(t)},copyToGame:function(t){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(t)},bindAndDraw:function(t){var e=this.gl,i=this.renderer;this.set1i("uMainSampler",0),i.popFramebuffer(!1,!1,!1),i.currentFramebuffer||e.viewport(0,0,i.width,i.height),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(t.texture);var s=this._tempMatrix1.loadIdentity(),n=this.targetBounds.x,r=this.targetBounds.y,a=n+t.width,o=r+t.height,h=s.getX(n,r),l=s.getX(n,o),u=s.getX(a,o),c=s.getX(a,r),d=s.getY(n,r),f=s.getY(n,o),p=s.getY(a,o),v=s.getY(a,r);this.batchVert(h,d,0,0,0,0,16777215),this.batchVert(l,f,0,1,0,0,16777215),this.batchVert(u,p,1,1,0,0,16777215),this.batchVert(h,d,0,0,0,0,16777215),this.batchVert(u,p,1,1,0,0,16777215),this.batchVert(c,v,1,0,0,0,16777215),this.flush(),this.tempSprite=null},onDraw:function(t){this.drawToGame(t)},setUVs:function(t,e,i,s,n,r,a,o){var h=this.quadVertexViewF32;h[2]=t,h[3]=e,h[9]=i,h[10]=s,h[16]=n,h[17]=r,h[23]=t,h[24]=e,h[30]=n,h[31]=r,h[37]=a,h[38]=o},setTargetUVs:function(t,e){var i=e.height/t.height;i=i>.5?.5-(i-.5):.5-i+.5,this.setUVs(0,i,0,1+i,1,1+i,1,i)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)},destroy:function(){return this.gl.deleteBuffer(this.quadVertexBuffer),this.drawSpriteShader=null,this.copyShader=null,this.gameShader=null,this.quadVertexData=null,this.quadVertexBuffer=null,this.quadVertexViewF32=null,this.fsTarget=null,this.tempSprite=null,o.prototype.destroy.call(this),this}});t.exports=p},60848:(t,e,i)=>{var s=i(2529),n=i(95723),r=i(56694),a=i(65246),o=i(37486),h=i(79060),l=i(72632),u=i(98921),c=i(99365),d=i(44775),f=new r({Extends:d,initialize:function(t){t.renderTarget=l(t,"renderTarget",[{scale:1},{scale:1},{scale:.5},{scale:.5}]),t.vertShader=l(t,"vertShader",c),t.shaders=l(t,"shaders",[{name:"Copy",fragShader:h},{name:"AddBlend",fragShader:s},{name:"LinearBlend",fragShader:u},{name:"ColorMatrix",fragShader:o}]),t.attributes=l(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],t.batchSize=1,d.call(this,t),this.colorMatrix=new a,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){d.prototype.boot.call(this);var t=this.shaders,e=this.renderTargets;this.copyShader=t[0],this.addShader=t[1],this.linearShader=t[2],this.colorMatrixShader=t[3],this.fullFrame1=e[0],this.fullFrame2=e[1],this.halfFrame1=e[2],this.halfFrame2=e[3]},copyFrame:function(t,e,i,s,n){void 0===i&&(i=1),void 0===s&&(s=!0),void 0===n&&(n=!0);var r=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,t.texture),e?(r.viewport(0,0,e.width,e.height),r.bindFramebuffer(r.FRAMEBUFFER,e.framebuffer),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.texture,0)):r.viewport(0,0,t.width,t.height),s&&(n?r.clearColor(0,0,0,0):r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT)),r.bufferData(r.ARRAY_BUFFER,this.vertexData,r.STATIC_DRAW),r.drawArrays(r.TRIANGLES,0,6),r.bindFramebuffer(r.FRAMEBUFFER,null),r.bindTexture(r.TEXTURE_2D,null)},blitFrame:function(t,e,i,s,r,a,o){void 0===i&&(i=1),void 0===s&&(s=!0),void 0===r&&(r=!0),void 0===a&&(a=!1),void 0===o&&(o=!1);var h=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,t.texture),t.height>e.height)h.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e);else{var l=e.height-t.height;h.viewport(0,l,t.width,t.height)}if(h.bindFramebuffer(h.FRAMEBUFFER,e.framebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,e.texture,0),s&&(r?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),a){var u=this.renderer.currentBlendMode;this.renderer.setBlendMode(n.ERASE)}o&&this.flipY(),h.bufferData(h.ARRAY_BUFFER,this.vertexData,h.STATIC_DRAW),h.drawArrays(h.TRIANGLES,0,6),a&&this.renderer.setBlendMode(u),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(t,e,i,s,n,r,a,o){void 0===a&&(a=!0),void 0===o&&(o=!0);var h=this.gl;h.bindFramebuffer(h.FRAMEBUFFER,t.framebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,t.texture,0),a&&(o?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,e.texture),h.copyTexSubImage2D(h.TEXTURE_2D,0,0,0,i,s,n,r),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null)},copyToGame:function(t){var e=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,t.texture),e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.STATIC_DRAW),e.drawArrays(e.TRIANGLES,0,6)},drawFrame:function(t,e,i,s){void 0===i&&(i=!0),void 0===s&&(s=this.colorMatrix);var n=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",s.getData()),this.set1f("uAlpha",s.alpha),n.activeTexture(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,t.texture),e?(n.viewport(0,0,e.width,e.height),n.bindFramebuffer(n.FRAMEBUFFER,e.framebuffer),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e.texture,0)):n.viewport(0,0,t.width,t.height),i?n.clearColor(0,0,0,0):n.clearColor(0,0,0,1),n.clear(n.COLOR_BUFFER_BIT),n.bufferData(n.ARRAY_BUFFER,this.vertexData,n.STATIC_DRAW),n.drawArrays(n.TRIANGLES,0,6),n.bindFramebuffer(n.FRAMEBUFFER,null),n.bindTexture(n.TEXTURE_2D,null)},blendFrames:function(t,e,i,s,n,r){void 0===s&&(s=1),void 0===n&&(n=!0),void 0===r&&(r=this.linearShader);var a=this.gl;this.setShader(r),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",s),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,t.texture),a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,e.texture),i?(a.bindFramebuffer(a.FRAMEBUFFER,i.framebuffer),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,i.texture,0),a.viewport(0,0,i.width,i.height)):a.viewport(0,0,t.width,t.height),n?a.clearColor(0,0,0,0):a.clearColor(0,0,0,1),a.clear(a.COLOR_BUFFER_BIT),a.bufferData(a.ARRAY_BUFFER,this.vertexData,a.STATIC_DRAW),a.drawArrays(a.TRIANGLES,0,6),a.bindFramebuffer(a.FRAMEBUFFER,null),a.bindTexture(a.TEXTURE_2D,null)},blendFramesAdditive:function(t,e,i,s,n){this.blendFrames(t,e,i,s,n,this.addShader)},clearFrame:function(t,e){void 0===e&&(e=!0);var i=this.gl;i.viewport(0,0,t.width,t.height),i.bindFramebuffer(i.FRAMEBUFFER,t.framebuffer),e?i.clearColor(0,0,0,0):i.clearColor(0,0,0,1),i.clear(i.COLOR_BUFFER_BIT);var s=this.renderer.currentFramebuffer;i.bindFramebuffer(i.FRAMEBUFFER,s)},setUVs:function(t,e,i,s,n,r,a,o){var h=this.vertexViewF32;h[2]=t,h[3]=e,h[6]=i,h[7]=s,h[10]=n,h[11]=r,h[14]=t,h[15]=e,h[18]=n,h[19]=r,h[22]=a,h[23]=o},setTargetUVs:function(t,e){var i=e.height/t.height;i=i>.5?.5-(i-.5):.5-i+.5,this.setUVs(0,i,0,1+i,1,1+i,1,i)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});t.exports=f},65641:t=>{t.exports={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline",MOBILE_PIPELINE:"MobilePipeline"}},68726:t=>{t.exports="pipelineafterflush"},67186:t=>{t.exports="pipelinebeforeflush"},22709:t=>{t.exports="pipelinebind"},74469:t=>{t.exports="pipelineboot"},93953:t=>{t.exports="pipelinedestroy"},51687:t=>{t.exports="pipelinerebind"},25034:t=>{t.exports="pipelineresize"},18970:(t,e,i)=>{t.exports={AFTER_FLUSH:i(68726),BEFORE_FLUSH:i(67186),BIND:i(22709),BOOT:i(74469),DESTROY:i(93953),REBIND:i(51687),RESIZE:i(25034)}},62253:(t,e,i)=>{var s=i(65641),n=i(98611),r={BitmapMaskPipeline:i(5583),Events:i(18970),LightPipeline:i(66901),MobilePipeline:i(71264),MultiPipeline:i(77310),PointLightPipeline:i(10919),PostFXPipeline:i(80486),RopePipeline:i(21213),SinglePipeline:i(51212),SpriteFXPipeline:i(38964),UtilityPipeline:i(60848)};r=n(!1,r,s),t.exports=r},2529:t=>{t.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = frame1 + frame2 * uStrength;","}",""].join("\n")},91679:t=>{t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;",""," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);",""," if (!uInvertMaskAlpha)"," {"," mainColor *= maskColor.a;"," }"," else"," {"," mainColor *= (1.0 - maskColor.a);"," }",""," gl_FragColor = mainColor;","}",""].join("\n")},89053:t=>{t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join("\n")},37486:t=>{t.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);",""," if (uAlpha == 0.0)"," {"," gl_FragColor = c;",""," return;"," }",""," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }",""," vec4 result;",""," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];",""," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);",""," rgb *= result.a;",""," gl_FragColor = vec4(rgb, result.a);","}",""].join("\n")},79060:t=>{t.exports=["#define SHADER_NAME PHASER_COPY_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uBrightness;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}",""].join("\n")},65045:t=>{t.exports=["#define SHADER_NAME PHASER_LIGHT_FS","","precision mediump float;","","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","","const int kMaxLights = %LIGHT_COUNT%;","","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","uniform int uLightCount;","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);",""," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;",""," for (int index = 0; index < kMaxLights; ++index)"," {"," if (index < uLightCount)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }"," }",""," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);",""," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}",""].join("\n")},98921:t=>{t.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}",""].join("\n")},53787:t=>{t.exports=["#define SHADER_NAME PHASER_MULTI_FS","","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","","uniform sampler2D uMainSampler[%count%];","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec4 texture;",""," %forloop%",""," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},15968:t=>{t.exports=["#define SHADER_NAME PHASER_MULTI_VS","","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join("\n")},83327:t=>{t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform float uCameraZoom;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);",""," float distToSurf = length(center - gl_FragCoord.xy);",""," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);",""," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);",""," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;",""," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}",""].join("\n")},54677:t=>{t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);",""," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}",""].join("\n")},12569:t=>{t.exports=["#define SHADER_NAME PHASER_POSTFX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}",""].join("\n")},99365:t=>{t.exports=["#define SHADER_NAME PHASER_QUAD_VS","","precision mediump float;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","","varying vec2 outFragCoord;","varying vec2 outTexCoord;","","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;",""," gl_Position = vec4(inPosition, 0, 1);","}",""].join("\n")},85060:t=>{t.exports=["#define SHADER_NAME PHASER_SINGLE_FS","","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},18166:t=>{t.exports=["#define SHADER_NAME PHASER_SINGLE_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join("\n")},756:(t,e,i)=>{var s=i(55301),n=i(56694),r=i(6659),a=i(40444),o=i(97081),h=i(74181),l=i(2893),u=i(9229),c=i(72283),d=i(74118),f=i(90881),p=i(84314),v=i(93736),g=i(47751),m=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.canvas,this.canvasBounds=new d,this.parent=null,this.parentIsWindow=!1,this.parentSize=new f,this.gameSize=new f,this.baseSize=new f,this.displaySize=new f,this.scaleMode=s.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new v(1,1),this.autoRound=!1,this.autoCenter=s.CENTER.NO_CENTER,this.orientation=s.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.domlisteners={orientationChange:c,windowResize:c,fullScreenChange:c,fullScreenError:c}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(o.BOOT,this.boot,this)},boot:function(){var t=this.game;this.canvas=t.canvas,this.fullscreen=t.device.fullscreen,this.scaleMode!==s.SCALE_MODE.RESIZE&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===s.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),t.events.on(o.PRE_STEP,this.step,this),t.events.once(o.READY,this.refresh,this),t.events.once(o.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e=t.width,i=t.height,n=t.scaleMode,r=t.zoom,a=t.autoRound;if("string"==typeof e){var o=this.parentSize.width;0===o&&(o=window.innerWidth);var h=parseInt(e,10)/100;e=Math.floor(o*h)}if("string"==typeof i){var l=this.parentSize.height;0===l&&(l=window.innerHeight);var c=parseInt(i,10)/100;i=Math.floor(l*c)}this.scaleMode=n,this.autoRound=a,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,a&&(e=Math.floor(e),i=Math.floor(i)),this.gameSize.setSize(e,i),r===s.ZOOM.MAX_ZOOM&&(r=this.getMaxZoom()),this.zoom=r,1!==r&&(this._resetZoom=!0),this.baseSize.setSize(e,i),a&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),t.minWidth>0&&this.displaySize.setMin(t.minWidth*r,t.minHeight*r),t.maxWidth>0&&this.displaySize.setMax(t.maxWidth*r,t.maxHeight*r),this.displaySize.setSize(e,i),this.orientation=u(e,i)},getParent:function(t){var e=t.parent;if(null!==e){if(this.parent=l(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==s.SCALE_MODE.NONE){var i=this.parent.getBoundingClientRect();(this.parentIsWindow||0===i.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",i=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==i.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(t.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var t=this.parentSize,e=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(e.height=h(!0));var i=e.width,s=e.height;if(t.width!==i||t.height!==s)return t.setSize(i,s),!0;if(this.canvas){var n=this.canvasBounds,r=this.canvas.getBoundingClientRect();if(r.x!==n.x||r.y!==n.y)return!0}return!1},lockOrientation:function(t){var e=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!e&&e.call(screen,t)},setParentSize:function(t,e){return this.parentSize.setSize(t,e),this.refresh()},setGameSize:function(t,e){var i=this.autoRound;i&&(t=Math.floor(t),e=Math.floor(e));var s=this.width,n=this.height;return this.gameSize.resize(t,e),this.baseSize.resize(t,e),i&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(t/e),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(s,n)},resize:function(t,e){var i=this.zoom,s=this.autoRound;s&&(t=Math.floor(t),e=Math.floor(e));var n=this.width,r=this.height;this.gameSize.resize(t,e),this.baseSize.resize(t,e),s&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t*i,e*i),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var a=this.canvas.style,o=t*i,h=e*i;return s&&(o=Math.floor(o),h=Math.floor(h)),o===t&&h===e||(a.width=o+"px",a.height=h+"px"),this.refresh(n,r)},setZoom:function(t){return this.zoom=t,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var i=this.game.domContainer;if(i){this.baseSize.setCSS(i);var s=this.canvas.style,n=i.style;n.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",n.marginLeft=s.marginLeft,n.marginTop=s.marginTop}return this.emit(a.RESIZE,this.gameSize,this.baseSize,this.displaySize,t,e),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var t=u(this.width,this.height);t!==this.orientation&&(this.orientation=t,this.emit(a.ORIENTATION_CHANGE,t))}},updateScale:function(){var t,e,i=this.canvas.style,n=this.gameSize.width,r=this.gameSize.height,a=this.zoom,o=this.autoRound;this.scaleMode===s.SCALE_MODE.NONE?(this.displaySize.setSize(n*a,r*a),t=this.displaySize.width,e=this.displaySize.height,o&&(t=Math.floor(t),e=Math.floor(e)),this._resetZoom&&(i.width=t+"px",i.height=e+"px",this._resetZoom=!1)):this.scaleMode===s.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),t=this.displaySize.width,e=this.displaySize.height,o&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width,e=this.displaySize.height,o&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=p(this.parentSize.width,this.gameSize.width,0,!0),e=p(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t=this.autoCenter;if(t!==s.CENTER.NO_CENTER){var e=this.canvas,i=e.style,n=e.getBoundingClientRect(),r=n.width,a=n.height,o=Math.floor((this.parentSize.width-r)/2),h=Math.floor((this.parentSize.height-a)/2);t===s.CENTER.CENTER_HORIZONTALLY?h=0:t===s.CENTER.CENTER_VERTICALLY&&(o=0),i.marginLeft=o+"px",i.marginTop=h+"px"}},updateBounds:function(){var t=this.canvasBounds,e=this.canvas.getBoundingClientRect();t.x=e.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),t.y=e.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),t.width=e.width,t.height=e.height},transformX:function(t){return(t-this.canvasBounds.left)*this.displayScale.x},transformY:function(t){return(t-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(t){void 0===t&&(t={navigationUI:"hide"});var e=this.fullscreen;if(e.available){if(!e.active){var i=this.getFullscreenTarget();e.keyboard?i[e.request](Element.ALLOW_KEYBOARD_INPUT):i[e.request](t)}}else this.emit(a.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(a.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(a.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var t=document.createElement("div");t.style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0}this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas));return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var t=this.fullscreenTarget;if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(this.canvas,t),e.removeChild(t)}}},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(a.FULLSCREEN_UNSUPPORTED),!1;t.active&&document[t.cancel](),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(a.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var t=this,e=this.domlisteners;if(e.orientationChange=function(){t.updateBounds(),t._checkOrientation=!0,t.dirty=!0},e.windowResize=function(){t.updateBounds(),t.dirty=!0},window.addEventListener("orientationchange",e.orientationChange,!1),window.addEventListener("resize",e.windowResize,!1),this.fullscreen.available){e.fullScreenChange=function(e){return t.onFullScreenChange(e)},e.fullScreenError=function(e){return t.onFullScreenError(e)};["webkit","moz",""].forEach((function(t){document.addEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",e.fullScreenError,!1)})),document.addEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.addEventListener("MSFullscreenError",e.fullScreenError,!1)}},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():this.stopFullscreen()},onFullScreenError:function(){this.removeFullscreenTarget()},getViewPort:function(t,e){t instanceof g||(e=t,t=void 0),void 0===e&&(e=new d);var i,s,n=this.baseSize,r=this.parentSize,a=this.canvasBounds,o=this.displayScale,h=a.x>=0?0:-a.x*o.x,l=a.y>=0?0:-a.y*o.y;return i=r.width>=a.width?n.width:n.width-(a.width-r.width)*o.x,s=r.height>=a.height?n.height:n.height-(a.height-r.height)*o.y,e.setTo(h,l,i,s),t&&(e.width/=t.zoomX,e.height/=t.zoomY,e.centerX=t.centerX+t.scrollX,e.centerY=t.centerY+t.scrollY),e},step:function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var t=this.domlisteners;window.removeEventListener("orientationchange",t.orientationChange,!1),window.removeEventListener("resize",t.windowResize,!1);["webkit","moz",""].forEach((function(e){document.removeEventListener(e+"fullscreenchange",t.fullScreenChange,!1),document.removeEventListener(e+"fullscreenerror",t.fullScreenError,!1)})),document.removeEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",t.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===s.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===s.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=m},35098:t=>{t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},53539:t=>{t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},12637:t=>{t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},10217:t=>{t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},55301:(t,e,i)=>{var s={CENTER:i(35098),ORIENTATION:i(53539),SCALE_MODE:i(12637),ZOOM:i(10217)};t.exports=s},82085:t=>{t.exports="enterfullscreen"},11826:t=>{t.exports="fullscreenfailed"},56691:t=>{t.exports="fullscreenunsupported"},34739:t=>{t.exports="leavefullscreen"},26681:t=>{t.exports="orientationchange"},11428:t=>{t.exports="resize"},40444:(t,e,i)=>{t.exports={ENTER_FULLSCREEN:i(82085),FULLSCREEN_FAILED:i(11826),FULLSCREEN_UNSUPPORTED:i(56691),LEAVE_FULLSCREEN:i(34739),ORIENTATION_CHANGE:i(26681),RESIZE:i(11428)}},86754:(t,e,i)=>{var s=i(98611),n=i(55301),r={Center:i(35098),Events:i(40444),Orientation:i(53539),ScaleManager:i(756),ScaleModes:i(12637),Zoom:i(10217)};r=s(!1,r,n.CENTER),r=s(!1,r,n.ORIENTATION),r=s(!1,r,n.SCALE_MODE),r=s(!1,r,n.ZOOM),t.exports=r},47736:(t,e,i)=>{var s=i(72632),n=i(40587);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=s(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(n(e+"Physics")),i)for(var a in i)a=n(a.concat("Physics")),-1===r.indexOf(a)&&r.push(a);return r}}},91088:(t,e,i)=>{var s=i(72632);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=s(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},90415:t=>{t.exports={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},87157:(t,e,i)=>{var s=i(56694),n=i(63946),r=new s({initialize:function(t){this.sys=new n(this,t),this.game,this.anims,this.cache,this.registry,this.sound,this.textures,this.events,this.cameras,this.add,this.make,this.scene,this.children,this.lights,this.data,this.input,this.load,this.time,this.tweens,this.physics,this.matter,this.scale,this.plugins,this.renderer},update:function(){}});t.exports=r},13553:(t,e,i)=>{var s=i(56694),n=i(92980),r=i(7599),a=i(97081),o=i(10850),h=i(683),l=i(72283),u=i(87157),c=i(63946),d=new s({initialize:function(t,e){if(this.game=t,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,e){Array.isArray(e)||(e=[e]);for(var i=0;i-1&&(delete this.keys[s],this.scenes.splice(i,1),this._start.indexOf(s)>-1&&(i=this._start.indexOf(s),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,s=i.settings;i.sceneUpdate=l,t.init&&(t.init.call(t,s.data),s.status=n.INIT,s.isTransition&&i.events.emit(r.TRANSITION_INIT,s.transitionFrom,s.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),s.status=n.LOADING,e.once(h.COMPLETE,this.loadComplete,this),e.start()):this.create(t)},loadComplete:function(t){this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(t.scene)},payloadComplete:function(t){this.bootScene(t.scene)},update:function(t,e){this.processQueue(),this.isProcessing=!0;for(var i=this.scenes.length-1;i>=0;i--){var s=this.scenes[i].sys;s.settings.status>n.START&&s.settings.status<=n.RUNNING&&s.step(t,e),s.scenePlugin._target&&s.scenePlugin.step(t,e)}},render:function(t){for(var e=0;e=n.LOADING&&i.settings.status=n.START&&a<=n.CREATING)return this;if(a>=n.RUNNING&&a<=n.SLEEPING)r.shutdown(),r.sceneUpdate=l,r.start(e);else if(r.sceneUpdate=l,r.start(e),r.load&&(s=r.load),s&&r.settings.hasOwnProperty("pack")&&(s.reset(),s.addPack({payload:r.settings.pack})))return r.settings.status=n.LOADING,s.once(h.COMPLETE,this.payloadComplete,this),s.start(),this;return this.bootScene(i),this},stop:function(t,e){var i=this.getScene(t);if(i&&!i.sys.isTransitioning()&&i.sys.settings.status!==n.SHUTDOWN){var s=i.sys.load;s.off(h.COMPLETE,this.loadComplete,this),s.off(h.COMPLETE,this.payloadComplete,this),i.sys.shutdown(e)}return this},switch:function(t,e){var i=this.getScene(t),s=this.getScene(e);return i&&s&&i!==s&&(this.sleep(t),this.isSleeping(e)?this.wake(e):this.start(e)),this},getAt:function(t){return this.scenes[t]},getIndex:function(t){var e=this.getScene(t);return this.scenes.indexOf(e)},bringToTop:function(t){if(this.isProcessing)this._queue.push({op:"bringToTop",keyA:t,keyB:null});else{var e=this.getIndex(t);if(-1!==e&&e0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,s=this.getScene(t),n=this.getAt(i);this.scenes[e]=n,this.scenes[i]=s}}return this},moveUp:function(t){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(ei),0,n)}}return this},moveBelow:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:t,keyB:e});else{var i=this.getIndex(t),s=this.getIndex(e);if(-1!==i&&-1!==s&&s>i){var n=this.getAt(s);this.scenes.splice(s,1),0===i?this.scenes.unshift(n):this.scenes.splice(i-(s{var s=i(82897),n=i(56694),r=i(7599),a=i(72632),o=i(91963),h=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.pluginStart,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=a(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var s=a(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=s,this._willSleep=a(t,"sleep",!1),this._willRemove=a(t,"remove",!1);var n=a(t,"onUpdate",null);n&&(this._onUpdate=n,this._onUpdateScope=a(t,"onUpdateScope",this.scene));var o=a(t,"allowInput",!1);this.settings.transitionAllowInput=o;var h=i.sys.settings;h.isTransition=!0,h.transitionFrom=this.scene,h.transitionDuration=s,h.transitionAllowInput=o,a(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):a(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake(a(t,"data")):this.manager.start(e,a(t,"data"));var l=a(t,"onStart",null),u=a(t,"onStartScope",this.scene);return l&&l.call(u,this.scene,i,s),this.systems.events.emit(r.TRANSITION_OUT,i,s),!0},checkValidTransition:function(t){return!(!t||t.sys.isActive()||t.sys.isTransitioning()||t===this.scene||this.systems.isTransitioning())},step:function(t,e){this._elapsed+=e,this.transitionProgress=s(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;t.events.emit(r.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(t,e,i,s){return this.manager.add(t,e,i,s)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var s=this.manager.getScene(e);return s&&s.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getStatus:function(t){var e=this.manager.getScene(t);if(e)return e.sys.getStatus()},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(r.SHUTDOWN,this.shutdown,this),t.off(r.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});o.register("ScenePlugin",h,"scenePlugin"),t.exports=h},36765:(t,e,i)=>{var s=i(92980),n=i(10850),r=i(30657),a=i(90415),o={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:s.PENDING,key:n(t,"key",""),active:n(t,"active",!1),visible:n(t,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:n(t,"pack",!1),cameras:n(t,"cameras",null),map:n(t,"map",r(a,n(t,"mapAdd",{}))),physics:n(t,"physics",{}),loader:n(t,"loader",{}),plugins:n(t,"plugins",!1),input:n(t,"input",{})}}};t.exports=o},63946:(t,e,i)=>{var s=i(56694),n=i(92980),r=i(18360),a=i(7599),o=i(47736),h=i(91088),l=i(72283),u=i(36765),c=new s({initialize:function(t,e){this.scene=t,this.game,this.renderer,this.config=e,this.settings=u.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.scale,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList,this.sceneUpdate=l},init:function(t){this.settings.status=n.INIT,this.sceneUpdate=l,this.game=t,this.renderer=t.renderer,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.addToScene(this,r.Global,[r.CoreScene,h(this),o(this)]),this.events.emit(a.BOOT,this),this.settings.isBooted=!0},step:function(t,e){var i=this.events;i.emit(a.PRE_UPDATE,t,e),i.emit(a.UPDATE,t,e),this.sceneUpdate.call(this.scene,t,e),i.emit(a.POST_UPDATE,t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.events.emit(a.PRE_RENDER,t),this.cameras.render(t,e),this.events.emit(a.RENDER,t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(t){var e=this.settings,i=this.getStatus();return i!==n.CREATING&&i!==n.RUNNING?console.warn("Cannot pause non-running Scene",e.key):this.settings.active&&(e.status=n.PAUSED,e.active=!1,this.events.emit(a.PAUSE,this,t)),this},resume:function(t){var e=this.events,i=this.settings;return this.settings.active||(i.status=n.RUNNING,i.active=!0,e.emit(a.RESUME,this,t)),this},sleep:function(t){var e=this.settings,i=this.getStatus();return i!==n.CREATING&&i!==n.RUNNING?console.warn("Cannot sleep non-running Scene",e.key):(e.status=n.SLEEPING,e.active=!1,e.visible=!1,this.events.emit(a.SLEEP,this,t)),this},wake:function(t){var e=this.events,i=this.settings;return i.status=n.RUNNING,i.active=!0,i.visible=!0,e.emit(a.WAKE,this,t),i.isTransition&&e.emit(a.TRANSITION_WAKE,i.transitionFrom,i.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var t=this.settings.status;return t>n.PENDING&&t<=n.RUNNING},isSleeping:function(){return this.settings.status===n.SLEEPING},isActive:function(){return this.settings.status===n.RUNNING},isPaused:function(){return this.settings.status===n.PAUSED},isTransitioning:function(){return this.settings.isTransition||null!==this.scenePlugin._target},isTransitionOut:function(){return null!==this.scenePlugin._target&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){var e=this.events,i=this.settings;t&&(i.data=t),i.status=n.START,i.active=!0,i.visible=!0,e.emit(a.START,this),e.emit(a.READY,this,t)},shutdown:function(t){var e=this.events,i=this.settings;e.off(a.TRANSITION_INIT),e.off(a.TRANSITION_START),e.off(a.TRANSITION_COMPLETE),e.off(a.TRANSITION_OUT),i.status=n.SHUTDOWN,i.active=!1,i.visible=!1,e.emit(a.SHUTDOWN,this,t)},destroy:function(){var t=this.events,e=this.settings;e.status=n.DESTROYED,e.active=!1,e.visible=!1,t.emit(a.DESTROY,this),t.removeAllListeners();for(var i=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],s=0;s{t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},31803:t=>{t.exports="addedtoscene"},94817:t=>{t.exports="boot"},28977:t=>{t.exports="create"},91959:t=>{t.exports="destroy"},363:t=>{t.exports="pause"},15643:t=>{t.exports="postupdate"},17058:t=>{t.exports="prerender"},77125:t=>{t.exports="preupdate"},76018:t=>{t.exports="ready"},28620:t=>{t.exports="removedfromscene"},41538:t=>{t.exports="render"},34268:t=>{t.exports="resume"},2342:t=>{t.exports="shutdown"},96541:t=>{t.exports="sleep"},74244:t=>{t.exports="start"},17046:t=>{t.exports="transitioncomplete"},13637:t=>{t.exports="transitioninit"},14733:t=>{t.exports="transitionout"},33899:t=>{t.exports="transitionstart"},52418:t=>{t.exports="transitionwake"},31735:t=>{t.exports="update"},8470:t=>{t.exports="wake"},7599:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(31803),BOOT:i(94817),CREATE:i(28977),DESTROY:i(91959),PAUSE:i(363),POST_UPDATE:i(15643),PRE_RENDER:i(17058),PRE_UPDATE:i(77125),READY:i(76018),REMOVED_FROM_SCENE:i(28620),RENDER:i(41538),RESUME:i(34268),SHUTDOWN:i(2342),SLEEP:i(96541),START:i(74244),TRANSITION_COMPLETE:i(17046),TRANSITION_INIT:i(13637),TRANSITION_OUT:i(14733),TRANSITION_START:i(33899),TRANSITION_WAKE:i(52418),UPDATE:i(31735),WAKE:i(8470)}},20436:(t,e,i)=>{var s=i(92980),n=i(98611),r={Events:i(7599),GetPhysicsPlugins:i(47736),GetScenePlugins:i(91088),SceneManager:i(13553),ScenePlugin:i(64051),Settings:i(36765),Systems:i(63946)};r=n(!1,r,s),t.exports=r},25798:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(76038),a=i(98611),o=i(72283),h=new s({Extends:n,initialize:function(t,e,i){n.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=a(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),!1):(t=a(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=a(!0,this.markers[t.name],t),!0):(console.warn("Audio Marker: "+t.name+" missing in Sound: "+this.key),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return console.warn("Marker: "+t+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=a(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop,this.pan=this.currentConfig.pan},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:o,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e},destroy:function(){this.pendingRemove||(this.emit(r.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});t.exports=h},12486:(t,e,i)=>{var s=i(56694),n=i(32742),r=i(6659),a=i(76038),o=i(97081),h=i(72283),l=i(71608),u=i(51463),c=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.jsonCache=t.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,t.events.on(o.BLUR,this.onGameBlur,this),t.events.on(o.FOCUS,this.onGameFocus,this),t.events.on(o.PRE_STEP,this.update,this),t.events.once(o.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var s in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(s)){var r=n(e),a=i.spritemap[s];r.loop=!!a.hasOwnProperty("loop")&&a.loop,i.addMarker({name:s,start:a.start,duration:a.end-a.start,config:r})}return i},get:function(t){return u(this.sounds,"key",t)},getAll:function(t){return t?l(this.sounds,"key",t):l(this.sounds)},getAllPlaying:function(){return l(this.sounds,"isPlaying",!0)},play:function(t,e){var i=this.add(t);return i.once(a.COMPLETE,i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var s=this.addAudioSprite(t);return s.once(a.COMPLETE,s.destroy,s),s.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeAll:function(){this.sounds.forEach((function(t){t.destroy()})),this.sounds.length=0},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var s=this.sounds[i];s.key===t&&(s.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound((function(t){t.pause()})),this.emit(a.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound((function(t){t.resume()})),this.emit(a.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound((function(t){t.stop()})),this.emit(a.STOP_ALL,this)},stopByKey:function(t){var e=0;return this.getAll(t).forEach((function(t){t.stop()&&e++})),e},unlock:h,onBlur:h,onFocus:h,onGameBlur:function(){this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.pauseOnBlur&&this.onFocus()},update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(a.UNLOCKED,this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach((function(i){i.update(t,e)}))},destroy:function(){this.game.events.off(o.BLUR,this.onGameBlur,this),this.game.events.off(o.FOCUS,this.onGameFocus,this),this.game.events.off(o.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach((function(s,n){s&&!s.pendingRemove&&t.call(e||i,s,n,i.sounds)}))},setRate:function(t){return this.rate=t,this},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound((function(t){t.calculateRate()})),this.emit(a.GLOBAL_RATE,this,t)}},setDetune:function(t){return this.detune=t,this},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound((function(t){t.calculateRate()})),this.emit(a.GLOBAL_DETUNE,this,t)}}});t.exports=c},84191:(t,e,i)=>{var s=i(27622),n=i(17546),r=i(55491),a={create:function(t){var e=t.config.audio,i=t.device.audio;return e.noAudio||!i.webAudio&&!i.audioData?new n(t):i.webAudio&&!e.disableWebAudio?new r(t):new s(t)}};t.exports=a},77578:t=>{t.exports="complete"},19679:t=>{t.exports="decodedall"},56951:t=>{t.exports="decoded"},16436:t=>{t.exports="destroy"},55154:t=>{t.exports="detune"},57818:t=>{t.exports="detune"},57890:t=>{t.exports="mute"},83022:t=>{t.exports="rate"},99170:t=>{t.exports="volume"},64289:t=>{t.exports="looped"},67214:t=>{t.exports="loop"},53128:t=>{t.exports="mute"},73078:t=>{t.exports="pan"},76763:t=>{t.exports="pauseall"},88426:t=>{t.exports="pause"},13765:t=>{t.exports="play"},80291:t=>{t.exports="rate"},11124:t=>{t.exports="resumeall"},55382:t=>{t.exports="resume"},71157:t=>{t.exports="seek"},31776:t=>{t.exports="stopall"},39450:t=>{t.exports="stop"},21939:t=>{t.exports="unlocked"},33019:t=>{t.exports="volume"},76038:(t,e,i)=>{t.exports={COMPLETE:i(77578),DECODED:i(56951),DECODED_ALL:i(19679),DESTROY:i(16436),DETUNE:i(55154),GLOBAL_DETUNE:i(57818),GLOBAL_MUTE:i(57890),GLOBAL_RATE:i(83022),GLOBAL_VOLUME:i(99170),LOOP:i(67214),LOOPED:i(64289),MUTE:i(53128),PAN:i(73078),PAUSE_ALL:i(76763),PAUSE:i(88426),PLAY:i(13765),RATE:i(80291),RESUME_ALL:i(11124),RESUME:i(55382),SEEK:i(71157),STOP_ALL:i(31776),STOP:i(39450),UNLOCKED:i(21939),VOLUME:i(33019)}},34350:(t,e,i)=>{var s=i(25798),n=i(56694),r=i(76038),a=i(82897),o=new n({Extends:s,initialize:function(t,e,i){if(void 0===i&&(i={}),this.tags=t.game.cache.audio.get(e),!this.tags)throw new Error('No cached audio asset with key "'+e);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,s.call(this,t,e,i)},play:function(t,e){return!this.manager.isLocked(this,"play",[t,e])&&(!!s.prototype.play.call(this,t,e)&&(!!this.pickAndPlayAudioTag()&&(this.emit(r.PLAY,this),!0)))},pause:function(){return!this.manager.isLocked(this,"pause")&&(!(this.startTime>0)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(r.PAUSE,this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!s.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit(r.RESUME,this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!s.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(r.STOP,this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=i-this.manager.loopEndOffset?(this.audio.currentTime=e+Math.max(0,s-i),s=this.audio.currentTime):s=i)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(r.COMPLETE,this);this.previousTime=s}},destroy:function(){s.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=a(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){s.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.updateMute(),this.emit(r.MUTE,this,t))}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.updateVolume(),this.emit(r.VOLUME,this,t))}},setVolume:function(t){return this.volume=t,this},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,r.RATE,t)||(this.calculateRate(),this.emit(r.RATE,this,t))}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,r.DETUNE,t)||(this.calculateRate(),this.emit(r.DETUNE,this,t))}},setDetune:function(t){return this.detune=t,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit(r.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit(r.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this},pan:{get:function(){return this.currentConfig.pan},set:function(t){this.currentConfig.pan=t,this.emit(r.PAN,this,t)}},setPan:function(t){return this.pan=t,this}});t.exports=o},27622:(t,e,i)=>{var s=i(12486),n=i(56694),r=i(76038),a=i(34350),o=new n({Extends:s,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,s.call(this,t)},add:function(t,e){var i=new a(this,t,e);return this.sounds.push(i),i},unlock:function(){this.locked=!1;var t=this;if(this.game.cache.audio.entries.each((function(e,i){for(var s=0;s{t.exports={SoundManagerCreator:i(84191),Events:i(76038),BaseSound:i(25798),BaseSoundManager:i(12486),WebAudioSound:i(96008),WebAudioSoundManager:i(55491),HTML5AudioSound:i(34350),HTML5AudioSoundManager:i(27622),NoAudioSound:i(38662),NoAudioSoundManager:i(17546)}},38662:(t,e,i)=>{var s=i(25798),n=i(56694),r=i(6659),a=i(98611),o=i(72283),h=function(){return!1},l=function(){return null},u=function(){return this},c=new n({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=a({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.pan=0,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:h,updateMarker:h,removeMarker:l,play:h,pause:h,resume:h,stop:h,setMute:u,setVolume:u,setRate:u,setDetune:u,setSeek:u,setLoop:u,setPan:u,applyConfig:l,resetConfig:l,update:o,calculateRate:l,destroy:function(){s.prototype.destroy.call(this)}});t.exports=c},17546:(t,e,i)=>{var s=i(12486),n=i(56694),r=i(6659),a=i(38662),o=i(72283),h=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new a(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},get:function(t){return s.prototype.get.call(this,t)},getAll:function(t){return s.prototype.getAll.call(this,t)},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return s.prototype.remove.call(this,t)},removeAll:function(){return s.prototype.removeAll.call(this)},removeByKey:function(t){return s.prototype.removeByKey.call(this,t)},stopByKey:function(t){return s.prototype.stopByKey.call(this,t)},onBlur:o,onFocus:o,onGameBlur:o,onGameFocus:o,pauseAll:o,resumeAll:o,stopAll:o,update:o,setRate:o,setDetune:o,setMute:o,setVolume:o,unlock:o,forEachActiveSound:function(t,e){s.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){s.prototype.destroy.call(this)}});t.exports=h},96008:(t,e,i)=>{var s=i(25798),n=i(56694),r=i(76038),a=new n({Extends:s,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('Audio key "'+e+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.pannerNode=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),t.context.createStereoPanner?(this.pannerNode=t.context.createStereoPanner(),this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(t.destination)):this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,s.call(this,t,e,i)},play:function(t,e){return!!s.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime{var s=i(82329),n=i(12486),r=i(56694),a=i(76038),o=i(97081),h=i(96008),l=new r({Extends:n,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),n.call(this,t),this.locked&&t.isBooted?this.unlock():t.events.once(o.BOOT,this.unlock,this)},createAudioContext:function(t){var e=t.config.audio;return e.context?(e.context.resume(),e.context):window.hasOwnProperty("AudioContext")?new AudioContext:window.hasOwnProperty("webkitAudioContext")?new window.webkitAudioContext:void 0},setAudioContext:function(t){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=t,this.masterMuteNode=t.createGain(),this.masterVolumeNode=t.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(t.destination),this.destination=this.masterMuteNode,this},add:function(t,e){var i=new h(this,t,e);return this.sounds.push(i),i},decodeAudio:function(t,e){var i;i=Array.isArray(t)?t:[{key:t,data:e}];for(var n=this.game.cache.audio,r=i.length,o=0;o{var s=i(59959),n=i(56694),r=i(72283),a=i(17922),o=new n({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=r,this.removeCallback=r,this._sortKey=""},add:function(t,e){return e?s.Add(this.list,t):s.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?s.AddAt(this.list,t,e):s.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),a(this.list,e),this):this},getByName:function(t){return s.GetFirst(this.list,"name",t)},getRandom:function(t,e){return s.GetRandom(this.list,t,e)},getFirst:function(t,e,i,n){return s.GetFirst(this.list,t,e,i,n)},getAll:function(t,e,i,n){return s.GetAll(this.list,t,e,i,n)},count:function(t,e){return s.CountAllMatching(this.list,t,e)},swap:function(t,e){s.Swap(this.list,t,e)},moveTo:function(t,e){return s.MoveTo(this.list,t,e)},moveAbove:function(t,e){return s.MoveAbove(this.list,t,e)},moveBelow:function(t,e){return s.MoveBelow(this.list,t,e)},remove:function(t,e){return e?s.Remove(this.list,t):s.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?s.RemoveAt(this.list,t):s.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?s.RemoveBetween(this.list,t,e):s.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return s.BringToTop(this.list,t)},sendToBack:function(t){return s.SendToBack(this.list,t)},moveUp:function(t){return s.MoveUp(this.list,t),t},moveDown:function(t){return s.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return s.Shuffle(this.list),this},replace:function(t,e){return s.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,n){return s.SetAll(this.list,t,e,i,n),this},each:function(t,e){for(var i=[null],s=2;s0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=o},33885:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e{var s=i(56694),n=i(6659),r=i(36716),a=new s({Extends:n,initialize:function(){n.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(t){return this._active.indexOf(t)>-1},isPending:function(t){return this._toProcess>0&&this._pending.indexOf(t)>-1},isDestroying:function(t){return this._destroy.indexOf(t)>-1},add:function(t){return this.checkQueue&&this.isActive()&&!this.isDestroying()||this.isPending()||(this._pending.push(t),this._toProcess++),t},remove:function(t){if(this.isPending(t)){var e=this._pending,i=e.indexOf(t);-1!==i&&e.splice(i,1)}else this.isActive(t)&&(this._destroy.push(t),this._toProcess++);return t},removeAll:function(){for(var t=this._active,e=this._destroy,i=t.length;i--;)e.push(t[i]),this._toProcess++;return this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,s=this._active;for(t=0;t{var s=i(53466);function n(t){if(!(this instanceof n))return new n(t,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function r(t,e,i){if(!i)return e.indexOf(t);for(var s=0;s=t.minX&&e.maxY>=t.minY}function v(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,e,i,n,r){for(var a,o=[e,i];o.length;)(i=o.pop())-(e=o.pop())<=n||(a=e+Math.ceil((i-e)/n/2)*n,s(t,a,e,i,r),o.push(e,a,a,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],s=this.toBBox;if(!p(t,e))return i;for(var n,r,a,o,h=[];e;){for(n=0,r=e.children.length;n=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},_split:function(t,e){var i=t[e],s=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,s);var r=this._chooseSplitIndex(i,n,s),o=v(i.children.splice(r,i.children.length-r));o.height=i.height,o.leaf=i.leaf,a(i,this.toBBox),a(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)},_splitRoot:function(t,e){this.data=v([t,e]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var s,n,r,a,h,l,u,d,f,p,v,g,m,y;for(l=u=1/0,s=e;s<=i-e;s++)n=o(t,0,s,this.toBBox),r=o(t,s,i,this.toBBox),f=n,p=r,v=void 0,g=void 0,m=void 0,y=void 0,v=Math.max(f.minX,p.minX),g=Math.max(f.minY,p.minY),m=Math.min(f.maxX,p.maxX),y=Math.min(f.maxY,p.maxY),a=Math.max(0,m-v)*Math.max(0,y-g),h=c(n)+c(r),a=e;n--)r=t.children[n],h(u,t.leaf?a(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var s=i;s>=0;s--)h(e[s],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():a(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=n},58403:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){if(this.entries=[],Array.isArray(t))for(var e=0;e-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new s;return t.entries.forEach((function(t){e.set(t)})),this.entries.forEach((function(t){e.set(t)})),e},intersect:function(t){var e=new s;return this.entries.forEach((function(i){t.contains(i)&&e.set(i)})),e},difference:function(t){var e=new s;return this.entries.forEach((function(i){t.contains(i)||e.set(i)})),e},size:{get:function(){return this.entries.length},set:function(t){return t{var s=i(82897),n=i(56694),r=i(84314),a=i(93736),o=new n({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=null),this._width=t,this._height=e,this._parent=s,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new a},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=s(t,0,this.maxWidth),this.minHeight=s(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=s(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=s(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case o.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case o.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case o.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case o.FIT:this.constrain(t,e,!0);break;case o.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=s(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=s(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var s=this.snapTo,n=0===e?1:t/e;return i&&this.aspectRatio>n||!i&&this.aspectRatio0&&(t=(e=r(e,s.y))*this.aspectRatio)):(i&&this.aspectRation)&&(t=(e=r(e,s.y))*this.aspectRatio,s.x>0&&(e=(t=r(t,s.x))*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(t){t&&t.style&&(t.style.width=this._width+"px",t.style.height=this._height+"px")},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});o.NONE=0,o.WIDTH_CONTROLS_HEIGHT=1,o.HEIGHT_CONTROLS_WIDTH=2,o.FIT=3,o.ENVELOP=4,t.exports=o},94160:t=>{t.exports="add"},95393:t=>{t.exports="remove"},36716:(t,e,i)=>{t.exports={PROCESS_QUEUE_ADD:i(94160),PROCESS_QUEUE_REMOVE:i(95393)}},20010:(t,e,i)=>{t.exports={Events:i(36716),List:i(71207),Map:i(33885),ProcessQueue:i(74623),RTree:i(68687),Set:i(58403),Size:i(90881)}},17487:(t,e,i)=>{var s=i(56694),n=i(82897),r=i(27119),a=i(86459),o=i(28621),h=i(31673),l=new s({Extends:h,initialize:function(t,e,i,s,n){h.call(this,t,e,i,s,n),this.add("__BASE",0,0,0,s,n),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=s,this.height=n,this.imageData=this.context.getImageData(0,0,s,n),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===a.WEBGL&&this.refresh(),this},draw:function(t,e,i){return this.context.drawImage(i,t,e),this.update()},drawFrame:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0);var n=this.manager.getFrame(t,e);if(n){var r=n.canvasData,a=n.cutWidth,o=n.cutHeight,h=n.source.resolution;return this.context.drawImage(n.source.image,r.x,r.y,a,o,i,s,a/h,o/h),this.update()}return this},setPixel:function(t,e,i,s,n,r){if(void 0===r&&(r=255),t=Math.abs(Math.floor(t)),e=Math.abs(Math.floor(e)),this.getIndex(t,e)>-1){var a=this.context.getImageData(t,e,1,1);a.data[0]=i,a.data[1]=s,a.data[2]=n,a.data[3]=r,this.context.putImageData(a,t,e)}return this},putData:function(t,e,i,s,n,r,a){return void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=t.width),void 0===a&&(a=t.height),this.context.putImageData(t,e,i,s,n,r,a),this},getData:function(t,e,i,s){return t=n(Math.floor(t),0,this.width-1),e=n(Math.floor(e),0,this.height-1),i=n(i,1,this.width-t),s=n(s,1,this.height-e),this.context.getImageData(t,e,i,s)},getPixel:function(t,e,i){i||(i=new r);var s=this.getIndex(t,e);if(s>-1){var n=this.data,a=n[s+0],o=n[s+1],h=n[s+2],l=n[s+3];i.setTo(a,o,h,l)}return i},getPixels:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===s&&(s=i),t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e));for(var a=n(t,0,this.width),o=n(t+i,0,this.width),h=n(e,0,this.height),l=n(e+s,0,this.height),u=new r,c=[],d=h;d{var s=i(95723),n=i(51052),r=i(61068),a=i(56694),o=i(86459),h=i(82047),l=i(72632),u=i(65641),c=i(37410),d=i(31673),f=i(75512),p=new a({Extends:d,initialize:function(t,e,i,s){void 0===i&&(i=256),void 0===s&&(s=256),this.type="DynamicTexture";var a=t.game.renderer,h=a&&a.type===o.CANVAS,l=h?r.create2D(this,i,s):[this];d.call(this,t,e,l,i,s),this.add("__BASE",0,0,0,i,s),this.renderer=a,this.isDrawing=!1,this.canvas=h?l:null,this.context=h?l.getContext("2d"):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new n(0,0,i,s).setScene(t.game.scene.systemScene,!1),this.renderTarget=h?null:new c(a,i,s,1,0,!1),this.pipeline=h?null:a.pipelines.get(u.SINGLE_PIPELINE),this.setSize(i,s)},setSize:function(t,e){void 0===e&&(e=t);var i=this.get(),s=i.source;if(t!==this.width||e!==this.height){this.canvas&&(this.canvas.width=t,this.canvas.height=e);var n=this.renderTarget;n&&(n.resize(t,e),i.glTexture=n.texture,s.isRenderTexture=!0,s.isGLTexture=!0,s.glTexture=n.texture,s.glTexture.flipY=!0),this.camera.setSize(t,e),s.width=t,s.height=e,i.setSize(t,e),this.width=t,this.height=e}else{var r=this.getSourceImage();i.cutX+t>r.width&&(t=r.width-i.cutX),i.cutY+e>r.height&&(e=r.height-i.cutY),i.setSize(t,e,i.cutX,i.cutY)}return this},setIsSpriteTexture:function(t){return this.isSpriteTexture=t,this},fill:function(t,e,i,s,n,r){var a=this.camera,o=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=this.width),void 0===r&&(r=this.height);var h=t>>16&255,l=t>>8&255,u=255&t,c=this.renderTarget;if(a.preRender(),c){c.bind(!0);var d=this.pipeline.manager.set(this.pipeline),p=o.width/c.width,v=o.height/c.height;d.drawFillRect(i*p,s*v,n*p,r*v,f.getTintFromFloats(u/255,l/255,h/255,1),e),c.unbind(!0)}else{var g=this.context;o.setContext(g),g.globalCompositeOperation="source-over",g.fillStyle="rgba("+h+","+l+","+u+","+e+")",g.fillRect(i,s,n,r),o.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var t=this.context,e=this.renderTarget;e?e.clear():t&&(t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,this.width,this.height),t.restore()),this.dirty=!1}return this},stamp:function(t,e,i,s,n){void 0===i&&(i=0),void 0===s&&(s=0);var r=l(n,"alpha",1),a=l(n,"tint",16777215),o=l(n,"angle",0),h=l(n,"rotation",0),u=l(n,"scale",1),c=l(n,"scaleX",u),d=l(n,"scaleY",u),f=l(n,"originX",.5),p=l(n,"originY",.5),v=l(n,"blendMode",0),g=l(n,"erase",!1),m=this.manager.resetStamp(r,a);return m.setAngle(0),0!==o?m.setAngle(o):0!==h&&m.setRotation(h),m.setScale(c,d),m.setTexture(t,e),m.setOrigin(f,p),m.setBlendMode(v),g&&(this._eraseMode=!0),this.draw(m,i,s),g&&(this._eraseMode=!1),this},erase:function(t,e,i){return this._eraseMode=!0,this.draw(t,e,i),this._eraseMode=!1,this},draw:function(t,e,i,s,n){return this.beginDraw(),this.batchDraw(t,e,i,s,n),this.endDraw(),this},drawFrame:function(t,e,i,s,n,r){return this.beginDraw(),this.batchDrawFrame(t,e,i,s,n,r),this.endDraw(),this},repeat:function(t,e,i,s,n,r,a,o,l){if(void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=this.width),void 0===r&&(r=this.height),void 0===a&&(a=1),void 0===o&&(o=16777215),void 0===l&&(l=!1),!(e=t instanceof h?t:this.manager.getFrame(t,e)))return this;var u=this.manager.resetStamp(a,o);u.setFrame(e),u.setOrigin(0);var c=e.width,d=e.height;n=Math.floor(n),r=Math.floor(r);var f=Math.ceil(n/c),p=Math.ceil(r/d),v=f*c-n,g=p*d-r;v>0&&(v=c-v),g>0&&(g=d-g),i<0&&(f+=Math.ceil(Math.abs(i)/c)),s<0&&(p+=Math.ceil(Math.abs(s)/d));var m=i,y=s,x=!1,T=this.manager.stampCrop.setTo(0,0,c,d);l||this.beginDraw();for(var w=0;w0&&E===f-1&&(x=!0,T.width=v),g>0&&w===p-1&&(x=!0,T.height=g),x&&u.setCrop(T),this.batchGameObject(u,m,y),u.isCropped=!1,T.setTo(0,0,c,d)),m+=c;m=i,y+=d}return l||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var t=this.camera,e=this.renderer,i=this.renderTarget;t.preRender(),i?e.beginCapture(i.width,i.height):e.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(t,e,i,s,n){return Array.isArray(t)||(t=[t]),this.batchList(t,e,i,s,n),this},batchDrawFrame:function(t,e,i,s,n,r){void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=1),void 0===r&&(r=16777215);var a=this.manager.getFrame(t,e);return a&&(this.renderTarget?this.pipeline.batchTextureFrame(a,i,s,r,n,this.camera.matrix,null):this.batchTextureFrame(a,i,s,n,r)),this},endDraw:function(t){if(void 0===t&&(t=this._eraseMode),this.isDrawing){var e=this.renderer,i=this.renderTarget;if(i){var s=e.endCapture();e.pipelines.setUtility().blitFrame(s,i,1,!1,!1,t,this.isSpriteTexture),e.resetScissor(),e.resetViewport()}else e.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(t,e,i,s,n){var r=t.length;if(0!==r)for(var a=0;a0&&o.height>0&&a.drawImage(h,o.x,o.y,o.width,o.height,e,i,o.width,o.height),a.restore()}},snapshotArea:function(t,e,i,s,n,r,a){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,n,!1,t,e,i,s,r,a):this.renderer.snapshotCanvas(this.canvas,n,!1,t,e,i,s,r,a),this},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.width,this.height,t,e,i)},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i,"pixel")},renderWebGL:function(t,e,i,s){var n=this.manager.resetStamp();n.setTexture(this),n.setOrigin(0),n.renderWebGL(t,n,i,s)},renderCanvas:function(){},preDestroy:function(){r.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.stamp.destroy(),this.canvas=null,this.context=null,this.renderer=null,this.scene=null}});t.exports=p},82047:(t,e,i)=>{var s=i(56694),n=i(82897),r=i(98611),a=new s({initialize:function(t,e,i,s,n,r,a){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(r,a,s,n)},setSize:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0),this.cutX=i,this.cutY=s,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var n=this.data,r=n.cut;r.x=i,r.y=s,r.w=t,r.h=e,r.r=i+t,r.b=s+e,n.sourceSize.w=t,n.sourceSize.h=e,n.spriteSourceSize.w=t,n.spriteSourceSize.h=e,n.radius=.5*Math.sqrt(t*t+e*e);var a=n.drawImage;return a.x=i,a.y=s,a.width=t,a.height=e,this.updateUVs()},setTrim:function(t,e,i,s,n,r){var a=this.data,o=a.spriteSourceSize;return a.trim=!0,a.sourceSize.w=t,a.sourceSize.h=e,o.x=i,o.y=s,o.w=n,o.h=r,o.r=i+n,o.b=s+r,this.x=i,this.y=s,this.width=n,this.height=r,this.halfWidth=.5*n,this.halfHeight=.5*r,this.centerX=Math.floor(n/2),this.centerY=Math.floor(r/2),this.updateUVs()},setCropUVs:function(t,e,i,s,r,a,o){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=n(e,0,d)),v=l+(i=n(i,0,f)),g=s=n(s,0,d-e),m=r=n(r,0,f-i),y=this.data;if(y.trim){var x=y.spriteSourceSize,T=e+(s=n(s,0,u-e)),w=i+(r=n(r,0,c-i));if(!(x.rT||x.y>w)){var E=Math.max(x.x,e),S=Math.max(x.y,i),b=Math.min(x.r,T)-E,A=Math.min(x.b,w)-S;g=b,m=A,p=a?h+(u-(E-x.x)-b):h+(E-x.x),v=o?l+(c-(S-x.y)-A):l+(S-x.y),e=E,i=S,s=b,r=A}else p=0,v=0,g=0,m=0}else a&&(p=h+(u-e-s)),o&&(v=l+(c-i-r));var _=this.source.width,C=this.source.height;return t.u0=Math.max(0,p/_),t.v0=Math.max(0,v/C),t.u1=Math.min(1,(p+g)/_),t.v1=Math.min(1,(v+m)/C),t.x=e,t.y=i,t.cx=p,t.cy=v,t.cw=g,t.ch=m,t.width=s,t.height=r,t.flipX=a,t.flipY=o,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,s,n,r){var a=this.data.drawImage;return a.width=t,a.height=e,this.u0=i,this.v0=s,this.u1=n,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,s=this.cutHeight,n=this.data.drawImage;n.width=i,n.height=s;var r=this.source.width,a=this.source.height;return this.u0=t/r,this.v0=e/a,this.u1=(t+i)/r,this.v1=(e+s)/a,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new a(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=r(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=a},31673:(t,e,i)=>{var s=i(56694),n=i(82047),r=i(32547),a='Texture "%s" has no frame "%s"',o=new s({initialize:function(t,e,i,s,n){Array.isArray(i)||(i=[i]),this.manager=t,this.key=e,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var a=0;a{var s=i(61068),n=i(17487),r=i(56694),a=i(27119),o=i(86459),h=i(845),l=i(6659),u=i(38203),c=i(82047),d=i(97081),f=i(52780),p=i(10850),v=i(1539),g=i(42911),m=i(69150),y=i(74118),x=i(31673),T=new r({Extends:l,initialize:function(t){l.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=s.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new y,this.silentWarnings=!1,t.events.once(d.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(u.LOAD,this.updatePending,this),this.on(u.ERROR,this.updatePending,this);var t=this.game.config;this.addBase64("__DEFAULT",t.defaultImage),this.addBase64("__MISSING",t.missingImage),this.addBase64("__WHITE",t.whiteImage),this.game.events.once(d.DESTROY,this.destroy,this)},updatePending:function(){this._pending--,0===this._pending&&(this.off(u.LOAD),this.off(u.ERROR),this.emit(u.READY),this.stamp=new v(this.game.scene.systemScene).setOrigin(0))},checkKey:function(t){return!this.exists(t)||(this.silentWarnings||console.error("Texture key already in use: "+t),!1)},remove:function(t){if("string"==typeof t){if(!this.exists(t))return this.silentWarnings||console.warn("No texture found matching key: "+t),this;t=this.get(t)}return this.list.hasOwnProperty(t.key)&&(t.destroy(),this.emit(u.REMOVE,t.key),this.emit(u.REMOVE_KEY+t.key)),this},removeKey:function(t){return this.list.hasOwnProperty(t)&&delete this.list[t],this},addBase64:function(t,e){if(this.checkKey(t)){var i=this,s=new Image;s.onerror=function(){i.emit(u.ERROR,t)},s.onload=function(){var e=i.create(t,s);m.Image(e,0),i.emit(u.ADD,t,e),i.emit(u.ADD_KEY+t,e),i.emit(u.LOAD,t,e)},s.src=e}return this},getBase64:function(t,e,i,n){void 0===i&&(i="image/png"),void 0===n&&(n=.92);var r="",a=this.getFrame(t,e);if(a&&(a.source.isRenderTexture||a.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(a){var o=a.canvasData,h=s.create2D(this,o.width,o.height),l=h.getContext("2d");o.width>0&&o.height>0&&l.drawImage(a.source.image,o.x,o.y,o.width,o.height,0,0,o.width,o.height),r=h.toDataURL(i,n),s.remove(h)}return r},addImage:function(t,e,i){var s=null;return this.checkKey(t)&&(s=this.create(t,e),m.Image(s,0),i&&s.setDataSource(i),this.emit(u.ADD,t,s),this.emit(u.ADD_KEY+t,s)),s},addGLTexture:function(t,e,i,s){var n=null;return this.checkKey(t)&&(void 0===i&&(i=e.width),void 0===s&&(s=e.height),(n=this.create(t,e,i,s)).add("__BASE",0,0,0,i,s),this.emit(u.ADD,t,n),this.emit(u.ADD_KEY+t,n)),n},addCompressedTexture:function(t,e,i){var s=null;if(this.checkKey(t)){if((s=this.create(t,e)).add("__BASE",0,0,0,e.width,e.height),i)if(Array.isArray(i))for(var n=0;n=r.x&&t=r.y&&e=r.x&&t=r.y&&e{var s=i(61068),n=i(56694),r=i(28621),a=i(27394),o=new n({initialize:function(t,e,i,s,n){void 0===n&&(n=!1);var o=t.manager.game;this.renderer=o.renderer,this.texture=t,this.source=e,this.image=e.compressed?null:e,this.compressionAlgorithm=e.compressed?e.format:null,this.resolution=1,this.width=i||e.naturalWidth||e.videoWidth||e.width||0,this.height=s||e.naturalHeight||e.videoHeight||e.height||0,this.scaleMode=a.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&e instanceof HTMLVideoElement,this.isRenderTexture="RenderTexture"===e.type||"DynamicTexture"===e.type,this.isGLTexture=window.hasOwnProperty("WebGLTexture")&&e instanceof WebGLTexture,this.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.flipY=n,this.init(o)},init:function(t){var e=this.renderer;if(e){var i=this.source;if(e.gl){var s=this.image,n=this.flipY,r=this.width,a=this.height,o=this.scaleMode;this.isCanvas?this.glTexture=e.createCanvasTexture(s,!1,n):this.isVideo?this.glTexture=e.createVideoTexture(s,!1,n):this.isRenderTexture?this.glTexture=e.createTextureFromSource(null,r,a,o):this.isGLTexture?this.glTexture=i:this.compressionAlgorithm?this.glTexture=e.createTextureFromSource(i):this.glTexture=e.createTextureFromSource(s,r,a,o)}else this.isRenderTexture&&(this.image=i.canvas)}t.config.antialias||this.setFilter(1)},setFilter:function(t){this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,t),this.scaleMode=t},setFlipY:function(t){return void 0===t&&(t=!0),this.flipY=t,this},update:function(){var t=this.renderer,e=this.image,i=this.flipY,s=t.gl;s&&this.isCanvas?this.glTexture=t.updateCanvasTexture(e,this.glTexture,i):s&&this.isVideo&&(this.glTexture=t.updateVideoTexture(e,this.glTexture,i))},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture,!0),this.isCanvas&&s.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});t.exports=o},65154:t=>{t.exports={LINEAR:0,NEAREST:1}},49644:t=>{t.exports="addtexture"},29569:t=>{t.exports="addtexture-"},60079:t=>{t.exports="onerror"},72665:t=>{t.exports="onload"},93006:t=>{t.exports="ready"},69018:t=>{t.exports="removetexture"},85549:t=>{t.exports="removetexture-"},38203:(t,e,i)=>{t.exports={ADD:i(49644),ADD_KEY:i(29569),ERROR:i(60079),LOAD:i(72665),READY:i(93006),REMOVE:i(69018),REMOVE_KEY:i(85549)}},87499:(t,e,i)=>{var s=i(98611),n=i(65154),r={CanvasTexture:i(17487),DynamicTexture:i(845),Events:i(38203),FilterMode:n,Frame:i(82047),Parsers:i(69150),Texture:i(31673),TextureManager:i(6237),TextureSource:i(32547)};r=s(!1,r,n),t.exports=r},35082:t=>{t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var n,r=i.getElementsByTagName("SubTexture"),a=0;a{t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},21560:t=>{t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},64423:(t,e,i)=>{var s=i(32742);t.exports=function(t,e,i){if(i.frames||i.textures){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var r,a=Array.isArray(i.textures)?i.textures[e].frames:i.frames,o=0;o{var s=i(32742);t.exports=function(t,e,i){if(i.frames){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);var r,a=i.frames;for(var o in a)if(a.hasOwnProperty(o)){var h=a[o];if(r=t.add(o,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h)){h.trimmed&&r.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(r.rotated=!0,r.updateUVsInverted());var l=h.anchor||h.pivot;l&&(r.customPivot=!0,r.pivotX=l.x,r.pivotY=l.y),r.customData=s(h)}else console.warn("Invalid atlas json, frame already exists: "+o)}for(var u in i)"frames"!==u&&(Array.isArray(i[u])?t.customData[u]=i[u].slice(0):t.customData[u]=i[u]);return t}console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object")}},67409:t=>{t.exports=function(t){var e,i=[171,75,84,88,32,49,49,187,13,10,26,10],s=new Uint8Array(t,0,12);for(e=0;e>1),v=Math.max(1,v>>1),f+=g}return{mipmaps:d,width:h,height:l,internalFormat:o,compressed:!0,generateMipmap:!1}}console.warn("KTXParser - Only compressed formats supported")}},24904:t=>{function e(t,e,i,s,n,r,a){return void 0===a&&(a=16),Math.floor((t+i)/n)*Math.floor((e+s)/r)*a}function i(t,e){return(t=Math.max(t,16))*(e=Math.max(e,8))/4}function s(t,e){return(t=Math.max(t,8))*(e=Math.max(e,8))/2}function n(t,i){return e(t,i,3,3,4,4,8)}function r(t,i){return e(t,i,3,3,4,4)}var a={0:{sizeFunc:i,glFormat:35841},1:{sizeFunc:i,glFormat:35843},2:{sizeFunc:s,glFormat:35840},3:{sizeFunc:s,glFormat:35842},6:{sizeFunc:n,glFormat:36196},7:{sizeFunc:n,glFormat:33776},8:{sizeFunc:r,glFormat:33777},9:{sizeFunc:r,glFormat:33778},11:{sizeFunc:r,glFormat:33779},22:{sizeFunc:n,glFormat:37492},23:{sizeFunc:r,glFormat:37496},24:{sizeFunc:n,glFormat:37494},25:{sizeFunc:n,glFormat:37488},26:{sizeFunc:r,glFormat:37490},27:{sizeFunc:r,glFormat:37808},28:{sizeFunc:function(t,i){return e(t,i,4,3,5,4)},glFormat:37809},29:{sizeFunc:function(t,i){return e(t,i,4,4,5,5)},glFormat:37810},30:{sizeFunc:function(t,i){return e(t,i,5,4,6,5)},glFormat:37811},31:{sizeFunc:function(t,i){return e(t,i,5,5,6,6)},glFormat:37812},32:{sizeFunc:function(t,i){return e(t,i,7,4,8,5)},glFormat:37813},33:{sizeFunc:function(t,i){return e(t,i,7,5,8,6)},glFormat:37814},34:{sizeFunc:function(t,i){return e(t,i,7,7,8,8)},glFormat:37815},35:{sizeFunc:function(t,i){return e(t,i,9,4,10,5)},glFormat:37816},36:{sizeFunc:function(t,i){return e(t,i,9,5,10,6)},glFormat:37817},37:{sizeFunc:function(t,i){return e(t,i,9,7,10,8)},glFormat:37818},38:{sizeFunc:function(t,i){return e(t,i,9,9,10,10)},glFormat:37819},39:{sizeFunc:function(t,i){return e(t,i,11,9,12,10)},glFormat:37820},40:{sizeFunc:function(t,i){return e(t,i,11,11,12,12)},glFormat:37821}};t.exports=function(t){for(var e=new Uint32Array(t,0,13),i=e[2],s=a[i].glFormat,n=a[i].sizeFunc,r=e[11],o=e[7],h=e[6],l=52+e[12],u=new Uint8Array(t,l),c=new Array(r),d=0,f=o,p=h,v=0;v>1),p=Math.max(1,p>>1),d+=g}return{mipmaps:c,width:o,height:h,internalFormat:s,compressed:!0,generateMipmap:!1}}},6143:(t,e,i)=>{var s=i(72632);t.exports=function(t,e,i,n,r,a,o){var h=s(o,"frameWidth",null),l=s(o,"frameHeight",h);if(null===h)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var u=t.source[e];t.add("__BASE",e,0,0,u.width,u.height);var c=s(o,"startFrame",0),d=s(o,"endFrame",-1),f=s(o,"margin",0),p=s(o,"spacing",0),v=Math.floor((r-f+p)/(h+p))*Math.floor((a-f+p)/(l+p));0===v&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",t.key),(c>v||c<-v)&&(c=0),c<0&&(c=v+c),(-1===d||d>v||dr&&(y=E-r),S>a&&(x=S-a),w>=c&&w<=d&&(t.add(T,e,i+g,n+m,h-y,l-x),T++),(g+=h+p)+h>r&&(g=f,m+=l+p)}return t}},20030:(t,e,i)=>{var s=i(72632);t.exports=function(t,e,i){var n=s(i,"frameWidth",null),r=s(i,"frameHeight",n);if(!n)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var a=t.source[0];t.add("__BASE",0,0,0,a.width,a.height);var o,h=s(i,"startFrame",0),l=s(i,"endFrame",-1),u=s(i,"margin",0),c=s(i,"spacing",0),d=e.cutX,f=e.cutY,p=e.cutWidth,v=e.cutHeight,g=e.realWidth,m=e.realHeight,y=Math.floor((g-u+c)/(n+c)),x=Math.floor((m-u+c)/(r+c)),T=y*x,w=e.x,E=n-w,S=n-(g-p-w),b=e.y,A=r-b,_=r-(m-v-b);(h>T||h<-T)&&(h=0),h<0&&(h=T+h),-1!==l&&(T=h+(l+1));for(var C=u,R=u,M=0,P=e.sourceIndex,O=0;O{var e=0,i=function(t,i,s,n){var r=e-n.y-n.height;t.add(s,i,n.x,r,n.width,n.height)};t.exports=function(t,s,n){var r=t.source[s];t.add("__BASE",s,0,0,r.width,r.height),e=r.height;for(var a=n.split("\n"),o=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",l="",u={x:0,y:0,width:0,height:0},c=0;c{t.exports={AtlasXML:i(35082),Canvas:i(83332),Image:i(21560),JSONArray:i(64423),JSONHash:i(17264),KTXParser:i(67409),PVRParser:i(24904),SpriteSheet:i(6143),SpriteSheetFromAtlas:i(20030),UnityYAML:i(89187)}},93560:t=>{t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},97042:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s,n,r,a){(void 0===i||i<=0)&&(i=32),(void 0===s||s<=0)&&(s=32),void 0===n&&(n=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|s,this.imageMargin=0|n,this.imageSpacing=0|r,this.properties=a||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&t{var s=new(i(56694))({initialize:function(t){if(this.gids=[],void 0!==t)for(var e=0;e{var s=i(93560),n=i(16586),r=i(90715),a=i(89797);t.exports=function(t,e,i,o,h,l,u,c){void 0===i&&(i=32),void 0===o&&(o=32),void 0===h&&(h=10),void 0===l&&(l=10),void 0===c&&(c=!1);var d=null;if(Array.isArray(u))d=r(void 0!==e?e:"map",s.ARRAY_2D,u,i,o,c);else if(void 0!==e){var f=t.cache.tilemap.get(e);f?d=r(e,f.format,f.data,i,o,c):console.warn("No map data found for key "+e)}return null===d&&(d=new n({tileWidth:i,tileHeight:o,width:h,height:l})),new a(t,d)}},29633:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(12920),a=i(28699),o=i(66658),h=new s({Mixins:[n.Alpha,n.Flip,n.Visible],initialize:function(t,e,i,s,n,r,a,o){this.layer=t,this.index=e,this.x=i,this.y=s,this.width=n,this.height=r,this.right,this.bottom,this.baseWidth=void 0!==a?a:n,this.baseHeight=void 0!==o?o:r,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,this.collisionCallbackContext=this,this.tint=16777215,this.physics={}},containsPoint:function(t,e){return!(tthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=a(t.properties),this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldXY(this.x,this.y,void 0,t).x:this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldXY(this.x,this.y,void 0,t).y:this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new o),e.x=this.getLeft(t),e.y=this.getTop(t),e.width=this.getRight(t)-e.x,e.height=this.getBottom(t)-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},intersects:function(t,e,i,s){return!(i<=this.pixelX||s<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,s,n){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===s&&(s=t),void 0===n&&(n=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=s,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=s,n)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,s){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==s&&(this.baseHeight=s),this.updatePixelXY(),this},updatePixelXY:function(){var t=this.layer.orientation;if(t===r.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(t===r.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(t===r.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(t===r.HEXAGONAL){var e=this.layer.hexSideLength,i=(this.baseHeight-e)/2+e;this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*i}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||void 0!==this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=h},89797:(t,e,i)=>{var s=i(56694),n=i(75606),r=i(93560),a=i(72632),o=i(94990),h=i(46422),l=i(12920),u=i(52257),c=i(72677),d=i(13747),f=i(29633),p=i(5047),v=i(87177),g=i(47975),m=new s({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.renderOrder=e.renderOrder,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0,this.hexSideLength=e.hexSideLength;var i=this.orientation;this._convert={WorldToTileXY:p.GetWorldToTileXYFunction(i),WorldToTileX:p.GetWorldToTileXFunction(i),WorldToTileY:p.GetWorldToTileYFunction(i),TileToWorldXY:p.GetTileToWorldXYFunction(i),TileToWorldX:p.GetTileToWorldXFunction(i),TileToWorldY:p.GetTileToWorldYFunction(i),GetTileCorners:p.GetTileCornersFunction(i)}},setRenderOrder:function(t){var e=["right-down","left-down","right-up","left-up"];return"number"==typeof t&&(t=e[t]),e.indexOf(t)>-1&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,s,n,a,o){if(void 0===t)return null;if(null==e&&(e=t),!this.scene.sys.textures.exists(e))return console.warn("Invalid Tileset Image: "+e),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===r.TILED_JSON)return console.warn("No data found for Tileset: "+t),null;var u=this.tilesets[l];return u?(u.setTileSize(i,s),u.setSpacing(n,a),u.setImage(h),u):(void 0===i&&(i=this.tileWidth),void 0===s&&(s=this.tileHeight),void 0===n&&(n=0),void 0===a&&(a=0),void 0===o&&(o=0),(u=new g(t,o,i,s,n,a)).setImage(h),this.tilesets.push(u),u)},copy:function(t,e,i,s,n,r,a,o){return null!==(o=this.getLayer(o))?(p.Copy(t,e,i,s,n,r,a,o),this):null},createBlankLayer:function(t,e,i,s,n,r,a,h){if(void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=this.width),void 0===r&&(r=this.height),void 0===a&&(a=this.tileWidth),void 0===h&&(h=this.tileHeight),null!==this.getLayerIndex(t))return console.warn("Invalid Tilemap Layer ID: "+t),null;for(var l,u=new o({name:t,tileWidth:a,tileHeight:h,width:n,height:r,orientation:this.orientation}),c=0;c-1&&this.putTileAt(e,r.x,r.y,i,r.tilemapLayer)}return s},removeTileAt:function(t,e,i,s,n){return void 0===i&&(i=!0),void 0===s&&(s=!0),null===(n=this.getLayer(n))?null:p.RemoveTileAt(t,e,i,s,n)},removeTileAtWorldXY:function(t,e,i,s,n,r){return void 0===i&&(i=!0),void 0===s&&(s=!0),null===(r=this.getLayer(r))?null:p.RemoveTileAtWorldXY(t,e,i,s,n,r)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(this.orientation===l.ORTHOGONAL&&p.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,s=0;s{var s=i(99325),n=i(15043);s.register("tilemap",(function(t){var e=void 0!==t?t:{};return n(this.scene,e.key,e.tileWidth,e.tileHeight,e.width,e.height,e.data,e.insertNull)}))},37940:(t,e,i)=>{var s=i(61286),n=i(15043);s.register("tilemap",(function(t,e,i,s,r,a,o){return null===t&&(t=void 0),null===e&&(e=void 0),null===i&&(i=void 0),null===s&&(s=void 0),null===r&&(r=void 0),n(this.scene,t,e,i,s,r,a,o)}))},87177:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),a=i(5047),o=i(96193),h=i(93736),l=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.ComputedSize,n.Depth,n.Flip,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.Transform,n.Visible,n.ScrollFactor,o],initialize:function(t,e,i,s,n,o){r.call(this,t,"TilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],this.layer.tilemapLayer=this,this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=a.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new h,this.setTilesets(s),this.setAlpha(this.layer.alpha),this.setPosition(n,o),this.setOrigin(0,0),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.initPipeline()},setTilesets:function(t){var e=[],i=[],s=this.tilemap;Array.isArray(t)||(t=[t]);for(var n=0;n=0&&t<4&&(this._renderOrder=t),this},calculateFacesAt:function(t,e){return a.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,s){return a.CalculateFacesWithin(t,e,i,s,this.layer),this},createFromTiles:function(t,e,i,s,n){return a.CreateFromTiles(t,e,i,s,n,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,s,n,r,o){return a.Copy(t,e,i,s,n,r,o,this.layer),this},fill:function(t,e,i,s,n,r){return a.Fill(t,e,i,s,n,r,this.layer),this},filterTiles:function(t,e,i,s,n,r,o){return a.FilterTiles(t,e,i,s,n,r,o,this.layer)},findByIndex:function(t,e,i){return a.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,s,n,r,o){return a.FindTile(t,e,i,s,n,r,o,this.layer)},forEachTile:function(t,e,i,s,n,r,o){return a.ForEachTile(t,e,i,s,n,r,o,this.layer),this},setTint:function(t,e,i,s,n,r){void 0===t&&(t=16777215);return this.forEachTile((function(e){e.tint=t}),this,e,i,s,n,r)},getTileAt:function(t,e,i){return a.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,s){return a.GetTileAtWorldXY(t,e,i,s,this.layer)},getIsoTileAtWorldXY:function(t,e,i,s,n){void 0===i&&(i=!0);var r=this.tempVec;return a.IsometricWorldToTileXY(t,e,!0,r,n,this.layer,i),this.getTileAt(r.x,r.y,s)},getTilesWithin:function(t,e,i,s,n){return a.GetTilesWithin(t,e,i,s,n,this.layer)},getTilesWithinShape:function(t,e,i){return a.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,s,n,r){return a.GetTilesWithinWorldXY(t,e,i,s,n,r,this.layer)},hasTileAt:function(t,e){return a.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return a.HasTileAtWorldXY(t,e,i,this.layer)},putTileAt:function(t,e,i,s){return a.PutTileAt(t,e,i,s,this.layer)},putTileAtWorldXY:function(t,e,i,s,n){return a.PutTileAtWorldXY(t,e,i,s,n,this.layer)},putTilesAt:function(t,e,i,s){return a.PutTilesAt(t,e,i,s,this.layer),this},randomize:function(t,e,i,s,n){return a.Randomize(t,e,i,s,n,this.layer),this},removeTileAt:function(t,e,i,s){return a.RemoveTileAt(t,e,i,s,this.layer)},removeTileAtWorldXY:function(t,e,i,s,n){return a.RemoveTileAtWorldXY(t,e,i,s,n,this.layer)},renderDebug:function(t,e){return a.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,s,n,r){return a.ReplaceByIndex(t,e,i,s,n,r,this.layer),this},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this},setCollision:function(t,e,i,s){return a.SetCollision(t,e,i,this.layer,s),this},setCollisionBetween:function(t,e,i,s){return a.SetCollisionBetween(t,e,i,s,this.layer),this},setCollisionByProperty:function(t,e,i){return a.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return a.SetCollisionByExclusion(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return a.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileIndexCallback:function(t,e,i){return a.SetTileIndexCallback(t,e,i,this.layer),this},setTileLocationCallback:function(t,e,i,s,n,r){return a.SetTileLocationCallback(t,e,i,s,n,r,this.layer),this},shuffle:function(t,e,i,s){return a.Shuffle(t,e,i,s,this.layer),this},swapByIndex:function(t,e,i,s,n,r){return a.SwapByIndex(t,e,i,s,n,r,this.layer),this},tileToWorldX:function(t,e){return this.tilemap.tileToWorldX(t,e,this)},tileToWorldY:function(t,e){return this.tilemap.tileToWorldY(t,e,this)},tileToWorldXY:function(t,e,i,s){return this.tilemap.tileToWorldXY(t,e,i,s,this)},getTileCorners:function(t,e,i){return this.tilemap.getTileCorners(t,e,i,this)},weightedRandomize:function(t,e,i,s,n){return a.WeightedRandomize(e,i,s,n,t,this.layer),this},worldToTileX:function(t,e,i){return this.tilemap.worldToTileX(t,e,i,this)},worldToTileY:function(t,e,i){return this.tilemap.worldToTileY(t,e,i,this)},worldToTileXY:function(t,e,i,s,n){return this.tilemap.worldToTileXY(t,e,i,s,n,this)},destroy:function(t){void 0===t&&(t=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),t&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],r.prototype.destroy.call(this))}});t.exports=l},17394:(t,e,i)=>{var s=i(69360),n=new s,r=new s,a=new s;t.exports=function(t,e,i,s){var o=e.cull(i),h=o.length,l=i.alpha*e.alpha;if(!(0===h||l<=0)){var u=n,c=r,d=a;c.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),u.copyFrom(i.matrix);var f=t.currentContext,p=e.gidMap;f.save(),s?(u.multiplyWithOffset(s,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),c.e=e.x,c.f=e.y,u.multiply(c,d),d.copyToContext(f)):(c.e-=i.scrollX*e.scrollFactorX,c.f-=i.scrollY*e.scrollFactorY,c.copyToContext(f)),(!t.antialias||e.scaleX>1||e.scaleY>1)&&(f.imageSmoothingEnabled=!1);for(var v=0;v{var s=i(72283),n=s,r=s;n=i(51395),r=i(17394),t.exports={renderWebGL:n,renderCanvas:r}},51395:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i){var n=e.cull(i),r=n.length,a=i.alpha*e.alpha;if(!(0===r||a<=0)){var o=e.gidMap,h=t.pipelines.set(e.pipeline,e),l=s.getTintAppendFloatAlpha,u=e.scrollFactorX,c=e.scrollFactorY,d=e.x,f=e.y,p=e.scaleX,v=e.scaleY;t.pipelines.preBatch(e);for(var g=0;g{var s=i(56694),n=i(93736),r=new s({initialize:function(t,e,i,s,r,a,o,h,l){(void 0===i||i<=0)&&(i=32),(void 0===s||s<=0)&&(s=32),void 0===r&&(r=0),void 0===a&&(a=0),void 0===o&&(o={}),void 0===h&&(h={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=s,this.tileMargin=r,this.tileSpacing=a,this.tileProperties=o,this.tileData=h,this.tileOffset=new n,void 0!==l&&this.tileOffset.set(l.x,l.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t{var s=i(15494);t.exports=function(t,e,i){var n=s(t,e,!0,i),r=s(t,e-1,!0,i),a=s(t,e+1,!0,i),o=s(t-1,e,!0,i),h=s(t+1,e,!0,i),l=n&&n.collides;return l&&(n.faceTop=!0,n.faceBottom=!0,n.faceLeft=!0,n.faceRight=!0),r&&r.collides&&(l&&(n.faceTop=!1),r.faceBottom=!l),a&&a.collides&&(l&&(n.faceBottom=!1),a.faceTop=!l),o&&o.collides&&(l&&(n.faceLeft=!1),o.faceRight=!l),h&&h.collides&&(l&&(n.faceRight=!1),h.faceLeft=!l),n&&!n.collides&&n.resetFaces(),n}},60386:(t,e,i)=>{var s=i(15494),n=i(50811);t.exports=function(t,e,i,r,a){for(var o=null,h=null,l=null,u=null,c=n(t,e,i,r,null,a),d=0;d{var s=new(i(93736));t.exports=function(t,e,i,n){var r=i.tilemapLayer,a=r.cullPaddingX,o=r.cullPaddingY,h=r.tilemap.tileToWorldXY(t,e,s,n,r);return h.x>n.worldView.x+r.scaleX*i.tileWidth*(-a-.5)&&h.xn.worldView.y+r.scaleY*i.tileHeight*(-o-1)&&h.y{var s=i(60386),n=i(50811),r=i(62839),a=i(29633);t.exports=function(t,e,i,o,h,l,u,c){void 0===u&&(u=!0);var d=n(t,e,i,o,null,c),f=[];d.forEach((function(t){var e=new a(t.layer,t.index,t.x,t.y,t.width,t.height,t.baseWidth,t.baseHeight);e.copy(t),f.push(e)}));for(var p=h-t,v=l-e,g=0;g{var s=i(50811),n=i(51202);t.exports=function(t,e,i,r,a,o){i||(i={}),Array.isArray(t)||(t=[t]);var h=o.tilemapLayer;r||(r=h.scene),a||(a=r.cameras.main);var l,u=s(0,0,o.width,o.height,null,o),c=[];for(l=0;l{var s=i(74118),n=i(82127),r=i(84314),a=new s;t.exports=function(t,e){var i=t.tilemapLayer.tilemap,s=t.tilemapLayer,o=Math.floor(i.tileWidth*s.scaleX),h=Math.floor(i.tileHeight*s.scaleY),l=r(e.worldView.x-s.x,o,0,!0)-s.cullPaddingX,u=n(e.worldView.right-s.x,o,0,!0)+s.cullPaddingX,c=r(e.worldView.y-s.y,h,0,!0)-s.cullPaddingY,d=n(e.worldView.bottom-s.y,h,0,!0)+s.cullPaddingY;return a.setTo(l,c,u-l,d-c)}},381:(t,e,i)=>{var s=i(71586),n=i(6987);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var a=t.tilemapLayer,o=s(t,e);return(a.skipCull||1!==a.scrollFactorX||1!==a.scrollFactorY)&&(o.left=0,o.right=t.width,o.top=0,o.bottom=t.height),n(t,o,r,i),i}},97734:(t,e,i)=>{var s=i(50811),n=i(60386),r=i(68234);t.exports=function(t,e,i,a,o,h,l){for(var u=-1!==l.collideIndexes.indexOf(t),c=s(e,i,a,o,null,l),d=0;d{var s=i(50811);t.exports=function(t,e,i,n,r,a,o,h){return s(i,n,r,a,o,h).filter(t,e)}},37982:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=0),void 0===i&&(i=!1);var n,r,a,o=0;if(i){for(r=s.height-1;r>=0;r--)for(n=s.width-1;n>=0;n--)if((a=s.data[r][n])&&a.index===t){if(o===e)return a;o+=1}}else for(r=0;r{var s=i(50811);t.exports=function(t,e,i,n,r,a,o,h){return s(i,n,r,a,o,h).find(t,e)||null}},80916:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,n,r,a,o,h){s(i,n,r,a,o,h).forEach(t,e)}},31493:(t,e,i)=>{var s=i(12920),n=i(381),r=i(37524),a=i(20887),o=i(72283),h=i(19242);t.exports=function(t){return t===s.ORTHOGONAL?n:t===s.HEXAGONAL?r:t===s.STAGGERED?h:t===s.ISOMETRIC?a:o}},15494:(t,e,i)=>{var s=i(62839);t.exports=function(t,e,i,n){if(void 0===i&&(i=!1),s(t,e,n)){var r=n.data[e][t]||null;return r?-1===r.index?i?r:null:r:null}return null}},24640:(t,e,i)=>{var s=i(15494),n=new(i(93736));t.exports=function(t,e,i,r,a){return a.tilemapLayer.worldToTileXY(t,e,!0,n,r),s(n.x,n.y,i,a)}},48495:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n){var r=n.baseTileWidth,a=n.baseTileHeight,o=n.tilemapLayer,h=0,l=0;o&&(i||(i=o.scene.cameras.main),h=o.x+i.scrollX*(1-o.scrollFactorX),l=o.y+i.scrollY*(1-o.scrollFactorY),r*=o.scaleX,a*=o.scaleY);var u=h+t*r,c=l+e*a;return[new s(u,c),new s(u+r,c),new s(u+r,c+a),new s(u,c+a)]}},7160:(t,e,i)=>{var s=i(12920),n=i(63634),r=i(72283),a=i(48495);t.exports=function(t){return t===s.ORTHOGONAL?a:t===s.ISOMETRIC?r:t===s.HEXAGONAL?n:(s.STAGGERED,r)}},16884:(t,e,i)=>{var s=i(12920),n=i(72283),r=i(44150);t.exports=function(t){return t===s.ORTHOGONAL?r:n}},68182:(t,e,i)=>{var s=i(12920),n=i(21715),r=i(21808),a=i(72283),o=i(33388),h=i(46836);t.exports=function(t){return t===s.ORTHOGONAL?h:t===s.ISOMETRIC?r:t===s.HEXAGONAL?n:t===s.STAGGERED?o:a}},3752:(t,e,i)=>{var s=i(12920),n=i(72283),r=i(84132),a=i(42477);t.exports=function(t){return t===s.ORTHOGONAL?a:t===s.STAGGERED?r:n}},50811:(t,e,i)=>{var s=i(72632);t.exports=function(t,e,i,n,r,a){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=a.width),void 0===n&&(n=a.height),r||(r={});var o=s(r,"isNotEmpty",!1),h=s(r,"isColliding",!1),l=s(r,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(n+=e,e=0),t+i>a.width&&(i=Math.max(a.width-t,0)),e+n>a.height&&(n=Math.max(a.height-e,0));for(var u=[],c=e;c{var s=i(84068),n=i(50811),r=i(7563),a=i(72283),o=i(93736),h=function(t,e){return r.RectangleToTriangle(e,t)},l=new o,u=new o,c=new o;t.exports=function(t,e,i,o){if(void 0===t)return[];var d=a;t instanceof s.Circle?d=r.CircleToRectangle:t instanceof s.Rectangle?d=r.RectangleToRectangle:t instanceof s.Triangle?d=h:t instanceof s.Line&&(d=r.LineToRectangle),o.tilemapLayer.worldToTileXY(t.left,t.top,!0,u,i);var f=u.x,p=u.y;o.tilemapLayer.worldToTileXY(t.right,t.bottom,!1,c,i);var v=Math.ceil(c.x),g=Math.ceil(c.y),m=Math.max(v-f,1),y=Math.max(g-p,1),x=n(f,p,m,y,e,o),T=o.tileWidth,w=o.tileHeight;o.tilemapLayer&&(T*=o.tilemapLayer.scaleX,w*=o.tilemapLayer.scaleY);for(var E=[],S=new s.Rectangle(0,0,T,w),b=0;b{var s=i(50811),n=i(93736),r=new n,a=new n;t.exports=function(t,e,i,n,o,h,l){var u=l.tilemapLayer.tilemap._convert.WorldToTileXY;u(t,e,!0,r,h,l);var c=r.x,d=r.y;u(t+i,e+n,!1,a,h,l);var f=Math.ceil(a.x),p=Math.ceil(a.y);return s(c,d,f-c,p-d,o,l)}},29296:(t,e,i)=>{var s=i(12920),n=i(10618),r=i(806);t.exports=function(t){return t===s.ORTHOGONAL?r:n}},32688:(t,e,i)=>{var s=i(12920),n=i(11516),r=i(18750),a=i(72283),o=i(90562),h=i(45676);t.exports=function(t){return t===s.ORTHOGONAL?h:t===s.ISOMETRIC?r:t===s.HEXAGONAL?n:t===s.STAGGERED?o:a}},74326:(t,e,i)=>{var s=i(12920),n=i(10618),r=i(3689),a=i(70520);t.exports=function(t){return t===s.ORTHOGONAL?a:t===s.STAGGERED?r:n}},46598:(t,e,i)=>{var s=i(62839);t.exports=function(t,e,i){if(s(t,e,i)){var n=i.data[e][t];return null!==n&&n.index>-1}return!1}},28654:(t,e,i)=>{var s=i(46598),n=new(i(93736));t.exports=function(t,e,i,r){r.tilemapLayer.worldToTileXY(t,e,!0,n,i);var a=n.x,o=n.y;return s(a,o,r)}},6358:(t,e,i)=>{var s=i(82127),n=i(84314);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,r=t.tilemapLayer,a=Math.floor(i.tileWidth*r.scaleX),o=Math.floor(i.tileHeight*r.scaleY),h=t.hexSideLength,l=(o-h)/2+h;return{left:n(e.worldView.x-r.x,a,0,!0)-r.cullPaddingX,right:s(e.worldView.right-r.x,a,0,!0)+r.cullPaddingX,top:n(e.worldView.y-r.y,l,0,!0)-r.cullPaddingY,bottom:s(e.worldView.bottom-r.y,l,0,!0)+r.cullPaddingY}}},37524:(t,e,i)=>{var s=i(6358),n=i(6987);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var a=t.tilemapLayer;if(!a.skipCull&&1===a.scrollFactorX&&1===a.scrollFactorY){var o=s(t,e);n(t,o,r,i)}return i}},63634:(t,e,i)=>{var s=i(21715),n=i(93736),r=new n;t.exports=function(t,e,i,a){var o=a.baseTileWidth,h=a.baseTileHeight,l=a.tilemapLayer;l&&(o*=l.scaleX,h*=l.scaleY);for(var u=s(t,e,r,i,a),c=[],d=.5773502691896257*o,f=h/2,p=0;p<6;p++){var v=2*Math.PI*(.5-p)/6;c.push(new n(u.x+d*Math.cos(v),u.y+f*Math.sin(v)))}return c}},21715:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){i||(i=new s);var a=r.baseTileWidth,o=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(n||(n=h.scene.cameras.main),l=h.x+n.scrollX*(1-h.scrollFactorX),u=h.y+n.scrollY*(1-h.scrollFactorY),a*=h.scaleX,o*=h.scaleY);var c=o/2,d=l+a*t+a,f=u+1.5*e*c+c;return e%2==0&&(d-=a/2),i.set(d,f)}},11516:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,a){n||(n=new s);var o=a.baseTileWidth,h=a.baseTileHeight,l=a.tilemapLayer;l&&(r||(r=l.scene.cameras.main),t-=l.x+r.scrollX*(1-l.scrollFactorX),e-=l.y+r.scrollY*(1-l.scrollFactorY),o*=l.scaleX,h*=l.scaleY);var u=.5773502691896257,c=h/2,d=(t-o/2)/(u*o),f=(e-c)/c,p=u*d+-.3333333333333333*f,v=0*d+.6666666666666666*f,g=-p-v,m=Math.round(p),y=Math.round(v),x=Math.round(g),T=Math.abs(m-p),w=Math.abs(y-v),E=Math.abs(x-g);T>w&&T>E?m=-y-x:w>E&&(y=-m-x);var S=y,b=S%2==0?y/2+m:y/2+m-.5;return n.set(b,S)}},62839:t=>{t.exports=function(t,e,i){return t>=0&&t=0&&e{var s=i(13125);t.exports=function(t,e,i,n){void 0===i&&(i=[]),void 0===n&&(n=0),i.length=0;var r,a,o,h=t.tilemapLayer,l=t.data,u=t.width,c=t.height,d=u,f=c;if(!h.skipCull)if(0===n){for(a=0;a=0;r--)if(s(r,a,t,e)){if(!(o=l[a][r])||-1===o.index||!o.visible||0===o.alpha)continue;i.push(o)}}else if(2===n){for(a=f;a>=0;a--)for(r=0;l[a]&&r=0;a--)for(r=d;l[a]&&r>=0;r--)if(s(r,a,t,e)){if(!(o=l[a][r])||-1===o.index||!o.visible||0===o.alpha)continue;i.push(o)}return h.tilesDrawn=i.length,h.tilesTotal=u*c,i}},21808:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){i||(i=new s);var a=r.baseTileWidth,o=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(n||(n=h.scene.cameras.main),l=h.x+n.scrollX*(1-h.scrollFactorX),a*=h.scaleX,u=h.y+n.scrollY*(1-h.scrollFactorY),o*=h.scaleY);var c=l+a/2*(t-e),d=u+(t+e)*(o/2);return i.set(c,d)}},18750:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,a,o){n||(n=new s);var h=a.baseTileWidth,l=a.baseTileHeight,u=a.tilemapLayer;u&&(r||(r=u.scene.cameras.main),e-=u.y+r.scrollY*(1-u.scrollFactorY),l*=u.scaleY,t-=u.x+r.scrollX*(1-u.scrollFactorX),h*=u.scaleX);var c=h/2,d=l/2;o||(e-=l);var f=.5*((t-=c)/c+e/d),p=.5*(-t/c+e/d);return i&&(f=Math.floor(f),p=Math.floor(p)),n.set(f,p)}},29003:(t,e,i)=>{var s=i(29633),n=i(62839),r=i(92839),a=i(68234),o=i(14556);t.exports=function(t,e,i,h,l){if(void 0===h&&(h=!0),!n(e,i,l))return null;var u,c=l.data[i][e],d=c&&c.collides;t instanceof s?(null===l.data[i][e]&&(l.data[i][e]=new s(l,t.index,e,i,l.tileWidth,l.tileHeight)),l.data[i][e].copy(t)):(u=t,null===l.data[i][e]?l.data[i][e]=new s(l,u,e,i,l.tileWidth,l.tileHeight):l.data[i][e].index=u);var f=l.data[i][e],p=-1!==l.collideIndexes.indexOf(f.index),v=o(l.tilemapLayer.tilemap)[u=t instanceof s?t.index:t][2],g=l.tilemapLayer.tileset[v];return f.width=g.tileWidth,f.height=g.tileHeight,a(f,p),h&&d!==f.collides&&r(e,i,l),f}},48565:(t,e,i)=>{var s=i(29003),n=new(i(93736));t.exports=function(t,e,i,r,a,o){return o.tilemapLayer.worldToTileXY(e,i,!0,n,a,o),s(t,n.x,n.y,r,o)}},56547:(t,e,i)=>{var s=i(60386),n=i(29003);t.exports=function(t,e,i,r,a){if(void 0===r&&(r=!0),!Array.isArray(t))return null;Array.isArray(t[0])||(t=[t]);for(var o=t.length,h=t[0].length,l=0;l{var s=i(50811),n=i(72861);t.exports=function(t,e,i,r,a,o){var h,l=s(t,e,i,r,{},o);if(!a)for(a=[],h=0;h{var s=i(29633),n=i(62839),r=i(92839);t.exports=function(t,e,i,a,o){if(void 0===i&&(i=!0),void 0===a&&(a=!0),!n(t,e,o))return null;var h=o.data[e][t];return h?(o.data[e][t]=i?null:new s(o,-1,t,e,o.tileWidth,o.tileHeight),a&&h&&h.collides&&r(t,e,o),h):null}},17384:(t,e,i)=>{var s=i(929),n=new(i(93736));t.exports=function(t,e,i,r,a,o){return o.tilemapLayer.worldToTileXY(t,e,!0,n,a,o),s(n.x,n.y,i,r,o)}},93763:(t,e,i)=>{var s=i(50811),n=i(95509),r=new n(105,210,231,150),a=new n(243,134,48,200),o=new n(40,39,37,150);t.exports=function(t,e,i){void 0===e&&(e={});var n=void 0!==e.tileColor?e.tileColor:r,h=void 0!==e.collidingTileColor?e.collidingTileColor:a,l=void 0!==e.faceColor?e.faceColor:o,u=s(0,0,i.width,i.height,null,i);t.translateCanvas(i.tilemapLayer.x,i.tilemapLayer.y),t.scaleCanvas(i.tilemapLayer.scaleX,i.tilemapLayer.scaleY);for(var c=0;c{var s=i(50811);t.exports=function(t,e,i,n,r,a,o){for(var h=s(i,n,r,a,null,o),l=0;l{t.exports=function(t,e,i,s){var n,r,a,o=t.data,h=t.width,l=t.height,u=t.tilemapLayer,c=Math.max(0,e.left),d=Math.min(h,e.right),f=Math.max(0,e.top),p=Math.min(l,e.bottom);if(0===i)for(r=f;r=c;n--)(a=o[r][n])&&-1!==a.index&&a.visible&&0!==a.alpha&&s.push(a);else if(2===i)for(r=p;r>=f;r--)for(n=c;o[r]&&n=f;r--)for(n=d;o[r]&&n>=c;n--)(a=o[r][n])&&-1!==a.index&&a.visible&&0!==a.alpha&&s.push(a);return u.tilesDrawn=s.length,u.tilesTotal=h*l,s}},51710:(t,e,i)=>{var s=i(68234),n=i(60386),r=i(91181);t.exports=function(t,e,i,a,o){void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===o&&(o=!0),Array.isArray(t)||(t=[t]);for(var h=0;h{var s=i(68234),n=i(60386),r=i(91181);t.exports=function(t,e,i,a,o,h){if(void 0===i&&(i=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),!(t>e)){for(var l=t;l<=e;l++)r(l,i,o);if(h)for(var u=0;u=t&&d.index<=e&&s(d,i)}a&&n(0,0,o.width,o.height,o)}}},33158:(t,e,i)=>{var s=i(68234),n=i(60386),r=i(91181);t.exports=function(t,e,i,a){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var o=0;o{var s=i(68234),n=i(60386),r=i(19256);t.exports=function(t,e,i,a){void 0===e&&(e=!0),void 0===i&&(i=!0);for(var o=0;o{var s=i(68234),n=i(60386);t.exports=function(t,e,i){void 0===t&&(t=!0),void 0===e&&(e=!0);for(var r=0;r0&&s(o,t)}}e&&n(0,0,i.width,i.height,i)}},91181:t=>{t.exports=function(t,e,i){var s=i.collideIndexes.indexOf(t);e&&-1===s?i.collideIndexes.push(t):e||-1===s||i.collideIndexes.splice(s,1)}},68234:t=>{t.exports=function(t,e){e?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)}},11628:t=>{t.exports=function(t,e,i,s){if("number"==typeof t)s.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var n=0,r=t.length;n{var s=i(50811);t.exports=function(t,e,i,n,r,a,o){for(var h=s(t,e,i,n,null,o),l=0;l{var s=i(50811),n=i(18592);t.exports=function(t,e,i,r,a){var o=s(t,e,i,r,null,a),h=o.map((function(t){return t.index}));n(h);for(var l=0;l{var s=i(82127),n=i(84314);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,r=t.tilemapLayer,a=Math.floor(i.tileWidth*r.scaleX),o=Math.floor(i.tileHeight*r.scaleY);return{left:n(e.worldView.x-r.x,a,0,!0)-r.cullPaddingX,right:s(e.worldView.right-r.x,a,0,!0)+r.cullPaddingX,top:n(e.worldView.y-r.y,o/2,0,!0)-r.cullPaddingY,bottom:s(e.worldView.bottom-r.y,o/2,0,!0)+r.cullPaddingY}}},19242:(t,e,i)=>{var s=i(53945),n=i(6987);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var a=t.tilemapLayer;if(!a.skipCull&&1===a.scrollFactorX&&1===a.scrollFactorY){var o=s(t,e);n(t,o,r,i)}return i}},33388:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){i||(i=new s);var a=r.baseTileWidth,o=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(n||(n=h.scene.cameras.main),l=h.x+n.scrollX*(1-h.scrollFactorX),a*=h.scaleX,u=h.y+n.scrollY*(1-h.scrollFactorY),o*=h.scaleY);var c=l+t*a+e%2*(a/2),d=u+e*(o/2);return i.set(c,d)}},84132:t=>{t.exports=function(t,e,i){var s=i.baseTileHeight,n=i.tilemapLayer,r=0;return n&&(void 0===e&&(e=n.scene.cameras.main),r=n.y+e.scrollY*(1-n.scrollFactorY),s*=n.scaleY),r+t*(s/2)+s}},90562:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,a){n||(n=new s);var o=a.baseTileWidth,h=a.baseTileHeight,l=a.tilemapLayer;l&&(r||(r=l.scene.cameras.main),e-=l.y+r.scrollY*(1-l.scrollFactorY),h*=l.scaleY,t-=l.x+r.scrollX*(1-l.scrollFactorX),o*=l.scaleX);var u=i?Math.floor(e/(h/2)):e/(h/2),c=i?Math.floor((t+u%2*.5*o)/o):(t+u%2*.5*o)/o;return n.set(c,u)}},3689:t=>{t.exports=function(t,e,i,s){var n=s.baseTileHeight,r=s.tilemapLayer;return r&&(i||(i=r.scene.cameras.main),t-=r.y+i.scrollY*(1-r.scrollFactorY),n*=r.scaleY),e?Math.floor(t/(n/2)):t/(n/2)}},55217:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,n,r,a,o){for(var h=s(i,n,r,a,null,o),l=0;l{t.exports=function(t,e,i){var s=i.baseTileWidth,n=i.tilemapLayer,r=0;return n&&(e||(e=n.scene.cameras.main),r=n.x+e.scrollX*(1-n.scrollFactorX),s*=n.scaleX),r+t*s}},46836:(t,e,i)=>{var s=i(44150),n=i(42477),r=i(93736);t.exports=function(t,e,i,a,o){return i||(i=new r(0,0)),i.x=s(t,a,o),i.y=n(e,a,o),i}},42477:t=>{t.exports=function(t,e,i){var s=i.baseTileHeight,n=i.tilemapLayer,r=0;return n&&(e||(e=n.scene.cameras.main),r=n.y+e.scrollY*(1-n.scrollFactorY),s*=n.scaleY),r+t*s}},39677:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,n,r,a){if(r){var o,h=s(t,e,i,n,null,a),l=0;for(o=0;o{var s=i(45676),n=new(i(93736));t.exports=function(t,e,i,r){return s(t,0,e,n,i,r),n.x}},45676:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,a){void 0===i&&(i=!0),n||(n=new s);var o=a.baseTileWidth,h=a.baseTileHeight,l=a.tilemapLayer;l&&(r||(r=l.scene.cameras.main),t-=l.x+r.scrollX*(1-l.scrollFactorX),e-=l.y+r.scrollY*(1-l.scrollFactorY),o*=l.scaleX,h*=l.scaleY);var u=t/o,c=e/h;return i&&(u=Math.floor(u),c=Math.floor(c)),n.set(u,c)}},70520:(t,e,i)=>{var s=i(45676),n=new(i(93736));t.exports=function(t,e,i,r){return s(0,t,e,n,i,r),n.y}},5047:(t,e,i)=>{t.exports={CalculateFacesAt:i(92839),CalculateFacesWithin:i(60386),CheckIsoBounds:i(13125),Copy:i(17347),CreateFromTiles:i(93604),CullBounds:i(71586),CullTiles:i(381),Fill:i(97734),FilterTiles:i(63555),FindByIndex:i(37982),FindTile:i(48297),ForEachTile:i(80916),GetCullTilesFunction:i(31493),GetTileAt:i(15494),GetTileAtWorldXY:i(24640),GetTileCorners:i(48495),GetTileCornersFunction:i(7160),GetTilesWithin:i(50811),GetTilesWithinShape:i(31674),GetTilesWithinWorldXY:i(44662),GetTileToWorldXFunction:i(16884),GetTileToWorldXYFunction:i(68182),GetTileToWorldYFunction:i(3752),GetWorldToTileXFunction:i(29296),GetWorldToTileXYFunction:i(32688),GetWorldToTileYFunction:i(74326),HasTileAt:i(46598),HasTileAtWorldXY:i(28654),HexagonalCullBounds:i(6358),HexagonalCullTiles:i(37524),HexagonalGetTileCorners:i(63634),HexagonalTileToWorldXY:i(21715),HexagonalWorldToTileXY:i(11516),IsInLayerBounds:i(62839),IsometricCullTiles:i(20887),IsometricTileToWorldXY:i(21808),IsometricWorldToTileXY:i(18750),PutTileAt:i(29003),PutTileAtWorldXY:i(48565),PutTilesAt:i(56547),Randomize:i(91180),RemoveTileAt:i(929),RemoveTileAtWorldXY:i(17384),RenderDebug:i(93763),ReplaceByIndex:i(51202),RunCull:i(6987),SetCollision:i(51710),SetCollisionBetween:i(15216),SetCollisionByExclusion:i(33158),SetCollisionByProperty:i(4180),SetCollisionFromCollisionGroup:i(18625),SetLayerCollisionIndex:i(91181),SetTileCollision:i(68234),SetTileIndexCallback:i(11628),SetTileLocationCallback:i(72732),Shuffle:i(34397),StaggeredCullBounds:i(53945),StaggeredCullTiles:i(19242),StaggeredTileToWorldXY:i(33388),StaggeredTileToWorldY:i(84132),StaggeredWorldToTileXY:i(90562),StaggeredWorldToTileY:i(3689),SwapByIndex:i(55217),TileToWorldX:i(44150),TileToWorldXY:i(46836),TileToWorldY:i(42477),WeightedRandomize:i(39677),WorldToTileX:i(806),WorldToTileXY:i(45676),WorldToTileY:i(70520)}},12920:t=>{t.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},84758:(t,e,i)=>{var s={ORIENTATION:i(12920)};t.exports=s},52678:(t,e,i)=>{var s=i(98611),n=i(84758),r={Components:i(5047),Parsers:i(34124),Formats:i(93560),ImageCollection:i(97042),ParseToTilemap:i(15043),Tile:i(29633),Tilemap:i(89797),TilemapCreator:i(4843),TilemapFactory:i(37940),Tileset:i(47975),TilemapLayer:i(87177),Orientation:i(12920),LayerData:i(94990),MapData:i(16586),ObjectLayer:i(15256)};r=s(!1,r,n.ORIENTATION),t.exports=r},94990:(t,e,i)=>{var s=i(56694),n=i(12920),r=i(72632),a=new s({initialize:function(t){void 0===t&&(t={}),this.name=r(t,"name","layer"),this.x=r(t,"x",0),this.y=r(t,"y",0),this.width=r(t,"width",0),this.height=r(t,"height",0),this.tileWidth=r(t,"tileWidth",0),this.tileHeight=r(t,"tileHeight",0),this.baseTileWidth=r(t,"baseTileWidth",this.tileWidth),this.baseTileHeight=r(t,"baseTileHeight",this.tileHeight),this.orientation=r(t,"orientation",n.ORTHOGONAL),this.widthInPixels=r(t,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=r(t,"heightInPixels",this.height*this.baseTileHeight),this.alpha=r(t,"alpha",1),this.visible=r(t,"visible",!0),this.properties=r(t,"properties",[]),this.indexes=r(t,"indexes",[]),this.collideIndexes=r(t,"collideIndexes",[]),this.callbacks=r(t,"callbacks",[]),this.bodies=r(t,"bodies",[]),this.data=r(t,"data",[]),this.tilemapLayer=r(t,"tilemapLayer",null),this.hexSideLength=r(t,"hexSideLength",0)}});t.exports=a},16586:(t,e,i)=>{var s=i(56694),n=i(12920),r=i(72632),a=new s({initialize:function(t){void 0===t&&(t={}),this.name=r(t,"name","map"),this.width=r(t,"width",0),this.height=r(t,"height",0),this.infinite=r(t,"infinite",!1),this.tileWidth=r(t,"tileWidth",0),this.tileHeight=r(t,"tileHeight",0),this.widthInPixels=r(t,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=r(t,"heightInPixels",this.height*this.tileHeight),this.format=r(t,"format",null),this.orientation=r(t,"orientation",n.ORTHOGONAL),this.renderOrder=r(t,"renderOrder","right-down"),this.version=r(t,"version","1"),this.properties=r(t,"properties",{}),this.layers=r(t,"layers",[]),this.images=r(t,"images",[]),this.objects=r(t,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=r(t,"collision",{}),this.tilesets=r(t,"tilesets",[]),this.imageCollections=r(t,"imageCollections",[]),this.tiles=r(t,"tiles",[]),this.hexSideLength=r(t,"hexSideLength",0),this.staggerAxis=r(t,"staggerAxis","y"),this.staggerIndex=r(t,"staggerIndex","odd")}});t.exports=a},15256:(t,e,i)=>{var s=i(56694),n=i(72632),r=new s({initialize:function(t){void 0===t&&(t={}),this.name=n(t,"name","object layer"),this.opacity=n(t,"opacity",1),this.properties=n(t,"properties",{}),this.propertyTypes=n(t,"propertytypes",{}),this.type=n(t,"type","objectgroup"),this.visible=n(t,"visible",!0),this.objects=n(t,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});t.exports=r},21394:(t,e,i)=>{var s=i(12920);t.exports=function(t){return"isometric"===(t=t.toLowerCase())?s.ISOMETRIC:"staggered"===t?s.STAGGERED:"hexagonal"===t?s.HEXAGONAL:s.ORTHOGONAL}},90715:(t,e,i)=>{var s=i(93560),n=i(84346),r=i(96097),a=i(2378),o=i(44909);t.exports=function(t,e,i,h,l,u){var c;switch(e){case s.ARRAY_2D:c=n(t,i,h,l,u);break;case s.CSV:c=r(t,i,h,l,u);break;case s.TILED_JSON:c=a(t,i,u);break;case s.WELTMEISTER:c=o(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},84346:(t,e,i)=>{var s=i(93560),n=i(94990),r=i(16586),a=i(29633);t.exports=function(t,e,i,o,h){for(var l=new n({tileWidth:i,tileHeight:o}),u=new r({name:t,tileWidth:i,tileHeight:o,format:s.ARRAY_2D,layers:[l]}),c=[],d=e.length,f=0,p=0;p{var s=i(93560),n=i(84346);t.exports=function(t,e,i,r,a){var o=e.trim().split("\n").map((function(t){return t.split(",")})),h=n(t,o,i,r,a);return h.format=s.CSV,h}},30951:(t,e,i)=>{var s=i(94990),n=i(29633);t.exports=function(t,e){for(var i=[],r=0;r-1?new n(o,f,c,u,a.tilesize,a.tilesize):e?null:new n(o,-1,c,u,a.tilesize,a.tilesize),h.push(d)}l.push(h),h=[]}o.data=l,i.push(o)}return i}},47488:(t,e,i)=>{var s=i(47975);t.exports=function(t){for(var e=[],i=[],n=0;n{var s=i(93560),n=i(16586),r=i(30951),a=i(47488);t.exports=function(t,e,i){if(0===e.layer.length)return console.warn("No layers found in the Weltmeister map: "+t),null;for(var o=0,h=0,l=0;lo&&(o=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new n({width:o,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:s.WELTMEISTER});return u.layers=r(e,i),u.tilesets=a(e),u}},24507:(t,e,i)=>{t.exports={ParseTileLayers:i(30951),ParseTilesets:i(47488),ParseWeltmeister:i(44909)}},34124:(t,e,i)=>{t.exports={FromOrientationString:i(21394),Parse:i(90715),Parse2DArray:i(84346),ParseCSV:i(96097),Impact:i(24507),Tiled:i(50044)}},48646:(t,e,i)=>{var s=i(98611);t.exports=function(t){for(var e,i,n,r,a,o=0;o{t.exports=function(t){for(var e=window.atob(t),i=e.length,s=new Array(i/4),n=0;n>>0;return s}},14556:(t,e,i)=>{var s=i(47975);t.exports=function(t){var e,i,n=[];for(e=0;e{var s=i(72632);t.exports=function(t,e,i){if(!e)return{i:0,layers:t.layers,name:"",opacity:1,visible:!0,x:0,y:0};var n=e.x+s(e,"startx",0)*t.tilewidth+s(e,"offsetx",0),r=e.y+s(e,"starty",0)*t.tileheight+s(e,"offsety",0);return{i:0,layers:e.layers,name:i.name+e.name+"/",opacity:i.opacity*e.opacity,visible:i.visible&&e.visible,x:i.x+n,y:i.y+r}}},8847:t=>{var e=2147483648,i=1073741824,s=536870912;t.exports=function(t){var n=Boolean(t&e),r=Boolean(t&i),a=Boolean(t&s);t&=536870911;var o=0,h=!1;return n&&r&&a?(o=Math.PI/2,h=!0):n&&r&&!a?(o=Math.PI,h=!1):n&&!r&&a?(o=Math.PI/2,h=!1):!n||r||a?!n&&r&&a?(o=3*Math.PI/2,h=!1):n||!r||a?n||r||!a?n||r||a||(o=0,h=!1):(o=3*Math.PI/2,h=!0):(o=Math.PI,h=!0):(o=0,h=!0),{gid:t,flippedHorizontal:n,flippedVertical:r,flippedAntiDiagonal:a,rotation:o,flipped:h}}},78339:(t,e,i)=>{var s=i(72632),n=i(92044);t.exports=function(t){for(var e=[],i=[],r=n(t);r.i0;)if(r.i>=r.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=i.pop()}else{var a=r.layers[r.i];if(r.i++,"imagelayer"===a.type){var o=s(a,"offsetx",0)+s(a,"startx",0),h=s(a,"offsety",0)+s(a,"starty",0);e.push({name:r.name+a.name,image:a.image,x:r.x+o+a.x,y:r.y+h+a.y,alpha:r.opacity*a.opacity,visible:r.visible&&a.visible,properties:s(a,"properties",{})})}else if("group"===a.type){var l=n(t,a,r);i.push(r),r=l}}return e}},2378:(t,e,i)=>{var s=i(48646),n=i(14556),r=i(12920),a=i(28699),o=i(93560),h=i(21394),l=i(16586),u=i(78339),c=i(61136),d=i(95925),f=i(93392);t.exports=function(t,e,i){var p=a(e),v=new l({width:p.width,height:p.height,name:t,tileWidth:p.tilewidth,tileHeight:p.tileheight,orientation:h(p.orientation),format:o.TILED_JSON,version:p.version,properties:p.properties,renderOrder:p.renderorder,infinite:p.infinite});v.orientation===r.HEXAGONAL&&(v.hexSideLength=p.hexsidelength,v.staggerAxis=p.staggeraxis,v.staggerIndex=p.staggerindex),v.layers=d(p,i),v.images=u(p);var g=f(p);return v.tilesets=g.tilesets,v.imageCollections=g.imageCollections,v.objects=c(p),v.tiles=n(v),s(v),v}},4281:(t,e,i)=>{var s=i(28820),n=i(8847),r=function(t){return{x:t.x,y:t.y}},a=["id","name","type","rotation","properties","visible","x","y","width","height"];t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var o=s(t,a);if(o.x+=e,o.y+=i,t.gid){var h=n(t.gid);o.gid=h.gid,o.flippedHorizontal=h.flippedHorizontal,o.flippedVertical=h.flippedVertical,o.flippedAntiDiagonal=h.flippedAntiDiagonal}else t.polyline?o.polyline=t.polyline.map(r):t.polygon?o.polygon=t.polygon.map(r):t.ellipse?o.ellipse=t.ellipse:t.text?o.text=t.text:t.point?o.point=!0:o.rectangle=!0;return o}},61136:(t,e,i)=>{var s=i(72632),n=i(4281),r=i(15256),a=i(92044);t.exports=function(t){for(var e=[],i=[],o=a(t);o.i0;)if(o.i>=o.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}o=i.pop()}else{var h=o.layers[o.i];if(o.i++,h.opacity*=o.opacity,h.visible=o.visible&&h.visible,"objectgroup"===h.type){h.name=o.name+h.name;for(var l=o.x+s(h,"startx",0)+s(h,"offsetx",0),u=o.y+s(h,"starty",0)+s(h,"offsety",0),c=[],d=0;d{var s=i(43908),n=i(12920),r=i(92044),a=i(21394),o=i(72632),h=i(94990),l=i(8847),u=i(29633);t.exports=function(t,e){for(var i=o(t,"infinite",!1),c=[],d=[],f=r(t);f.i0;)if(f.i>=f.layers.length){if(d.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}f=d.pop()}else{var p=f.layers[f.i];if(f.i++,"tilelayer"===p.type)if(p.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+p.name+"'");else{if(p.encoding&&"base64"===p.encoding){if(p.chunks)for(var v=0;v0?((y=new u(g,m.gid,L,F,t.tilewidth,t.tileheight)).rotation=m.rotation,y.flipX=m.flipped,T[F][L]=y):(x=e?null:new u(g,-1,L,F,t.tilewidth,t.tileheight),T[F][L]=x),++w===_.width&&(M++,w=0)}}else{(g=new h({name:f.name+p.name,x:f.x+o(p,"offsetx",0)+p.x,y:f.y+o(p,"offsety",0)+p.y,width:p.width,height:p.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:f.opacity*p.opacity,visible:f.visible&&p.visible,properties:o(p,"properties",[]),orientation:a(t.orientation)})).orientation===n.HEXAGONAL&&(g.hexSideLength=t.hexsidelength);for(var D=[],k=0,I=p.data.length;k0?((y=new u(g,m.gid,w,T.length,t.tilewidth,t.tileheight)).rotation=m.rotation,y.flipX=m.flipped,D.push(y)):(x=e?null:new u(g,-1,w,T.length,t.tilewidth,t.tileheight),D.push(x)),++w===p.width&&(T.push(D),w=0,D=[])}g.data=T,c.push(g)}else if("group"===p.type){var B=r(t,p,f);d.push(f),f=B}}return c}},93392:(t,e,i)=>{var s=i(47975),n=i(97042),r=i(4281),a=i(39642);t.exports=function(t){for(var e,i=[],o=[],h=null,l=0;l1){var d=void 0,f=void 0;if(Array.isArray(u.tiles)){d=d||{},f=f||{};for(var p=0;p{t.exports=function(t,e){for(var i=0;i0){var r,a,o,h={},l={};if(Array.isArray(s.edgecolors))for(r=0;r{t.exports={AssignTileProperties:i(48646),Base64Decode:i(43908),BuildTilesetIndex:i(14556),CreateGroupLayer:i(92044),ParseGID:i(8847),ParseImageLayers:i(78339),ParseJSONTiled:i(2378),ParseObject:i(4281),ParseObjectLayers:i(61136),ParseTileLayers:i(95925),ParseTilesets:i(93392)}},73779:(t,e,i)=>{var s=i(56694),n=i(91963),r=i(7599),a=i(57911),o=i(66458),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.now=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(r.PRE_UPDATE,this.preUpdate,this),t.on(r.UPDATE,this.update,this),t.once(r.SHUTDOWN,this.shutdown,this)},addEvent:function(t){var e;return t instanceof a?(e=t,this.removeEvent(e),e.elapsed=e.startAt,e.hasDispatched=!1,e.repeatCount=-1===e.repeat||e.loop?999999999999:e.repeat):e=new a(t),this._pendingInsertion.push(e),e},delayedCall:function(t,e,i,s){return this.addEvent({delay:t,callback:e,args:i,callbackScope:s})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e-1&&this._active.splice(n,1),s.destroy()}for(i=0;i=s.delay)){var n=s.elapsed-s.delay;if(s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),s.repeatCount>0){if(s.repeatCount--,n>=s.delay)for(;n>=s.delay&&s.repeatCount>0;)s.callback&&s.callback.apply(s.callbackScope,s.args),n-=s.delay,s.repeatCount--;s.elapsed=n,s.hasDispatched=!1}else s.hasDispatched&&this._pendingRemoval.push(s)}}}},shutdown:function(){var t;for(t=0;t{var s=i(56694),n=i(72632),r=new s({initialize:function(t){this.delay=0,this.repeat=0,this.repeatCount=0,this.loop=!1,this.callback,this.callbackScope,this.args,this.timeScale=1,this.startAt=0,this.elapsed=0,this.paused=!1,this.hasDispatched=!1,this.reset(t)},reset:function(t){if(this.delay=n(t,"delay",0),this.repeat=n(t,"repeat",0),this.loop=n(t,"loop",!1),this.callback=n(t,"callback",void 0),this.callbackScope=n(t,"callbackScope",this.callback),this.args=n(t,"args",[]),this.timeScale=n(t,"timeScale",1),this.startAt=n(t,"startAt",0),this.paused=n(t,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=-1===this.repeat||this.loop?999999999999:this.repeat,0===this.delay&&(this.repeat>0||this.loop))throw new Error("TimerEvent infinite loop created via zero delay");return this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return.001*this.getRemaining()},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return.001*this.getOverallRemaining()},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},97121:(t,e,i)=>{t.exports={Clock:i(73779),TimerEvent:i(57911)}},64532:(t,e,i)=>{var s=i(66458),n=i(56694),r=i(5454),a=i(68710),o=i(91963),h=i(7599),l=i(91944),u=i(39366),c=i(68061),d=i(45641),f=i(56034),p=new n({initialize:function(t){this.scene=t,this.events=t.sys.events,this.timeScale=1,this.paused=!1,this.processing=!1,this.tweens=[],this.time=0,this.startTime=0,this.nextTime=0,this.prevTime=0,this.maxLag=500,this.lagSkip=33,this.gap=1e3/240,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.events.once(h.DESTROY,this.destroy,this)},start:function(){this.timeScale=1,this.paused=!1,this.startTime=Date.now(),this.prevTime=this.startTime,this.nextTime=this.gap,this.events.on(h.UPDATE,this.update,this),this.events.once(h.SHUTDOWN,this.shutdown,this)},create:function(t){Array.isArray(t)||(t=[t]);for(var e=[],i=0;i-1},existing:function(t){return this.has(t)||this.tweens.push(t.reset()),this},addCounter:function(t){var e=a(this,t);return this.tweens.push(e.reset()),e},stagger:function(t,e){return l(t,e)},setLagSmooth:function(t,e){return void 0===t&&(t=1/1e-8),void 0===e&&(e=0),this.maxLag=t,this.lagSkip=Math.min(e,this.maxLag),this},setFps:function(t){return void 0===t&&(t=240),this.gap=1e3/t,this.nextTime=1e3*this.time+this.gap,this},getDelta:function(t){var e=Date.now()-this.prevTime;e>this.maxLag&&(this.startTime+=e-this.lagSkip),this.prevTime+=e;var i=this.prevTime-this.startTime,s=i-this.nextTime,n=i-1e3*this.time;return s>0||t?(i/=1e3,this.time=i,this.nextTime+=s+(s>=this.gap?4:this.gap-s)):n=0,n},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(t){void 0===t&&(t=!1);var e=this.getDelta(t);if(!(e<=0)){var i,s;this.processing=!0;var n=[],r=this.tweens;for(i=0;i0){for(i=0;i-1&&(s.isPendingRemove()||s.isDestroyed())&&(r.splice(o,1),s.destroy())}n.length=0}this.processing=!1}},remove:function(t){return this.processing?t.setPendingRemoveState():(s(this.tweens,t),t.setRemovedState()),this},reset:function(t){return this.existing(t),t.seek(),t.setActiveState(),this},makeActive:function(t){return this.existing(t),t.setActiveState(),this},each:function(t,e){var i,s=[null];for(i=1;i{t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},21902:(t,e,i)=>{var s=i(35060),n=i(40587);t.exports=function(t,e){var i=s.Power0;if("string"==typeof t)if(s.hasOwnProperty(t))i=s[t];else{var r="";if(t.indexOf(".")){var a=(r=t.substring(t.indexOf(".")+1)).toLowerCase();"in"===a?r="easeIn":"out"===a?r="easeOut":"inout"===a&&(r="easeInOut")}t=n(t.substring(0,t.indexOf(".")+1)+r),s.hasOwnProperty(t)&&(i=s[t])}else"function"==typeof t&&(i=t);if(!e)return i;var o=e.slice(0);return o.unshift(0),function(t){return o[0]=t,i.apply(this,o)}}},4840:(t,e,i)=>{var s=i(63210),n=i(88332),r={bezier:s,catmull:n,catmullrom:n,linear:i(47614)};t.exports=function(t){if(null===t)return null;var e=r.linear;return"string"==typeof t?r.hasOwnProperty(t)&&(e=r[t]):"function"==typeof t&&(e=t),e}},28348:t=>{t.exports=function(t,e,i){var s;t.hasOwnProperty(e)?s="function"===typeof t[e]?function(i,s,n,r,a,o){return t[e](i,s,n,r,a,o)}:function(){return t[e]}:s="function"==typeof i?i:function(){return i};return s}},92407:(t,e,i)=>{var s=i(53709);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substring(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===s.indexOf(e)&&"_"!==e.substring(0,1)&&i.push({key:e,value:t[e]});return i}},65868:(t,e,i)=>{var s=i(10850);t.exports=function(t){var e=s(t,"targets",null);return null===e||("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e])),e}},9744:(t,e,i)=>{var s=i(17489),n=i(61616);function r(t){return!!t.getActive&&"function"==typeof t.getActive}function a(t){return!!t.getStart&&"function"==typeof t.getStart}function o(t){return!!t.getEnd&&"function"==typeof t.getEnd}var h=function(t,e){var i,l,u=function(t,e,i){return i},c=function(t,e,i){return i},d=null,f=typeof e;if("number"===f)u=function(){return e};else if(Array.isArray(e))c=function(){return e[0]},u=function(){return e[e.length-1]};else if("string"===f){var p=e.toLowerCase(),v="random"===p.substring(0,6),g="int"===p.substring(0,3);if(v||g){var m=p.indexOf("("),y=p.indexOf(")"),x=p.indexOf(",");if(!(m&&y&&x))throw new Error("invalid random() format");var T=parseFloat(p.substring(m+1,x)),w=parseFloat(p.substring(x+1,y));u=v?function(){return n(T,w)}:function(){return s(T,w)}}else{p=p[0];var E=parseFloat(e.substr(2));switch(p){case"+":u=function(t,e,i){return i+E};break;case"-":u=function(t,e,i){return i-E};break;case"*":u=function(t,e,i){return i*E};break;case"/":u=function(t,e,i){return i/E};break;default:u=function(){return parseFloat(e)}}}}else if("function"===f)u=e;else if("object"===f)if(a(l=e)||o(l)||r(l))r(e)&&(d=e.getActive),o(e)&&(u=e.getEnd),a(e)&&(c=e.getStart);else if(e.hasOwnProperty("value"))i=h(t,e.value);else{var S=e.hasOwnProperty("to"),b=e.hasOwnProperty("from"),A=e.hasOwnProperty("start");if(S&&(b||A)){if(i=h(t,e.to),A){var _=h(t,e.start);i.getActive=_.getEnd}if(b){var C=h(t,e.from);i.getStart=C.getEnd}}}return i||(i={getActive:d,getEnd:u,getStart:c}),i};t.exports=h},68710:(t,e,i)=>{var s=i(502),n=i(99730),r=i(20494),a=i(63130),o=i(21902),h=i(28348),l=i(10850),u=i(9744),c=i(72066),d=i(39366);t.exports=function(t,e,i){if(e instanceof d)return e.parent=t,e;i=void 0===i?n:c(n,i);var f=l(e,"from",0),p=l(e,"to",1),v=[{value:f}],g=l(e,"delay",i.delay),m=l(e,"easeParams",i.easeParams),y=l(e,"ease",i.ease),x=u("value",p),T=new d(t,v),w=T.add(0,"value",x.getEnd,x.getStart,x.getActive,o(l(e,"ease",y),l(e,"easeParams",m)),h(e,"delay",g),l(e,"duration",i.duration),a(e,"yoyo",i.yoyo),l(e,"hold",i.hold),l(e,"repeat",i.repeat),l(e,"repeatDelay",i.repeatDelay),!1,!1);w.start=f,w.current=f,T.completeDelay=r(e,"completeDelay",0),T.loop=Math.round(r(e,"loop",0)),T.loopDelay=Math.round(r(e,"loopDelay",0)),T.paused=a(e,"paused",!1),T.persist=a(e,"persist",!1),T.callbackScope=l(e,"callbackScope",T);for(var E=s.TYPES,S=0;S{var s=i(21902),n=i(10850),r=i(83392);t.exports=function(t,e){var i;void 0===e&&(e={});var a=n(e,"start",0),o=n(e,"ease",null),h=n(e,"grid",null),l=n(e,"from",0),u="first"===l,c="center"===l,d="last"===l,f="number"==typeof l,p=Array.isArray(t),v=p?parseFloat(t[0]):parseFloat(t),g=p?parseFloat(t[1]):0,m=Math.max(v,g);if(p&&(a+=v),h){var y=h[0],x=h[1],T=0,w=0,E=0,S=0,b=[];d?(T=y-1,w=x-1):f?(T=l%y,w=Math.floor(l/y)):c&&(T=(y-1)/2,w=(x-1)/2);for(var A=r.MIN_SAFE_INTEGER,_=0;_A&&(A=R),b[_][C]=R}}}var M=o?s(o):null;return i=h?function(t,e,i,s){var n,r=0,o=s%y,h=Math.floor(s/y);if(o>=0&&o=0&&h{var s=i(502),n=i(99730),r=i(20494),a=i(63130),o=i(21902),h=i(4840),l=i(28348),u=i(92407),c=i(65868),d=i(10850),f=i(9744),p=i(72066),v=i(39366);t.exports=function(t,e,i){if(e instanceof v)return e.parent=t,e;i=void 0===i?n:p(n,i);var g=c(e);!g&&i.targets&&(g=i.targets);for(var m=u(e),y=d(e,"delay",i.delay),x=d(e,"duration",i.duration),T=d(e,"easeParams",i.easeParams),w=d(e,"ease",i.ease),E=d(e,"hold",i.hold),S=d(e,"repeat",i.repeat),b=d(e,"repeatDelay",i.repeatDelay),A=a(e,"yoyo",i.yoyo),_=a(e,"flipX",i.flipX),C=a(e,"flipY",i.flipY),R=d(e,"interpolation",i.interpolation),M=function(t,e,i,s){if("texture"===i){var n=s,r=void 0;Array.isArray(s)?(n=s[0],r=s[1]):s.hasOwnProperty("value")?(n=s.value,Array.isArray(s.value)?(n=s.value[0],r=s.value[1]):"string"==typeof s.value&&(n=s.value)):"string"==typeof s&&(n=s),t.addFrame(e,n,r,l(s,"delay",y),d(s,"duration",x),d(s,"hold",E),d(s,"repeat",S),d(s,"repeatDelay",b),a(s,"flipX",_),a(s,"flipY",C))}else{var u=f(i,s),c=h(d(s,"interpolation",R));t.add(e,i,u.getEnd,u.getStart,u.getActive,o(d(s,"ease",w),d(s,"easeParams",T)),l(s,"delay",y),d(s,"duration",x),a(s,"yoyo",A),d(s,"hold",E),d(s,"repeat",S),d(s,"repeatDelay",b),a(s,"flipX",_),a(s,"flipY",C),c,c?s:null)}},P=new v(t,g),O=0;O{var s=i(502),n=i(20494),r=i(63130),a=i(65868),o=i(10850),h=i(68061),l=i(45641);t.exports=function(t,e){if(e instanceof l)return e.parent=t,e;var i,u=new l(t);u.startDelay=o(e,"delay",0),u.completeDelay=n(e,"completeDelay",0),u.loop=Math.round(n(e,"loop",o(e,"repeat",0))),u.loopDelay=Math.round(n(e,"loopDelay",o(e,"repeatDelay",0))),u.paused=r(e,"paused",!1),u.persist=r(e,"persist",!0),u.callbackScope=o(e,"callbackScope",u);var c=s.TYPES;for(i=0;i{t.exports={GetBoolean:i(63130),GetEaseFunction:i(21902),GetInterpolationFunction:i(4840),GetNewValue:i(28348),GetProps:i(92407),GetTargets:i(65868),GetValueOp:i(9744),NumberTweenBuilder:i(68710),StaggerBuilder:i(91944),TweenBuilder:i(68061)}},5570:t=>{t.exports="active"},6383:t=>{t.exports="complete"},72582:t=>{t.exports="loop"},90281:t=>{t.exports="pause"},80803:t=>{t.exports="repeat"},13640:t=>{t.exports="resume"},10472:t=>{t.exports="start"},5379:t=>{t.exports="stop"},43449:t=>{t.exports="update"},61541:t=>{t.exports="yoyo"},54272:(t,e,i)=>{t.exports={TWEEN_ACTIVE:i(5570),TWEEN_COMPLETE:i(6383),TWEEN_LOOP:i(72582),TWEEN_PAUSE:i(90281),TWEEN_RESUME:i(13640),TWEEN_REPEAT:i(80803),TWEEN_START:i(10472),TWEEN_STOP:i(5379),TWEEN_UPDATE:i(43449),TWEEN_YOYO:i(61541)}},75193:(t,e,i)=>{var s={States:i(55303),Builders:i(79619),Events:i(54272),TweenManager:i(64532),Tween:i(39366),TweenData:i(15718),TweenFrameData:i(96490),BaseTween:i(502),TweenChain:i(45641)};t.exports=s},502:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(54272),a=i(55303),o=new s({Extends:n,initialize:function(t){n.call(this),this.parent=t,this.data=[],this.totalData=0,this.startDelay=0,this.hasStarted=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=a.PENDING,this.paused=!1,this.callbacks={onActive:null,onComplete:null,onLoop:null,onPause:null,onRepeat:null,onResume:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope,this.persist=!1},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return!this.paused&&this.isActive()},isPaused:function(){return this.paused},pause:function(){return this.paused||(this.paused=!0,this.dispatchEvent(r.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(r.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(r.TWEEN_COMPLETE,"onComplete")},complete:function(t){return void 0===t&&(t=0),t?(this.setCompleteDelayState(),this.countdown=t):this.onCompleteHandler(),this},completeAfterLoop:function(t){return void 0===t&&(t=0),this.loopCounter>t&&(this.loopCounter=t),this},remove:function(){return this.parent.remove(this),this},stop:function(){return this.isRemoved()||this.isPendingRemove()||this.isDestroyed()||(this.dispatchEvent(r.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(t){this.countdown-=t,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(r.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(t){return this.countdown-=t,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(r.TWEEN_START,"onStart"),t=0),t},updateCompleteDelay:function(t){this.countdown-=t,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(t,e,i){return void 0===i&&(i=[]),this.callbacks.hasOwnProperty(t)&&(this.callbacks[t]={func:e,params:i}),this},setPendingState:function(){this.state=a.PENDING},setActiveState:function(){this.state=a.ACTIVE},setLoopDelayState:function(){this.state=a.LOOP_DELAY},setCompleteDelayState:function(){this.state=a.COMPLETE_DELAY},setStartDelayState:function(){this.state=a.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=a.PENDING_REMOVE},setRemovedState:function(){this.state=a.REMOVED},setFinishedState:function(){this.state=a.FINISHED},setDestroyedState:function(){this.state=a.DESTROYED},isPending:function(){return this.state===a.PENDING},isActive:function(){return this.state===a.ACTIVE},isLoopDelayed:function(){return this.state===a.LOOP_DELAY},isCompleteDelayed:function(){return this.state===a.COMPLETE_DELAY},isStartDelayed:function(){return this.state===a.START_DELAY},isPendingRemove:function(){return this.state===a.PENDING_REMOVE},isRemoved:function(){return this.state===a.REMOVED},isFinished:function(){return this.state===a.FINISHED},isDestroyed:function(){return this.state===a.DESTROYED},destroy:function(){this.data&&this.data.forEach((function(t){t.destroy()})),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});o.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],t.exports=o},65521:(t,e,i)=>{var s=i(56694),n=i(54272),r=i(55303),a=new s({initialize:function(t,e,i,s,n,r,a,o,h,l){this.tween=t,this.targetIndex=e,this.duration=s,this.totalDuration=0,this.delay=0,this.getDelay=i,this.yoyo=n,this.hold=r,this.repeat=a,this.repeatDelay=o,this.repeatCounter=0,this.flipX=h,this.flipY=l,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(t){void 0===t&&(t=this.current),this.tween.targets[this.targetIndex][this.key]=t},setCreatedState:function(){this.state=r.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=r.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=r.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=r.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=r.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=r.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=r.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=r.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===r.CREATED},isDelayed:function(){return this.state===r.DELAY},isPendingRender:function(){return this.state===r.PENDING_RENDER},isPlayingForward:function(){return this.state===r.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===r.PLAYING_BACKWARD},isHolding:function(){return this.state===r.HOLD_DELAY},isRepeating:function(){return this.state===r.REPEAT_DELAY},isComplete:function(){return this.state===r.COMPLETE},setStateFromEnd:function(t){this.yoyo?this.onRepeat(t,!0,!0):this.repeatCounter>0?this.onRepeat(t,!0,!1):this.setCompleteState()},setStateFromStart:function(t){this.repeatCounter>0?this.onRepeat(t,!1):this.setCompleteState()},reset:function(){var t=this.tween,e=t.totalTargets,i=this.targetIndex,s=t.targets[i],n=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(s,n,0,i,e,t),this.repeatCounter=-1===this.repeat?r.MAX:this.repeat,this.setPendingRenderState();var a=this.duration+this.hold;this.yoyo&&(a+=this.duration);var o=a+this.repeatDelay;this.totalDuration=this.delay+a,-1===this.repeat?(this.totalDuration+=o*r.MAX,t.isInfinite=!0):this.repeat>0&&(this.totalDuration+=o*this.repeat),this.totalDuration>t.duration&&(t.duration=this.totalDuration),this.delay0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(t,e,i){var s=this.tween,r=s.totalTargets,a=this.targetIndex,o=s.targets[a],h=this.key,l="texture"!==h;if(this.elapsed=t,this.progress=t/this.duration,this.flipX&&o.toggleFlipX(),this.flipY&&o.toggleFlipY(),l&&(e||i)&&(this.start=this.getStartValue(o,h,this.start,a,r,s)),i)return this.setPlayingBackwardState(),void this.dispatchEvent(n.TWEEN_YOYO,"onYoyo");this.repeatCounter--,l&&(this.end=this.getEndValue(o,h,this.start,a,r,s)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-t,l&&(this.current=this.start,o[h]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(n.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});t.exports=a},99730:t=>{t.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1,persist:!1,interpolation:null}},53709:t=>{t.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","interpolation","loop","loopDelay","onActive","onActiveParams","onComplete","onCompleteParams","onLoop","onLoopParams","onPause","onPauseParams","onRepeat","onRepeatParams","onResume","onResumeParams","onStart","onStartParams","onStop","onStopParams","onUpdate","onUpdateParams","onYoyo","onYoyoParams","paused","persist","props","repeat","repeatDelay","targets","yoyo"]},39366:(t,e,i)=>{var s=i(502),n=i(56694),r=i(54272),a=i(99325),o=i(61286),h=i(83392),l=i(55303),u=i(15718),c=i(96490),d=new n({Extends:s,initialize:function(t,e){s.call(this,t),this.targets=e,this.totalTargets=e.length,this.isSeeking=!1,this.isInfinite=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0},add:function(t,e,i,s,n,r,a,o,h,l,c,d,f,p,v,g){var m=new u(this,t,e,i,s,n,r,a,o,h,l,c,d,f,p,v,g);return this.totalData=this.data.push(m),m},addFrame:function(t,e,i,s,n,r,a,o,h,l){var u=new c(this,t,e,i,s,n,r,a,o,h,l);return this.totalData=this.data.push(u),u},getValue:function(t){void 0===t&&(t=0);var e=null;return this.data&&(e=this.data[t].current),e},hasTarget:function(t){return this.targets&&-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){if(void 0===i&&(i=!1),"texture"!==t)for(var s=0;s0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(r.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,s.prototype.onCompleteHandler.call(this)},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed Tween",this),this):((this.isPendingRemove()||this.isFinished())&&this.seek(),this.paused=!1,this.setActiveState(),this)},seek:function(t,e,i){if(void 0===t&&(t=0),void 0===e&&(e=16.6),void 0===i&&(i=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;i||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive");var s=this.paused;if(this.paused=!1,t>0){for(var n=Math.floor(t/e),a=t-n*e,o=0;o0&&this.update(a)}return this.paused=s,this.isSeeking=!1,this},initTweenData:function(t){void 0===t&&(t=!1),this.duration=0,this.startDelay=h.MAX_SAFE_INTEGER;for(var e=this.data,i=0;i0?s+n+(s+a)*r:s+n},reset:function(t){return void 0===t&&(t=!1),this.elapsed=0,this.totalElapsed=0,this.progress=0,this.totalProgress=0,this.loopCounter=this.loop,-1===this.loop&&(this.isInfinite=!0,this.loopCounter=l.MAX),t||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive")),this},update:function(t){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(t*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(t),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(t),!1;this.hasStarted||(this.startDelay-=t,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(r.TWEEN_START,"onStart"),t=0));var e=!1;if(this.isActive())for(var i=this.data,s=0;s{var s=i(66458),n=i(502),r=i(56694),a=i(54272),o=i(99325),h=i(61286),l=i(55303),u=new r({Extends:n,initialize:function(t){n.call(this,t),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=-1===this.loop?l.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this.dispatchEvent(a.TWEEN_ACTIVE,"onActive"),this},add:function(t){var e=this.parent.create(t);Array.isArray(e)||(e=[e]);for(var i=this.data,s=0;s0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(a.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed TweenChain",this),this):((this.isPendingRemove()||this.isPending())&&this.resetTweens(),this.paused=!1,this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this)},resetTweens:function(){for(var t=this.data,e=this.totalData,i=0;i{var s=i(65521),n=i(82897),r=i(56694),a=i(54272),o=new r({Extends:s,initialize:function(t,e,i,n,r,a,o,h,l,u,c,d,f,p,v,g,m){s.call(this,t,e,h,l,u,c,d,f,p,v),this.key=i,this.getActiveValue=a,this.getEndValue=n,this.getStartValue=r,this.ease=o,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=g,this.interpolationData=m},reset:function(t){s.prototype.reset.call(this);var e=this.tween.targets[this.targetIndex],i=this.key;t&&(e[i]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(e[i]=this.getActiveValue(e,i,0))},update:function(t){var e=this.tween,i=e.totalTargets,s=this.targetIndex,r=e.targets[s],o=this.key;if(!r)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=t,this.elapsed<=0&&(this.elapsed=0,t=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(a.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(r,o,r[o],s,i,e),this.end=this.getEndValue(r,o,this.start,s,i,e),this.current=this.start,r[o]=this.start,this.setPlayingForwardState(),!0;var h=this.isPlayingForward(),l=this.isPlayingBackward();if(h||l){var u=this.elapsed,c=this.duration,d=0,f=!1;(u+=t)>=c?(d=u-c,u=c,f=!0):u<0&&(u=0);var p=n(u/c,0,1);if(this.elapsed=u,this.progress=p,this.previous=this.current,f)h?(this.current=this.end,r[o]=this.end,this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(d)):(this.current=this.start,r[o]=this.start,this.setStateFromStart(d));else{h||(p=1-p);var v=this.ease(p);this.interpolation?this.current=this.interpolation(this.interpolationData,v):this.current=this.start+(this.end-this.start)*v,r[o]=this.current}this.dispatchEvent(a.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(t,e){var i=this.tween;if(!i.isSeeking){var s=i.targets[this.targetIndex],n=this.key,r=this.current,a=this.previous;i.emit(t,i,n,s,r,a);var o=i.callbacks[e];o&&o.func.apply(i.callbackScope,[i,s,n,r,a].concat(o.params))}},destroy:function(){s.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});t.exports=o},96490:(t,e,i)=>{var s=i(65521),n=i(82897),r=i(56694),a=i(54272),o=new r({Extends:s,initialize:function(t,e,i,n,r,a,o,h,l,u,c){s.call(this,t,e,r,a,!1,o,h,l,u,c),this.key="texture",this.startTexture=null,this.endTexture=i,this.startFrame=null,this.endFrame=n,this.yoyo=0!==h},reset:function(t){s.prototype.reset.call(this);var e=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=e.texture.key,this.startFrame=e.frame.name),t&&e.setTexture(this.startTexture,this.startFrame)},update:function(t){var e=this.tween,i=this.targetIndex,s=e.targets[i];if(!s)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=t,this.elapsed<=0&&(this.elapsed=0,t=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(a.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&s.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var r=this.isPlayingForward(),o=this.isPlayingBackward();if(r||o){var h=this.elapsed,l=this.duration,u=0,c=!1;(h+=t)>=l?(u=h-l,h=l,c=!0):h<0&&(h=0);var d=n(h/l,0,1);this.elapsed=h,this.progress=d,c&&(r?(s.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(u)):(s.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(u))),this.dispatchEvent(a.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(t,e){var i=this.tween;if(!i.isSeeking){var s=i.targets[this.targetIndex],n=this.key;i.emit(t,i,n,s);var r=i.callbacks[e];r&&r.func.apply(i.callbackScope,[i,s,n].concat(r.params))}},destroy:function(){s.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});t.exports=o},55303:t=>{t.exports={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999}},56694:t=>{function e(t,e,i){var s=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&s.value&&"object"==typeof s.value&&(s=s.value),!(!s||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(s))&&(void 0===s.enumerable&&(s.enumerable=!0),void 0===s.configurable&&(s.configurable=!0),s)}function i(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,s,n,a){for(var o in s)if(s.hasOwnProperty(o)){var h=e(s,o,n);if(!1!==h){if(i((a||t).prototype,o)){if(r.ignoreFinals)continue;throw new Error("cannot override final property '"+o+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,o,h)}else t.prototype[o]=s[o]}}function n(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i{t.exports=function(){}},10618:t=>{t.exports=function(){return null}},78991:t=>{t.exports=function(t,e,i,s,n){if(void 0===n&&(n=t),i>0){var r=i-t.length;if(r<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),s&&s.call(n,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.splice(a,1),a--;if(0===(a=e.length))return null;i>0&&a>r&&(e.splice(r),a=r);for(var o=0;o{t.exports=function(t,e,i,s,n,r){if(void 0===i&&(i=0),void 0===r&&(r=t),s>0){var a=s-t.length;if(a<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),n&&n.call(r,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.pop(),o--;if(0===(o=e.length))return null;s>0&&o>a&&(e.splice(a),o=a);for(var h=o-1;h>=0;h--){var l=e[h];t.splice(i,0,l),n&&n.call(r,l)}return e}},58742:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i{var s=i(45838);t.exports=function(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);var a=0;if(s(t,n,r))for(var o=n;o{t.exports=function(t,e,i){var s,n=[null];for(s=3;s{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r)){var a,o=[null];for(a=5;a{t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var s,n,r=1;if(i){if(te.length&&(r=e.length),i?(s=e[r-1][i],(n=e[r][i])-t<=t-s?e[r]:e[r-1]):(s=e[r-1],(n=e[r])-t<=t-s?n:s)}},5454:t=>{var e=function(t,i){void 0===i&&(i=[]);for(var s=0;s{var s=i(45838);t.exports=function(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);var a=[];if(s(t,n,r))for(var o=n;o{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r))for(var a=n;a{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var s=e+Math.floor(Math.random()*i);return void 0===t[s]?null:t[s]}},24218:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),n=t.indexOf(i);if(s<0||n<0)throw new Error("Supplied items must be elements of the same array");return s>n||(t.splice(s,1),n===t.length-1?t.push(e):t.splice(n,0,e)),t}},58258:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),n=t.indexOf(i);if(s<0||n<0)throw new Error("Supplied items must be elements of the same array");return s{t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var s=t[i-1],n=t.indexOf(s);t[i]=s,t[n]=e}return t}},68396:t=>{t.exports=function(t,e,i){var s=t.indexOf(e);if(-1===s||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return s!==i&&(t.splice(s,1),t.splice(i,0,e)),e}},27555:t=>{t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i{t.exports=function(t,e,i,s){var n,r=[],a=!1;if((i||s)&&(a=!0,i||(i=""),s||(s="")),e=e;n--)a?r.push(i+n.toString()+s):r.push(n);else for(n=t;n<=e;n++)a?r.push(i+n.toString()+s):r.push(n);return r}},89955:(t,e,i)=>{var s=i(67233);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var n=[],r=Math.max(s((e-t)/(i||1)),0),a=0;a{function e(t,e,i){var s=t[e];t[e]=t[i],t[i]=s}function i(t,e){return te?1:0}var s=function(t,n,r,a,o){for(void 0===r&&(r=0),void 0===a&&(a=t.length-1),void 0===o&&(o=i);a>r;){if(a-r>600){var h=a-r+1,l=n-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(r,Math.floor(n-l*c/h+d)),p=Math.min(a,Math.floor(n+(h-l)*c/h+d));s(t,n,f,p,o)}var v=t[n],g=r,m=a;for(e(t,r,n),o(t[a],v)>0&&e(t,r,a);g0;)m--}0===o(t[r],v)?e(t,r,m):e(t,++m,a),m<=n&&(r=m+1),n<=m&&(a=m-1)}};t.exports=s},75757:(t,e,i)=>{var s=i(10850),n=i(18592),r=function(t,e,i){for(var s=[],n=0;n{var s=i(72677);t.exports=function(t,e,i,n){var r;if(void 0===n&&(n=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(s(t,r),i&&i.call(n,e),e):null;for(var a=e.length-1,o=[];a>=0;){var h=e[a];-1!==(r=t.indexOf(h))&&(s(t,r),o.push(h),i&&i.call(n,h)),a--}return o}},8324:(t,e,i)=>{var s=i(72677);t.exports=function(t,e,i,n){if(void 0===n&&(n=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var r=s(t,e);return i&&i.call(n,r),r}},47427:(t,e,i)=>{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),s(t,e,i)){var a=i-e,o=t.splice(e,a);if(n)for(var h=0;h{var s=i(72677);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var n=e+Math.floor(Math.random()*i);return s(t,n)}},80402:t=>{t.exports=function(t,e,i){var s=t.indexOf(e),n=t.indexOf(i);return-1!==s&&-1===n&&(t[s]=i,!0)}},77640:t=>{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e,i,s){var n=t.length;if(e<0||e>n||e>=i||i>n){if(s)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},27847:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},6034:(t,e,i)=>{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r))for(var a=n;a{t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[i],t[i]=s}return t}},28834:t=>{t.exports=function(t){var e=/\D/g;return t.sort((function(t,i){return parseInt(t.replace(e,""),10)-parseInt(i.replace(e,""),10)})),t}},72677:t=>{t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,s=t[e],n=e;n{var s=i(77290);function n(t,e){return String(t).localeCompare(e)}function r(t,e,i,s){var n,r,a,o,h,l=t.length,u=0,c=2*i;for(n=0;nl&&(r=l),a>l&&(a=l),o=n,h=r;;)if(o{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),n=t.indexOf(i);if(s<0||n<0)throw new Error("Supplied items must be elements of the same array");return t[s]=i,t[n]=e,t}},59959:(t,e,i)=>{t.exports={Matrix:i(13515),Add:i(78991),AddAt:i(48522),BringToTop:i(58742),CountAllMatching:i(30164),Each:i(36337),EachInRange:i(46208),FindClosestInSorted:i(2406),Flatten:i(5454),GetAll:i(71608),GetFirst:i(51463),GetRandom:i(72861),MoveDown:i(51172),MoveTo:i(68396),MoveUp:i(27555),MoveAbove:i(24218),MoveBelow:i(58258),NumberArray:i(13401),NumberArrayStep:i(89955),QuickSelect:i(53466),Range:i(75757),Remove:i(66458),RemoveAt:i(8324),RemoveBetween:i(47427),RemoveRandomElement:i(50147),Replace:i(80402),RotateLeft:i(77640),RotateRight:i(38487),SafeRange:i(45838),SendToBack:i(27847),SetAll:i(6034),Shuffle:i(18592),SortByDigits:i(28834),SpliceOne:i(72677),StableSort:i(17922),Swap:i(96928)}},97494:t=>{t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i{var s=i(76400),n=i(97494);t.exports=function(t){var e="";if(!n(t))return e;for(var i=0;i{t.exports=function(t){return t.reverse()}},51995:t=>{t.exports=function(t){for(var e=0;e{var s=i(63515);t.exports=function(t){return s(t,180)}},42549:(t,e,i)=>{var s=i(63515);t.exports=function(t){return s(t,90)}},63515:(t,e,i)=>{var s=i(97494),n=i(78581);t.exports=function(t,e){if(void 0===e&&(e=90),!s(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=n(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=n(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i{var s=i(63515);t.exports=function(t){return s(t,-90)}},27365:(t,e,i)=>{var s=i(77640),n=i(38487);t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?s(t,Math.abs(i)):n(t,i)),0!==e)for(var r=0;r{t.exports=function(t){for(var e=t.length,i=t[0].length,s=new Array(i),n=0;n-1;r--)s[n][r]=t[r][n]}return s}},13515:(t,e,i)=>{t.exports={CheckMatrix:i(97494),MatrixToString:i(68428),ReverseColumns:i(59521),ReverseRows:i(51995),Rotate180:i(89011),RotateLeft:i(42549),RotateMatrix:i(63515),RotateRight:i(14305),Translate:i(27365),TransposeMatrix:i(78581)}},40581:t=>{var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";t.exports=function(t,i){for(var s=new Uint8Array(t),n=s.length,r=i?"data:"+i+";base64,":"",a=0;a>2],r+=e[(3&s[a])<<4|s[a+1]>>4],r+=e[(15&s[a+1])<<2|s[a+2]>>6],r+=e[63&s[a+2]];return n%3==2?r=r.substring(0,r.length-1)+"=":n%3==1&&(r=r.substring(0,r.length-2)+"=="),r}},82329:t=>{for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(256),s=0;s>4,u[h++]=(15&s)<<4|n>>2,u[h++]=(3&n)<<6|63&r;return l}},78417:(t,e,i)=>{t.exports={ArrayBufferToBase64:i(40581),Base64ToArrayBuffer:i(82329)}},22178:(t,e,i)=>{t.exports={Array:i(59959),Base64:i(78417),Objects:i(64615),String:i(50379),NOOP:i(72283),NULL:i(10618)}},32742:t=>{t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},28699:t=>{var e=function(t){var i,s,n;if("object"!=typeof t||null===t)return t;for(n in i=Array.isArray(t)?[]:{},t)s=t[n],i[n]=e(s);return i};t.exports=e},98611:(t,e,i)=>{var s=i(42911),n=function(){var t,e,i,r,a,o,h=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},l=2),u===l&&(h=this,--l);l{var s=i(5923),n=i(10850);t.exports=function(t,e,i){var r=n(t,e,null);if(null===r)return i;if(Array.isArray(r))return s.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return s.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return s.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},72632:t=>{t.exports=function(t,e,i){var s=typeof t;return t&&"number"!==s&&"string"!==s&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},94324:(t,e,i)=>{var s=i(10850),n=i(82897);t.exports=function(t,e,i,r,a){void 0===a&&(a=i);var o=s(t,e,a);return n(o,i,r)}},10850:t=>{t.exports=function(t,e,i,s){if(!t&&!s||"number"==typeof t)return i;if(t&&t.hasOwnProperty(e))return t[e];if(s&&s.hasOwnProperty(e))return s[e];if(-1!==e.indexOf(".")){for(var n=e.split("."),r=t,a=s,o=i,h=i,l=!0,u=!0,c=0;c{t.exports=function(t,e){for(var i=0;i{t.exports=function(t,e){for(var i=0;i{t.exports=function(t,e){return t.hasOwnProperty(e)}},42911:t=>{t.exports=function(t){if(!t||"object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},30657:(t,e,i)=>{var s=i(32742);t.exports=function(t,e){var i=s(t);for(var n in e)i.hasOwnProperty(n)||(i[n]=e[n]);return i}},72066:(t,e,i)=>{var s=i(32742);t.exports=function(t,e){var i=s(t);for(var n in e)i.hasOwnProperty(n)&&(i[n]=e[n]);return i}},28820:(t,e,i)=>{var s=i(19256);t.exports=function(t,e){for(var i={},n=0;n{t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))return t[e]=i,!0;if(-1!==e.indexOf(".")){for(var s=e.split("."),n=t,r=t,a=0;a{t.exports={Clone:i(32742),DeepCopy:i(28699),Extend:i(98611),GetAdvancedValue:i(20494),GetFastValue:i(72632),GetMinMaxValue:i(94324),GetValue:i(10850),HasAll:i(87701),HasAny:i(53523),HasValue:i(19256),IsPlainObject:i(42911),Merge:i(30657),MergeRight:i(72066),Pick:i(28820),SetValue:i(22440)}},69429:t=>{t.exports=function(t,e){return t.replace(/%([0-9]+)/g,(function(t,i){return e[Number(i)-1]}))}},76400:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===s&&(s=3);var n=0;if(e+1>=(t=t.toString()).length)switch(s){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((n=e-t.length)/2);t=new Array(n-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},76872:t=>{t.exports=function(t,e){return 0===e?t.slice(1):t.slice(0,e-1)+t.slice(e)}},8051:t=>{t.exports=function(t){return t.split("").reverse().join("")}},76583:t=>{t.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}},40587:t=>{t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},50379:(t,e,i)=>{t.exports={Format:i(69429),Pad:i(76400),RemoveAt:i(76872),Reverse:i(8051),UppercaseFirst:i(40587),UUID:i(76583)}}},e={};function i(s){var n=e[s];if(void 0!==n)return n.exports;var r=e[s]={exports:{}};return t[s](r,r.exports,i),r.exports}return i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i(85780)})())); \ No newline at end of file diff --git a/dist/phaser-ie9.js b/dist/phaser-ie9.js index 68b453b7e3..f0a5a2dc3b 100644 --- a/dist/phaser-ie9.js +++ b/dist/phaser-ie9.js @@ -360,7 +360,7 @@ if (true) { /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -409,7 +409,7 @@ module.exports = AlignTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -451,7 +451,7 @@ module.exports = Angle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -491,7 +491,7 @@ module.exports = Call; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -550,7 +550,7 @@ module.exports = GetFirst; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -609,7 +609,7 @@ module.exports = GetLast; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -729,7 +729,7 @@ module.exports = GridAlign; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -771,7 +771,7 @@ module.exports = IncAlpha; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -813,7 +813,7 @@ module.exports = IncX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -861,7 +861,7 @@ module.exports = IncXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -903,7 +903,7 @@ module.exports = IncY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -957,7 +957,7 @@ module.exports = PlaceOnCircle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1010,7 +1010,7 @@ module.exports = PlaceOnEllipse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1055,7 +1055,7 @@ module.exports = PlaceOnLine; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1114,7 +1114,7 @@ module.exports = PlaceOnRectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1176,7 +1176,7 @@ module.exports = PlaceOnTriangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1221,7 +1221,7 @@ module.exports = PlayAnimation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1289,7 +1289,7 @@ module.exports = PropertyValueInc; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1357,7 +1357,7 @@ module.exports = PropertyValueSet; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1398,7 +1398,7 @@ module.exports = RandomCircle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1439,7 +1439,7 @@ module.exports = RandomEllipse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1480,7 +1480,7 @@ module.exports = RandomLine; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1519,7 +1519,7 @@ module.exports = RandomRectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1560,7 +1560,7 @@ module.exports = RandomTriangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1602,7 +1602,7 @@ module.exports = Rotate; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1649,7 +1649,7 @@ module.exports = RotateAround; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1699,7 +1699,7 @@ module.exports = RotateAroundDistance; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1741,7 +1741,7 @@ module.exports = ScaleX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1789,7 +1789,7 @@ module.exports = ScaleXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1831,7 +1831,7 @@ module.exports = ScaleY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1873,7 +1873,7 @@ module.exports = SetAlpha; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1914,7 +1914,7 @@ module.exports = SetBlendMode; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1956,7 +1956,7 @@ module.exports = SetDepth; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1996,7 +1996,7 @@ module.exports = SetHitArea; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2050,7 +2050,7 @@ module.exports = SetOrigin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2092,7 +2092,7 @@ module.exports = SetRotation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2140,7 +2140,7 @@ module.exports = SetScale; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2182,7 +2182,7 @@ module.exports = SetScaleX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2224,7 +2224,7 @@ module.exports = SetScaleY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2272,7 +2272,7 @@ module.exports = SetScrollFactor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2314,7 +2314,7 @@ module.exports = SetScrollFactorX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2356,7 +2356,7 @@ module.exports = SetScrollFactorY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2396,7 +2396,7 @@ module.exports = SetTint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2435,7 +2435,7 @@ module.exports = SetVisible; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2477,7 +2477,7 @@ module.exports = SetX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2525,7 +2525,7 @@ module.exports = SetXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2567,7 +2567,7 @@ module.exports = SetY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2693,7 +2693,7 @@ module.exports = ShiftPosition; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2727,7 +2727,7 @@ module.exports = Shuffle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2786,7 +2786,7 @@ module.exports = SmoothStep; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2845,7 +2845,7 @@ module.exports = SmootherStep; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2923,7 +2923,7 @@ module.exports = Spread; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2961,7 +2961,7 @@ module.exports = ToggleVisible; /** * @author Richard Davey * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3012,7 +3012,7 @@ module.exports = WrapInRectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3086,7 +3086,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4016,7 +4016,7 @@ module.exports = Animation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4204,7 +4204,7 @@ module.exports = AnimationFrame; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4216,8 +4216,9 @@ var Events = __webpack_require__(16938); var GameEvents = __webpack_require__(97081); var GetFastValue = __webpack_require__(72632); var GetValue = __webpack_require__(10850); -var Pad = __webpack_require__(76400); +var MATH_CONST = __webpack_require__(83392); var NumberArray = __webpack_require__(13401); +var Pad = __webpack_require__(76400); /** * @classdesc @@ -4646,7 +4647,7 @@ var AnimationManager = new Class({ if (frame) { - var frameDuration = GetFastValue(frame, 'duration', Number.MAX_SAFE_INTEGER); + var frameDuration = GetFastValue(frame, 'duration', MATH_CONST.MAX_SAFE_INTEGER); animFrames.push({ key: key, frame: frameKey, duration: frameDuration }); totalDuration += frameDuration; } @@ -4994,6 +4995,46 @@ var AnimationManager = new Class({ return this.anims.get(key); }, + /** + * Returns an array of all Animation keys that are using the given + * Texture. Only Animations that have at least one AnimationFrame + * entry using this texture will be included in the result. + * + * @method Phaser.Animations.AnimationManager#getAnimsFromTexture + * @since 3.60.0 + * + * @param {(string|Phaser.Textures.Texture|Phaser.Textures.Frame)} key - The unique string-based key of the Texture, or a Texture, or Frame instance. + * + * @return {string[]} An array of Animation keys that feature the given Texture. + */ + getAnimsFromTexture: function (key) + { + var texture = this.textureManager.get(key); + + var match = texture.key; + var anims = this.anims.getArray(); + + var out = []; + + for (var i = 0; i < anims.length; i++) + { + var anim = anims[i]; + var frames = anim.frames; + + for (var c = 0; c < frames.length; c++) + { + if (frames[c].textureKey === match) + { + out.push(anim.key); + + break; + } + } + } + + return out; + }, + /** * Pause all animations. * @@ -5220,7 +5261,7 @@ module.exports = AnimationManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7210,7 +7251,7 @@ module.exports = AnimationState; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7239,7 +7280,7 @@ module.exports = 'add'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7287,7 +7328,7 @@ module.exports = 'animationcomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7339,7 +7380,7 @@ module.exports = 'animationcomplete-'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7384,7 +7425,7 @@ module.exports = 'animationrepeat'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7427,7 +7468,7 @@ module.exports = 'animationrestart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7471,7 +7512,7 @@ module.exports = 'animationstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7515,7 +7556,7 @@ module.exports = 'animationstop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7563,7 +7604,7 @@ module.exports = 'animationupdate'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7589,7 +7630,7 @@ module.exports = 'pauseall'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7615,7 +7656,7 @@ module.exports = 'remove'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7640,7 +7681,7 @@ module.exports = 'resumeall'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7672,7 +7713,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7698,7 +7739,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7885,7 +7926,7 @@ module.exports = BaseCache; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8120,7 +8161,7 @@ module.exports = CacheManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8147,7 +8188,7 @@ module.exports = 'add'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8174,7 +8215,7 @@ module.exports = 'remove'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8197,7 +8238,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8221,7 +8262,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10237,7 +10278,7 @@ module.exports = BaseCamera; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11056,7 +11097,7 @@ module.exports = Camera; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11832,7 +11873,7 @@ module.exports = CameraManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12221,7 +12262,7 @@ module.exports = Fade; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12584,7 +12625,7 @@ module.exports = Flash; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13344,7 +13385,7 @@ module.exports = RotateTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13664,7 +13705,7 @@ module.exports = Shake; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13958,7 +13999,7 @@ module.exports = Zoom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13985,7 +14026,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14010,7 +14051,7 @@ module.exports = 'cameradestroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14038,7 +14079,7 @@ module.exports = 'camerafadeincomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14070,7 +14111,7 @@ module.exports = 'camerafadeinstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14098,7 +14139,7 @@ module.exports = 'camerafadeoutcomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14130,7 +14171,7 @@ module.exports = 'camerafadeoutstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14156,7 +14197,7 @@ module.exports = 'cameraflashcomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14186,7 +14227,7 @@ module.exports = 'cameraflashstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14216,7 +14257,7 @@ module.exports = 'followupdate'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14242,7 +14283,7 @@ module.exports = 'camerapancomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14271,7 +14312,7 @@ module.exports = 'camerapanstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14299,7 +14340,7 @@ module.exports = 'postrender'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14327,7 +14368,7 @@ module.exports = 'prerender'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14353,7 +14394,7 @@ module.exports = 'camerarotatecomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14381,7 +14422,7 @@ module.exports = 'camerarotatestart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14407,7 +14448,7 @@ module.exports = 'camerashakecomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14435,7 +14476,7 @@ module.exports = 'camerashakestart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14461,7 +14502,7 @@ module.exports = 'camerazoomcomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14489,7 +14530,7 @@ module.exports = 'camerazoomstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14528,7 +14569,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14554,7 +14595,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14886,7 +14927,7 @@ module.exports = FixedKeyControl; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15394,7 +15435,7 @@ module.exports = SmoothedKeyControl; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15417,7 +15458,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15444,7 +15485,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15464,7 +15505,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.60.0-beta.17', + VERSION: '3.60.0-beta.18', BlendModes: __webpack_require__(95723), @@ -15589,7 +15630,7 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16219,7 +16260,7 @@ module.exports = Config; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16348,7 +16389,7 @@ module.exports = CreateRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16479,7 +16520,7 @@ module.exports = DebugHeader; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16664,13 +16705,15 @@ var Game = new Class({ this.cache = new CacheManager(this); /** - * An instance of the Data Manager + * An instance of the Data Manager. This is a global manager, available from any Scene + * and allows you to share and exchange your own game-level data or events without having + * to use an internal event system. * * @name Phaser.Game#registry * @type {Phaser.Data.DataManager} * @since 3.0.0 */ - this.registry = new DataManager(this); + this.registry = new DataManager(this, new EventEmitter()); /** * An instance of the Input Manager. @@ -17221,7 +17264,7 @@ module.exports = Game; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18100,7 +18143,7 @@ module.exports = TimeStep; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18192,7 +18235,7 @@ module.exports = VisibilityHandler; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18217,7 +18260,7 @@ module.exports = 'blur'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18241,7 +18284,7 @@ module.exports = 'boot'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18266,7 +18309,7 @@ module.exports = 'contextlost'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18291,7 +18334,7 @@ module.exports = 'destroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18315,7 +18358,7 @@ module.exports = 'focus'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18343,7 +18386,7 @@ module.exports = 'hidden'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18366,7 +18409,7 @@ module.exports = 'pause'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18394,7 +18437,7 @@ module.exports = 'postrender'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18421,7 +18464,7 @@ module.exports = 'poststep'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18448,7 +18491,7 @@ module.exports = 'prerender'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18475,7 +18518,7 @@ module.exports = 'prestep'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18499,7 +18542,7 @@ module.exports = 'ready'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18522,7 +18565,7 @@ module.exports = 'resume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18549,7 +18592,7 @@ module.exports = 'step'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18575,7 +18618,7 @@ module.exports = 'visible'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18611,7 +18654,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18638,7 +18681,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18761,7 +18804,7 @@ module.exports = GenerateTexture; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18784,7 +18827,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18823,7 +18866,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18862,7 +18905,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18901,7 +18944,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18940,7 +18983,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18979,7 +19022,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19005,7 +19048,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19233,7 +19276,7 @@ module.exports = CubicBezierCurve; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19851,7 +19894,7 @@ module.exports = Curve; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -20476,7 +20519,7 @@ module.exports = EllipseCurve; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -20783,7 +20826,7 @@ module.exports = LineCurve; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21001,7 +21044,7 @@ module.exports = QuadraticBezier; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21227,7 +21270,7 @@ module.exports = SplineCurve; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21255,7 +21298,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21395,7 +21438,7 @@ module.exports = MoveTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22314,7 +22357,7 @@ module.exports = Path; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23031,7 +23074,7 @@ module.exports = DataManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23159,7 +23202,7 @@ module.exports = DataManagerPlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23193,7 +23236,7 @@ module.exports = 'changedata'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23225,7 +23268,7 @@ module.exports = 'changedata-'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23248,7 +23291,7 @@ module.exports = 'destroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23278,7 +23321,7 @@ module.exports = 'removedata'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23308,7 +23351,7 @@ module.exports = 'setdata'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23334,7 +23377,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23358,7 +23401,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23485,7 +23528,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23539,11 +23582,16 @@ function init () { var ua = navigator.userAgent; - if ((/Edge\/\d+/).test(ua)) + if ((/Edg\/\d+/).test(ua)) { Browser.edge = true; Browser.es2019 = true; } + else if ((/OPR/).test(ua)) + { + Browser.opera = true; + Browser.es2019 = true; + } else if ((/Chrome\/(\d+)/).test(ua) && !OS.windowsPhone) { Browser.chrome = true; @@ -23565,11 +23613,6 @@ function init () Browser.ie = true; Browser.ieVersion = parseInt(RegExp.$1, 10); } - else if ((/Opera/).test(ua)) - { - Browser.opera = true; - Browser.es2019 = true; - } else if ((/Version\/(\d+\.\d+) Safari/).test(ua) && !OS.windowsPhone) { Browser.safari = true; @@ -23603,7 +23646,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23722,7 +23765,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23922,7 +23965,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24032,7 +24075,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24113,7 +24156,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24306,7 +24349,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24407,7 +24450,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24455,7 +24498,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25106,7 +25149,7 @@ module.exports = ColorMatrix; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25327,7 +25370,7 @@ module.exports = RGB; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25462,7 +25505,7 @@ module.exports = ALIGN_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25507,7 +25550,7 @@ module.exports = BottomCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25552,7 +25595,7 @@ module.exports = BottomLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25597,7 +25640,7 @@ module.exports = BottomRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25640,7 +25683,7 @@ module.exports = Center; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25685,7 +25728,7 @@ module.exports = LeftCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25739,7 +25782,7 @@ module.exports = QuickSet; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25784,7 +25827,7 @@ module.exports = RightCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25829,7 +25872,7 @@ module.exports = TopCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25874,7 +25917,7 @@ module.exports = TopLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25919,7 +25962,7 @@ module.exports = TopRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25950,7 +25993,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25981,7 +26024,7 @@ module.exports = Align; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26026,7 +26069,7 @@ module.exports = BottomCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26071,7 +26114,7 @@ module.exports = BottomLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26116,7 +26159,7 @@ module.exports = BottomRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26161,7 +26204,7 @@ module.exports = LeftBottom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26206,7 +26249,7 @@ module.exports = LeftCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26251,7 +26294,7 @@ module.exports = LeftTop; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26304,7 +26347,7 @@ module.exports = QuickSet; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26349,7 +26392,7 @@ module.exports = RightBottom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26394,7 +26437,7 @@ module.exports = RightCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26439,7 +26482,7 @@ module.exports = RightTop; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26484,7 +26527,7 @@ module.exports = TopCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26529,7 +26572,7 @@ module.exports = TopLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26574,7 +26617,7 @@ module.exports = TopRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26608,7 +26651,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26646,7 +26689,7 @@ module.exports = CenterOn; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26675,7 +26718,7 @@ module.exports = GetBottom; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26720,7 +26763,7 @@ module.exports = GetBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26749,7 +26792,7 @@ module.exports = GetCenterX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26778,7 +26821,7 @@ module.exports = GetCenterY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26807,7 +26850,7 @@ module.exports = GetLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26838,7 +26881,7 @@ module.exports = GetOffsetX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26869,7 +26912,7 @@ module.exports = GetOffsetY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26898,7 +26941,7 @@ module.exports = GetRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26927,7 +26970,7 @@ module.exports = GetTop; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26961,7 +27004,7 @@ module.exports = SetBottom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26997,7 +27040,7 @@ module.exports = SetCenterX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27033,7 +27076,7 @@ module.exports = SetCenterY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27067,7 +27110,7 @@ module.exports = SetLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27101,7 +27144,7 @@ module.exports = SetRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27135,7 +27178,7 @@ module.exports = SetTop; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27172,7 +27215,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27236,7 +27279,7 @@ module.exports = CanvasInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27498,7 +27541,7 @@ module.exports = CanvasPool(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27631,7 +27674,7 @@ module.exports = Smoothing(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27667,7 +27710,7 @@ module.exports = TouchAction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27715,7 +27758,7 @@ module.exports = UserSelect; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27741,7 +27784,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28605,7 +28648,7 @@ module.exports = Color; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28703,7 +28746,7 @@ module.exports = ColorSpectrum; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28744,7 +28787,7 @@ module.exports = ColorToRGBA; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28775,7 +28818,7 @@ module.exports = ComponentToHex; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28806,7 +28849,7 @@ module.exports = GetColor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28838,7 +28881,7 @@ module.exports = GetColor32; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28889,7 +28932,7 @@ module.exports = HSLToColor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28931,7 +28974,7 @@ module.exports = HSVColorWheel; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29013,7 +29056,7 @@ module.exports = HSVToRGB; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29067,7 +29110,7 @@ module.exports = HexStringToColor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29124,7 +29167,7 @@ module.exports = HueToComponent; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29158,7 +29201,7 @@ module.exports = IntegerToColor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29207,7 +29250,7 @@ module.exports = IntegerToRGB; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29316,7 +29359,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29347,7 +29390,7 @@ module.exports = ObjectToColor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29394,7 +29437,7 @@ module.exports = RGBStringToColor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29475,7 +29518,7 @@ module.exports = RGBToHSV; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29520,7 +29563,7 @@ module.exports = RGBToString; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29557,7 +29600,7 @@ module.exports = RandomRGB; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29614,7 +29657,7 @@ module.exports = ValueToColor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29650,7 +29693,7 @@ module.exports = Color; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29679,7 +29722,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29922,7 +29965,7 @@ module.exports = BitmapMask; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30243,7 +30286,7 @@ module.exports = GeometryMask; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30266,7 +30309,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30393,7 +30436,7 @@ module.exports = BaseShader; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30452,7 +30495,7 @@ module.exports = AddToDOM; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30497,7 +30540,7 @@ module.exports = CreateDOMContainer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30561,7 +30604,7 @@ module.exports = DOMContentLoaded; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30621,7 +30664,7 @@ module.exports = GetInnerHeight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30687,7 +30730,7 @@ module.exports = GetScreenOrientation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30739,7 +30782,7 @@ module.exports = GetTarget; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30797,7 +30840,7 @@ module.exports = ParseXML; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30827,7 +30870,7 @@ module.exports = RemoveFromDOM; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31017,7 +31060,7 @@ module.exports = RequestAnimationFrame; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31048,7 +31091,7 @@ module.exports = Dom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31233,7 +31276,7 @@ module.exports = EventEmitter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31251,7 +31294,7 @@ module.exports = { EventEmitter: __webpack_require__(78491) }; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31380,7 +31423,7 @@ module.exports = BuildGameObject; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31478,7 +31521,7 @@ module.exports = BuildGameObjectAnimation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31755,7 +31798,7 @@ module.exports = DisplayList; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32487,7 +32530,7 @@ var GameObject = new Class({ * every game frame. This method is passed two parameters: `delta` and `time`. * * If you wish to run your own logic within `preUpdate` then you should always call - * `preUpdate.super(delta, time)` within it, or it may fail to process required operations, + * `super.preUpdate(delta, time)` within it, or it may fail to process required operations, * such as Sprite animations. * * @method Phaser.GameObjects.GameObject#addToUpdateList @@ -32663,7 +32706,7 @@ module.exports = GameObject; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32867,7 +32910,7 @@ module.exports = GameObjectCreator; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33101,7 +33144,7 @@ module.exports = GameObjectFactory; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33173,7 +33216,7 @@ module.exports = GetCalcMatrix; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33478,7 +33521,7 @@ module.exports = UpdateList; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33538,7 +33581,7 @@ module.exports = BatchChar; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34063,7 +34106,7 @@ module.exports = GetBitmapTextSize; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34118,7 +34161,7 @@ module.exports = ParseFromAtlas; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34251,7 +34294,7 @@ module.exports = ParseRetroFont; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34413,7 +34456,7 @@ module.exports = ParseXMLBitmapFont; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34440,7 +34483,7 @@ module.exports = RetroFont; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34557,7 +34600,7 @@ module.exports = RETRO_FONT_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34792,7 +34835,7 @@ module.exports = DynamicBitmapText; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -35007,7 +35050,7 @@ module.exports = DynamicBitmapTextCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -35059,7 +35102,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -35129,7 +35172,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -35162,7 +35205,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -35451,7 +35494,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -36664,7 +36707,7 @@ module.exports = BitmapText; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -36852,7 +36895,7 @@ module.exports = BitmapTextCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -36906,7 +36949,7 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -36971,7 +37014,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37004,7 +37047,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37144,7 +37187,7 @@ module.exports = BitmapTextWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37444,7 +37487,7 @@ module.exports = Blitter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37582,7 +37625,7 @@ module.exports = BlitterCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37633,7 +37676,7 @@ GameObjectCreator.register('blitter', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37650,14 +37693,14 @@ var GameObjectFactory = __webpack_require__(61286); * * @param {number} x - The x position of the Game Object. * @param {number} y - The y position of the Game Object. - * @param {string} key - The key of the Texture the Blitter object will use. + * @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param {(string|number)} [frame] - The default Frame children of the Blitter will use. * * @return {Phaser.GameObjects.Blitter} The Game Object that was created. */ -GameObjectFactory.register('blitter', function (x, y, key, frame) +GameObjectFactory.register('blitter', function (x, y, texture, frame) { - return this.displayList.add(new Blitter(this.scene, x, y, key, frame)); + return this.displayList.add(new Blitter(this.scene, x, y, texture, frame)); }); // When registering a factory function 'this' refers to the GameObjectFactory context. @@ -37676,7 +37719,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37709,7 +37752,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37828,7 +37871,7 @@ module.exports = BlitterWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -38270,7 +38313,7 @@ module.exports = Bob; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -38566,7 +38609,7 @@ module.exports = Alpha; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -38677,7 +38720,7 @@ module.exports = AlphaSingle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -38802,7 +38845,7 @@ module.exports = BlendMode; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -38952,7 +38995,7 @@ module.exports = ComputedSize; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39078,7 +39121,7 @@ module.exports = Crop; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39176,7 +39219,7 @@ module.exports = Depth; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39279,7 +39322,7 @@ module.exports = FX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39444,7 +39487,7 @@ module.exports = Flip; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39804,7 +39847,7 @@ module.exports = GetBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39966,7 +40009,7 @@ module.exports = Mask; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39998,9 +40041,11 @@ var Origin = { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. * * @name Phaser.GameObjects.Components.Origin#originX * @type {number} + * @readonly * @default 0.5 * @since 3.0.0 */ @@ -40011,9 +40056,11 @@ var Origin = { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. * * @name Phaser.GameObjects.Components.Origin#originY * @type {number} + * @readonly * @default 0.5 * @since 3.0.0 */ @@ -40170,7 +40217,7 @@ module.exports = Origin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -40600,7 +40647,7 @@ module.exports = PathFollower; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -41028,7 +41075,7 @@ module.exports = Pipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -41136,7 +41183,7 @@ module.exports = ScrollFactor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -41332,7 +41379,7 @@ module.exports = Size; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -41476,7 +41523,7 @@ module.exports = Texture; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -41698,7 +41745,7 @@ module.exports = TextureCrop; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -41936,7 +41983,7 @@ module.exports = Tint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -41998,7 +42045,7 @@ module.exports = ToJSON; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -42384,7 +42431,7 @@ var Transform = { * @method Phaser.GameObjects.Components.Transform#setScale * @since 3.0.0 * - * @param {number} x - The horizontal scale of this Game Object. + * @param {number} [x=1] - The horizontal scale of this Game Object. * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value. * * @return {this} This Game Object instance. @@ -42621,7 +42668,7 @@ module.exports = Transform; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -43541,12 +43588,14 @@ var TransformMatrix = new Class({ * @param {number} xw - The xw value. * @param {number} yh - The yh value. * @param {boolean} roundPixels - Pass the results via Math.round? + * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array. * - * @return {number} The calculated y value. + * @return {Float32Array} The quad Float32Array. */ - setQuad: function (x, y, xw, yh, roundPixels) + setQuad: function (x, y, xw, yh, roundPixels, quad) { - var quad = this.quad; + if (quad === undefined) { quad = this.quad; } + var matrix = this.matrix; var a = matrix[0]; @@ -43705,7 +43754,7 @@ module.exports = TransformMatrix; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -43795,7 +43844,7 @@ module.exports = Visible; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -43839,7 +43888,7 @@ module.exports = { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45307,7 +45356,7 @@ module.exports = Container; /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45416,7 +45465,7 @@ module.exports = ContainerCanvasRenderer; /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45467,7 +45516,7 @@ GameObjectCreator.register('container', function (config, addToScene) /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45502,7 +45551,7 @@ GameObjectFactory.register('container', function (x, y, children) /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45536,7 +45585,7 @@ module.exports = { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45688,7 +45737,7 @@ module.exports = ContainerWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45731,7 +45780,7 @@ module.exports = [ /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -46730,7 +46779,7 @@ module.exports = DOMElement; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -46858,7 +46907,7 @@ module.exports = DOMElementCSSRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -46948,7 +46997,7 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -46981,7 +47030,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47009,7 +47058,7 @@ module.exports = 'addedtoscene'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47037,7 +47086,7 @@ module.exports = 'destroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47065,7 +47114,7 @@ module.exports = 'removedfromscene'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47099,7 +47148,7 @@ module.exports = 'complete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47130,7 +47179,7 @@ module.exports = 'created'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47158,7 +47207,7 @@ module.exports = 'error'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47192,7 +47241,7 @@ module.exports = 'loop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47222,7 +47271,7 @@ module.exports = 'play'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47249,7 +47298,7 @@ module.exports = 'seeked'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47277,7 +47326,7 @@ module.exports = 'seeking'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47305,7 +47354,7 @@ module.exports = 'stop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47333,7 +47382,7 @@ module.exports = 'timeout'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47361,7 +47410,7 @@ module.exports = 'unlocked'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47395,7 +47444,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47515,7 +47564,7 @@ module.exports = Extern; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47557,7 +47606,7 @@ GameObjectFactory.register('extern', function () /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47590,7 +47639,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47631,7 +47680,7 @@ module.exports = ExternWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47667,7 +47716,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47808,9 +47857,11 @@ var Graphics = new Class({ /** * The default fill color for shapes rendered by this Graphics object. + * Set this value with `setDefaultStyles()`. * * @name Phaser.GameObjects.Graphics#defaultFillColor * @type {number} + * @readonly * @default -1 * @since 3.0.0 */ @@ -47818,9 +47869,11 @@ var Graphics = new Class({ /** * The default fill alpha for shapes rendered by this Graphics object. + * Set this value with `setDefaultStyles()`. * * @name Phaser.GameObjects.Graphics#defaultFillAlpha * @type {number} + * @readonly * @default 1 * @since 3.0.0 */ @@ -47828,9 +47881,11 @@ var Graphics = new Class({ /** * The default stroke width for shapes rendered by this Graphics object. + * Set this value with `setDefaultStyles()`. * * @name Phaser.GameObjects.Graphics#defaultStrokeWidth * @type {number} + * @readonly * @default 1 * @since 3.0.0 */ @@ -47838,9 +47893,11 @@ var Graphics = new Class({ /** * The default stroke color for shapes rendered by this Graphics object. + * Set this value with `setDefaultStyles()`. * * @name Phaser.GameObjects.Graphics#defaultStrokeColor * @type {number} + * @readonly * @default -1 * @since 3.0.0 */ @@ -47848,9 +47905,11 @@ var Graphics = new Class({ /** * The default stroke alpha for shapes rendered by this Graphics object. + * Set this value with `setDefaultStyles()`. * * @name Phaser.GameObjects.Graphics#defaultStrokeAlpha * @type {number} + * @readonly * @default 1 * @since 3.0.0 */ @@ -48319,7 +48378,7 @@ var Graphics = new Class({ * @param {number} y - The y coordinate of the top-left of the rectangle. * @param {number} width - The width of the rectangle. * @param {number} height - The height of the rectangle. - * @param {(Phaser.Types.GameObjects.Graphics.RoundedRectRadius|number)} [radius=20] - The corner radius; It can also be an object to specify different radii for corners. + * @param {(Phaser.Types.GameObjects.Graphics.RoundedRectRadius|number)} [radius=20] - The corner radius; It can also be an object to specify different radius for corners. * * @return {this} This Game Object. */ @@ -48340,16 +48399,62 @@ var Graphics = new Class({ br = GetFastValue(radius, 'br', 20); } + var convexTL = (tl >= 0); + var convexTR = (tr >= 0); + var convexBL = (bl >= 0); + var convexBR = (br >= 0); + + tl = Math.abs(tl); + tr = Math.abs(tr); + bl = Math.abs(bl); + br = Math.abs(br); + this.beginPath(); this.moveTo(x + tl, y); this.lineTo(x + width - tr, y); - this.arc(x + width - tr, y + tr, tr, -MATH_CONST.TAU, 0); + + if (convexTR) + { + this.arc(x + width - tr, y + tr, tr, -MATH_CONST.TAU, 0); + } + else + { + this.arc(x + width, y, tr, Math.PI, MATH_CONST.TAU, true); + } + this.lineTo(x + width, y + height - br); - this.arc(x + width - br, y + height - br, br, 0, MATH_CONST.TAU); + + if (convexBR) + { + this.arc(x + width - br, y + height - br, br, 0, MATH_CONST.TAU); + } + else + { + this.arc(x + width, y + height, br, -MATH_CONST.TAU, Math.PI, true); + } + this.lineTo(x + bl, y + height); - this.arc(x + bl, y + height - bl, bl, MATH_CONST.TAU, Math.PI); + + if (convexBL) + { + this.arc(x + bl, y + height - bl, bl, MATH_CONST.TAU, Math.PI); + } + else + { + this.arc(x, y + height, bl, 0, -MATH_CONST.TAU, true); + } + this.lineTo(x, y + tl); - this.arc(x + tl, y + tl, tl, -Math.PI, -MATH_CONST.TAU); + + if (convexTL) + { + this.arc(x + tl, y + tl, tl, -Math.PI, -MATH_CONST.TAU); + } + else + { + this.arc(x, y, tl, MATH_CONST.TAU, 0, true); + } + this.fillPath(); return this; @@ -48388,25 +48493,66 @@ var Graphics = new Class({ br = GetFastValue(radius, 'br', 20); } - tl = Math.min(tl, maxRadius); - tr = Math.min(tr, maxRadius); - bl = Math.min(bl, maxRadius); - br = Math.min(br, maxRadius); + var convexTL = (tl >= 0); + var convexTR = (tr >= 0); + var convexBL = (bl >= 0); + var convexBR = (br >= 0); + + tl = Math.min(Math.abs(tl), maxRadius); + tr = Math.min(Math.abs(tr), maxRadius); + bl = Math.min(Math.abs(bl), maxRadius); + br = Math.min(Math.abs(br), maxRadius); this.beginPath(); this.moveTo(x + tl, y); this.lineTo(x + width - tr, y); this.moveTo(x + width - tr, y); - this.arc(x + width - tr, y + tr, tr, -MATH_CONST.TAU, 0); + + if (convexTR) + { + this.arc(x + width - tr, y + tr, tr, -MATH_CONST.TAU, 0); + } + else + { + this.arc(x + width, y, tr, Math.PI, MATH_CONST.TAU, true); + } + this.lineTo(x + width, y + height - br); this.moveTo(x + width, y + height - br); - this.arc(x + width - br, y + height - br, br, 0, MATH_CONST.TAU); + + if (convexBR) + { + this.arc(x + width - br, y + height - br, br, 0, MATH_CONST.TAU); + } + else + { + this.arc(x + width, y + height, br, -MATH_CONST.TAU, Math.PI, true); + } + this.lineTo(x + bl, y + height); this.moveTo(x + bl, y + height); - this.arc(x + bl, y + height - bl, bl, MATH_CONST.TAU, Math.PI); + + if (convexBL) + { + this.arc(x + bl, y + height - bl, bl, MATH_CONST.TAU, Math.PI); + } + else + { + this.arc(x, y + height, bl, 0, -MATH_CONST.TAU, true); + } + this.lineTo(x, y + tl); this.moveTo(x, y + tl); - this.arc(x + tl, y + tl, tl, -Math.PI, -MATH_CONST.TAU); + + if (convexTL) + { + this.arc(x + tl, y + tl, tl, -Math.PI, -MATH_CONST.TAU); + } + else + { + this.arc(x, y, tl, MATH_CONST.TAU, 0, true); + } + this.strokePath(); return this; @@ -49151,7 +49297,7 @@ module.exports = Graphics; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49399,7 +49545,7 @@ module.exports = GraphicsCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49448,7 +49594,7 @@ GameObjectCreator.register('graphics', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49488,7 +49634,7 @@ GameObjectFactory.register('graphics', function (config) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49524,7 +49670,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49880,7 +50026,7 @@ module.exports = GraphicsWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -50006,9 +50152,10 @@ var Group = new Class({ * The class to create new group members from. * * @name Phaser.GameObjects.Group#classType - * @type {Phaser.Types.GameObjects.Group.GroupClassTypeConstructor} + * @type {function} * @since 3.0.0 * @default Phaser.GameObjects.Sprite + * @see Phaser.Types.GameObjects.Group.GroupClassTypeConstructor */ this.classType = GetFastValue(config, 'classType', Sprite); @@ -51632,7 +51779,7 @@ module.exports = Group; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51666,7 +51813,7 @@ GameObjectCreator.register('group', function (config) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51699,7 +51846,7 @@ GameObjectFactory.register('group', function (children, config) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51803,7 +51950,7 @@ module.exports = Image; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51838,7 +51985,7 @@ module.exports = ImageCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51889,7 +52036,7 @@ GameObjectCreator.register('image', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51911,9 +52058,9 @@ var GameObjectFactory = __webpack_require__(61286); * * @return {Phaser.GameObjects.Image} The Game Object that was created. */ -GameObjectFactory.register('image', function (x, y, key, frame) +GameObjectFactory.register('image', function (x, y, texture, frame) { - return this.displayList.add(new Image(this.scene, x, y, key, frame)); + return this.displayList.add(new Image(this.scene, x, y, texture, frame)); }); // When registering a factory function 'this' refers to the GameObjectFactory context. @@ -51932,7 +52079,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51965,7 +52112,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -52000,7 +52147,7 @@ module.exports = ImageWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -52077,7 +52224,7 @@ var GameObjects = { Group: __webpack_require__(62598), Image: __webpack_require__(20927), Layer: __webpack_require__(17676), - Particles: __webpack_require__(30439), + Particles: __webpack_require__(81212), PathFollower: __webpack_require__(19626), RenderTexture: __webpack_require__(29599), Rope: __webpack_require__(31982), @@ -52110,7 +52257,7 @@ var GameObjects = { Group: __webpack_require__(61295), Image: __webpack_require__(83556), Layer: __webpack_require__(56378), - Particles: __webpack_require__(38842), + Particles: __webpack_require__(765), RenderTexture: __webpack_require__(85692), Rope: __webpack_require__(96027), Sprite: __webpack_require__(89219), @@ -52156,7 +52303,7 @@ module.exports = GameObjects; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53149,7 +53296,7 @@ module.exports = Layer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53235,7 +53382,7 @@ module.exports = LayerCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53283,7 +53430,7 @@ GameObjectCreator.register('layer', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53315,7 +53462,7 @@ GameObjectFactory.register('layer', function (children) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53348,7 +53495,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53472,7 +53619,7 @@ module.exports = LayerWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53756,7 +53903,7 @@ module.exports = Light; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -54118,7 +54265,7 @@ module.exports = LightsManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -54237,7 +54384,7 @@ module.exports = LightsPlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55381,7 +55528,7 @@ module.exports = Mesh; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55410,7 +55557,7 @@ module.exports = MeshCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55467,7 +55614,7 @@ GameObjectCreator.register('mesh', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55513,7 +55660,7 @@ if (true) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55546,7 +55693,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55667,7 +55814,7 @@ module.exports = MeshWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55685,7 +55832,7 @@ var Vertex = __webpack_require__(85769); * parameters to this class. * * This is extremely useful for UI and button like elements, where you need - * them to expand to accomodate the content without distorting the texture. + * them to expand to accommodate the content without distorting the texture. * * The texture you provide for this Game Object should be based on the * following layout structure: @@ -56556,7 +56703,7 @@ module.exports = NineSlice; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56612,7 +56759,7 @@ GameObjectCreator.register('nineslice', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56626,7 +56773,7 @@ var GameObjectFactory = __webpack_require__(61286); * parameters to this class. * * This is extremely useful for UI and button like elements, where you need - * them to expand to accomodate the content without distorting the texture. + * them to expand to accommodate the content without distorting the texture. * * The texture you provide for this Game Object should be based on the * following layout structure: @@ -56722,7 +56869,7 @@ if (true) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56755,7 +56902,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56850,6 +56997,216 @@ var NineSliceWebGLRenderer = function (renderer, src, camera, parentMatrix) module.exports = NineSliceWebGLRenderer; +/***/ }), + +/***/ 19737: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(56694); +var EmitterOp = __webpack_require__(93025); +var GetColor = __webpack_require__(22946); +var GetEaseFunction = __webpack_require__(21902); +var GetInterpolationFunction = __webpack_require__(4840); +var IntegerToRGB = __webpack_require__(15978); + +/** + * @classdesc + * This class is responsible for taking control over the color property + * in the Particle class and managing its emission and updating functions. + * + * See the `ParticleEmitter` class for more details on emitter op configuration. + * + * @class EmitterColorOp + * @memberof Phaser.GameObjects.Particles + * @constructor + * @since 3.60.0 + * + * @param {string} key - The name of the property. + */ +var EmitterColorOp = new Class({ + + Extends: EmitterOp, + + initialize: + + function EmitterColorOp (key) + { + EmitterOp.call(this, key, null, false); + + this.active = false; + + this.easeName = 'Linear'; + + /** + * An array containing the red color values. + * + * Populated during the `setMethods` method. + * + * @name Phaser.GameObjects.Particles.EmitterColorOp#r + * @type {number[]} + * @since 3.60.0 + */ + this.r = []; + + /** + * An array containing the green color values. + * + * Populated during the `setMethods` method. + * + * @name Phaser.GameObjects.Particles.EmitterColorOp#g + * @type {number[]} + * @since 3.60.0 + */ + this.g = []; + + /** + * An array containing the blue color values. + * + * Populated during the `setMethods` method. + * + * @name Phaser.GameObjects.Particles.EmitterColorOp#b + * @type {number[]} + * @since 3.60.0 + */ + this.b = []; + }, + + /** + * Checks the type of `EmitterOp.propertyValue` to determine which + * method is required in order to return values from this op function. + * + * @method Phaser.GameObjects.Particles.EmitterColorOp#getMethod + * @since 3.60.0 + * + * @return {number} A number between 0 and 9 which should be passed to `setMethods`. + */ + getMethod: function () + { + return (this.propertyValue === null) ? 0 : 9; + }, + + /** + * Sets the EmitterColorOp method values, if in use. + * + * @method Phaser.GameObjects.Particles.EmitterColorOp#setMethods + * @since 3.60.0 + * + * @return {this} This Emitter Op object. + */ + setMethods: function () + { + var value = this.propertyValue; + var current = value; + + var onEmit = this.defaultEmit; + var onUpdate = this.defaultUpdate; + + if (this.method === 9) + { + this.start = value[0]; + this.ease = GetEaseFunction('Linear'); + this.interpolation = GetInterpolationFunction('linear'); + + onEmit = this.easedValueEmit; + onUpdate = this.easeValueUpdate; + current = value[0]; + + this.active = true; + + // Populate the r,g,b arrays + for (var i = 0; i < value.length; i++) + { + // in hex format 0xff0000 + var color = IntegerToRGB(value[i]); + + this.r.push(color.r); + this.g.push(color.g); + this.b.push(color.b); + } + } + + this.onEmit = onEmit; + this.onUpdate = onUpdate; + this.current = current; + + return this; + }, + + /** + * Sets the Ease function to use for Color interpolation. + * + * @method Phaser.GameObjects.Particles.EmitterColorOp#setEase + * @since 3.60.0 + * + * @param {string} ease - The string-based name of the Ease function to use. + */ + setEase: function (value) + { + this.easeName = value; + + this.ease = GetEaseFunction(value); + }, + + /** + * An `onEmit` callback for an eased property. + * + * It prepares the particle for easing by {@link Phaser.GameObjects.Particles.EmitterColorOp#easeValueUpdate}. + * + * @method Phaser.GameObjects.Particles.EmitterColorOp#easedValueEmit + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. + * @param {string} key - The name of the property. + * + * @return {number} {@link Phaser.GameObjects.Particles.EmitterColorOp#start}, as the new value of the property. + */ + easedValueEmit: function () + { + this.current = this.start; + + return this.start; + }, + + /** + * An `onUpdate` callback that returns an eased value between the + * {@link Phaser.GameObjects.Particles.EmitterColorOp#start} and {@link Phaser.GameObjects.Particles.EmitterColorOp#end} + * range. + * + * @method Phaser.GameObjects.Particles.EmitterColorOp#easeValueUpdate + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. + * @param {string} key - The name of the property. + * @param {number} t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death). + * + * @return {number} The new value of the property. + */ + easeValueUpdate: function (particle, key, t) + { + var v = this.ease(t); + + var r = this.interpolation(this.r, v); + var g = this.interpolation(this.g, v); + var b = this.interpolation(this.b, v); + + var current = GetColor(r, g, b); + + this.current = current; + + return current; + } + +}); + +module.exports = EmitterColorOp; + + /***/ }), /***/ 93025: @@ -56857,42 +57214,47 @@ module.exports = NineSliceWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var Between = __webpack_require__(17489); +var Clamp = __webpack_require__(82897); var Class = __webpack_require__(56694); var FloatBetween = __webpack_require__(61616); var GetEaseFunction = __webpack_require__(21902); var GetFastValue = __webpack_require__(72632); +var GetInterpolationFunction = __webpack_require__(4840); +var SnapTo = __webpack_require__(88462); var Wrap = __webpack_require__(1071); /** * @classdesc - * A Particle Emitter property. + * This class is responsible for taking control over a single property + * in the Particle class and managing its emission and updating functions. * - * Facilitates changing Particle properties as they are emitted and throughout their lifetime. + * Particles properties such as `x`, `y`, `scaleX`, `lifespan` and others all use + * EmitterOp instances to manage them, as they can be given in a variety of + * formats: from simple values, to functions, to dynamic callbacks. + * + * See the `ParticleEmitter` class for more details on emitter op configuration. * * @class EmitterOp * @memberof Phaser.GameObjects.Particles * @constructor * @since 3.0.0 * - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Settings for the Particle Emitter that owns this property. * @param {string} key - The name of the property. - * @param {number} defaultValue - The default value of the property. + * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} defaultValue - The default value of the property. * @param {boolean} [emitOnly=false] - Whether the property can only be modified when a Particle is emitted. */ var EmitterOp = new Class({ initialize: - function EmitterOp (config, key, defaultValue, emitOnly) + function EmitterOp (key, defaultValue, emitOnly) { - if (emitOnly === undefined) - { - emitOnly = false; - } + if (emitOnly === undefined) { emitOnly = false; } /** * The name of this property. @@ -56904,10 +57266,13 @@ var EmitterOp = new Class({ this.propertyKey = key; /** - * The value of this property. + * The current value of this property. + * + * This can be a simple value, an array, a function or an onEmit + * configuration object. * * @name Phaser.GameObjects.Particles.EmitterOp#propertyValue - * @type {number} + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} * @since 3.0.0 */ this.propertyValue = defaultValue; @@ -56915,8 +57280,11 @@ var EmitterOp = new Class({ /** * The default value of this property. * + * This can be a simple value, an array, a function or an onEmit + * configuration object. + * * @name Phaser.GameObjects.Particles.EmitterOp#defaultValue - * @type {number} + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} * @since 3.0.0 */ this.defaultValue = defaultValue; @@ -56942,16 +57310,49 @@ var EmitterOp = new Class({ */ this.counter = 0; + /** + * When the step counter reaches it's maximum, should it then + * yoyo back to the start again, or flip over to it? + * + * @name Phaser.GameObjects.Particles.EmitterOp#yoyo + * @type {boolean} + * @default false + * @since 3.60.0 + */ + this.yoyo = false; + + /** + * The counter direction. 0 for up and 1 for down. + * + * @name Phaser.GameObjects.Particles.EmitterOp#direction + * @type {number} + * @default 0 + * @since 3.60.0 + */ + this.direction = 0; + /** * The start value for this property to ease between. * + * If an interpolation this holds a reference to the number data array. + * * @name Phaser.GameObjects.Particles.EmitterOp#start - * @type {number} + * @type {number|number[]} * @default 0 * @since 3.0.0 */ this.start = 0; + /** + * The most recently calculated value. Updated every time an + * emission or update method is called. Treat as read-only. + * + * @name Phaser.GameObjects.Particles.EmitterOp#current + * @type {number} + * @since 3.60.0 + */ + this.current = 0; + /** * The end value for this property to ease between. * @@ -56963,13 +57364,22 @@ var EmitterOp = new Class({ this.end = 0; /** - * The easing function to use for updating this property. + * The easing function to use for updating this property, if any. * * @name Phaser.GameObjects.Particles.EmitterOp#ease * @type {?function} * @since 3.0.0 */ - this.ease; + this.ease = null; + + /** + * The interpolation function to use for updating this property, if any. + * + * @name Phaser.GameObjects.Particles.EmitterOp#interpolation + * @type {?function} + * @since 3.60.0 + */ + this.interpolation = null; /** * Whether this property can only be modified when a Particle is emitted. @@ -57004,7 +57414,48 @@ var EmitterOp = new Class({ */ this.onUpdate = this.defaultUpdate; - this.loadConfig(config); + /** + * Set to `false` to disable this EmitterOp. + * + * @name Phaser.GameObjects.Particles.EmitterOp#active + * @type {boolean} + * @since 3.60.0 + */ + this.active = true; + + /** + * The onEmit method type of this EmitterOp. + * + * Set as part of `setMethod` and cached here to avoid + * re-setting when only the value changes. + * + * @name Phaser.GameObjects.Particles.EmitterOp#method + * @type {number} + * @since 3.60.0 + */ + this.method = 0; + + /** + * The callback to run for Particles when they are emitted from the Particle Emitter. + * This is set during `setMethods` and used by `proxyEmit`. + * + * @name Phaser.GameObjects.Particles.EmitterOp#_onEmit + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitCallback} + * @private + * @since 3.60.0 + */ + this._onEmit; + + /** + * The callback to run for Particles when they are updated. + * This is set during `setMethods` and used by `proxyUpdate`. + * + * @name Phaser.GameObjects.Particles.EmitterOp#_onUpdate + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateCallback} + * @private + * @since 3.60.0 + */ + this._onUpdate; }, /** @@ -57036,6 +57487,8 @@ var EmitterOp = new Class({ this.defaultValue ); + this.method = this.getMethod(); + this.setMethods(); if (this.emitOnly) @@ -57055,7 +57508,7 @@ var EmitterOp = new Class({ */ toJSON: function () { - return this.propertyValue; + return JSON.stringify(this.propertyValue); }, /** @@ -57064,177 +57517,243 @@ var EmitterOp = new Class({ * @method Phaser.GameObjects.Particles.EmitterOp#onChange * @since 3.0.0 * - * @param {number} value - The value of the property. + * @param {number} value - The new numeric value of this property. * * @return {this} This Emitter Op object. */ onChange: function (value) { - this.propertyValue = value; + var current; - return this.setMethods(); + switch (this.method) + { + // Number + // Custom Callback (onEmit only) + // Custom onEmit and/or onUpdate callbacks + case 1: + case 3: + case 8: + current = value; + break; + + // Random Array + case 2: + if (this.propertyValue.indexOf(value) >= 0) + { + current = value; + } + break; + + // Stepped start/end + case 4: + var step = (this.end - this.start) / this.steps; + current = SnapTo(value, step); + this.counter = current; + break; + + // Eased start/end + // min/max (random float or int) + // Random object (random integer) + case 5: + case 6: + case 7: + current = Clamp(value, this.start, this.end); + break; + + // Interpolation + case 9: + current = this.start[0]; + break; + } + + this.current = current; + + return this; }, /** - * Update the {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} and - * {@link Phaser.GameObjects.Particles.EmitterOp#onUpdate} callbacks based on the type of the current - * {@link Phaser.GameObjects.Particles.EmitterOp#propertyValue}. + * Checks the type of `EmitterOp.propertyValue` to determine which + * method is required in order to return values from this op function. * - * @method Phaser.GameObjects.Particles.EmitterOp#setMethods - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.EmitterOp#getMethod + * @since 3.60.0 * - * @return {this} This Emitter Op object. + * @return {number} A number between 0 and 9 which should be passed to `setMethods`. */ - setMethods: function () + getMethod: function () { var value = this.propertyValue; - var t = typeof value; - - // Reset them in case they're not changed below - this.onEmit = this.defaultEmit; - this.onUpdate = this.defaultUpdate; - // `moveToX` and `moveToY` are null by default if (value === null) { - return; + return 0; } + var t = typeof value; + if (t === 'number') { - // Explicit static value: - // x: 400 - - this.onEmit = this.staticValueEmit; - this.onUpdate = this.staticValueUpdate; // How? + // Number + return 1; } else if (Array.isArray(value)) { - // Picks a random element from the array: - // x: [ 100, 200, 300, 400 ] - - this.onEmit = this.randomStaticValueEmit; + // Random Array + return 2; } else if (t === 'function') { - // The same as setting just the onUpdate function and no onEmit (unless this op is an emitOnly one) - // Custom callback, must return a value: - - /* - x: function (particle, key, t, value) - { - return value + 50; - } - */ - - if (this.emitOnly) + // Custom Callback + return 3; + } + else if (t === 'object') + { + if (this.hasBoth(value, 'start', 'end')) { - this.onEmit = value; + if (this.has(value, 'steps')) + { + // Stepped start/end + return 4; + } + else + { + // Eased start/end + return 5; + } } - else + else if (this.hasBoth(value, 'min', 'max')) { - this.onUpdate = value; + // min/max + return 6; } - } - else if (t === 'object' && this.hasBoth(value, 'start', 'end')) - { - this.start = value.start; - this.end = value.end; - - // x: { start: 100, end: 400, random: true } (random optional) = eases between start and end - - var isRandom = this.has(value, 'random'); - - if (isRandom) + else if (this.has(value, 'random')) { - this.onEmit = this.randomRangedValueEmit; + // Random object + return 7; } - - if (this.has(value, 'steps')) + else if (this.hasEither(value, 'onEmit', 'onUpdate')) { - // A stepped (per emit) range - - // x: { start: 100, end: 400, steps: 64 } - - // Increments a value stored in the emitter - - this.steps = value.steps; - this.counter = this.start; - - this.onEmit = this.steppedEmit; + // Custom onEmit onUpdate + return 8; } - else + else if (this.has(value, 'interpolation')) { - // An eased range (defaults to Linear if not specified) - - // x: { start: 100, end: 400, [ ease: 'Linear' ] } + // Interpolation + return 9; + } + } - var easeType = this.has(value, 'ease') ? value.ease : 'Linear'; + return 0; + }, - this.ease = GetEaseFunction(easeType, value.easeParams); + /** + * Update the {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} and + * {@link Phaser.GameObjects.Particles.EmitterOp#onUpdate} callbacks based on the method returned + * from `getMethod`. The method is stored in the `EmitterOp.method` property + * and is a number between 0 and 9 inclusively. + * + * @method Phaser.GameObjects.Particles.EmitterOp#setMethods + * @since 3.0.0 + * + * @return {this} This Emitter Op object. + */ + setMethods: function () + { + var value = this.propertyValue; + var current = value; - if (!isRandom) - { - this.onEmit = this.easedValueEmit; - } + var onEmit = this.defaultEmit; + var onUpdate = this.defaultUpdate; - this.onUpdate = this.easeValueUpdate; - } - } - else if (t === 'object' && this.hasBoth(value, 'min', 'max')) + switch (this.method) { - // { min: 100, max: 400 } = pick a random number between min and max + // Number + case 1: + onEmit = this.staticValueEmit; + break; - this.start = value.min; - this.end = value.max; - this.onEmit = this.randomRangedValueEmit; - } - else if (t === 'object' && this.has(value, 'random')) - { - // { random: [ 100, 400 ] } = pick a random number between the two elements of the array + // Random Array + case 2: + onEmit = this.randomStaticValueEmit; + current = value[0]; + break; - var rnd = value.random; + // Custom Callback (onEmit only) + case 3: + this._onEmit = value; + onEmit = this.proxyEmit; + break; - if (Array.isArray(rnd)) - { - this.start = rnd[0]; - this.end = rnd[1]; - } + // Stepped start/end + case 4: + this.start = value.start; + this.end = value.end; + this.steps = value.steps; + this.counter = this.start; + this.yoyo = this.has(value, 'yoyo') ? value.yoyo : false; + this.direction = 0; + onEmit = this.steppedEmit; + current = this.start; + break; - this.onEmit = this.randomRangedValueEmit; - } - else if (t === 'object' && this.hasEither(value, 'onEmit', 'onUpdate')) - { - // Custom onEmit and onUpdate callbacks + // Eased start/end + case 5: + this.start = value.start; + this.end = value.end; + var easeType = this.has(value, 'ease') ? value.ease : 'Linear'; + this.ease = GetEaseFunction(easeType, value.easeParams); + onEmit = (this.has(value, 'random') && value.random) ? this.randomRangedValueEmit : this.easedValueEmit; + onUpdate = this.easeValueUpdate; + current = this.start; + break; - /* - x: { - // Called at the start of the particles life, when it is being created - onEmit: function (particle, key, t, value) - { - return value; - }, + // min/max (random float or int) + case 6: + this.start = value.min; + this.end = value.max; + onEmit = (this.has(value, 'int') && value.int) ? this.randomRangedIntEmit : this.randomRangedValueEmit; + current = this.start; + break; + + // Random object (random integer) + case 7: + var rnd = value.random; - // Called during the particles life on each update - onUpdate: function (particle, key, t, value) + if (Array.isArray(rnd)) { - return value; + this.start = rnd[0]; + this.end = rnd[1]; } - } - */ - if (this.has(value, 'onEmit')) - { - this.onEmit = value.onEmit; - } + onEmit = this.randomRangedIntEmit; + current = this.start; + break; - if (this.has(value, 'onUpdate')) - { - this.onUpdate = value.onUpdate; - } + // Custom onEmit and/or onUpdate callbacks + case 8: + this._onEmit = (this.has(value, 'onEmit')) ? value.onEmit : this.defaultEmit; + this._onUpdate = (this.has(value, 'onUpdate')) ? value.onUpdate : this.defaultUpdate; + onEmit = this.proxyEmit; + onUpdate = this.proxyUpdate; + break; + + // Interpolation + case 9: + this.start = value.values; + var easeTypeI = this.has(value, 'ease') ? value.ease : 'Linear'; + this.ease = GetEaseFunction(easeTypeI, value.easeParams); + this.interpolation = GetInterpolationFunction(value.interpolation); + onEmit = this.easedValueEmit; + onUpdate = this.easeValueUpdate; + current = this.start[0]; + break; } + this.onEmit = onEmit; + this.onUpdate = onUpdate; + this.current = current; + return this; }, @@ -57313,7 +57832,7 @@ var EmitterOp = new Class({ * * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. * @param {string} key - The name of the property. - * @param {number} t - The T value (between 0 and 1) + * @param {number} t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death). * @param {number} value - The current value of the property. * * @return {number} The new value of the property. @@ -57323,6 +57842,53 @@ var EmitterOp = new Class({ return value; }, + /** + * The returned value sets what the property will be at the START of the particles life, on emit. + * + * This method is only used when you have provided a custom emit callback. + * + * @method Phaser.GameObjects.Particles.EmitterOp#proxyEmit + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. + * @param {string} key - The name of the property. + * @param {number} [value] - The current value of the property. + * + * @return {number} The new value of the property. + */ + proxyEmit: function (particle, key, value) + { + var result = this._onEmit(particle, key, value); + + this.current = result; + + return result; + }, + + /** + * The returned value updates the property for the duration of the particles life. + * + * This method is only used when you have provided a custom update callback. + * + * @method Phaser.GameObjects.Particles.EmitterOp#proxyUpdate + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. + * @param {string} key - The name of the property. + * @param {number} t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death). + * @param {number} value - The current value of the property. + * + * @return {number} The new value of the property. + */ + proxyUpdate: function (particle, key, t, value) + { + var result = this._onUpdate(particle, key, t, value); + + this.current = result; + + return result; + }, + /** * An `onEmit` callback that returns the current value of the property. * @@ -57333,7 +57899,7 @@ var EmitterOp = new Class({ */ staticValueEmit: function () { - return this.propertyValue; + return this.current; }, /** @@ -57346,7 +57912,7 @@ var EmitterOp = new Class({ */ staticValueUpdate: function () { - return this.propertyValue; + return this.current; }, /** @@ -57361,7 +57927,9 @@ var EmitterOp = new Class({ { var randomIndex = Math.floor(Math.random() * this.propertyValue.length); - return this.propertyValue[randomIndex]; + this.current = this.propertyValue[randomIndex]; + + return this.current; }, /** @@ -57383,8 +57951,38 @@ var EmitterOp = new Class({ if (particle && particle.data[key]) { particle.data[key].min = value; + particle.data[key].max = this.end; } + this.current = value; + + return value; + }, + + /** + * An `onEmit` callback that returns a value between the {@link Phaser.GameObjects.Particles.EmitterOp#start} and + * {@link Phaser.GameObjects.Particles.EmitterOp#end} range. + * + * @method Phaser.GameObjects.Particles.EmitterOp#randomRangedIntEmit + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. + * @param {string} key - The key of the property. + * + * @return {number} The new value of the property. + */ + randomRangedIntEmit: function (particle, key) + { + var value = Between(this.start, this.end); + + if (particle && particle.data[key]) + { + particle.data[key].min = value; + particle.data[key].max = this.end; + } + + this.current = value; + return value; }, @@ -57402,9 +58000,51 @@ var EmitterOp = new Class({ { var current = this.counter; - var next = this.counter + (this.end - this.start) / this.steps; + var next = current; + + var step = (this.end - this.start) / this.steps; + + if (this.yoyo) + { + var over; + + if (this.direction === 0) + { + // Add step to the current value + next += step; + + if (next >= this.end) + { + over = next - this.end; + + next = this.end - over; - this.counter = Wrap(next, this.start, this.end); + this.direction = 1; + } + } + else + { + // Down + next -= step; + + if (next <= this.start) + { + over = this.start - next; + + next = this.start + over; + + this.direction = 0; + } + } + + this.counter = next; + } + else + { + this.counter = Wrap(next + step, this.start, this.end); + } + + this.current = current; return current; }, @@ -57432,6 +58072,8 @@ var EmitterOp = new Class({ data.max = this.end; } + this.current = this.start; + return this.start; }, @@ -57445,7 +58087,7 @@ var EmitterOp = new Class({ * * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. * @param {string} key - The name of the property. - * @param {number} t - The T value (between 0 and 1) + * @param {number} t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death). * * @return {number} The new value of the property. */ @@ -57453,7 +58095,40 @@ var EmitterOp = new Class({ { var data = particle.data[key]; - return (data.max - data.min) * this.ease(t) + data.min; + var current; + var v = this.ease(t); + + if (this.interpolation) + { + current = this.interpolation(this.start, v); + } + else + { + current = (data.max - data.min) * v + data.min; + } + + this.current = current; + + return current; + }, + + /** + * Destroys this EmitterOp instance and all of its references. + * + * Called automatically when the ParticleEmitter that owns this + * EmitterOp is destroyed. + * + * @method Phaser.GameObjects.Particles.EmitterOp#destroy + * @since 3.60.0 + */ + destroy: function () + { + this.propertyValue = null; + this.defaultValue = null; + this.ease = null; + this.interpolation = null; + this._onEmit = null; + this._onUpdate = null; } }); @@ -57467,22 +58142,26 @@ module.exports = EmitterOp; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(56694); var GetFastValue = __webpack_require__(72632); +var ParticleProcessor = __webpack_require__(30891); /** * @classdesc - * The GravityWell action applies a force on the particle to draw it towards, or repel it from, a single point. + * The Gravity Well Particle Processor applies a force on the particles to draw + * them towards, or repel them from, a single point. * - * The force applied is inversely proportional to the square of the distance from the particle to the point, in accordance with Newton's law of gravity. + * The force applied is inversely proportional to the square of the distance + * from the particle to the point, in accordance with Newton's law of gravity. * * This simulates the effect of gravity over large distances (as between planets, for example). * * @class GravityWell + * @extends Phaser.GameObjects.Particles.ParticleProcessor * @memberof Phaser.GameObjects.Particles * @constructor * @since 3.0.0 @@ -57495,6 +58174,8 @@ var GetFastValue = __webpack_require__(72632); */ var GravityWell = new Class({ + Extends: ParticleProcessor, + initialize: function GravityWell (x, y, power, epsilon, gravity) @@ -57518,33 +58199,7 @@ var GravityWell = new Class({ if (gravity === undefined) { gravity = 50; } } - /** - * The x coordinate of the Gravity Well, in world space. - * - * @name Phaser.GameObjects.Particles.GravityWell#x - * @type {number} - * @since 3.0.0 - */ - this.x = x; - - /** - * The y coordinate of the Gravity Well, in world space. - * - * @name Phaser.GameObjects.Particles.GravityWell#y - * @type {number} - * @since 3.0.0 - */ - this.y = y; - - /** - * The active state of the Gravity Well. An inactive Gravity Well will not influence any particles. - * - * @name Phaser.GameObjects.Particles.GravityWell#active - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.active = true; + ParticleProcessor.call(this, x, y, true); /** * Internal gravity value. @@ -57687,17 +58342,23 @@ module.exports = GravityWell; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var AnimationState = __webpack_require__(16569); var Class = __webpack_require__(56694); var DegToRad = __webpack_require__(75606); +var Rectangle = __webpack_require__(74118); +var RotateAround = __webpack_require__(2386); +var Vector2 = __webpack_require__(93736); /** * @classdesc - * A Particle is a simple Game Object controlled by a Particle Emitter and Manager, and rendered by the Manager. - * It uses its own lightweight physics system, and can interact only with its Emitter's bounds and zones. + * A Particle is a simple object owned and controlled by a Particle Emitter. + * + * It encapsulates all of the properties required to move and update according + * to the Emitters operations. * * @class Particle * @memberof Phaser.GameObjects.Particles @@ -57715,7 +58376,7 @@ var Particle = new Class({ /** * The Emitter to which this Particle belongs. * - * A Particle can only belong to a single Emitter and is created, updated and destroyed via it. + * A Particle can only belong to a single Emitter and is created, updated and destroyed by it. * * @name Phaser.GameObjects.Particles.Particle#emitter * @type {Phaser.GameObjects.Particles.ParticleEmitter} @@ -57724,7 +58385,17 @@ var Particle = new Class({ this.emitter = emitter; /** - * The texture frame used to render this Particle. + * The texture used by this Particle when it renders. + * + * @name Phaser.GameObjects.Particles.Particle#texture + * @type {Phaser.Textures.Texture} + * @default null + * @since 3.60.0 + */ + this.texture = null; + + /** + * The texture frame used by this Particle when it renders. * * @name Phaser.GameObjects.Particles.Particle#frame * @type {Phaser.Textures.Frame} @@ -57931,12 +58602,91 @@ var Particle = new Class({ * @since 3.0.0 */ this.data = { - tint: { min: 0xffffff, max: 0xffffff, current: 0xffffff }, + tint: { min: 0xffffff, max: 0xffffff }, alpha: { min: 1, max: 1 }, rotate: { min: 0, max: 0 }, scaleX: { min: 1, max: 1 }, - scaleY: { min: 1, max: 1 } + scaleY: { min: 1, max: 1 }, + x: { min: 0, max: 0 }, + y: { min: 0, max: 0 }, + accelerationX: { min: 0, max: 0 }, + accelerationY: { min: 0, max: 0 }, + maxVelocityX: { min: 0, max: 0 }, + maxVelocityY: { min: 0, max: 0 }, + moveToX: { min: 0, max: 0 }, + moveToY: { min: 0, max: 0 }, + bounce: { min: 0, max: 0 } }; + + /** + * Interal private value. + * + * @name Phaser.GameObjects.Particles.Particle#isCropped + * @type {boolean} + * @private + * @readonly + * @since 3.60.0 + */ + this.isCropped = false; + + /** + * A reference to the Scene to which this Game Object belongs. + * + * Game Objects can only belong to one Scene. + * + * You should consider this property as being read-only. You cannot move a + * Game Object to another Scene by simply changing it. + * + * @name Phaser.GameObjects.Particles.Particle#scene + * @type {Phaser.Scene} + * @since 3.60.0 + */ + this.scene = emitter.scene; + + /** + * The Animation State component of this Particle. + * + * This component provides features to apply animations to this Particle. + * It is responsible for playing, loading, queuing animations for later playback, + * mixing between animations and setting the current animation frame to this Particle. + * + * @name Phaser.GameObjects.Particles.Particle#anims + * @type {Phaser.Animations.AnimationState} + * @since 3.60.0 + */ + this.anims = new AnimationState(this); + + /** + * A rectangle that holds the bounds of this Particle after a call to + * the `Particle.getBounds` method has been made. + * + * @name Phaser.GameObjects.Particles.Particle#bounds + * @type {Phaser.Geom.Rectangle} + * @since 3.60.0 + */ + this.bounds = new Rectangle(); + }, + + /** + * The Event Emitter proxy. + * + * Passes on all parameters to the `ParticleEmitter` to emit directly. + * + * @method Phaser.GameObjects.Particles.Particle#emit + * @since 3.60.0 + * + * @param {(string|Symbol)} event - The event name. + * @param {any} [a1] - Optional argument 1. + * @param {any} [a2] - Optional argument 2. + * @param {any} [a3] - Optional argument 3. + * @param {any} [a4] - Optional argument 4. + * @param {any} [a5] - Optional argument 5. + * + * @return {boolean} `true` if the event had listeners, else `false`. + */ + emit: function (event, a1, a2, a3, a4, a5) + { + return this.emitter.emit(event, a1, a2, a3, a4, a5); }, /** @@ -57953,15 +58703,35 @@ var Particle = new Class({ }, /** - * Resets the position of this particle back to zero. + * Kills this particle. This sets the `lifeCurrent` value to 0, which forces + * the Particle to be removed the next time its parent Emitter runs an update. * - * @method Phaser.GameObjects.Particles.Particle#resetPosition - * @since 3.16.0 + * @method Phaser.GameObjects.Particles.Particle#kill + * @since 3.60.0 */ - resetPosition: function () + kill: function () { - this.x = 0; - this.y = 0; + this.lifeCurrent = 0; + }, + + /** + * Sets the position of this particle to the given x/y coordinates. + * + * If the parameters are left undefined, it resets the particle back to 0x0. + * + * @method Phaser.GameObjects.Particles.Particle#setPosition + * @since 3.60.0 + * + * @param {number} [x=0] - The x coordinate to set this Particle to. + * @param {number} [y=0] - The y coordinate to set this Particle to. + */ + setPosition: function (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + this.x = x; + this.y = y; }, /** @@ -57970,34 +58740,44 @@ var Particle = new Class({ * @method Phaser.GameObjects.Particles.Particle#fire * @since 3.0.0 * - * @param {number} x - The x coordinate to launch this Particle from. - * @param {number} y - The y coordinate to launch this Particle from. + * @param {number} [x] - The x coordinate to launch this Particle from. + * @param {number} [y] - The y coordinate to launch this Particle from. + * + * @return {boolean} `true` if the Particle is alive, or `false` if it was spawned inside a DeathZone. */ fire: function (x, y) { var emitter = this.emitter; + var ops = emitter.ops; - this.frame = emitter.getFrame(); + var anim = emitter.getAnim(); - if (!this.frame) + if (anim) { - throw new Error('Particle has no texture frame'); + this.anims.play(anim); + } + else + { + this.frame = emitter.getFrame(); + this.texture = this.frame.texture; } - if (emitter.emitZone) + if (!this.frame) { - // Updates particle.x and particle.y during this call - emitter.emitZone.getPoint(this); + throw new Error('Particle has no texture frame'); } + // Updates particle.x and particle.y during this call + emitter.getEmitZone(this); + if (x === undefined) { - this.x += emitter.x.onEmit(this, 'x'); + this.x += ops.x.onEmit(this, 'x'); } - else if (emitter.x.steps > 0) + else if (ops.x.steps > 0) { // EmitterOp is stepped but x was forced (follower?) so use it - this.x += x + emitter.x.onEmit(this, 'x'); + this.x += x + ops.x.onEmit(this, 'x'); } else { @@ -58006,36 +58786,53 @@ var Particle = new Class({ if (y === undefined) { - this.y += emitter.y.onEmit(this, 'y'); + this.y += ops.y.onEmit(this, 'y'); } - else if (emitter.y.steps > 0) + else if (ops.y.steps > 0) { // EmitterOp is stepped but y was forced (follower?) so use it - this.y += y + emitter.y.onEmit(this, 'y'); + this.y += y + ops.y.onEmit(this, 'y'); } else { this.y += y; } - this.life = emitter.lifespan.onEmit(this, 'lifespan'); + this.life = ops.lifespan.onEmit(this, 'lifespan'); this.lifeCurrent = this.life; this.lifeT = 0; - var sx = emitter.speedX.onEmit(this, 'speedX'); - var sy = (emitter.speedY) ? emitter.speedY.onEmit(this, 'speedY') : sx; + this.delayCurrent = ops.delay.onEmit(this, 'delay'); + + this.scaleX = ops.scaleX.onEmit(this, 'scaleX'); + this.scaleY = (ops.scaleY.active) ? ops.scaleY.onEmit(this, 'scaleY') : this.scaleX; + + this.angle = ops.rotate.onEmit(this, 'rotate'); + + this.rotation = DegToRad(this.angle); + + // Check we didn't spawn in the middle of a DeathZone + if (this.delayCurrent === 0 && emitter.getDeathZone(this)) + { + this.lifeCurrent = 0; + + return false; + } + + var sx = ops.speedX.onEmit(this, 'speedX'); + var sy = (ops.speedY.active) ? ops.speedY.onEmit(this, 'speedY') : sx; if (emitter.radial) { - var rad = DegToRad(emitter.angle.onEmit(this, 'angle')); + var rad = DegToRad(ops.angle.onEmit(this, 'angle')); this.velocityX = Math.cos(rad) * Math.abs(sx); this.velocityY = Math.sin(rad) * Math.abs(sy); } else if (emitter.moveTo) { - var mx = emitter.moveToX.onEmit(this, 'moveToX'); - var my = (emitter.moveToY) ? emitter.moveToY.onEmit(this, 'moveToY') : mx; + var mx = ops.moveToX.onEmit(this, 'moveToX'); + var my = ops.moveToY.onEmit(this, 'moveToY'); var lifeS = this.life / 1000; this.velocityX = (mx - this.x) / lifeS; @@ -58049,26 +58846,27 @@ var Particle = new Class({ if (emitter.acceleration) { - this.accelerationX = emitter.accelerationX.onEmit(this, 'accelerationX'); - this.accelerationY = emitter.accelerationY.onEmit(this, 'accelerationY'); + this.accelerationX = ops.accelerationX.onEmit(this, 'accelerationX'); + this.accelerationY = ops.accelerationY.onEmit(this, 'accelerationY'); } - this.maxVelocityX = emitter.maxVelocityX.onEmit(this, 'maxVelocityX'); - this.maxVelocityY = emitter.maxVelocityY.onEmit(this, 'maxVelocityY'); - - this.delayCurrent = emitter.delay.onEmit(this, 'delay'); + this.maxVelocityX = ops.maxVelocityX.onEmit(this, 'maxVelocityX'); + this.maxVelocityY = ops.maxVelocityY.onEmit(this, 'maxVelocityY'); - this.scaleX = emitter.scaleX.onEmit(this, 'scaleX'); - this.scaleY = emitter.scaleY.onEmit(this, 'scaleY'); - - this.angle = emitter.rotate.onEmit(this, 'rotate'); - this.rotation = DegToRad(this.angle); + this.bounce = ops.bounce.onEmit(this, 'bounce'); - this.bounce = emitter.bounce.onEmit(this, 'bounce'); + this.alpha = ops.alpha.onEmit(this, 'alpha'); - this.alpha = emitter.alpha.onEmit(this, 'alpha'); + if (ops.color.active) + { + this.tint = ops.color.onEmit(this, 'tint'); + } + else + { + this.tint = ops.tint.onEmit(this, 'tint'); + } - this.tint = emitter.tint.onEmit(this, 'tint'); + return true; }, /** @@ -58080,18 +58878,21 @@ var Particle = new Class({ * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Emitter that is updating this Particle. * @param {number} delta - The delta time in ms. * @param {number} step - The delta value divided by 1000. - * @param {array} processors - Particle processors (gravity wells). + * @param {Phaser.GameObjects.Particles.ParticleProcessor[]} processors - An array of all active Particle Processors. + * @param {number} t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death). */ - computeVelocity: function (emitter, delta, step, processors) + computeVelocity: function (emitter, delta, step, processors, t) { + var ops = emitter.ops; + var vx = this.velocityX; var vy = this.velocityY; - var ax = this.accelerationX; - var ay = this.accelerationY; + var ax = ops.accelerationX.onUpdate(this, 'accelerationX', t, this.accelerationX); + var ay = ops.accelerationY.onUpdate(this, 'accelerationY', t, this.accelerationY); - var mx = this.maxVelocityX; - var my = this.maxVelocityY; + var mx = ops.maxVelocityX.onUpdate(this, 'maxVelocityX', t, this.maxVelocityX); + var my = ops.maxVelocityY.onUpdate(this, 'maxVelocityY', t, this.maxVelocityY); vx += (emitter.gravityX * step); vy += (emitter.gravityY * step); @@ -58130,7 +58931,7 @@ var Particle = new Class({ // Apply any additional processors for (var i = 0; i < processors.length; i++) { - processors[i].update(this, delta, step); + processors[i].update(this, delta, step, t); } }, @@ -58182,12 +58983,18 @@ var Particle = new Class({ * * @param {number} delta - The delta time in ms. * @param {number} step - The delta value divided by 1000. - * @param {array} processors - An optional array of update processors. + * @param {Phaser.GameObjects.Particles.ParticleProcessor[]} processors - An array of all active Particle Processors. * * @return {boolean} Returns `true` if this Particle has now expired and should be removed, otherwise `false` if still active. */ update: function (delta, step, processors) { + if (this.lifeCurrent === 0) + { + // Particle is dead via `Particle.kill` method. + return true; + } + if (this.delayCurrent > 0) { this.delayCurrent -= delta; @@ -58195,24 +59002,54 @@ var Particle = new Class({ return false; } + this.anims.update(0, delta); + var emitter = this.emitter; + var ops = emitter.ops; // How far along in life is this particle? (t = 0 to 1) var t = 1 - (this.lifeCurrent / this.life); this.lifeT = t; - this.computeVelocity(emitter, delta, step, processors); + this.x = ops.x.onUpdate(this, 'x', t, this.x); + this.y = ops.y.onUpdate(this, 'y', t, this.y); + + if (emitter.moveTo) + { + var mx = ops.moveToX.onUpdate(this, 'moveToX', t, emitter.moveToX); + var my = ops.moveToY.onUpdate(this, 'moveToY', t, emitter.moveToY); + var lifeS = this.lifeCurrent / 1000; + + this.velocityX = (mx - this.x) / lifeS; + this.velocityY = (my - this.y) / lifeS; + } + + this.computeVelocity(emitter, delta, step, processors, t); this.x += this.velocityX * step; this.y += this.velocityY * step; if (emitter.bounds) { + this.bounce = ops.bounce.onUpdate(this, 'bounce', t, this.bounce); + this.checkBounds(emitter); } - if (emitter.deathZone && emitter.deathZone.willKill(this)) + this.scaleX = ops.scaleX.onUpdate(this, 'scaleX', t, this.scaleX); + this.scaleY = this.scaleX; + + if (ops.scaleY.active) + { + this.scaleY = ops.scaleY.onUpdate(this, 'scaleY', t, this.scaleY); + } + + this.angle = ops.rotate.onUpdate(this, 'rotate', t, this.angle); + + this.rotation = DegToRad(this.angle); + + if (emitter.getDeathZone(this)) { this.lifeCurrent = 0; @@ -58220,19 +59057,102 @@ var Particle = new Class({ return true; } - this.scaleX = emitter.scaleX.onUpdate(this, 'scaleX', t, this.scaleX); - this.scaleY = emitter.scaleY.onUpdate(this, 'scaleY', t, this.scaleY); - - this.angle = emitter.rotate.onUpdate(this, 'rotate', t, this.angle); - this.rotation = DegToRad(this.angle); + this.alpha = ops.alpha.onUpdate(this, 'alpha', t, this.alpha); - this.alpha = emitter.alpha.onUpdate(this, 'alpha', t, this.alpha); - - this.tint = emitter.tint.onUpdate(this, 'tint', t, this.tint); + if (ops.color.active) + { + this.tint = ops.color.onUpdate(this, 'color', t, this.tint); + } + else + { + this.tint = ops.tint.onUpdate(this, 'tint', t, this.tint); + } this.lifeCurrent -= delta; return (this.lifeCurrent <= 0); + }, + + /** + * This is a NOOP method and does nothing when called. + * + * @method Phaser.GameObjects.Particles.Particle#setSizeToFrame + * @since 3.60.0 + */ + setSizeToFrame: function () + { + // NOOP + }, + + /** + * Gets the bounds of this particle as a Geometry Rectangle, factoring in any + * transforms of the parent emitter and anything else above it in the display list. + * + * Once calculated the bounds can be accessed via the `Particle.bounds` property. + * + * @method Phaser.GameObjects.Particles.Particle#getBounds + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} [matrix] - Optional transform matrix to apply to this particle. + * + * @return {Phaser.Geom.Rectangle} A Rectangle containing the transformed bounds of this particle. + */ + getBounds: function (matrix) + { + if (matrix === undefined) { matrix = this.emitter.getWorldTransformMatrix(); } + + var sx = Math.abs(matrix.scaleX) * this.scaleX; + var sy = Math.abs(matrix.scaleY) * this.scaleY; + + var x = this.x; + var y = this.y; + var rotation = this.rotation; + var width = (this.frame.width * sx) / 2; + var height = (this.frame.height * sy) / 2; + + var bounds = this.bounds; + + var topLeft = new Vector2(x - width, y - height); + var topRight = new Vector2(x + width, y - height); + var bottomLeft = new Vector2(x - width, y + height); + var bottomRight = new Vector2(x + width, y + height); + + if (rotation !== 0) + { + RotateAround(topLeft, x, y, rotation); + RotateAround(topRight, x, y, rotation); + RotateAround(bottomLeft, x, y, rotation); + RotateAround(bottomRight, x, y, rotation); + } + + matrix.transformPoint(topLeft.x, topLeft.y, topLeft); + matrix.transformPoint(topRight.x, topRight.y, topRight); + matrix.transformPoint(bottomLeft.x, bottomLeft.y, bottomLeft); + matrix.transformPoint(bottomRight.x, bottomRight.y, bottomRight); + + bounds.x = Math.min(topLeft.x, topRight.x, bottomLeft.x, bottomRight.x); + bounds.y = Math.min(topLeft.y, topRight.y, bottomLeft.y, bottomRight.y); + bounds.width = Math.max(topLeft.x, topRight.x, bottomLeft.x, bottomRight.x) - bounds.x; + bounds.height = Math.max(topLeft.y, topRight.y, bottomLeft.y, bottomRight.y) - bounds.y; + + return bounds; + }, + + /** + * Destroys this Particle. + * + * @method Phaser.GameObjects.Particles.Particle#destroy + * @since 3.60.0 + */ + destroy: function () + { + this.anims.destroy(); + + this.anims = null; + this.emitter = null; + this.texture = null; + this.frame = null; + this.scene = null; } }); @@ -58247,201 +59167,379 @@ module.exports = Particle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(95723); +var Add = __webpack_require__(78991); var Class = __webpack_require__(56694); var Components = __webpack_require__(64937); +var ComponentsToJSON = __webpack_require__(48129); +var CopyFrom = __webpack_require__(29538); var DeathZone = __webpack_require__(69361); var EdgeZone = __webpack_require__(54213); +var EmitterColorOp = __webpack_require__(19737); var EmitterOp = __webpack_require__(93025); +var Events = __webpack_require__(40629); +var GameObject = __webpack_require__(89980); var GetFastValue = __webpack_require__(72632); var GetRandom = __webpack_require__(72861); +var GravityWell = __webpack_require__(87811); var HasAny = __webpack_require__(53523); var HasValue = __webpack_require__(19256); +var Inflate = __webpack_require__(7782); +var List = __webpack_require__(71207); +var MergeRect = __webpack_require__(14655); var Particle = __webpack_require__(14909); var RandomZone = __webpack_require__(68433); var Rectangle = __webpack_require__(74118); +var RectangleToRectangle = __webpack_require__(90205); +var Remove = __webpack_require__(66458); +var Render = __webpack_require__(69116); var StableSort = __webpack_require__(17922); +var TransformMatrix = __webpack_require__(69360); var Vector2 = __webpack_require__(93736); var Wrap = __webpack_require__(1071); +/** + * Names of simple configuration properties. + * + * @ignore + */ +var configFastMap = [ + 'active', + 'advance', + 'blendMode', + 'collideBottom', + 'collideLeft', + 'collideRight', + 'collideTop', + 'colorEase', + 'deathCallback', + 'deathCallbackScope', + 'duration', + 'emitCallback', + 'emitCallbackScope', + 'follow', + 'frequency', + 'gravityX', + 'gravityY', + 'maxAliveParticles', + 'maxParticles', + 'name', + 'emitting', + 'particleBringToTop', + 'particleClass', + 'radial', + 'sortCallback', + 'sortOrderAsc', + 'sortProperty', + 'stopAfter', + 'tintFill', + 'timeScale', + 'trackVisible', + 'visible' +]; + +/** + * Names of complex configuration properties. + * + * @ignore + */ +var configOpMap = [ + 'accelerationX', + 'accelerationY', + 'alpha', + 'angle', + 'bounce', + 'color', + 'delay', + 'lifespan', + 'maxVelocityX', + 'maxVelocityY', + 'moveToX', + 'moveToY', + 'quantity', + 'rotate', + 'scaleX', + 'scaleY', + 'speedX', + 'speedY', + 'tint', + 'x', + 'y' +]; + /** * @classdesc - * A particle emitter represents a single particle stream. - * It controls a pool of {@link Phaser.GameObjects.Particles.Particle Particles} and is controlled by a {@link Phaser.GameObjects.Particles.ParticleEmitterManager Particle Emitter Manager}. + * A Particle Emitter is a special kind of Game Object that controls a pool of {@link Phaser.GameObjects.Particles.Particle Particles}. + * + * Particle Emitters are created via a configuration object. The properties of this object + * can be specified in a variety of formats, given you plenty of scope over the values they + * return, leading to complex visual effects. Here are the different forms of configuration + * value you can give: + * + * ## An explicit static value: + * + * ```js + * x: 400 + * ``` + * + * The x value will always be 400 when the particle is spawned. + * + * ## A random value: + * + * ```js + * x: [ 100, 200, 300, 400 ] + * ``` + * + * The x value will be one of the 4 elements in the given array, picked at random on emission. + * + * ## A custom callback: + * + * ```js + * x: (particle, key, t, value) => { + * return value + 50; + * } + * ``` + * + * The x value is the result of calling this function. This is only used when the + * particle is emitted, so it provides it's initial starting value. It is not used + * when the particle is updated (see the onUpdate callback for that) + * + * ## A start / end object: + * + * This allows you to control the change in value between the given start and + * end parameters over the course of the particles lifetime: + * + * ```js + * scale: { start: 0, end: 1 } + * ``` + * + * The particle scale will start at 0 when emitted and ease to a scale of 1 + * over the course of its lifetime. You can also specify the ease function + * used for this change (the default is Linear): + * + * ```js + * scale: { start: 0, end: 1, ease: 'bounce.out' } + * ``` + * + * ## A start / end random object: + * + * The start and end object can have an optional `random` parameter. + * This forces it to pick a random value between the two values and use + * this as the starting value, then easing to the 'end' parameter over + * its lifetime. + * + * ```js + * scale: { start: 4, end: 0.5, random: true } + * ``` + * + * The particle will start with a random scale between 0.5 and 4 and then + * scale to the end value over its lifetime. You can combine the above + * with the `ease` parameter as well to control the value easing. + * + * ## An interpolation object: + * + * You can provide an array of values which will be used for interpolation + * during the particles lifetime. You can also define the interpolation + * function to be used. There are three provided: `linear` (the default), + * `bezier` and `catmull`, or you can provide your own function. + * + * ```js + * x: { values: [ 50, 500, 200, 800 ], interpolation: 'catmull' } + * ``` + * + * The particle scale will interpolate from 50 when emitted to 800 via the other + * points over the course of its lifetime. You can also specify an ease function + * used to control the rate of change through the values (the default is Linear): + * + * ```js + * x: { values: [ 50, 500, 200, 800 ], interpolation: 'catmull', ease: 'bounce.out } + * ``` + * + * ## A stepped emitter object: + * + * The `steps` parameter allows you to control the placement of sequential + * particles across the start-end range: + * + * ```js + * x: { steps: 32, start: 0, end: 576 } + * ``` + * + * Here we have a range of 576 (start to end). This is divided into 32 steps. + * + * The first particle will emit at the x position of 0. The next will emit + * at the next 'step' along, which would be 18. The following particle will emit + * at the next step, which is 36, and so on. Because the range of 576 has been + * divided by 32, creating 18 pixels steps. When a particle reaches the 'end' + * value the next one will start from the beginning again. + * + * ## A stepped emitter object with yoyo: + * + * You can add the optional `yoyo` property to a stepped object: + * + * ```js + * x: { steps: 32, start: 0, end: 576, yoyo: true } + * ``` + * + * As with the stepped emitter, particles are emitted in sequence, from 'start' + * to 'end' in step sized jumps. Normally, when a stepped emitter reaches the + * end it snaps around to the start value again. However, if you provide the 'yoyo' + * parameter then when it reaches the end it will reverse direction and start + * emitting back down to 'start' again. Depending on the effect you require this + * can often look better. + * + * ## A min / max object: + * + * This allows you to pick a random float value between the min and max properties: + * + * ```js + * x: { min: 100, max: 700 } + * ``` + * + * The x value will be a random float between min and max. + * + * You can force it select an integer by setting the 'int' flag: + * + * ```js + * x: { min: 100, max: 700, int: true } + * ``` + * + * Or, you could use the 'random' array approach (see below) + * + * ## A random object: + * + * This allows you to pick a random integer value between the first and second array elements: + * + * ```js + * x: { random: [ 100, 700 ] } + * ``` + * + * The x value will be a random integer between 100 and 700 as it takes the first + * element in the 'random' array as the 'min' value and the 2nd element as the 'max' value. + * + * ## Custom onEmit and onUpdate callbacks: + * + * If the above won't give you the effect you're after, you can provide your own + * callbacks that will be used when the particle is both emitted and updated: + * + * ```js + * x: { + * onEmit: (particle, key, t, value) => { + * return value; + * }, + * onUpdate: (particle, key, t, value) => { + * return value; + * } + * } + * ``` + * + * You can provide either one or both functions. The `onEmit` is called at the + * start of the particles life and defines the value of the property on birth. + * + * The `onUpdate` function is called every time the Particle Emitter updates + * until the particle dies. Both must return a value. + * + * The properties are: + * + * particle - A reference to the Particle instance. + * key - The string based key of the property, i.e. 'x' or 'lifespan'. + * t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death). + * value - The current property value. At a minimum you should return this. + * + * By using the above configuration options you have an unlimited about of + * control over how your particles behave. * * @class ParticleEmitter + * @extends Phaser.GameObjects.GameObject * @memberof Phaser.GameObjects.Particles * @constructor - * @since 3.0.0 + * @since 3.60.0 * + * @extends Phaser.GameObjects.Components.AlphaSingle * @extends Phaser.GameObjects.Components.BlendMode + * @extends Phaser.GameObjects.Components.Depth + * @extends Phaser.GameObjects.Components.FX * @extends Phaser.GameObjects.Components.Mask + * @extends Phaser.GameObjects.Components.Pipeline * @extends Phaser.GameObjects.Components.ScrollFactor + * @extends Phaser.GameObjects.Components.Texture + * @extends Phaser.GameObjects.Components.Transform * @extends Phaser.GameObjects.Components.Visible * - * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} manager - The Emitter Manager this Emitter belongs to. * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Settings for this emitter. */ var ParticleEmitter = new Class({ + Extends: GameObject, + Mixins: [ + Components.AlphaSingle, Components.BlendMode, + Components.Depth, + Components.FX, Components.Mask, + Components.Pipeline, Components.ScrollFactor, - Components.Visible + Components.Texture, + Components.Transform, + Components.Visible, + Render ], initialize: - function ParticleEmitter (manager, config) + function ParticleEmitter (scene, x, y, texture, config) { - /** - * The Emitter Manager this Emitter belongs to. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#manager - * @type {Phaser.GameObjects.Particles.ParticleEmitterManager} - * @since 3.0.0 - */ - this.manager = manager; - - /** - * The texture assigned to particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#texture - * @type {Phaser.Textures.Texture} - * @since 3.0.0 - */ - this.texture = manager.texture; - - /** - * The texture frames assigned to particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#frames - * @type {Phaser.Textures.Frame[]} - * @since 3.0.0 - */ - this.frames = [ manager.defaultFrame ]; - - /** - * The default texture frame assigned to particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#defaultFrame - * @type {Phaser.Textures.Frame} - * @since 3.0.0 - */ - this.defaultFrame = manager.defaultFrame; - - /** - * Names of simple configuration properties. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#configFastMap - * @type {object} - * @since 3.0.0 - */ - this.configFastMap = [ - 'active', - 'blendMode', - 'collideBottom', - 'collideLeft', - 'collideRight', - 'collideTop', - 'deathCallback', - 'deathCallbackScope', - 'emitCallback', - 'emitCallbackScope', - 'follow', - 'frequency', - 'gravityX', - 'gravityY', - 'maxParticles', - 'maxAliveParticles', - 'name', - 'on', - 'particleBringToTop', - 'particleClass', - 'radial', - 'timeScale', - 'trackVisible', - 'visible' - ]; - - /** - * Names of complex configuration properties. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#configOpMap - * @type {object} - * @since 3.0.0 - */ - this.configOpMap = [ - 'accelerationX', - 'accelerationY', - 'angle', - 'alpha', - 'bounce', - 'delay', - 'lifespan', - 'maxVelocityX', - 'maxVelocityY', - 'moveToX', - 'moveToY', - 'quantity', - 'rotate', - 'scaleX', - 'scaleY', - 'speedX', - 'speedY', - 'tint', - 'x', - 'y' - ]; - - /** - * The name of this Particle Emitter. - * - * Empty by default and never populated by Phaser, this is left for developers to use. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#name - * @type {string} - * @default '' - * @since 3.0.0 - */ - this.name = ''; + GameObject.call(this, scene, 'ParticleEmitter'); /** * The Particle Class which will be emitted by this Emitter. * * @name Phaser.GameObjects.Particles.ParticleEmitter#particleClass - * @type {Phaser.Types.GameObjects.Particles.ParticleClassConstructor} + * @type {function} * @default Phaser.GameObjects.Particles.Particle * @since 3.0.0 + * @see Phaser.Types.GameObjects.Particles.ParticleClassConstructor */ this.particleClass = Particle; /** - * The x-coordinate of the particle origin (where particles will be emitted). + * An internal object holding all of the EmitterOp instances. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#x - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setPosition - */ - this.x = new EmitterOp(config, 'x', 0, true); - - /** - * The y-coordinate of the particle origin (where particles will be emitted). + * These are populated as part of the Emitter configuration parsing. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#y - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setPosition + * You typically do not access them directly, but instead use the + * provided getters and setters on this class, such as `ParticleEmitter.speedX` etc. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#ops + * @type {Phaser.Types.GameObjects.Particles.ParticleEmitterOps} + * @since 3.60.0 */ - this.y = new EmitterOp(config, 'y', 0, true); + this.ops = { + accelerationX: new EmitterOp('accelerationX', 0), + accelerationY: new EmitterOp('accelerationY', 0), + alpha: new EmitterOp('alpha', 1), + angle: new EmitterOp('angle', { min: 0, max: 360 }, true), + bounce: new EmitterOp('bounce', 0), + color: new EmitterColorOp('color'), + delay: new EmitterOp('delay', 0, true), + lifespan: new EmitterOp('lifespan', 1000, true), + maxVelocityX: new EmitterOp('maxVelocityX', 10000), + maxVelocityY: new EmitterOp('maxVelocityY', 10000), + moveToX: new EmitterOp('moveToX', 0), + moveToY: new EmitterOp('moveToY', 0), + quantity: new EmitterOp('quantity', 1, true), + rotate: new EmitterOp('rotate', 0), + scaleX: new EmitterOp('scaleX', 1), + scaleY: new EmitterOp('scaleY', 1), + speedX: new EmitterOp('speedX', 0, true), + speedY: new EmitterOp('speedY', 0, true), + tint: new EmitterOp('tint', 0xffffff), + x: new EmitterOp('x', 0), + y: new EmitterOp('y', 0) + }; /** * A radial emitter will emit particles in all directions between angle min and max, @@ -58488,68 +59586,6 @@ var ParticleEmitter = new Class({ */ this.acceleration = false; - /** - * Horizontal acceleration applied to emitted particles, in pixels per second squared. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#accelerationX - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - */ - this.accelerationX = new EmitterOp(config, 'accelerationX', 0, true); - - /** - * Vertical acceleration applied to emitted particles, in pixels per second squared. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#accelerationY - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - */ - this.accelerationY = new EmitterOp(config, 'accelerationY', 0, true); - - /** - * The maximum horizontal velocity of emitted particles, in pixels per second squared. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityX - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 10000 - * @since 3.0.0 - */ - this.maxVelocityX = new EmitterOp(config, 'maxVelocityX', 10000, true); - - /** - * The maximum vertical velocity of emitted particles, in pixels per second squared. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityY - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 10000 - * @since 3.0.0 - */ - this.maxVelocityY = new EmitterOp(config, 'maxVelocityY', 10000, true); - - /** - * The initial horizontal speed of emitted particles, in pixels per second. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#speedX - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setSpeedX - */ - this.speedX = new EmitterOp(config, 'speedX', 0, true); - - /** - * The initial vertical speed of emitted particles, in pixels per second. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#speedY - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setSpeedY - */ - this.speedY = new EmitterOp(config, 'speedY', 0, true); - /** * Whether moveToX and moveToY are set. Set automatically during configuration. * @@ -58563,113 +59599,6 @@ var ParticleEmitter = new Class({ */ this.moveTo = false; - /** - * The x-coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#moveToX - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - */ - this.moveToX = new EmitterOp(config, 'moveToX', null, true); - - /** - * The y-coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#moveToY - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - */ - this.moveToY = new EmitterOp(config, 'moveToY', null, true); - - /** - * Whether particles will rebound when they meet the emitter bounds. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#bounce - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - */ - this.bounce = new EmitterOp(config, 'bounce', 0, true); - - /** - * The horizontal scale of emitted particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#scaleX - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 1 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setScale - * @see Phaser.GameObjects.Particles.ParticleEmitter#setScaleX - */ - this.scaleX = new EmitterOp(config, 'scaleX', 1); - - /** - * The vertical scale of emitted particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#scaleY - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 1 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setScale - * @see Phaser.GameObjects.Particles.ParticleEmitter#setScaleY - */ - this.scaleY = new EmitterOp(config, 'scaleY', 1); - - /** - * Color tint applied to emitted particles. Value must not include the alpha channel. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#tint - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0xffffff - * @since 3.0.0 - */ - this.tint = new EmitterOp(config, 'tint', 0xffffff); - - /** - * The alpha (transparency) of emitted particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#alpha - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 1 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setAlpha - */ - this.alpha = new EmitterOp(config, 'alpha', 1); - - /** - * The lifespan of emitted particles, in ms. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#lifespan - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 1000 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setLifespan - */ - this.lifespan = new EmitterOp(config, 'lifespan', 1000, true); - - /** - * The angle of the initial velocity of emitted particles, in degrees. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#angle - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default { min: 0, max: 360 } - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setAngle - */ - this.angle = new EmitterOp(config, 'angle', { min: 0, max: 360 }, true); - - /** - * The rotation of emitted particles, in degrees. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#rotate - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - */ - this.rotate = new EmitterOp(config, 'rotate', 0); - /** * A function to call when a particle is emitted. * @@ -58711,7 +59640,10 @@ var ParticleEmitter = new Class({ this.deathCallbackScope = null; /** - * Set to hard limit the amount of particle objects this emitter is allowed to create. + * Set to hard limit the amount of particle objects this emitter is allowed to create + * in total. This is the number of `Particle` instances it can create, not the number + * of 'alive' particles. + * * 0 means unlimited. * * @name Phaser.GameObjects.Particles.ParticleEmitter#maxParticles @@ -58722,7 +59654,7 @@ var ParticleEmitter = new Class({ this.maxParticles = 0; /** - * The maximum number of alive (and rendering) particles this emitter will update. + * The maximum number of alive and rendering particles this emitter will update. * When this limit is reached, a particle needs to die before another can be emitted. * * 0 means no limits. @@ -58735,26 +59667,48 @@ var ParticleEmitter = new Class({ this.maxAliveParticles = 0; /** - * How many particles are emitted each time particles are emitted (one explosion or one flow cycle). + * If set, either via the Emitter config, or by directly setting this property, + * the Particle Emitter will stop emitting particles once this total has been + * reached. It will then enter a 'stopped' state, firing the `STOP` + * event. Note that entering a stopped state doesn't mean all the particles + * have finished, just that it's not emitting any further ones. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#quantity - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 1 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrequency - * @see Phaser.GameObjects.Particles.ParticleEmitter#setQuantity + * To know when the final particle expires, listen for the COMPLETE event. + * + * Use this if you wish to launch an exact number of particles and then stop + * your emitter afterwards. + * + * The counter is reset each time the `ParticleEmitter.start` method is called. + * + * 0 means the emitter will not stop based on total emitted particles. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#stopAfter + * @type {number} + * @default 0 + * @since 3.60.0 */ - this.quantity = new EmitterOp(config, 'quantity', 1, true); + this.stopAfter = 0; /** - * How many ms to wait after emission before the particles start updating. + * The number of milliseconds this emitter will emit particles for when in flow mode, + * before it stops emission. A value of 0 (the default) means there is no duration. + * + * When the duration expires the `STOP` event is emitted. Note that entering a + * stopped state doesn't mean all the particles have finished, just that it's + * not emitting any further ones. + * + * To know when the final particle expires, listen for the COMPLETE event. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#delay - * @type {Phaser.GameObjects.Particles.EmitterOp} + * The counter is reset each time the `ParticleEmitter.start` method is called. + * + * 0 means the emitter will not stop based on duration. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#duration + * @type {number} * @default 0 - * @since 3.0.0 + * @since 3.60.0 */ - this.delay = new EmitterOp(config, 'delay', 0, true); + this.duration = 0; /** * For a flow emitter, the time interval (>= 0) between particle flow cycles in ms. @@ -58773,20 +59727,25 @@ var ParticleEmitter = new Class({ /** * Controls if the emitter is currently emitting a particle flow (when frequency >= 0). + * * Already alive particles will continue to update until they expire. + * * Controlled by {@link Phaser.GameObjects.Particles.ParticleEmitter#start} and {@link Phaser.GameObjects.Particles.ParticleEmitter#stop}. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#on + * @name Phaser.GameObjects.Particles.ParticleEmitter#emitting * @type {boolean} * @default true * @since 3.0.0 */ - this.on = true; + this.emitting = true; /** * Newly emitted particles are added to the top of the particle list, i.e. rendered above those already alive. + * * Set to false to send them to the back. * + * Also see the `sortOrder` property for more complex particle sorting. + * * @name Phaser.GameObjects.Particles.ParticleEmitter#particleBringToTop * @type {boolean} * @default true @@ -58805,29 +59764,64 @@ var ParticleEmitter = new Class({ this.timeScale = 1; /** - * An object describing a shape to emit particles from. + * An array containing Particle Emission Zones. These can be either EdgeZones or RandomZones. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#emitZone - * @type {?Phaser.GameObjects.Particles.Zones.EdgeZone|Phaser.GameObjects.Particles.Zones.RandomZone} - * @default null - * @since 3.0.0 + * Particles are emitted from a randomly selected zone from this array. + * + * Prior to Phaser v3.60 an Emitter could only have one single Emission Zone. + * In 3.60 they can now have an array of Emission Zones. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#emitZones + * @type {Phaser.GameObjects.Particles.Zones.EdgeZone[]|Phaser.GameObjects.Particles.Zones.RandomZone[]} + * @since 3.60.0 * @see Phaser.GameObjects.Particles.ParticleEmitter#setEmitZone */ - this.emitZone = null; + this.emitZones = []; /** - * An object describing a shape that deactivates particles when they interact with it. + * An array containing Particle Death Zone objects. A particle is immediately killed as soon as its x/y coordinates + * intersect with any of the configured Death Zones. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#deathZone - * @type {?Phaser.GameObjects.Particles.Zones.DeathZone} - * @default null - * @since 3.0.0 + * Prior to Phaser v3.60 an Emitter could only have one single Death Zone. + * In 3.60 they can now have an array of Death Zones. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#deathZones + * @type {Phaser.GameObjects.Particles.Zones.DeathZone[]} + * @since 3.60.0 * @see Phaser.GameObjects.Particles.ParticleEmitter#setDeathZone */ - this.deathZone = null; + this.deathZones = []; + + /** + * An optional Rectangle object that is used during rendering to cull Particles from + * display. For example, if your particles are limited to only move within a 300x300 + * sized area from their origin, then you can set this Rectangle to those dimensions. + * + * The renderer will check to see if the `viewBounds` Rectangle intersects with the + * Camera bounds during the render step and if not it will skip rendering the Emitter + * entirely. + * + * This allows you to create many emitters in a Scene without the cost of + * rendering if the contents aren't visible. + * + * Note that the Emitter will not perform any checks to see if the Particles themselves + * are outside of these bounds, or not. It will simply check the bounds against the + * camera. Use the `getBounds` method with the `advance` parameter to help define + * the location and placement of the view bounds. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#viewBounds + * @type {?Phaser.Geom.Rectangle} + * @default null + * @since 3.60.0 + * @see Phaser.GameObjects.Particles.ParticleEmitter#setViewBounds + */ + this.viewBounds = null; /** - * A rectangular boundary constraining particle movement. + * A rectangular boundary constraining particle movement. Use the Emitter properties `collideLeft`, + * `collideRight`, `collideTop` and `collideBottom` to control if a particle will rebound off + * the sides of this boundary, or not. This happens when the particles x/y coordinate hits + * the boundary. * * @name Phaser.GameObjects.Particles.ParticleEmitter#bounds * @type {?Phaser.Geom.Rectangle} @@ -58877,40 +59871,6 @@ var ParticleEmitter = new Class({ */ this.collideBottom = true; - /** - * Whether this emitter updates itself and its particles. - * - * Controlled by {@link Phaser.GameObjects.Particles.ParticleEmitter#pause} - * and {@link Phaser.GameObjects.Particles.ParticleEmitter#resume}. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#active - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.active = true; - - /** - * Set this to false to hide any active particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#visible - * @type {boolean} - * @default true - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setVisible - */ - this.visible = true; - - /** - * The blend mode of this emitter's particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#blendMode - * @type {number} - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setBlendMode - */ - this.blendMode = BlendModes.NORMAL; - /** * A Game Object whose position is used as the particle origin. * @@ -58946,15 +59906,13 @@ var ParticleEmitter = new Class({ this.trackVisible = false; /** - * The current texture frame, as an index of {@link Phaser.GameObjects.Particles.ParticleEmitter#frames}. + * The texture frames assigned to particles. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#currentFrame - * @type {number} - * @default 0 + * @name Phaser.GameObjects.Particles.ParticleEmitter#frames + * @type {Phaser.Textures.Frame[]} * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrame */ - this.currentFrame = 0; + this.frames = []; /** * Whether texture {@link Phaser.GameObjects.Particles.ParticleEmitter#frames} are selected at random. @@ -58979,7 +59937,38 @@ var ParticleEmitter = new Class({ this.frameQuantity = 1; /** - * Inactive particles. + * The animations assigned to particles. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#anims + * @type {string[]} + * @since 3.60.0 + */ + this.anims = []; + + /** + * Whether animations {@link Phaser.GameObjects.Particles.ParticleEmitter#anims} are selected at random. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#randomAnim + * @type {boolean} + * @default true + * @since 3.60.0 + * @see Phaser.GameObjects.Particles.ParticleEmitter#setAnim + */ + this.randomAnim = true; + + /** + * The number of consecutive particles that receive a single animation (per frame cycle). + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#animQuantity + * @type {number} + * @default 1 + * @since 3.60.0 + * @see Phaser.GameObjects.Particles.ParticleEmitter#setAnim + */ + this.animQuantity = 1; + + /** + * An array containing all currently inactive Particle instances. * * @name Phaser.GameObjects.Particles.ParticleEmitter#dead * @type {Phaser.GameObjects.Particles.Particle[]} @@ -58989,7 +59978,7 @@ var ParticleEmitter = new Class({ this.dead = []; /** - * Active particles + * An array containing all currently live and rendering Particle instances. * * @name Phaser.GameObjects.Particles.ParticleEmitter#alive * @type {Phaser.GameObjects.Particles.Particle[]} @@ -58999,85 +59988,210 @@ var ParticleEmitter = new Class({ this.alive = []; /** - * The time until the next flow cycle. + * Internal array that holds counter data: + * + * 0 - flowCounter - The time until next flow cycle. + * 1 - frameCounter - Counts up to {@link Phaser.GameObjects.Particles.ParticleEmitter#frameQuantity}. + * 2 - animCounter - Counts up to animQuantity. + * 3 - elapsed - The time remaining until the `duration` limit is reached. + * 4 - stopCounter - The number of particles remaining until `stopAfter` limit is reached. + * 5 - completeFlag - Has the COMPLETE event been emitted? + * 6 - zoneIndex - The emit zone index counter. + * 7 - zoneTotal - The emit zone total counter. + * 8 - currentFrame - The current texture frame, as an index of {@link Phaser.GameObjects.Particles.ParticleEmitter#frames}. + * 9 - currentAnim - The current animation, as an index of {@link Phaser.GameObjects.Particles.ParticleEmitter#anims}. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#_counter + * @name Phaser.GameObjects.Particles.ParticleEmitter#counters + * @type {Float32Array} + * @private + * @since 3.60.0 + */ + this.counters = new Float32Array(10); + + /** + * Cached amount of frames in the `ParticleEmitter.frames` array. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#_frameLength * @type {number} * @private * @default 0 * @since 3.0.0 */ - this._counter = 0; + this._frameLength = 0; /** - * Counts up to {@link Phaser.GameObjects.Particles.ParticleEmitter#frameQuantity}. + * Cached amount of animations in the `ParticleEmitter.anims` array. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#_frameCounter + * @name Phaser.GameObjects.Particles.ParticleEmitter#_animLength * @type {number} * @private * @default 0 - * @since 3.0.0 + * @since 3.60.0 + */ + this._animLength = 0; + + /** + * An internal property used to tell when the emitter is in fast-forwarc mode. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#skipping + * @type {boolean} + * @default true + * @since 3.60.0 + */ + this.skipping = false; + + /** + * An internal Transform Matrix used to cache this emitters world matrix. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#worldMatrix + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.60.0 + */ + this.worldMatrix = new TransformMatrix(); + + /** + * Optionally sort the particles before they render based on this + * property. The property must exist on the `Particle` class, such + * as `y`, `lifeT`, `scaleX`, etc. + * + * When set this overrides the `particleBringToTop` setting. + * + * To reset this and disable sorting, so this property to an empty string. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#sortProperty + * @type {string} + * @since 3.60.0 + */ + this.sortProperty = ''; + + /** + * When `sortProperty` is defined this controls the sorting order, + * either ascending or descending. Toggle to control the visual effect. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#sortOrderAsc + * @type {boolean} + * @since 3.60.0 + */ + this.sortOrderAsc = true; + + /** + * The callback used to sort the particles. Only used if `sortProperty` + * has been set. Set this via the `setSortCallback` method. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#sortCallback + * @type {?Phaser.Types.GameObjects.Particles.ParticleSortCallback} + * @since 3.60.0 + */ + this.sortCallback = this.depthSortCallback; + + /** + * A list of Particle Processors being managed by this Emitter. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#processors + * @type {Phaser.Structs.List.} + * @since 3.60.0 + */ + this.processors = new List(this); + + /** + * The tint fill mode used by the Particles in this Emitter. + * + * `false` = An additive tint (the default), where vertices colors are blended with the texture. + * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#tintFill + * @type {boolean} + * @default false + * @since 3.60.0 */ - this._frameCounter = 0; + this.tintFill = false; + + this.initPipeline(); + + this.setPosition(x, y); + this.setTexture(texture); if (config) { - this.fromJSON(config); + this.setConfig(config); } }, + // Overrides Game Object method + addedToScene: function () + { + this.scene.sys.updateList.add(this); + }, + + // Overrides Game Object method + removedFromScene: function () + { + this.scene.sys.updateList.remove(this); + }, + + /** + * Gets all active Particle Processors. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#getProcessors + * @since 3.60.0 + * + * @return {Phaser.GameObjects.Particles.ParticleProcessor[]} - An array of active Particle Processors. + */ + getProcessors: function () + { + return this.processors.getAll('active', true); + }, + /** * Merges configuration settings into the emitter's current settings. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#fromJSON - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#setConfig + * @since 3.60.0 * * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Settings for this emitter. * * @return {this} This Particle Emitter. */ - fromJSON: function (config) + setConfig: function (config) { if (!config) { return this; } - // Only update properties from their current state if they exist in the given config - var i = 0; var key = ''; - for (i = 0; i < this.configFastMap.length; i++) + var ops = this.ops; + + for (i = 0; i < configOpMap.length; i++) { - key = this.configFastMap[i]; + key = configOpMap[i]; - if (HasValue(config, key)) - { - this[key] = GetFastValue(config, key); - } + ops[key].loadConfig(config); } - for (i = 0; i < this.configOpMap.length; i++) + for (i = 0; i < configFastMap.length; i++) { - key = this.configOpMap[i]; + key = configFastMap[i]; + // Only update properties from their current state if they exist in the given config if (HasValue(config, key)) { - this[key].loadConfig(config); + this[key] = GetFastValue(config, key); } } - this.acceleration = (this.accelerationX.propertyValue !== 0 || this.accelerationY.propertyValue !== 0); + this.acceleration = (this.accelerationX !== 0 || this.accelerationY !== 0); - this.moveTo = (this.moveToX.propertyValue !== null && this.moveToY.propertyValue !== null); + this.moveTo = (this.moveToX !== 0 && this.moveToY !== 0); // Special 'speed' override if (HasValue(config, 'speed')) { - this.speedX.loadConfig(config, 'speed'); - this.speedY = null; + ops.speedX.loadConfig(config, 'speed'); + ops.speedY.active = false; } // If you specify speedX, speedY or moveTo then it changes the emitter from radial to a point emitter @@ -59090,8 +60204,8 @@ var ParticleEmitter = new Class({ if (HasValue(config, 'scale')) { - this.scaleX.loadConfig(config, 'scale'); - this.scaleY.loadConfig(config, 'scale'); + ops.scaleX.loadConfig(config, 'scale'); + ops.scaleY.active = false; } if (HasValue(config, 'callbackScope')) @@ -59104,12 +60218,12 @@ var ParticleEmitter = new Class({ if (HasValue(config, 'emitZone')) { - this.setEmitZone(config.emitZone); + this.addEmitZone(config.emitZone); } if (HasValue(config, 'deathZone')) { - this.setDeathZone(config.deathZone); + this.addDeathZone(config.deathZone); } if (HasValue(config, 'bounds')) @@ -59122,9 +60236,18 @@ var ParticleEmitter = new Class({ this.followOffset.setFromObject(GetFastValue(config, 'followOffset', 0)); } + if (HasValue(config, 'texture')) + { + this.setTexture(config.texture); + } + if (HasValue(config, 'frame')) { - this.setFrame(config.frame); + this.setEmitterFrame(config.frame); + } + else if (HasValue(config, 'anim')) + { + this.setAnim(config.anim); } if (HasValue(config, 'reserve')) @@ -59132,6 +60255,18 @@ var ParticleEmitter = new Class({ this.reserve(config.reserve); } + if (HasValue(config, 'advance')) + { + this.fastForward(config.advance); + } + + this.resetCounters(this.frequency, this.emitting); + + if (this.emitting) + { + this.emit(Events.START, this); + } + return this; }, @@ -59141,51 +60276,76 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#toJSON * @since 3.0.0 * - * @param {object} [output] - An object to copy output into. - * - * @return {object} - The output object. + * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. */ - toJSON: function (output) + toJSON: function () { - if (output === undefined) { output = {}; } + var output = ComponentsToJSON(this); var i = 0; var key = ''; - for (i = 0; i < this.configFastMap.length; i++) + for (i = 0; i < configFastMap.length; i++) { - key = this.configFastMap[i]; + key = configFastMap[i]; output[key] = this[key]; } - for (i = 0; i < this.configOpMap.length; i++) + var ops = this.ops; + + for (i = 0; i < configOpMap.length; i++) { - key = this.configOpMap[i]; + key = configOpMap[i]; - if (this[key]) + if (ops[key]) { - output[key] = this[key].toJSON(); + output[key] = ops[key].toJSON(); } } // special handlers - if (!this.speedY) + if (!ops.speedY.active) { delete output.speedX; - output.speed = this.speedX.toJSON(); + output.speed = ops.speedX.toJSON(); } if (this.scaleX === this.scaleY) { delete output.scaleX; delete output.scaleY; - output.scale = this.scaleX.toJSON(); + output.scale = ops.scaleX.toJSON(); } return output; }, + /** + * Resets the internal counter trackers. + * + * You shouldn't ever need to call this directly. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#resetCounters + * @since 3.60.0 + * + * @param {number} frequency - The frequency counter. + * @param {boolean} on - Set the complete flag. + */ + resetCounters: function (frequency, on) + { + var counters = this.counters; + + counters.fill(0); + + counters[0] = frequency; + + if (on) + { + counters[5] = 1; + } + }, + /** * Continuously moves the particle origin to follow a Game Object's position. * @@ -59239,40 +60399,43 @@ var ParticleEmitter = new Class({ */ getFrame: function () { - if (this.frames.length === 1) + var frames = this.frames; + var current; + + if (frames.length === 1) { - return this.defaultFrame; + current = frames[0]; } else if (this.randomFrame) { - return GetRandom(this.frames); + current = GetRandom(frames); } else { - var frame = this.frames[this.currentFrame]; + current = frames[this.currentFrame]; - this._frameCounter++; + this.frameCounter++; - if (this._frameCounter === this.frameQuantity) + if (this.frameCounter >= this.frameQuantity) { - this._frameCounter = 0; + this.frameCounter = 0; this.currentFrame = Wrap(this.currentFrame + 1, 0, this._frameLength); } - - return frame; } - }, - // frame: 0 - // frame: 'red' - // frame: [ 0, 1, 2, 3 ] - // frame: [ 'red', 'green', 'blue', 'pink', 'white' ] - // frame: { frames: [ 'red', 'green', 'blue', 'pink', 'white' ], [cycle: bool], [quantity: int] } + return this.texture.get(current); + }, /** - * Sets a pattern for assigning texture frames to emitted particles. + * Sets a pattern for assigning texture frames to emitted particles. The `frames` configuration can be any of: + * + * frame: 0 + * frame: 'red' + * frame: [ 0, 1, 2, 3 ] + * frame: [ 'red', 'green', 'blue', 'pink', 'white' ] + * frame: { frames: [ 'red', 'green', 'blue', 'pink', 'white' ], [cycle: bool], [quantity: int] } * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setFrame + * @method Phaser.GameObjects.Particles.ParticleEmitter#setEmitterFrame * @since 3.0.0 * * @param {(array|string|number|Phaser.Types.GameObjects.Particles.ParticleEmitterFrameConfig)} frames - One or more texture frames, or a configuration object. @@ -59281,21 +60444,27 @@ var ParticleEmitter = new Class({ * * @return {this} This Particle Emitter. */ - setFrame: function (frames, pickRandom, quantity) + setEmitterFrame: function (frames, pickRandom, quantity) { if (pickRandom === undefined) { pickRandom = true; } if (quantity === undefined) { quantity = 1; } this.randomFrame = pickRandom; this.frameQuantity = quantity; + this.currentFrame = 0; - this._frameCounter = 0; var t = typeof (frames); - if (Array.isArray(frames) || t === 'string' || t === 'number') + this.frames.length = 0; + + if (Array.isArray(frames)) + { + this.frames = this.frames.concat(frames); + } + else if (t === 'string' || t === 'number') { - this.manager.setEmitterFrames(frames, this); + this.frames.push(frames); } else if (t === 'object') { @@ -59305,7 +60474,7 @@ var ParticleEmitter = new Class({ if (frames) { - this.manager.setEmitterFrames(frames, this); + this.frames = this.frames.concat(frames); } var isCycle = GetFastValue(frameConfig, 'cycle', false); @@ -59327,40 +60496,127 @@ var ParticleEmitter = new Class({ }, /** - * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle movement on or off. + * Chooses an animation from {@link Phaser.GameObjects.Particles.ParticleEmitter#anims}, if populated. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setRadial - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#getAnim + * @since 3.60.0 * - * @param {boolean} [value=true] - Radial mode (true) or point mode (true). + * @return {string} The animation to play, or `null` if there aren't any. + */ + getAnim: function () + { + var anims = this.anims; + + if (anims.length === 0) + { + return null; + } + else if (anims.length === 1) + { + return anims[0]; + } + else if (this.randomAnim) + { + return GetRandom(anims); + } + else + { + var anim = anims[this.currentAnim]; + + this.animCounter++; + + if (this.animCounter >= this.animQuantity) + { + this.animCounter = 0; + this.currentAnim = Wrap(this.currentAnim + 1, 0, this._animLength); + } + + return anim; + } + }, + + /** + * Sets a pattern for assigning animations to emitted particles. The `anims` configuration can be any of: + * + * anim: 'red' + * anim: [ 'red', 'green', 'blue', 'pink', 'white' ] + * anim: { anims: [ 'red', 'green', 'blue', 'pink', 'white' ], [cycle: bool], [quantity: int] } + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setAnim + * @since 3.60.0 + * + * @param {(array|string|Phaser.Types.GameObjects.Particles.ParticleEmitterFrameConfig)} anims - One or more animations, or a configuration object. + * @param {boolean} [pickRandom=true] - Whether animations should be assigned at random from `anims`. + * @param {number} [quantity=1] - The number of consecutive particles that will receive each animation. * * @return {this} This Particle Emitter. */ - setRadial: function (value) + setAnim: function (anims, pickRandom, quantity) { - if (value === undefined) { value = true; } + if (pickRandom === undefined) { pickRandom = true; } + if (quantity === undefined) { quantity = 1; } - this.radial = value; + this.randomAnim = pickRandom; + this.animQuantity = quantity; + + this.currentAnim = 0; + + var t = typeof (anims); + + this.anims.length = 0; + + if (Array.isArray(anims)) + { + this.anims = this.anims.concat(anims); + } + else if (t === 'string') + { + this.anims.push(anims); + } + else if (t === 'object') + { + var animConfig = anims; + + anims = GetFastValue(animConfig, 'anims', null); + + if (anims) + { + this.anims = this.anims.concat(anims); + } + + var isCycle = GetFastValue(animConfig, 'cycle', false); + + this.randomAnim = (isCycle) ? false : true; + + this.animQuantity = GetFastValue(animConfig, 'quantity', quantity); + } + + this._animLength = this.anims.length; + + if (this._animLength === 1) + { + this.animQuantity = 1; + this.randomAnim = false; + } return this; }, /** - * Sets the position of the emitter's particle origin. - * New particles will be emitted here. + * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle movement on or off. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setPosition + * @method Phaser.GameObjects.Particles.ParticleEmitter#setRadial * @since 3.0.0 * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} x - The x-coordinate of the particle origin. - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} y - The y-coordinate of the particle origin. + * @param {boolean} [value=true] - Radial mode (true) or point mode (true). * * @return {this} This Particle Emitter. */ - setPosition: function (x, y) + setRadial: function (value) { - this.x.onChange(x); - this.y.onChange(y); + if (value === undefined) { value = true; } + + this.radial = value; return this; }, @@ -59370,8 +60626,10 @@ var ParticleEmitter = new Class({ * * To remove the boundary, set {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds} to null. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setBounds - * @since 3.0.0 + * Particles will rebound off the edges of the boundary. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setParticleBounds + * @since 3.60.0 * * @param {(number|Phaser.Types.GameObjects.Particles.ParticleEmitterBounds|Phaser.Types.GameObjects.Particles.ParticleEmitterBoundsAlt)} x - The x-coordinate of the left edge of the boundary, or an object representing a rectangle. * @param {number} y - The y-coordinate of the top edge of the boundary. @@ -59380,7 +60638,7 @@ var ParticleEmitter = new Class({ * * @return {this} This Particle Emitter. */ - setBounds: function (x, y, width, height) + setParticleBounds: function (x, y, width, height) { if (typeof x === 'object') { @@ -59405,409 +60663,583 @@ var ParticleEmitter = new Class({ }, /** - * Sets the initial horizontal speed of emitted particles. - * Changes the emitter to point mode. + * Sets the initial radial speed of emitted particles. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setSpeedX - * @since 3.0.0 + * Changes the emitter to radial mode. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setParticleSpeed + * @since 3.60.0 * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second. + * @param {number} x - The horizontal scale of the emitted Particles. + * @param {number} [y=x] - The vertical scale of emitted Particles. If not set it will use the `x` value. * * @return {this} This Particle Emitter. */ - setSpeedX: function (value) + setParticleSpeed: function (x, y) { - this.speedX.onChange(value); + if (y === undefined) { y = x; } + + this.ops.speedX.onChange(x); + + if (x === y) + { + this.ops.speedY.active = false; + } + else + { + this.ops.speedY.onChange(y); + } // If you specify speedX and Y then it changes the emitter from radial to a point emitter - this.radial = false; + this.radial = true; return this; }, /** - * Sets the initial vertical speed of emitted particles. - * Changes the emitter to point mode. + * Sets the vertical and horizontal scale of the emitted particles. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setSpeedY - * @since 3.0.0 + * You can also set the scale of the entire emitter via `setScale`. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setParticleScale + * @since 3.60.0 * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second. + * @param {number} [x=1] - The horizontal scale of the emitted Particles. + * @param {number} [y=x] - The vertical scale of emitted Particles. If not set it will use the `x` value. * * @return {this} This Particle Emitter. */ - setSpeedY: function (value) + setParticleScale: function (x, y) { - if (this.speedY) - { - this.speedY.onChange(value); + if (x === undefined) { x = 1; } + if (y === undefined) { y = x; } - // If you specify speedX and Y then it changes the emitter from radial to a point emitter - this.radial = false; - } + this.ops.scaleX.onChange(x); + this.ops.scaleY.onChange(y); return this; }, /** - * Sets the initial radial speed of emitted particles. - * Changes the emitter to radial mode. + * Sets the gravity applied to emitted particles. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setSpeed - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#setParticleGravity + * @since 3.60.0 * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second. + * @param {number} x - Horizontal acceleration due to gravity, in pixels per second squared. Set to zero for no gravity. + * @param {number} y - Vertical acceleration due to gravity, in pixels per second squared. Set to zero for no gravity. * * @return {this} This Particle Emitter. */ - setSpeed: function (value) + setParticleGravity: function (x, y) { - this.speedX.onChange(value); - this.speedY = null; - - // If you specify speedX and Y then it changes the emitter from radial to a point emitter - this.radial = true; + this.gravityX = x; + this.gravityY = y; return this; }, /** - * Sets the horizontal scale of emitted particles. + * Sets the opacity (alpha) of emitted particles. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setScaleX - * @since 3.0.0 + * You can also set the alpha of the entire emitter via `setAlpha`. * - * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1. + * @method Phaser.GameObjects.Particles.ParticleEmitter#setParticleAlpha + * @since 3.60.0 + * + * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 (transparent) and 1 (opaque). * * @return {this} This Particle Emitter. */ - setScaleX: function (value) + setParticleAlpha: function (value) { - this.scaleX.onChange(value); + this.ops.alpha.onChange(value); return this; }, /** - * Sets the vertical scale of emitted particles. + * Sets the color tint of emitted particles. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setScaleY - * @since 3.0.0 + * This is a WebGL only feature. * - * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1. + * @method Phaser.GameObjects.Particles.ParticleEmitter#setParticleTint + * @since 3.60.0 + * @webglOnly + * + * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 and 0xffffff. * * @return {this} This Particle Emitter. */ - setScaleY: function (value) + setParticleTint: function (value) { - this.scaleY.onChange(value); + this.ops.tint.onChange(value); return this; }, /** - * Sets the scale of emitted particles. This updates both the scaleX and scaleY values. + * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setScale + * The value is given in degrees using Phaser's right-handed coordinate system. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setEmitterAngle * @since 3.0.0 * - * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1. + * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The angle of the initial velocity of emitted particles, in degrees. * * @return {this} This Particle Emitter. */ - setScale: function (value) + setEmitterAngle: function (value) { - this.scaleX.onChange(value); - this.scaleY.onChange(value); + this.ops.angle.onChange(value); return this; }, /** - * Sets the horizontal gravity applied to emitted particles. + * Sets the lifespan of newly emitted particles in milliseconds. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setGravityX - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#setParticleLifespan + * @since 3.60.0 * - * @param {number} value - Acceleration due to gravity, in pixels per second squared. + * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The lifespan of a particle, in ms. * * @return {this} This Particle Emitter. */ - setGravityX: function (value) + setParticleLifespan: function (value) { - this.gravityX = value; + this.lifespan.onChange(value); return this; }, /** - * Sets the vertical gravity applied to emitted particles. + * Sets the number of particles released at each flow cycle or explosion. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setGravityY + * @method Phaser.GameObjects.Particles.ParticleEmitter#setQuantity * @since 3.0.0 * - * @param {number} value - Acceleration due to gravity, in pixels per second squared. + * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} quantity - The number of particles to release at each flow cycle or explosion. * * @return {this} This Particle Emitter. */ - setGravityY: function (value) + setQuantity: function (quantity) { - this.gravityY = value; + this.quantity = quantity; return this; }, /** - * Sets the gravity applied to emitted particles. + * Sets the emitter's {@link Phaser.GameObjects.Particles.ParticleEmitter#frequency} + * and {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setGravity + * @method Phaser.GameObjects.Particles.ParticleEmitter#setFrequency * @since 3.0.0 * - * @param {number} x - Horizontal acceleration due to gravity, in pixels per second squared. - * @param {number} y - Vertical acceleration due to gravity, in pixels per second squared. + * @param {number} frequency - The time interval (>= 0) of each flow cycle, in ms; or -1 to put the emitter in explosion mode. + * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} [quantity] - The number of particles to release at each flow cycle or explosion. * * @return {this} This Particle Emitter. */ - setGravity: function (x, y) + setFrequency: function (frequency, quantity) { - this.gravityX = x; - this.gravityY = y; + this.frequency = frequency; + + this.flowCounter = (frequency > 0) ? frequency : 0; + + if (quantity) + { + this.quantity = quantity; + } return this; }, /** - * Sets the opacity of emitted particles. + * Adds a new Particle Death Zone to this Emitter. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setAlpha - * @since 3.0.0 + * A particle is immediately killed as soon as its x/y coordinates intersect + * with any of the configured Death Zones. * - * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 (transparent) and 1 (opaque). + * The `source` can be a Geometry Shape, such as a Circle, Rectangle or Triangle. + * Any valid object from the `Phaser.Geometry` namespace is allowed, as long as + * it supports a `contains` function. You can set the `type` to be either `onEnter` + * or `onLeave`. * - * @return {this} This Particle Emitter. + * A single Death Zone instance can only exist once within this Emitter, but can belong + * to multiple Emitters. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#addDeathZone + * @since 3.60.0 + * + * @param {Phaser.Types.GameObjects.Particles.DeathZoneObject|Phaser.Types.GameObjects.Particles.DeathZoneObject[]} config - A Death Zone configuration object, a Death Zone instance, a valid Geometry object or an array of them. + * + * @return {Phaser.GameObjects.Particles.Zones.DeathZone} The Death Zone that was added to this Emitter. */ - setAlpha: function (value) + addDeathZone: function (config) { - this.alpha.onChange(value); + if (!Array.isArray(config)) + { + config = [ config ]; + } - return this; + var zone; + + for (var i = 0; i < config.length; i++) + { + zone = config[i]; + + if (zone instanceof DeathZone) + { + Add(this.deathZones, zone); + } + else if (typeof zone.contains === 'function') + { + zone = new DeathZone(zone, true); + + Add(this.deathZones, zone); + } + else + { + var type = GetFastValue(zone, 'type', 'onEnter'); + var source = GetFastValue(zone, 'source', null); + + if (source && typeof source.contains === 'function') + { + var killOnEnter = (type === 'onEnter') ? true : false; + + zone = new DeathZone(source, killOnEnter); + + Add(this.deathZones, zone); + } + } + } + + return zone; }, /** - * Sets the color tint of emitted particles. + * Removes the given Particle Death Zone from this Emitter. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setTint - * @since 3.22.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#removeDeathZone + * @since 3.60.0 * - * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 and 0xffffff. + * @param {Phaser.GameObjects.Particles.Zones.DeathZone} zone - The Death Zone that should be removed from this Emitter. * * @return {this} This Particle Emitter. */ - setTint: function (value) + removeDeathZone: function (zone) { - this.tint.onChange(value); + Remove(this.deathZones, zone); return this; }, /** - * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream. + * Adds a new Particle Emission Zone to this Emitter. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setEmitterAngle - * @since 3.0.0 + * An {@link Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig EdgeZone} places particles on its edges. + * Its {@link Phaser.Types.GameObjects.Particles.EdgeZoneSource source} can be a Curve, Path, Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; + * or any object with a suitable {@link Phaser.Types.GameObjects.Particles.EdgeZoneSourceCallback getPoints} method. * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The angle of the initial velocity of emitted particles. + * A {@link Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig RandomZone} places the particles randomly within its interior. + * Its {@link RandomZoneSource source} can be a Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable {@link Phaser.Types.GameObjects.Particles.RandomZoneSourceCallback getRandomPoint} method. * - * @return {this} This Particle Emitter. + * An Emission Zone can only exist once within this Emitter. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#addEmitZone + * @since 3.60.0 + * + * @param {Phaser.Types.GameObjects.Particles.EmitZoneObject|Phaser.Types.GameObjects.Particles.EmitZoneObject[]} zone - An Emission Zone configuration object, a RandomZone or EdgeZone instance, or an array of them. + * + * @return {Phaser.GameObjects.Particles.Zones.EdgeZone|Phaser.GameObjects.Particles.Zones.RandomZone} The Emission Zone that was added to this Emitter. */ - setEmitterAngle: function (value) + addEmitZone: function (config) { - this.angle.onChange(value); + if (!Array.isArray(config)) + { + config = [ config ]; + } - return this; + var zone; + + for (var i = 0; i < config.length; i++) + { + zone = config[i]; + + if (zone instanceof RandomZone || zone instanceof EdgeZone) + { + Add(this.emitZones, zone); + } + else + { + // Where source = Geom like Circle, or a Path or Curve + // emitZone: { type: 'random', source: X } + // emitZone: { type: 'edge', source: X, quantity: 32, [stepRate=0], [yoyo=false], [seamless=true], [total=1] } + + var type = GetFastValue(zone, 'type', 'random'); + var source = GetFastValue(zone, 'source', null); + + if (type === 'random') + { + zone = new RandomZone(source); + } + else if (type === 'edge') + { + var quantity = GetFastValue(zone, 'quantity', 1); + var stepRate = GetFastValue(zone, 'stepRate', 0); + var yoyo = GetFastValue(zone, 'yoyo', false); + var seamless = GetFastValue(zone, 'seamless', true); + var total = GetFastValue(zone, 'total', -1); + + zone = new EdgeZone(source, quantity, stepRate, yoyo, seamless, total); + } + + if (zone) + { + Add(this.emitZones, zone); + } + } + } + + return zone; }, /** - * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream. + * Removes the given Particle Emission Zone from this Emitter. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setAngle - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#removeEmitZone + * @since 3.60.0 * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The angle of the initial velocity of emitted particles. + * @param {Phaser.GameObjects.Particles.Zones.EdgeZone|Phaser.GameObjects.Particles.Zones.RandomZone} zone - The Emission Zone that should be removed from this Emitter. * * @return {this} This Particle Emitter. */ - setAngle: function (value) + removeEmitZone: function (zone) { - this.angle.onChange(value); + Remove(this.emitZones, zone); + + this.zoneIndex = 0; return this; }, /** - * Sets the lifespan of newly emitted particles. + * Takes the given particle and sets its x/y coordinates to match the next available + * emission zone, if any have been configured. This method is called automatically + * as part of the `Particle.fire` process. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setLifespan - * @since 3.0.0 + * The Emit Zones are iterated in sequence. Once a zone has had a particle emitted + * from it, then the next zone is used and so on, in a loop. * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The particle lifespan, in ms. + * @method Phaser.GameObjects.Particles.ParticleEmitter#getEmitZone + * @since 3.60.0 * - * @return {this} This Particle Emitter. + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle to set the emission zone for. */ - setLifespan: function (value) + getEmitZone: function (particle) { - this.lifespan.onChange(value); + var zones = this.emitZones; + var len = zones.length; - return this; + if (len === 0) + { + return; + } + else + { + var zone = zones[this.zoneIndex]; + + zone.getPoint(particle); + + if (zone.total > -1) + { + this.zoneTotal++; + + if (this.zoneTotal >= zone.total) + { + this.zoneTotal = 0; + + this.zoneIndex = Wrap(this.zoneIndex + 1, 0, len); + } + } + } }, /** - * Sets the number of particles released at each flow cycle or explosion. + * Takes the given particle and checks to see if any of the configured Death Zones + * will kill it and returns the result. This method is called automatically as part + * of the `Particle.update` process. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setQuantity - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#getDeathZone + * @fires Phaser.GameObjects.Particles.Events#DEATH_ZONE + * @since 3.60.0 * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} quantity - The number of particles to release at each flow cycle or explosion. + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle to test against the Death Zones. * - * @return {this} This Particle Emitter. + * @return {boolean} `true` if the particle should be killed, otherwise `false`. */ - setQuantity: function (quantity) + getDeathZone: function (particle) { - this.quantity.onChange(quantity); + var zones = this.deathZones; - return this; + for (var i = 0; i < zones.length; i++) + { + var bounds = particle.getBounds(this.worldMatrix); + + if (zones[i].willKill(bounds.centerX, bounds.centerY)) + { + this.emit(Events.DEATH_ZONE, this, particle, zones[i]); + + return true; + } + } + + return false; }, /** - * Sets the emitter's {@link Phaser.GameObjects.Particles.ParticleEmitter#frequency} - * and {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}. + * Changes the currently active Emission Zone. The zones should have already + * been added to this Emitter either via the emitter config, or the + * `addEmitZone` method. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setFrequency + * Call this method by passing either a numeric zone index value, or + * the zone instance itself. + * + * Prior to v3.60 an Emitter could only have a single Emit Zone and this + * method was how you set it. From 3.60 and up it now performs a different + * function and swaps between all available active zones. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setEmitZone * @since 3.0.0 * - * @param {number} frequency - The time interval (>= 0) of each flow cycle, in ms; or -1 to put the emitter in explosion mode. - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} [quantity] - The number of particles to release at each flow cycle or explosion. + * @param {number|Phaser.GameObjects.Particles.Zones.EdgeZone|Phaser.GameObjects.Particles.Zones.RandomZone} zone - The Emit Zone to set as the active zone. * * @return {this} This Particle Emitter. */ - setFrequency: function (frequency, quantity) + setEmitZone: function (zone) { - this.frequency = frequency; + var index; - this._counter = 0; + if (isFinite(zone)) + { + index = zone; + } + else + { + index = this.emitZones.indexOf(zone); + } - if (quantity) + if (index >= 0) { - this.quantity.onChange(quantity); + this.zoneIndex = index; } return this; }, /** - * Sets or removes the {@link Phaser.GameObjects.Particles.ParticleEmitter#emitZone}. - * - * An {@link Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig EdgeZone} places particles on its edges. Its {@link Phaser.Types.GameObjects.Particles.EdgeZoneSource source} can be a Curve, Path, Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable {@link Phaser.Types.GameObjects.Particles.EdgeZoneSourceCallback getPoints} method. + * Adds a Particle Processor, such as a Gravity Well, to this Emitter. * - * A {@link Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig RandomZone} places randomly within its interior. Its {@link RandomZoneSource source} can be a Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable {@link Phaser.Types.GameObjects.Particles.RandomZoneSourceCallback getRandomPoint} method. + * It will start processing particles from the next update as long as its `active` + * property is set. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setEmitZone - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#addParticleProcessor + * @since 3.60.0 * - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig} [zoneConfig] - An object describing the zone, or `undefined` to remove any current emit zone. + * @param {Phaser.GameObjects.Particles.ParticleProcessor} processor - The Particle Processor to add to this Emitter Manager. * - * @return {this} This Particle Emitter. + * @return {Phaser.GameObjects.Particles.ParticleProcessor} The Particle Processor that was added to this Emitter Manager. */ - setEmitZone: function (zoneConfig) + addParticleProcessor: function (processor) { - if (zoneConfig === undefined) + if (!this.processors.exists(processor)) { - this.emitZone = null; - } - else - { - // Where source = Geom like Circle, or a Path or Curve - // emitZone: { type: 'random', source: X } - // emitZone: { type: 'edge', source: X, quantity: 32, [stepRate=0], [yoyo=false], [seamless=true] } - - var type = GetFastValue(zoneConfig, 'type', 'random'); - var source = GetFastValue(zoneConfig, 'source', null); - - switch (type) + if (processor.emitter) { - case 'random': - - this.emitZone = new RandomZone(source); - - break; - - case 'edge': - - var quantity = GetFastValue(zoneConfig, 'quantity', 1); - var stepRate = GetFastValue(zoneConfig, 'stepRate', 0); - var yoyo = GetFastValue(zoneConfig, 'yoyo', false); - var seamless = GetFastValue(zoneConfig, 'seamless', true); + processor.emitter.removeParticleProcessor(processor); + } - this.emitZone = new EdgeZone(source, quantity, stepRate, yoyo, seamless); + this.processors.add(processor); - break; - } + processor.emitter = this; } - return this; + return processor; }, /** - * Sets or removes the {@link Phaser.GameObjects.Particles.ParticleEmitter#deathZone}. + * Removes a Particle Processor from this Emitter. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setDeathZone - * @since 3.0.0 + * The Processor must belong to this Emitter to be removed. * - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterDeathZoneConfig} [zoneConfig] - An object describing the zone, or `undefined` to remove any current death zone. + * It is not destroyed when removed, allowing you to move it to another Emitter Manager, + * so if you no longer require it you should call its `destroy` method directly. * - * @return {this} This Particle Emitter. + * @method Phaser.GameObjects.Particles.ParticleEmitter#removeParticleProcessor + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.ParticleProcessor} processor - The Particle Processor to remove from this Emitter Manager. + * + * @return {?Phaser.GameObjects.Particles.ParticleProcessor} The Particle Processor that was removed, or null if it could not be found. */ - setDeathZone: function (zoneConfig) + removeParticleProcessor: function (processor) { - if (zoneConfig === undefined) - { - this.deathZone = null; - } - else + if (this.processors.exists(processor)) { - // Where source = Geom like Circle or Rect that supports a 'contains' function - // deathZone: { type: 'onEnter', source: X } - // deathZone: { type: 'onLeave', source: X } - - var type = GetFastValue(zoneConfig, 'type', 'onEnter'); - var source = GetFastValue(zoneConfig, 'source', null); - - if (source && typeof source.contains === 'function') - { - var killOnEnter = (type === 'onEnter') ? true : false; + this.processors.remove(processor, true); - this.deathZone = new DeathZone(source, killOnEnter); - } + processor.emitter = null; } - return this; + return processor; + }, + + /** + * Creates a new Gravity Well, adds it to this Emitter and returns a reference to it. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#createGravityWell + * @since 3.60.0 + * + * @param {Phaser.Types.GameObjects.Particles.GravityWellConfig} config - Configuration settings for the Gravity Well to create. + * + * @return {Phaser.GameObjects.Particles.GravityWell} The Gravity Well that was created. + */ + createGravityWell: function (config) + { + return this.addParticleProcessor(new GravityWell(config)); }, /** * Creates inactive particles and adds them to this emitter's pool. * + * If `ParticleEmitter.maxParticles` is set it will limit the + * value passed to this method to make sure it's not exceeded. + * * @method Phaser.GameObjects.Particles.ParticleEmitter#reserve * @since 3.0.0 * - * @param {number} particleCount - The number of particles to create. + * @param {number} count - The number of particles to create. * * @return {this} This Particle Emitter. */ - reserve: function (particleCount) + reserve: function (count) { var dead = this.dead; - for (var i = 0; i < particleCount; i++) + if (this.maxParticles > 0) + { + var total = this.getParticleCount(); + + if (total + count > this.maxParticles) + { + count = this.maxParticles - (total + count); + } + } + + for (var i = 0; i < count; i++) { dead.push(new this.particleClass(this)); } @@ -59938,7 +61370,9 @@ var ParticleEmitter = new Class({ }, /** - * Deactivates every particle in this emitter. + * Deactivates every particle in this emitter immediately. + * + * This particles are killed but do not emit an event or callback. * * @method Phaser.GameObjects.Particles.ParticleEmitter#killAll * @since 3.0.0 @@ -59959,13 +61393,14 @@ var ParticleEmitter = new Class({ }, /** - * Calls a function for each active particle in this emitter. + * Calls a function for each active particle in this emitter. The function is + * sent two parameters: a reference to the Particle instance and to this Emitter. * * @method Phaser.GameObjects.Particles.ParticleEmitter#forEachAlive * @since 3.0.0 * * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function. - * @param {*} context - The function's calling context. + * @param {*} context - The functions calling context. * * @return {this} This Particle Emitter. */ @@ -59974,10 +61409,10 @@ var ParticleEmitter = new Class({ var alive = this.alive; var length = alive.length; - for (var index = 0; index < length; ++index) + for (var i = 0; i < length; i++) { // Sends the Particle and the Emitter - callback.call(context, alive[index], this); + callback.call(context, alive[i], this); } return this; @@ -59990,7 +61425,7 @@ var ParticleEmitter = new Class({ * @since 3.0.0 * * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function. - * @param {*} context - The function's calling context. + * @param {*} context - The functions calling context. * * @return {this} This Particle Emitter. */ @@ -59999,10 +61434,9 @@ var ParticleEmitter = new Class({ var dead = this.dead; var length = dead.length; - for (var index = 0; index < length; ++index) + for (var i = 0; i < length; i++) { - // Sends the Particle and the Emitter - callback.call(context, dead[index], this); + callback.call(context, dead[i], this); } return this; @@ -60016,31 +61450,74 @@ var ParticleEmitter = new Class({ * If this emitter is in explode mode (frequency = -1), nothing will happen. * Use {@link Phaser.GameObjects.Particles.ParticleEmitter#explode} or {@link Phaser.GameObjects.Particles.ParticleEmitter#flow} instead. * + * Calling this method will emit the `START` event. + * * @method Phaser.GameObjects.Particles.ParticleEmitter#start + * @fires Phaser.GameObjects.Particles.Events#START * @since 3.0.0 * + * @param {number} [advance=0] - Advance this number of ms in time through the emitter. + * @param {number} [duration=0] - Limit this emitter to only emit particles for the given number of ms. Setting this parameter will override any duration already set in the Emitter configuration object. + * * @return {this} This Particle Emitter. */ - start: function () + start: function (advance, duration) { - this.on = true; + if (advance === undefined) { advance = 0; } + + if (!this.emitting) + { + if (advance > 0) + { + this.fastForward(advance); + } + + this.emitting = true; - this._counter = 0; + this.resetCounters(this.frequency, true); + + if (duration !== undefined) + { + this.duration = Math.abs(duration); + } + + this.emit(Events.START, this); + } return this; }, /** - * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#on off} the emitter. + * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#emitting off} the emitter and + * stops it from emitting further particles. Currently alive particles will remain + * active until they naturally expire unless you set the `kill` parameter to `true`. + * + * Calling this method will emit the `STOP` event. When the final particle has + * expired the `COMPLETE` event will be emitted. * * @method Phaser.GameObjects.Particles.ParticleEmitter#stop + * @fires Phaser.GameObjects.Particles.Events#STOP * @since 3.11.0 * + * @param {boolean} [kill=false] - Kill all particles immediately (true), or leave them to die after their lifespan expires? (false, the default) + * * @return {this} This Particle Emitter. */ - stop: function () + stop: function (kill) { - this.on = false; + if (kill === undefined) { kill = false; } + + if (this.emitting) + { + this.emitting = false; + + if (kill) + { + this.killAll(); + } + + this.emit(Events.STOP, this); + } return this; }, @@ -60076,16 +61553,72 @@ var ParticleEmitter = new Class({ }, /** - * Removes the emitter from its manager and the scene. + * Set the property by which active particles are sorted prior to be rendered. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#remove - * @since 3.22.0 + * It allows you to control the rendering order of the particles. + * + * This can be any valid property of the `Particle` class, such as `y`, `alpha` + * or `lifeT`. + * + * The 'alive' particles array is sorted in place each game frame. Setting a + * sort property will override the `particleBringToTop` setting. + * + * If you wish to use your own sorting function, see `setSortCallback` instead. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setSortProperty + * @since 3.60.0 + * + * @param {string} [property] - The property on the `Particle` class to sort by. + * @param {boolean} [ascending=true] - Should the particles be sorted in ascending or descending order? * * @return {this} This Particle Emitter. */ - remove: function () + setSortProperty: function (property, ascending) + { + if (property === undefined) { property = ''; } + if (ascending === undefined) { ascending = this.true; } + + this.sortProperty = property; + this.sortOrderAsc = ascending; + this.sortCallback = this.depthSortCallback; + + return this; + }, + + /** + * Sets a callback to be used to sort the particles before rendering each frame. + * + * This allows you to define your own logic and behavior in the callback. + * + * The callback will be sent two parameters: the two Particles being compared, + * and must adhere to the criteria of the `compareFn` in `Array.sort`: + * + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description + * + * Call this method with no parameters to reset the sort callback. + * + * Setting your own callback will override both the `particleBringToTop` and + * `sortProperty` settings of this Emitter. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setSortCallback + * @since 3.60.0 + * + * @param {Phaser.Types.GameObjects.Particles.ParticleSortCallback} [callback] - The callback to invoke when the particles are sorted. Leave undefined to reset to the default. + * + * @return {this} This Particle Emitter. + */ + setSortCallback: function (callback) { - this.manager.removeEmitter(this); + if (this.sortProperty !== '') + { + callback = this.depthSortCallback; + } + else + { + callback = null; + } + + this.sortCallback = callback; return this; }, @@ -60100,31 +61633,64 @@ var ParticleEmitter = new Class({ */ depthSort: function () { - StableSort(this.alive, this.depthSortCallback); + StableSort(this.alive, this.sortCallback.bind(this)); return this; }, + /** + * Calculates the difference of two particles, for sorting them by depth. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#depthSortCallback + * @since 3.0.0 + * + * @param {object} a - The first particle. + * @param {object} b - The second particle. + * + * @return {number} The difference of a and b's y coordinates. + */ + depthSortCallback: function (a, b) + { + var key = this.sortProperty; + + if (this.sortOrderAsc) + { + return a[key] - b[key]; + } + else + { + return b[key] - a[key]; + } + }, + /** * Puts the emitter in flow mode (frequency >= 0) and starts (or restarts) a particle flow. * * To resume a flow at the current frequency and quantity, use {@link Phaser.GameObjects.Particles.ParticleEmitter#start} instead. * * @method Phaser.GameObjects.Particles.ParticleEmitter#flow + * @fires Phaser.GameObjects.Particles.Events#START * @since 3.0.0 * * @param {number} frequency - The time interval (>= 0) of each flow cycle, in ms. * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} [count=1] - The number of particles to emit at each flow cycle. + * @param {number} [stopAfter] - Stop this emitter from firing any more particles once this value is reached. Set to zero for unlimited. Setting this parameter will override any `stopAfter` value already set in the Emitter configuration object. * * @return {this} This Particle Emitter. */ - flow: function (frequency, count) + flow: function (frequency, count, stopAfter) { if (count === undefined) { count = 1; } + this.emitting = false; + this.frequency = frequency; + this.quantity = count; - this.quantity.onChange(count); + if (stopAfter !== undefined) + { + this.stopAfter = stopAfter; + } return this.start(); }, @@ -60133,6 +61699,7 @@ var ParticleEmitter = new Class({ * Puts the emitter in explode mode (frequency = -1), stopping any current particle flow, and emits several particles all at once. * * @method Phaser.GameObjects.Particles.ParticleEmitter#explode + * @fires Phaser.GameObjects.Particles.Events#EXPLODE * @since 3.0.0 * * @param {number} [count=this.quantity] - The number of Particles to emit. @@ -60145,11 +61712,18 @@ var ParticleEmitter = new Class({ { this.frequency = -1; - return this.emitParticle(count, x, y); + this.resetCounters(-1, true); + + var particle = this.emitParticle(count, x, y); + + this.emit(Events.EXPLODE, this, particle); + + return particle; }, /** - * Emits particles at a given position (or the emitter's current position). + * Emits particles at the given position. If no position is given, it will + * emit from this Emitters current location. * * @method Phaser.GameObjects.Particles.ParticleEmitter#emitParticleAt * @since 3.0.0 @@ -60166,7 +61740,7 @@ var ParticleEmitter = new Class({ }, /** - * Emits particles at a given position (or the emitter's current position). + * Emits particles at a given position (or the emitters current position). * * @method Phaser.GameObjects.Particles.ParticleEmitter#emitParticle * @since 3.0.0 @@ -60188,10 +61762,11 @@ var ParticleEmitter = new Class({ if (count === undefined) { - count = this.quantity.onEmit(); + count = this.ops.quantity.onEmit(); } var dead = this.dead; + var stopAfter = this.stopAfter; var followX = (this.follow) ? this.follow.x + this.followOffset.x : x; var followY = (this.follow) ? this.follow.y + this.followOffset.y : y; @@ -60205,20 +61780,35 @@ var ParticleEmitter = new Class({ particle = new this.particleClass(this); } - particle.fire(followX, followY); - - if (this.particleBringToTop) + if (particle.fire(followX, followY)) { - this.alive.push(particle); + if (this.particleBringToTop) + { + this.alive.push(particle); + } + else + { + this.alive.unshift(particle); + } + + if (this.emitCallback) + { + this.emitCallback.call(this.emitCallbackScope, particle, this); + } } else { - this.alive.unshift(particle); + this.dead.push(particle); } - if (this.emitCallback) + if (stopAfter > 0) { - this.emitCallback.call(this.emitCallbackScope, particle, this); + this.stopCounter++; + + if (this.stopCounter >= stopAfter) + { + break; + } } if (this.atLimit()) @@ -60230,10 +61820,52 @@ var ParticleEmitter = new Class({ return particle; }, + /** + * Fast forwards this Particle Emitter and all of its particles. + * + * Works by running the Emitter `preUpdate` handler in a loop until the `time` + * has been reached at `delta` steps per loop. + * + * All callbacks and emitter related events that would normally be fired + * will still be invoked. + * + * You can make an emitter 'fast forward' via the emitter config using the + * `advance` property. Set this value to the number of ms you wish the + * emitter to be fast-forwarded by. Or, call this method post-creation. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#fastForward + * @since 3.60.0 + * + * @param {number} time - The number of ms to advance the Particle Emitter by. + * @param {number} [delta] - The amount of delta to use for each step. Defaults to 1000 / 60. + * + * @return {this} This Particle Emitter. + */ + fastForward: function (time, delta) + { + if (delta === undefined) { delta = 1000 / 60; } + + var total = 0; + + this.skipping = true; + + while (total < Math.abs(time)) + { + this.preUpdate(0, delta); + + total += delta; + } + + this.skipping = false; + + return this; + }, + /** * Updates this emitter and its particles. * * @method Phaser.GameObjects.Particles.ParticleEmitter#preUpdate + * @fires Phaser.GameObjects.Particles.Events#COMPLETE * @since 3.0.0 * * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. @@ -60251,8 +61883,13 @@ var ParticleEmitter = new Class({ this.visible = this.follow.visible; } + if (this.deathZones.length > 0) + { + this.worldMatrix = this.getWorldTransformMatrix(); + } + // Any particle processors? - var processors = this.manager.getProcessors(); + var processors = this.getProcessors(); var particles = this.alive; var dead = this.dead; @@ -60296,12 +61933,19 @@ var ParticleEmitter = new Class({ deathCallback.call(deathCallbackScope, entry.particle); } - entry.particle.resetPosition(); + entry.particle.setPosition(); } } - if (!this.on) + if (!this.emitting && !this.skipping) { + if (this.completeFlag === 1 && particles.length === 0) + { + this.completeFlag = 0; + + this.emit(Events.COMPLETE, this); + } + return; } @@ -60311,558 +61955,1090 @@ var ParticleEmitter = new Class({ } else if (this.frequency > 0) { - this._counter -= delta; + this.flowCounter -= delta; - while (this._counter <= 0) + while (this.flowCounter <= 0) { + // Emits the 'quantity' number of particles this.emitParticle(); - // counter = frequency - remained from previous delta - this._counter += this.frequency; + // counter = frequency - remainder from previous delta + this.flowCounter += this.frequency; + } + } + + // Duration or stopAfter set? + if (!this.skipping) + { + if (this.duration > 0) + { + // elapsed + this.elapsed += delta; + + if (this.elapsed >= this.duration) + { + this.stop(); + } + } + + if (this.stopAfter > 0 && this.stopCounter >= this.stopAfter) + { + this.stop(); } } }, /** - * Calculates the difference of two particles, for sorting them by depth. + * Takes either a Rectangle Geometry object or an Arcade Physics Body and tests + * to see if it intersects with any currently alive Particle in this Emitter. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#depthSortCallback - * @since 3.0.0 + * Overlapping particles are returned in an array, where you can perform further + * processing on them. If nothing overlaps then the array will be empty. * - * @param {object} a - The first particle. - * @param {object} b - The second particle. + * @method Phaser.GameObjects.Particles.ParticleEmitter#overlap + * @since 3.60.0 * - * @return {number} The difference of a and b's y coordinates. + * @param {(Phaser.Geom.Rectangle|Phaser.Physics.Arcade.Body)} target - A Rectangle or Arcade Physics Body to check for intersection against all alive particles. + * + * @return {Phaser.GameObjects.Particles.Particle[]} An array of Particles that overlap with the given target. */ - depthSortCallback: function (a, b) + overlap: function (target) { - return a.y - b.y; - } + var matrix = this.getWorldTransformMatrix(); -}); + var alive = this.alive; + var length = alive.length; -module.exports = ParticleEmitter; + var output = []; + for (var i = 0; i < length; i++) + { + var particle = alive[i]; -/***/ }), + if (RectangleToRectangle(target, particle.getBounds(matrix))) + { + output.push(particle); + } + } -/***/ 84622: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + return output; + }, -/** - * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ + /** + * Returns a bounds Rectangle calculated from the bounds of all currently + * _active_ Particles in this Emitter. If this Emitter has only just been + * created and not yet rendered, then calling this method will return a Rectangle + * with a max safe integer for dimensions. Use the `advance` parameter to + * avoid this. + * + * Typically it takes a few seconds for a flow Emitter to 'warm up'. You can + * use the `advance` and `delta` parameters to force the Emitter to + * 'fast forward' in time to try and allow the bounds to be more accurate, + * as it will calculate the bounds based on the particle bounds across all + * timesteps, giving a better result. + * + * You can also use the `padding` parameter to increase the size of the + * bounds. Emitters with a lot of randomness in terms of direction or lifespan + * can often return a bounds smaller than their possible maximum. By using + * the `padding` (and `advance` if needed) you can help limit this. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#getBounds + * @since 3.60.0 + * + * @param {number} [padding] - The amount of padding, in pixels, to add to the bounds Rectangle. + * @param {number} [advance] - The number of ms to advance the Particle Emitter by. Defaults to 0, i.e. not used. + * @param {number} [delta] - The amount of delta to use for each step. Defaults to 1000 / 60. + * @param {Phaser.Geom.Rectangle} [output] - The Rectangle to store the results in. If not given a new one will be created. + * + * @return {Phaser.Geom.Rectangle} A Rectangle containing the calculated bounds of this Emitter. + */ + getBounds: function (padding, advance, delta, output) + { + if (padding === undefined) { padding = 0; } + if (advance === undefined) { advance = 0; } + if (delta === undefined) { delta = 1000 / 60; } + if (output === undefined) { output = new Rectangle(); } -var Class = __webpack_require__(56694); -var Components = __webpack_require__(64937); -var GameObject = __webpack_require__(89980); -var GravityWell = __webpack_require__(87811); -var List = __webpack_require__(71207); -var ParticleEmitter = __webpack_require__(9216); -var Render = __webpack_require__(72745); + var matrix = this.getWorldTransformMatrix(); -/** - * @classdesc - * A Particle Emitter Manager creates and controls {@link Phaser.GameObjects.Particles.ParticleEmitter Particle Emitters} and {@link Phaser.GameObjects.Particles.GravityWell Gravity Wells}. - * - * @class ParticleEmitterManager - * @extends Phaser.GameObjects.GameObject - * @memberof Phaser.GameObjects.Particles - * @constructor - * @since 3.0.0 - * - * @extends Phaser.GameObjects.Components.Depth - * @extends Phaser.GameObjects.Components.Mask - * @extends Phaser.GameObjects.Components.Pipeline - * @extends Phaser.GameObjects.Components.Transform - * @extends Phaser.GameObjects.Components.Visible - * - * @param {Phaser.Scene} scene - The Scene to which this Emitter Manager belongs. - * @param {string} texture - The key of the Texture this Emitter Manager will use to render particles, as stored in the Texture Manager. - * @param {(string|number)} [frame] - An optional frame from the Texture this Emitter Manager will use to render particles. - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterConfig[]} [emitters] - Configuration settings for one or more emitters to create. - */ -var ParticleEmitterManager = new Class({ + var i; + var bounds; + var alive = this.alive; + var setFirst = false; - Extends: GameObject, + output.setTo(0, 0, 0, 0); - Mixins: [ - Components.Depth, - Components.Mask, - Components.Pipeline, - Components.Transform, - Components.Visible, - Render - ], + if (advance > 0) + { + var total = 0; - initialize: + this.skipping = true; - // frame is optional and can contain the emitters array or object if skipped - function ParticleEmitterManager (scene, texture, frame, emitters) - { - GameObject.call(this, scene, 'ParticleEmitterManager'); + while (total < Math.abs(advance)) + { + this.preUpdate(0, delta); - /** - * The blend mode applied to all emitters and particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitterManager#blendMode - * @type {number} - * @default -1 - * @private - * @since 3.0.0 - */ - this.blendMode = -1; + for (i = 0; i < alive.length; i++) + { + bounds = alive[i].getBounds(matrix); - /** - * The time scale applied to all emitters and particles, affecting flow rate, lifespan, and movement. - * Values larger than 1 are faster than normal. - * This is multiplied with any timeScale set on each individual emitter. - * - * @name Phaser.GameObjects.Particles.ParticleEmitterManager#timeScale - * @type {number} - * @default 1 - * @since 3.0.0 - */ - this.timeScale = 1; + if (!setFirst) + { + setFirst = true; - /** - * The texture used to render this Emitter Manager's particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitterManager#texture - * @type {Phaser.Textures.Texture} - * @default null - * @since 3.0.0 - */ - this.texture = null; + CopyFrom(bounds, output); + } + else + { + MergeRect(output, bounds); + } + } - /** - * The texture frame used to render this Emitter Manager's particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitterManager#frame - * @type {Phaser.Textures.Frame} - * @default null - * @since 3.0.0 - */ - this.frame = null; + total += delta; + } - /** - * Names of this Emitter Manager's texture frames. - * - * @name Phaser.GameObjects.Particles.ParticleEmitterManager#frameNames - * @type {string[]} - * @since 3.0.0 - */ - this.frameNames = []; + this.skipping = false; + } + else + { + for (i = 0; i < alive.length; i++) + { + bounds = alive[i].getBounds(matrix); + + if (!setFirst) + { + setFirst = true; + + CopyFrom(bounds, output); + } + else + { + MergeRect(output, bounds); + } + } + } - // frame is optional and can contain the emitters array or object if skipped - if (frame !== null && (typeof frame === 'object' || Array.isArray(frame))) + if (padding > 0) { - emitters = frame; - frame = null; + Inflate(output, padding, padding); } - this.setTexture(texture, frame); + return output; + }, - this.initPipeline(); + /** + * The x coordinate the particles are emitted from. + * + * This is relative to the Emitters x coordinate and that of any parent. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleX + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + particleX: { - /** - * A list of Emitters being managed by this Emitter Manager. - * - * @name Phaser.GameObjects.Particles.ParticleEmitterManager#emitters - * @type {Phaser.Structs.List.} - * @since 3.0.0 - */ - this.emitters = new List(this); + get: function () + { + return this.ops.x.current; + }, - /** - * A list of Gravity Wells being managed by this Emitter Manager. - * - * @name Phaser.GameObjects.Particles.ParticleEmitterManager#wells - * @type {Phaser.Structs.List.} - * @since 3.0.0 - */ - this.wells = new List(this); + set: function (value) + { + this.ops.x.onChange(value); + } + + }, + + /** + * The y coordinate the particles are emitted from. + * + * This is relative to the Emitters x coordinate and that of any parent. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleY + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + particleY: { - if (emitters) + get: function () { - // An array of emitter configs? - if (!Array.isArray(emitters)) - { - emitters = [ emitters ]; - } + return this.ops.y.current; + }, - for (var i = 0; i < emitters.length; i++) - { - this.createEmitter(emitters[i]); - } + set: function (value) + { + this.ops.y.onChange(value); } - }, - // Overrides Game Object method - addedToScene: function () - { - this.scene.sys.updateList.add(this); }, - // Overrides Game Object method - removedFromScene: function () - { - this.scene.sys.updateList.remove(this); + /** + * The horizontal acceleration applied to emitted particles, in pixels per second squared. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#accelerationX + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + accelerationX: { + + get: function () + { + return this.ops.accelerationX.current; + }, + + set: function (value) + { + this.ops.accelerationX.onChange(value); + } + }, /** - * Sets the texture and frame this Emitter Manager will use to render with. + * The vertical acceleration applied to emitted particles, in pixels per second squared. * - * Textures are referenced by their string-based keys, as stored in the Texture Manager. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setTexture - * @since 3.0.0 + * @name Phaser.GameObjects.Particles.ParticleEmitter#accelerationY + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + accelerationY: { + + get: function () + { + return this.ops.accelerationY.current; + }, + + set: function (value) + { + this.ops.accelerationY.onChange(value); + } + + }, + + /** + * The maximum horizontal velocity emitted particles can reach, in pixels per second squared. * - * @param {string} key - The key of the texture to be used, as stored in the Texture Manager. - * @param {(string|number)} [frame] - The name or index of the frame within the Texture. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @return {this} This Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityX + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + * @default 10000 */ - setTexture: function (key, frame) - { - this.texture = this.scene.sys.textures.get(key); + maxVelocityX: { + + get: function () + { + return this.ops.maxVelocityX.current; + }, + + set: function (value) + { + this.ops.maxVelocityX.onChange(value); + } - return this.setFrame(frame); }, /** - * Sets the frame this Emitter Manager will use to render with. + * The maximum vertical velocity emitted particles can reach, in pixels per second squared. * - * The Frame has to belong to the current Texture being used. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * It can be either a string or an index. + * @name Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityY + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + * @default 10000 + */ + maxVelocityY: { + + get: function () + { + return this.ops.maxVelocityY.current; + }, + + set: function (value) + { + this.ops.maxVelocityY.onChange(value); + } + + }, + + /** + * The initial speed of emitted particles, in pixels per second. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setFrame - * @since 3.0.0 + * If using this as a getter it will return the `speedX` value. * - * @param {(string|number)} [frame] - The name or index of the frame within the Texture. + * If using it as a setter it will update both `speedX` and `speedY` to the + * given value. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @return {this} This Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#speed + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 */ - setFrame: function (frame) - { - this.frame = this.texture.get(frame); - - var frames = this.texture.getFramesFromTextureSource(this.frame.sourceIndex); + speed: { - var names = []; + get: function () + { + return this.ops.speedX.current; + }, - frames.forEach(function (sourceFrame) + set: function (value) { - names.push(sourceFrame.name); - }); + this.ops.speedX.onChange(value); + this.ops.speedY.onChange(value); + } - this.frameNames = names; + }, - this.defaultFrame = this.frame; + /** + * The initial horizontal speed of emitted particles, in pixels per second. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#speedX + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + speedX: { + + get: function () + { + return this.ops.speedX.current; + }, + + set: function (value) + { + this.ops.speedX.onChange(value); + } - return this; }, /** - * Assigns texture frames to an emitter. + * The initial vertical speed of emitted particles, in pixels per second. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setEmitterFrames - * @since 3.0.0 + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#speedY + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + speedY: { + + get: function () + { + return this.ops.speedY.current; + }, + + set: function (value) + { + this.ops.speedY.onChange(value); + } + + }, + + /** + * The x coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true. * - * @param {(Phaser.Textures.Frame|Phaser.Textures.Frame[])} frames - The texture frames. - * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The particle emitter to modify. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @return {this} This Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#moveToX + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 */ - setEmitterFrames: function (frames, emitter) - { - if (!Array.isArray(frames)) + moveToX: { + + get: function () + { + return this.ops.moveToX.current; + }, + + set: function (value) { - frames = [ frames ]; + this.ops.moveToX.onChange(value); } - var out = emitter.frames; + }, - out.length = 0; + /** + * The y coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#moveToY + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + moveToY: { - for (var i = 0; i < frames.length; i++) + get: function () { - var frame = frames[i]; + return this.ops.moveToY.current; + }, - if (this.frameNames.indexOf(frame) !== -1) - { - out.push(this.texture.get(frame)); - } - else - { - console.warn('Texture "%s" has no frame "%s"', this.texture.key, frame); - } + set: function (value) + { + this.ops.moveToY.onChange(value); } - if (out.length > 0) + }, + + /** + * The amount of velocity particles will use when rebounding off the + * emitter bounds, if set. A value of 0 means no bounce. A value of 1 + * means a full rebound. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#bounce + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + bounce: { + + get: function () + { + return this.ops.bounce.current; + }, + + set: function (value) { - emitter.defaultFrame = out[0]; + this.ops.bounce.onChange(value); } - else + + }, + + /** + * The horizontal scale of emitted particles. + * + * This is relative to the Emitters scale and that of any parent. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleScaleX + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + particleScaleX: { + + get: function () { - console.warn('No texture frames were set'); + return this.ops.scaleX.current; + }, - emitter.defaultFrame = this.defaultFrame; + set: function (value) + { + this.ops.scaleX.onChange(value); } - return this; }, /** - * Adds an existing Particle Emitter to this Emitter Manager. + * The vertical scale of emitted particles. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#addEmitter - * @since 3.0.0 + * This is relative to the Emitters scale and that of any parent. * - * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Particle Emitter to add to this Emitter Manager. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} The Particle Emitter that was added to this Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleScaleY + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 */ - addEmitter: function (emitter) - { - return this.emitters.add(emitter); + particleScaleY: { + + get: function () + { + return this.ops.scaleY.current; + }, + + set: function (value) + { + this.ops.scaleY.onChange(value); + } + }, /** - * Creates a new Particle Emitter object, adds it to this Emitter Manager and returns a reference to it. + * A color tint value that is applied to the texture of the emitted + * particle. The value should be given in hex format, i.e. 0xff0000 + * for a red tint, and should not include the alpha channel. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#createEmitter - * @since 3.0.0 + * Tints are additive, meaning a tint value of white (0xffffff) will + * effectively reset the tint to nothing. + * + * Modify the `ParticleEmitter.tintFill` property to change between + * an additive and replacement tint mode. * - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Configuration settings for the Particle Emitter to create. + * When you define the color via the Emitter config you should give + * it as an array of color values. The Particle will then interpolate + * through these colors over the course of its lifespan. Setting this + * will override any `tint` value that may also be given. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} The Particle Emitter that was created. + * This is a WebGL only feature. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleColor + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 */ - createEmitter: function (config) - { - return this.addEmitter(new ParticleEmitter(this, config)); + particleColor: { + + get: function () + { + return this.ops.color.current; + }, + + set: function (value) + { + this.ops.color.onChange(value); + } + }, /** - * Removes a Particle Emitter from this Emitter Manager, if the Emitter belongs to this Manager. + * Controls the easing function used when you have created an + * Emitter that uses the `color` property to interpolate the + * tint of Particles over their lifetime. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#removeEmitter - * @since 3.22.0 + * Setting this has no effect if you haven't also applied a + * `particleColor` to this Emitter. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#colorEase + * @type {string} + * @since 3.60.0 + */ + colorEase: { + + get: function () + { + return this.ops.color.easeName; + }, + + set: function (value) + { + this.ops.color.setEase(value); + } + + }, + + /** + * A color tint value that is applied to the texture of the emitted + * particle. The value should be given in hex format, i.e. 0xff0000 + * for a red tint, and should not include the alpha channel. + * + * Tints are additive, meaning a tint value of white (0xffffff) will + * effectively reset the tint to nothing. + * + * Modify the `ParticleEmitter.tintFill` property to change between + * an additive and replacement tint mode. * - * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter + * The `tint` value will be overriden if a `color` array is provided. * - * @return {?Phaser.GameObjects.Particles.ParticleEmitter} The Particle Emitter if it was removed or null if it was not. + * This is a WebGL only feature. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleTint + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 */ - removeEmitter: function (emitter) - { - return this.emitters.remove(emitter, true); + particleTint: { + + get: function () + { + return this.ops.tint.current; + }, + + set: function (value) + { + this.ops.tint.onChange(value); + } + }, /** - * Adds an existing Gravity Well object to this Emitter Manager. + * The alpha value of the emitted particles. This is a value + * between 0 and 1. Particles with alpha zero are invisible + * and are therefore not rendered, but are still processed + * by the Emitter. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#addGravityWell - * @since 3.0.0 + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleAlpha + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + particleAlpha: { + + get: function () + { + return this.ops.alpha.current; + }, + + set: function (value) + { + this.ops.alpha.onChange(value); + } + + }, + + /** + * The lifespan of the emitted particles. This value is given + * in milliseconds and defaults to 1000ms (1 second). When a + * particle reaches this amount it is killed. * - * @param {Phaser.GameObjects.Particles.GravityWell} well - The Gravity Well to add to this Emitter Manager. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @return {Phaser.GameObjects.Particles.GravityWell} The Gravity Well that was added to this Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#lifespan + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 */ - addGravityWell: function (well) - { - return this.wells.add(well); + lifespan: { + + get: function () + { + return this.ops.lifespan.current; + }, + + set: function (value) + { + this.ops.lifespan.onChange(value); + } + }, /** - * Creates a new Gravity Well, adds it to this Emitter Manager and returns a reference to it. + * The angle at which the particles are emitted. The values are + * given in degrees. This allows you to control the direction + * of the emitter. If you wish instead to change the rotation + * of the particles themselves, see the `particleRotate` property. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#createGravityWell - * @since 3.0.0 + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @param {Phaser.Types.GameObjects.Particles.GravityWellConfig} config - Configuration settings for the Gravity Well to create. + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleAngle + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + particleAngle: { + + get: function () + { + return this.ops.angle.current; + }, + + set: function (value) + { + this.ops.angle.onChange(value); + } + + }, + + /** + * The rotation (or angle) of each particle when it is emitted. + * The value is given in degrees and uses a right-handed + * coordinate system, where 0 degrees points to the right, 90 degrees + * points down and -90 degrees points up. * - * @return {Phaser.GameObjects.Particles.GravityWell} The Gravity Well that was created. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleRotate + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 */ - createGravityWell: function (config) - { - return this.addGravityWell(new GravityWell(config)); + particleRotate: { + + get: function () + { + return this.ops.rotate.current; + }, + + set: function (value) + { + this.ops.rotate.onChange(value); + } + }, /** - * Emits particles from each active emitter. + * The number of particles that are emitted each time an emission + * occurs, i.e. from one 'explosion' or each frame in a 'flow' cycle. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#emitParticle - * @since 3.0.0 + * The default is 1. * - * @param {number} [count] - The number of particles to release from each emitter. The default is the emitter's own {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}. - * @param {number} [x] - The x-coordinate to to emit particles from. The default is the x-coordinate of the emitter's current location. - * @param {number} [y] - The y-coordinate to to emit particles from. The default is the y-coordinate of the emitter's current location. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @return {this} This Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#quantity + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrequency + * @see Phaser.GameObjects.Particles.ParticleEmitter#setQuantity + * @since 3.60.0 */ - emitParticle: function (count, x, y) - { - var emitters = this.emitters.list; + quantity: { - for (var i = 0; i < emitters.length; i++) + get: function () { - var emitter = emitters[i]; + return this.ops.quantity.current; + }, - if (emitter.active) - { - emitter.emitParticle(count, x, y); - } + set: function (value) + { + this.ops.quantity.onChange(value); } - return this; }, /** - * Emits particles from each active emitter. + * The number of milliseconds to wait after emission before + * the particles start updating. This allows you to emit particles + * that appear 'static' or still on-screen and then, after this value, + * begin to move. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#emitParticleAt - * @since 3.0.0 + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @param {number} [x] - The x-coordinate to to emit particles from. The default is the x-coordinate of the emitter's current location. - * @param {number} [y] - The y-coordinate to to emit particles from. The default is the y-coordinate of the emitter's current location. - * @param {number} [count] - The number of particles to release from each emitter. The default is the emitter's own {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}. + * @name Phaser.GameObjects.Particles.ParticleEmitter#delay + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + delay: { + + get: function () + { + return this.ops.delay.current; + }, + + set: function (value) + { + this.ops.delay.onChange(value); + } + + }, + + /** + * The internal flow counter. + * + * Treat this property as read-only. * - * @return {this} This Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#flowCounter + * @type {number} + * @since 3.60.0 */ - emitParticleAt: function (x, y, count) - { - return this.emitParticle(count, x, y); + flowCounter: { + + get: function () + { + return this.counters[0]; + }, + + set: function (value) + { + this.counters[0] = value; + } + + }, + + /** + * The internal frame counter. + * + * Treat this property as read-only. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#frameCounter + * @type {number} + * @since 3.60.0 + */ + frameCounter: { + + get: function () + { + return this.counters[1]; + }, + + set: function (value) + { + this.counters[1] = value; + } + }, /** - * Pauses this Emitter Manager. + * The internal animation counter. * - * This has the effect of pausing all emitters, and all particles of those emitters, currently under its control. + * Treat this property as read-only. * - * The particles will still render, but they will not have any of their logic updated. + * @name Phaser.GameObjects.Particles.ParticleEmitter#animCounter + * @type {number} + * @since 3.60.0 + */ + animCounter: { + + get: function () + { + return this.counters[2]; + }, + + set: function (value) + { + this.counters[2] = value; + } + + }, + + /** + * The internal elasped counter. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#pause - * @since 3.0.0 + * Treat this property as read-only. * - * @return {this} This Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#elapsed + * @type {number} + * @since 3.60.0 */ - pause: function () - { - this.active = false; + elapsed: { + + get: function () + { + return this.counters[3]; + }, + + set: function (value) + { + this.counters[3] = value; + } - return this; }, /** - * Resumes this Emitter Manager, should it have been previously paused. + * The internal stop counter. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#resume - * @since 3.0.0 + * Treat this property as read-only. * - * @return {this} This Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#stopCounter + * @type {number} + * @since 3.60.0 */ - resume: function () - { - this.active = true; + stopCounter: { + + get: function () + { + return this.counters[4]; + }, + + set: function (value) + { + this.counters[4] = value; + } - return this; }, /** - * Gets all active particle processors (gravity wells). + * The internal complete flag. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#getProcessors - * @since 3.0.0 + * Treat this property as read-only. * - * @return {Phaser.GameObjects.Particles.GravityWell[]} - The active gravity wells. + * @name Phaser.GameObjects.Particles.ParticleEmitter#completeFlag + * @type {boolean} + * @since 3.60.0 */ - getProcessors: function () - { - return this.wells.getAll('active', true); + completeFlag: { + + get: function () + { + return this.counters[5]; + }, + + set: function (value) + { + this.counters[5] = value; + } + }, /** - * Updates all active emitters. + * The internal zone index. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#preUpdate - * @since 3.0.0 + * Treat this property as read-only. * - * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. - * @param {number} delta - The delta time, in ms, elapsed since the last frame. + * @name Phaser.GameObjects.Particles.ParticleEmitter#zoneIndex + * @type {number} + * @since 3.60.0 */ - preUpdate: function (time, delta) - { - // Scale the delta - delta *= this.timeScale; + zoneIndex: { - var emitters = this.emitters.list; + get: function () + { + return this.counters[6]; + }, - for (var i = 0; i < emitters.length; i++) + set: function (value) { - var emitter = emitters[i]; + this.counters[6] = value; + } - if (emitter.active) - { - emitter.preUpdate(time, delta); - } + }, + + /** + * The internal zone total. + * + * Treat this property as read-only. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#zoneTotal + * @type {number} + * @since 3.60.0 + */ + zoneTotal: { + + get: function () + { + return this.counters[7]; + }, + + set: function (value) + { + this.counters[7] = value; } + }, /** - * A NOOP method so you can pass an EmitterManager to a Container. - * Calling this method will do nothing. It is intentionally empty. + * The current frame index. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setAlpha - * @private - * @since 3.10.0 + * Treat this property as read-only. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#currentFrame + * @type {number} + * @since 3.60.0 */ - setAlpha: function () - { + currentFrame: { + + get: function () + { + return this.counters[8]; + }, + + set: function (value) + { + this.counters[8] = value; + } + }, /** - * A NOOP method so you can pass an EmitterManager to a Container. - * Calling this method will do nothing. It is intentionally empty. + * The current animation index. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setScrollFactor - * @private - * @since 3.10.0 + * Treat this property as read-only. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#currentAnim + * @type {number} + * @since 3.60.0 */ - setScrollFactor: function () - { + currentAnim: { + + get: function () + { + return this.counters[9]; + }, + + set: function (value) + { + this.counters[9] = value; + } + }, /** - * A NOOP method so you can pass an EmitterManager to a Container. - * Calling this method will do nothing. It is intentionally empty. + * Destroys this Particle Emitter and all Particles it owns. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setBlendMode - * @private - * @since 3.15.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#preDestroy + * @since 3.60.0 */ - setBlendMode: function () + preDestroy: function () { + this.texture = null; + this.frames = null; + this.anims = null; + this.emitCallback = null; + this.emitCallbackScope = null; + this.deathCallback = null; + this.deathCallbackScope = null; + this.emitZones = null; + this.deathZones = null; + this.bounds = null; + this.follow = null; + this.counters = null; + + var i; + + var ops = this.ops; + + for (i = 0; i < configOpMap.length; i++) + { + var key = configOpMap[i]; + + ops[key].destroy(); + } + + for (i = 0; i < this.alive.length; i++) + { + this.alive[i].destroy(); + } + + for (i = 0; i < this.dead.length; i++) + { + this.dead[i].destroy(); + } + + this.ops = null; + this.alive = []; + this.dead = []; + this.worldMatrix.destroy(); } }); -module.exports = ParticleEmitterManager; +module.exports = ParticleEmitter; /***/ }), -/***/ 66545: +/***/ 10456: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var RectangleToRectangle = __webpack_require__(90205); var TransformMatrix = __webpack_require__(69360); var tempMatrix1 = new TransformMatrix(); @@ -60875,26 +63051,18 @@ var tempMatrix4 = new TransformMatrix(); * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera. * This method should not be called directly. It is a utility function of the Render module. * - * @method Phaser.GameObjects.Particles.EmitterManager#renderCanvas - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.Emitter#renderCanvas + * @since 3.60.0 * @private * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. - * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - The Game Object being rendered in this call. + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Game Object being rendered in this call. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var ParticleManagerCanvasRenderer = function (renderer, emitterManager, camera, parentMatrix) +var ParticleEmitterCanvasRenderer = function (renderer, emitter, camera, parentMatrix) { - var emitters = emitterManager.emitters.list; - var emittersLength = emitters.length; - - if (emittersLength === 0) - { - return; - } - - var camMatrix = tempMatrix1.copyFrom(camera.matrix); + var camMatrix = tempMatrix1; var calcMatrix = tempMatrix2; var particleMatrix = tempMatrix3; var managerMatrix = tempMatrix4; @@ -60903,199 +63071,214 @@ var ParticleManagerCanvasRenderer = function (renderer, emitterManager, camera, { managerMatrix.loadIdentity(); managerMatrix.multiply(parentMatrix); - managerMatrix.translate(emitterManager.x, emitterManager.y); - managerMatrix.rotate(emitterManager.rotation); - managerMatrix.scale(emitterManager.scaleX, emitterManager.scaleY); + managerMatrix.translate(emitter.x, emitter.y); + managerMatrix.rotate(emitter.rotation); + managerMatrix.scale(emitter.scaleX, emitter.scaleY); } else { - managerMatrix.applyITRS(emitterManager.x, emitterManager.y, emitterManager.rotation, emitterManager.scaleX, emitterManager.scaleY); + managerMatrix.applyITRS(emitter.x, emitter.y, emitter.rotation, emitter.scaleX, emitter.scaleY); } var ctx = renderer.currentContext; var roundPixels = camera.roundPixels; + var camerAlpha = camera.alpha; + var emitterAlpha = emitter.alpha; + + var particles = emitter.alive; + var particleCount = particles.length; + var viewBounds = emitter.viewBounds; - for (var e = 0; e < emittersLength; e++) + if (!emitter.visible || particleCount === 0 || (viewBounds && !RectangleToRectangle(viewBounds, camera.worldView))) { - var emitter = emitters[e]; - var particles = emitter.alive; - var particleCount = particles.length; + return; + } - if (!emitter.visible || particleCount === 0) - { - continue; - } + if (emitter.sortCallback) + { + emitter.depthSort(); + } - camera.addToRenderList(emitter); + camera.addToRenderList(emitter); - var scrollFactorX = emitter.scrollFactorX; - var scrollFactorY = emitter.scrollFactorY; + var scrollFactorX = emitter.scrollFactorX; + var scrollFactorY = emitter.scrollFactorY; - ctx.save(); + ctx.save(); - ctx.globalCompositeOperation = renderer.blendModes[emitter.blendMode]; + ctx.globalCompositeOperation = renderer.blendModes[emitter.blendMode]; - for (var i = 0; i < particleCount; i++) - { - var particle = particles[i]; + for (var i = 0; i < particleCount; i++) + { + var particle = particles[i]; - var alpha = particle.alpha * camera.alpha; + var alpha = particle.alpha * emitterAlpha * camerAlpha; - if (alpha <= 0) - { - continue; - } + if (alpha <= 0 || particle.scaleX === 0 || particle.scaleY === 0) + { + continue; + } - particleMatrix.applyITRS(particle.x, particle.y, particle.rotation, particle.scaleX, particle.scaleY); + particleMatrix.applyITRS(particle.x, particle.y, particle.rotation, particle.scaleX, particle.scaleY); - camMatrix.copyFrom(camera.matrix); + camMatrix.copyFrom(camera.matrix); - camMatrix.multiplyWithOffset(managerMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY); + camMatrix.multiplyWithOffset(managerMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY); - // Undo the camera scroll - particleMatrix.e = particle.x; - particleMatrix.f = particle.y; + // Undo the camera scroll + particleMatrix.e = particle.x; + particleMatrix.f = particle.y; - // Multiply by the particle matrix, store result in calcMatrix - camMatrix.multiply(particleMatrix, calcMatrix); + // Multiply by the particle matrix, store result in calcMatrix + camMatrix.multiply(particleMatrix, calcMatrix); - var frame = particle.frame; - var cd = frame.canvasData; + var frame = particle.frame; + var cd = frame.canvasData; - if (cd.width > 0 && cd.height > 0) - { - var x = -(frame.halfWidth); - var y = -(frame.halfHeight); + if (cd.width > 0 && cd.height > 0) + { + var x = -(frame.halfWidth); + var y = -(frame.halfHeight); - ctx.globalAlpha = alpha; + ctx.globalAlpha = alpha; - ctx.save(); + ctx.save(); - calcMatrix.setToContext(ctx); + calcMatrix.setToContext(ctx); - if (roundPixels) - { - x = Math.round(x); - y = Math.round(y); - } + if (roundPixels) + { + x = Math.round(x); + y = Math.round(y); + } - ctx.imageSmoothingEnabled = !frame.source.scaleMode; + ctx.imageSmoothingEnabled = !frame.source.scaleMode; - ctx.drawImage(frame.source.image, cd.x, cd.y, cd.width, cd.height, x, y, cd.width, cd.height); + ctx.drawImage(frame.source.image, cd.x, cd.y, cd.width, cd.height, x, y, cd.width, cd.height); - ctx.restore(); - } + ctx.restore(); } - - ctx.restore(); } + + ctx.restore(); }; -module.exports = ParticleManagerCanvasRenderer; +module.exports = ParticleEmitterCanvasRenderer; /***/ }), -/***/ 38842: +/***/ 765: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var BuildGameObject = __webpack_require__(88933); var GameObjectCreator = __webpack_require__(99325); var GetAdvancedValue = __webpack_require__(20494); var GetFastValue = __webpack_require__(72632); -var ParticleEmitterManager = __webpack_require__(84622); +var ParticleEmitter = __webpack_require__(9216); /** - * Creates a new Particle Emitter Manager Game Object and returns it. + * Creates a new Particle Emitter Game Object and returns it. + * + * Prior to Phaser v3.60 this function would create a `ParticleEmitterManager`. These were removed + * in v3.60 and replaced with creating a `ParticleEmitter` instance directly. Please see the + * updated function parameters and class documentation for more details. * * Note: This method will only be available if the Particles Game Object has been built into Phaser. * * @method Phaser.GameObjects.GameObjectCreator#particles * @since 3.0.0 * - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterManagerConfig} config - The configuration object this Game Object will use to create itself. + * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCreatorConfig} config - The configuration object this Game Object will use to create itself. * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} The Game Object that was created. + * @return {Phaser.GameObjects.Particles.ParticleEmitter} The Game Object that was created. */ GameObjectCreator.register('particles', function (config, addToScene) { if (config === undefined) { config = {}; } var key = GetAdvancedValue(config, 'key', null); - var frame = GetAdvancedValue(config, 'frame', null); - var emitters = GetFastValue(config, 'emitters', null); + var emitterConfig = GetFastValue(config, 'config', null); - // frame is optional and can contain the emitters array or object if skipped - var manager = new ParticleEmitterManager(this.scene, key, frame, emitters); + var emitter = new ParticleEmitter(this.scene, 0, 0, key); if (addToScene !== undefined) { config.add = addToScene; } - var add = GetFastValue(config, 'add', false); + BuildGameObject(this.scene, emitter, config); - if (add) + if (emitterConfig) { - this.displayList.add(manager); - } - else - { - this.updateList.add(manager); + emitter.setConfig(emitterConfig); } - return manager; + return emitter; }); /***/ }), -/***/ 30439: +/***/ 81212: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(61286); -var ParticleEmitterManager = __webpack_require__(84622); +var ParticleEmitter = __webpack_require__(9216); /** - * Creates a new Particle Emitter Manager Game Object and adds it to the Scene. + * Creates a new Particle Emitter Game Object and adds it to the Scene. + * + * If you wish to configure the Emitter after creating it, use the `ParticleEmitter.setConfig` method. + * + * Prior to Phaser v3.60 this function would create a `ParticleEmitterManager`. These were removed + * in v3.60 and replaced with creating a `ParticleEmitter` instance directly. Please see the + * updated function parameters and class documentation for more details. * * Note: This method will only be available if the Particles Game Object has been built into Phaser. * * @method Phaser.GameObjects.GameObjectFactory#particles - * @since 3.0.0 + * @since 3.60.0 * - * @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param {(string|number|object)} [frame] - An optional frame from the Texture this Game Object is rendering with. - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterConfig[]} [emitters] - Configuration settings for one or more emitters to create. + * @param {number} [x] - The horizontal position of this Game Object in the world. + * @param {number} [y] - The vertical position of this Game Object in the world. + * @param {(string|Phaser.Textures.Texture)} [texture] - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} [config] - Configuration settings for the Particle Emitter. * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} The Game Object that was created. + * @return {Phaser.GameObjects.Particles.ParticleEmitter} The Game Object that was created. */ -GameObjectFactory.register('particles', function (key, frame, emitters) +GameObjectFactory.register('particles', function (x, y, texture, config) { - return this.displayList.add(new ParticleEmitterManager(this.scene, key, frame, emitters)); + if (x !== undefined && typeof x === 'string') + { + console.warn('ParticleEmitterManager was removed in Phaser 3.60. See documentation for details'); + } + + return this.displayList.add(new ParticleEmitter(this.scene, x, y, texture, config)); }); /***/ }), -/***/ 72745: +/***/ 69116: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61105,12 +63288,12 @@ var renderCanvas = NOOP; if (true) { - renderWebGL = __webpack_require__(58971); + renderWebGL = __webpack_require__(10275); } if (true) { - renderCanvas = __webpack_require__(66545); + renderCanvas = __webpack_require__(10456); } module.exports = { @@ -61123,15 +63306,16 @@ module.exports = { /***/ }), -/***/ 58971: +/***/ 10275: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var RectangleToRectangle = __webpack_require__(90205); var TransformMatrix = __webpack_require__(69360); var Utils = __webpack_require__(75512); @@ -61145,26 +63329,18 @@ var tempMatrix4 = new TransformMatrix(); * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera. * This method should not be called directly. It is a utility function of the Render module. * - * @method Phaser.GameObjects.Particles.EmitterManager#renderWebGL - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.Emitter#renderWebGL + * @since 3.60.0 * @private * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. - * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - The Game Object being rendered in this call. + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Game Object being rendered in this call. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var ParticleManagerWebGLRenderer = function (renderer, emitterManager, camera, parentMatrix) +var ParticleEmitterWebGLRenderer = function (renderer, emitter, camera, parentMatrix) { - var emitters = emitterManager.emitters.list; - var emittersLength = emitters.length; - - if (emittersLength === 0) - { - return; - } - - var pipeline = renderer.pipelines.set(emitterManager.pipeline); + var pipeline = renderer.pipelines.set(emitter.pipeline); var camMatrix = tempMatrix1; var calcMatrix = tempMatrix2; @@ -61175,108 +63351,394 @@ var ParticleManagerWebGLRenderer = function (renderer, emitterManager, camera, p { managerMatrix.loadIdentity(); managerMatrix.multiply(parentMatrix); - managerMatrix.translate(emitterManager.x, emitterManager.y); - managerMatrix.rotate(emitterManager.rotation); - managerMatrix.scale(emitterManager.scaleX, emitterManager.scaleY); + managerMatrix.translate(emitter.x, emitter.y); + managerMatrix.rotate(emitter.rotation); + managerMatrix.scale(emitter.scaleX, emitter.scaleY); } else { - managerMatrix.applyITRS(emitterManager.x, emitterManager.y, emitterManager.rotation, emitterManager.scaleX, emitterManager.scaleY); + managerMatrix.applyITRS(emitter.x, emitter.y, emitter.rotation, emitter.scaleX, emitter.scaleY); } var roundPixels = camera.roundPixels; - var texture = emitterManager.defaultFrame.glTexture; var getTint = Utils.getTintAppendFloatAlpha; + var camerAlpha = camera.alpha; + var emitterAlpha = emitter.alpha; + var texture = emitter.texture.glTexture; + + renderer.pipelines.preBatch(emitter); - var textureUnit = pipeline.setGameObject(emitterManager, emitterManager.defaultFrame); + var particles = emitter.alive; + var particleCount = particles.length; + var viewBounds = emitter.viewBounds; - renderer.pipelines.preBatch(emitterManager); + if (!emitter.visible || particleCount === 0 || (viewBounds && !RectangleToRectangle(viewBounds, camera.worldView))) + { + return; + } - for (var e = 0; e < emittersLength; e++) + if (emitter.sortCallback) { - var emitter = emitters[e]; - var particles = emitter.alive; - var particleCount = particles.length; + emitter.depthSort(); + } + + var textureUnit = pipeline.setGameObject(emitter, emitter.frame); + + camera.addToRenderList(emitter); + + var scrollFactorX = emitter.scrollFactorX; + var scrollFactorY = emitter.scrollFactorY; + + renderer.setBlendMode(emitter.blendMode); + + if (emitter.mask) + { + emitter.mask.preRenderWebGL(renderer, emitter, camera); + + renderer.pipelines.set(emitter.pipeline); + } + + var tintEffect = emitter.tintFill; + + for (var i = 0; i < particleCount; i++) + { + var particle = particles[i]; + + var alpha = particle.alpha * emitterAlpha * camerAlpha; - if (!emitter.visible || particleCount === 0) + if (alpha <= 0 || particle.scaleX === 0 || particle.scaleY === 0) { continue; } - camera.addToRenderList(emitter); + particleMatrix.applyITRS(particle.x, particle.y, particle.rotation, particle.scaleX, particle.scaleY); - var scrollFactorX = emitter.scrollFactorX; - var scrollFactorY = emitter.scrollFactorY; + camMatrix.copyFrom(camera.matrix); - renderer.setBlendMode(emitter.blendMode); + camMatrix.multiplyWithOffset(managerMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY); - if (emitter.mask) - { - emitter.mask.preRenderWebGL(renderer, emitter, camera); + // Undo the camera scroll + particleMatrix.e = particle.x; + particleMatrix.f = particle.y; - renderer.pipelines.set(emitterManager.pipeline); - } + // Multiply by the particle matrix, store result in calcMatrix + camMatrix.multiply(particleMatrix, calcMatrix); - var tintEffect = 0; + var frame = particle.frame; - for (var i = 0; i < particleCount; i++) - { - var particle = particles[i]; + var x = -frame.halfWidth; + var y = -frame.halfHeight; - var alpha = particle.alpha * camera.alpha; + var quad = calcMatrix.setQuad(x, y, x + frame.width, y + frame.height, roundPixels); - if (alpha <= 0) - { - continue; - } + var tint = getTint(particle.tint, alpha); - particleMatrix.applyITRS(particle.x, particle.y, particle.rotation, particle.scaleX, particle.scaleY); + pipeline.batchQuad(emitter, quad[0], quad[1], quad[2], quad[3], quad[4], quad[5], quad[6], quad[7], frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, tintEffect, texture, textureUnit); + } - camMatrix.copyFrom(camera.matrix); + if (emitter.mask) + { + emitter.mask.postRenderWebGL(renderer, camera); + } - camMatrix.multiplyWithOffset(managerMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY); + renderer.pipelines.postBatch(emitter); +}; - // Undo the camera scroll - particleMatrix.e = particle.x; - particleMatrix.f = particle.y; +module.exports = ParticleEmitterWebGLRenderer; - // Multiply by the particle matrix, store result in calcMatrix - camMatrix.multiply(particleMatrix, calcMatrix); - var frame = particle.frame; +/***/ }), - var x = -frame.halfWidth; - var y = -frame.halfHeight; - var xw = x + frame.width; - var yh = y + frame.height; +/***/ 30891: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - var tx0 = calcMatrix.getXRound(x, y, roundPixels); - var ty0 = calcMatrix.getYRound(x, y, roundPixels); +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ - var tx1 = calcMatrix.getXRound(x, yh, roundPixels); - var ty1 = calcMatrix.getYRound(x, yh, roundPixels); +var Class = __webpack_require__(56694); - var tx2 = calcMatrix.getXRound(xw, yh, roundPixels); - var ty2 = calcMatrix.getYRound(xw, yh, roundPixels); +/** + * @classdesc + * This class provides the structured required for all Particle Processors. + * + * You should extend it and add the functionality required for your processor, + * including tidying up any resources this may create in the `destroy` method. + * + * See the GravityWell for an example of a processor. + * + * @class ParticleProcessor + * @memberof Phaser.GameObjects.Particles + * @constructor + * @since 3.60.0 + * + * @param {number} [x=0] - The x coordinate of the Particle Processor, in world space. + * @param {number} [y=0] - The y coordinate of the Particle Processor, in world space. + * @param {boolean} [active=true] - The active state of this Particle Processor. + */ +var ParticleProcessor = new Class({ - var tx3 = calcMatrix.getXRound(xw, y, roundPixels); - var ty3 = calcMatrix.getYRound(xw, y, roundPixels); + initialize: - var tint = getTint(particle.tint, alpha); + function ParticleProcessor (x, y, active) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (active === undefined) { active = true; } - pipeline.batchQuad(emitter, tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, tintEffect, texture, textureUnit); - } + /** + * A reference to the Particle Emitter that owns this Processor. + * This is set automatically when the Processor is added to an Emitter + * and nulled when removed or destroyed. + * + * @name Phaser.GameObjects.Particles.ParticleProcessor#manager + * @type {Phaser.GameObjects.Particles.ParticleEmitter} + * @since 3.60.0 + */ + this.emitter; - if (emitter.mask) - { - emitter.mask.postRenderWebGL(renderer, camera); - } + /** + * The x coordinate of the Particle Processor, in world space. + * + * @name Phaser.GameObjects.Particles.ParticleProcessor#x + * @type {number} + * @since 3.60.0 + */ + this.x = x; + + /** + * The y coordinate of the Particle Processor, in world space. + * + * @name Phaser.GameObjects.Particles.ParticleProcessor#y + * @type {number} + * @since 3.60.0 + */ + this.y = y; + + /** + * The active state of the Particle Processor. + * + * An inactive Particle Processor will be skipped for processing by + * its parent Emitter. + * + * @name Phaser.GameObjects.Particles.ParticleProcessor#active + * @type {boolean} + * @since 3.60.0 + */ + this.active = active; + }, + + /** + * The Particle Processor update method should be overriden by your own + * method and handle the processing of the particles, typically modifying + * their velocityX/Y values based on the criteria of this processor. + * + * @method Phaser.GameObjects.Particles.ParticleProcessor#update + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.Particle} particle - The Particle to update. + * @param {number} delta - The delta time in ms. + * @param {number} step - The delta value divided by 1000. + * @param {number} t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death). + */ + update: function () + { + }, + + /** + * Destroys this Particle Processor by removing all external references. + * + * This is called automatically when the owning Particle Emitter is destroyed. + * + * @method Phaser.GameObjects.Particles.ParticleProcessor#destroy + * @since 3.60.0 + */ + destroy: function () + { + this.emitter = null; } - renderer.pipelines.postBatch(emitterManager); -}; +}); + +module.exports = ParticleProcessor; + + +/***/ }), + +/***/ 76100: +/***/ ((module) => { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Particle Emitter Complete Event. + * + * This event is dispatched when the final particle, emitted from a Particle Emitter that + * has been stopped, dies. Upon receipt of this event you know that no particles are + * still rendering at this point in time. + * + * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('complete', listener)`. + * + * @event Phaser.GameObjects.Particles.Events#COMPLETE + * @type {string} + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - A reference to the Particle Emitter that just completed. + */ +module.exports = 'complete'; + + +/***/ }), + +/***/ 26677: +/***/ ((module) => { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Particle Emitter Death Zone Event. + * + * This event is dispatched when a Death Zone kills a Particle instance. + * + * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('deathzone', listener)`. + * + * If you wish to know when the final particle is killed, see the `COMPLETE` event. + * + * @event Phaser.GameObjects.Particles.Events#DEATH_ZONE + * @type {string} + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - A reference to the Particle Emitter that owns the Particle and Death Zone. + * @param {Phaser.GameObjects.Particles.Particle} particle - The Particle that has been killed. + * @param {Phaser.GameObjects.Particles.Zones.DeathZone} zone - The Death Zone that killed the particle. + */ +module.exports = 'deathzone'; + + +/***/ }), + +/***/ 62736: +/***/ ((module) => { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Particle Emitter Explode Event. + * + * This event is dispatched when a Particle Emitter explodes a set of particles. + * + * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('explode', listener)`. + * + * @event Phaser.GameObjects.Particles.Events#EXPLODE + * @type {string} + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - A reference to the Particle Emitter that just completed. + * @param {Phaser.GameObjects.Particles.Particle} particle - The most recently emitted Particle. + */ +module.exports = 'explode'; + + +/***/ }), + +/***/ 56490: +/***/ ((module) => { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Particle Emitter Start Event. + * + * This event is dispatched when a Particle Emitter starts emission of particles. + * + * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('start', listener)`. + * + * @event Phaser.GameObjects.Particles.Events#START + * @type {string} + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - A reference to the Particle Emitter that just completed. + */ +module.exports = 'start'; + + +/***/ }), -module.exports = ParticleManagerWebGLRenderer; +/***/ 85715: +/***/ ((module) => { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Particle Emitter Stop Event. + * + * This event is dispatched when a Particle Emitter is stopped. This can happen either + * when you directly call the `ParticleEmitter.stop` method, or if the emitter has + * been configured to stop after a set time via the `duration` property, or after a + * set number of particles via the `stopAfter` property. + * + * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('stop', listener)`. + * + * Note that just because the emitter has stopped, that doesn't mean there aren't still + * particles alive and rendering. It just means the emitter has stopped emitting particles. + * + * If you wish to know when the final particle is killed, see the `COMPLETE` event. + * + * @event Phaser.GameObjects.Particles.Events#STOP + * @type {string} + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - A reference to the Particle Emitter that just completed. + */ +module.exports = 'stop'; + + +/***/ }), + +/***/ 40629: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Particles.Events + */ + +module.exports = { + + COMPLETE: __webpack_require__(76100), + DEATH_ZONE: __webpack_require__(26677), + EXPLODE: __webpack_require__(62736), + START: __webpack_require__(56490), + STOP: __webpack_require__(85715) + +}; /***/ }), @@ -61286,7 +63748,7 @@ module.exports = ParticleManagerWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61296,11 +63758,13 @@ module.exports = ParticleManagerWebGLRenderer; module.exports = { + EmitterColorOp: __webpack_require__(19737), EmitterOp: __webpack_require__(93025), + Events: __webpack_require__(40629), GravityWell: __webpack_require__(87811), Particle: __webpack_require__(14909), ParticleEmitter: __webpack_require__(9216), - ParticleEmitterManager: __webpack_require__(84622), + ParticleProcessor: __webpack_require__(30891), Zones: __webpack_require__(25962) }; @@ -61313,7 +63777,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61369,13 +63833,14 @@ var DeathZone = new Class({ * @method Phaser.GameObjects.Particles.Zones.DeathZone#willKill * @since 3.0.0 * - * @param {Phaser.GameObjects.Particles.Particle} particle - The Particle to be checked against this zone. + * @param {number} x - The x coordinate of the Particle to be checked against this zone. + * @param {number} y - The y coordinate of the Particle to be checked against this zone. * * @return {boolean} Return `true` if the Particle is to be killed, otherwise return `false`. */ - willKill: function (particle) + willKill: function (x, y) { - var withinZone = this.source.contains(particle.x, particle.y); + var withinZone = this.source.contains(x, y); return (withinZone && this.killOnEnter || !withinZone && !this.killOnEnter); } @@ -61392,7 +63857,7 @@ module.exports = DeathZone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61412,15 +63877,17 @@ var Class = __webpack_require__(56694); * @param {number} stepRate - The distance between each particle. When set, `quantity` is implied and should be set to 0. * @param {boolean} [yoyo=false] - Whether particles are placed from start to end and then end to start. * @param {boolean} [seamless=true] - Whether one endpoint will be removed if it's identical to the other. + * @param {number} [total=-1] - The total number of particles this zone will emit before passing over to the next emission zone in the Emitter. -1 means it will never pass over and you must use `setEmitZone` to change it. */ var EdgeZone = new Class({ initialize: - function EdgeZone (source, quantity, stepRate, yoyo, seamless) + function EdgeZone (source, quantity, stepRate, yoyo, seamless, total) { if (yoyo === undefined) { yoyo = false; } if (seamless === undefined) { seamless = true; } + if (total === undefined) { total = -1; } /** * An object instance with a `getPoints(quantity, stepRate)` method returning an array of points. @@ -61511,6 +63978,24 @@ var EdgeZone = new Class({ */ this._direction = 0; + /** + * The total number of particles this zone will emit before the Emitter + * transfers control over to the next zone in its emission zone list. + * + * By default this is -1, meaning it will never pass over from this + * zone to another one. You can call the `ParticleEmitter.setEmitZone` + * method to change it, or set this value to something else via the + * config, or directly at runtime. + * + * A value of 1 would mean the zones rotate in order, but it can + * be set to any integer value. + * + * @name Phaser.GameObjects.Particles.Zones.EdgeZone#total + * @type {number} + * @since 3.60.0 + */ + this.total = total; + this.updateSource(); }, @@ -61637,7 +64122,7 @@ module.exports = EdgeZone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61679,6 +64164,24 @@ var RandomZone = new Class({ * @since 3.0.0 */ this._tempVec = new Vector2(); + + /** + * The total number of particles this zone will emit before the Emitter + * transfers control over to the next zone in its emission zone list. + * + * By default this is -1, meaning it will never pass over from this + * zone to another one. You can call the `ParticleEmitter.setEmitZone` + * method to change it, or set this value to something else via the + * config, or directly at runtime. + * + * A value of 1 would mean the zones rotate in order, but it can + * be set to any integer value. + * + * @name Phaser.GameObjects.Particles.Zones.RandomZone#total + * @type {number} + * @since 3.60.0 + */ + this.total = -1; }, /** @@ -61711,7 +64214,7 @@ module.exports = RandomZone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61735,7 +64238,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61818,7 +64321,7 @@ module.exports = PathFollower; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61867,7 +64370,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -62072,7 +64575,7 @@ module.exports = PointLight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -62123,7 +64626,7 @@ GameObjectCreator.register('pointlight', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -62184,7 +64687,7 @@ GameObjectFactory.register('pointlight', function (x, y, color, radius, intensit /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -62212,7 +64715,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -62281,7 +64784,7 @@ module.exports = PointLightWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63114,7 +65617,7 @@ module.exports = RenderTexture; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63178,7 +65681,7 @@ GameObjectCreator.register('renderTexture', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63226,7 +65729,7 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64354,7 +66857,7 @@ module.exports = Rope; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64383,7 +66886,7 @@ module.exports = RopeCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64439,7 +66942,7 @@ GameObjectCreator.register('rope', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64482,7 +66985,7 @@ if (true) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64515,7 +67018,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64632,7 +67135,7 @@ module.exports = RopeWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -65865,7 +68368,7 @@ module.exports = Shader; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -65894,7 +68397,7 @@ module.exports = ShaderCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -65948,7 +68451,7 @@ GameObjectCreator.register('shader', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -65990,7 +68493,7 @@ if (true) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66023,7 +68526,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66086,7 +68589,7 @@ module.exports = ShaderWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66149,7 +68652,7 @@ module.exports = FillPathWebGL; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66187,7 +68690,7 @@ module.exports = FillStyleCanvas; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66226,7 +68729,7 @@ module.exports = LineStyleCanvas; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66652,7 +69155,7 @@ module.exports = Shape; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66726,7 +69229,7 @@ module.exports = StrokePathWebGL; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67136,7 +69639,7 @@ module.exports = Arc; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67214,7 +69717,7 @@ module.exports = ArcCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67288,7 +69791,7 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67321,7 +69824,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67383,7 +69886,7 @@ module.exports = ArcWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67566,7 +70069,7 @@ module.exports = Curve; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67656,7 +70159,7 @@ module.exports = CurveCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67707,7 +70210,7 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67740,7 +70243,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67802,7 +70305,7 @@ module.exports = CurveWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67993,7 +70496,7 @@ module.exports = Ellipse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68080,7 +70583,7 @@ module.exports = EllipseCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68133,7 +70636,7 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor, /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68166,7 +70669,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68228,7 +70731,7 @@ module.exports = EllipseWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68508,7 +71011,7 @@ module.exports = Grid; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68699,7 +71202,7 @@ module.exports = GridCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68755,7 +71258,7 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68788,7 +71291,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68990,7 +71493,7 @@ module.exports = GridWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69206,7 +71709,7 @@ module.exports = IsoBox; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69309,7 +71812,7 @@ module.exports = IsoBoxCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69361,7 +71864,7 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69394,7 +71897,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69531,7 +72034,7 @@ module.exports = IsoBoxWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69778,7 +72281,7 @@ module.exports = IsoTriangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69894,7 +72397,7 @@ module.exports = IsoTriangleCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69948,7 +72451,7 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69981,7 +72484,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70138,7 +72641,7 @@ module.exports = IsoTriangleWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70306,7 +72809,7 @@ module.exports = Line; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70365,7 +72868,7 @@ module.exports = LineCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70417,7 +72920,7 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor, /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70450,7 +72953,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70528,7 +73031,7 @@ module.exports = LineWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70704,7 +73207,7 @@ module.exports = Polygon; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70794,7 +73297,7 @@ module.exports = PolygonCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70848,7 +73351,7 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70881,7 +73384,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70943,7 +73446,7 @@ module.exports = PolygonWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71092,7 +73595,7 @@ module.exports = Rectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71168,7 +73671,7 @@ module.exports = RectangleCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71214,7 +73717,7 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71247,7 +73750,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71321,7 +73824,7 @@ module.exports = RectangleWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71610,7 +74113,7 @@ module.exports = Star; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71697,7 +74200,7 @@ module.exports = StarCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71750,7 +74253,7 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71783,7 +74286,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71845,7 +74348,7 @@ module.exports = StarWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71989,7 +74492,7 @@ module.exports = Triangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72066,7 +74569,7 @@ module.exports = TriangleCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72118,7 +74621,7 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72151,7 +74654,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72236,7 +74739,7 @@ module.exports = TriangleWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72718,7 +75221,7 @@ module.exports = Sprite; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72753,7 +75256,7 @@ module.exports = SpriteCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72807,7 +75310,7 @@ GameObjectCreator.register('sprite', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72829,13 +75332,9 @@ var Sprite = __webpack_require__(13747); * * @return {Phaser.GameObjects.Sprite} The Game Object that was created. */ -GameObjectFactory.register('sprite', function (x, y, key, frame) +GameObjectFactory.register('sprite', function (x, y, texture, frame) { - var sprite = new Sprite(this.scene, x, y, key, frame); - - this.displayList.add(sprite); - - return sprite; + return this.displayList.add(new Sprite(this.scene, x, y, texture, frame)); }); // When registering a factory function 'this' refers to the GameObjectFactory context. @@ -72854,7 +75353,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72887,7 +75386,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72922,7 +75421,7 @@ module.exports = SpriteWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -73005,7 +75504,7 @@ module.exports = GetTextSize; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -73024,7 +75523,7 @@ var CanvasPool = __webpack_require__(61068); var MeasureText = function (textStyle) { var canvas = CanvasPool.create(this); - var context = canvas.getContext('2d'); + var context = canvas.getContext('2d', { willReadFrequently: true }); textStyle.syncFont(canvas, context); @@ -73069,6 +75568,7 @@ var MeasureText = function (textStyle) }; var imagedata = context.getImageData(0, 0, width, height); + if (!imagedata) { output.ascent = baseline; @@ -73155,7 +75655,7 @@ module.exports = MeasureText; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -74616,7 +77116,7 @@ module.exports = Text; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -74656,7 +77156,7 @@ module.exports = TextCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -74744,7 +77244,7 @@ GameObjectCreator.register('text', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -74810,7 +77310,7 @@ GameObjectFactory.register('text', function (x, y, text, style) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -74843,7 +77343,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -75950,7 +78450,7 @@ module.exports = TextStyle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -76022,7 +78522,7 @@ module.exports = TextWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -76676,7 +79176,7 @@ module.exports = TileSprite; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -76713,7 +79213,7 @@ module.exports = TileSpriteCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -76766,7 +79266,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -76790,9 +79290,9 @@ var GameObjectFactory = __webpack_require__(61286); * * @return {Phaser.GameObjects.TileSprite} The Game Object that was created. */ -GameObjectFactory.register('tileSprite', function (x, y, width, height, key, frame) +GameObjectFactory.register('tileSprite', function (x, y, width, height, texture, frame) { - return this.displayList.add(new TileSprite(this.scene, x, y, width, height, key, frame)); + return this.displayList.add(new TileSprite(this.scene, x, y, width, height, texture, frame)); }); // When registering a factory function 'this' refers to the GameObjectFactory context. @@ -76811,7 +79311,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -76844,7 +79344,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -76920,7 +79420,7 @@ module.exports = TileSpriteWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -78837,7 +81337,7 @@ module.exports = Video; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -78875,7 +81375,7 @@ module.exports = VideoCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -78925,7 +81425,7 @@ GameObjectCreator.register('video', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -78959,7 +81459,7 @@ GameObjectFactory.register('video', function (x, y, key) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -78992,7 +81492,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79030,7 +81530,7 @@ module.exports = VideoWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79352,7 +81852,7 @@ module.exports = Zone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79392,7 +81892,7 @@ GameObjectCreator.register('zone', function (config) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79435,7 +81935,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79464,7 +81964,7 @@ module.exports = Area; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79840,7 +82340,7 @@ module.exports = Circle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79869,7 +82369,7 @@ module.exports = Circumference; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79909,7 +82409,7 @@ module.exports = CircumferencePoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79940,7 +82440,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79982,7 +82482,7 @@ module.exports = Contains; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80014,7 +82514,7 @@ module.exports = ContainsPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80051,7 +82551,7 @@ module.exports = ContainsRect; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80084,7 +82584,7 @@ module.exports = CopyFrom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80119,7 +82619,7 @@ module.exports = Equals; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80160,7 +82660,7 @@ module.exports = GetBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80204,7 +82704,7 @@ module.exports = GetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80257,7 +82757,7 @@ module.exports = GetPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80293,7 +82793,7 @@ module.exports = Offset; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80328,7 +82828,7 @@ module.exports = OffsetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80373,7 +82873,7 @@ module.exports = Random; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80405,7 +82905,7 @@ module.exports = Circle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80486,7 +82986,7 @@ module.exports = GEOM_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80521,7 +83021,7 @@ module.exports = Area; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80554,7 +83054,7 @@ module.exports = Circumference; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80597,7 +83097,7 @@ module.exports = CircumferencePoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80628,7 +83128,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80671,7 +83171,7 @@ module.exports = Contains; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80703,7 +83203,7 @@ module.exports = ContainsPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80740,7 +83240,7 @@ module.exports = ContainsRect; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80773,7 +83273,7 @@ module.exports = CopyFrom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81156,7 +83656,7 @@ module.exports = Ellipse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81192,7 +83692,7 @@ module.exports = Equals; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81233,7 +83733,7 @@ module.exports = GetBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81277,7 +83777,7 @@ module.exports = GetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81332,7 +83832,7 @@ module.exports = GetPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81368,7 +83868,7 @@ module.exports = Offset; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81403,7 +83903,7 @@ module.exports = OffsetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81445,7 +83945,7 @@ module.exports = Random; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81477,7 +83977,7 @@ module.exports = Ellipse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81515,7 +84015,7 @@ module.exports = Geom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81547,7 +84047,7 @@ module.exports = CircleToCircle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81603,7 +84103,7 @@ module.exports = CircleToRectangle; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81698,7 +84198,7 @@ module.exports = GetCircleToCircle; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81749,7 +84249,7 @@ module.exports = GetCircleToRectangle; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81841,7 +84341,7 @@ module.exports = GetLineToCircle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81886,13 +84386,15 @@ var GetLineToLine = function (line1, line2, isRay, out) var denom = (dx1 * dy2 - dy1 * dx2); + // Add co-linear check + // Make sure there is not a division by zero - this also indicates that the lines are parallel. // If numA and numB were both equal to zero the lines would be on top of each other (coincidental). // This check is not done because it is not necessary for this implementation (the parallel check accounts for this). if (denom === 0) { - return false; + return null; } var t; @@ -81948,7 +84450,7 @@ module.exports = GetLineToLine; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82028,7 +84530,7 @@ module.exports = GetLineToPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82102,7 +84604,7 @@ module.exports = GetLineToPolygon; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82162,7 +84664,7 @@ module.exports = GetLineToRectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82265,7 +84767,7 @@ module.exports = GetRaysFromPointToPolygon; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82316,7 +84818,7 @@ module.exports = GetRectangleIntersection; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82368,7 +84870,7 @@ module.exports = GetRectangleToRectangle; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82417,7 +84919,7 @@ module.exports = GetRectangleToTriangle; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82467,7 +84969,7 @@ module.exports = GetTriangleToCircle; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82527,7 +85029,7 @@ module.exports = GetTriangleToLine; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82576,7 +85078,7 @@ module.exports = GetTriangleToTriangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82661,12 +85163,12 @@ module.exports = LineToCircle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ // This is based off an explanation and expanded math presented by Paul Bourke: -// See http:'local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/ +// See http://paulbourke.net/geometry/pointlineplane/ /** * Checks if two Lines intersect. If the Lines are identical, they will be treated as parallel and thus non-intersecting. @@ -82682,7 +85184,6 @@ module.exports = LineToCircle; */ var LineToLine = function (line1, line2, out) { - var x1 = line1.x1; var y1 = line1.y1; var x2 = line1.x2; @@ -82693,39 +85194,46 @@ var LineToLine = function (line1, line2, out) var x4 = line2.x2; var y4 = line2.y2; - var numA = (x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3); - var numB = (x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3); - var deNom = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1); + // Check that none of the lines are length zero + if ((x1 === x2 && y1 === y2) || (x3 === x4 && y3 === y4)) + { + return false; + } + + var denom = ((y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1)); // Make sure there is not a division by zero - this also indicates that the lines are parallel. // If numA and numB were both equal to zero the lines would be on top of each other (coincidental). // This check is not done because it is not necessary for this implementation (the parallel check accounts for this). - if (deNom === 0) + if (denom === 0) { + // Lines are parallel return false; } // Calculate the intermediate fractional point that the lines potentially intersect. - var uA = numA / deNom; - var uB = numB / deNom; + var ua = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denom; + var ub = ((x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3)) / denom; // The fractional point will be between 0 and 1 inclusive if the lines intersect. // If the fractional calculation is larger than 1 or smaller than 0 the lines would need to be longer to intersect. - if (uA >= 0 && uA <= 1 && uB >= 0 && uB <= 1) + if (ua < 0 || ua > 1 || ub < 0 || ub > 1) + { + return false; + } + else { if (out) { - out.x = x1 + (uA * (x2 - x1)); - out.y = y1 + (uA * (y2 - y1)); + out.x = x1 + ua * (x2 - x1); + out.y = y1 + ua * (y2 - y1); } return true; } - - return false; }; module.exports = LineToLine; @@ -82738,7 +85246,7 @@ module.exports = LineToLine; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82841,7 +85349,7 @@ module.exports = LineToRectangle; /** * @author Richard Davey * @author Florian Mertens - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82911,7 +85419,7 @@ module.exports = PointToLine; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82953,7 +85461,7 @@ module.exports = PointToLineSegment; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82992,7 +85500,7 @@ module.exports = RectangleToRectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83086,7 +85594,7 @@ module.exports = RectangleToTriangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83127,7 +85635,7 @@ module.exports = RectangleToValues; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83193,7 +85701,7 @@ module.exports = TriangleToCircle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83249,7 +85757,7 @@ module.exports = TriangleToLine; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83340,7 +85848,7 @@ module.exports = TriangleToTriangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83388,7 +85896,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83417,7 +85925,7 @@ module.exports = Angle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83492,7 +86000,7 @@ module.exports = BresenhamPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83533,7 +86041,7 @@ module.exports = CenterOn; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83564,7 +86072,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83596,7 +86104,7 @@ module.exports = CopyFrom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83631,7 +86139,7 @@ module.exports = Equals; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83690,7 +86198,7 @@ module.exports = Extend; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83811,7 +86319,7 @@ module.exports = GetEasedPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83851,7 +86359,7 @@ module.exports = GetMidPoint; /** * @author Richard Davey * @author Florian Mertens - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83906,7 +86414,7 @@ module.exports = GetNearestPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83951,7 +86459,7 @@ module.exports = GetNormal; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83991,7 +86499,7 @@ module.exports = GetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84058,7 +86566,7 @@ module.exports = GetPoints; /** * @author Richard Davey * @author Florian Mertens - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84068,12 +86576,10 @@ module.exports = GetPoints; * @function Phaser.Geom.Line.GetShortestDistance * @since 3.16.0 * - * @generic {Phaser.Geom.Point} O - [out,$return] - * * @param {Phaser.Geom.Line} line - The line to get the distance from. - * @param {(Phaser.Geom.Point|object)} point - The point to get the shortest distance to. + * @param {Phaser.Types.Math.Vector2Like} point - The point to get the shortest distance to. * - * @return {number} The shortest distance from the line to the point. + * @return {(boolean|number)} The shortest distance from the line to the point, or `false`. */ var GetShortestDistance = function (line, point) { @@ -84105,7 +86611,7 @@ module.exports = GetShortestDistance; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84134,7 +86640,7 @@ module.exports = Height; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84163,7 +86669,7 @@ module.exports = Length; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84501,7 +87007,7 @@ module.exports = Line; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84536,7 +87042,7 @@ module.exports = NormalAngle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84568,7 +87074,7 @@ module.exports = NormalX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84601,7 +87107,7 @@ module.exports = NormalY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84640,7 +87146,7 @@ module.exports = Offset; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84669,7 +87175,7 @@ module.exports = PerpSlope; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84710,7 +87216,7 @@ module.exports = Random; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84745,7 +87251,7 @@ module.exports = ReflectAngle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84782,7 +87288,7 @@ module.exports = Rotate; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84817,7 +87323,7 @@ module.exports = RotateAroundPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84866,7 +87372,7 @@ module.exports = RotateAroundXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84907,7 +87413,7 @@ module.exports = SetToAngle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84936,7 +87442,7 @@ module.exports = Slope; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84965,7 +87471,7 @@ module.exports = Width; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -85011,7 +87517,7 @@ module.exports = Line; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -85603,7 +88109,7 @@ module.exports = Face; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -85846,7 +88352,7 @@ module.exports = GenerateGridVerts; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -85991,7 +88497,7 @@ module.exports = GenerateObjVerts; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -86053,16 +88559,18 @@ var Vertex = __webpack_require__(85769); * @param {number[]} [normals] - Optional vertex normals array. If you don't have one, pass `null` or an empty array. * @param {number|number[]} [colors=0xffffff] - An array of colors, one per vertex, or a single color value applied to all vertices. * @param {number|number[]} [alphas=1] - An array of alpha values, one per vertex, or a single alpha value applied to all vertices. + * @param {boolean} [flipUV=false] - Flip the UV coordinates? * * @return {Phaser.Types.Geom.Mesh.GenerateVertsResult} The parsed Face and Vertex objects. */ -var GenerateVerts = function (vertices, uvs, indicies, containsZ, normals, colors, alphas) +var GenerateVerts = function (vertices, uvs, indicies, containsZ, normals, colors, alphas, flipUV) { if (containsZ === undefined) { containsZ = false; } if (colors === undefined) { colors = 0xffffff; } if (alphas === undefined) { alphas = 1; } + if (flipUV === undefined) { flipUV = false; } - if (vertices.length !== uvs.length) + if (vertices.length !== uvs.length && !containsZ) { console.warn('GenerateVerts: vertices and uvs count not equal'); return; @@ -86109,6 +88617,11 @@ var GenerateVerts = function (vertices, uvs, indicies, containsZ, normals, color u = uvs[index2]; v = uvs[index2 + 1]; + if (flipUV) + { + v = 1 - v; + } + color = (isColorArray) ? colors[index1] : colors; alpha = (isAlphaArray) ? alphas[index1] : alphas; @@ -86183,7 +88696,7 @@ module.exports = GenerateVerts; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -86500,7 +89013,7 @@ module.exports = ParseObj; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -86579,7 +89092,7 @@ module.exports = ParseObjMaterial; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -86645,7 +89158,7 @@ module.exports = RotateFace; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -86988,7 +89501,7 @@ module.exports = Vertex; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87019,7 +89532,7 @@ module.exports = Mesh; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87050,7 +89563,7 @@ module.exports = Ceil; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87081,7 +89594,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87113,7 +89626,7 @@ module.exports = CopyFrom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87143,7 +89656,7 @@ module.exports = Equals; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87174,7 +89687,7 @@ module.exports = Floor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87239,7 +89752,7 @@ module.exports = GetCentroid; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87268,7 +89781,7 @@ module.exports = GetMagnitude; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87297,7 +89810,7 @@ module.exports = GetMagnitudeSq; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87368,7 +89881,7 @@ module.exports = GetRectangleFromPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87410,7 +89923,7 @@ module.exports = Interpolate; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87441,7 +89954,7 @@ module.exports = Invert; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87477,7 +89990,7 @@ module.exports = Negative; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87571,7 +90084,7 @@ module.exports = Point; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87619,7 +90132,7 @@ module.exports = Project; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87665,7 +90178,7 @@ module.exports = ProjectUnit; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87710,7 +90223,7 @@ module.exports = SetMagnitude; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87742,7 +90255,7 @@ module.exports = Point; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87773,7 +90286,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87823,7 +90336,7 @@ module.exports = Contains; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87856,7 +90369,7 @@ module.exports = ContainsPoint; "use strict"; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88622,7 +91135,7 @@ module.exports = earcut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88679,7 +91192,7 @@ module.exports = GetAABB; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88723,7 +91236,7 @@ module.exports = GetNumberArray; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88801,7 +91314,7 @@ module.exports = GetPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88850,7 +91363,7 @@ module.exports = Perimeter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89085,7 +91598,7 @@ module.exports = Polygon; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89325,7 +91838,7 @@ module.exports = Simplify; /** * @author Richard Davey * @author Igor Ognichenko - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89401,7 +91914,7 @@ module.exports = Smooth; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89442,7 +91955,7 @@ module.exports = Translate; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89471,7 +91984,7 @@ module.exports = Polygon; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89500,7 +92013,7 @@ module.exports = Area; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89534,7 +92047,7 @@ module.exports = Ceil; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89570,12 +92083,10 @@ module.exports = CeilAll; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -// Centers this Rectangle so that the center coordinates match the given x and y values. - /** * Moves the top-left corner of a Rectangle so that its center is at the given coordinates. * @@ -89608,7 +92119,7 @@ module.exports = CenterOn; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89639,7 +92150,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89675,7 +92186,7 @@ module.exports = Contains; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89707,7 +92218,7 @@ module.exports = ContainsPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89748,7 +92259,7 @@ module.exports = ContainsRect; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89780,7 +92291,7 @@ module.exports = CopyFrom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89818,7 +92329,7 @@ module.exports = Decompose; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89853,7 +92364,7 @@ module.exports = Equals; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89907,7 +92418,7 @@ module.exports = FitInside; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89961,7 +92472,7 @@ module.exports = FitOutside; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89995,7 +92506,7 @@ module.exports = Floor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90031,24 +92542,26 @@ module.exports = FloorAll; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Rectangle = __webpack_require__(74118); var MATH_CONST = __webpack_require__(83392); -// points is an array of Point-like objects, -// either 2 dimensional arrays, or objects with public x/y properties: -// var points = [ -// [100, 200], -// [200, 400], -// { x: 30, y: 60 } -// ] - /** * Constructs new Rectangle or repositions and resizes an existing Rectangle so that all of the given points are on or within its bounds. * + * The `points` parameter is an array of Point-like objects: + * + * ```js + * const points = [ + * [100, 200], + * [200, 400], + * { x: 30, y: 60 } + * ] + * ``` + * * @function Phaser.Geom.Rectangle.FromPoints * @since 3.0.0 * @@ -90118,7 +92631,7 @@ module.exports = FromPoints; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90162,7 +92675,7 @@ module.exports = FromXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90191,7 +92704,7 @@ module.exports = GetAspectRatio; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90230,7 +92743,7 @@ module.exports = GetCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90312,16 +92825,13 @@ module.exports = GetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetPoint = __webpack_require__(47698); var Perimeter = __webpack_require__(85876); -// Return an array of points from the perimeter of the rectangle -// each spaced out based on the quantity or step required - /** * Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required. * @@ -90367,13 +92877,12 @@ module.exports = GetPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(79967); - /** * Returns the size of the Rectangle, expressed as a Point object. * With the value of the `width` as the `x` property and the `height` as the `y` property. @@ -90408,13 +92917,12 @@ module.exports = GetSize; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var CenterOn = __webpack_require__(79993); - /** * Increases the size of a Rectangle by a specified amount. * @@ -90451,7 +92959,7 @@ module.exports = Inflate; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90503,14 +93011,13 @@ module.exports = Intersection; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Perimeter = __webpack_require__(85876); var Point = __webpack_require__(79967); - /** * Returns an array of points from the perimeter of the Rectangle, where each point is spaced out based * on either the `step` value, or the `quantity`. @@ -90623,7 +93130,7 @@ module.exports = MarchingAnts; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90673,13 +93180,10 @@ module.exports = MergePoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -// Merges source rectangle into target rectangle and returns target -// Neither rect should have negative widths or heights - /** * Merges the source rectangle into the target rectangle and returns the target. * Neither rectangle should have a negative width or height. @@ -90721,7 +93225,7 @@ module.exports = MergeRect; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90766,7 +93270,7 @@ module.exports = MergeXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90802,7 +93306,7 @@ module.exports = Offset; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90837,7 +93341,7 @@ module.exports = OffsetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90872,7 +93376,7 @@ module.exports = Overlaps; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90901,7 +93405,7 @@ module.exports = Perimeter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90959,7 +93463,7 @@ module.exports = PerimeterPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90998,7 +93502,7 @@ module.exports = Random; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91070,7 +93574,7 @@ module.exports = RandomOutside; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91582,7 +94086,7 @@ module.exports = Rectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91612,12 +94116,10 @@ module.exports = SameDimensions; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -// Scales the width and height of this Rectangle by the given amounts. - /** * Scales the width and height of this Rectangle by the given amounts. * @@ -91652,7 +94154,7 @@ module.exports = Scale; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91695,7 +94197,7 @@ module.exports = Union; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91750,7 +94252,7 @@ module.exports = Rectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91790,7 +94292,7 @@ module.exports = Area; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91835,7 +94337,7 @@ module.exports = BuildEquilateral; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91912,7 +94414,7 @@ module.exports = BuildFromPolygon; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91962,7 +94464,7 @@ module.exports = BuildRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92016,7 +94518,7 @@ module.exports = CenterOn; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92061,7 +94563,7 @@ module.exports = Centroid; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92138,7 +94640,7 @@ module.exports = CircumCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92222,7 +94724,7 @@ module.exports = CircumCircle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92253,7 +94755,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92307,7 +94809,7 @@ module.exports = Contains; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92395,7 +94897,7 @@ module.exports = ContainsArray; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92427,7 +94929,7 @@ module.exports = ContainsPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92459,7 +94961,7 @@ module.exports = CopyFrom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92495,7 +94997,7 @@ module.exports = Decompose; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92532,7 +95034,7 @@ module.exports = Equals; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92620,7 +95122,7 @@ module.exports = GetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92714,7 +95216,7 @@ module.exports = GetPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92780,7 +95282,7 @@ module.exports = InCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92822,7 +95324,7 @@ module.exports = Offset; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92858,7 +95360,7 @@ module.exports = Perimeter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92915,7 +95417,7 @@ module.exports = Random; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92952,7 +95454,7 @@ module.exports = Rotate; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92987,7 +95489,7 @@ module.exports = RotateAroundPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93042,7 +95544,7 @@ module.exports = RotateAroundXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93490,7 +95992,7 @@ module.exports = Triangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93531,7 +96033,7 @@ module.exports = Triangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93602,7 +96104,7 @@ module.exports = CreateInteractiveObject; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93639,7 +96141,7 @@ module.exports = CreatePixelPerfectHandler; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -94750,7 +97252,7 @@ module.exports = InputManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -97264,7 +99766,7 @@ var InputPlugin = new Class({ debug.setRotation(rotation); debug.setScale(scaleX, scaleY); - debug.setPosition(x + offsetx, y + offsety); + debug.setPosition(x + offsetx * scaleX, y + offsety * scaleY); debug.setScrollFactor(gameObject.scrollFactorX, gameObject.scrollFactorY); debug.setDepth(gameObject.depth); }; @@ -98012,7 +100514,7 @@ module.exports = InputPlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -98121,7 +100623,7 @@ module.exports = InputPluginCache; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99453,7 +101955,7 @@ module.exports = Pointer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99552,7 +102054,7 @@ module.exports = INPUT_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99575,7 +102077,7 @@ module.exports = 'boot'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99598,7 +102100,7 @@ module.exports = 'destroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99628,7 +102130,7 @@ module.exports = 'dragend'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99661,7 +102163,7 @@ module.exports = 'dragenter'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99695,7 +102197,7 @@ module.exports = 'drag'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99728,7 +102230,7 @@ module.exports = 'dragleave'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99764,7 +102266,7 @@ module.exports = 'dragover'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99796,7 +102298,7 @@ module.exports = 'dragstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99827,7 +102329,7 @@ module.exports = 'drop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99870,7 +102372,7 @@ module.exports = 'gameobjectdown'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99903,7 +102405,7 @@ module.exports = 'dragend'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99935,7 +102437,7 @@ module.exports = 'dragenter'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99968,7 +102470,7 @@ module.exports = 'drag'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100000,7 +102502,7 @@ module.exports = 'dragleave'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100035,7 +102537,7 @@ module.exports = 'dragover'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100071,7 +102573,7 @@ module.exports = 'dragstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100103,7 +102605,7 @@ module.exports = 'drop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100146,7 +102648,7 @@ module.exports = 'gameobjectmove'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100192,7 +102694,7 @@ module.exports = 'gameobjectout'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100235,7 +102737,7 @@ module.exports = 'gameobjectover'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100278,7 +102780,7 @@ module.exports = 'pointerdown'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100321,7 +102823,7 @@ module.exports = 'pointermove'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100365,7 +102867,7 @@ module.exports = 'pointerout'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100408,7 +102910,7 @@ module.exports = 'pointerover'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100451,7 +102953,7 @@ module.exports = 'pointerup'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100495,7 +102997,7 @@ module.exports = 'wheel'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100538,7 +103040,7 @@ module.exports = 'gameobjectup'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100584,7 +103086,7 @@ module.exports = 'gameobjectwheel'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100613,7 +103115,7 @@ module.exports = 'gameout'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100642,7 +103144,7 @@ module.exports = 'gameover'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100665,7 +103167,7 @@ module.exports = 'boot'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100692,7 +103194,7 @@ module.exports = 'process'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100715,7 +103217,7 @@ module.exports = 'update'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100741,7 +103243,7 @@ module.exports = 'pointerlockchange'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100778,7 +103280,7 @@ module.exports = 'pointerdown'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100814,7 +103316,7 @@ module.exports = 'pointerdownoutside'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100851,7 +103353,7 @@ module.exports = 'pointermove'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100891,7 +103393,7 @@ module.exports = 'pointerout'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100928,7 +103430,7 @@ module.exports = 'pointerover'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100965,7 +103467,7 @@ module.exports = 'pointerup'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101001,7 +103503,7 @@ module.exports = 'pointerupoutside'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101041,7 +103543,7 @@ module.exports = 'wheel'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101065,7 +103567,7 @@ module.exports = 'preupdate'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101088,7 +103590,7 @@ module.exports = 'shutdown'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101112,7 +103614,7 @@ module.exports = 'start'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101139,7 +103641,7 @@ module.exports = 'update'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101206,7 +103708,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101332,7 +103834,7 @@ module.exports = Axis; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101479,7 +103981,7 @@ module.exports = Button; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -102253,7 +104755,7 @@ module.exports = Gamepad; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -102900,7 +105402,7 @@ module.exports = GamepadPlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103044,7 +105546,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103288,7 +105790,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103521,7 +106023,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103545,7 +106047,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103576,7 +106078,7 @@ module.exports = 'down'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103607,7 +106109,7 @@ module.exports = 'up'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103640,7 +106142,7 @@ module.exports = 'connected'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103668,7 +106170,7 @@ module.exports = 'disconnected'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103702,7 +106204,7 @@ module.exports = 'down'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103736,7 +106238,7 @@ module.exports = 'up'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103763,7 +106265,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103790,7 +106292,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103830,7 +106332,7 @@ module.exports = Input; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -104275,7 +106777,7 @@ module.exports = KeyboardManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105238,7 +107740,7 @@ module.exports = KeyboardPlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105281,7 +107783,7 @@ module.exports = AdvanceKeyCombo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105575,7 +108077,7 @@ module.exports = KeyCombo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105657,7 +108159,7 @@ module.exports = ProcessKeyCombo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105693,7 +108195,7 @@ module.exports = ResetKeyCombo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105731,7 +108233,7 @@ module.exports = 'keydown'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105762,7 +108264,7 @@ module.exports = 'keyup'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105798,7 +108300,7 @@ module.exports = 'keycombomatch'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105834,7 +108336,7 @@ module.exports = 'down'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105875,7 +108377,7 @@ module.exports = 'keydown-'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105909,7 +108411,7 @@ module.exports = 'keyup-'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105945,7 +108447,7 @@ module.exports = 'up'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105973,7 +108475,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -106012,7 +108514,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -106047,7 +108549,7 @@ module.exports = DownDuration; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -106090,7 +108592,7 @@ module.exports = JustDown; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -106133,7 +108635,7 @@ module.exports = JustUp; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -106536,7 +109038,7 @@ module.exports = Key; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -107443,7 +109945,7 @@ module.exports = KeyCodes; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -107466,7 +109968,7 @@ module.exports = KeyMap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -107501,7 +110003,7 @@ module.exports = UpDuration; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -108068,7 +110570,7 @@ module.exports = MouseManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -108092,7 +110594,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -108500,7 +111002,7 @@ module.exports = TouchManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -108524,7 +111026,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -109093,7 +111595,7 @@ module.exports = File; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -109163,7 +111665,7 @@ module.exports = FileTypesManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -109205,7 +111707,7 @@ module.exports = GetURL; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -110318,7 +112820,7 @@ module.exports = LoaderPlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -110367,7 +112869,7 @@ module.exports = MergeXHRSettings; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -110674,7 +113176,7 @@ module.exports = MultiFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -110756,7 +113258,7 @@ module.exports = XHRLoader; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -110827,7 +113329,7 @@ module.exports = XHRSettings; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -110989,7 +113491,7 @@ module.exports = FILE_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111021,7 +113523,7 @@ module.exports = 'addfile'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111051,7 +113553,7 @@ module.exports = 'complete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111084,7 +113586,7 @@ module.exports = 'filecomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111142,7 +113644,7 @@ module.exports = 'filecomplete-'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111169,7 +113671,7 @@ module.exports = 'loaderror'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111197,7 +113699,7 @@ module.exports = 'load'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111226,7 +113728,7 @@ module.exports = 'fileprogress'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111257,7 +113759,7 @@ module.exports = 'postprocess'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111284,7 +113786,7 @@ module.exports = 'progress'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111313,7 +113815,7 @@ module.exports = 'start'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111344,7 +113846,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111546,7 +114048,7 @@ module.exports = AnimationJSONFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111817,7 +114319,7 @@ module.exports = AsepriteFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -112074,7 +114576,7 @@ module.exports = AtlasJSONFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -112316,7 +114818,7 @@ module.exports = AtlasXMLFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -112591,7 +115093,7 @@ module.exports = AudioFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -112882,7 +115384,7 @@ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audio /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -113065,7 +115567,7 @@ module.exports = BinaryFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -113312,7 +115814,7 @@ module.exports = BitmapFontFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -114041,7 +116543,7 @@ module.exports = CompressedTextureFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -114451,7 +116953,7 @@ module.exports = GLSLFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -114655,7 +117157,7 @@ module.exports = HTML5AudioFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -114831,7 +117333,7 @@ module.exports = HTMLFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -115088,7 +117590,7 @@ module.exports = HTMLTextureFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -115446,7 +117948,7 @@ module.exports = ImageFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -115686,7 +118188,7 @@ module.exports = JSONFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116015,7 +118517,7 @@ module.exports = MultiAtlasFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116233,7 +118735,7 @@ module.exports = MultiScriptFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116488,7 +118990,7 @@ module.exports = OBJFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116716,7 +119218,7 @@ module.exports = PackFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116929,7 +119431,7 @@ module.exports = PluginFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117267,7 +119769,7 @@ module.exports = SVGFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117488,7 +119990,7 @@ module.exports = SceneFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117695,7 +120197,7 @@ module.exports = ScenePluginFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117884,7 +120386,7 @@ module.exports = ScriptFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118074,7 +120576,7 @@ module.exports = SpriteSheetFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118254,7 +120756,7 @@ module.exports = TextFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118448,7 +120950,7 @@ module.exports = TilemapCSVFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118603,7 +121105,7 @@ module.exports = TilemapImpactFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118758,7 +121260,7 @@ module.exports = TilemapJSONFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118999,7 +121501,7 @@ module.exports = UnityAtlasFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119395,7 +121897,7 @@ module.exports = VideoFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119579,7 +122081,7 @@ module.exports = XMLFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119633,7 +122135,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119674,7 +122176,7 @@ module.exports = Loader; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119710,7 +122212,7 @@ module.exports = Average; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119742,7 +122244,7 @@ module.exports = Bernstein; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119772,7 +122274,7 @@ module.exports = Between; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119810,7 +122312,7 @@ module.exports = CatmullRom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119848,7 +122350,7 @@ module.exports = CeilTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119879,7 +122381,7 @@ module.exports = Clamp; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119910,7 +122412,7 @@ module.exports = DegToRad; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119940,7 +122442,7 @@ module.exports = Difference; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120224,7 +122726,7 @@ module.exports = Euler; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120265,7 +122767,7 @@ module.exports = Factorial; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120295,7 +122797,7 @@ module.exports = FloatBetween; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120333,7 +122835,7 @@ module.exports = FloorTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120368,7 +122870,7 @@ module.exports = FromPercent; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120402,7 +122904,7 @@ module.exports = GetSpeed; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120434,7 +122936,7 @@ module.exports = IsEven; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120464,7 +122966,7 @@ module.exports = IsEvenStrict; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120530,7 +123032,7 @@ module.exports = LinearXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121124,7 +123626,7 @@ module.exports = Matrix3; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122918,7 +125420,7 @@ module.exports = Matrix4; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122991,7 +125493,7 @@ module.exports = Median; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123022,7 +125524,7 @@ module.exports = MinSub; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123082,7 +125584,7 @@ module.exports = Percent; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124132,7 +126634,7 @@ module.exports = Quaternion; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124163,7 +126665,7 @@ module.exports = RadToDeg; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124204,7 +126706,7 @@ module.exports = RandomXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124244,7 +126746,7 @@ module.exports = RandomXYZ; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124281,7 +126783,7 @@ module.exports = RandomXYZW; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124317,7 +126819,7 @@ module.exports = Rotate; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124362,7 +126864,7 @@ module.exports = RotateAround; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124404,7 +126906,7 @@ module.exports = RotateAroundDistance; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124442,7 +126944,7 @@ module.exports = RotateTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124491,7 +126993,7 @@ module.exports = RotateVec3; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124521,7 +127023,7 @@ module.exports = RoundAwayFromZero; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124574,7 +127076,7 @@ module.exports = RoundTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124628,7 +127130,7 @@ module.exports = SinCosTableGenerator; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124676,7 +127178,7 @@ module.exports = SmoothStep; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124716,7 +127218,7 @@ module.exports = SmootherStep; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124773,7 +127275,7 @@ module.exports = ToXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124829,7 +127331,7 @@ module.exports = TransformXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125623,7 +128125,7 @@ module.exports = Vector2; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126670,7 +129172,7 @@ module.exports = Vector3; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127212,7 +129714,7 @@ module.exports = Vector4; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127243,7 +129745,7 @@ module.exports = Within; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127276,7 +129778,7 @@ module.exports = Wrap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127308,7 +129810,7 @@ module.exports = Between; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127340,7 +129842,7 @@ module.exports = BetweenPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127373,7 +129875,7 @@ module.exports = BetweenPointsY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127408,7 +129910,7 @@ module.exports = BetweenY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127454,7 +129956,7 @@ module.exports = CounterClockwise; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127493,7 +129995,7 @@ module.exports = Normalize; /** * @author Richard Davey * @author @samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127523,7 +130025,7 @@ module.exports = Random; /** * @author Richard Davey * @author @samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127552,7 +130054,7 @@ module.exports = RandomDegrees; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127583,7 +130085,7 @@ module.exports = Reverse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127651,7 +130153,7 @@ module.exports = RotateTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127699,7 +130201,7 @@ module.exports = ShortestBetween; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127732,7 +130234,7 @@ module.exports = Wrap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127765,7 +130267,7 @@ module.exports = WrapDegrees; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127799,7 +130301,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127892,7 +130394,7 @@ module.exports = MATH_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127927,7 +130429,7 @@ module.exports = DistanceBetween; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127960,7 +130462,7 @@ module.exports = DistanceBetweenPoints; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127993,7 +130495,7 @@ module.exports = DistanceBetweenPointsSquared; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128028,7 +130530,7 @@ module.exports = ChebyshevDistance; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128063,7 +130565,7 @@ module.exports = DistancePower; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128098,7 +130600,7 @@ module.exports = SnakeDistance; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128133,7 +130635,7 @@ module.exports = DistanceSquared; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128161,7 +130663,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128243,7 +130745,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128275,7 +130777,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128316,7 +130818,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128348,7 +130850,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128372,7 +130874,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128418,7 +130920,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128483,7 +130985,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128527,7 +131029,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128551,7 +131053,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128580,7 +131082,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128616,7 +131118,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128645,7 +131147,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128669,7 +131171,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128698,7 +131200,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128734,7 +131236,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128763,7 +131265,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128787,7 +131289,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128843,7 +131345,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128906,7 +131408,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128962,7 +131464,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128986,7 +131488,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129015,7 +131517,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129051,7 +131553,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129080,7 +131582,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129104,7 +131606,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129137,7 +131639,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129166,7 +131668,7 @@ module.exports = Linear; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129180,7 +131682,7 @@ module.exports = __webpack_require__(43927); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129209,7 +131711,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129245,7 +131747,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129274,7 +131776,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129298,7 +131800,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129327,7 +131829,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129363,7 +131865,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129392,7 +131894,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129416,7 +131918,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129445,7 +131947,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129481,7 +131983,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129510,7 +132012,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129534,7 +132036,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129574,7 +132076,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129614,7 +132116,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129654,7 +132156,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129678,7 +132180,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129721,7 +132223,7 @@ module.exports = Stepped; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129739,7 +132241,7 @@ module.exports = __webpack_require__(52770); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129771,7 +132273,7 @@ module.exports = Ceil; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129806,7 +132308,7 @@ module.exports = Equal; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129838,7 +132340,7 @@ module.exports = Floor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129873,7 +132375,7 @@ module.exports = GreaterThan; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129908,7 +132410,7 @@ module.exports = LessThan; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129934,7 +132436,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130027,7 +132529,7 @@ module.exports = PhaserMath; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130067,7 +132569,7 @@ module.exports = BezierInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130125,7 +132627,7 @@ module.exports = CatmullRomInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130196,7 +132698,7 @@ module.exports = CubicBezierInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130244,7 +132746,7 @@ module.exports = LinearInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130304,7 +132806,7 @@ module.exports = QuadraticBezierInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130338,7 +132840,7 @@ module.exports = SmoothStepInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130372,7 +132874,7 @@ module.exports = SmootherStepInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130400,7 +132902,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130431,7 +132933,7 @@ module.exports = GetPowerOfTwo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130462,7 +132964,7 @@ module.exports = IsSizePowerOfTwo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130491,7 +132993,7 @@ module.exports = IsValuePowerOfTwo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130515,7 +133017,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131026,7 +133528,7 @@ module.exports = RandomDataGenerator; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131071,7 +133573,7 @@ module.exports = SnapCeil; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131116,7 +133618,7 @@ module.exports = SnapFloor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131160,7 +133662,7 @@ module.exports = SnapTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131184,7 +133686,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131278,7 +133780,7 @@ __webpack_require__.g.Phaser = Phaser; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131381,7 +133883,7 @@ module.exports = ArcadeImage; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132108,7 +134610,7 @@ module.exports = ArcadePhysics; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132213,7 +134715,7 @@ module.exports = ArcadeSprite; /** * @author Richard Davey * @author Benjamin D. Richards - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134843,7 +137345,7 @@ module.exports = Body; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135027,7 +137529,7 @@ module.exports = Collider; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135367,7 +137869,7 @@ module.exports = Factory; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135476,7 +137978,7 @@ module.exports = GetOverlapX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135585,7 +138087,7 @@ module.exports = GetOverlapY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135688,9 +138190,10 @@ var PhysicsGroup = new Class({ * This should be either `Phaser.Physics.Arcade.Image`, `Phaser.Physics.Arcade.Sprite`, or a class extending one of those. * * @name Phaser.Physics.Arcade.Group#classType - * @type {Phaser.Types.GameObjects.Group.GroupClassTypeConstructor} + * @type {function} * @default ArcadeSprite * @since 3.0.0 + * @see Phaser.Types.GameObjects.Group.GroupClassTypeConstructor */ config.classType = GetFastValue(config, 'classType', ArcadeSprite); @@ -135884,7 +138387,7 @@ module.exports = PhysicsGroup; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136302,7 +138805,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136720,7 +139223,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136741,12 +139244,13 @@ var ProcessX = __webpack_require__(22916); * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate. * @param {boolean} overlapOnly - If `true`, the bodies will only have their overlap data set and no separation will take place. * @param {number} bias - A value to add to the delta value during overlap checking. Used to prevent sprite tunneling. + * @param {number} [overlap] - If given then this value will be used as the overlap and no check will be run. * * @return {boolean} `true` if the two bodies overlap vertically, otherwise `false`. */ -var SeparateX = function (body1, body2, overlapOnly, bias) +var SeparateX = function (body1, body2, overlapOnly, bias, overlap) { - var overlap = GetOverlapX(body1, body2, overlapOnly, bias); + if (overlap === undefined) { overlap = GetOverlapX(body1, body2, overlapOnly, bias); } var body1Immovable = body1.immovable; var body2Immovable = body2.immovable; @@ -136792,7 +139296,7 @@ module.exports = SeparateX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136813,12 +139317,13 @@ var ProcessY = __webpack_require__(67050); * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate. * @param {boolean} overlapOnly - If `true`, the bodies will only have their overlap data set and no separation will take place. * @param {number} bias - A value to add to the delta value during overlap checking. Used to prevent sprite tunneling. + * @param {number} [overlap] - If given then this value will be used as the overlap and no check will be run. * * @return {boolean} `true` if the two bodies overlap vertically, otherwise `false`. */ -var SeparateY = function (body1, body2, overlapOnly, bias) +var SeparateY = function (body1, body2, overlapOnly, bias, overlap) { - var overlap = GetOverlapY(body1, body2, overlapOnly, bias); + if (overlap === undefined) { overlap = GetOverlapY(body1, body2, overlapOnly, bias); } var body1Immovable = body1.immovable; var body2Immovable = body2.immovable; @@ -136864,7 +139369,7 @@ module.exports = SeparateY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137914,7 +140419,7 @@ module.exports = StaticBody; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138114,7 +140619,7 @@ module.exports = StaticPhysicsGroup; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138125,6 +140630,7 @@ var Class = __webpack_require__(56694); var Collider = __webpack_require__(3909); var CONST = __webpack_require__(47401); var DistanceBetween = __webpack_require__(53996); +var DistanceBetweenPoints = __webpack_require__(92951); var EventEmitter = __webpack_require__(6659); var Events = __webpack_require__(27037); var FuzzyEqual = __webpack_require__(88456); @@ -139450,7 +141956,7 @@ var World = new Class({ body.velocity.set(velocityX, velocityY); - if (maxSpeed > -1 && speed > maxSpeed) + if (maxSpeed > -1 && body.velocity.length() > maxSpeed) { body.velocity.normalize().scale(maxSpeed); speed = maxSpeed; @@ -139477,6 +141983,12 @@ var World = new Class({ */ separate: function (body1, body2, processCallback, callbackContext, overlapOnly) { + var overlapX; + var overlapY; + + var result = false; + var runSeparation = true; + if ( !body1.enable || !body2.enable || @@ -139484,80 +141996,71 @@ var World = new Class({ body2.checkCollision.none || !this.intersects(body1, body2)) { - return false; + return result; } // They overlap. Is there a custom process callback? If it returns true then we can carry on, otherwise we should abort. if (processCallback && processCallback.call(callbackContext, body1.gameObject, body2.gameObject) === false) { - return false; - } - - // Circle vs. Circle quick bail out - if (body1.isCircle && body2.isCircle) - { - return this.separateCircle(body1, body2, overlapOnly); + return result; } - // We define the behavior of bodies in a collision circle and rectangle - // If a collision occurs in the corner points of the rectangle, the body behave like circles - - // Either body1 or body2 is a circle - if (body1.isCircle !== body2.isCircle) + // Circle vs. Circle, or Circle vs. Rect + if (body1.isCircle || body2.isCircle) { - var bodyRect = (body1.isCircle) ? body2 : body1; - var bodyCircle = (body1.isCircle) ? body1 : body2; + var circleResults = this.separateCircle(body1, body2, overlapOnly); - var rect = { - x: bodyRect.x, - y: bodyRect.y, - right: bodyRect.right, - bottom: bodyRect.bottom - }; - - var circle = bodyCircle.center; - - if (circle.y < rect.y || circle.y > rect.bottom) + if (circleResults.result) { - if (circle.x < rect.x || circle.x > rect.right) - { - return this.separateCircle(body1, body2, overlapOnly); - } + // We got a satisfactory result from the separateCircle method + result = true; + runSeparation = false; + } + else + { + // Further processing required + overlapX = circleResults.x; + overlapY = circleResults.y; + runSeparation = true; } } - var resultX = false; - var resultY = false; - - // Do we separate on x first or y first or both? - if (overlapOnly) + if (runSeparation) { - // No separation but we need to calculate overlapX, overlapY, etc. - resultX = SeparateX(body1, body2, overlapOnly, this.OVERLAP_BIAS); - resultY = SeparateY(body1, body2, overlapOnly, this.OVERLAP_BIAS); - } - else if (this.forceX || Math.abs(this.gravity.y + body1.gravity.y) < Math.abs(this.gravity.x + body1.gravity.x)) - { - resultX = SeparateX(body1, body2, overlapOnly, this.OVERLAP_BIAS); + var resultX = false; + var resultY = false; + var bias = this.OVERLAP_BIAS; - // Are they still intersecting? Let's do the other axis then - if (this.intersects(body1, body2)) + // Do we separate on x first or y first or both? + if (overlapOnly) { - resultY = SeparateY(body1, body2, overlapOnly, this.OVERLAP_BIAS); + // No separation but we need to calculate overlapX, overlapY, etc. + resultX = SeparateX(body1, body2, overlapOnly, bias, overlapX); + resultY = SeparateY(body1, body2, overlapOnly, bias, overlapY); } - } - else - { - resultY = SeparateY(body1, body2, overlapOnly, this.OVERLAP_BIAS); + else if (this.forceX || Math.abs(this.gravity.y + body1.gravity.y) < Math.abs(this.gravity.x + body1.gravity.x)) + { + resultX = SeparateX(body1, body2, overlapOnly, bias, overlapX); - // Are they still intersecting? Let's do the other axis then - if (this.intersects(body1, body2)) + // Are they still intersecting? Let's do the other axis then + if (this.intersects(body1, body2)) + { + resultY = SeparateY(body1, body2, overlapOnly, bias, overlapY); + } + } + else { - resultX = SeparateX(body1, body2, overlapOnly, this.OVERLAP_BIAS); + resultY = SeparateY(body1, body2, overlapOnly, bias, overlapY); + + // Are they still intersecting? Let's do the other axis then + if (this.intersects(body1, body2)) + { + resultX = SeparateX(body1, body2, overlapOnly, bias, overlapX); + } } - } - var result = (resultX || resultY); + result = (resultX || resultY); + } if (result) { @@ -139588,140 +142091,209 @@ var World = new Class({ * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to be separated. * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to be separated. * @param {boolean} [overlapOnly] - If this a collide or overlap check? - * @param {number} [bias] - A small value added to the calculations. * * @return {boolean} True if separation occurred, otherwise false. */ - separateCircle: function (body1, body2, overlapOnly, bias) + separateCircle: function (body1, body2, overlapOnly) { - // Set the bounding box overlap values into the bodies themselves (hence we don't use the return values here) - GetOverlapX(body1, body2, false, bias); - GetOverlapY(body1, body2, false, bias); + // Set the AABB overlap, blocked and touching values into the bodies (we don't use the return values here) + GetOverlapX(body1, body2, false, 0); + GetOverlapY(body1, body2, false, 0); + + var body1IsCircle = body1.isCircle; + var body2IsCircle = body2.isCircle; + var body1Center = body1.center; + var body2Center = body2.center; + var body1Immovable = body1.immovable; + var body2Immovable = body2.immovable; + var body1Velocity = body1.velocity; + var body2Velocity = body2.velocity; var overlap = 0; + var twoCircles = true; - if (body1.isCircle !== body2.isCircle) + if (body1IsCircle !== body2IsCircle) { - var rect = { - x: (body2.isCircle) ? body1.position.x : body2.position.x, - y: (body2.isCircle) ? body1.position.y : body2.position.y, - right: (body2.isCircle) ? body1.right : body2.right, - bottom: (body2.isCircle) ? body1.bottom : body2.bottom - }; + twoCircles = false; - var circle = { - x: (body1.isCircle) ? body1.center.x : body2.center.x, - y: (body1.isCircle) ? body1.center.y : body2.center.y, - radius: (body1.isCircle) ? body1.halfWidth : body2.halfWidth - }; + var circleX = body1Center.x; + var circleY = body1Center.y; + var circleRadius = body1.halfWidth; + + var rectX = body2.position.x; + var rectY = body2.position.y; + var rectRight = body2.right; + var rectBottom = body2.bottom; + + if (body2IsCircle) + { + circleX = body2Center.x; + circleY = body2Center.y; + circleRadius = body2.halfWidth; + + rectX = body1.position.x; + rectY = body1.position.y; + rectRight = body1.right; + rectBottom = body1.bottom; + } - if (circle.y < rect.y) + if (circleY < rectY) { - if (circle.x < rect.x) + if (circleX < rectX) { - overlap = DistanceBetween(circle.x, circle.y, rect.x, rect.y) - circle.radius; + overlap = DistanceBetween(circleX, circleY, rectX, rectY) - circleRadius; } - else if (circle.x > rect.right) + else if (circleX > rectRight) { - overlap = DistanceBetween(circle.x, circle.y, rect.right, rect.y) - circle.radius; + overlap = DistanceBetween(circleX, circleY, rectRight, rectY) - circleRadius; } } - else if (circle.y > rect.bottom) + else if (circleY > rectBottom) { - if (circle.x < rect.x) + if (circleX < rectX) { - overlap = DistanceBetween(circle.x, circle.y, rect.x, rect.bottom) - circle.radius; + overlap = DistanceBetween(circleX, circleY, rectX, rectBottom) - circleRadius; } - else if (circle.x > rect.right) + else if (circleX > rectRight) { - overlap = DistanceBetween(circle.x, circle.y, rect.right, rect.bottom) - circle.radius; + overlap = DistanceBetween(circleX, circleY, rectRight, rectBottom) - circleRadius; } } + // If a collision occurs in the corner points of the rectangle + // then the bodies behave like circles overlap *= -1; } else { - overlap = (body1.halfWidth + body2.halfWidth) - DistanceBetween(body1.center.x, body1.center.y, body2.center.x, body2.center.y); + overlap = (body1.halfWidth + body2.halfWidth) - DistanceBetweenPoints(body1Center, body2Center); } body1.overlapR = overlap; body2.overlapR = overlap; - // Can't separate two immovable bodies, or a body with its own custom separation logic - if (overlapOnly || overlap === 0 || (body1.immovable && body2.immovable) || body1.customSeparateX || body2.customSeparateX) - { - if (overlap !== 0 && (body1.onOverlap || body2.onOverlap)) - { - this.emit(Events.OVERLAP, body1.gameObject, body2.gameObject, body1, body2); - } + var angle = AngleBetweenPoints(body1Center, body2Center); + var overlapX = (overlap + MATH_CONST.EPSILON) * Math.cos(angle); + var overlapY = (overlap + MATH_CONST.EPSILON) * Math.sin(angle); - // return true if there was some overlap, otherwise false - return (overlap !== 0); - } + console.log('overlap', overlap, 'xy', overlapX, overlapY); - var dx = body1.center.x - body2.center.x; - var dy = body1.center.y - body2.center.y; - var d = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)); - var nx = ((body2.center.x - body1.center.x) / d) || 0; - var ny = ((body2.center.y - body1.center.y) / d) || 0; - var p = 2 * (body1.velocity.x * nx + body1.velocity.y * ny - body2.velocity.x * nx - body2.velocity.y * ny) / (body1.mass + body2.mass); + var results = { overlap: overlap, result: false, x: overlapX, y: overlapY }; - if (body1.immovable || body2.immovable) + // We know the AABBs already intersect before we enter this method + if (overlapOnly && (!twoCircles || (twoCircles && overlap !== 0))) { - p *= 2; - } + // Now we know the rect vs circle overlaps, or two circles do + results.result = true; - if (!body1.immovable) - { - body1.velocity.x = (body1.velocity.x - p / body1.mass * nx); - body1.velocity.y = (body1.velocity.y - p / body1.mass * ny); + return results; } - if (!body2.immovable) + // Can't separate (in this method): + // Two immovable bodies + // A body with its own custom separation logic + // A circle vs. a rect with a face-on collision + if ((!twoCircles && overlap === 0) || (body1Immovable && body2Immovable) || body1.customSeparateX || body2.customSeparateX) { - body2.velocity.x = (body2.velocity.x + p / body2.mass * nx); - body2.velocity.y = (body2.velocity.y + p / body2.mass * ny); - } + // Let SeparateX / SeparateY handle this + results.x = undefined; + results.y = undefined; - if (!body1.immovable && !body2.immovable) - { - overlap /= 2; + return results; } - // Note: This is inadequate for circle-rectangle separation + // If we get this far we either have circle vs. circle + // or circle vs. rect with corner collision - var angle = AngleBetweenPoints(body1.center, body2.center); - var overlapX = (overlap + MATH_CONST.EPSILON) * Math.cos(angle); - var overlapY = (overlap + MATH_CONST.EPSILON) * Math.sin(angle); + var deadlock = (!body1.pushable && !body2.pushable); - if (!body1.immovable) + if (twoCircles) { - body1.x -= overlapX; - body1.y -= overlapY; + var dx = body1Center.x - body2Center.x; + var dy = body1Center.y - body2Center.y; + var d = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)); + var nx = ((body2Center.x - body1Center.x) / d) || 0; + var ny = ((body2Center.y - body1Center.y) / d) || 0; + var p = 2 * (body1Velocity.x * nx + body1Velocity.y * ny - body2Velocity.x * nx - body2Velocity.y * ny) / (body1.mass + body2.mass); - body1.updateCenter(); - } + if (body1Immovable || body2Immovable) + { + p *= 2; + } - if (!body2.immovable) - { - body2.x += overlapX; - body2.y += overlapY; + console.log('circ vel', body1Velocity, body2Velocity, 'p', p, 'nxy', nx, ny); - body2.updateCenter(); - } + if (!body1Immovable) + { + body1Velocity.x = (body1Velocity.x - p / body1.mass * nx); + body1Velocity.y = (body1Velocity.y - p / body1.mass * ny); + body1Velocity.multiply(body1.bounce); + + console.log('body1', body1Velocity, 'y', body1.y); + } + + if (!body2Immovable) + { + body2Velocity.x = (body2Velocity.x + p / body2.mass * nx); + body2Velocity.y = (body2Velocity.y + p / body2.mass * ny); + body2Velocity.multiply(body2.bounce); + + console.log('body2', body2Velocity, 'y', body2.y); + } + + if (!body1Immovable && !body2Immovable) + { + overlapX *= 0.5; + overlapY *= 0.5; + } + + if (!body1Immovable) + { + body1.x -= overlapX; + body1.y -= overlapY; + + body1.updateCenter(); + + console.log('body1 sep', body1.y); + } + + if (!body2Immovable) + { + body2.x += overlapX; + body2.y += overlapY; - body1.velocity.x *= body1.bounce.x; - body1.velocity.y *= body1.bounce.y; - body2.velocity.x *= body2.bounce.x; - body2.velocity.y *= body2.bounce.y; + body2.updateCenter(); + } - if (body1.onCollide || body2.onCollide) + results.result = true; + } + else { - this.emit(Events.COLLIDE, body1.gameObject, body2.gameObject, body1, body2); + // Circle vs. Rect + // We'll only move the circle (if we can) and let + // the runSeparation handle the rectangle + + if (!body1Immovable || body1.pushable || deadlock) + { + body1.x -= overlapX; + body1.y -= overlapY; + + body1.updateCenter(); + } + else if (!body2Immovable || body2.pushable || deadlock) + { + body2.x += overlapX; + body2.y += overlapY; + + body2.updateCenter(); + } + + // Let SeparateX / SeparateY handle this further + results.x = undefined; + results.y = undefined; } - return true; + return results; }, /** @@ -139746,10 +142318,10 @@ var World = new Class({ { // Rect vs. Rect return !( - body1.right <= body2.position.x || - body1.bottom <= body2.position.y || - body1.position.x >= body2.right || - body1.position.y >= body2.bottom + body1.right <= body2.left || + body1.bottom <= body2.top || + body1.left >= body2.right || + body1.top >= body2.bottom ); } else if (body1.isCircle) @@ -139757,7 +142329,7 @@ var World = new Class({ if (body2.isCircle) { // Circle vs. Circle - return DistanceBetween(body1.center.x, body1.center.y, body2.center.x, body2.center.y) <= (body1.halfWidth + body2.halfWidth); + return DistanceBetweenPoints(body1.center, body2.center) <= (body1.halfWidth + body2.halfWidth); } else { @@ -140315,8 +142887,8 @@ var World = new Class({ return false; } - var x = body.position.x; - var y = body.position.y; + var x = body.x; + var y = body.y; var w = body.width; var h = body.height; @@ -140574,7 +143146,7 @@ module.exports = World; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140650,7 +143222,7 @@ module.exports = Acceleration; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140733,7 +143305,7 @@ module.exports = Angular; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140834,7 +143406,7 @@ module.exports = Bounce; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140962,7 +143534,7 @@ module.exports = Debug; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141096,7 +143668,7 @@ module.exports = Drag; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141110,15 +143682,16 @@ var Enable = { /** * Enables this Game Object's Body. + * If you reset the Body you must also pass `x` and `y`. * * @method Phaser.Physics.Arcade.Components.Enable#enableBody * @since 3.0.0 * - * @param {boolean} reset - Also reset the Body and place it at (x, y). - * @param {number} x - The horizontal position to place the Game Object and Body. - * @param {number} y - The horizontal position to place the Game Object and Body. - * @param {boolean} enableGameObject - Also activate this Game Object. - * @param {boolean} showGameObject - Also show this Game Object. + * @param {boolean} [reset] - Also reset the Body and place the Game Object at (x, y). + * @param {number} [x] - The horizontal position to place the Game Object, if `reset` is true. + * @param {number} [y] - The horizontal position to place the Game Object, if `reset` is true. + * @param {boolean} [enableGameObject] - Also set this Game Object's `active` to true. + * @param {boolean} [showGameObject] - Also set this Game Object's `visible` to true. * * @return {this} This Game Object. * @@ -141157,8 +143730,8 @@ var Enable = { * @method Phaser.Physics.Arcade.Components.Enable#disableBody * @since 3.0.0 * - * @param {boolean} [disableGameObject=false] - Also deactivate this Game Object. - * @param {boolean} [hideGameObject=false] - Also hide this Game Object. + * @param {boolean} [disableGameObject=false] - Also set this Game Object's `active` to false. + * @param {boolean} [hideGameObject=false] - Also set this Game Object's `visible` to false. * * @return {this} This Game Object. * @@ -141221,7 +143794,7 @@ module.exports = Enable; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141310,7 +143883,7 @@ module.exports = Friction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141389,7 +143962,7 @@ module.exports = Gravity; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141436,7 +144009,7 @@ module.exports = Immovable; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141632,7 +144205,7 @@ module.exports = OverlapRect; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141681,7 +144254,7 @@ module.exports = Pushable; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141785,7 +144358,7 @@ module.exports = Size; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141885,7 +144458,7 @@ module.exports = Velocity; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141921,7 +144494,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142051,7 +144624,7 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142086,7 +144659,7 @@ module.exports = 'collide'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142121,7 +144694,7 @@ module.exports = 'overlap'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142146,7 +144719,7 @@ module.exports = 'pause'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142171,7 +144744,7 @@ module.exports = 'resume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142205,7 +144778,7 @@ module.exports = 'tilecollide'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142239,7 +144812,7 @@ module.exports = 'tileoverlap'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142273,7 +144846,7 @@ module.exports = 'worldbounds'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142303,7 +144876,7 @@ module.exports = 'worldstep'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142332,7 +144905,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142378,7 +144951,7 @@ module.exports = Arcade; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142420,7 +144993,7 @@ module.exports = ProcessTileCallbacks; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142469,7 +145042,7 @@ module.exports = ProcessTileSeparationX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142518,7 +145091,7 @@ module.exports = ProcessTileSeparationY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142639,7 +145212,7 @@ module.exports = SeparateTile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142730,7 +145303,7 @@ module.exports = TileCheckX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142821,7 +145394,7 @@ module.exports = TileCheckY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142858,7 +145431,7 @@ module.exports = TileIntersectsBody; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142888,7 +145461,7 @@ module.exports = Tilemap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142915,7 +145488,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143322,7 +145895,7 @@ module.exports = BodyBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143379,7 +145952,7 @@ module.exports = Matter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144310,7 +146883,7 @@ module.exports = Factory; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144437,7 +147010,7 @@ module.exports = MatterGameObject; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144584,7 +147157,7 @@ module.exports = MatterImage; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146047,7 +148620,7 @@ module.exports = MatterPhysics; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146200,7 +148773,7 @@ module.exports = MatterSprite; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146523,7 +149096,7 @@ module.exports = MatterTileBody; * @author Joachim Grill * @author Richard Davey * @copyright 2018 CodeAndWeb GmbH - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146664,7 +149237,7 @@ module.exports = PhysicsEditorParser; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146782,7 +149355,7 @@ module.exports = PhysicsJSONParser; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147171,7 +149744,7 @@ module.exports = PointerConstraint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149392,7 +151965,7 @@ module.exports = World; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149433,7 +152006,7 @@ module.exports = Bounce; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149620,7 +152193,7 @@ module.exports = Collision; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149777,7 +152350,7 @@ module.exports = Force; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149868,7 +152441,7 @@ module.exports = Friction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149909,7 +152482,7 @@ module.exports = Gravity; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149992,7 +152565,7 @@ module.exports = Mass; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150047,7 +152620,7 @@ module.exports = Sensor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150338,7 +152911,7 @@ module.exports = SetBody; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150497,7 +153070,7 @@ module.exports = Sleep; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150553,7 +153126,7 @@ module.exports = Static; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150869,7 +153442,7 @@ module.exports = Transform; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150971,7 +153544,7 @@ module.exports = Velocity; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151004,7 +153577,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151040,7 +153613,7 @@ module.exports = 'afteradd'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151076,7 +153649,7 @@ module.exports = 'afterremove'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151111,7 +153684,7 @@ module.exports = 'afterupdate'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151147,7 +153720,7 @@ module.exports = 'beforeadd'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151183,7 +153756,7 @@ module.exports = 'beforeremove'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151218,7 +153791,7 @@ module.exports = 'beforeupdate'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151257,7 +153830,7 @@ module.exports = 'collisionactive'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151296,7 +153869,7 @@ module.exports = 'collisionend'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151335,7 +153908,7 @@ module.exports = 'collisionstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151364,7 +153937,7 @@ module.exports = 'dragend'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151393,7 +153966,7 @@ module.exports = 'drag'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151423,7 +153996,7 @@ module.exports = 'dragstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151448,7 +154021,7 @@ module.exports = 'pause'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151473,7 +154046,7 @@ module.exports = 'resume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151508,7 +154081,7 @@ module.exports = 'sleepend'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151543,7 +154116,7 @@ module.exports = 'sleepstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151580,7 +154153,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -160664,7 +163237,7 @@ function points_eq(a,b,precision){ /** * @author Richard Davey -* @copyright 2022 Photon Storm Ltd. +* @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ @@ -160795,7 +163368,7 @@ module.exports = BasePlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -160898,7 +163471,7 @@ module.exports = DefaultPlugins; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161108,7 +163681,7 @@ module.exports = PluginCache; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162016,7 +164589,7 @@ module.exports = PluginManager; /** * @author Richard Davey -* @copyright 2022 Photon Storm Ltd. +* @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ @@ -162159,7 +164732,7 @@ module.exports = ScenePlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162627,7 +165200,7 @@ if (!window.cancelAnimationFrame) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162967,7 +165540,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163023,7 +165596,7 @@ module.exports = ScaleModes; /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163890,7 +166463,7 @@ module.exports = CanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163914,7 +166487,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163979,7 +166552,7 @@ module.exports = GetBlendModes; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -164048,7 +166621,7 @@ module.exports = SetTransform; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -164072,7 +166645,7 @@ module.exports = 'postrender'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -164097,7 +166670,7 @@ module.exports = 'prerender'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -164125,7 +166698,7 @@ module.exports = 'render'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -164152,7 +166725,7 @@ module.exports = 'resize'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -164177,7 +166750,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -164206,7 +166779,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -164303,7 +166876,7 @@ module.exports = CanvasSnapshot; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -164362,7 +166935,7 @@ var WebGLSnapshot = function (sourceContext, config) gl.readPixels(x, bufferHeight - y - height, width, height, gl.RGBA, gl.UNSIGNED_BYTE, pixels); var canvas = CanvasPool.createWebGL(this, width, height); - var ctx = canvas.getContext('2d'); + var ctx = canvas.getContext('2d', { willReadFrequently: true }); var imageData = ctx.getImageData(0, 0, width, height); @@ -164415,7 +166988,7 @@ module.exports = WebGLSnapshot; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -164438,7 +167011,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -165786,7 +168359,7 @@ module.exports = PipelineManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -166159,7 +168732,7 @@ module.exports = RenderTarget; * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @author Matthew Groves <@doormat> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -166337,7 +168910,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -168927,7 +171500,7 @@ module.exports = WebGLPipeline; /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -171818,7 +174391,7 @@ module.exports = WebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173009,7 +175582,7 @@ module.exports = WebGLShader; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173090,7 +175663,7 @@ module.exports = WEBGL_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173130,7 +175703,7 @@ module.exports = WebGL; /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173281,7 +175854,7 @@ module.exports = BitmapMaskPipeline; /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173855,7 +176428,7 @@ module.exports = LightPipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173975,7 +176548,7 @@ module.exports = MobilePipeline; /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174969,7 +177542,7 @@ module.exports = MultiPipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175151,7 +177724,7 @@ module.exports = PointLightPipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175642,7 +178215,7 @@ module.exports = PostFXPipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175710,7 +178283,7 @@ module.exports = RopePipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175788,7 +178361,7 @@ module.exports = SinglePipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176624,7 +179197,7 @@ module.exports = SpriteFXPipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177421,7 +179994,7 @@ module.exports = UtilityPipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177539,7 +180112,7 @@ module.exports = PIPELINE_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177565,7 +180138,7 @@ module.exports = 'pipelineafterflush'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177591,7 +180164,7 @@ module.exports = 'pipelinebeforeflush'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177616,7 +180189,7 @@ module.exports = 'pipelinebind'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177640,7 +180213,7 @@ module.exports = 'pipelineboot'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177664,7 +180237,7 @@ module.exports = 'pipelinedestroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177689,7 +180262,7 @@ module.exports = 'pipelinerebind'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177716,7 +180289,7 @@ module.exports = 'pipelineresize'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177744,7 +180317,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -178341,7 +180914,7 @@ module.exports = [ /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180114,7 +182687,7 @@ module.exports = ScaleManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180201,7 +182774,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180255,7 +182828,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180354,7 +182927,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180429,7 +183002,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180452,7 +183025,7 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180473,7 +183046,7 @@ module.exports = 'enterfullscreen'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180494,7 +183067,7 @@ module.exports = 'fullscreenfailed'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180515,7 +183088,7 @@ module.exports = 'fullscreenunsupported'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180537,7 +183110,7 @@ module.exports = 'leavefullscreen'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180562,7 +183135,7 @@ module.exports = 'orientationchange'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180594,7 +183167,7 @@ module.exports = 'resize'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180621,7 +183194,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180678,7 +183251,7 @@ module.exports = Scale; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180741,7 +183314,7 @@ module.exports = GetPhysicsPlugins; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180789,7 +183362,7 @@ module.exports = GetScenePlugins; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180852,7 +183425,7 @@ module.exports = InjectionMap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -181172,7 +183745,7 @@ module.exports = Scene; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -181473,8 +184046,6 @@ var SceneManager = new Class({ // Clear the pending lists this._start.length = 0; this._pending.length = 0; - - return; } for (i = 0; i < this._queue.length; i++) @@ -181747,6 +184318,11 @@ var SceneManager = new Class({ { sys.step(time, delta); } + + if (sys.scenePlugin._target) + { + sys.scenePlugin.step(time, delta); + } } }, @@ -182928,7 +185504,7 @@ module.exports = SceneManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -183278,8 +185854,6 @@ var ScenePlugin = new Class({ this.systems.events.emit(Events.TRANSITION_OUT, target, duration); - this.systems.events.on(Events.UPDATE, this.step, this); - return true; }, @@ -183346,9 +185920,6 @@ var ScenePlugin = new Class({ var targetSys = this._target.sys; var targetSettings = this._target.sys.settings; - // Stop the step - this.systems.events.off(Events.UPDATE, this.step, this); - // Notify target scene targetSys.events.emit(Events.TRANSITION_COMPLETE, this.scene); @@ -184020,7 +186591,6 @@ var ScenePlugin = new Class({ var eventEmitter = this.systems.events; eventEmitter.off(Events.SHUTDOWN, this.shutdown, this); - eventEmitter.off(Events.POST_UPDATE, this.step, this); eventEmitter.off(Events.TRANSITION_OUT); }, @@ -184059,7 +186629,7 @@ module.exports = ScenePlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -184156,7 +186726,7 @@ module.exports = Settings; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -184976,7 +187546,7 @@ module.exports = Systems; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185100,7 +187670,7 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185128,7 +187698,7 @@ module.exports = 'addedtoscene'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185155,7 +187725,7 @@ module.exports = 'boot'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185186,7 +187756,7 @@ module.exports = 'create'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185215,7 +187785,7 @@ module.exports = 'destroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185244,7 +187814,7 @@ module.exports = 'pause'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185324,7 +187894,7 @@ module.exports = 'prerender'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185364,7 +187934,7 @@ module.exports = 'preupdate'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185394,7 +187964,7 @@ module.exports = 'ready'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185422,7 +187992,7 @@ module.exports = 'removedfromscene'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185462,7 +188032,7 @@ module.exports = 'render'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185491,7 +188061,7 @@ module.exports = 'resume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185523,7 +188093,7 @@ module.exports = 'shutdown'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185552,7 +188122,7 @@ module.exports = 'sleep'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185579,7 +188149,7 @@ module.exports = 'start'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185617,7 +188187,7 @@ module.exports = 'transitioncomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185656,7 +188226,7 @@ module.exports = 'transitioninit'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185692,7 +188262,7 @@ module.exports = 'transitionout'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185734,7 +188304,7 @@ module.exports = 'transitionstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185771,7 +188341,7 @@ module.exports = 'transitionwake'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185811,7 +188381,7 @@ module.exports = 'update'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185840,7 +188410,7 @@ module.exports = 'wake'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185883,7 +188453,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185920,7 +188490,7 @@ module.exports = Scene; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186422,7 +188992,7 @@ module.exports = BaseSound; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187172,7 +189742,7 @@ module.exports = BaseSoundManager; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187224,7 +189794,7 @@ module.exports = SoundManagerCreator; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187257,7 +189827,7 @@ module.exports = 'complete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187291,7 +189861,7 @@ module.exports = 'decodedall'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187323,7 +189893,7 @@ module.exports = 'decoded'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187357,7 +189927,7 @@ module.exports = 'destroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187392,7 +189962,7 @@ module.exports = 'detune'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187422,7 +189992,7 @@ module.exports = 'detune'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187451,7 +190021,7 @@ module.exports = 'mute'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187481,7 +190051,7 @@ module.exports = 'rate'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187510,7 +190080,7 @@ module.exports = 'volume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187546,7 +190116,7 @@ module.exports = 'looped'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187582,7 +190152,7 @@ module.exports = 'loop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187617,7 +190187,7 @@ module.exports = 'mute'; /** * @author pi-kei - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187652,7 +190222,7 @@ module.exports = 'pan'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187681,7 +190251,7 @@ module.exports = 'pauseall'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187715,7 +190285,7 @@ module.exports = 'pause'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187748,7 +190318,7 @@ module.exports = 'play'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187783,7 +190353,7 @@ module.exports = 'rate'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187812,7 +190382,7 @@ module.exports = 'resumeall'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187847,7 +190417,7 @@ module.exports = 'resume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187882,7 +190452,7 @@ module.exports = 'seek'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187911,7 +190481,7 @@ module.exports = 'stopall'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187945,7 +190515,7 @@ module.exports = 'stop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187974,7 +190544,7 @@ module.exports = 'unlocked'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -188009,7 +190579,7 @@ module.exports = 'volume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -188055,7 +190625,7 @@ module.exports = { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -189021,7 +191591,7 @@ module.exports = HTML5AudioSound; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -189491,7 +192061,7 @@ module.exports = HTML5AudioSoundManager; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -189528,7 +192098,7 @@ module.exports = { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190027,7 +192597,7 @@ module.exports = NoAudioSound; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190394,7 +192964,7 @@ module.exports = NoAudioSoundManager; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191384,7 +193954,7 @@ module.exports = WebAudioSound; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191878,7 +194448,7 @@ module.exports = WebAudioSoundManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192726,7 +195296,7 @@ module.exports = List; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193102,7 +195672,7 @@ module.exports = Map; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193487,7 +196057,7 @@ module.exports = ProcessQueue; /** * @author Vladimir Agafonkin * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194099,7 +196669,7 @@ module.exports = rbush; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194554,7 +197124,7 @@ module.exports = Set; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195333,7 +197903,7 @@ module.exports = Size; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195362,7 +197932,7 @@ module.exports = 'add'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195391,7 +197961,7 @@ module.exports = 'remove'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195414,7 +197984,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195442,7 +198012,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196078,7 +198648,7 @@ module.exports = CanvasTexture; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -196248,7 +198818,7 @@ var DynamicTexture = new Class({ * An internal Camera that can be used to move around this Dynamic Texture. * * Control it just like you would any Scene Camera. The difference is that it only impacts - * the placement of Game Objects that you then draw to this texture. + * the placement of **Game Objects** (not textures) that you then draw to this texture. * * You can scroll, zoom and rotate this Camera. * @@ -197634,7 +200204,7 @@ module.exports = DynamicTexture; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -198492,7 +201062,7 @@ module.exports = Frame; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -199024,7 +201594,7 @@ module.exports = Texture; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200588,7 +203158,7 @@ module.exports = TextureManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200952,7 +203522,7 @@ module.exports = TextureSource; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200997,7 +203567,7 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201025,7 +203595,7 @@ module.exports = 'addtexture'; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201052,7 +203622,7 @@ module.exports = 'addtexture-'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201080,7 +203650,7 @@ module.exports = 'onerror'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201111,7 +203681,7 @@ module.exports = 'onload'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201136,7 +203706,7 @@ module.exports = 'ready'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201166,7 +203736,7 @@ module.exports = 'removetexture'; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201194,7 +203764,7 @@ module.exports = 'removetexture-'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201222,7 +203792,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201277,7 +203847,7 @@ module.exports = Textures; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201359,7 +203929,7 @@ module.exports = AtlasXML; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201395,7 +203965,7 @@ module.exports = Canvas; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201431,7 +204001,7 @@ module.exports = Image; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201548,7 +204118,7 @@ module.exports = JSONArray; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -202070,7 +204640,7 @@ module.exports = PVRParser; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -202202,7 +204772,7 @@ module.exports = SpriteSheet; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -202394,7 +204964,7 @@ module.exports = SpriteSheetFromAtlas; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -202565,7 +205135,7 @@ TextureImporter: /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -202596,7 +205166,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -202652,7 +205222,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -203059,7 +205629,7 @@ module.exports = ObjectHelper; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -203146,7 +205716,7 @@ module.exports = ParseToTilemap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -204080,7 +206650,7 @@ module.exports = Tile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -204950,7 +207520,7 @@ var Tilemap = new Class({ * @since 3.0.0 * * @param {(number|array)} indexes - The tile index, or array of indexes, to create Sprites from. - * @param {(number|array)} replacements - The tile index, or array of indexes, to change a converted + * @param {?(number|array)} replacements - The tile index, or array of indexes, to change a converted * tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a * one-to-one mapping with the indexes array. * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e. scene.make.sprite). @@ -206735,7 +209305,7 @@ module.exports = Tilemap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -206780,7 +209350,7 @@ GameObjectCreator.register('tilemap', function (config) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -206847,7 +209417,7 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -207290,7 +209860,7 @@ var TilemapLayer = new Class({ * @since 3.50.0 * * @param {(number|array)} indexes - The tile index, or array of indexes, to create Sprites from. - * @param {(number|array)} replacements - The tile index, or array of indexes, to change a converted + * @param {?(number|array)} replacements - The tile index, or array of indexes, to change a converted * tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a * one-to-one mapping with the indexes array. * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} [spriteConfig] - The config object to pass into the Sprite creator (i.e. @@ -208312,7 +210882,7 @@ module.exports = TilemapLayer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208456,7 +211026,7 @@ module.exports = TilemapLayerCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208489,7 +211059,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208606,7 +211176,7 @@ module.exports = TilemapLayerWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209027,7 +211597,7 @@ module.exports = Tileset; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209122,7 +211692,7 @@ module.exports = CalculateFacesAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209188,7 +211758,7 @@ module.exports = CalculateFacesWithin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209235,7 +211805,7 @@ module.exports = CheckIsoBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209331,7 +211901,7 @@ module.exports = Copy; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209348,7 +211918,7 @@ var ReplaceByIndex = __webpack_require__(51202); * @since 3.0.0 * * @param {(number|number[])} indexes - The tile index, or array of indexes, to create Sprites from. - * @param {(number|number[])} replacements - The tile index, or array of indexes, to change a converted tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a one-to-one mapping with the indexes array. + * @param {?(number|number[])} replacements - The tile index, or array of indexes, to change a converted tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a one-to-one mapping with the indexes array. * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e. scene.make.sprite). * @param {Phaser.Scene} scene - The Scene to create the Sprites within. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to use when determining the world XY @@ -209419,7 +211989,7 @@ module.exports = CreateFromTiles; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209476,7 +212046,7 @@ module.exports = CullBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209532,7 +212102,7 @@ module.exports = CullTiles; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209586,7 +212156,7 @@ module.exports = Fill; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209630,7 +212200,7 @@ module.exports = FilterTiles; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209717,7 +212287,7 @@ module.exports = FindByIndex; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209769,7 +212339,7 @@ module.exports = FindTile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209816,7 +212386,7 @@ module.exports = ForEachTile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209871,7 +212441,7 @@ module.exports = GetCullTilesFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209927,7 +212497,7 @@ module.exports = GetTileAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209967,7 +212537,7 @@ module.exports = GetTileAtWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210032,7 +212602,7 @@ module.exports = GetTileCorners; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210085,7 +212655,7 @@ module.exports = GetTileCornersFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210125,7 +212695,7 @@ module.exports = GetTileToWorldXFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210180,7 +212750,7 @@ module.exports = GetTileToWorldXYFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210225,7 +212795,7 @@ module.exports = GetTileToWorldYFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210328,7 +212898,7 @@ module.exports = GetTilesWithin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210444,7 +213014,7 @@ module.exports = GetTilesWithinShape; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210499,7 +213069,7 @@ module.exports = GetTilesWithinWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210541,7 +213111,7 @@ module.exports = GetWorldToTileXFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210596,7 +213166,7 @@ module.exports = GetWorldToTileXYFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210641,7 +213211,7 @@ module.exports = GetWorldToTileYFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210684,7 +213254,7 @@ module.exports = HasTileAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210727,7 +213297,7 @@ module.exports = HasTileAtWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210784,7 +213354,7 @@ module.exports = HexagonalCullBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210836,7 +213406,7 @@ module.exports = HexagonalCullTiles; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210901,7 +213471,7 @@ module.exports = HexagonalGetTileCorners; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210972,7 +213542,7 @@ module.exports = HexagonalTileToWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211072,7 +213642,7 @@ module.exports = HexagonalWorldToTileXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211103,7 +213673,7 @@ module.exports = IsInLayerBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211252,7 +213822,7 @@ module.exports = IsometricCullTiles; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211314,7 +213884,7 @@ module.exports = IsometricTileToWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211397,7 +213967,7 @@ module.exports = IsometricWorldToTileXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211496,7 +214066,7 @@ module.exports = PutTileAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211540,7 +214110,7 @@ module.exports = PutTileAtWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211608,7 +214178,7 @@ module.exports = PutTilesAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211667,7 +214237,7 @@ module.exports = Randomize; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211730,7 +214300,7 @@ module.exports = RemoveTileAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211772,7 +214342,7 @@ module.exports = RemoveTileAtWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211997,7 +214567,7 @@ for (var q = 0; q <= 9; q++) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212042,7 +214612,7 @@ module.exports = ReplaceByIndex; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212169,7 +214739,7 @@ module.exports = RunCull; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212241,7 +214811,7 @@ module.exports = SetCollision; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212318,7 +214888,7 @@ module.exports = SetCollisionBetween; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212380,7 +214950,7 @@ module.exports = SetCollisionByExclusion; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212456,7 +215026,7 @@ module.exports = SetCollisionByProperty; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212516,7 +215086,7 @@ module.exports = SetCollisionFromCollisionGroup; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212555,7 +215125,7 @@ module.exports = SetLayerCollisionIndex; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212591,7 +215161,7 @@ module.exports = SetTileCollision; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212638,7 +215208,7 @@ module.exports = SetTileIndexCallback; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212680,7 +215250,7 @@ module.exports = SetTileLocationCallback; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212726,7 +215296,7 @@ module.exports = Shuffle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212780,7 +215350,7 @@ module.exports = StaggeredCullBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212832,7 +215402,7 @@ module.exports = StaggeredCullTiles; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212894,7 +215464,7 @@ module.exports = StaggeredTileToWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212939,7 +215509,7 @@ module.exports = StaggeredTileToWorldY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213005,7 +215575,7 @@ module.exports = StaggeredWorldToTileXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213053,7 +215623,7 @@ module.exports = StaggeredWorldToTileY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213105,7 +215675,7 @@ module.exports = SwapByIndex; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213150,7 +215720,7 @@ module.exports = TileToWorldX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213194,7 +215764,7 @@ module.exports = TileToWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213239,7 +215809,7 @@ module.exports = TileToWorldY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213323,7 +215893,7 @@ module.exports = WeightedRandomize; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213363,7 +215933,7 @@ module.exports = WorldToTileX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213430,7 +216000,7 @@ module.exports = WorldToTileXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213470,7 +216040,7 @@ module.exports = WorldToTileY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213561,7 +216131,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213635,7 +216205,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213655,7 +216225,7 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213705,7 +216275,7 @@ module.exports = Tilemaps; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213946,7 +216516,7 @@ module.exports = LayerData; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214214,7 +216784,7 @@ module.exports = MapData; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214343,7 +216913,7 @@ module.exports = ObjectLayer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214391,7 +216961,7 @@ module.exports = FromOrientationString; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214462,7 +217032,7 @@ module.exports = Parse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214555,7 +217125,7 @@ module.exports = Parse2DArray; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214604,7 +217174,7 @@ module.exports = ParseCSV; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214691,7 +217261,7 @@ module.exports = ParseTileLayers; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214743,7 +217313,7 @@ module.exports = ParseTilesets; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214811,7 +217381,7 @@ module.exports = ParseWeltmeister; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214835,7 +217405,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214863,7 +217433,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214937,7 +217507,7 @@ module.exports = AssignTileProperties; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214981,7 +217551,7 @@ module.exports = Base64Decode; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -215076,7 +217646,7 @@ module.exports = BuildTilesetIndex; /** * @author Seth Berrier - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -215137,7 +217707,7 @@ module.exports = CreateGroupLayer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -215228,7 +217798,7 @@ module.exports = ParseGID; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -215317,7 +217887,7 @@ module.exports = ParseImageLayers; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -215403,7 +217973,7 @@ module.exports = ParseJSONTiled; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -215484,7 +218054,7 @@ module.exports = ParseObject; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -215584,7 +218154,7 @@ module.exports = ParseObjectLayers; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -215855,7 +218425,7 @@ module.exports = ParseTileLayers; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -216051,7 +218621,7 @@ module.exports = ParseTilesets; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -216193,7 +218763,7 @@ module.exports = ParseWangsets; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -216225,7 +218795,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -216702,7 +219272,7 @@ module.exports = Clock; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -217073,7 +219643,7 @@ module.exports = TimerEvent; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -217096,7 +219666,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -218223,7 +220793,7 @@ module.exports = TweenManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -218265,7 +220835,7 @@ module.exports = GetBoolean; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -218373,7 +220943,7 @@ module.exports = GetEaseFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -218441,7 +221011,7 @@ module.exports = GetInterpolationFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -218506,7 +221076,7 @@ module.exports = GetNewValue; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -218568,7 +221138,7 @@ module.exports = GetProps; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -218618,7 +221188,7 @@ module.exports = GetTargets; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -218949,7 +221519,7 @@ module.exports = GetValueOp; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219077,7 +221647,7 @@ module.exports = NumberTweenBuilder; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219324,7 +221894,7 @@ module.exports = StaggerBuilder; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219529,7 +222099,7 @@ module.exports = TweenBuilder; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219628,7 +222198,7 @@ module.exports = TweenChainBuilder; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219659,7 +222229,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219705,7 +222275,7 @@ module.exports = 'active'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219748,7 +222318,7 @@ module.exports = 'complete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219794,7 +222364,7 @@ module.exports = 'loop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219833,7 +222403,7 @@ module.exports = 'pause'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219882,7 +222452,7 @@ module.exports = 'repeat'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219921,7 +222491,7 @@ module.exports = 'resume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219963,7 +222533,7 @@ module.exports = 'start'; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -220001,7 +222571,7 @@ module.exports = 'stop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -220046,7 +222616,7 @@ module.exports = 'update'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -220096,7 +222666,7 @@ module.exports = 'yoyo'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -220127,7 +222697,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -220161,7 +222731,7 @@ module.exports = Tweens; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -221058,7 +223628,7 @@ module.exports = BaseTween; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -221732,7 +224302,7 @@ module.exports = BaseTweenData; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -221781,7 +224351,7 @@ module.exports = TWEEN_DEFAULTS; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -221854,7 +224424,7 @@ module.exports = [ /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -222143,13 +224713,13 @@ var Tween = new Class({ { if (startToCurrent === undefined) { startToCurrent = false; } - if (key !== 'texture' && (this.isPlayingForward() || this.isPlayingBackward())) + if (key !== 'texture') { for (var i = 0; i < this.totalData; i++) { var tweenData = this.data[i]; - if (tweenData.key === key) + if (tweenData.key === key && (tweenData.isPlayingForward() || tweenData.isPlayingBackward())) { tweenData.end = value; @@ -222706,7 +225276,7 @@ module.exports = Tween; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -223271,7 +225841,7 @@ module.exports = TweenChain; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -223693,7 +226263,7 @@ module.exports = TweenData; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224016,7 +226586,7 @@ module.exports = TweenFrameData; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224242,7 +226812,7 @@ module.exports = TWEEN_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224499,7 +227069,7 @@ module.exports = Class; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224527,7 +227097,7 @@ module.exports = NOOP; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224557,7 +227127,7 @@ module.exports = NULL; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224675,7 +227245,7 @@ module.exports = Add; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224798,7 +227368,7 @@ module.exports = AddAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224837,7 +227407,7 @@ module.exports = BringToTop; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224890,7 +227460,7 @@ module.exports = CountAllMatching; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224937,7 +227507,7 @@ module.exports = Each; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224994,7 +227564,7 @@ module.exports = EachInRange; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225079,7 +227649,7 @@ module.exports = FindClosestInSorted; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225123,7 +227693,7 @@ module.exports = Flatten; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225186,7 +227756,7 @@ module.exports = GetAll; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225246,7 +227816,7 @@ module.exports = GetFirst; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225282,7 +227852,7 @@ module.exports = GetRandom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225347,7 +227917,7 @@ module.exports = MoveAbove; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225412,7 +227982,7 @@ module.exports = MoveBelow; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225455,7 +228025,7 @@ module.exports = MoveDown; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225503,7 +228073,7 @@ module.exports = MoveTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225546,7 +228116,7 @@ module.exports = MoveUp; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225640,7 +228210,7 @@ module.exports = NumberArray; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225718,7 +228288,7 @@ module.exports = NumberArrayStep; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225841,7 +228411,7 @@ module.exports = QuickSelect; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225980,7 +228550,7 @@ module.exports = Range; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226070,7 +228640,7 @@ module.exports = Remove; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226122,7 +228692,7 @@ module.exports = RemoveAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226186,7 +228756,7 @@ module.exports = RemoveBetween; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226225,7 +228795,7 @@ module.exports = RemoveRandomElement; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226270,7 +228840,7 @@ module.exports = Replace; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226311,7 +228881,7 @@ module.exports = RotateLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226352,7 +228922,7 @@ module.exports = RotateRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226401,7 +228971,7 @@ module.exports = SafeRange; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226440,7 +229010,7 @@ module.exports = SendToBack; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226496,7 +229066,7 @@ module.exports = SetAll; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226538,7 +229108,7 @@ module.exports = Shuffle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226577,7 +229147,7 @@ module.exports = SortByDigits; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226625,7 +229195,7 @@ module.exports = SpliceOne; /** * @author Richard Davey * @author Angry Bytes (and contributors) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226814,7 +229384,7 @@ module.exports = StableSort; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226863,7 +229433,7 @@ module.exports = Swap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226921,7 +229491,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226984,7 +229554,7 @@ module.exports = CheckMatrix; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227080,7 +229650,7 @@ module.exports = MatrixToString; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227126,7 +229696,7 @@ module.exports = ReverseColumns; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227177,7 +229747,7 @@ module.exports = ReverseRows; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227225,7 +229795,7 @@ module.exports = Rotate180; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227273,7 +229843,7 @@ module.exports = RotateLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227360,7 +229930,7 @@ module.exports = RotateMatrix; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227408,7 +229978,7 @@ module.exports = RotateRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227498,7 +230068,7 @@ module.exports = TranslateMatrix; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227561,7 +230131,7 @@ module.exports = TransposeMatrix; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227593,7 +230163,7 @@ module.exports = { /** * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227652,7 +230222,7 @@ module.exports = ArrayBufferToBase64; /** * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227727,7 +230297,7 @@ module.exports = Base64ToArrayBuffer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227750,7 +230320,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227777,7 +230347,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227820,7 +230390,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227870,7 +230440,7 @@ module.exports = DeepCopy; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227972,7 +230542,7 @@ module.exports = Extend; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228060,7 +230630,7 @@ module.exports = GetAdvancedValue; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228104,7 +230674,7 @@ module.exports = GetFastValue; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228144,7 +230714,7 @@ module.exports = GetMinMaxValue; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228263,7 +230833,7 @@ module.exports = GetValue; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228301,7 +230871,7 @@ module.exports = HasAll; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228339,7 +230909,7 @@ module.exports = HasAny; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228369,7 +230939,7 @@ module.exports = HasValue; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228426,7 +230996,7 @@ module.exports = IsPlainObject; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228472,7 +231042,7 @@ module.exports = Merge; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228516,7 +231086,7 @@ module.exports = MergeRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228561,7 +231131,7 @@ module.exports = Pick; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228645,7 +231215,7 @@ module.exports = SetValue; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228681,7 +231251,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228717,7 +231287,7 @@ module.exports = Format; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228794,7 +231364,7 @@ module.exports = Pad; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228831,7 +231401,7 @@ module.exports = RemoveAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228861,7 +231431,7 @@ module.exports = Reverse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228897,7 +231467,7 @@ module.exports = UUID; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228935,7 +231505,7 @@ module.exports = UppercaseFirst; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/dist/phaser-ie9.min.js b/dist/phaser-ie9.min.js index a8f703ca86..e98ee2c895 100644 --- a/dist/phaser-ie9.min.js +++ b/dist/phaser-ie9.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Phaser",[],e):"object"==typeof exports?exports.Phaser=e():t.Phaser=e()}(this,(()=>(()=>{var t={6659:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function s(){}function n(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function r(t,e,s,r,o){if("function"!=typeof s)throw new TypeError("The listener must be a function");var a=new n(s,r||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 s:delete t._events[e]}function a(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(i=!1)),a.prototype.eventNames=function(){var t,s,n=[];if(0===this._eventsCount)return n;for(s in t=this._events)e.call(t,s)&&n.push(i?s.slice(1):s);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},a.prototype.listeners=function(t){var e=i?i+t:t,s=this._events[e];if(!s)return[];if(s.fn)return[s.fn];for(var n=0,r=s.length,o=new Array(r);n{var s=i(82590);t.exports=function(t,e,i,n){for(var r=t[0],o=1;o{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"angle",e,i,n,r)}},22015:t=>{t.exports=function(t,e,i){for(var s=0;s{t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=i;s{t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=i;s{var s=i(40327),n=i(84093),r=i(72632),o=i(72283),a=new(i(71030))({sys:{queueDepthSort:o,events:{once:o}}},0,0,1,1).setOrigin(0,0);t.exports=function(t,e){void 0===e&&(e={});var i=e.hasOwnProperty("width"),o=e.hasOwnProperty("height"),h=r(e,"width",-1),l=r(e,"height",-1),u=r(e,"cellWidth",1),c=r(e,"cellHeight",u),d=r(e,"position",n.TOP_LEFT),p=r(e,"x",0),f=r(e,"y",0),v=0,g=0,m=h*u,y=l*c;a.setPosition(p,f),a.setSize(u,c);for(var x=0;x{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"alpha",e,i,n,r)}},3877:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"x",e,i,n,r)}},71020:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"x",e,n,o,a),s(t,"y",i,r,o,a)}},28970:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"y",e,i,n,r)}},82249:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=6.28);for(var n=i,r=(s-i)/t.length,o=e.x,a=e.y,h=e.radius,l=0;l{t.exports=function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=6.28);for(var n=i,r=(s-i)/t.length,o=e.width/2,a=e.height/2,h=0;h{var s=i(8570);t.exports=function(t,e){for(var i=s(e,t.length),n=0;n{var s=i(40053),n=i(77640),r=i(38487);t.exports=function(t,e,i){void 0===i&&(i=0);var o=s(e,!1,t.length);i>0?n(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a{var s=i(58813);t.exports=function(t,e,i){var n=s({x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},i),r=s({x1:e.x2,y1:e.y2,x2:e.x3,y2:e.y3},i),o=s({x1:e.x3,y1:e.y3,x2:e.x1,y2:e.y1},i);n.pop(),r.pop(),o.pop();for(var a=(n=n.concat(r,o)).length/t.length,h=0,l=0;l{t.exports=function(t,e,i){for(var s=0;s{t.exports=function(t,e,i,s,n,r){var o;void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=1);var a=0,h=t.length;if(1===r)for(o=n;o=0;o--)t[o][e]+=i+a*s,a++;return t}},23646:t=>{t.exports=function(t,e,i,s,n,r){var o;void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=1);var a=0,h=t.length;if(1===r)for(o=n;o=0;o--)t[o][e]=i+a*s,a++;return t}},4392:(t,e,i)=>{var s=i(30977);t.exports=function(t,e){for(var i=0;i{var s=i(72006);t.exports=function(t,e){for(var i=0;i{var s=i(74077);t.exports=function(t,e){for(var i=0;i{var s=i(30001);t.exports=function(t,e){for(var i=0;i{var s=i(99761);t.exports=function(t,e){for(var i=0;i{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"rotation",e,i,n,r)}},87299:(t,e,i)=>{var s=i(72395),n=i(53996);t.exports=function(t,e,i){for(var r=e.x,o=e.y,a=0;a{var s=i(72395);t.exports=function(t,e,i,n){var r=e.x,o=e.y;if(0===n)return t;for(var a=0;a{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"scaleX",e,i,n,r)}},51449:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"scaleX",e,n,o,a),s(t,"scaleY",i,r,o,a)}},64895:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"scaleY",e,i,n,r)}},30329:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"alpha",e,i,n,r)}},43954:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n){return s(t,"blendMode",e,0,i,n)}},70688:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"depth",e,i,n,r)}},8314:t=>{t.exports=function(t,e,i){for(var s=0;s{var s=i(23646);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"originX",e,n,o,a),s(t,"originY",i,r,o,a),t.forEach((function(t){t.updateDisplayOrigin()})),t}},38767:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"rotation",e,i,n,r)}},18584:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"scaleX",e,n,o,a),s(t,"scaleY",i,r,o,a)}},17381:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scaleX",e,i,n,r)}},74370:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scaleY",e,i,n,r)}},27773:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"scrollFactorX",e,n,o,a),s(t,"scrollFactorY",i,r,o,a)}},75257:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scrollFactorX",e,i,n,r)}},54512:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scrollFactorY",e,i,n,r)}},69423:t=>{t.exports=function(t,e,i,s,n){for(var r=0;r{var s=i(23646);t.exports=function(t,e,i,n){return s(t,"visible",e,0,i,n)}},94833:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"x",e,i,n,r)}},14284:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"x",e,n,o,a),s(t,"y",i,r,o,a)}},96574:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"y",e,i,n,r)}},74086:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){var o,a;void 0===n&&(n=0),void 0===r&&(r=new s);var h=t.length;if(1===h)o=t[0].x,a=t[0].y,t[0].x=e,t[0].y=i;else{var l=1,u=0;0===n&&(u=h-1,l=h-2),o=t[u].x,a=t[u].y,t[u].x=e,t[u].y=i;for(var c=0;c=h||-1===l)){var d=t[l],p=d.x,f=d.y;d.x=o,d.y=a,o=p,a=f,0===n?l--:l++}}return r.x=o,r.y=a,r}},86347:(t,e,i)=>{var s=i(18592);t.exports=function(t){return s(t)}},1558:(t,e,i)=>{var s=i(5514);t.exports=function(t,e,i,n,r){void 0===r&&(r=!1);var o,a=Math.abs(n-i)/t.length;if(r)for(o=0;o{var s=i(87736);t.exports=function(t,e,i,n,r){void 0===r&&(r=!1);var o,a=Math.abs(n-i)/t.length;if(r)for(o=0;o{t.exports=function(t,e,i,s,n){if(void 0===n&&(n=!1),0===t.length)return t;if(1===t.length)return n?t[0][e]+=(s+i)/2:t[0][e]=(s+i)/2,t;var r,o=Math.abs(s-i)/(t.length-1);if(n)for(r=0;r{t.exports=function(t){for(var e=0;e{var s=i(1071);t.exports=function(t,e,i){void 0===i&&(i=0);for(var n=0;n{t.exports={AlignTo:i(62270),Angle:i(61148),Call:i(22015),GetFirst:i(31060),GetLast:i(52367),GridAlign:i(12673),IncAlpha:i(691),IncX:i(3877),IncXY:i(71020),IncY:i(28970),PlaceOnCircle:i(82249),PlaceOnEllipse:i(30285),PlaceOnLine:i(61557),PlaceOnRectangle:i(63549),PlaceOnTriangle:i(51629),PlayAnimation:i(1045),PropertyValueInc:i(6124),PropertyValueSet:i(23646),RandomCircle:i(4392),RandomEllipse:i(94985),RandomLine:i(63305),RandomRectangle:i(90739),RandomTriangle:i(91417),Rotate:i(26182),RotateAround:i(87299),RotateAroundDistance:i(92194),ScaleX:i(30363),ScaleXY:i(51449),ScaleY:i(64895),SetAlpha:i(30329),SetBlendMode:i(43954),SetDepth:i(70688),SetHitArea:i(8314),SetOrigin:i(12894),SetRotation:i(38767),SetScale:i(18584),SetScaleX:i(17381),SetScaleY:i(74370),SetScrollFactor:i(27773),SetScrollFactorX:i(75257),SetScrollFactorY:i(54512),SetTint:i(69423),SetVisible:i(58291),SetX:i(94833),SetXY:i(14284),SetY:i(96574),ShiftPosition:i(74086),Shuffle:i(86347),SmootherStep:i(9938),SmoothStep:i(1558),Spread:i(71060),ToggleVisible:i(11207),WrapInRectangle:i(24404)}},85463:(t,e,i)=>{var s=i(82897),n=i(56694),r=i(16938),o=i(2406),a=i(71519),h=i(10850),l=i(28834),u=new n({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,h(i,"frames",[]),h(i,"defaultTextureKey",null),h(i,"sortFrames",!0)),this.frameRate=h(i,"frameRate",null),this.duration=h(i,"duration",null),this.msPerFrame,this.skipMissedFrames=h(i,"skipMissedFrames",!0),this.delay=h(i,"delay",0),this.repeat=h(i,"repeat",0),this.repeatDelay=h(i,"repeatDelay",0),this.yoyo=h(i,"yoyo",!1),this.showBeforeDelay=h(i,"showBeforeDelay",!1),this.showOnStart=h(i,"showOnStart",!1),this.hideOnComplete=h(i,"hideOnComplete",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(r.PAUSE_ALL,this.pause,this),this.manager.on(r.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(t,e,i,s){null===i&&null===s?(t.frameRate=24,t.duration=24/e*1e3):i&&null===s?(t.duration=i,t.frameRate=e/(i/1e3)):(t.frameRate=s,t.duration=e/s*1e3),t.msPerFrame=1e3/t.frameRate},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i=this.getFrames(this.manager.textureManager,e);if(i.length>0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var s=this.frames.slice(0,t),n=this.frames.slice(t);this.frames=s.concat(i,n)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t0){r.isLast=!0,r.nextFrame=c[0],c[0].prevFrame=r;var y=1/(c.length-1);for(o=0;o0?t.inReverse&&t.forward?t.forward=!1:this.repeatAnimation(t):t.complete():this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e||(e=!1),t.inReverse===!e&&t.repeatCounter>0)return(0===t.repeatDelay||t.pendingRepeat)&&(t.forward=e),void this.repeatAnimation(t);if(t.inReverse===e||0!==t.repeatCounter){t.forward=e;var i=e?t.currentFrame.nextFrame:t.currentFrame.prevFrame;this.updateAndGetNextTick(t,i)}else t.complete()},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.yoyo?this.handleYoyoFrame(t,!0):t.repeatCounter>0?(t.inReverse&&!t.forward||(t.forward=!0),this.repeatAnimation(t)):t.complete():this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.setCurrentFrame(e),this.getNextTick(t)},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop){if(0===t._pendingStopValue)return t.stop();t._pendingStopValue--}t.repeatDelay>0&&!t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t.repeatDelay):(t.repeatCounter--,t.forward?t.setCurrentFrame(t.currentFrame.nextFrame):t.setCurrentFrame(t.currentFrame.prevFrame),t.isPlaying&&(this.getNextTick(t),t.handleRepeat()))},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showBeforeDelay:this.showBeforeDelay,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach((function(e){t.frames.push(e.toJSON())})),t},updateFrameSequence:function(){for(var t,e=this.frames.length,i=1/(e-1),s=0;s1?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):e>1&&(t.prevFrame=this.frames[s-1],t.nextFrame=this.frames[s+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(r.PAUSE_ALL,this.pause,this),this.manager.off(r.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var t=0;t{var s=new(i(56694))({initialize:function(t,e,i,s,n){void 0===n&&(n=!1),this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=s,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=n},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});t.exports=s},90249:(t,e,i)=>{var s=i(85463),n=i(56694),r=i(33885),o=i(6659),a=i(16938),h=i(97081),l=i(72632),u=i(10850),c=i(76400),d=i(13401),p=new n({Extends:o,initialize:function(t){o.call(this),this.game=t,this.textureManager=null,this.globalTimeScale=1,this.anims=new r,this.mixes=new r,this.paused=!1,this.name="AnimationManager",t.events.once(h.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(h.DESTROY,this.destroy,this)},addMix:function(t,e,i){var s=this.anims,n=this.mixes,r="string"==typeof t?t:t.key,o="string"==typeof e?e:e.key;if(s.has(r)&&s.has(o)){var a=n.get(r);a||(a={}),a[o]=i,n.set(r,a)}return this},removeMix:function(t,e){var i=this.mixes,s="string"==typeof t?t:t.key,n=i.get(s);if(n)if(e){var r="string"==typeof e?e:e.key;n.hasOwnProperty(r)&&delete n[r]}else e||i.delete(s);return this},getMix:function(t,e){var i=this.mixes,s="string"==typeof t?t:t.key,n="string"==typeof e?e:e.key,r=i.get(s);return r&&r.hasOwnProperty(n)?r[n]:0},add:function(t,e){return this.anims.has(t)?(console.warn("Animation key exists: "+t),this):(e.key=t,this.anims.set(t,e),this.emit(a.ADD_ANIMATION,t,e),this)},exists:function(t){return this.anims.has(t)},createFromAseprite:function(t,e,i){var s=[],n=this.game.cache.json.get(t);if(!n)return s;var r=this,o=u(n,"meta",null),a=u(n,"frames",null);o&&a&&u(o,"frameTags",[]).forEach((function(n){var o=[],h=l(n,"name",null),u=l(n,"from",0),c=l(n,"to",0),d=l(n,"direction","forward");if(h&&(!e||e&&e.indexOf(h)>-1)){for(var p=0,f=u;f<=c;f++){var v=f.toString(),g=a[v];if(g){var m=l(g,"duration",Number.MAX_SAFE_INTEGER);o.push({key:t,frame:v,duration:m}),p+=m}}var y=p/o.length;o.forEach((function(t){t.duration-=y})),"reverse"===d&&(o=o.reverse());var x,T={key:h,frames:o,duration:p,yoyo:"pingpong"===d};i?i.anims&&(x=i.anims.create(T)):x=r.create(T),x&&s.push(x)}}));return s},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))||(i=new s(this,e,t),this.anims.set(e,i),this.emit(a.ADD_ANIMATION,e,i))),i},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var s=0;s{var s=i(56694),n=i(33885),r=i(72632),o=i(16938),a=i(85463),h=new s({initialize:function(t){this.parent=t,this.animationManager=t.scene.sys.anims,this.animationManager.on(o.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.showBeforeDelay=!1,this.showOnStart=!1,this.hideOnComplete=!1,this.forward=!0,this.inReverse=!1,this.accumulator=0,this.nextTick=0,this.delayCounter=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},chain:function(t){var e=this.parent;if(void 0===t)return this.nextAnimsQueue.length=0,this.nextAnim=null,e;Array.isArray(t)||(t=[t]);for(var i=0;is.getTotalFrames()&&(h=0);var l=s.frames[h];0!==h||this.forward||(l=s.getLastFrame()),this.currentFrame=l}else console.warn("Missing animation: "+i);return this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.setCurrentFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.setCurrentFrame(t),this.parent},playAfterDelay:function(t,e){if(this.isPlaying){var i=this.nextAnim,s=this.nextAnimsQueue;i&&s.unshift(i),this.nextAnim=t,this._pendingStop=1,this._pendingStopValue=e}else this.delayCounter=e,this.play(t,!0);return this.parent},playAfterRepeat:function(t,e){if(void 0===e&&(e=1),this.isPlaying){var i=this.nextAnim,s=this.nextAnimsQueue;i&&s.unshift(i),-1!==this.repeatCounter&&e>this.repeatCounter&&(e=this.repeatCounter),this.nextAnim=t,this._pendingStop=2,this._pendingStopValue=e}else this.play(t);return this.parent},play:function(t,e){void 0===e&&(e=!1);var i=this.currentAnim,s=this.parent,n="string"==typeof t?t:t.key;if(e&&this.isPlaying&&i.key===n)return s;if(i&&this.isPlaying){var r=this.animationManager.getMix(i.key,t);if(r>0)return this.playAfterDelay(t,r)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t)},playReverse:function(t,e){void 0===e&&(e=!1);var i="string"==typeof t?t:t.key;return e&&this.isPlaying&&this.currentAnim.key===i?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t))},startAnimation:function(t){this.load(t);var e=this.currentAnim,i=this.parent;return e?(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat,e.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,0===this.delayCounter?this.handleStart():this.showBeforeDelay&&this.setCurrentFrame(this.currentFrame),i):i},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(o.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(o.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(o.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(o.ANIMATION_COMPLETE,o.ANIMATION_COMPLETE_KEY)},emitEvents:function(t,e){var i=this.currentAnim;if(i){var s=this.currentFrame,n=this.parent,r=s.textureFrame;n.emit(t,i,s,n,r),e&&n.emit(e+i.key,i,s,n,r)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var t=this.currentFrame;if(!t)return 0;var e=t.progress;return this.inReverse&&(e*=-1),e},setProgress:function(t){return this.forward||(t=1-t),this.setCurrentFrame(this.currentAnim.getFrameByProgress(t)),this.parent},setRepeat:function(t){return this.repeatCounter=-1===t?Number.MAX_VALUE:t,this.parent},globalRemove:function(t,e){void 0===e&&(e=this.currentAnim),this.isPlaying&&e.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var i=this.currentAnim,s=this.parent;return i?(e&&(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat),i.getFirstTick(this),this.emitEvents(o.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!t,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(i.frames[0]),this.parent):s},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(t)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(t)}return this.parent},stopAfterDelay:function(t){return this._pendingStop=1,this._pendingStopValue=t,this.parent},stopAfterRepeat:function(t){return void 0===t&&(t=1),-1!==this.repeatCounter&&t>this.repeatCounter&&(t=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=t,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(t,e){var i=this.currentAnim;if(this.isPlaying&&i&&!i.paused){if(this.accumulator+=e*this.timeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.stop();if(this.hasStarted){if(this.accumulator>=this.nextTick&&(this.forward?i.nextFrame(this):i.previousFrame(this),this.isPlaying&&0===this._pendingStop&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var s=0;do{this.forward?i.nextFrame(this):i.previousFrame(this),s++}while(this.isPlaying&&this.accumulator>this.nextTick&&s<60)}}else this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart())}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),t.setAlpha&&(e.alpha=t.alpha),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(o.ANIMATION_UPDATE),3===this._pendingStop&&this._pendingStopValue===t&&this.stop()),e},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(t){return this.anims?this.anims.get(t):null},exists:function(t){return!!this.anims&&this.anims.has(t)},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))||(i=new a(this,e,t),this.anims||(this.anims=new n),this.anims.set(e,i))),i},createFromAseprite:function(t,e){return this.animationManager.createFromAseprite(t,e,this.parent)},generateFrameNames:function(t,e){return this.animationManager.generateFrameNames(t,e)},generateFrameNumbers:function(t,e){return this.animationManager.generateFrameNumbers(t,e)},remove:function(t){var e=this.get(t);return e&&(this.currentAnim===e&&this.stop(),this.anims.delete(t)),e},destroy:function(){this.animationManager.off(o.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});t.exports=h},44509:t=>{t.exports="add"},84563:t=>{t.exports="animationcomplete"},61586:t=>{t.exports="animationcomplete-"},72175:t=>{t.exports="animationrepeat"},568:t=>{t.exports="animationrestart"},37690:t=>{t.exports="animationstart"},58525:t=>{t.exports="animationstop"},5243:t=>{t.exports="animationupdate"},10598:t=>{t.exports="pauseall"},4860:t=>{t.exports="remove"},31865:t=>{t.exports="resumeall"},16938:(t,e,i)=>{t.exports={ADD_ANIMATION:i(44509),ANIMATION_COMPLETE:i(84563),ANIMATION_COMPLETE_KEY:i(61586),ANIMATION_REPEAT:i(72175),ANIMATION_RESTART:i(568),ANIMATION_START:i(37690),ANIMATION_STOP:i(58525),ANIMATION_UPDATE:i(5243),PAUSE_ALL:i(10598),REMOVE_ANIMATION:i(4860),RESUME_ALL:i(31865)}},13517:(t,e,i)=>{t.exports={Animation:i(85463),AnimationFrame:i(71519),AnimationManager:i(90249),AnimationState:i(16569),Events:i(16938)}},23740:(t,e,i)=>{var s=i(56694),n=i(33885),r=i(6659),o=i(69773),a=new s({initialize:function(){this.entries=new n,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit(o.ADD,this,t,e),this},has:function(t){return this.entries.has(t)},exists:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit(o.REMOVE,this,t,e.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=a},43474:(t,e,i)=>{var s=i(23740),n=i(56694),r=i(97081),o=new n({initialize:function(t){this.game=t,this.binary=new s,this.bitmapFont=new s,this.json=new s,this.physics=new s,this.shader=new s,this.audio=new s,this.video=new s,this.text=new s,this.html=new s,this.obj=new s,this.tilemap=new s,this.xml=new s,this.custom={},this.game.events.once(r.DESTROY,this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new s),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],e=0;e{t.exports="add"},75968:t=>{t.exports="remove"},69773:(t,e,i)=>{t.exports={ADD:i(94762),REMOVE:i(75968)}},45820:(t,e,i)=>{t.exports={BaseCache:i(23740),CacheManager:i(43474),Events:i(69773)}},51052:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(75606),o=i(6659),a=i(89787),h=i(74118),l=i(69360),u=i(93222),c=i(93736),d=new s({Extends:o,Mixins:[n.Alpha,n.Visible],initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),o.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new h,this.dirty=!0,this._x=t,this._y=e,this._width=i,this._height=s,this._bounds=new h,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new l,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new c(i/2,s/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0},addToRenderList:function(t){this.renderList.push(t)},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this},getScroll:function(t,e,i){void 0===i&&(i=new c);var s=.5*this.width,n=.5*this.height;return i.x=t-s,i.y=e-n,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOnX:function(t){var e=.5*this.width;return this.midPoint.x=t,this.scrollX=t-e,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(t){var e=.5*this.height;return this.midPoint.y=t,this.scrollY=t-e,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(t,e){return this.centerOnX(t),this.centerOnY(e),this},centerToBounds:function(){if(this.useBounds){var t=this._bounds,e=.5*this.width,i=.5*this.height;this.midPoint.set(t.centerX,t.centerY),this.scrollX=t.centerX-e,this.scrollY=t.centerY-i}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(t){if(this.disableCull)return t;var e=this.matrix.matrix,i=e[0],s=e[1],n=e[2],r=e[3],o=i*r-s*n;if(!o)return t;var a=e[4],h=e[5],l=this.scrollX,u=this.scrollY,c=this.width,d=this.height,p=this.y,f=p+d,v=this.x,g=v+c,m=this.culledObjects,y=t.length;o=1/o,m.length=0;for(var x=0;xv&&S*i+E*n+ap&&S*s+E*r+hn&&(t=n),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,s=e.y+(i-this.height)/2,n=Math.max(s,s+e.height-i);return tn&&(t=n),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=r(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,s,n){return void 0===n&&(n=!1),this._bounds.setTo(t,e,i,s),this.dirty=!0,this.useBounds=!0,n?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t,e){void 0===e&&(e=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=t,this.isSceneCamera=e;var i=t.sys;return this.sceneManager=i.game.scene,this.scaleManager=i.scale,this.cameraManager=i.cameras,this.updateSystem(),this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setZoom:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),0===t&&(t=.001),0===e&&(e=.001),this.zoomX=t,this.zoomY=e,this},setMask:function(t,e){return void 0===e&&(e=!0),this.mask=t,this._maskCamera=e?this.cameraManager.default:this,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},update:function(){},setIsSceneCamera:function(t){return this.isSceneCamera=t,this},updateSystem:function(){if(this.scaleManager&&this.isSceneCamera){var t=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,e=this.sceneManager;t&&!this._customViewport?e.customViewports++:!t&&this._customViewport&&e.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit(a.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(t){this._x=t,this.updateSystem()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.updateSystem()}},width:{get:function(){return this._width},set:function(t){this._width=t,this.updateSystem()}},height:{get:function(){return this._height},set:function(t){this._height=t,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(t){t!==this._scrollX&&(this._scrollX=t,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(t){t!==this._scrollY&&(this._scrollY=t,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(t){this._zoomX=t,this._zoomY=t,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(t){this._zoomX=t,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(t){this._zoomY=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});t.exports=d},47751:(t,e,i)=>{var s=i(51052),n=i(79993),r=i(82897),o=i(56694),a=i(64937),h=i(53030),l=i(89787),u=i(42798),c=i(74118),d=i(93736),p=new o({Extends:s,Mixins:[a.Pipeline],initialize:function(t,e,i,n){s.call(this,t,e,i,n),this.postPipelines=[],this.pipelineData={},this.inputEnabled=!0,this.fadeEffect=new h.Fade(this),this.flashEffect=new h.Flash(this),this.shakeEffect=new h.Shake(this),this.panEffect=new h.Pan(this),this.rotateToEffect=new h.RotateTo(this),this.zoomEffect=new h.Zoom(this),this.lerp=new d(1,1),this.followOffset=new d,this.deadzone=null,this._follow=null},setDeadzone:function(t,e){if(void 0===t)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=t,this.deadzone.height=e):this.deadzone=new c(0,0,t,e),this._follow){var i=this.width/2,s=this.height/2,r=this._follow.x-this.followOffset.x,o=this._follow.y-this.followOffset.y;this.midPoint.set(r,o),this.scrollX=r-i,this.scrollY=o-s}n(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(t,e,i,s,n,r){return this.fadeEffect.start(!1,t,e,i,s,!0,n,r)},fadeOut:function(t,e,i,s,n,r){return this.fadeEffect.start(!0,t,e,i,s,!0,n,r)},fadeFrom:function(t,e,i,s,n,r,o){return this.fadeEffect.start(!1,t,e,i,s,n,r,o)},fade:function(t,e,i,s,n,r,o){return this.fadeEffect.start(!0,t,e,i,s,n,r,o)},flash:function(t,e,i,s,n,r,o){return this.flashEffect.start(t,e,i,s,n,r,o)},shake:function(t,e,i,s,n){return this.shakeEffect.start(t,e,i,s,n)},pan:function(t,e,i,s,n,r,o){return this.panEffect.start(t,e,i,s,n,r,o)},rotateTo:function(t,e,i,s,n,r,o){return this.rotateToEffect.start(t,e,i,s,n,r,o)},zoomTo:function(t,e,i,s,n,r){return this.zoomEffect.start(t,e,i,s,n,r)},preRender:function(){this.renderList.length=0;var t=this.width,e=this.height,i=.5*t,s=.5*e,r=this.zoom,o=this.matrix,a=t*this.originX,h=e*this.originY,c=this._follow,d=this.deadzone,p=this.scrollX,f=this.scrollY;d&&n(d,this.midPoint.x,this.midPoint.y);var v=!1;if(this.roundPixels&&(a=Math.floor(a),h=Math.floor(h)),c&&!this.panEffect.isRunning){var g=this.lerp,m=c.x-this.followOffset.x,y=c.y-this.followOffset.y;this.roundPixels&&(m=Math.floor(m),y=Math.floor(y)),d?(md.right&&(p=u(p,p+(m-d.right),g.x)),yd.bottom&&(f=u(f,f+(y-d.bottom),g.y))):(p=u(p,m-a,g.x),f=u(f,y-h,g.y)),v=!0}this.useBounds&&(p=this.clampX(p),f=this.clampY(f)),this.roundPixels&&(p=Math.floor(p),f=Math.floor(f)),this.scrollX=p,this.scrollY=f;var x=p+i,T=f+s;this.midPoint.set(x,T);var w=t/r,b=e/r,S=x-w/2,E=T-b/2;this.roundPixels&&(S=Math.floor(S),E=Math.floor(E)),this.worldView.setTo(S,E,w,b),o.applyITRS(Math.floor(this.x+a),Math.floor(this.y+h),this.rotation,r,r),o.translate(-a,-h),this.shakeEffect.preRender(),v&&this.emit(l.FOLLOW_UPDATE,this,c)},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,s,n,o){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===s&&(s=i),void 0===n&&(n=0),void 0===o&&(o=n),this._follow=t,this.roundPixels=e,i=r(i,0,1),s=r(s,0,1),this.lerp.set(i,s),this.followOffset.set(n,o);var a=this.width/2,h=this.height/2,l=t.x-n,u=t.y-o;return this.midPoint.set(l,u),this.scrollX=l-a,this.scrollY=u-h,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.rotateToEffect.update(t,e),this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.resetFX(),s.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=p},62382:(t,e,i)=>{var s=i(47751),n=i(56694),r=i(72632),o=i(91963),a=i(94287),h=i(40444),l=i(7599),u=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.roundPixels=t.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,t.sys.events.once(l.BOOT,this.boot,this),t.sys.events.on(l.START,this.start,this)},boot:function(){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new s(0,0,t.scale.width,t.scale.height).setScene(this.scene),t.game.scale.on(h.RESIZE,this.onResize,this),this.systems.events.once(l.DESTROY,this.destroy,this)},start:function(){if(!this.main){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0]}var e=this.systems.events;e.on(l.UPDATE,this.update,this),e.once(l.SHUTDOWN,this.shutdown,this)},add:function(t,e,i,n,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=new s(t,e,i,n);return a.setName(o),a.setScene(this.scene),a.setRoundPixels(this.roundPixels),a.id=this.getNextID(),this.cameras.push(a),r&&(this.main=a),a},addExisting:function(t,e){return void 0===e&&(e=!1),-1===this.cameras.indexOf(t)?(t.id=this.getNextID(),t.setRoundPixels(this.roundPixels),this.cameras.push(t),e&&(this.main=t),t):null},getNextID:function(){for(var t=this.cameras,e=1,i=0;i<32;i++){for(var s=!1,n=0;n0){r.preRender();var o=this.getVisibleChildren(e.getChildren(),r);t.render(i,o,r)}}},getVisibleChildren:function(t,e){return t.filter((function(t){return t.willRender(e)}))},resetAll:function(){for(var t=0;t{var s=i(82897),n=i(56694),r=i(89787),o=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,o,a,h){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===o&&(o=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),!o&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=s,this.blue=n,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h;var l=t?r.FADE_OUT_START:r.FADE_IN_START;return this.camera.emit(l,this.camera,this,e,i,s,n),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var s=i(82897),n=i(56694),r=i(89787),o=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=1,this.progress=0,this._elapsed=0,this._alpha,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,o,a){return void 0===t&&(t=250),void 0===e&&(e=255),void 0===i&&(i=255),void 0===s&&(s=255),void 0===n&&(n=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!n&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,this.red=e,this.green=i,this.blue=s,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a,this.camera.emit(r.FLASH_START,this.camera,this,t,e,i,s)),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var s=i(82897),n=i(56694),r=i(35060),o=i(89787),a=i(93736),h=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=new a,this.current=new a,this.destination=new a,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,a,h){void 0===i&&(i=1e3),void 0===s&&(s=r.Linear),void 0===n&&(n=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene);var l=this.camera;return!n&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(l.scrollX,l.scrollY),this.destination.set(t,e),l.getScroll(t,e,this.current),"string"==typeof s&&r.hasOwnProperty(s)?this.ease=r[s]:"function"==typeof s&&(this.ease=s),this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h,this.camera.emit(o.PAN_START,this.camera,this,i,t,e)),l},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=s(this._elapsed/this.duration,0,1);this.progress=i;var n=this.camera;if(this._elapsed{var s=i(82897),n=i(56694),r=i(89787),o=i(35060),a=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope,this.clockwise=!0,this.shortestPath=!1},start:function(t,e,i,s,n,a,h){void 0===i&&(i=1e3),void 0===s&&(s=o.Linear),void 0===n&&(n=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),void 0===e&&(e=!1),this.shortestPath=e;var l=t;t<0?(l=-1*t,this.clockwise=!1):this.clockwise=!0;var u=360*Math.PI/180;l-=Math.floor(l/u)*u;var c=this.camera;if(!n&&this.isRunning)return c;if(this.isRunning=!0,this.duration=i,this.progress=0,this.source=c.rotation,this.destination=l,"string"==typeof s&&o.hasOwnProperty(s)?this.ease=o[s]:"function"==typeof s&&(this.ease=s),this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h,this.shortestPath){var d=0,p=0;(d=this.destination>this.source?Math.abs(this.destination-this.source):Math.abs(this.destination+u)-this.source)<(p=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+u)-this.destination)?this.clockwise=!0:d>p&&(this.clockwise=!1)}return this.camera.emit(r.ROTATE_START,this.camera,this,i,l),c},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=s(this._elapsed/this.duration,0,1);this.progress=i;var n=this.camera;if(this._elapsed=l?Math.abs(h-l):Math.abs(h+a)-l;var u=0;u=this.clockwise?n.rotation+o*r:n.rotation-o*r,n.rotation=u,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,n,i,u)}else n.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,n,i,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(r.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});t.exports=a},3241:(t,e,i)=>{var s=i(82897),n=i(56694),r=i(89787),o=i(93736),a=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new o,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===i&&(i=!1),void 0===s&&(s=null),void 0===n&&(n=this.camera.scene),!i&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,"number"==typeof e?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=s,this._onUpdateScope=n,this.camera.emit(r.SHAKE_START,this.camera,this,t,e)),this.camera},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){if(this.isRunning)if(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var s=i(82897),n=i(56694),r=i(35060),o=i(89787),a=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,a){void 0===e&&(e=1e3),void 0===i&&(i=r.Linear),void 0===s&&(s=!1),void 0===n&&(n=null),void 0===a&&(a=this.camera.scene);var h=this.camera;return!s&&this.isRunning||(this.isRunning=!0,this.duration=e,this.progress=0,this.source=h.zoom,this.destination=t,"string"==typeof i&&r.hasOwnProperty(i)?this.ease=r[i]:"function"==typeof i&&(this.ease=i),this._elapsed=0,this._onUpdate=n,this._onUpdateScope=a,this.camera.emit(o.ZOOM_START,this.camera,this,e,t)),h},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._elapsed{t.exports={Fade:i(92522),Flash:i(22151),Pan:i(37551),Shake:i(3241),RotateTo:i(1771),Zoom:i(13383)}},39577:t=>{t.exports="cameradestroy"},85373:t=>{t.exports="camerafadeincomplete"},92057:t=>{t.exports="camerafadeinstart"},1903:t=>{t.exports="camerafadeoutcomplete"},96131:t=>{t.exports="camerafadeoutstart"},85409:t=>{t.exports="cameraflashcomplete"},25500:t=>{t.exports="cameraflashstart"},44071:t=>{t.exports="followupdate"},19818:t=>{t.exports="camerapancomplete"},80002:t=>{t.exports="camerapanstart"},87966:t=>{t.exports="postrender"},74217:t=>{t.exports="prerender"},34805:t=>{t.exports="camerarotatecomplete"},30408:t=>{t.exports="camerarotatestart"},49856:t=>{t.exports="camerashakecomplete"},69189:t=>{t.exports="camerashakestart"},67657:t=>{t.exports="camerazoomcomplete"},14229:t=>{t.exports="camerazoomstart"},89787:(t,e,i)=>{t.exports={DESTROY:i(39577),FADE_IN_COMPLETE:i(85373),FADE_IN_START:i(92057),FADE_OUT_COMPLETE:i(1903),FADE_OUT_START:i(96131),FLASH_COMPLETE:i(85409),FLASH_START:i(25500),FOLLOW_UPDATE:i(44071),PAN_COMPLETE:i(19818),PAN_START:i(80002),POST_RENDER:i(87966),PRE_RENDER:i(74217),ROTATE_COMPLETE:i(34805),ROTATE_START:i(30408),SHAKE_COMPLETE:i(49856),SHAKE_START:i(69189),ZOOM_COMPLETE:i(67657),ZOOM_START:i(14229)}},32356:(t,e,i)=>{t.exports={Camera:i(47751),BaseCamera:i(51052),CameraManager:i(62382),Effects:i(53030),Events:i(89787)}},84219:(t,e,i)=>{var s=i(56694),n=i(10850),r=new s({initialize:function(t){this.camera=n(t,"camera",null),this.left=n(t,"left",null),this.right=n(t,"right",null),this.up=n(t,"up",null),this.down=n(t,"down",null),this.zoomIn=n(t,"zoomIn",null),this.zoomOut=n(t,"zoomOut",null),this.zoomSpeed=n(t,"zoomSpeed",.01),this.minZoom=n(t,"minZoom",.001),this.maxZoom=n(t,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=n(t,"speed",null);"number"==typeof e?(this.speedX=e,this.speedY=e):(this.speedX=n(t,"speed.x",0),this.speedY=n(t,"speed.y",0)),this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this.up&&this.up.isDown?e.scrollY-=this.speedY*t|0:this.down&&this.down.isDown&&(e.scrollY+=this.speedY*t|0),this.left&&this.left.isDown?e.scrollX-=this.speedX*t|0:this.right&&this.right.isDown&&(e.scrollX+=this.speedX*t|0),this.zoomIn&&this.zoomIn.isDown?(e.zoom-=this.zoomSpeed,e.zoomthis.maxZoom&&(e.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},69370:(t,e,i)=>{var s=i(56694),n=i(10850),r=new s({initialize:function(t){this.camera=n(t,"camera",null),this.left=n(t,"left",null),this.right=n(t,"right",null),this.up=n(t,"up",null),this.down=n(t,"down",null),this.zoomIn=n(t,"zoomIn",null),this.zoomOut=n(t,"zoomOut",null),this.zoomSpeed=n(t,"zoomSpeed",.01),this.minZoom=n(t,"minZoom",.001),this.maxZoom=n(t,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=n(t,"acceleration",null);"number"==typeof e?(this.accelX=e,this.accelY=e):(this.accelX=n(t,"acceleration.x",0),this.accelY=n(t,"acceleration.y",0)),this.dragX=0,this.dragY=0;var i=n(t,"drag",null);"number"==typeof i?(this.dragX=i,this.dragY=i):(this.dragX=n(t,"drag.x",0),this.dragY=n(t,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var s=n(t,"maxSpeed",null);"number"==typeof s?(this.maxSpeedX=s,this.maxSpeedY=s):(this.maxSpeedX=n(t,"maxSpeed.x",0),this.maxSpeedY=n(t,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this._speedX>0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoomthis.maxZoom&&(e.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},6524:(t,e,i)=>{t.exports={FixedKeyControl:i(84219),SmoothedKeyControl:i(69370)}},44143:(t,e,i)=>{t.exports={Controls:i(6524),Scene2D:i(32356)}},86459:(t,e,i)=>{var s={VERSION:"3.60.0-beta.17",BlendModes:i(95723),ScaleModes:i(27394),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=s},14033:(t,e,i)=>{var s=i(56694),n=i(86459),r=i(18360),o=i(77290),a=i(72632),h=i(10850),l=i(42911),u=i(72283),c=i(5923),d=i(65641),p=i(93222),f=new s({initialize:function(t){void 0===t&&(t={});var e=h(t,"scale",null);this.width=h(e,"width",1024,t),this.height=h(e,"height",768,t),this.zoom=h(e,"zoom",1,t),this.parent=h(e,"parent",void 0,t),this.scaleMode=h(e,e?"mode":"scaleMode",0,t),this.expandParent=h(e,"expandParent",!0,t),this.autoRound=h(e,"autoRound",!1,t),this.autoCenter=h(e,"autoCenter",0,t),this.resizeInterval=h(e,"resizeInterval",500,t),this.fullscreenTarget=h(e,"fullscreenTarget",null,t),this.minWidth=h(e,"minWidth",0,t),this.maxWidth=h(e,"maxWidth",0,t),this.minHeight=h(e,"minHeight",0,t),this.maxHeight=h(e,"maxHeight",0,t),this.renderType=h(t,"type",n.AUTO),this.canvas=h(t,"canvas",null),this.context=h(t,"context",null),this.canvasStyle=h(t,"canvasStyle",null),this.customEnvironment=h(t,"customEnvironment",!1),this.sceneConfig=h(t,"scene",null),this.seed=h(t,"seed",[(Date.now()*Math.random()).toString()]),c.RND=new c.RandomDataGenerator(this.seed),this.gameTitle=h(t,"title",""),this.gameURL=h(t,"url","https://phaser.io"),this.gameVersion=h(t,"version",""),this.autoFocus=h(t,"autoFocus",!0),this.stableSort=h(t,"stableSort",-1),-1===this.stableSort&&(this.stableSort=o.browser.es2019?1:0),o.features.stableSort=this.stableSort,this.domCreateContainer=h(t,"dom.createContainer",!1),this.domPointerEvents=h(t,"dom.pointerEvents","none"),this.inputKeyboard=h(t,"input.keyboard",!0),this.inputKeyboardEventTarget=h(t,"input.keyboard.target",window),this.inputKeyboardCapture=h(t,"input.keyboard.capture",[]),this.inputMouse=h(t,"input.mouse",!0),this.inputMouseEventTarget=h(t,"input.mouse.target",null),this.inputMousePreventDefaultDown=h(t,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=h(t,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=h(t,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=h(t,"input.mouse.preventDefaultWheel",!0),this.inputTouch=h(t,"input.touch",o.input.touch),this.inputTouchEventTarget=h(t,"input.touch.target",null),this.inputTouchCapture=h(t,"input.touch.capture",!0),this.inputActivePointers=h(t,"input.activePointers",1),this.inputSmoothFactor=h(t,"input.smoothFactor",0),this.inputWindowEvents=h(t,"input.windowEvents",!0),this.inputGamepad=h(t,"input.gamepad",!1),this.inputGamepadEventTarget=h(t,"input.gamepad.target",window),this.disableContextMenu=h(t,"disableContextMenu",!1),this.audio=h(t,"audio",{}),this.hideBanner=!1===h(t,"banner",null),this.hidePhaser=h(t,"banner.hidePhaser",!1),this.bannerTextColor=h(t,"banner.text","#ffffff"),this.bannerBackgroundColor=h(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=h(t,"fps",null);var i=h(t,"render",null);this.pipeline=h(i,"pipeline",null,t),this.autoMobilePipeline=h(i,"autoMobilePipeline",!0,t),this.defaultPipeline=h(i,"defaultPipeline",d.MULTI_PIPELINE,t),this.antialias=h(i,"antialias",!0,t),this.antialiasGL=h(i,"antialiasGL",!0,t),this.mipmapFilter=h(i,"mipmapFilter","LINEAR",t),this.desynchronized=h(i,"desynchronized",!1,t),this.roundPixels=h(i,"roundPixels",!1,t),this.pixelArt=h(i,"pixelArt",1!==this.zoom,t),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=h(i,"transparent",!1,t),this.clearBeforeRender=h(i,"clearBeforeRender",!0,t),this.preserveDrawingBuffer=h(i,"preserveDrawingBuffer",!1,t),this.premultipliedAlpha=h(i,"premultipliedAlpha",!0,t),this.failIfMajorPerformanceCaveat=h(i,"failIfMajorPerformanceCaveat",!1,t),this.powerPreference=h(i,"powerPreference","default",t),this.batchSize=h(i,"batchSize",4096,t),this.maxTextures=h(i,"maxTextures",-1,t),this.maxLights=h(i,"maxLights",10,t);var s=h(t,"backgroundColor",0);this.backgroundColor=p(s),this.transparent&&(this.backgroundColor=p(0),this.backgroundColor.alpha=0),this.preBoot=h(t,"callbacks.preBoot",u),this.postBoot=h(t,"callbacks.postBoot",u),this.physics=h(t,"physics",{}),this.defaultPhysicsSystem=h(this.physics,"default",!1),this.loaderBaseURL=h(t,"loader.baseURL",""),this.loaderPath=h(t,"loader.path",""),this.loaderMaxParallelDownloads=h(t,"loader.maxParallelDownloads",o.os.android?6:32),this.loaderCrossOrigin=h(t,"loader.crossOrigin",void 0),this.loaderResponseType=h(t,"loader.responseType",""),this.loaderAsync=h(t,"loader.async",!0),this.loaderUser=h(t,"loader.user",""),this.loaderPassword=h(t,"loader.password",""),this.loaderTimeout=h(t,"loader.timeout",0),this.loaderWithCredentials=h(t,"loader.withCredentials",!1),this.loaderImageLoadType=h(t,"loader.imageLoadType","XHR"),this.loaderLocalScheme=h(t,"loader.localScheme",["file://","capacitor://"]),this.installGlobalPlugins=[],this.installScenePlugins=[];var f=h(t,"plugins",null),v=r.DefaultScene;f&&(Array.isArray(f)?this.defaultPlugins=f:l(f)&&(this.installGlobalPlugins=a(f,"global",[]),this.installScenePlugins=a(f,"scene",[]),Array.isArray(f.default)?v=f.default:Array.isArray(f.defaultMerge)&&(v=v.concat(f.defaultMerge)))),this.defaultPlugins=v;var g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=h(t,"images.default",g+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=h(t,"images.missing",g+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=h(t,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=n.WEBGL:window.FORCE_CANVAS&&(this.renderType=n.CANVAS))}});t.exports=f},50150:(t,e,i)=>{var s=i(70616),n=i(61068),r=i(86459),o=i(90185);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===r.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==r.HEADLESS)if(e.renderType===r.AUTO&&(e.renderType=o.webGL?r.WEBGL:r.CANVAS),e.renderType===r.WEBGL){if(!o.webGL)throw new Error("Cannot create WebGL context, aborting.")}else{if(e.renderType!==r.CANVAS)throw new Error("Unknown value for renderer type: "+e.renderType);if(!o.canvas)throw new Error("Cannot create Canvas context, aborting.")}e.antialias||n.disableSmoothing();var a,h,l=t.scale.baseSize,u=l.width,c=l.height;(e.canvas?(t.canvas=e.canvas,t.canvas.width=u,t.canvas.height=c):t.canvas=n.create(t,u,c,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||s.setCrisp(t.canvas),e.renderType!==r.HEADLESS)&&(a=i(91135),h=i(11857),e.renderType===r.WEBGL?t.renderer=new h(t):(t.renderer=new a(t),t.context=t.renderer.gameContext))}},77291:(t,e,i)=>{var s=i(86459);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===s.CANVAS?i="Canvas":e.renderType===s.HEADLESS&&(i="Headless");var n,r=e.audio,o=t.device.audio;if(n=o.webAudio&&!r.disableWebAudio?"Web Audio":r.noAudio||!o.webAudio&&!o.audioData?"No Audio":"HTML5 Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+s.VERSION+" / https://phaser.io");else{var a,h="",l=[h];if(Array.isArray(e.bannerBackgroundColor))e.bannerBackgroundColor.forEach((function(t){h=h.concat("%c "),l.push("background: "+t),a=t})),l[l.length-1]="color: "+e.bannerTextColor+"; background: "+a;else h=h.concat("%c "),l.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor);l.push("background: transparent"),e.gameTitle&&(h=h.concat(e.gameTitle),e.gameVersion&&(h=h.concat(" v"+e.gameVersion)),e.hidePhaser||(h=h.concat(" / ")));e.hidePhaser||(h=h.concat("Phaser v"+s.VERSION+" ("+i+" | "+n+")")),h=h.concat(" %c "+e.gameURL),l[0]=h,console.log.apply(console,l)}}}},15213:(t,e,i)=>{var s=i(99584),n=i(90249),r=i(43474),o=i(61068),a=i(56694),h=i(14033),l=i(85178),u=i(50150),c=i(81078),d=i(77291),p=i(77290),f=i(21546),v=i(6659),g=i(97081),m=i(69898),y=i(91963),x=i(49274),T=i(756),w=i(13553),b=i(38203),S=i(6237),E=i(26617),A=i(26493),_=i(84191),C=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new v,this.anims=new n(this),this.textures=new S(this),this.cache=new r(this),this.registry=new c(this),this.input=new m(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=p,this.scale=new T(this,this.config),this.sound=null,this.sound=_.create(this),this.loop=new E(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,f(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),d(this),s(this.canvas,this.config.parent),this.textures.once(b.READY,this.texturesReady,this),this.events.emit(g.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(g.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),A(this);var t=this.events;t.on(g.HIDDEN,this.onHidden,this),t.on(g.VISIBLE,this.onVisible,this),t.on(g.BLUR,this.onBlur,this),t.on(g.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(g.PRE_STEP,t,e),i.emit(g.STEP,t,e),this.scene.update(t,e),i.emit(g.POST_STEP,t,e);var s=this.renderer;s.preRender(),i.emit(g.PRE_RENDER,s,t,e),this.scene.render(s),s.postRender(),i.emit(g.POST_RENDER,s,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(g.PRE_STEP,t,e),i.emit(g.STEP,t,e),this.scene.update(t,e),i.emit(g.POST_STEP,t,e),this.scene.isProcessing=!1,i.emit(g.PRE_RENDER,null,t,e),i.emit(g.POST_RENDER,null,t,e)},onHidden:function(){this.loop.pause(),this.events.emit(g.PAUSE)},pause:function(){this.onHidden()},onVisible:function(){this.loop.resume(),this.events.emit(g.RESUME)},resume:function(){this.onVisible()},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.scene.destroy(),this.events.emit(g.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=C},26617:(t,e,i)=>{var s=i(56694),n=i(10850),r=i(72283),o=i(27385),a=new s({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=n(e,"min",5),this.targetFps=n(e,"target",60),this.fpsLimit=n(e,"limit",0),this.hasFpsLimit=this.fpsLimit>0,this._limitRate=this.hasFpsLimit?1e3/this.fpsLimit:0,this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=n(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=n(e,"deltaHistory",10),this.panicMax=n(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=n(e,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0;for(var e=0;e0||!this.inFocus)&&(this._coolDown--,t=Math.min(t,this._target)),t>this._min&&(t=i[e],t=Math.min(t,this._min)),i[e]=t,this.deltaIndex++,this.deltaIndex>=s&&(this.deltaIndex=0);for(var n=0,r=0;r=this.nextFpsUpdate&&this.updateFPS(t),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(t,this.delta),this.delta=0),this.lastTime=t,this.frame++},step:function(t){this.now=t;var e=Math.max(0,t-this.lastTime);this.rawDelta=e,this.time+=this.rawDelta,this.smoothStep&&(e=this.smoothDelta(e)),this.delta=e,t>=this.nextFpsUpdate&&this.updateFPS(t),this.framesThisSecond++,this.callback(t,e),this.lastTime=t,this.frame++},tick:function(){var t=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(t):this.step(t)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){void 0===t&&(t=!1);var e=window.performance.now();if(!this.running){t&&(this.startTime+=-this.lastTime+(this.lastTime+e));var i=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(i,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0,this.fpsLimitTriggered=!1,this.tick()}},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.raf.destroy(),this.raf=null,this.game=null,this.callback=null}});t.exports=a},26493:(t,e,i)=>{var s=i(97081);t.exports=function(t){var e,i=t.events;if(void 0!==document.hidden)e="visibilitychange";else{["webkit","moz","ms"].forEach((function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")}))}e&&document.addEventListener(e,(function(t){document.hidden||"pause"===t.type?i.emit(s.HIDDEN):i.emit(s.VISIBLE)}),!1),window.onblur=function(){i.emit(s.BLUR)},window.onfocus=function(){i.emit(s.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},41651:t=>{t.exports="blur"},5520:t=>{t.exports="boot"},51673:t=>{t.exports="contextlost"},25055:t=>{t.exports="destroy"},23767:t=>{t.exports="focus"},57564:t=>{t.exports="hidden"},38327:t=>{t.exports="pause"},43807:t=>{t.exports="postrender"},73652:t=>{t.exports="poststep"},780:t=>{t.exports="prerender"},13781:t=>{t.exports="prestep"},38247:t=>{t.exports="ready"},29129:t=>{t.exports="resume"},34994:t=>{t.exports="step"},98704:t=>{t.exports="visible"},97081:(t,e,i)=>{t.exports={BLUR:i(41651),BOOT:i(5520),CONTEXT_LOST:i(51673),DESTROY:i(25055),FOCUS:i(23767),HIDDEN:i(57564),PAUSE:i(38327),POST_RENDER:i(43807),POST_STEP:i(73652),PRE_RENDER:i(780),PRE_STEP:i(13781),READY:i(38247),RESUME:i(29129),STEP:i(34994),VISIBLE:i(98704)}},80293:(t,e,i)=>{t.exports={Config:i(14033),CreateRenderer:i(50150),DebugHeader:i(77291),Events:i(97081),TimeStep:i(26617),VisibilityHandler:i(26493)}},52780:(t,e,i)=>{var s=i(81543),n=i(61068),r=i(10850);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",s),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),p=Math.floor(Math.abs(e[0].length*a)),f=Math.floor(Math.abs(e.length*h));i||(i=n.create2D(this,p,f),l=!1,u=!1),l&&(i.width=p,i.height=f);var v=i.getContext("2d");u&&v.clearRect(0,0,p,f),c&&c(i,v);for(var g=0;g{t.exports={GenerateTexture:i(52780),Palettes:i(25235)}},81543:t=>{t.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},75846:t=>{t.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},83206:t=>{t.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},13194:t=>{t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},50686:t=>{t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},25235:(t,e,i)=>{t.exports={ARNE16:i(81543),C64:i(75846),CGA:i(83206),JMP:i(13194),MSX:i(50686)}},63120:(t,e,i)=>{var s=i(56694),n=i(34631),r=i(38517),o=i(93736),a=new s({Extends:r,initialize:function(t,e,i,s){r.call(this,"CubicBezierCurve"),Array.isArray(t)&&(s=new o(t[6],t[7]),i=new o(t[4],t[5]),e=new o(t[2],t[3]),t=new o(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i,this.p3=s},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.p0,s=this.p1,r=this.p2,a=this.p3;return e.set(n(t,i.x,s.x,r.x,a.x),n(t,i.y,s.y,r.y,a.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var s=1;s{var s=i(56694),n=i(80222),r=i(74118),o=i(93736),a=new s({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var s=Math.max(1,Math.round(i/e));return n(this.getSpacedPoints(s),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],s=this.getPoint(0,this._tmpVec2A),n=0;i.push(0);for(var r=1;r<=t;r++)n+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(s),i.push(n),s.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var s=0;s<=t;s++)i.push(this.getPoint(s/t));return i},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var s=0;s<=t;s++){var n=this.getUtoTmapping(s/t,null,t);i.push(this.getPoint(n))}return i},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=1e-4,s=t-i,n=t+i;return s<0&&(s=0),n>1&&(n=1),this.getPoint(s,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var s,n=this.getLengths(i),r=0,o=n.length;s=e?Math.min(e,n[o-1]):t*n[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=n[r=Math.floor(h+(l-h)/2)]-s)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(n[r=l]===s)return r/(o-1);var u=n[r];return(r+(s-u)/(n[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},48835:(t,e,i)=>{var s=i(56694),n=i(38517),r=i(75606),o=i(10850),a=i(23701),h=i(93736),l=new s({Extends:n,initialize:function(t,e,i,s,a,l,u,c){if("object"==typeof t){var d=t;t=o(d,"x",0),e=o(d,"y",0),i=o(d,"xRadius",0),s=o(d,"yRadius",i),a=o(d,"startAngle",0),l=o(d,"endAngle",360),u=o(d,"clockwise",!1),c=o(d,"rotation",0)}else void 0===s&&(s=i),void 0===a&&(a=0),void 0===l&&(l=360),void 0===u&&(u=!1),void 0===c&&(c=0);n.call(this,"EllipseCurve"),this.p0=new h(t,e),this._xRadius=i,this._yRadius=s,this._startAngle=r(a),this._endAngle=r(l),this._clockwise=u,this._rotation=r(c)},getStartPoint:function(t){return void 0===t&&(t=new h),this.getPoint(0,t)},getResolution:function(t){return 2*t},getPoint:function(t,e){void 0===e&&(e=new h);for(var i=2*Math.PI,s=this._endAngle-this._startAngle,n=Math.abs(s)i;)s-=i;s{var s=i(56694),n=i(38517),r=i(80222),o=i(74118),a=i(93736),h=new s({Extends:n,initialize:function(t,e){n.call(this,"LineCurve"),Array.isArray(t)&&(e=new a(t[2],t[3]),t=new a(t[0],t[1])),this.p0=t,this.p1=e,this.arcLengthDivisions=1},getBounds:function(t){return void 0===t&&(t=new o),r([this.p0,this.p1],t)},getStartPoint:function(t){return void 0===t&&(t=new a),t.copy(this.p0)},getResolution:function(t){return void 0===t&&(t=1),t},getPoint:function(t,e){return void 0===e&&(e=new a),1===t?e.copy(this.p1):(e.copy(this.p1).subtract(this.p0).scale(t).add(this.p0),e)},getPointAt:function(t,e){return this.getPoint(t,e)},getTangent:function(t,e){return void 0===e&&(e=new a),e.copy(this.p1).subtract(this.p0).normalize(),e},getUtoTmapping:function(t,e,i){var s;if(e){var n=this.getLengths(i),r=n[n.length-1];s=Math.min(e,r)/r}else s=t;return s},draw:function(t){return t.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});h.fromJSON=function(t){var e=t.points,i=new a(e[0],e[1]),s=new a(e[2],e[3]);return new h(i,s)},t.exports=h},64761:(t,e,i)=>{var s=i(56694),n=i(38517),r=i(16252),o=i(93736),a=new s({Extends:n,initialize:function(t,e,i){n.call(this,"QuadraticBezierCurve"),Array.isArray(t)&&(i=new o(t[4],t[5]),e=new o(t[2],t[3]),t=new o(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.p0,s=this.p1,n=this.p2;return e.set(r(t,i.x,s.x,n.x),r(t,i.y,s.y,n.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var s=1;s{var s=i(14976),n=i(56694),r=i(38517),o=i(93736),a=new n({Extends:r,initialize:function(t){void 0===t&&(t=[]),r.call(this,"SplineCurve"),this.points=[],this.addPoints(t)},addPoints:function(t){for(var e=0;ei.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(s(a,h.x,l.x,u.x,c.x),s(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e{t.exports={Path:i(12822),MoveTo:i(53639),CubicBezier:i(63120),Curve:i(38517),Ellipse:i(48835),Line:i(58084),QuadraticBezier:i(64761),Spline:i(11956)}},53639:(t,e,i)=>{var s=i(56694),n=i(93736),r=new s({initialize:function(t,e){this.active=!1,this.p0=new n(t,e)},getPoint:function(t,e){return void 0===e&&(e=new n),e.copy(this.p0)},getPointAt:function(t,e){return this.getPoint(t,e)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});t.exports=r},12822:(t,e,i)=>{var s=i(56694),n=i(63120),r=i(48835),o=i(61286),a=i(58084),h=i(53639),l=i(64761),u=i(74118),c=i(11956),d=i(93736),p=i(83392),f=new s({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new d,this._tmpVec2A=new d,this._tmpVec2B=new d,"object"==typeof t?this.fromJSON(t):this.startPoint.set(t,e)},add:function(t){return this.curves.push(t),this},circleTo:function(t,e,i){return void 0===e&&(e=!1),this.ellipseTo(t,t,0,360,e,i)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);return t.equals(e)||this.curves.push(new a(e,t)),this},cubicBezierTo:function(t,e,i,s,r,o){var a,h,l,u=this.getEndPoint();return t instanceof d?(a=t,h=e,l=i):(a=new d(i,s),h=new d(r,o),l=new d(t,e)),this.add(new n(u,a,h,l))},quadraticBezierTo:function(t,e,i,s){var n,r,o=this.getEndPoint();return t instanceof d?(n=t,r=e):(n=new d(i,s),r=new d(t,e)),this.add(new l(o,n,r))},draw:function(t,e){for(var i=0;i=e)return this.curves[s];s++}return null},getEndPoint:function(t){return void 0===t&&(t=new d),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),s=this.getCurveLengths(),n=0;n=i){var r=s[n]-i,o=this.curves[n],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}n++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],s=0;s1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new d),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new d),t.copy(this.startPoint)},getTangent:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),s=this.getCurveLengths(),n=0;n=i){var r=s[n]-i,o=this.curves[n],a=o.getLength(),h=0===a?0:1-r/a;return o.getTangentAt(h,e)}n++}return null},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new h(t.x,t.y)):this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e{var s=i(56694),n=i(35026),r=new s({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(n.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],s=0;s{var s=i(56694),n=i(81078),r=i(91963),o=i(7599),a=new s({Extends:n,initialize:function(t){n.call(this,t,t.sys.events),this.scene=t,this.systems=t.sys,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(o.DESTROY,this.destroy,this)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){n.prototype.destroy.call(this),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null}});r.register("DataManagerPlugin",a,"data"),t.exports=a},73569:t=>{t.exports="changedata"},15590:t=>{t.exports="changedata-"},37669:t=>{t.exports="destroy"},87090:t=>{t.exports="removedata"},90142:t=>{t.exports="setdata"},35026:(t,e,i)=>{t.exports={CHANGE_DATA:i(73569),CHANGE_DATA_KEY:i(15590),DESTROY:i(37669),REMOVE_DATA:i(87090),SET_DATA:i(90142)}},1999:(t,e,i)=>{t.exports={DataManager:i(81078),DataManagerPlugin:i(76508),Events:i(35026)}},10720:(t,e,i)=>{var s=i(1350),n={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return n;n.audioData=!!window.Audio,n.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e){var i=function(e,i){var s=t.canPlayType("audio/"+e).replace(/^no$/,"");return i?Boolean(s||t.canPlayType("audio/"+i).replace(/^no$/,"")):Boolean(s)};if(n.ogg=i('ogg; codecs="vorbis"'),n.opus=i('ogg; codecs="opus"',"opus"),n.mp3=i("mpeg"),n.wav=i("wav"),n.m4a=i("x-m4a"),n.aac=i("aac"),n.flac=i("flac","x-flac"),n.webm=i('webm; codecs="vorbis"'),""!==t.canPlayType('audio/mp4; codecs="ec-3"'))if(s.edge)n.dolby=!0;else if(s.safari&&s.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var r=parseInt(RegExp.$1,10),o=parseInt(RegExp.$2,10);(10===r&&o>=11||r>10)&&(n.dolby=!0)}}}catch(t){}return n}()},1350:(t,e,i)=>{var s,n=i(36580),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};t.exports=(s=navigator.userAgent,/Edge\/\d+/.test(s)?(r.edge=!0,r.es2019=!0):/Chrome\/(\d+)/.test(s)&&!n.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10),r.es2019=r.chromeVersion>69):/Firefox\D+(\d+)/.test(s)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10),r.es2019=r.firefoxVersion>10):/AppleWebKit/.test(s)&&n.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(s)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(s)?(r.opera=!0,r.es2019=!0):/Version\/(\d+\.\d+) Safari/.test(s)&&!n.windowsPhone?(r.safari=!0,r.safariVersion=parseInt(RegExp.$1,10),r.es2019=r.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(s)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(s)&&(r.silk=!0),r)},98581:(t,e,i)=>{var s,n,r,o=i(61068),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(a.supportNewBlendModes=(s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",n="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create2D(t,6).getContext("2d",{willReadFrequently:!0});if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=s+"/wCKxvRF"+n},r.src=s+"AP804Oa6"+n,!1),a.supportInverseAlpha=function(){var t=o.create2D(this,2).getContext("2d",{willReadFrequently:!0});t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1),s=i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3];return o.remove(this),s}()),a)},90185:(t,e,i)=>{var s=i(36580),n=i(1350),r=i(61068),o={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){if("function"==typeof importScripts)return o;o.canvas=!!window.CanvasRenderingContext2D;try{o.localStorage=!!localStorage.getItem}catch(t){o.localStorage=!1}o.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),o.fileSystem=!!window.requestFileSystem;var t,e,i,a=!1;return o.webGL=function(){if(window.WebGLRenderingContext)try{var t=r.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=r.create2D(this),s=i.getContext("2d",{willReadFrequently:!0}).createImageData(1,1);return a=s.data instanceof Uint8ClampedArray,r.remove(t),r.remove(i),!!e}catch(t){return!1}return!1}(),o.worker=!!window.Worker,o.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,o.getUserMedia=o.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,n.firefox&&n.firefoxVersion<21&&(o.getUserMedia=!1),!s.iOS&&(n.ie||n.firefox||n.chrome)&&(o.canvasBitBltShift=!0),(n.safari||n.mobileSafari)&&(o.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(o.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(o.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),o.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==o.littleEndian&&a,o}()},33553:t=>{var e={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"==typeof importScripts)return e;var t,i="Fullscreen",s="FullScreen",n=["request"+i,"request"+s,"webkitRequest"+i,"webkitRequest"+s,"msRequest"+i,"msRequest"+s,"mozRequest"+s,"mozRequest"+i];for(t=0;t{var s=i(1350),n={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=("function"==typeof importScripts||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(n.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(n.mspointer=!0),navigator.getGamepads&&(n.gamepads=!0),"onwheel"in window||s.ie&&"WheelEvent"in window?n.wheelEvent="wheel":"onmousewheel"in window?n.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(n.wheelEvent="DOMMouseScroll")),n)},36580:t=>{var e={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){if("function"==typeof importScripts)return e;var t=navigator.userAgent;/Windows/.test(t)?e.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(e.iOS=!0,e.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),e.iOSVersion=parseInt(RegExp.$1,10)):e.macOS=!0:/Android/.test(t)?e.android=!0:/Linux/.test(t)?e.linux=!0:/iP[ao]d|iPhone/i.test(t)?(e.iOS=!0,navigator.appVersion.match(/OS (\d+)/),e.iOSVersion=parseInt(RegExp.$1,10),e.iPhone=-1!==t.toLowerCase().indexOf("iphone"),e.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?e.kindle=!0:/CrOS/.test(t)&&(e.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(e.android=!1,e.iOS=!1,e.macOS=!1,e.windows=!0,e.windowsPhone=!0);var i=/Silk/.test(t);return(e.windows||e.macOS||e.linux&&!i||e.chromeOS)&&(e.desktop=!0),(e.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(e.desktop=!1),navigator.standalone&&(e.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(e.cordova=!0),void 0!==window.ejecta&&(e.ejecta=!0)),"undefined"!=typeof process&&process.versions&&process.versions.node&&(e.node=!0),e.node&&"object"==typeof process.versions&&(e.nodeWebkit=!!process.versions["node-webkit"],e.electron=!!process.versions.electron),/Crosswalk/.test(t)&&(e.crosswalk=!0),e.pixelRatio=window.devicePixelRatio||1,e}()},53861:t=>{var e={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return e;var t=document.createElement("video"),i=!!t.canPlayType,s=/^no$/;try{i&&(t.canPlayType('video/ogg; codecs="theora"').replace(s,"")&&(e.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(s,"")&&(e.h264=!0,e.mp4=!0),t.canPlayType("video/x-m4v").replace(s,"")&&(e.m4v=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(s,"")&&(e.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(s,"")&&(e.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(s,"")&&(e.hls=!0))}catch(t){}return e}()},77290:(t,e,i)=>{t.exports={os:i(36580),browser:i(1350),features:i(90185),input:i(95872),audio:i(10720),video:i(53861),fullscreen:i(33553),canvasFeatures:i(98581)}},65246:(t,e,i)=>{var s=new(i(56694))({initialize:function(){this._matrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],this.alpha=1,this._dirty=!0,this._data},set:function(t){return this._matrix=t,this._dirty=!0,this},reset:function(){var t=this._matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=1,t[13]=0,t[14]=0,t[15]=0,t[16]=0,t[17]=0,t[18]=1,t[19]=0,this._dirty=!0,this},getData:function(){if(this._dirty){var t=new Float32Array(this._matrix);t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,this._data=t,this._dirty=!1}return this._data},brightness:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t;return this.multiply([i,0,0,0,0,0,i,0,0,0,0,0,i,0,0,0,0,0,1,0],e)},saturate:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=2*t/3+1,s=-.5*(i-1);return this.multiply([i,s,s,0,0,s,i,s,0,0,s,s,i,0,0,0,0,0,1,0],e)},desaturate:function(t){return void 0===t&&(t=!1),this.saturate(-1,t)},hue:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1),t=t/180*Math.PI;var i=Math.cos(t),s=Math.sin(t),n=.213,r=.715,o=.072;return this.multiply([n+.787*i+s*-n,r+i*-r+s*-r,o+i*-o+.928*s,0,0,n+i*-n+.143*s,r+i*(1-r)+.14*s,o+i*-o+-.283*s,0,0,n+i*-n+-.787*s,r+i*-r+s*r,o+.928*i+s*o,0,0,0,0,0,1,0],e)},grayscale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=!1),this.saturate(-t,e)},blackWhite:function(t){return void 0===t&&(t=!1),this.multiply([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t)},contrast:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t+1,s=-.5*(i-1);return this.multiply([i,0,0,0,s,0,i,0,0,s,0,0,i,0,s,0,0,0,1,0],e)},negative:function(t){return void 0===t&&(t=!1),this.multiply([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],t)},desaturateLuminance:function(t){return void 0===t&&(t=!1),this.multiply([.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],t)},sepia:function(t){return void 0===t&&(t=!1),this.multiply([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t)},night:function(t,e){return void 0===t&&(t=.1),void 0===e&&(e=!1),this.multiply([-2*t,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0],e)},lsd:function(t){return void 0===t&&(t=!1),this.multiply([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},brown:function(t){return void 0===t&&(t=!1),this.multiply([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t)},vintagePinhole:function(t){return void 0===t&&(t=!1),this.multiply([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t)},kodachrome:function(t){return void 0===t&&(t=!1),this.multiply([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],t)},technicolor:function(t){return void 0===t&&(t=!1),this.multiply([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],t)},polaroid:function(t){return void 0===t&&(t=!1),this.multiply([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t)},shiftToBGR:function(t){return void 0===t&&(t=!1),this.multiply([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t)},multiply:function(t,e){e||this.reset();for(var i=this._matrix,s=[],n=0;n<20;n++)s[n]=i[n];return i[0]=s[0]*t[0]+s[1]*t[5]+s[2]*t[10]+s[3]*t[15],i[1]=s[0]*t[1]+s[1]*t[6]+s[2]*t[11]+s[3]*t[16],i[2]=s[0]*t[2]+s[1]*t[7]+s[2]*t[12]+s[3]*t[17],i[3]=s[0]*t[3]+s[1]*t[8]+s[2]*t[13]+s[3]*t[18],i[4]=s[0]*t[4]+s[1]*t[9]+s[2]*t[14]+s[3]*t[19]+s[4],i[5]=s[5]*t[0]+s[6]*t[5]+s[7]*t[10]+s[8]*t[15],i[6]=s[5]*t[1]+s[6]*t[6]+s[7]*t[11]+s[8]*t[16],i[7]=s[5]*t[2]+s[6]*t[7]+s[7]*t[12]+s[8]*t[17],i[8]=s[5]*t[3]+s[6]*t[8]+s[7]*t[13]+s[8]*t[18],i[9]=s[5]*t[4]+s[6]*t[9]+s[7]*t[14]+s[8]*t[19]+s[9],i[10]=s[10]*t[0]+s[11]*t[5]+s[12]*t[10]+s[13]*t[15],i[11]=s[10]*t[1]+s[11]*t[6]+s[12]*t[11]+s[13]*t[16],i[12]=s[10]*t[2]+s[11]*t[7]+s[12]*t[12]+s[13]*t[17],i[13]=s[10]*t[3]+s[11]*t[8]+s[12]*t[13]+s[13]*t[18],i[14]=s[10]*t[4]+s[11]*t[9]+s[12]*t[14]+s[13]*t[19]+s[14],i[15]=s[15]*t[0]+s[16]*t[5]+s[17]*t[10]+s[18]*t[15],i[16]=s[15]*t[1]+s[16]*t[6]+s[17]*t[11]+s[18]*t[16],i[17]=s[15]*t[2]+s[16]*t[7]+s[17]*t[12]+s[18]*t[17],i[18]=s[15]*t[3]+s[16]*t[8]+s[17]*t[13]+s[18]*t[18],i[19]=s[15]*t[4]+s[16]*t[9]+s[17]*t[14]+s[18]*t[19]+s[19],this._dirty=!0,this}});t.exports=s},39298:(t,e,i)=>{var s=i(56694),n=i(72283),r=new s({initialize:function(t,e,i){this._rgb=[0,0,0],this.onChangeCallback=n,this.dirty=!1,this.set(t,e,i)},set:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this._rgb=[t,e,i],this.onChange(),this},equals:function(t,e,i){var s=this._rgb;return s[0]===t&&s[1]===e&&s[2]===i},onChange:function(){this.dirty=!0;var t=this._rgb;this.onChangeCallback.call(this,t[0],t[1],t[2])},r:{get:function(){return this._rgb[0]},set:function(t){this._rgb[0]=t,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(t){this._rgb[1]=t,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(t){this._rgb[2]=t,this.onChange()}},destroy:function(){this.onChangeCallback=null}});t.exports=r},84093:t=>{t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},32058:(t,e,i)=>{var s=i(97328),n=i(59994),r=i(73174),o=i(28417);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)+a),t}},85535:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(73174),o=i(74465);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)+a),t}},9605:(t,e,i)=>{var s=i(97328),n=i(70271),r=i(73174),o=i(19298);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)+a),t}},22529:(t,e,i)=>{var s=i(21843),n=i(59994),r=i(29568);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),s(t,n(e)+i,r(e)+o),t}},5739:(t,e,i)=>{var s=i(29568),n=i(40163),r=i(81711),o=i(74465);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)+a),t}},40327:(t,e,i)=>{var s=i(84093),n=[];n[s.BOTTOM_CENTER]=i(32058),n[s.BOTTOM_LEFT]=i(85535),n[s.BOTTOM_RIGHT]=i(9605),n[s.CENTER]=i(22529),n[s.LEFT_CENTER]=i(5739),n[s.RIGHT_CENTER]=i(27683),n[s.TOP_CENTER]=i(96439),n[s.TOP_LEFT]=i(81447),n[s.TOP_RIGHT]=i(47888),n[s.LEFT_BOTTOM]=n[s.BOTTOM_LEFT],n[s.LEFT_TOP]=n[s.TOP_LEFT],n[s.RIGHT_BOTTOM]=n[s.BOTTOM_RIGHT],n[s.RIGHT_TOP]=n[s.TOP_RIGHT];t.exports=function(t,e,i,s,r){return n[i](t,e,s,r)}},27683:(t,e,i)=>{var s=i(29568),n=i(70271),r=i(81711),o=i(19298);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)+a),t}},96439:(t,e,i)=>{var s=i(59994),n=i(47196),r=i(28417),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)-a),t}},81447:(t,e,i)=>{var s=i(40163),n=i(47196),r=i(74465),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)-i),o(t,n(e)-a),t}},47888:(t,e,i)=>{var s=i(70271),n=i(47196),r=i(19298),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)-a),t}},46997:(t,e,i)=>{t.exports={BottomCenter:i(32058),BottomLeft:i(85535),BottomRight:i(9605),Center:i(22529),LeftCenter:i(5739),QuickSet:i(40327),RightCenter:i(27683),TopCenter:i(96439),TopLeft:i(81447),TopRight:i(47888)}},93545:(t,e,i)=>{var s=i(84093),n=i(98611),r={In:i(46997),To:i(86639)};r=n(!1,r,s),t.exports=r},27118:(t,e,i)=>{var s=i(97328),n=i(59994),r=i(28417),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)+a),t}},84469:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(74465),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)+a),t}},51577:(t,e,i)=>{var s=i(97328),n=i(70271),r=i(19298),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)+a),t}},90271:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(73174),o=i(19298);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)+a),t}},30466:(t,e,i)=>{var s=i(29568),n=i(40163),r=i(81711),o=i(19298);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)+a),t}},50087:(t,e,i)=>{var s=i(40163),n=i(47196),r=i(19298),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)-i),o(t,n(e)-a),t}},82590:(t,e,i)=>{var s=i(84093),n=[];n[s.BOTTOM_CENTER]=i(27118),n[s.BOTTOM_LEFT]=i(84469),n[s.BOTTOM_RIGHT]=i(51577),n[s.LEFT_BOTTOM]=i(90271),n[s.LEFT_CENTER]=i(30466),n[s.LEFT_TOP]=i(50087),n[s.RIGHT_BOTTOM]=i(13555),n[s.RIGHT_CENTER]=i(99049),n[s.RIGHT_TOP]=i(67788),n[s.TOP_CENTER]=i(78170),n[s.TOP_LEFT]=i(54145),n[s.TOP_RIGHT]=i(75548);t.exports=function(t,e,i,s,r){return n[i](t,e,s,r)}},13555:(t,e,i)=>{var s=i(97328),n=i(70271),r=i(73174),o=i(74465);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)+a),t}},99049:(t,e,i)=>{var s=i(29568),n=i(70271),r=i(81711),o=i(74465);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)+a),t}},67788:(t,e,i)=>{var s=i(70271),n=i(47196),r=i(74465),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)-a),t}},78170:(t,e,i)=>{var s=i(59994),n=i(47196),r=i(73174),o=i(28417);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)-a),t}},54145:(t,e,i)=>{var s=i(40163),n=i(47196),r=i(73174),o=i(74465);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)-a),t}},75548:(t,e,i)=>{var s=i(70271),n=i(47196),r=i(73174),o=i(19298);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)-a),t}},86639:(t,e,i)=>{t.exports={BottomCenter:i(27118),BottomLeft:i(84469),BottomRight:i(51577),LeftBottom:i(90271),LeftCenter:i(30466),LeftTop:i(50087),QuickSet:i(82590),RightBottom:i(13555),RightCenter:i(99049),RightTop:i(67788),TopCenter:i(78170),TopLeft:i(54145),TopRight:i(75548)}},21843:(t,e,i)=>{var s=i(28417),n=i(81711);t.exports=function(t,e,i){return s(t,e),n(t,i)}},97328:t=>{t.exports=function(t){return t.y+t.height-t.height*t.originY}},7126:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(70271),o=i(47196);t.exports=function(t,e){void 0===e&&(e={});var i=n(t),a=o(t);return e.x=i,e.y=a,e.width=r(t)-i,e.height=s(t)-a,e}},59994:t=>{t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},29568:t=>{t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},40163:t=>{t.exports=function(t){return t.x-t.width*t.originX}},52088:t=>{t.exports=function(t){return t.width*t.originX}},23379:t=>{t.exports=function(t){return t.height*t.originY}},70271:t=>{t.exports=function(t){return t.x+t.width-t.width*t.originX}},47196:t=>{t.exports=function(t){return t.y-t.height*t.originY}},73174:t=>{t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},28417:t=>{t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},81711:t=>{t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},74465:t=>{t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},19298:t=>{t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},84349:t=>{t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},15252:(t,e,i)=>{t.exports={CenterOn:i(21843),GetBottom:i(97328),GetBounds:i(7126),GetCenterX:i(59994),GetCenterY:i(29568),GetLeft:i(40163),GetOffsetX:i(52088),GetOffsetY:i(23379),GetRight:i(70271),GetTop:i(47196),SetBottom:i(73174),SetCenterX:i(28417),SetCenterY:i(81711),SetLeft:i(74465),SetRight:i(19298),SetTop:i(84349)}},70616:t=>{t.exports={setCrisp:function(t){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach((function(e){t.style["image-rendering"]=e})),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},61068:(t,e,i)=>{var s,n,r,o=i(86459),a=i(8213),h=[],l=!1;t.exports=(r=function(){var t=0;return h.forEach((function(e){e.parent&&t++})),t},{create2D:function(t,e,i){return s(t,e,i,o.CANVAS)},create:s=function(t,e,i,s,r){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=o.CANVAS),void 0===r&&(r=!1);var c=n(s);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:s},s===o.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),r&&(c.parent=u),u.width=e,u.height=i,l&&s===o.CANVAS&&a.disable(u.getContext("2d")),u},createWebGL:function(t,e,i){return s(t,e,i,o.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:n=function(t){if(void 0===t&&(t=o.CANVAS),t===o.WEBGL)return null;for(var e=0;e{var e,i="";t.exports={disable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!1),t},enable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!0),t},getPrefix:e=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i{t.exports=function(t,e){return void 0===e&&(e="none"),t.style.msTouchAction=e,t.style["ms-touch-action"]=e,t.style["touch-action"]=e,t}},36505:t=>{t.exports=function(t,e){void 0===e&&(e="none");return["-webkit-","-khtml-","-moz-","-ms-",""].forEach((function(i){t.style[i+"user-select"]=e})),t.style["-webkit-touch-callout"]=e,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t}},23514:(t,e,i)=>{t.exports={CanvasInterpolation:i(70616),CanvasPool:i(61068),Smoothing:i(8213),TouchAction:i(59271),UserSelect:i(36505)}},27119:(t,e,i)=>{var s=i(56694),n=i(22946),r=i(5657),o=i(24650),a=i(68033),h=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,s)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(t,e,i,s,n){return void 0===s&&(s=255),void 0===n&&(n=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=s,this._locked=!1,this.update(n)},setGLTo:function(t,e,i,s){return void 0===s&&(s=1),this._locked=!0,this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=s,this._locked=!1,this.update(!0)},setFromRGB:function(t){return this._locked=!0,this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this._locked=!1,this.update(!0)},setFromHSV:function(t,e,i){return o(t,e,i,this)},update:function(t){if(void 0===t&&(t=!1),this._locked)return this;var e=this.r,i=this.g,s=this.b,o=this.a;return this._color=n(e,i,s),this._color32=r(e,i,s,o),this._rgba="rgba("+e+","+i+","+s+","+o/255+")",t&&a(e,i,s,this),this},updateHSV:function(){var t=this.r,e=this.g,i=this.b;return a(t,e,i,this),this},clone:function(){return new h(this.r,this.g,this.b,this.a)},gray:function(t){return this.setTo(t,t,t)},random:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t)),s=Math.floor(t+Math.random()*(e-t)),n=Math.floor(t+Math.random()*(e-t));return this.setTo(i,s,n)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t));return this.setTo(i,i,i)},saturate:function(t){return this.s+=t/100,this},desaturate:function(t){return this.s-=t/100,this},lighten:function(t){return this.v+=t/100,this},darken:function(t){return this.v-=t/100,this},brighten:function(t){var e=this.r,i=this.g,s=this.b;return e=Math.max(0,Math.min(255,e-Math.round(-t/100*255))),i=Math.max(0,Math.min(255,i-Math.round(-t/100*255))),s=Math.max(0,Math.min(255,s-Math.round(-t/100*255))),this.setTo(e,i,s)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(t){this.gl[0]=Math.min(Math.abs(t),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(t){this.gl[1]=Math.min(Math.abs(t),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(t){this.gl[2]=Math.min(Math.abs(t),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(t){this.gl[3]=Math.min(Math.abs(t),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(t){t=Math.floor(Math.abs(t)),this.r=Math.min(t,255),this.gl[0]=t/255,this.update(!0)}},green:{get:function(){return this.g},set:function(t){t=Math.floor(Math.abs(t)),this.g=Math.min(t,255),this.gl[1]=t/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(t){t=Math.floor(Math.abs(t)),this.b=Math.min(t,255),this.gl[2]=t/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(t){t=Math.floor(Math.abs(t)),this.a=Math.min(t,255),this.gl[3]=t/255,this.update()}},h:{get:function(){return this._h},set:function(t){this._h=t,o(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,o(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,o(this._h,this._s,t,this)}}});t.exports=h},30245:(t,e,i)=>{var s=i(22946);t.exports=function(t){void 0===t&&(t=1024);var e,i=[],n=255,r=255,o=0,a=0;for(e=0;e<=n;e++)i.push({r:r,g:e,b:a,color:s(r,e,a)});for(o=255,e=n;e>=0;e--)i.push({r:e,g:o,b:a,color:s(e,o,a)});for(r=0,e=0;e<=n;e++,o--)i.push({r:r,g:o,b:e,color:s(r,o,e)});for(o=0,a=255,e=0;e<=n;e++,a--,r++)i.push({r:r,g:o,b:a,color:s(r,o,a)});if(1024===t)return i;var h=[],l=0,u=1024/t;for(e=0;e{t.exports=function(t){var e={r:t>>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},25409:t=>{t.exports=function(t){var e=t.toString(16);return 1===e.length?"0"+e:e}},22946:t=>{t.exports=function(t,e,i){return t<<16|e<<8|i}},5657:t=>{t.exports=function(t,e,i,s){return s<<24|t<<16|e<<8|i}},74777:(t,e,i)=>{var s=i(27119),n=i(59998);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=n(l,h,t+1/3),o=n(l,h,t),a=n(l,h,t-1/3)}return(new s).setGLTo(r,o,a,1)}},89263:(t,e,i)=>{var s=i(24650);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],n=0;n<=359;n++)i.push(s(n/359,t,e));return i}},24650:(t,e,i)=>{var s=i(22946);function n(t,e,i,s){var n=(t+6*e)%6,r=Math.min(n,4-n,1);return Math.round(255*(s-s*i*Math.max(0,r)))}t.exports=function(t,e,i,r){void 0===e&&(e=1),void 0===i&&(i=1);var o=n(5,t,e,i),a=n(3,t,e,i),h=n(1,t,e,i);return r?r.setTo?r.setTo(o,a,h,r.alpha,!0):(r.r=o,r.g=a,r.b=h,r.color=s(o,a,h),r):{r:o,g:a,b:h,color:s(o,a,h)}}},91487:(t,e,i)=>{var s=i(27119);t.exports=function(t){var e=new s;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,i,s){return e+e+i+i+s+s}));var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var n=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(n,r,o)}return e}},59998:t=>{t.exports=function(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},74853:(t,e,i)=>{var s=i(27119),n=i(15978);t.exports=function(t){var e=n(t);return new s(e.r,e.g,e.b,e.a)}},15978:t=>{t.exports=function(t){return t>16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},53756:(t,e,i)=>{var s=i(42798),n=function(t,e,i,n,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var l=h/a;return{r:s(t,n,l),g:s(e,r,l),b:s(i,o,l)}};t.exports={RGBWithRGB:n,ColorWithRGB:function(t,e,i,s,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),n(t.r,t.g,t.b,e,i,s,r,o)},ColorWithColor:function(t,e,i,s){return void 0===i&&(i=100),void 0===s&&(s=0),n(t.r,t.g,t.b,e.r,e.g,e.b,i,s)}}},73904:(t,e,i)=>{var s=i(27119);t.exports=function(t){return new s(t.r,t.g,t.b,t.a)}},26841:(t,e,i)=>{var s=i(27119);t.exports=function(t){var e=new s,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var n=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(n,r,o,255*a)}return e}},68033:t=>{t.exports=function(t,e,i,s){void 0===s&&(s={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var n=Math.min(t,e,i),r=Math.max(t,e,i),o=r-n,a=0,h=0===r?0:o/r,l=r;return r!==n&&(r===t?a=(e-i)/o+(e{var s=i(25409);t.exports=function(t,e,i,n,r){return void 0===n&&(n=255),void 0===r&&(r="#"),"#"===r?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1,7):"0x"+s(n)+s(t)+s(e)+s(i)}},37243:(t,e,i)=>{var s=i(17489),n=i(27119);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new n(s(t,e),s(t,e),s(t,e))}},93222:(t,e,i)=>{var s=i(91487),n=i(74853),r=i(73904),o=i(26841);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):s(t);case"number":return n(t);case"object":return r(t)}}},95509:(t,e,i)=>{var s=i(27119);s.ColorSpectrum=i(30245),s.ColorToRGBA=i(86672),s.ComponentToHex=i(25409),s.GetColor=i(22946),s.GetColor32=i(5657),s.HexStringToColor=i(91487),s.HSLToColor=i(74777),s.HSVColorWheel=i(89263),s.HSVToRGB=i(24650),s.HueToComponent=i(59998),s.IntegerToColor=i(74853),s.IntegerToRGB=i(15978),s.Interpolate=i(53756),s.ObjectToColor=i(73904),s.RandomRGB=i(37243),s.RGBStringToColor=i(26841),s.RGBToHSV=i(68033),s.RGBToString=i(4880),s.ValueToColor=i(93222),t.exports=s},24816:(t,e,i)=>{t.exports={Align:i(93545),BaseShader:i(31053),Bounds:i(15252),Canvas:i(23514),Color:i(95509),ColorMatrix:i(65246),Masks:i(93310),RGB:i(39298)}},76756:(t,e,i)=>{var s=i(56694),n=i(61286),r=new s({initialize:function(t,e,i,s,n,r){e||(e=t.sys.make.image({x:i,y:s,key:n,frame:r,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e,i)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});n.register("bitmapMask",(function(t,e,i,s,n){return new r(this.scene,t,e,i,s,n)})),t.exports=r},63037:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var s=t.gl;t.flush(),0===t.maskStack.length&&(s.enable(s.STENCIL_TEST),s.clear(s.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var s=t.gl,n=this.geometryMask,r=t.maskCount;s.colorMask(!1,!1,!1,!1),i?(s.stencilFunc(s.EQUAL,r,255),s.stencilOp(s.KEEP,s.KEEP,s.INCR)):(s.stencilFunc(s.EQUAL,r+1,255),s.stencilOp(s.KEEP,s.KEEP,s.DECR)),n.renderWebGL(t,n,e),t.flush(),s.colorMask(!0,!0,!0,!0),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),i?this.invertAlpha?s.stencilFunc(s.NOTEQUAL,r+1,255):s.stencilFunc(s.EQUAL,r+1,255):this.invertAlpha?s.stencilFunc(s.NOTEQUAL,r,255):s.stencilFunc(s.EQUAL,r,255)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;if(0===t.maskStack.length)i.mask=null,e.disable(e.STENCIL_TEST);else{var s=t.maskStack[t.maskStack.length-1];s.mask.applyStencil(t,s.camera,!1),t.currentCameraMask.mask!==s.mask?(i.mask=s.mask,i.camera=s.camera):i.mask=null}},preRenderCanvas:function(t,e,i){var s=this.geometryMask;t.currentContext.save(),s.renderCanvas(t,s,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=s},93310:(t,e,i)=>{t.exports={BitmapMask:i(76756),GeometryMask:i(63037)}},31053:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s){e&&""!==e||(e=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join("\n")),i&&""!==i||(i=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join("\n")),void 0===s&&(s=null),this.key=t,this.fragmentSrc=e,this.vertexSrc=i,this.uniforms=s}});t.exports=s},99584:t=>{t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement||null===e)return t;return i||(i=document.body),i.appendChild(t),t}},85178:(t,e,i)=>{var s=i(99584);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+e.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=i,s(i,e.parent)}}},21546:(t,e,i)=>{var s=i(36580);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?s.cordova?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},74181:t=>{t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},s=document.createElement("div");return s.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(s),i.w=90===e?s.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:s.offsetHeight,document.documentElement.removeChild(s),s=null,90!==Math.abs(window.orientation)?i.h:i.w}},9229:(t,e,i)=>{var s=i(55301);t.exports=function(t,e){var i=window.screen,n=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);return n&&"string"==typeof n.type?n.type:"string"==typeof n?n:"number"==typeof window.orientation?0===window.orientation||180===window.orientation?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE:window.matchMedia?window.matchMedia("(orientation: portrait)").matches?s.ORIENTATION.PORTRAIT:window.matchMedia("(orientation: landscape)").matches?s.ORIENTATION.LANDSCAPE:void 0:e>t?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE}},2893:t=>{t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||(e=document.body),e}},89200:t=>{t.exports=function(t){var e="";try{if(window.DOMParser)e=(new DOMParser).parseFromString(t,"text/xml");else(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},55638:t=>{t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},27385:(t,e,i)=>{var s=i(56694),n=i(72283),r=new s({initialize:function(){this.isRunning=!1,this.callback=n,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var t=this;this.step=function e(i){t.callback(i),t.isRunning&&(t.timeOutID=window.requestAnimationFrame(e))},this.stepTimeout=function e(){t.isRunning&&(t.timeOutID=window.setTimeout(e,t.delay)),t.callback(window.performance.now())}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.delay=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=n}});t.exports=r},3590:(t,e,i)=>{var s={AddToDOM:i(99584),DOMContentLoaded:i(21546),GetInnerHeight:i(74181),GetScreenOrientation:i(9229),GetTarget:i(2893),ParseXML:i(89200),RemoveFromDOM:i(55638),RequestAnimationFrame:i(27385)};t.exports=s},78491:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(91963),o=new s({Extends:n,initialize:function(){n.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},95146:(t,e,i)=>{t.exports={EventEmitter:i(78491)}},88933:(t,e,i)=>{var s=i(95723),n=i(20494);t.exports=function(t,e,i){e.x=n(i,"x",0),e.y=n(i,"y",0),e.depth=n(i,"depth",0),e.flipX=n(i,"flipX",!1),e.flipY=n(i,"flipY",!1);var r=n(i,"scale",null);"number"==typeof r?e.setScale(r):null!==r&&(e.scaleX=n(r,"x",1),e.scaleY=n(r,"y",1));var o=n(i,"scrollFactor",null);"number"==typeof o?e.setScrollFactor(o):null!==o&&(e.scrollFactorX=n(o,"x",1),e.scrollFactorY=n(o,"y",1)),e.rotation=n(i,"rotation",0);var a=n(i,"angle",null);null!==a&&(e.angle=a),e.alpha=n(i,"alpha",1);var h=n(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=n(h,"x",.5),u=n(h,"y",.5);e.setOrigin(l,u)}return e.blendMode=n(i,"blendMode",s.NORMAL),e.visible=n(i,"visible",!0),n(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},32291:(t,e,i)=>{var s=i(20494);t.exports=function(t,e){var i=s(e,"anims",null);if(null===i)return t;if("string"==typeof i)t.anims.play(i);else if("object"==typeof i){var n=t.anims,r=s(i,"key",void 0);if(r){var o=s(i,"startFrame",void 0),a=s(i,"delay",0),h=s(i,"repeat",0),l=s(i,"repeatDelay",0),u=s(i,"yoyo",!1),c=s(i,"play",!1),d=s(i,"delayedPlay",0),p={key:r,delay:a,repeat:h,repeatDelay:l,yoyo:u,startFrame:o};c?n.play(p):d>0?n.playAfterDelay(p,d):n.load(p)}}return t}},91713:(t,e,i)=>{var s=i(56694),n=i(71207),r=i(91963),o=i(56631),a=i(7599),h=i(17922),l=new s({Extends:n,initialize:function(t){n.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(a.BOOT,this.boot,this),this.events.on(a.START,this.start,this)},boot:function(){this.events.once(a.DESTROY,this.destroy,this)},addChildCallback:function(t){t.displayList&&t.displayList!==this&&t.removeFromDisplayList(),t.parentContainer&&t.parentContainer.remove(t),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(o.ADDED_TO_SCENE,t,this.scene),this.events.emit(a.ADDED_TO_SCENE,t,this.scene))},removeChildCallback:function(t){this.queueDepthSort(),t.displayList=null,t.emit(o.REMOVED_FROM_SCENE,t,this.scene),this.events.emit(a.REMOVED_FROM_SCENE,t,this.scene)},start:function(){this.events.once(a.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(h(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},shutdown:function(){for(var t=this.list;t.length;)t[0].destroy(!0);this.events.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});r.register("DisplayList",l,"displayList"),t.exports=l},89980:(t,e,i)=>{var s=i(56694),n=i(48129),r=i(81078),o=i(6659),a=i(56631),h=i(7599),l=new s({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(a.ADDED_TO_SCENE,this.addedToScene,this),this.on(a.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(t,e){return this.data||(this.data=new r(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new r(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new r(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new r(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return n(this)},willRender:function(t){return!(!(!this.displayList||!this.displayList.active||this.displayList.willRender(t))||l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(a.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t&&t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(a.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},99325:(t,e,i)=>{var s=i(56694),n=i(91963),r=i(7599),o=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},n.register("GameObjectCreator",o,"make"),t.exports=o},61286:(t,e,i)=>{var s=i(56694),n=i(91963),r=i(7599),o=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},n.register("GameObjectFactory",o,"add"),t.exports=o},73329:(t,e,i)=>{var s=i(69360),n=new s,r=new s,o=new s,a={camera:n,sprite:r,calc:o};t.exports=function(t,e,i){var s=n,h=r,l=o;return h.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),h.e=t.x,h.f=t.y):(h.e-=e.scrollX*t.scrollFactorX,h.f-=e.scrollY*t.scrollFactorY),s.multiply(h,l),a}},92034:(t,e,i)=>{var s=i(56694),n=i(74623),r=i(91963),o=i(7599),a=new s({Extends:n,initialize:function(t){n.call(this),this.checkQueue=!0,this.scene=t,this.systems=t.sys,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.start,this)},boot:function(){this.systems.events.once(o.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(o.PRE_UPDATE,this.update,this),t.on(o.UPDATE,this.sceneUpdate,this),t.once(o.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(t,e){for(var i=this._active,s=i.length,n=0;n{t.exports=function(t,e,i,s,n,r,o,a,h,l,u,c,d,p,f){var v=i.x-e.displayOriginX+n,g=i.y-e.displayOriginY+r,m=v+i.w,y=g+i.h,x=o.getXRound(v,g,a),T=o.getYRound(v,g,a),w=o.getXRound(v,y,a),b=o.getYRound(v,y,a),S=o.getXRound(m,y,a),E=o.getYRound(m,y,a),A=o.getXRound(m,g,a),_=o.getYRound(m,g,a);t.batchQuad(e,x,T,w,b,S,E,A,_,s.u0,s.v0,s.u1,s.v1,h,l,u,c,d,p,f)}},82173:t=>{t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),void 0===s)return s={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0};var n,r,o,a,h=t.text,l=h.length,u=t.maxWidth,c=t.wordWrapCharCode,d=Number.MAX_VALUE,p=Number.MAX_VALUE,f=0,v=0,g=t.fontData.chars,m=t.fontData.lineHeight,y=t.letterSpacing,x=t.lineSpacing,T=0,w=0,b=0,S=null,E=t._align,A=0,_=0,C=t.fontSize/t.fontData.size,M=C*t.scaleX,R=C*t.scaleY,P=null,O=0,L=[],F=Number.MAX_VALUE,D=0,k=0,I=0,B=[],N=[],Y=null;if(u>0){for(n=0;nu||H-z>u?(G.push(V.i-1),V.cr?(G.push(V.i+V.word.length),z=0,X=null):X=V):V.cr&&(G.push(V.i+V.word.length),z=0,X=null)}for(n=G.length-1;n>=0;n--)r=h,o=G[n],a="\n",h=r.substr(0,o)+a+r.substr(o+1);s.wrappedText=h,l=h.length,B=[],Y=null}var j=0;for(n=0;nA&&(d=A),p>_&&(p=_);var q=A+S.xAdvance,Z=_+m;fD&&(D=I),ID&&(D=I),I0)for(var Q=0;Q{var s=i(31476);t.exports=function(t,e,i,n,r,o,a){var h=t.sys.textures.get(i),l=h.get(n),u=t.sys.cache.xml.get(r);if(l&&u){var c=s(u,l,o,a,h);return t.sys.cache.bitmapFont.add(e,{data:c,texture:i,frame:n,fromAtlas:!0}),!0}return!1}},39860:(t,e,i)=>{var s=i(10850);t.exports=function(t,e){var i=e.width,n=e.height,r=Math.floor(i/2),o=Math.floor(n/2),a=s(e,"chars","");if(""!==a){var h=s(e,"image",""),l=t.sys.textures.getFrame(h),u=l.cutX,c=l.cutY,d=l.source.width,p=l.source.height,f=s(e,"offset.x",0),v=s(e,"offset.y",0),g=s(e,"spacing.x",0),m=s(e,"spacing.y",0),y=s(e,"lineSpacing",0),x=s(e,"charsPerRow",null);null===x&&(x=d/i)>a.length&&(x=a.length);for(var T=f,w=v,b={retroFont:!0,font:h,size:i,lineHeight:n+y,chars:{}},S=0,E=0;E{function e(t,e){return parseInt(t.getAttribute(e),10)}t.exports=function(t,i,s,n,r){void 0===s&&(s=0),void 0===n&&(n=0);var o=i.cutX,a=i.cutY,h=i.source.width,l=i.source.height,u=i.sourceIndex,c={},d=t.getElementsByTagName("info")[0],p=t.getElementsByTagName("common")[0];c.font=d.getAttribute("face"),c.size=e(d,"size"),c.lineHeight=e(p,"lineHeight")+n,c.chars={};var f=t.getElementsByTagName("char"),v=void 0!==i&&i.trimmed;if(v)var g=i.height,m=i.width;for(var y=0;y{var s=i(66863),n=i(98611),r={Parse:i(39860)};r=n(!1,r,s),t.exports=r},66863:t=>{t.exports={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},13468:(t,e,i)=>{var s=i(44616),n=i(56694),r=i(88899),o=new n({Extends:s,Mixins:[r],initialize:function(t,e,i,n,r,o,a){s.call(this,t,e,i,n,r,o,a),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}});t.exports=o},93438:(t,e,i)=>{var s=i(49584);t.exports=function(t,e,i,n){var r=e._text,o=r.length,a=t.currentContext;if(0!==o&&s(t,a,e,i,n)){i.addToRenderList(e);var h=e.fromAtlas?e.frame:e.texture.frames.__BASE,l=e.displayCallback,u=e.callbackData,c=e.fontData.chars,d=e.fontData.lineHeight,p=e._letterSpacing,f=0,v=0,g=0,m=null,y=0,x=0,T=0,w=0,b=0,S=0,E=null,A=0,_=e.frame.source.image,C=h.cutX,M=h.cutY,R=0,P=0,O=e._fontSize/e.fontData.size,L=e._align,F=0,D=0;e.getTextBounds(!1);var k=e._bounds.lines;1===L?D=(k.longest-k.lengths[0])/2:2===L&&(D=k.longest-k.lengths[0]),a.translate(-e.displayOriginX,-e.displayOriginY);var I=i.roundPixels;e.cropWidth>0&&e.cropHeight>0&&(a.beginPath(),a.rect(0,0,e.cropWidth,e.cropHeight),a.clip());for(var B=0;B{var s=i(13468),n=i(88933),r=i(99325),o=i(20494);r.register("dynamicBitmapText",(function(t,e){void 0===t&&(t={});var i=o(t,"font",""),r=o(t,"text",""),a=o(t,"size",!1),h=new s(this.scene,0,0,i,r,a);return void 0!==e&&(t.add=e),n(this.scene,h,t),h}))},94145:(t,e,i)=>{var s=i(13468);i(61286).register("dynamicBitmapText",(function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,n,r))}))},88899:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(16873),r=i(93438),t.exports={renderWebGL:n,renderCanvas:r}},16873:(t,e,i)=>{var s=i(73329),n=i(69360),r=i(75512),o=new n;t.exports=function(t,e,i,n){var a=e.text,h=a.length;if(0!==h){i.addToRenderList(e);var l=t.pipelines.set(e.pipeline,e),u=s(e,i,n),c=u.sprite,d=u.calc,p=o,f=e.cropWidth>0||e.cropHeight>0;f&&(l.flush(),t.pushScissor(d.tx,d.ty,e.cropWidth*d.scaleX,e.cropHeight*d.scaleY));var v,g,m=e.frame.glTexture,y=e.tintFill,x=r.getTintAppendFloatAlpha(e.tintTopLeft,i.alpha*e._alphaTL),T=r.getTintAppendFloatAlpha(e.tintTopRight,i.alpha*e._alphaTR),w=r.getTintAppendFloatAlpha(e.tintBottomLeft,i.alpha*e._alphaBL),b=r.getTintAppendFloatAlpha(e.tintBottomRight,i.alpha*e._alphaBR),S=l.setGameObject(e),E=0,A=0,_=0,C=0,M=e.letterSpacing,R=0,P=0,O=e.scrollX,L=e.scrollY,F=e.fontData,D=F.chars,k=F.lineHeight,I=e.fontSize/F.size,B=0,N=e._align,Y=0,U=0,X=e.getTextBounds(!1);e.maxWidth>0&&(h=(a=X.wrappedText).length);var z=e._bounds.lines;1===N?U=(z.longest-z.lengths[0])/2:2===N&&(U=z.longest-z.lengths[0]);var G=i.roundPixels,V=e.displayCallback,W=e.callbackData;t.pipelines.preBatch(e);for(var H=0;H{var s=i(56694),n=i(82897),r=i(64937),o=i(89980),a=i(82173),h=i(68298),l=i(31476),u=i(74118),c=i(84557),d=new s({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Texture,r.Tint,r.Transform,r.Visible,c],initialize:function(t,e,i,s,n,r,h){void 0===n&&(n=""),void 0===h&&(h=0),o.call(this,t,"BitmapText"),this.font=s;var l=this.scene.sys.cache.bitmapFont.get(s);l||console.warn("Invalid BitmapText key: "+s),this.fontData=l.data,this._text="",this._fontSize=r||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=h,this._bounds=a(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=l.fromAtlas,this.setTexture(l.texture,l.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.setText(n)},setLeftAlign:function(){return this._align=d.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=d.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=d.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(t){return this._fontSize=t,this._dirty=!0,this},setLetterSpacing:function(t){return void 0===t&&(t=0),this._letterSpacing=t,this._dirty=!0,this},setLineSpacing:function(t){return void 0===t&&(t=0),this.lineSpacing=t,this},setText:function(t){return t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t!==this.text&&(this._text=t.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=.5),this.dropShadowX=t,this.dropShadowY=e,this.dropShadowColor=i,this.dropShadowAlpha=s,this},setCharacterTint:function(t,e,i,s,r,o,a){void 0===t&&(t=0),void 0===e&&(e=1),void 0===i&&(i=!1),void 0===s&&(s=-1),void 0===r&&(r=s,o=s,a=s);var h=this.text.length;-1===e&&(e=h),t<0&&(t=h+t),t=n(t,0,h-1);for(var l=n(t+e,t,h),u=this.charColors,c=t;c{var s=i(49584);t.exports=function(t,e,i,n){var r=e._text,o=r.length,a=t.currentContext;if(0!==o&&s(t,a,e,i,n)){i.addToRenderList(e);var h=e.fromAtlas?e.frame:e.texture.frames.__BASE,l=e.fontData.chars,u=e.fontData.lineHeight,c=e._letterSpacing,d=e._lineSpacing,p=0,f=0,v=0,g=null,m=0,y=0,x=0,T=0,w=0,b=0,S=null,E=0,A=h.source.image,_=h.cutX,C=h.cutY,M=e._fontSize/e.fontData.size,R=e._align,P=0,O=0,L=e.getTextBounds(!1);e.maxWidth>0&&(o=(r=L.wrappedText).length);var F=e._bounds.lines;1===R?O=(F.longest-F.lengths[0])/2:2===R&&(O=F.longest-F.lengths[0]),a.translate(-e.displayOriginX,-e.displayOriginY);for(var D=i.roundPixels,k=0;k{var s=i(44616),n=i(88933),r=i(99325),o=i(20494),a=i(10850);r.register("bitmapText",(function(t,e){void 0===t&&(t={});var i=a(t,"font",""),r=o(t,"text",""),h=o(t,"size",!1),l=a(t,"align",0),u=new s(this.scene,0,0,i,r,h,l);return void 0!==e&&(t.add=e),n(this.scene,u,t),u}))},21797:(t,e,i)=>{var s=i(44616);i(61286).register("bitmapText",(function(t,e,i,n,r,o){return this.displayList.add(new s(this.scene,t,e,i,n,r,o))}))},84557:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(26372),r=i(97545),t.exports={renderWebGL:n,renderCanvas:r}},26372:(t,e,i)=>{var s=i(8810),n=i(73329),r=i(75512);t.exports=function(t,e,i,o){if(0!==e._text.length){i.addToRenderList(e);var a,h,l,u=t.pipelines.set(e.pipeline,e),c=n(e,i,o).calc,d=i.roundPixels,p=i.alpha,f=e.charColors,v=e.tintFill,g=r.getTintAppendFloatAlpha,m=g(e.tintTopLeft,p*e._alphaTL),y=g(e.tintTopRight,p*e._alphaTR),x=g(e.tintBottomLeft,p*e._alphaBL),T=g(e.tintBottomRight,p*e._alphaBR),w=e.frame.glTexture,b=u.setGameObject(e),S=e.getTextBounds(!1).characters,E=e.dropShadowX,A=e.dropShadowY,_=0!==E||0!==A;if(t.pipelines.preBatch(e),_){var C=e.dropShadowColor,M=e.dropShadowAlpha,R=g(C,p*M*e._alphaTL),P=g(C,p*M*e._alphaTR),O=g(C,p*M*e._alphaBL),L=g(C,p*M*e._alphaBR);for(a=0;a{var s=i(92246),n=i(41664),r=i(56694),o=i(64937),a=i(82047),h=i(89980),l=i(71207),u=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,s],initialize:function(t,e,i,s,n){h.call(this,t,"Blitter"),this.setTexture(s,n),this.setPosition(e,i),this.initPipeline(),this.children=new l,this.renderList=[],this.dirty=!1},create:function(t,e,i,s,r){void 0===s&&(s=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));var o=new n(this,t,e,i,s);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,s){for(var n=this.createMultiple(e,i,s),r=0;r0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});t.exports=u},33177:t=>{t.exports=function(t,e,i,s){var n=e.getRenderList();if(0!==n.length){var r=t.currentContext,o=i.alpha*e.alpha;if(0!==o){i.addToRenderList(e),r.globalCompositeOperation=t.blendModes[e.blendMode],r.imageSmoothingEnabled=!e.frame.source.scaleMode;var a=e.x-i.scrollX*e.scrollFactorX,h=e.y-i.scrollY*e.scrollFactorY;r.save(),s&&s.copyToContext(r);for(var l=i.roundPixels,u=0;u0&&f.height>0&&(r.save(),r.translate(c.x+a,c.y+h),r.scale(m,y),r.drawImage(p.source.image,f.x,f.y,f.width,f.height,v,g,f.width,f.height),r.restore())):(l&&(v=Math.round(v),g=Math.round(g)),f.width>0&&f.height>0&&r.drawImage(p.source.image,f.x,f.y,f.width,f.height,v+c.x+a,g+c.y+h,f.width,f.height)))}r.restore()}}}},68452:(t,e,i)=>{var s=i(52816),n=i(88933),r=i(99325),o=i(20494);r.register("blitter",(function(t,e){void 0===t&&(t={});var i=o(t,"key",null),r=o(t,"frame",null),a=new s(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),n(this.scene,a,t),a}))},38906:(t,e,i)=>{var s=i(52816);i(61286).register("blitter",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},92246:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(89165),r=i(33177),t.exports={renderWebGL:n,renderCanvas:r}},89165:(t,e,i)=>{var s=i(69360),n=i(75512),r=new s;t.exports=function(t,e,i,s){var o=e.getRenderList(),a=i.alpha*e.alpha;if(0!==o.length&&0!==a){i.addToRenderList(e);var h=t.pipelines.set(this.pipeline,e),l=i.scrollX*e.scrollFactorX,u=i.scrollY*e.scrollFactorY,c=r.copyFrom(i.matrix);s&&(c.multiplyWithOffset(s,-l,-u),l=0,u=0);var d=e.x-l,p=e.y-u,f=-1,v=i.roundPixels;t.pipelines.preBatch(e);for(var g=0;g{var s=i(56694),n=i(82047),r=new s({initialize:function(t,e,i,s,n){this.parent=t,this.x=e,this.y=i,this.frame=s,this.data={},this.tint=16777215,this._visible=n,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(t){return void 0===t?this.frame=this.parent.frame:t instanceof n&&t.texture===this.parent.texture?this.frame=t:this.frame=this.parent.texture.get(t),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(t,e,i){return this.x=t,this.y=e,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,i&&this.setFrame(i),this},setPosition:function(t,e){return this.x=t,this.y=e,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},setVisible:function(t){return this.visible=t,this},setAlpha:function(t){return this.alpha=t,this},setTint:function(t){return this.tint=t,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(t){this.parent.dirty|=this._visible!==t,this._visible=t}},alpha:{get:function(){return this._alpha},set:function(t){this.parent.dirty|=this._alpha>0!=t>0,this._alpha=t}}});t.exports=r},97123:(t,e,i)=>{var s=i(82897),n={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,n){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=s(t,0,1),this._alphaTR=s(e,0,1),this._alphaBL=s(i,0,1),this._alphaBR=s(n,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=s(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=s(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=s(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=s(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=n},15720:(t,e,i)=>{var s=i(82897),n={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=n},69732:(t,e,i)=>{var s=i(95723),n={_blendMode:s.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=s[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=n},28284:t=>{t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},85293:t=>{var e={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var n=t;this.frame.setCropUVs(this._crop,n.x,n.y,n.width,n.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=e},14975:t=>{var e={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=e},88677:t=>{var e={fxPadding:0,setFXPadding:function(t){return void 0===t&&(t=0),this.fxPadding=t,this},onFXCopy:function(){},onFX:function(){}};t.exports=e},92972:t=>{t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},80693:(t,e,i)=>{var s=i(74118),n=i(2386),r=i(93736),o={prepareBoundsOutput:function(t,e){(void 0===e&&(e=!1),0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,n,r,o,a,h,l;if(void 0===t&&(t=new s),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),u.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),n=t.x,r=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),o=t.x,a=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),n=t.x,r=t.y,this.getBottomLeft(t),o=t.x,a=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,n,o,h),t.y=Math.min(i,r,a,l),t.width=Math.max(e,n,o,h)-t.x,t.height=Math.max(i,r,a,l)-t.y,t}};t.exports=o},39171:(t,e,i)=>{var s=i(76756),n=i(63037),r={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t,e,i,n,r){return void 0===t&&(this.texture||this.shader||this.geom)&&(t=this),new s(this.scene,t,e,i,n,r)},createGeometryMask:function(t){return void 0!==t||"Graphics"!==this.type&&!this.geom||(t=this),new n(this.scene,t)}};t.exports=r},28072:t=>{var e={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=e},54211:(t,e,i)=>{var s=i(75606),n=i(63130),r=i(10850),o=i(55303),a=i(93736),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:o.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=r(t,"from",0),t.to=r(t,"to",1);var h=n(t,"positionOnPath",!1);this.rotateToPath=n(t,"rotateToPath",!1),this.pathRotationOffset=r(t,"rotationOffset",0);var l=r(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.setTargetValue()}),this.pathOffset||(this.pathOffset=new a(this.x,this.y)),this.pathVector||(this.pathVector=new a),this.pathDelta||(this.pathDelta=new a),this.pathDelta.reset(),t.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=o.PLAYING_FORWARD,this.rotateToPath){var u=this.path.getPoint(.1);this.rotation=Math.atan2(u.y-this.y,u.x-this.x)+s(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t){var e=t.data[0],i=this.pathDelta,n=this.pathVector;if(i.copy(n).negate(),e.state===o.COMPLETE)return this.path.getPoint(e.end,n),i.add(n),n.add(this.pathOffset),void this.setPosition(n.x,n.y);if(e.state!==o.PLAYING_FORWARD&&e.state!==o.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),n),i.add(n),n.add(this.pathOffset);var r=this.x,a=this.y;this.setPosition(n.x,n.y);var h=this.x-r,l=this.y-a;if(0===h&&0===l)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(l,h)+s(this.pathRotationOffset))}}};t.exports=h},58210:(t,e,i)=>{var s=i(28699),n=i(72677),r={defaultPipeline:null,pipeline:null,hasPostPipeline:!1,postPipelines:null,pipelineData:null,initPipeline:function(t){var e=this.scene.sys.renderer;if(!e)return!1;var i=e.pipelines;if(this.postPipelines=[],this.pipelineData={},i){void 0===t&&(t=i.default);var s=i.get(t);if(s)return this.defaultPipeline=s,this.pipeline=s,!0}return!1},setPipeline:function(t,e,i){var n=this.scene.sys.renderer;if(!n)return this;var r=n.pipelines;if(r){var o=r.get(t);o&&(this.pipeline=o),e&&(this.pipelineData=i?s(e):e)}return this},setPostPipeline:function(t,e,i){var n=this.scene.sys.renderer;if(!n)return this;var r=n.pipelines;if(r){Array.isArray(t)||(t=[t]);for(var o=0;o0,this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e="string"==typeof t,i=this.postPipelines,s=[],n=0;n=0;i--){var s=e[i];("string"==typeof t&&s.name===t||"string"!=typeof t&&s instanceof t)&&(s.destroy(),n(e,i))}return this.hasPostPipeline=this.postPipelines.length>0,this},getPipelineName:function(){return this.pipeline.name}};t.exports=r},45900:t=>{var e={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=e},31654:t=>{var e={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=this.width,e.hitArea.height=this.height),this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=e},82081:(t,e,i)=>{var s=i(82047),n={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=n},21850:(t,e,i)=>{var s=i(82047),n={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var n=t;this.frame.setCropUVs(this._crop,n.x,n.y,n.width,n.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=n},58072:t=>{var e={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,i=t,s=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=s,this.tintFill=!1,this},setTintFill:function(t,e,i,s){return this.setTint(t,e,i,s),this.tintFill=!0,this},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};t.exports=e},48129:t=>{t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},56584:(t,e,i)=>{var s=i(83392),n=i(69360),r=i(64462),o=i(35786),a=i(62138),h=i(93736),l={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return a(this._rotation*s.RAD_TO_DEG)},set:function(t){this.rotation=a(t)*s.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=o(t)}},setPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=0),this.x=t,this.y=e,this.z=i,this.w=s,this},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===s&&(s=this.scene.sys.scale.height),this.x=t+Math.random()*i,this.y=e+Math.random()*s,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new n),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new n),void 0===e&&(e=new n);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);i;)e.applyITRS(i.x,i.y,i._rotation,i._scaleX,i._scaleY),e.multiply(t,t),i=i.parentContainer;return t},getLocalPoint:function(t,e,i,s){i||(i=new h),s||(s=this.scene.sys.cameras.main);var n=s.scrollX,o=s.scrollY,a=t+n*this.scrollFactorX-n,l=e+o*this.scrollFactorY-o;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(a,l,i):r(a,l,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=l},69360:(t,e,i)=>{var s=i(56694),n=i(83392),r=i(93736),o=new s({initialize:function(t,e,i,s,n,r){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=1),void 0===n&&(n=0),void 0===r&&(r=0),this.matrix=new Float32Array([t,e,i,s,n,r,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],r=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):s||r?n.TAU-(r>0?Math.acos(-s/this.scaleY):-Math.acos(s/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),s=this.matrix,n=s[0],r=s[1],o=s[2],a=s[3];return s[0]=n*i+o*e,s[1]=r*i+a*e,s[2]=n*-e+o*i,s[3]=r*-e+a*i,this},multiply:function(t,e){var i=this.matrix,s=t.matrix,n=i[0],r=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=s[0],c=s[1],d=s[2],p=s[3],f=s[4],v=s[5],g=void 0===e?i:e.matrix;return g[0]=u*n+c*o,g[1]=u*r+c*a,g[2]=d*n+p*o,g[3]=d*r+p*a,g[4]=f*n+v*o+h,g[5]=f*r+v*a+l,g},multiplyWithOffset:function(t,e,i){var s=this.matrix,n=t.matrix,r=s[0],o=s[1],a=s[2],h=s[3],l=e*r+i*a+s[4],u=e*o+i*h+s[5],c=n[0],d=n[1],p=n[2],f=n[3],v=n[4],g=n[5];return s[0]=c*r+d*a,s[1]=c*o+d*h,s[2]=p*r+f*a,s[3]=p*o+f*h,s[4]=v*r+g*a+l,s[5]=v*o+g*h+u,this},transform:function(t,e,i,s,n,r){var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*u,o[2]=i*a+s*l,o[3]=i*h+s*u,o[4]=n*a+r*l+c,o[5]=n*h+r*u+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var s=this.matrix,n=s[0],r=s[1],o=s[2],a=s[3],h=s[4],l=s[5];return i.x=t*n+e*o+h,i.y=t*r+e*a+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=e*n-i*s;return t[0]=n/a,t[1]=-i/a,t[2]=-s/a,t[3]=e/a,t[4]=(s*o-n*r)/a,t[5]=-(e*o-i*r)/a,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,s,n,r){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=s,o[4]=n,o[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],s=e[1],n=e[2],r=e[3],o=i*r-s*n;if(t.translateX=e[4],t.translateY=e[5],i||s){var a=Math.sqrt(i*i+s*s);t.rotation=s>0?Math.acos(i/a):-Math.acos(i/a),t.scaleX=a,t.scaleY=o/a}else if(n||r){var h=Math.sqrt(n*n+r*r);t.rotation=.5*Math.PI-(r>0?Math.acos(-n/h):-Math.acos(n/h)),t.scaleX=o/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,s,n){var r=this.matrix,o=Math.sin(i),a=Math.cos(i);return r[4]=t,r[5]=e,r[0]=a*s,r[1]=o*s,r[2]=-o*n,r[3]=a*n,this},applyInverse:function(t,e,i){void 0===i&&(i=new r);var s=this.matrix,n=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],c=1/(n*h+a*-o);return i.x=h*c*t+-a*c*e+(u*a-l*h)*c,i.y=n*c*e+-o*c*t+(-u*n+l*o)*c,i},setQuad:function(t,e,i,s,n){var r=this.quad,o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return r[0]=t*a+e*l+c,r[1]=t*h+e*u+d,r[2]=t*a+s*l+c,r[3]=t*h+s*u+d,r[4]=i*a+s*l+c,r[5]=i*h+s*u+d,r[6]=i*a+e*l+c,r[7]=i*h+e*u+d,n&&r.forEach((function(t,e){r[e]=Math.round(t)})),r},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var s=this.getX(t,e);return i&&(s=Math.round(s)),s},getYRound:function(t,e,i){var s=this.getY(t,e);return i&&(s=Math.round(s)),s},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});t.exports=o},59694:t=>{var e={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=e},64937:(t,e,i)=>{t.exports={Alpha:i(97123),AlphaSingle:i(15720),BlendMode:i(69732),ComputedSize:i(28284),Crop:i(85293),Depth:i(14975),Flip:i(92972),FX:i(88677),GetBounds:i(80693),Mask:i(39171),Origin:i(28072),PathFollower:i(54211),Pipeline:i(58210),ScrollFactor:i(45900),Size:i(31654),Texture:i(82081),TextureCrop:i(21850),Tint:i(58072),ToJSON:i(48129),Transform:i(56584),TransformMatrix:i(69360),Visible:i(59694)}},70339:(t,e,i)=>{var s=i(59959),n=i(95723),r=i(56694),o=i(64937),a=i(56631),h=i(89980),l=i(74118),u=i(98524),c=i(58795),d=i(93736),p=new r({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Pipeline,o.Transform,o.Visible,u],initialize:function(t,e,i,s){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPipeline(),this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(n.SKIP_CHECK),s&&this.add(s)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,s=new l,n=!1;t.setEmpty();for(var r=0;r-1},setAll:function(t,e,i,n){return s.SetAll(this.list,t,e,i,n),this},each:function(t,e){var i,s=[null],n=this.list.slice(),r=n.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=p},13916:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var n=e.list;if(0!==n.length){var r=e.localTransform;s?(r.loadIdentity(),r.multiply(s),r.translate(e.x,e.y),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY)):r.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var o=-1!==e.blendMode;o||t.setBlendMode(0);var a=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var u=0;u{var s=i(88933),n=i(70339),r=i(99325),o=i(20494);r.register("container",(function(t,e){void 0===t&&(t={});var i=o(t,"x",0),r=o(t,"y",0),a=o(t,"children",null),h=new n(this.scene,i,r,a);return void 0!==e&&(t.add=e),s(this.scene,h,t),h}))},23400:(t,e,i)=>{var s=i(70339);i(61286).register("container",(function(t,e,i){return this.displayList.add(new s(this.scene,t,e,i))}))},98524:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(36934),r=i(13916),t.exports={renderWebGL:n,renderCanvas:r}},36934:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var n=e.list,r=n.length;if(0!==r){var o=e.localTransform;s?(o.loadIdentity(),o.multiply(s),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.pipelines.preBatch(e);var a=-1!==e.blendMode;a||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=0;c{t.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},38943:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(11603),o=i(89980),a=i(42911),h=i(55638),l=i(7599),u=i(51729),c=new s({Extends:o,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Origin,n.ScrollFactor,n.Transform,n.Visible,r],initialize:function(t,e,i,s,n,r){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new u,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),"string"==typeof s?"#"===s[0]?this.setElement(s.substr(1),n,r):this.createElement(s,n,r):s&&this.setElement(s,n,r),t.sys.events.on(l.SLEEP,this.handleSceneEvent,this),t.sys.events.on(l.WAKE,this.handleSceneEvent,this),t.sys.events.on(l.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(t){var e=this.node,i=e.style;e&&(i.display=t.settings.visible?"block":"none")},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e{var s=i(2452),n=i(89980),r=i(69360),o=new r,a=new r,h=new r;t.exports=function(t,e,i,r){if(e.node){var l=e.node.style,u=e.scene.sys.settings;if(!l||!u.visible||n.RENDER_MASK!==e.renderFlags||0!==e.cameraFilter&&e.cameraFilter&i.id||e.parentContainer&&!e.parentContainer.willRender())l.display="none";else{var c=e.parentContainer,d=i.alpha*e.alpha;c&&(d*=c.alpha);var p=o,f=a,v=h,g=0,m=0,y="0%",x="0%";r?(g=e.width*e.scaleX*e.originX,m=e.height*e.scaleY*e.originY,f.applyITRS(e.x-g,e.y-m,e.rotation,e.scaleX,e.scaleY),p.copyFrom(i.matrix),p.multiplyWithOffset(r,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),f.e=e.x-g,f.f=e.y-m,p.multiply(f,v)):(g=e.width*e.originX,m=e.height*e.originY,f.applyITRS(e.x-g,e.y-m,e.rotation,e.scaleX,e.scaleY),p.copyFrom(i.matrix),y=100*e.originX+"%",x=100*e.originY+"%",f.e-=i.scrollX*e.scrollFactorX,f.f-=i.scrollY*e.scrollFactorY,p.multiply(f,v)),e.transformOnly||(l.display="block",l.opacity=d,l.zIndex=e._depth,l.pointerEvents=e.pointerEvents,l.mixBlendMode=s[e._blendMode]),l.transform=v.getCSSMatrix()+" skew("+e.skewX+"rad, "+e.skewY+"rad) rotate3d("+e.rotate3d.x+","+e.rotate3d.y+","+e.rotate3d.z+","+e.rotate3d.w+e.rotate3dAngle+")",l.transformOrigin=y+" "+x}}}},66788:(t,e,i)=>{var s=i(38943);i(61286).register("dom",(function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),o}))},11603:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(66070),r=i(66070),t.exports={renderWebGL:n,renderCanvas:r}},65492:t=>{t.exports="addedtoscene"},98398:t=>{t.exports="destroy"},40239:t=>{t.exports="removedfromscene"},17286:t=>{t.exports="complete"},31496:t=>{t.exports="created"},89587:t=>{t.exports="error"},96342:t=>{t.exports="loop"},49614:t=>{t.exports="play"},24418:t=>{t.exports="seeked"},87318:t=>{t.exports="seeking"},61922:t=>{t.exports="stop"},13991:t=>{t.exports="timeout"},4052:t=>{t.exports="unlocked"},56631:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(65492),DESTROY:i(98398),REMOVED_FROM_SCENE:i(40239),VIDEO_COMPLETE:i(17286),VIDEO_CREATED:i(31496),VIDEO_ERROR:i(89587),VIDEO_LOOP:i(96342),VIDEO_PLAY:i(49614),VIDEO_SEEKED:i(24418),VIDEO_SEEKING:i(87318),VIDEO_STOP:i(61922),VIDEO_TIMEOUT:i(13991),VIDEO_UNLOCKED:i(4052)}},39419:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),o=i(79394),a=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.Origin,n.ScrollFactor,n.Size,n.Texture,n.Tint,n.Transform,n.Visible,o],initialize:function(t){r.call(this,t,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});t.exports=a},96699:()=>{},41155:(t,e,i)=>{var s=i(39419);i(61286).register("extern",(function(){var t=new s(this.scene);return this.displayList.add(t),t}))},79394:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(81410),r=i(96699),t.exports={renderWebGL:n,renderCanvas:r}},81410:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){t.pipelines.clear();var r=s(e,i,n).calc;e.render.call(e,t,i,r),t.pipelines.rebind()}},36266:t=>{t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},33182:(t,e,i)=>{var s=i(51052),n=i(56694),r=i(36266),o=i(15720),a=i(69732),h=i(14975),l=i(39171),u=i(58210),c=i(45900),d=i(56584),p=i(59694),f=i(95669),v=i(89980),g=i(72632),m=i(10850),y=i(83392),x=i(60898),T=new n({Extends:v,Mixins:[o,a,h,l,u,d,p,c,x],initialize:function(t,e){var i=m(e,"x",0),s=m(e,"y",0);v.call(this,t,"Graphics"),this.setPosition(i,s),this.initPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return m(t,"lineStyle",null)&&(this.defaultStrokeWidth=m(t,"lineStyle.width",1),this.defaultStrokeColor=m(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=m(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),m(t,"fillStyle",null)&&(this.defaultFillColor=m(t,"fillStyle.color",16777215),this.defaultFillAlpha=m(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},fillGradientStyle:function(t,e,i,s,n,o,a,h){return void 0===n&&(n=1),void 0===o&&(o=n),void 0===a&&(a=n),void 0===h&&(h=n),this.commandBuffer.push(r.GRADIENT_FILL_STYLE,n,o,a,h,t,e,i,s),this},lineGradientStyle:function(t,e,i,s,n,o){return void 0===o&&(o=1),this.commandBuffer.push(r.GRADIENT_LINE_STYLE,t,o,e,i,s,n),this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},fill:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,y.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,y.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,s){return this.commandBuffer.push(r.FILL_RECT,t,e,i,s),this},strokeRect:function(t,e,i,s){var n=this._lineWidth/2,r=t-n,o=t+n;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+s),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+s),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+s),this.lineTo(o+i,e+s),this.strokePath(),this},fillRoundedRect:function(t,e,i,s,n){void 0===n&&(n=20);var r=n,o=n,a=n,h=n;return"number"!=typeof n&&(r=g(n,"tl",20),o=g(n,"tr",20),a=g(n,"bl",20),h=g(n,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-y.TAU,0),this.lineTo(t+i,e+s-h),this.arc(t+i-h,e+s-h,h,0,y.TAU),this.lineTo(t+a,e+s),this.arc(t+a,e+s-a,a,y.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-y.TAU),this.fillPath(),this},strokeRoundedRect:function(t,e,i,s,n){void 0===n&&(n=20);var r=n,o=n,a=n,h=n,l=Math.min(i,s)/2;return"number"!=typeof n&&(r=g(n,"tl",20),o=g(n,"tr",20),a=g(n,"bl",20),h=g(n,"br",20)),r=Math.min(r,l),o=Math.min(o,l),a=Math.min(a,l),h=Math.min(h,l),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.moveTo(t+i-o,e),this.arc(t+i-o,e+o,o,-y.TAU,0),this.lineTo(t+i,e+s-h),this.moveTo(t+i,e+s-h),this.arc(t+i-h,e+s-h,h,0,y.TAU),this.lineTo(t+a,e+s),this.moveTo(t+a,e+s),this.arc(t+a,e+s-a,a,y.TAU,Math.PI),this.lineTo(t,e+r),this.moveTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-y.TAU),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,s,n,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,s,n,o),this},strokeTriangle:function(t,e,i,s,n,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,s,n,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,s){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,s),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},strokePoints:function(t,e,i,s){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===s&&(s=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var n=1;n-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var s,n,r=this.scene.sys,o=r.game.renderer;if(void 0===e&&(e=r.scale.width),void 0===i&&(i=r.scale.height),T.TargetCamera.setScene(this.scene),T.TargetCamera.setViewport(0,0,e,i),T.TargetCamera.scrollX=this.x,T.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var a=(s=r.textures.get(t)).getSourceImage();a instanceof HTMLCanvasElement&&(n=a.getContext("2d"))}else n=(s=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(n=t.getContext("2d"));return n&&(this.renderCanvas(o,this,T.TargetCamera,null,n,!1),s&&s.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});T.TargetCamera=new s,t.exports=T},91543:(t,e,i)=>{var s=i(36266),n=i(49584);t.exports=function(t,e,i,r,o,a){var h=e.commandBuffer,l=h.length,u=o||t.currentContext;if(0!==l&&n(t,u,e,i,r)){i.addToRenderList(e);var c=1,d=1,p=0,f=0,v=1,g=0,m=0,y=0;u.beginPath();for(var x=0;x>>16,m=(65280&p)>>>8,y=255&p,u.strokeStyle="rgba("+g+","+m+","+y+","+c+")",u.lineWidth=v,x+=3;break;case s.FILL_STYLE:f=h[x+1],d=h[x+2],g=(16711680&f)>>>16,m=(65280&f)>>>8,y=255&f,u.fillStyle="rgba("+g+","+m+","+y+","+d+")",x+=2;break;case s.BEGIN_PATH:u.beginPath();break;case s.CLOSE_PATH:u.closePath();break;case s.FILL_PATH:a||u.fill();break;case s.STROKE_PATH:a||u.stroke();break;case s.FILL_RECT:a?u.rect(h[x+1],h[x+2],h[x+3],h[x+4]):u.fillRect(h[x+1],h[x+2],h[x+3],h[x+4]),x+=4;break;case s.FILL_TRIANGLE:u.beginPath(),u.moveTo(h[x+1],h[x+2]),u.lineTo(h[x+3],h[x+4]),u.lineTo(h[x+5],h[x+6]),u.closePath(),a||u.fill(),x+=6;break;case s.STROKE_TRIANGLE:u.beginPath(),u.moveTo(h[x+1],h[x+2]),u.lineTo(h[x+3],h[x+4]),u.lineTo(h[x+5],h[x+6]),u.closePath(),a||u.stroke(),x+=6;break;case s.LINE_TO:u.lineTo(h[x+1],h[x+2]),x+=2;break;case s.MOVE_TO:u.moveTo(h[x+1],h[x+2]),x+=2;break;case s.LINE_FX_TO:u.lineTo(h[x+1],h[x+2]),x+=5;break;case s.MOVE_FX_TO:u.moveTo(h[x+1],h[x+2]),x+=5;break;case s.SAVE:u.save();break;case s.RESTORE:u.restore();break;case s.TRANSLATE:u.translate(h[x+1],h[x+2]),x+=2;break;case s.SCALE:u.scale(h[x+1],h[x+2]),x+=2;break;case s.ROTATE:u.rotate(h[x+1]),x+=1;break;case s.GRADIENT_FILL_STYLE:x+=5;break;case s.GRADIENT_LINE_STYLE:x+=6}}u.restore()}}},41286:(t,e,i)=>{var s=i(99325),n=i(33182);s.register("graphics",(function(t,e){void 0===t&&(t={}),void 0!==e&&(t.add=e);var i=new n(this.scene,t);return t.add&&this.scene.sys.displayList.add(i),i}))},13122:(t,e,i)=>{var s=i(33182);i(61286).register("graphics",(function(t){return this.displayList.add(new s(this.scene,t))}))},60898:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(34429),r=i(91543),r=i(91543),t.exports={renderWebGL:n,renderCanvas:r}},34429:(t,e,i)=>{var s=i(36266),n=i(73329),r=i(69360),o=i(75512),a=function(t,e,i){this.x=t,this.y=e,this.width=i},h=function(t,e,i){this.points=[],this.pointsLength=1,this.points[0]=new a(t,e,i)},l=[],u=new r;t.exports=function(t,e,i,r){if(0!==e.commandBuffer.length){i.addToRenderList(e);var c=t.pipelines.set(e.pipeline,e);t.pipelines.preBatch(e);for(var d=n(e,i,r).calc,p=u.loadIdentity(),f=e.commandBuffer,v=i.alpha*e.alpha,g=1,m=c.fillTint,y=c.strokeTint,x=0,T=0,w=0,b=2*Math.PI,S=[],E=0,A=!0,_=null,C=o.getTintAppendFloatAlpha,M=0;M0&&(X=X%b-b):X>b?X=b:X<0&&(X=b+X%b),null===_&&(_=new h(B+Math.cos(U)*Y,N+Math.sin(U)*Y,g),S.push(_),I+=.01);I<1+G;)w=X*I+U,x=B+Math.cos(w)*Y,T=N+Math.sin(w)*Y,_.points.push(new a(x,T,g)),I+=.01;w=X+U,x=B+Math.cos(w)*Y,T=N+Math.sin(w)*Y,_.points.push(new a(x,T,g));break;case s.FILL_RECT:c.batchFillRect(f[++M],f[++M],f[++M],f[++M],p,d);break;case s.FILL_TRIANGLE:c.batchFillTriangle(f[++M],f[++M],f[++M],f[++M],f[++M],f[++M],p,d);break;case s.STROKE_TRIANGLE:c.batchStrokeTriangle(f[++M],f[++M],f[++M],f[++M],f[++M],f[++M],g,p,d);break;case s.LINE_TO:null!==_?_.points.push(new a(f[++M],f[++M],g)):(_=new h(f[++M],f[++M],g),S.push(_));break;case s.MOVE_TO:_=new h(f[++M],f[++M],g),S.push(_);break;case s.SAVE:l.push(p.copyToArray());break;case s.RESTORE:p.copyFromArray(l.pop());break;case s.TRANSLATE:B=f[++M],N=f[++M],p.translate(B,N);break;case s.SCALE:B=f[++M],N=f[++M],p.scale(B,N);break;case s.ROTATE:p.rotate(f[++M])}t.pipelines.postBatch(e)}}},59192:(t,e,i)=>{var s=i(83979),n=i(56694),r=i(56631),o=i(6659),a=i(71608),h=i(72632),l=i(10850),u=i(19256),c=i(42911),d=i(75757),p=i(58403),f=i(13747),v=new n({Extends:o,initialize:function(t,e,i){o.call(this),i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?c(e[0])&&(i=e,e=null):c(e)&&(i=e,e=null),this.scene=t,this.children=new p,this.isParent=!0,this.type="Group",this.classType=h(i,"classType",f),this.name=h(i,"name",""),this.active=h(i,"active",!0),this.maxSize=h(i,"maxSize",-1),this.defaultKey=h(i,"defaultKey",null),this.defaultFrame=h(i,"defaultFrame",null),this.runChildUpdate=h(i,"runChildUpdate",!1),this.createCallback=h(i,"createCallback",null),this.removeCallback=h(i,"removeCallback",null),this.createMultipleCallback=h(i,"createMultipleCallback",null),this.internalCreateCallback=h(i,"internalCreateCallback",null),this.internalRemoveCallback=h(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i),this.on(r.ADDED_TO_SCENE,this.addedToScene,this),this.on(r.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(t,e,i,s,n,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===s&&(s=this.defaultFrame),void 0===n&&(n=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,s);return o.addToDisplayList(this.scene.sys.displayList),o.addToUpdateList(),o.visible=n,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof n&&(l.x=n),"number"==typeof r&&(l.y=r),l):s?this.create(n,r,o,a,h):null},get:function(t,e,i,s,n){return this.getFirst(!1,!0,t,e,i,s,n)},getFirstAlive:function(t,e,i,s,n,r){return this.getFirst(!0,t,e,i,s,n,r)},getFirstDead:function(t,e,i,s,n,r){return this.getFirst(!1,t,e,i,s,n,r)},playAnimation:function(t,e){return s.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i{var s=i(99325),n=i(59192);s.register("group",(function(t){return new n(this.scene,null,t)}))},62598:(t,e,i)=>{var s=i(59192);i(61286).register("group",(function(t,e){return this.updateList.add(new s(this.scene,t,e))}))},1539:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),o=i(57322),a=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.FX,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.ScrollFactor,n.Size,n.TextureCrop,n.Tint,n.Transform,n.Visible,o],initialize:function(t,e,i,s,n){r.call(this,t,"Image"),this._crop=this.resetCropObject(),this.setTexture(s,n),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()}});t.exports=a},57786:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},83556:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(1539);n.register("image",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),a=new o(this.scene,0,0,i,n);return void 0!==e&&(t.add=e),s(this.scene,a,t),a}))},20927:(t,e,i)=>{var s=i(1539);i(61286).register("image",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},57322:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(59390),r=i(57786),t.exports={renderWebGL:n,renderCanvas:r}},59390:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),this.pipeline.batchSprite(e,i,s)}},48013:(t,e,i)=>{var s={Events:i(56631),DisplayList:i(91713),GameObjectCreator:i(99325),GameObjectFactory:i(61286),UpdateList:i(92034),Components:i(64937),GetCalcMatrix:i(73329),BuildGameObject:i(88933),BuildGameObjectAnimation:i(32291),GameObject:i(89980),BitmapText:i(44616),Blitter:i(52816),Bob:i(41664),Container:i(70339),DOMElement:i(38943),DynamicBitmapText:i(13468),Extern:i(39419),Graphics:i(33182),Group:i(59192),Image:i(1539),Layer:i(85305),Particles:i(27684),PathFollower:i(29598),RenderTexture:i(15996),RetroFont:i(55873),Rope:i(79968),Sprite:i(13747),Text:i(76555),GetTextSize:i(32979),MeasureText:i(27030),TextStyle:i(74744),TileSprite:i(35856),Zone:i(71030),Video:i(8630),Shape:i(91461),Arc:i(28593),Curve:i(15220),Ellipse:i(28591),Grid:i(39169),IsoBox:i(4415),IsoTriangle:i(65159),Line:i(579),Polygon:i(91249),Rectangle:i(517),Star:i(77843),Triangle:i(21873),Factories:{Blitter:i(38906),Container:i(23400),DOMElement:i(66788),DynamicBitmapText:i(94145),Extern:i(41155),Graphics:i(13122),Group:i(62598),Image:i(20927),Layer:i(17676),Particles:i(30439),PathFollower:i(19626),RenderTexture:i(29599),Rope:i(31982),Sprite:i(66135),StaticBitmapText:i(21797),Text:i(94627),TileSprite:i(20509),Zone:i(34546),Video:i(215),Arc:i(10369),Curve:i(10147),Ellipse:i(99869),Grid:i(9326),IsoBox:i(88154),IsoTriangle:i(67765),Line:i(85665),Polygon:i(88203),Rectangle:i(94355),Star:i(23962),Triangle:i(79296)},Creators:{Blitter:i(68452),Container:i(44516),DynamicBitmapText:i(67513),Graphics:i(41286),Group:i(61295),Image:i(83556),Layer:i(56378),Particles:i(38842),RenderTexture:i(85692),Rope:i(96027),Sprite:i(89219),StaticBitmapText:i(95499),Text:i(75397),TileSprite:i(63950),Zone:i(24067),Video:i(65601)}};s.Shader=i(27902),s.Mesh=i(83321),s.NineSlice=i(44139),s.PointLight=i(13171),s.Factories.Shader=i(51979),s.Factories.Mesh=i(8767),s.Factories.NineSlice=i(53778),s.Factories.PointLight=i(91201),s.Creators.Shader=i(13908),s.Creators.Mesh=i(41839),s.Creators.NineSlice=i(40964),s.Creators.PointLight=i(162),s.Light=i(14455),s.LightsManager=i(26193),s.LightsPlugin=i(50296),t.exports=s},85305:(t,e,i)=>{var s=i(95723),n=i(56694),r=i(64937),o=i(48129),a=i(81078),h=i(6659),l=i(56631),u=i(71207),c=i(58010),d=i(7599),p=i(17922),f=new n({Extends:u,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.Visible,h,c],initialize:function(t,e){u.call(this,t),h.call(this),this.scene=t,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=t.sys,this.events=t.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPipeline(),this.clearAlpha(),this.setBlendMode(s.SKIP_CHECK),e&&this.add(e),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new a(this)),this},setData:function(t,e){return this.data||(this.data=new a(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new a(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new a(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new a(this)),this.data.get(t)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return o(this)},willRender:function(t){return!(15!==this.renderFlags||0===this.list.length||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return i.unshift(this.displayList.getIndex(t)),i},addChildCallback:function(t){t.displayList&&t.displayList!==this&&t.removeFromDisplayList(),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(l.ADDED_TO_SCENE,t,this.scene),this.events.emit(d.ADDED_TO_SCENE,t,this.scene))},removeChildCallback:function(t){this.queueDepthSort(),t.displayList=null,t.emit(l.REMOVED_FROM_SCENE,t,this.scene),this.events.emit(d.REMOVED_FROM_SCENE,t,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(p(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(l.ADDED_TO_SCENE,this,this.scene),t.events.emit(d.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(l.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(d.REMOVED_FROM_SCENE,this,this.scene)),this},destroy:function(t){if(this.scene&&!this.ignoreDestroy){this.emit(l.DESTROY,this);for(var e=this.list;e.length;)e[0].destroy(t);this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});t.exports=f},834:t=>{t.exports=function(t,e,i){var s=e.list;if(0!==s.length){e.depthSort();var n=-1!==e.blendMode;n||t.setBlendMode(0);var r=e._alpha;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var o=0;o{var s=i(88933),n=i(85305),r=i(99325),o=i(20494);r.register("layer",(function(t,e){void 0===t&&(t={});var i=o(t,"children",null),r=new n(this.scene,i);return void 0!==e&&(t.add=e),s(this.scene,r,t),r}))},17676:(t,e,i)=>{var s=i(85305);i(61286).register("layer",(function(t){return this.displayList.add(new s(this.scene,t))}))},58010:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(17576),r=i(834),t.exports={renderWebGL:n,renderCanvas:r}},17576:t=>{t.exports=function(t,e,i){var s=e.list,n=s.length;if(0!==n){e.depthSort(),t.pipelines.preBatch(e);var r=-1!==e.blendMode;r||t.setBlendMode(0);for(var o=e.alpha,a=0;a{var s=i(26673),n=i(56694),r=i(64937),o=i(39298),a=i(75512),h=new n({Extends:s,Mixins:[r.Origin,r.ScrollFactor,r.Transform,r.Visible],initialize:function(t,e,i,n,r,a,h){s.call(this,t,e,i),this.color=new o(n,r,a),this.intensity=h,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(i)},displayWidth:{get:function(){return this.diameter},set:function(t){this.diameter=t}},displayHeight:{get:function(){return this.diameter},set:function(t){this.diameter=t}},width:{get:function(){return this.diameter},set:function(t){this.diameter=t}},height:{get:function(){return this.diameter},set:function(t){this.diameter=t}},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setColor:function(t){var e=a.getFloatsFromUintRGB(t);return this.color.set(e[0],e[1],e[2]),this},setIntensity:function(t){return this.intensity=t,this},setRadius:function(t){return this.radius=t,this}});h.RENDER_MASK=15,t.exports=h},26193:(t,e,i)=>{var s=i(26535),n=i(56694),r=i(53996),o=i(14455),a=i(13171),h=i(39298),l=i(72677),u=i(17922),c=i(75512),d=new n({initialize:function(){this.lights=[],this.ambientColor=new h(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(t,e,i,s,n,r){return this.systems.displayList.add(new a(this.scene,t,e,i,s,n,r))},enable:function(){return-1===this.maxLights&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(t){for(var e=this.lights,i=t.worldView,n=[],o=0;othis.maxLights&&(u(n,this.sortByDistance),n=n.slice(0,this.maxLights)),this.visibleLights=n.length,n},sortByDistance:function(t,e){return t.distance>=e.distance},setAmbientColor:function(t){var e=c.getFloatsFromUintRGB(t);return this.ambientColor.set(e[0],e[1],e[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(t,e,i,s,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=128),void 0===s&&(s=16777215),void 0===n&&(n=1);var r=c.getFloatsFromUintRGB(s),a=new o(t,e,i,r[0],r[1],r[2],n);return this.lights.push(a),a},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&l(this.lights,e),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=d},50296:(t,e,i)=>{var s=i(56694),n=i(26193),r=i(91963),o=i(7599),a=new s({Extends:n,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once(o.BOOT,this.boot,this),n.call(this)},boot:function(){var t=this.systems.events;t.on(o.SHUTDOWN,this.shutdown,this),t.on(o.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",a,"lights"),t.exports=a},83321:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(75606),o=i(18693),a=i(89980),h=i(67623),l=i(53267),u=i(73329),c=i(16650),d=i(23464),p=i(17922),f=i(70015),v=i(85769),g=new s({Extends:a,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Mask,n.Pipeline,n.Size,n.Texture,n.Transform,n.Visible,n.ScrollFactor,d],initialize:function(t,e,i,s,n,r,o,h,l,u,d,p){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s="__WHITE"),a.call(this,t,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new f,this.modelScale=new f(1,1,1),this.modelRotation=new f,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new c,this.viewPosition=new f,this.viewMatrix=new c,this.projectionMatrix=new c,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1;var v=t.sys.renderer;this.setPosition(e,i),this.setTexture(s,n),this.setSize(v.width,v.height),this.initPipeline(),this.setPerspective(v.width,v.height),r&&this.addVertices(r,o,h,l,u,d,p)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(t){return this.viewPosition.addScale(f.LEFT,t),this.dirtyCache[10]=1,this},panY:function(t){return this.viewPosition.y+=f.DOWN.y*t,this.dirtyCache[10]=1,this},panZ:function(t){return this.viewPosition.z+=t,this.dirtyCache[10]=1,this},setPerspective:function(t,e,i,s,n){return void 0===i&&(i=45),void 0===s&&(s=.01),void 0===n&&(n=1e3),this.projectionMatrix.perspective(r(i),t/e,s,n),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(t,e,i,s){return void 0===t&&(t=this.scene.sys.renderer.getAspectRatio()),void 0===e&&(e=1),void 0===i&&(i=-1e3),void 0===s&&(s=1e3),this.projectionMatrix.ortho(-t,t,-e,e,i,s),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach((function(t){t.destroy()})),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(t,e,i,s,n,r,o,a,h){var u,c=this.scene.sys.cache.obj.get(t);return c&&(u=l(c,this,e,i,s,n,r,o,a,h)),u&&0!==u.verts.length||console.warn("Mesh.addVerticesFromObj data empty:",t),this},sortByDepth:function(t,e){return t.depth-e.depth},depthSort:function(){return p(this.faces,this.sortByDepth),this},addVertex:function(t,e,i,s,n,r,o){var a=new v(t,e,i,s,n,r,o);return this.vertices.push(a),a},addFace:function(t,e,i){var s=new o(t,e,i);return this.faces.push(s),this.dirtyCache[9]=-1,s},addVertices:function(t,e,i,s,n,r,o){var a=h(t,e,i,s,n,r,o);return a?(this.faces=this.faces.concat(a.faces),this.vertices=this.vertices.concat(a.vertices)):console.warn("Mesh.addVertices data empty or invalid"),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(t){return this.faces[t]},getFaceAt:function(t,e,i){void 0===i&&(i=this.scene.sys.cameras.main);for(var s=u(this,i).calc,n=this.faces,r=[],o=0;o{t.exports=function(){}},41839:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(10850),a=i(83321);n.register("mesh",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),h=o(t,"vertices",[]),l=o(t,"uvs",[]),u=o(t,"indicies",[]),c=o(t,"containsZ",!1),d=o(t,"normals",[]),p=o(t,"colors",16777215),f=o(t,"alphas",1),v=new a(this.scene,0,0,i,n,h,l,u,c,d,p,f);return void 0!==e&&(t.add=e),s(this.scene,v,t),v}))},8767:(t,e,i)=>{var s=i(83321);i(61286).register("mesh",(function(t,e,i,n,r,o,a,h,l,u,c){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h,l,u,c))}))},23464:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(57410),r=i(6317),t.exports={renderWebGL:n,renderCanvas:r}},57410:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){var r=e.faces,o=r.length;if(0!==o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline,e),h=s(e,i,n).calc,l=a.setGameObject(e),u=a.vertexViewF32,c=a.vertexViewU32,d=a.vertexCount*a.currentShader.vertexComponentCount-1,p=e.tintFill,f=[],v=e.debugCallback,g=h.a,m=h.b,y=h.c,x=h.d,T=h.e,w=h.f,b=e.viewPosition.z,S=e.hideCCW,E=i.roundPixels,A=i.alpha*e.alpha,_=0;t.pipelines.preBatch(e);for(var C=0;C{var s=i(56694),n=i(64937),r=i(89980),o=i(94456),a=i(85769),h=new s({Extends:r,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.FX,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.ScrollFactor,n.Texture,n.Transform,n.Visible,o],initialize:function(t,e,i,s,n,o,h,l,u,c,d){void 0===o&&(o=256),void 0===h&&(h=256),void 0===l&&(l=10),void 0===u&&(u=10),void 0===c&&(c=0),void 0===d&&(d=0),r.call(this,t,"NineSlice"),this._width=o,this._height=h,this._originX=.5,this._originY=.5,this._sizeComponent=!0,this.vertices=[],this.leftWidth=l,this.rightWidth=u,this.topHeight=c,this.bottomHeight=d,this.tint=16777215,this.tintFill=!1,this.is3Slice=0===c&&0===d;for(var p=this.is3Slice?18:54,f=0;f{var s=i(88933),n=i(99325),r=i(20494),o=i(10850),a=i(44139);n.register("nineslice",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),h=o(t,"width",256),l=o(t,"height",256),u=o(t,"leftWidth",10),c=o(t,"rightWidth",10),d=o(t,"topHeight",0),p=o(t,"bottomHeight",0),f=new a(this.scene,0,0,i,n,h,l,u,c,d,p);return void 0!==e&&(t.add=e),s(this.scene,f,t),f}))},53778:(t,e,i)=>{var s=i(44139);i(61286).register("nineslice",(function(t,e,i,n,r,o,a,h,l,u){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h,l,u))}))},94456:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(27420),t.exports={renderWebGL:n,renderCanvas:r}},27420:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){var o=e.vertices,a=o.length;if(0!==a){i.addToRenderList(e);var h=t.pipelines.set(e.pipeline,e),l=s(e,i,r,!1).calc,u=h.setGameObject(e),c=h.vertexViewF32,d=h.vertexViewU32,p=h.vertexCount*h.currentShader.vertexComponentCount-1,f=i.roundPixels,v=e.tintFill,g=i.alpha*e.alpha,m=n.getTintAppendFloatAlpha(e.tint,g);t.pipelines.preBatch(e);var y=h.vertexAvailable(),x=-1;y{var s=i(56694),n=i(61616),r=i(21902),o=i(72632),a=i(1071),h=new s({initialize:function(t,e,i,s){void 0===s&&(s=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=s,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if(this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,null!==t){if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&this.hasBoth(t,"start","end")){this.start=t.start,this.end=t.end;var i=this.has(t,"random");if(i&&(this.onEmit=this.randomRangedValueEmit),this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s,t.easeParams),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else if("object"===e&&this.hasBoth(t,"min","max"))this.start=t.min,this.end=t.max,this.onEmit=this.randomRangedValueEmit;else if("object"===e&&this.has(t,"random")){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this}},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,s){return s},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=n(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var s=t.data[e];return(s.max-s.min)*this.ease(i)+s.min}});t.exports=h},87811:(t,e,i)=>{var s=i(56694),n=i(72632),r=new s({initialize:function(t,e,i,s,r){if("object"==typeof t){var o=t;t=n(o,"x",0),e=n(o,"y",0),i=n(o,"power",0),s=n(o,"epsilon",100),r=n(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=s},update:function(t,e){var i=this.x-t.x,s=this.y-t.y,n=i*i+s*s;if(0!==n){var r=Math.sqrt(n);n{var s=i(56694),n=i(75606),r=new s({initialize:function(t){this.emitter=t,this.frame=null,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>0},resetPosition:function(){this.x=0,this.y=0},fire:function(t,e){var i=this.emitter;if(this.frame=i.getFrame(),!this.frame)throw new Error("Particle has no texture frame");i.emitZone&&i.emitZone.getPoint(this),void 0===t?this.x+=i.x.onEmit(this,"x"):i.x.steps>0?this.x+=t+i.x.onEmit(this,"x"):this.x+=t,void 0===e?this.y+=i.y.onEmit(this,"y"):i.y.steps>0?this.y+=e+i.y.onEmit(this,"y"):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var s=i.speedX.onEmit(this,"speedX"),r=i.speedY?i.speedY.onEmit(this,"speedY"):s;if(i.radial){var o=n(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(o)*Math.abs(s),this.velocityY=Math.sin(o)*Math.abs(r)}else if(i.moveTo){var a=i.moveToX.onEmit(this,"moveToX"),h=i.moveToY?i.moveToY.onEmit(this,"moveToY"):a,l=this.life/1e3;this.velocityX=(a-this.x)/l,this.velocityY=(h-this.y)/l}else this.velocityX=s,this.velocityY=r;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY.onEmit(this,"scaleY"),this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=n(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint")},computeVelocity:function(t,e,i,s){var n=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;n+=t.gravityX*i,r+=t.gravityY*i,o&&(n+=o*i),a&&(r+=a*i),n>h?n=h:n<-h&&(n=-h),r>l?r=l:r<-l&&(r=-l),this.velocityX=n,this.velocityY=r;for(var u=0;ue.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var s=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(s,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,s.bounds&&this.checkBounds(s),s.deathZone&&s.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=s.scaleX.onUpdate(this,"scaleX",r,this.scaleX),this.scaleY=s.scaleY.onUpdate(this,"scaleY",r,this.scaleY),this.angle=s.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=n(this.angle),this.alpha=s.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=s.tint.onUpdate(this,"tint",r,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=r},9216:(t,e,i)=>{var s=i(95723),n=i(56694),r=i(64937),o=i(69361),a=i(54213),h=i(93025),l=i(72632),u=i(72861),c=i(53523),d=i(19256),p=i(14909),f=i(68433),v=i(74118),g=i(17922),m=i(93736),y=i(1071),x=new n({Mixins:[r.BlendMode,r.Mask,r.ScrollFactor,r.Visible],initialize:function(t,e){this.manager=t,this.texture=t.texture,this.frames=[t.defaultFrame],this.defaultFrame=t.defaultFrame,this.configFastMap=["active","blendMode","collideBottom","collideLeft","collideRight","collideTop","deathCallback","deathCallbackScope","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxParticles","maxAliveParticles","name","on","particleBringToTop","particleClass","radial","timeScale","trackVisible","visible"],this.configOpMap=["accelerationX","accelerationY","angle","alpha","bounce","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],this.name="",this.particleClass=p,this.x=new h(e,"x",0,!0),this.y=new h(e,"y",0,!0),this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.accelerationX=new h(e,"accelerationX",0,!0),this.accelerationY=new h(e,"accelerationY",0,!0),this.maxVelocityX=new h(e,"maxVelocityX",1e4,!0),this.maxVelocityY=new h(e,"maxVelocityY",1e4,!0),this.speedX=new h(e,"speedX",0,!0),this.speedY=new h(e,"speedY",0,!0),this.moveTo=!1,this.moveToX=new h(e,"moveToX",null,!0),this.moveToY=new h(e,"moveToY",null,!0),this.bounce=new h(e,"bounce",0,!0),this.scaleX=new h(e,"scaleX",1),this.scaleY=new h(e,"scaleY",1),this.tint=new h(e,"tint",16777215),this.alpha=new h(e,"alpha",1),this.lifespan=new h(e,"lifespan",1e3,!0),this.angle=new h(e,"angle",{min:0,max:360},!0),this.rotate=new h(e,"rotate",0),this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.maxAliveParticles=0,this.quantity=new h(e,"quantity",1,!0),this.delay=new h(e,"delay",0,!0),this.frequency=0,this.on=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZone=null,this.deathZone=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.active=!0,this.visible=!0,this.blendMode=s.NORMAL,this.follow=null,this.followOffset=new m,this.trackVisible=!1,this.currentFrame=0,this.randomFrame=!0,this.frameQuantity=1,this.dead=[],this.alive=[],this._counter=0,this._frameCounter=0,e&&this.fromJSON(e)},fromJSON:function(t){if(!t)return this;var e=0,i="";for(e=0;e0&&this.getParticleCount()>=this.maxParticles||this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,s=i.length,n=0;n0){var u=this.deathCallback,c=this.deathCallbackScope;for(o=h-1;o>=0;o--){var d=a[o];n.splice(d.index,1),r.push(d.particle),u&&u.call(c,d.particle),d.particle.resetPosition()}}if(this.on)if(0===this.frequency)this.emitParticle();else if(this.frequency>0)for(this._counter-=e;this._counter<=0;)this.emitParticle(),this._counter+=this.frequency},depthSortCallback:function(t,e){return t.y-e.y}});t.exports=x},84622:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),o=i(87811),a=i(71207),h=i(9216),l=i(72745),u=new s({Extends:r,Mixins:[n.Depth,n.Mask,n.Pipeline,n.Transform,n.Visible,l],initialize:function(t,e,i,s){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(s=i,i=null),this.setTexture(e,i),this.initPipeline(),this.emitters=new a(this),this.wells=new a(this),s){Array.isArray(s)||(s=[s]);for(var n=0;n0?e.defaultFrame=i[0]:(console.warn("No texture frames were set"),e.defaultFrame=this.defaultFrame),this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},removeEmitter:function(t){return this.emitters.remove(t,!0)},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var s=this.emitters.list,n=0;n{var s=i(69360),n=new s,r=new s,o=new s,a=new s;t.exports=function(t,e,i,s){var h=e.emitters.list,l=h.length;if(0!==l){var u=n.copyFrom(i.matrix),c=r,d=o,p=a;s?(p.loadIdentity(),p.multiply(s),p.translate(e.x,e.y),p.rotate(e.rotation),p.scale(e.scaleX,e.scaleY)):p.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);for(var f=t.currentContext,v=i.roundPixels,g=0;g0&&_.height>0){var C=-A.halfWidth,M=-A.halfHeight;f.globalAlpha=E,f.save(),c.setToContext(f),v&&(C=Math.round(C),M=Math.round(M)),f.imageSmoothingEnabled=!A.source.scaleMode,f.drawImage(A.source.image,_.x,_.y,_.width,_.height,C,M,_.width,_.height),f.restore()}}}f.restore()}}}}},38842:(t,e,i)=>{var s=i(99325),n=i(20494),r=i(72632),o=i(84622);s.register("particles",(function(t,e){void 0===t&&(t={});var i=n(t,"key",null),s=n(t,"frame",null),a=r(t,"emitters",null),h=new o(this.scene,i,s,a);return void 0!==e&&(t.add=e),r(t,"add",!1)?this.displayList.add(h):this.updateList.add(h),h}))},30439:(t,e,i)=>{var s=i(61286),n=i(84622);s.register("particles",(function(t,e,i){return this.displayList.add(new n(this.scene,t,e,i))}))},72745:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(58971),r=i(66545),t.exports={renderWebGL:n,renderCanvas:r}},58971:(t,e,i)=>{var s=i(69360),n=i(75512),r=new s,o=new s,a=new s,h=new s;t.exports=function(t,e,i,s){var l=e.emitters.list,u=l.length;if(0!==u){var c=t.pipelines.set(e.pipeline),d=r,p=o,f=a,v=h;s?(v.loadIdentity(),v.multiply(s),v.translate(e.x,e.y),v.rotate(e.rotation),v.scale(e.scaleX,e.scaleY)):v.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var g=i.roundPixels,m=e.defaultFrame.glTexture,y=n.getTintAppendFloatAlpha,x=c.setGameObject(e,e.defaultFrame);t.pipelines.preBatch(e);for(var T=0;T{t.exports={EmitterOp:i(93025),GravityWell:i(87811),Particle:i(14909),ParticleEmitter:i(9216),ParticleEmitterManager:i(84622),Zones:i(25962)}},69361:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=s},54213:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s,n){void 0===s&&(s=!1),void 0===n&&(n=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=s,this.counter=-1,this.seamless=n,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=s},68433:(t,e,i)=>{var s=i(56694),n=i(93736),r=new s({initialize:function(t){this.source=t,this._tempVec=new n},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},25962:(t,e,i)=>{t.exports={DeathZone:i(69361),EdgeZone:i(54213),RandomZone:i(68433)}},29598:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(13747),o=new s({Extends:r,Mixins:[n.PathFollower],initialize:function(t,e,i,s,n,o){r.call(this,t,i,s,n,o),this.path=e},preUpdate:function(t,e){this.anims.update(t,e),this.pathUpdate(t)}});t.exports=o},19626:(t,e,i)=>{var s=i(61286),n=i(29598);s.register("follower",(function(t,e,i,s,r){var o=new n(this.scene,t,e,i,s,r);return this.displayList.add(o),this.updateList.add(o),o}))},13171:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),o=i(74853),a=i(65641),h=i(71606),l=new s({Extends:r,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Mask,n.Pipeline,n.ScrollFactor,n.Transform,n.Visible,h],initialize:function(t,e,i,s,n,h,l){void 0===s&&(s=16777215),void 0===n&&(n=128),void 0===h&&(h=1),void 0===l&&(l=.1),r.call(this,t,"PointLight"),this.initPipeline(a.POINTLIGHT_PIPELINE),this.setPosition(e,i),this.color=o(s),this.intensity=h,this.attenuation=l,this.width=2*n,this.height=2*n,this._radius=n},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this.width=2*t,this.height=2*t}},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});t.exports=l},162:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(13171);n.register("pointlight",(function(t,e){void 0===t&&(t={});var i=r(t,"color",16777215),n=r(t,"radius",128),a=r(t,"intensity",1),h=r(t,"attenuation",.1),l=new o(this.scene,0,0,i,n,a,h);return void 0!==e&&(t.add=e),s(this.scene,l,t),l}))},91201:(t,e,i)=>{var s=i(61286),n=i(13171);s.register("pointlight",(function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))}))},71606:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(80590),t.exports={renderWebGL:n,renderCanvas:r}},80590:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),o=s(e,i,n).calc,a=e.width,h=e.height,l=-e._radius,u=-e._radius,c=l+a,d=u+h,p=o.getX(0,0),f=o.getY(0,0),v=o.getX(l,u),g=o.getY(l,u),m=o.getX(l,d),y=o.getY(l,d),x=o.getX(c,d),T=o.getY(c,d),w=o.getX(c,u),b=o.getY(c,u);t.pipelines.preBatch(e),r.batchPointLight(e,i,v,g,m,y,x,T,w,b,p,f),t.pipelines.postBatch(e)}},15996:(t,e,i)=>{var s=i(56694),n=i(845),r=i(1539),o=new s({Extends:r,initialize:function(t,e,i,s,o){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=32),void 0===o&&(o=32);var a=new n(t.sys.textures,"",s,o);r.call(this,t,e,i,a),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(t,e){this.width=t,this.height=e,this.texture.setSize(t,e),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this},resize:function(t,e){return this.setSize(t,e),this},saveTexture:function(t){var e=this.texture;return e.key=t,e.manager.addDynamicTexture(e)&&(this._saved=!0),e},fill:function(t,e,i,s,n,r){return this.texture.fill(t,e,i,s,n,r),this},clear:function(){return this.texture.clear(),this},stamp:function(t,e,i,s,n){return this.texture.stamp(t,e,i,s,n),this},erase:function(t,e,i){return this.texture.erase(t,e,i),this},draw:function(t,e,i,s,n){return this.texture.draw(t,e,i,s,n),this},drawFrame:function(t,e,i,s,n,r){return this.texture.drawFrame(t,e,i,s,n,r),this},repeat:function(t,e,i,s,n,r,o,a,h){return this.texture.repeat(t,e,i,s,n,r,o,a,h),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(t,e,i,s,n){return this.texture.batchDraw(t,e,i,s,n),this},batchDrawFrame:function(t,e,i,s,n,r){return this.texture.batchDrawFrame(t,e,i,s,n,r),this},endDraw:function(t){return this.texture.endDraw(t),this},snapshotArea:function(t,e,i,s,n,r,o){return this.texture.snapshotArea(t,e,i,s,n,r,o),this},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.width,this.height,t,e,i)},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i,"pixel")},preDestroy:function(){this._saved||this.texture.destroy()}});t.exports=o},85692:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(15996);n.register("renderTexture",(function(t,e){void 0===t&&(t={});var i=r(t,"x",0),n=r(t,"y",0),a=r(t,"width",32),h=r(t,"height",32),l=new o(this.scene,i,n,a,h);return void 0!==e&&(t.add=e),s(this.scene,l,t),l}))},29599:(t,e,i)=>{var s=i(61286),n=i(15996);s.register("renderTexture",(function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))}))},79968:(t,e,i)=>{var s=i(16569),n=i(56694),r=i(64937),o=i(89980),a=i(65641),h=i(58912),l=i(93736),u=new n({Extends:o,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Flip,r.Mask,r.Pipeline,r.Size,r.Texture,r.Transform,r.Visible,r.ScrollFactor,h],initialize:function(t,e,i,n,r,h,u,c,d){void 0===n&&(n="__DEFAULT"),void 0===h&&(h=2),void 0===u&&(u=!0),o.call(this,t,"Rope"),this.anims=new s(this),this.points=h,this.vertices,this.uv,this.colors,this.alphas,this.tintFill="__DEFAULT"===n,this.dirty=!1,this.horizontal=u,this._flipX=!1,this._flipY=!1,this._perp=new l,this.debugCallback=null,this.debugGraphic=null,this.setTexture(n,r),this.setPosition(e,i),this.setSizeToFrame(),this.initPipeline(a.ROPE_PIPELINE),Array.isArray(h)&&this.resizeArrays(h.length),this.setPoints(h,c,d),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){var i=this.anims.currentFrame;this.anims.update(t,e),this.anims.currentFrame!==i&&(this.updateUVs(),this.updateVertices())},play:function(t,e,i){return this.anims.play(t,e,i),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(t,e,i){return void 0===t&&(t=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(t,e,i))},setVertical:function(t,e,i){return void 0===t&&(t=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(t,e,i)):this},setTintFill:function(t){return void 0===t&&(t=!1),this.tintFill=t,this},setAlphas:function(t,e){var i=this.points.length;if(i<1)return this;var s,n=this.alphas;void 0===t?t=[1]:Array.isArray(t)||void 0!==e||(t=[t]);var r=0;if(void 0!==e)for(s=0;sr&&(o=t[r]),n[r]=o,t.length>r+1&&(o=t[r+1]),n[r+1]=o}return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i,s=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var n=0;if(t.length===e)for(i=0;in&&(r=t[n]),s[n]=r,t.length>n+1&&(r=t[n+1]),s[n+1]=r}return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var s,n,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,n=this.frame.width/(o-1),s=0;s{t.exports=function(){}},96027:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(10850),a=i(79968);n.register("rope",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),h=r(t,"horizontal",!0),l=o(t,"points",void 0),u=o(t,"colors",void 0),c=o(t,"alphas",void 0),d=new a(this.scene,0,0,i,n,l,h,u,c);return void 0!==e&&(t.add=e),s(this.scene,d,t),d}))},31982:(t,e,i)=>{var s=i(79968);i(61286).register("rope",(function(t,e,i,n,r,o,a,h){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h))}))},58912:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(49489),r=i(44598),t.exports={renderWebGL:n,renderCanvas:r}},49489:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline,e),a=s(e,i,r).calc,h=e.vertices,l=e.uv,u=e.colors,c=e.alphas,d=e.alpha,p=n.getTintAppendFloatAlpha,f=i.roundPixels,v=h.length,g=Math.floor(.5*v);o.flush(),t.pipelines.preBatch(e);var m=o.setGameObject(e),y=o.vertexViewF32,x=o.vertexViewU32,T=o.vertexCount*o.currentShader.vertexComponentCount-1,w=0,b=e.tintFill;e.dirty&&e.updateVertices();for(var S=e.debugCallback,E=[],A=0;A{var s=i(56694),n=i(64937),r=i(89980),o=i(72632),a=i(98611),h=i(22440),l=i(24252),u=i(69360),c=new s({Extends:r,Mixins:[n.ComputedSize,n.Depth,n.GetBounds,n.Mask,n.Origin,n.ScrollFactor,n.Transform,n.Visible,l],initialize:function(t,e,i,s,n,o,a,h){void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=128),void 0===o&&(o=128),r.call(this,t,"Shader"),this.blendMode=-1,this.shader;var l=t.sys.renderer;this.renderer=l,this.gl=l.gl,this.vertexData=new ArrayBuffer(2*Float32Array.BYTES_PER_ELEMENT*6),this.vertexBuffer=l.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new u,this._tempMatrix2=new u,this._tempMatrix3=new u,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=l.width,this._rendererHeight=l.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(i,s),this.setSize(n,o),this.setOrigin(.5,.5),this.setShader(e,a,h)},willRender:function(t){return!!this.renderToTexture||!(r.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setRenderToTexture:function(t,e){if(void 0===e&&(e=!1),!this.renderToTexture){var i=this.width,s=this.height,n=this.renderer;this.glTexture=n.createTextureFromSource(null,i,s,0),this.glTexture.flipY=e,this.framebuffer=n.createFramebuffer(i,s,this.glTexture,!1),this._rendererWidth=i,this._rendererHeight=s,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),t&&(this.texture=this.scene.sys.textures.addGLTexture(t,this.glTexture,i,s))}return this.shader&&(n.pipelines.clear(),this.load(),this.flush(),n.pipelines.rebind()),this},setShader:function(t,e,i){if(void 0===e&&(e=[]),"string"==typeof t){var s=this.scene.sys.cache.shader;if(!s.has(t))return console.warn("Shader missing: "+t),this;this.shader=s.get(t)}else this.shader=t;var n=this.gl,r=this.renderer;this.program&&n.deleteProgram(this.program);var o=r.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);n.uniformMatrix4fv(n.getUniformLocation(o,"uViewMatrix"),!1,this.viewMatrix),n.uniformMatrix4fv(n.getUniformLocation(o,"uProjectionMatrix"),!1,this.projectionMatrix),n.uniform2f(n.getUniformLocation(o,"uResolution"),this.width,this.height),this.program=o;var h=new Date,l={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[h.getFullYear(),h.getMonth(),h.getDate(),60*h.getHours()*60+60*h.getMinutes()+h.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=a(!0,{},this.shader.uniforms,l):this.uniforms=l;for(var u=0;u<4;u++)e[u]&&this.setSampler2D("iChannel"+u,e[u],u,i);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(t){return this.pointer=t,this},projOrtho:function(t,e,i,s){var n=1/(t-e),r=1/(i-s),o=this.projectionMatrix;o[0]=-2*n,o[5]=-2*r,o[10]=-.001,o[12]=(t+e)*n,o[13]=(s+i)*r,o[14]=-0;var a=this.program,h=this.gl;this.renderer.setProgram(a),h.uniformMatrix4fv(h.getUniformLocation(a,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=e,this._rendererHeight=i},initUniforms:function(){var t=this.gl,e=this.renderer.glFuncMap,i=this.program;for(var s in this._textureCount=0,this.uniforms){var n=this.uniforms[s],r=n.type,o=e[r];n.uniformLocation=t.getUniformLocation(i,s),"sampler2D"!==r&&(n.glMatrix=o.matrix,n.glValueLength=o.length,n.glFunc=o.func)}},setSampler2DBuffer:function(t,e,i,s,n,r){void 0===n&&(n=0),void 0===r&&(r={});var o=this.uniforms[t];return o.value=e,r.width=i,r.height=s,o.textureData=r,this._textureCount=n,this.initSampler2D(o),this},setSampler2D:function(t,e,i,s){void 0===i&&(i=0);var n=this.scene.sys.textures;if(n.exists(e)){var r=n.getFrame(e);if(r.glTexture&&r.glTexture.isRenderTexture)return this.setSampler2DBuffer(t,r.glTexture,r.width,r.height,i,s);var o=this.uniforms[t],a=r.source;o.textureKey=e,o.source=a.image,o.value=r.glTexture,a.isGLTexture&&(s||(s={}),s.width=a.width,s.height=a.height),s&&(o.textureData=s),this._textureCount=i,this.initSampler2D(o)}return this},setUniform:function(t,e){return h(this.uniforms,t,e),this},getUniform:function(t){return o(this.uniforms,t,null)},setChannel0:function(t,e){return this.setSampler2D("iChannel0",t,0,e)},setChannel1:function(t,e){return this.setSampler2D("iChannel1",t,1,e)},setChannel2:function(t,e){return this.setSampler2D("iChannel2",t,2,e)},setChannel3:function(t,e){return this.setSampler2D("iChannel3",t,3,e)},initSampler2D:function(t){if(t.value){var e=this.gl;e.activeTexture(e.TEXTURE0+this._textureCount),e.bindTexture(e.TEXTURE_2D,t.value);var i=t.textureData;if(i&&!t.value.isRenderTexture){var s=e[o(i,"magFilter","linear").toUpperCase()],n=e[o(i,"minFilter","linear").toUpperCase()],r=e[o(i,"wrapS","repeat").toUpperCase()],a=e[o(i,"wrapT","repeat").toUpperCase()],h=e[o(i,"format","rgba").toUpperCase()];if(i.repeat&&(r=e.REPEAT,a=e.REPEAT),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!!i.flipY),i.width){var l=o(i,"width",512),u=o(i,"height",2),c=o(i,"border",0);e.texImage2D(e.TEXTURE_2D,0,h,l,u,c,h,e.UNSIGNED_BYTE,null)}else e.texImage2D(e.TEXTURE_2D,0,h,e.RGBA,e.UNSIGNED_BYTE,t.source);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,s),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,a)}this.renderer.setProgram(this.program),e.uniform1i(t.uniformLocation,this._textureCount),this._textureCount++}},syncUniforms:function(){var t,e,i,s,n,r=this.gl,o=this.uniforms,a=0;for(var h in o)i=(t=o[h]).glFunc,e=t.glValueLength,s=t.uniformLocation,null!==(n=t.value)&&(1===e?t.glMatrix?i.call(r,s,t.transpose,n):i.call(r,s,n):2===e?i.call(r,s,n.x,n.y):3===e?i.call(r,s,n.x,n.y,n.z):4===e?i.call(r,s,n.x,n.y,n.z,n.w):"sampler2D"===t.type&&(r.activeTexture(r.TEXTURE0+a),r.bindTexture(r.TEXTURE_2D,n),r.uniform1i(s,a),a++))},load:function(t){var e=this.gl,i=this.width,s=this.height,n=this.renderer,r=this.program,o=this.viewMatrix;if(!this.renderToTexture){var a=-this._displayOriginX,h=-this._displayOriginY;o[0]=t[0],o[1]=t[1],o[4]=t[2],o[5]=t[3],o[8]=t[4],o[9]=t[5],o[12]=o[0]*a+o[4]*h,o[13]=o[1]*a+o[5]*h}e.useProgram(r),e.uniformMatrix4fv(e.getUniformLocation(r,"uViewMatrix"),!1,o),e.uniform2f(e.getUniformLocation(r,"uResolution"),this.width,this.height);var l=this.uniforms,u=l.resolution;u.value.x=i,u.value.y=s,l.time.value=n.game.loop.getDuration();var c=this.pointer;if(c){var d=l.mouse,p=c.x/i,f=1-c.y/s;d.value.x=p.toFixed(2),d.value.y=f.toFixed(2)}this.syncUniforms()},flush:function(){var t=this.width,e=this.height,i=this.program,s=this.gl,n=this.vertexBuffer,r=this.renderer,o=2*Float32Array.BYTES_PER_ELEMENT;this.renderToTexture&&(r.setFramebuffer(this.framebuffer),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT)),s.bindBuffer(s.ARRAY_BUFFER,n);var a=s.getAttribLocation(i,"inPosition");-1!==a&&(s.enableVertexAttribArray(a),s.vertexAttribPointer(a,2,s.FLOAT,!1,o,0));var h=this.vertexViewF32;h[3]=e,h[4]=t,h[5]=e,h[8]=t,h[9]=e,h[10]=t;s.bufferSubData(s.ARRAY_BUFFER,0,this.bytes.subarray(0,6*o)),s.drawArrays(s.TRIANGLES,0,6),this.renderToTexture&&r.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},preDestroy:function(){var t=this.gl;t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(this.renderer.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null)}});t.exports=c},10612:t=>{t.exports=function(){}},13908:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(27902);n.register("shader",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"x",0),a=r(t,"y",0),h=r(t,"width",128),l=r(t,"height",128),u=new o(this.scene,i,n,a,h,l);return void 0!==e&&(t.add=e),s(this.scene,u,t),u}))},51979:(t,e,i)=>{var s=i(27902);i(61286).register("shader",(function(t,e,i,n,r,o,a){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a))}))},24252:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(19782),r=i(10612),t.exports={renderWebGL:n,renderCanvas:r}},19782:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){if(e.shader){if(i.addToRenderList(e),t.pipelines.clear(),e.renderToTexture)e.load(),e.flush();else{var r=s(e,i,n).calc;t.width===e._rendererWidth&&t.height===e._rendererHeight||e.projOrtho(0,t.width,t.height,0),e.load(r.matrix),e.flush()}t.pipelines.rebind()}}},19543:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n,r,o){for(var a=s.getTintAppendFloatAlpha(i.fillColor,i.fillAlpha*n),h=i.pathData,l=i.pathIndexes,u=0;u{t.exports=function(t,e,i,s){var n=i||e.fillColor,r=s||e.fillAlpha,o=(16711680&n)>>>16,a=(65280&n)>>>8,h=255&n;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},17876:t=>{t.exports=function(t,e,i,s){var n=i||e.strokeColor,r=s||e.strokeAlpha,o=(16711680&n)>>>16,a=(65280&n)>>>8,h=255&n;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},91461:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),o=i(88829),a=new s({Extends:r,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.GetBounds,n.FX,n.Mask,n.Origin,n.Pipeline,n.ScrollFactor,n.Transform,n.Visible],initialize:function(t,e,i){void 0===e&&(e="Shape"),r.call(this,t,e),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new o,this.width=0,this.height=0,this.initPipeline()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.isFilled=!1:(this.fillColor=t,this.fillAlpha=e,this.isFilled=!0),this},setStrokeStyle:function(t,e,i){return void 0===i&&(i=1),void 0===t?this.isStroked=!1:(this.lineWidth=t,this.strokeColor=e,this.strokeAlpha=i,this.isStroked=!0),this},setClosePath:function(t){return this.closePath=t,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}}});t.exports=a},50262:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n,r){var o=t.strokeTint,a=s.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*i);o.TL=a,o.TR=a,o.BL=a,o.BR=a;var h=e.pathData,l=h.length-1,u=e.lineWidth,c=u/2,d=h[0]-n,p=h[1]-r;e.closePath||(l-=2);for(var f=2;f{var s=i(2213),n=i(56694),r=i(75606),o=i(11117),a=i(26673),h=i(83392),l=i(91461),u=new n({Extends:l,Mixins:[s],initialize:function(t,e,i,s,n,r,o,h,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===n&&(n=0),void 0===r&&(r=360),void 0===o&&(o=!1),l.call(this,t,"Arc",new a(0,0,s)),this._startAngle=n,this._endAngle=r,this._anticlockwise=o,this._iterations=.01,this.setPosition(e,i);var c=2*this.geom.radius;this.setSize(c,c),void 0!==h&&this.setFillStyle(h,u),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(t){this._iterations=t,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(t){this.geom.radius=t;var e=2*t;this.setSize(e,e),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(t){this._startAngle=t,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(t){this._endAngle=t,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(t){this._anticlockwise=t,this.updateData()}},setRadius:function(t){return this.radius=t,this},setIterations:function(t){return void 0===t&&(t=.01),this.iterations=t,this},setStartAngle:function(t,e){return this._startAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},setEndAngle:function(t,e){return this._endAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},updateData:function(){var t=this._iterations,e=t,i=this.geom.radius,s=r(this._startAngle),n=r(this._endAngle),a=i,l=i;n-=s,this._anticlockwise?n<-h.PI2?n=-h.PI2:n>0&&(n=-h.PI2+n%h.PI2):n>h.PI2?n=h.PI2:n<0&&(n=h.PI2+n%h.PI2);for(var u,c=[a+Math.cos(s)*i,l+Math.sin(s)*i];e<1;)u=n*e+s,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),e+=t;return u=n+s,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),c.push(a+Math.cos(s)*i,l+Math.sin(s)*i),this.pathIndexes=o(c),this.pathData=c,this}});t.exports=u},23560:(t,e,i)=>{var s=i(75606),n=i(15608),r=i(17876),o=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var h=t.currentContext;if(o(t,h,e,i,a)){var l=e.radius;h.beginPath(),h.arc(l-e.originX*(2*l),l-e.originY*(2*l),l,s(e._startAngle),s(e._endAngle),e.anticlockwise),e.closePath&&h.closePath(),e.isFilled&&(n(h,e),h.fill()),e.isStroked&&(r(h,e),h.stroke()),h.restore()}}},10369:(t,e,i)=>{var s=i(28593),n=i(61286);n.register("arc",(function(t,e,i,n,r,o,a,h){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h))})),n.register("circle",(function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,0,360,!1,n,r))}))},2213:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(58356),r=i(23560),t.exports={renderWebGL:n,renderCanvas:r}},58356:(t,e,i)=>{var s=i(73329),n=i(19543),r=i(50262);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=s(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&n(a,l,e,d,u,c),e.isStroked&&r(a,e,d,u,c),t.pipelines.postBatch(e)}},15220:(t,e,i)=>{var s=i(56694),n=i(87203),r=i(11117),o=i(74118),a=i(91461),h=new s({Extends:a,Mixins:[n],initialize:function(t,e,i,s,n,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",s),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==n&&this.setFillStyle(n,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],s=this.geom.getPoints(e),n=0;n{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX+e._curveBounds.x,l=e._displayOriginY+e._curveBounds.y,u=e.pathData,c=u.length-1,d=u[0]-h,p=u[1]-l;a.beginPath(),a.moveTo(d,p),e.closePath||(c-=2);for(var f=2;f{var s=i(61286),n=i(15220);s.register("curve",(function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))}))},87203:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(82958),r=i(4024),t.exports={renderWebGL:n,renderCanvas:r}},82958:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=n(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX+e._curveBounds.x,c=e._displayOriginY+e._curveBounds.y,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(a,l,e,d,u,c),e.isStroked&&r(a,e,d,u,c),t.pipelines.postBatch(e)}},28591:(t,e,i)=>{var s=i(56694),n=i(11117),r=i(84171),o=i(95669),a=i(91461),h=new s({Extends:a,Mixins:[r],initialize:function(t,e,i,s,n,r,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===n&&(n=128),a.call(this,t,"Ellipse",new o(s/2,n/2,s,n)),this._smoothness=64,this.setPosition(e,i),this.width=s,this.height=n,void 0!==r&&this.setFillStyle(r,h),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSize:function(t,e){return this.width=t,this.height=e,this.geom.setPosition(t/2,e/2),this.geom.setSize(t,e),this.updateData()},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){for(var t=[],e=this.geom.getPoints(this._smoothness),i=0;i{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,p=u[1]-l;a.beginPath(),a.moveTo(d,p),e.closePath||(c-=2);for(var f=2;f{var s=i(28591);i(61286).register("ellipse",(function(t,e,i,n,r,o){return this.displayList.add(new s(this.scene,t,e,i,n,r,o))}))},84171:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(17554),r=i(55881),t.exports={renderWebGL:n,renderCanvas:r}},17554:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=n(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(a,l,e,d,u,c),e.isStroked&&r(a,e,d,u,c),t.pipelines.postBatch(e)}},39169:(t,e,i)=>{var s=i(56694),n=i(91461),r=i(88059),o=new s({Extends:n,Mixins:[r],initialize:function(t,e,i,s,r,o,a,h,l,u,c){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===r&&(r=128),void 0===o&&(o=32),void 0===a&&(a=32),n.call(this,t,"Grid",null),this.cellWidth=o,this.cellHeight=a,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(e,i),this.setSize(s,r),this.setFillStyle(h,l),void 0!==u&&this.setOutlineStyle(u,c),this.updateDisplayOrigin()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showCells=!1:(this.fillColor=t,this.fillAlpha=e,this.showCells=!0),this},setAltFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showAltCells=!1:(this.altFillColor=t,this.altFillAlpha=e,this.showAltCells=!0),this},setOutlineStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showOutline=!1:(this.outlineFillColor=t,this.outlineFillAlpha=e,this.showOutline=!0),this}});t.exports=o},95525:(t,e,i)=>{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=-e._displayOriginX,l=-e._displayOriginY,u=i.alpha*e.alpha,c=e.width,d=e.height,p=e.cellWidth,f=e.cellHeight,v=Math.ceil(c/p),g=Math.ceil(d/f),m=p,y=f,x=p-(v*p-c),T=f-(g*f-d),w=e.showCells,b=e.showAltCells,S=e.showOutline,E=0,A=0,_=0,C=0,M=0;if(S&&(m--,y--,x===p&&x--,T===f&&T--),w&&e.fillAlpha>0)for(s(a,e),A=0;A0)for(s(a,e,e.altFillColor,e.altFillAlpha*u),A=0;A0){for(n(a,e,e.outlineFillColor,e.outlineFillAlpha*u),E=1;E{var s=i(61286),n=i(39169);s.register("grid",(function(t,e,i,s,r,o,a,h,l,u){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h,l,u))}))},88059:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(50639),r=i(95525),t.exports={renderWebGL:n,renderCanvas:r}},50639:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),a=s(e,i,r);o.calcMatrix.copyFrom(a.calc).translate(-e._displayOriginX,-e._displayOriginY);var h,l,u=i.alpha*e.alpha,c=e.width,d=e.height,p=e.cellWidth,f=e.cellHeight,v=Math.ceil(c/p),g=Math.ceil(d/f),m=p,y=f,x=p-(v*p-c),T=f-(g*f-d),w=e.showCells,b=e.showAltCells,S=e.showOutline,E=0,A=0,_=0,C=0,M=0;if(S&&(m--,y--,x===p&&x--,T===f&&T--),t.pipelines.preBatch(e),w&&e.fillAlpha>0)for(h=o.fillTint,l=n.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*u),h.TL=l,h.TR=l,h.BL=l,h.BR=l,A=0;A0)for(h=o.fillTint,l=n.getTintAppendFloatAlpha(e.altFillColor,e.altFillAlpha*u),h.TL=l,h.TR=l,h.BL=l,h.BR=l,A=0;A0){var R=o.strokeTint,P=n.getTintAppendFloatAlpha(e.outlineFillColor,e.outlineFillAlpha*u);for(R.TL=P,R.TR=P,R.BL=P,R.BR=P,E=1;E{var s=i(72296),n=i(56694),r=i(91461),o=new n({Extends:r,Mixins:[s],initialize:function(t,e,i,s,n,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=48),void 0===n&&(n=32),void 0===o&&(o=15658734),void 0===a&&(a=10066329),void 0===h&&(h=13421772),r.call(this,t,"IsoBox",null),this.projection=4,this.fillTop=o,this.fillLeft=a,this.fillRight=h,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(e,i),this.setSize(s,n),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=o},32884:(t,e,i)=>{var s=i(15608),n=i(49584);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.currentContext;if(n(t,o,e,i,r)&&e.isFilled){var a=e.width,h=e.height,l=a/2,u=a/e.projection;e.showTop&&(s(o,e,e.fillTop),o.beginPath(),o.moveTo(-l,-h),o.lineTo(0,-u-h),o.lineTo(l,-h),o.lineTo(l,-1),o.lineTo(0,u-1),o.lineTo(-l,-1),o.lineTo(-l,-h),o.fill()),e.showLeft&&(s(o,e,e.fillLeft),o.beginPath(),o.moveTo(-l,0),o.lineTo(0,u),o.lineTo(0,u-h),o.lineTo(-l,-h),o.lineTo(-l,0),o.fill()),e.showRight&&(s(o,e,e.fillRight),o.beginPath(),o.moveTo(l,0),o.lineTo(0,u),o.lineTo(0,u-h),o.lineTo(l,-h),o.lineTo(l,0),o.fill()),o.restore()}}},88154:(t,e,i)=>{var s=i(61286),n=i(4415);s.register("isobox",(function(t,e,i,s,r,o,a){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a))}))},72296:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(33101),r=i(32884),t.exports={renderWebGL:n,renderCanvas:r}},33101:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var o,a,h,l,u,c,d,p,f,v=t.pipelines.set(e.pipeline),g=s(e,i,r),m=v.calcMatrix.copyFrom(g.calc),y=e.width,x=e.height,T=y/2,w=y/e.projection,b=i.alpha*e.alpha;e.isFilled&&(t.pipelines.preBatch(e),e.showTop&&(o=n.getTintAppendFloatAlpha(e.fillTop,b),a=m.getX(-T,-x),h=m.getY(-T,-x),l=m.getX(0,-w-x),u=m.getY(0,-w-x),c=m.getX(T,-x),d=m.getY(T,-x),p=m.getX(0,w-x),f=m.getY(0,w-x),v.batchQuad(e,a,h,l,u,c,d,p,f,0,0,1,1,o,o,o,o,2)),e.showLeft&&(o=n.getTintAppendFloatAlpha(e.fillLeft,b),a=m.getX(-T,0),h=m.getY(-T,0),l=m.getX(0,w),u=m.getY(0,w),c=m.getX(0,w-x),d=m.getY(0,w-x),p=m.getX(-T,-x),f=m.getY(-T,-x),v.batchQuad(e,a,h,l,u,c,d,p,f,0,0,1,1,o,o,o,o,2)),e.showRight&&(o=n.getTintAppendFloatAlpha(e.fillRight,b),a=m.getX(T,0),h=m.getY(T,0),l=m.getX(0,w),u=m.getY(0,w),c=m.getX(0,w-x),d=m.getY(0,w-x),p=m.getX(T,-x),f=m.getY(T,-x),v.batchQuad(e,a,h,l,u,c,d,p,f,0,0,1,1,o,o,o,o,2)),t.pipelines.postBatch(e))}},65159:(t,e,i)=>{var s=i(56694),n=i(93387),r=i(91461),o=new s({Extends:r,Mixins:[n],initialize:function(t,e,i,s,n,o,a,h,l){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=48),void 0===n&&(n=32),void 0===o&&(o=!1),void 0===a&&(a=15658734),void 0===h&&(h=10066329),void 0===l&&(l=13421772),r.call(this,t,"IsoTriangle",null),this.projection=4,this.fillTop=a,this.fillLeft=h,this.fillRight=l,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=o,this.isFilled=!0,this.setPosition(e,i),this.setSize(s,n),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setReversed:function(t){return this.isReversed=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=o},9923:(t,e,i)=>{var s=i(15608),n=i(49584);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.currentContext;if(n(t,o,e,i,r)&&e.isFilled){var a=e.width,h=e.height,l=a/2,u=a/e.projection,c=e.isReversed;e.showTop&&c&&(s(o,e,e.fillTop),o.beginPath(),o.moveTo(-l,-h),o.lineTo(0,-u-h),o.lineTo(l,-h),o.lineTo(0,u-h),o.fill()),e.showLeft&&(s(o,e,e.fillLeft),o.beginPath(),c?(o.moveTo(-l,-h),o.lineTo(0,u),o.lineTo(0,u-h)):(o.moveTo(-l,0),o.lineTo(0,u),o.lineTo(0,u-h)),o.fill()),e.showRight&&(s(o,e,e.fillRight),o.beginPath(),c?(o.moveTo(l,-h),o.lineTo(0,u),o.lineTo(0,u-h)):(o.moveTo(l,0),o.lineTo(0,u),o.lineTo(0,u-h)),o.fill()),o.restore()}}},67765:(t,e,i)=>{var s=i(61286),n=i(65159);s.register("isotriangle",(function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))}))},93387:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(54946),r=i(9923),t.exports={renderWebGL:n,renderCanvas:r}},54946:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),a=s(e,i,r),h=o.calcMatrix.copyFrom(a.calc),l=e.width,u=e.height,c=l/2,d=l/e.projection,p=e.isReversed,f=i.alpha*e.alpha;if(e.isFilled){var v,g,m,y,x,T,w;if(t.pipelines.preBatch(e),e.showTop&&p){v=n.getTintAppendFloatAlpha(e.fillTop,f),g=h.getX(-c,-u),m=h.getY(-c,-u),y=h.getX(0,-d-u),x=h.getY(0,-d-u),T=h.getX(c,-u),w=h.getY(c,-u);var b=h.getX(0,d-u),S=h.getY(0,d-u);o.batchQuad(e,g,m,y,x,T,w,b,S,0,0,1,1,v,v,v,v,2)}e.showLeft&&(v=n.getTintAppendFloatAlpha(e.fillLeft,f),p?(g=h.getX(-c,-u),m=h.getY(-c,-u),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)):(g=h.getX(-c,0),m=h.getY(-c,0),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)),o.batchTri(e,g,m,y,x,T,w,0,0,1,1,v,v,v,2)),e.showRight&&(v=n.getTintAppendFloatAlpha(e.fillRight,f),p?(g=h.getX(c,-u),m=h.getY(c,-u),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)):(g=h.getX(c,0),m=h.getY(c,0),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)),o.batchTri(e,g,m,y,x,T,w,0,0,1,1,v,v,v,2)),t.pipelines.postBatch(e)}}},579:(t,e,i)=>{var s=i(56694),n=i(91461),r=i(88829),o=i(52660),a=new s({Extends:n,Mixins:[o],initialize:function(t,e,i,s,o,a,h,l,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===o&&(o=0),void 0===a&&(a=128),void 0===h&&(h=0),n.call(this,t,"Line",new r(s,o,a,h));var c=Math.max(1,this.geom.right-this.geom.left),d=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(e,i),this.setSize(c,d),void 0!==l&&this.setStrokeStyle(1,l,u),this.updateDisplayOrigin()},setLineWidth:function(t,e){return void 0===e&&(e=t),this._startWidth=t,this._endWidth=e,this.lineWidth=t,this},setTo:function(t,e,i,s){return this.geom.setTo(t,e,i,s),this}});t.exports=a},52044:(t,e,i)=>{var s=i(17876),n=i(49584);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.currentContext;if(n(t,o,e,i,r)){var a=e._displayOriginX,h=e._displayOriginY;e.isStroked&&(s(o,e),o.beginPath(),o.moveTo(e.geom.x1-a,e.geom.y1-h),o.lineTo(e.geom.x2-a,e.geom.y2-h),o.stroke()),o.restore()}}},85665:(t,e,i)=>{var s=i(61286),n=i(579);s.register("line",(function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))}))},52660:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(46952),r=i(52044),t.exports={renderWebGL:n,renderCanvas:r}},46952:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),a=s(e,i,r);o.calcMatrix.copyFrom(a.calc);var h=e._displayOriginX,l=e._displayOriginY,u=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isStroked){var c=o.strokeTint,d=n.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*u);c.TL=d,c.TR=d,c.BL=d,c.BR=d;var p=e._startWidth,f=e._endWidth;o.batchLine(e.geom.x1-h,e.geom.y1-l,e.geom.x2-h,e.geom.y2-l,p,f,1,0,!1,a.sprite,a.camera)}t.pipelines.postBatch(e)}},91249:(t,e,i)=>{var s=i(70573),n=i(56694),r=i(11117),o=i(14045),a=i(8580),h=i(91461),l=i(18974),u=new n({Extends:h,Mixins:[s],initialize:function(t,e,i,s,n,r){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Polygon",new a(s));var l=o(this.geom);this.setPosition(e,i),this.setSize(l.width,l.height),void 0!==n&&this.setFillStyle(n,r),this.updateDisplayOrigin(),this.updateData()},smooth:function(t){void 0===t&&(t=1);for(var e=0;e{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,p=u[1]-l;a.beginPath(),a.moveTo(d,p),e.closePath||(c-=2);for(var f=2;f{var s=i(61286),n=i(91249);s.register("polygon",(function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))}))},70573:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(72841),r=i(40834),t.exports={renderWebGL:n,renderCanvas:r}},72841:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=n(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(a,l,e,d,u,c),e.isStroked&&r(a,e,d,u,c),t.pipelines.postBatch(e)}},517:(t,e,i)=>{var s=i(56694),n=i(74118),r=i(91461),o=i(37673),a=new s({Extends:r,Mixins:[o],initialize:function(t,e,i,s,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===o&&(o=128),r.call(this,t,"Rectangle",new n(0,0,s,o)),this.setPosition(e,i),this.setSize(s,o),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setSize:function(t,e){this.width=t,this.height=e,this.geom.setSize(t,e),this.updateData(),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},4091:(t,e,i)=>{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY;e.isFilled&&(s(a,e),a.fillRect(-h,-l,e.width,e.height)),e.isStroked&&(n(a,e),a.beginPath(),a.rect(-h,-l,e.width,e.height),a.stroke()),a.restore()}}},94355:(t,e,i)=>{var s=i(61286),n=i(517);s.register("rectangle",(function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))}))},37673:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(43532),r=i(4091),t.exports={renderWebGL:n,renderCanvas:r}},43532:(t,e,i)=>{var s=i(73329),n=i(50262),r=i(75512);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=s(e,i,o);a.calcMatrix.copyFrom(h.calc);var l=e._displayOriginX,u=e._displayOriginY,c=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isFilled){var d=a.fillTint,p=r.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*c);d.TL=p,d.TR=p,d.BL=p,d.BR=p,a.batchFillRect(-l,-u,e.width,e.height)}e.isStroked&&n(a,e,c,l,u),t.pipelines.postBatch(e)}},77843:(t,e,i)=>{var s=i(87956),n=i(56694),r=i(11117),o=i(91461),a=new n({Extends:o,Mixins:[s],initialize:function(t,e,i,s,n,r,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=5),void 0===n&&(n=32),void 0===r&&(r=64),o.call(this,t,"Star",null),this._points=s,this._innerRadius=n,this._outerRadius=r,this.setPosition(e,i),this.setSize(2*r,2*r),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,s=this._outerRadius,n=Math.PI/2*3,o=Math.PI/e,a=s,h=s;t.push(a,h+-s);for(var l=0;l{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,p=u[1]-l;a.beginPath(),a.moveTo(d,p),e.closePath||(c-=2);for(var f=2;f{var s=i(77843);i(61286).register("star",(function(t,e,i,n,r,o,a){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a))}))},87956:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(12037),r=i(11401),t.exports={renderWebGL:n,renderCanvas:r}},12037:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=n(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(a,l,e,d,u,c),e.isStroked&&r(a,e,d,u,c),t.pipelines.postBatch(e)}},21873:(t,e,i)=>{var s=i(56694),n=i(91461),r=i(66349),o=i(70498),a=new s({Extends:n,Mixins:[o],initialize:function(t,e,i,s,o,a,h,l,u,c,d){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===o&&(o=128),void 0===a&&(a=64),void 0===h&&(h=0),void 0===l&&(l=128),void 0===u&&(u=128),n.call(this,t,"Triangle",new r(s,o,a,h,l,u));var p=this.geom.right-this.geom.left,f=this.geom.bottom-this.geom.top;this.setPosition(e,i),this.setSize(p,f),void 0!==c&&this.setFillStyle(c,d),this.updateDisplayOrigin(),this.updateData()},setTo:function(t,e,i,s,n,r){return this.geom.setTo(t,e,i,s,n,r),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},60213:(t,e,i)=>{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.geom.x1-h,c=e.geom.y1-l,d=e.geom.x2-h,p=e.geom.y2-l,f=e.geom.x3-h,v=e.geom.y3-l;a.beginPath(),a.moveTo(u,c),a.lineTo(d,p),a.lineTo(f,v),a.closePath(),e.isFilled&&(s(a,e),a.fill()),e.isStroked&&(n(a,e),a.stroke()),a.restore()}}},79296:(t,e,i)=>{var s=i(61286),n=i(21873);s.register("triangle",(function(t,e,i,s,r,o,a,h,l,u){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h,l,u))}))},70498:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(72291),r=i(60213),t.exports={renderWebGL:n,renderCanvas:r}},72291:(t,e,i)=>{var s=i(73329),n=i(50262),r=i(75512);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=s(e,i,o);a.calcMatrix.copyFrom(h.calc);var l=e._displayOriginX,u=e._displayOriginY,c=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isFilled){var d=a.fillTint,p=r.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*c);d.TL=p,d.TR=p,d.BL=p,d.BR=p;var f=e.geom.x1-l,v=e.geom.y1-u,g=e.geom.x2-l,m=e.geom.y2-u,y=e.geom.x3-l,x=e.geom.y3-u;a.batchFillTriangle(f,v,g,m,y,x,h.sprite,h.camera)}e.isStroked&&n(a,e,c,l,u),t.pipelines.postBatch(e)}},13747:(t,e,i)=>{var s=i(16569),n=i(56694),r=i(64937),o=i(89980),a=i(20791),h=new n({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.FX,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,a],initialize:function(t,e,i,n,r){o.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s(this),this.setTexture(n,r),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e){return this.anims.play(t,e)},playReverse:function(t,e){return this.anims.playReverse(t,e)},playAfterDelay:function(t,e){return this.anims.playAfterDelay(t,e)},playAfterRepeat:function(t,e){return this.anims.playAfterRepeat(t,e)},chain:function(t){return this.anims.chain(t)},stop:function(){return this.anims.stop()},stopAfterDelay:function(t){return this.anims.stopAfterDelay(t)},stopAfterRepeat:function(t){return this.anims.stopAfterRepeat(t)},stopOnFrame:function(t){return this.anims.stopOnFrame(t)},toJSON:function(){return r.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=h},27573:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},89219:(t,e,i)=>{var s=i(88933),n=i(32291),r=i(99325),o=i(20494),a=i(13747);r.register("sprite",(function(t,e){void 0===t&&(t={});var i=o(t,"key",null),r=o(t,"frame",null),h=new a(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),s(this.scene,h,t),n(h,t),h}))},66135:(t,e,i)=>{var s=i(61286),n=i(13747);s.register("sprite",(function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.displayList.add(r),r}))},20791:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(21034),r=i(27573),t.exports={renderWebGL:n,renderCanvas:r}},21034:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),e.pipeline.batchSprite(e,i,s)}},32979:t=>{t.exports=function(t,e,i){var s=t.canvas,n=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&r.maxLines1&&(d+=p*(h-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:p,lineHeight:c}}},27030:(t,e,i)=>{var s=i(61068);t.exports=function(t){var e=s.create(this),i=e.getContext("2d");t.syncFont(e,i);var n=i.measureText(t.testString);if("actualBoundingBoxAscent"in n){var r=n.actualBoundingBoxAscent,o=n.actualBoundingBoxDescent;return s.remove(e),{ascent:r,descent:o,fontSize:r+o}}var a=Math.ceil(n.width*t.baselineX),h=a,l=2*h;h=h*t.baselineY|0,e.width=a,e.height=l,i.fillStyle="#f00",i.fillRect(0,0,a,l),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,h);var u={ascent:0,descent:0,fontSize:0},c=i.getImageData(0,0,a,l);if(!c)return u.ascent=h,u.descent=h+6,u.fontSize=u.ascent+u.descent,s.remove(e),u;var d,p,f=c.data,v=f.length,g=4*a,m=0,y=!1;for(d=0;dh;d--){for(p=0;p{var s=i(99584),n=i(61068),r=i(56694),o=i(64937),a=i(89980),h=i(32979),l=i(10850),u=i(55638),c=i(80032),d=i(74744),p=new r({Extends:a,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.FX,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.ScrollFactor,o.Tint,o.Transform,o.Visible,c],initialize:function(t,e,i,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Text"),this.renderer=t.sys.renderer,this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.canvas=n.create(this),this.context=this.canvas.getContext("2d"),this.style=new d(this,r),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this._text=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.lineSpacing=0,this.dirty=!1,0===this.style.resolution&&(this.style.resolution=1),this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(s),r&&r.padding&&this.setPadding(r.padding),r&&r.lineSpacing&&this.setLineSpacing(r.lineSpacing)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",s(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(t){var e=this.style;if(e.wordWrapCallback){var i=e.wordWrapCallback.call(e.wordWrapCallbackScope,t,this);return Array.isArray(i)&&(i=i.join("\n")),i}return e.wordWrapWidth?e.wordWrapUseAdvanced?this.advancedWordWrap(t,this.context,this.style.wordWrapWidth):this.basicWordWrap(t,this.context,this.style.wordWrapWidth):t},advancedWordWrap:function(t,e,i){for(var s="",n=t.replace(/ +/gi," ").split(this.splitRegExp),r=n.length,o=0;ol){if(0===c){for(var v=p;v.length&&(v=v.slice(0,-1),!((f=e.measureText(v).width)<=l)););if(!v.length)throw new Error("wordWrapWidth < a single character");var g=d.substr(v.length);u[c]=g,h+=v}var m=u[c].length?c:c+1,y=u.slice(m).join(" ").replace(/[ \n]*$/gi,"");n.splice(o+1,0,y),r=n.length;break}h+=p,l-=f}s+=h.replace(/[ \n]*$/gi,"")+"\n"}}return s=s.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var s="",n=t.split(this.splitRegExp),r=n.length-1,o=e.measureText(" ").width,a=0;a<=r;a++){for(var h=i,l=n[a].split(" "),u=l.length-1,c=0;c<=u;c++){var d=l[c],p=e.measureText(d).width,f=p;ch&&c>0&&(s+="\n",h=i),s+=d,c0&&(d+=l.lineSpacing*v),i.rtl)c=p-c-u.left-u.right;else if("right"===i.align)c+=o-l.lineWidths[v];else if("center"===i.align)c+=(o-l.lineWidths[v])/2;else if("justify"===i.align){if(l.lineWidths[v]/l.width>=.85){var g=l.width-l.lineWidths[v],m=e.measureText(" ").width,y=a[v].trim(),x=y.split(" ");g+=(a[v].length-y.length)*m;for(var T=Math.floor(g/m),w=0;T>0;)x[w]+=" ",w=(w+1)%(x.length-1||1),--T;a[v]=x.join(" ")}}this.autoRound&&(c=Math.round(c),d=Math.round(d)),i.strokeThickness&&(i.syncShadow(e,i.shadowStroke),e.strokeText(a[v],c,d)),i.color&&(i.syncShadow(e,i.shadowFill),e.fillText(a[v],c,d))}e.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var b=this.input;return b&&!b.customHitArea&&(b.hitArea.width=this.width,b.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(t){this.setText(t)}},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&u(this.canvas),n.remove(this.canvas),this.texture.destroy()}});t.exports=p},71649:t=>{t.exports=function(t,e,i,s){0!==e.width&&0!==e.height&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,s))}},75397:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(76555);n.register("text",(function(t,e){void 0===t&&(t={});var i=r(t,"text",""),n=r(t,"style",null),a=r(t,"padding",null);null!==a&&(n.padding=a);var h=new o(this.scene,0,0,i,n);return void 0!==e&&(t.add=e),s(this.scene,h,t),h.autoRound=r(t,"autoRound",!0),h.resolution=r(t,"resolution",1),h}))},94627:(t,e,i)=>{var s=i(76555);i(61286).register("text",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},80032:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(76128),r=i(71649),t.exports={renderWebGL:n,renderCanvas:r}},74744:(t,e,i)=>{var s=i(56694),n=i(20494),r=i(10850),o=i(27030),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new s({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this.wordWrapWidth,this.wordWrapCallback,this.wordWrapCallbackScope,this.wordWrapUseAdvanced,this._font,this.setStyle(e,!1,!0)},setStyle:function(t,e,i){for(var s in void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),a){var h=i?a[s][1]:this[s];this[s]="wordWrapCallback"===s||"wordWrapCallbackScope"===s?r(t,a[s][0],h):n(t,a[s][0],h)}var l=r(t,"font",null);null!==l&&this.setFont(l,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var u=r(t,"fill",null);null!==u&&(this.color=u);var c=r(t,"metrics",!1);return c?this.metrics={ascent:r(c,"ascent",0),descent:r(c,"descent",0),fontSize:r(c,"fontSize",0)}:!e&&this.metrics||(this.metrics=o(this)),e?this.parent.updateText():this.parent},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow: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)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=o(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i=t,s="",n="";if("string"!=typeof t)i=r(t,"fontFamily","Courier"),s=r(t,"fontSize","16px"),n=r(t,"fontStyle","");else{var o=t.split(" "),a=0;n=o.length>2?o[a++]:"",s=o[a++]||"16px",i=o[a++]||"Courier"}return i===this.fontFamily&&s===this.fontSize&&n===this.fontStyle||(this.fontFamily=i,this.fontSize=s,this.fontStyle=n,e&&this.update(!0)),this.parent},setFontFamily:function(t){return this.fontFamily!==t&&(this.fontFamily=t,this.update(!0)),this.parent},setFontStyle:function(t){return this.fontStyle!==t&&(this.fontStyle=t,this.update(!0)),this.parent},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize!==t&&(this.fontSize=t,this.update(!0)),this.parent},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setResolution:function(t){return this.resolution=t,this.update(!1)},setStroke:function(t,e){return void 0===e&&(e=this.strokeThickness),void 0===t&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):this.stroke===t&&this.strokeThickness===e||(this.stroke=t,this.strokeThickness=e,this.update(!0)),this.parent},setShadow:function(t,e,i,s,n,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===s&&(s=0),void 0===n&&(n=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=s,this.shadowStroke=n,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},76128:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n){if(0!==e.width&&0!==e.height){i.addToRenderList(e);var r=e.frame,o=r.width,a=r.height,h=s.getTintAppendFloatAlpha,l=t.pipelines.set(e.pipeline,e),u=l.setTexture2D(r.glTexture,e);l.batchTexture(e,r.glTexture,o,a,e.x,e.y,o/e.style.resolution,a/e.style.resolution,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,o,a,h(e.tintTopLeft,i.alpha*e._alphaTL),h(e.tintTopRight,i.alpha*e._alphaTR),h(e.tintBottomLeft,i.alpha*e._alphaBL),h(e.tintBottomRight,i.alpha*e._alphaBR),e.tintFill,0,0,i,n,!1,u)}}},35856:(t,e,i)=>{var s=i(61068),n=i(56694),r=i(64937),o=i(89980),a=i(3504),h=i(8213),l=i(9271),u=i(93736),c=new n({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.FX,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,l],initialize:function(t,e,i,n,r,h,l){var c=t.sys.renderer;o.call(this,t,"TileSprite");var d=t.sys.textures.get(h),p=d.get(l);p.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed textures"),p=(d=t.sys.textures.get("__MISSING")).get()),n&&r?(n=Math.floor(n),r=Math.floor(r)):(n=p.width,r=p.height),this._tilePosition=new u,this._tileScale=new u(1,1),this.dirty=!1,this.renderer=c,this.canvas=s.create(this,n,r),this.context=this.canvas.getContext("2d"),this.displayTexture=d,this.displayFrame=p,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=a(p.width),this.potHeight=a(p.height),this.fillCanvas=s.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(e,i),this.setSize(n,r),this.setFrame(l),this.setOriginFromFrame(),this.initPipeline()},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){var e=this.displayTexture.get(t);return this.potWidth=a(e.width),this.potHeight=a(e.height),this.canvas.width=0,e.cutWidth&&e.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=e,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileScale:function(t,e){return void 0===t&&(t=this.tileScaleX),void 0===e&&(e=t),this.tileScaleX=t,this.tileScaleY=e,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var t=this.displayFrame;if(t.source.isRenderTexture||t.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var e=this.fillContext,i=this.fillCanvas,s=this.potWidth,n=this.potHeight;this.renderer&&this.renderer.gl||(s=t.cutWidth,n=t.cutHeight),e.clearRect(0,0,s,n),i.width=s,i.height=n,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,s,n),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var t=this.canvas;if(t.width===this.width&&t.height===this.height||(t.width=this.width,t.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context;this.scene.sys.game.config.antialias||h.disable(e);var i=this._tileScale.x,s=this._tileScale.y,n=this._tilePosition.x,r=this._tilePosition.y;e.clearRect(0,0,this.width,this.height),e.save(),e.scale(i,s),e.translate(-n,-r),e.fillStyle=this.fillPattern,e.fillRect(n,r,this.width/i,this.height/s),e.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),s.remove(this.canvas),s.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}});t.exports=c},93305:t=>{t.exports=function(t,e,i,s){e.updateCanvas(),i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},63950:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(35856);n.register("tileSprite",(function(t,e){void 0===t&&(t={});var i=r(t,"x",0),n=r(t,"y",0),a=r(t,"width",512),h=r(t,"height",512),l=r(t,"key",""),u=r(t,"frame",""),c=new o(this.scene,i,n,a,h,l,u);return void 0!==e&&(t.add=e),s(this.scene,c,t),c}))},20509:(t,e,i)=>{var s=i(35856);i(61286).register("tileSprite",(function(t,e,i,n,r,o){return this.displayList.add(new s(this.scene,t,e,i,n,r,o))}))},9271:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(74287),r=i(93305),t.exports={renderWebGL:n,renderCanvas:r}},74287:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n){e.updateCanvas();var r=e.width,o=e.height;if(0!==r&&0!==o){i.addToRenderList(e);var a=s.getTintAppendFloatAlpha,h=t.pipelines.set(e.pipeline,e),l=h.setTexture2D(e.fillPattern,e);h.batchTexture(e,e.fillPattern,e.displayFrame.width*e.tileScaleX,e.displayFrame.height*e.tileScaleY,e.x,e.y,r,o,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.originX*r,e.originY*o,0,0,r,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,e.tilePositionX%e.displayFrame.width/e.displayFrame.width,e.tilePositionY%e.displayFrame.height/e.displayFrame.height,i,n,!1,l)}}},8630:(t,e,i)=>{var s=i(56694),n=i(82897),r=i(64937),o=i(56631),a=i(97081),h=i(33963),l=i(89980),u=i(76038),c=i(76583),d=i(77974),p=i(83392),f=new s({Extends:l,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.FX,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,d],initialize:function(t,e,i,s){l.call(this,t,"Video"),this.video=null,this.videoTexture=null,this.videoTextureSource=null,this.snapshotTexture=null,this.flipY=!1,this._key=c(),this.touchLocked=!0,this.playWhenUnlocked=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={play:this.playHandler.bind(this),load:this.loadHandler.bind(this),error:this.loadErrorHandler.bind(this),end:this.completeHandler.bind(this),time:this.timeUpdateHandler.bind(this),seeking:this.seekingHandler.bind(this),seeked:this.seekedHandler.bind(this)},this._crop=this.resetCropObject(),this.markers={},this._markerIn=-1,this._markerOut=p.MAX_SAFE_INTEGER,this._lastUpdate=0,this._cacheKey="",this._isSeeking=!1,this.removeVideoElementOnDestroy=!1,this.setPosition(e,i),this.setSize(256,256),this.initPipeline(),s&&this.changeSource(s,!1);var n=t.sys.game.events;n.on(a.PAUSE,this.globalPause,this),n.on(a.RESUME,this.globalResume,this);var r=t.sys.sound;r&&r.on(u.GLOBAL_MUTE,this.globalMute,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},play:function(t,e,i){if(this.touchLocked&&this.playWhenUnlocked||this.isPlaying())return this;var s=this.video;if(!s)return console.warn("Video not loaded"),this;void 0===t&&(t=s.loop);var n=this.scene.sys.sound;return n&&n.mute&&this.setMute(!0),isNaN(e)||(this._markerIn=e),!isNaN(i)&&i>e&&(this._markerOut=i),s.loop=t,this.createPlayPromise()},createPlayPromise:function(){var t=this.video,e=this._callbacks;this.isPlaying();var i=t.play();return void 0!==i?i.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)):(t.addEventListener("playing",e.play),t.readyState<2&&(this.retry=this.retryLimit,this._retryID&&window.clearTimeout(this._retryID),this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))),t.addEventListener("error",e.error),t.addEventListener("abort",e.error),t.addEventListener("stalled",e.error),t.addEventListener("suspend",e.error),t.addEventListener("waiting",e.error),t.addEventListener("ended",e.end),t.addEventListener("timeupdate",e.time),t.addEventListener("seeking",e.seeking),t.addEventListener("seeked",e.seeked),t.addEventListener("play",this.playHandler2.bind(this)),t.addEventListener("pause",this.pauseHandler.bind(this)),this},playHandler2:function(t){console.log("play",this._cacheKey)},pauseHandler:function(t){console.log("paused",this._cacheKey)},changeSource:function(t,e,i,s,n){void 0===e&&(e=!0),this.video&&this.stop();var r=this.scene.sys.cache.video.get(t);return r?(this.video=r,this._cacheKey=t,this._codePaused=r.paused,this._codeMuted=r.muted,this.videoTexture?(this.scene.sys.textures.remove(this._key),this.videoTexture=this.scene.sys.textures.create(this._key,r,r.videoWidth,r.videoHeight),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,r.videoWidth,r.videoHeight),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,r.videoWidth,r.videoHeight)):this.updateTexture(),r.currentTime=0,this._lastUpdate=0,e&&this.play(i,s,n)):this.video=null,this},addMarker:function(t,e,i){return!isNaN(e)&&e>=0&&!isNaN(i)&&(this.markers[t]=[e,i]),this},playMarker:function(t,e){var i=this.markers[t];return i&&this.play(e,i[0],i[1]),this},removeMarker:function(t){return delete this.markers[t],this},snapshot:function(t,e){return void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.snapshotArea(0,0,this.width,this.height,t,e)},snapshotArea:function(t,e,i,s,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===s&&(s=this.height),void 0===n&&(n=i),void 0===r&&(r=s);var o=this.video,a=this.snapshotTexture;return a?(a.setSize(n,r),o&&a.context.drawImage(o,t,e,i,s,0,0,n,r)):(a=this.scene.sys.textures.createCanvas(c(),n,r),this.snapshotTexture=a,o&&a.context.drawImage(o,t,e,i,s,0,0,n,r)),a.update()},saveSnapshotTexture:function(t){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,t):this.snapshotTexture=this.scene.sys.textures.createCanvas(t,this.width,this.height),this.snapshotTexture},loadURL:function(t,e,i,s){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var n=document.createElement("video");return n.controls=!1,i&&(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")),n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),void 0!==s&&n.setAttribute("crossorigin",s),n.addEventListener("error",this._callbacks.error),n.addEventListener(e,this._callbacks.load),n.src=t,n.load(),this.video=n,this},loadMediaStream:function(t,e,i){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var s=document.createElement("video");s.controls=!1,i&&(s.muted=!0,s.defaultMuted=!0,s.setAttribute("autoplay","autoplay")),s.setAttribute("playsinline","playsinline"),s.setAttribute("preload","auto"),s.addEventListener("error",this._callbacks.error,!0),s.addEventListener(e,this._callbacks.load,!0);try{s.srcObject=t}catch(e){s.src=window.URL.createObjectURL(t)}return s.load(),this.video=s,this},playPromiseSuccessHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn)},playPromiseErrorHandler:function(t){console.log("pp error handler",t),this.scene.sys.input.once(h.POINTER_DOWN,this.unlockHandler,this),this.touchLocked=!0,this.playWhenUnlocked=!0,this.emit(o.VIDEO_ERROR,this,t)},playHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this.video.removeEventListener("playing",this._callbacks.play,!0)},loadHandler:function(){this.updateTexture()},loadErrorHandler:function(t){this.stop(),this.emit(o.VIDEO_ERROR,this,t)},unlockHandler:function(){this.touchLocked=!1,this.playWhenUnlocked=!1,this.emit(o.VIDEO_UNLOCKED,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn),this.createPlayPromise()},completeHandler:function(){console.log("ended"),this.emit(o.VIDEO_COMPLETE,this)},timeUpdateHandler:function(){this.video&&this.video.currentTime=this._markerOut&&(t.loop?(t.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=e,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),console.log("prEUp stop"),this.stop())))}},checkVideoProgress:function(){this.video.readyState>=2?this.updateTexture():(this.retry--,this.retry>0?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):this.emit(o.VIDEO_TIMEOUT,this))},updateTexture:function(){var t=this.video,e=t.videoWidth,i=t.videoHeight;if(this.videoTexture){var s=this.videoTextureSource;s.source!==t&&(s.source=t,s.width=e,s.height=i),s.update()}else this.videoTexture=this.scene.sys.textures.create(this._key,t,e,i),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,e,i),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,e,i)},getVideoKey:function(){return this._cacheKey},seekTo:function(t){var e=this.video;if(e){var i=e.duration;if(i!==1/0&&!isNaN(i)){var s=i*t;this.setCurrentTime(s)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e=this.video;if(e){if("string"==typeof t){var i=t[0],s=parseFloat(t.substr(1));"+"===i?t=e.currentTime+s:"-"===i&&(t=e.currentTime-s)}e.currentTime=t,this._lastUpdate=t}return this},isSeeking:function(){return this._isSeeking},seekingHandler:function(){this._isSeeking=!0,this.emit(o.VIDEO_SEEKING,this)},seekedHandler:function(){this._isSeeking=!1,this.emit(o.VIDEO_SEEKED,this),this.video&&this.updateTexture()},getProgress:function(){var t=this.video;if(t){var e=t.currentTime,i=t.duration;if(i!==1/0&&!isNaN(i))return e/i}return 0},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){void 0===t&&(t=!0),this._codeMuted=t;var e=this.video;return e&&(e.muted=!!this._systemMuted||t),this},isMuted:function(){return this._codeMuted},globalMute:function(t,e){this._systemMuted=e;var i=this.video;i&&(i.muted=!!this._codeMuted||e)},globalPause:function(){this._systemPaused=!0,this.video&&this.video.pause()},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&this.createPlayPromise()},setPaused:function(t){void 0===t&&(t=!0);var e=this.video;return this._codePaused=t,e&&(t?e.paused||e.pause():t||e.paused&&!this._systemPaused&&this.createPlayPromise()),this},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(t){return void 0===t&&(t=1),this.video&&(this.video.volume=n(t,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(t){return this.video&&(this.video.playbackRate=t),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(t){return void 0===t&&(t=!0),this.video&&(this.video.loop=t),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!1),this.videoTexture&&this.scene.sys.textures.renameTexture(this._key,t),this._key=t,this.flipY=e,this.videoTextureSource&&this.videoTextureSource.setFlipY(e),this.videoTexture},stop:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.removeEventListener(i,e[i]);t.pause()}return this._retryID&&window.clearTimeout(this._retryID),this.emit(o.VIDEO_STOP,this),this},removeVideoElement:function(){var t=this.video;if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("autoplay"),t.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(),this.removeVideoElementOnDestroy&&this.removeVideoElement();var t=this.scene.sys.game.events;t.off(a.PAUSE,this.globalPause,this),t.off(a.RESUME,this.globalResume,this);var e=this.scene.sys.sound;e&&e.off(u.GLOBAL_MUTE,this.globalMute,this),this._retryID&&window.clearTimeout(this._retryID)}});t.exports=f},56933:t=>{t.exports=function(t,e,i,s){e.videoTexture&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,s))}},65601:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(8630);n.register("video",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=new o(this.scene,0,0,i);return void 0!==e&&(t.add=e),s(this.scene,n,t),n}))},215:(t,e,i)=>{var s=i(8630);i(61286).register("video",(function(t,e,i){return this.displayList.add(new s(this.scene,t,e,i))}))},77974:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(83572),r=i(56933),t.exports={renderWebGL:n,renderCanvas:r}},83572:t=>{t.exports=function(t,e,i,s){e.videoTexture&&(i.addToRenderList(e),e.pipeline.batchSprite(e,i,s))}},71030:(t,e,i)=>{var s=i(95723),n=i(26673),r=i(65650),o=i(56694),a=i(64937),h=i(89980),l=i(74118),u=i(94287),c=new o({Extends:h,Mixins:[a.Depth,a.GetBounds,a.Origin,a.Transform,a.ScrollFactor,a.Visible],initialize:function(t,e,i,n,r){void 0===n&&(n=1),void 0===r&&(r=n),h.call(this,t,"Zone"),this.setPosition(e,i),this.width=n,this.height=r,this.blendMode=s.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e,i){void 0===i&&(i=!0),this.width=t,this.height=e,this.updateDisplayOrigin();var s=this.input;return i&&s&&!s.customHitArea&&(s.hitArea.width=t,s.hitArea.height=e),this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},setCircleDropZone:function(t){return this.setDropZone(new n(0,0,t),r)},setRectangleDropZone:function(t,e){return this.setDropZone(new l(0,0,t,e),u)},setDropZone:function(t,e){return this.input||this.setInteractive(t,e,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(t,e,i){i.addToRenderList(e)},renderWebGL:function(t,e,i){i.addToRenderList(e)}});t.exports=c},24067:(t,e,i)=>{var s=i(99325),n=i(20494),r=i(71030);s.register("zone",(function(t){var e=n(t,"x",0),i=n(t,"y",0),s=n(t,"width",1),o=n(t,"height",s);return new r(this.scene,e,i,s,o)}))},34546:(t,e,i)=>{var s=i(71030);i(61286).register("zone",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},95847:t=>{t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},26673:(t,e,i)=>{var s=i(56694),n=i(65650),r=i(94026),o=i(62941),a=i(52394),h=i(30977),l=new s({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.type=a.CIRCLE,this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=l},37964:t=>{t.exports=function(t){return Math.PI*t.radius*2}},72233:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x+t.radius*Math.cos(e),i.y=t.y+t.radius*Math.sin(e),i}},61761:(t,e,i)=>{var s=i(26673);t.exports=function(t){return new s(t.x,t.y,t.radius)}},65650:t=>{t.exports=function(t,e,i){return t.radius>0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},39187:(t,e,i)=>{var s=i(65650);t.exports=function(t,e){return s(t,e.x,e.y)}},58672:(t,e,i)=>{var s=i(65650);t.exports=function(t,e){return s(t,e.x,e.y)&&s(t,e.right,e.y)&&s(t,e.x,e.bottom)&&s(t,e.right,e.bottom)}},42997:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},94894:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},48027:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},94026:(t,e,i)=>{var s=i(72233),n=i(91806),r=i(83392),o=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=n(e,0,r.PI2);return s(t,a,i)}},62941:(t,e,i)=>{var s=i(37964),n=i(72233),r=i(91806),o=i(83392);t.exports=function(t,e,i,a){void 0===a&&(a=[]),!e&&i>0&&(e=s(t)/i);for(var h=0;h{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},88665:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},30977:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=2*Math.PI*Math.random(),n=Math.random()+Math.random(),r=n>1?2-n:n,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},6112:(t,e,i)=>{var s=i(26673);s.Area=i(95847),s.Circumference=i(37964),s.CircumferencePoint=i(72233),s.Clone=i(61761),s.Contains=i(65650),s.ContainsPoint=i(39187),s.ContainsRect=i(58672),s.CopyFrom=i(42997),s.Equals=i(94894),s.GetBounds=i(48027),s.GetPoint=i(94026),s.GetPoints=i(62941),s.Offset=i(34585),s.OffsetPoint=i(88665),s.Random=i(30977),t.exports=s},52394:t=>{t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},58605:t=>{t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},39507:t=>{t.exports=function(t){var e=t.width/2,i=t.height/2,s=Math.pow(e-i,2)/Math.pow(e+i,2);return Math.PI*(e+i)*(1+3*s/(10+Math.sqrt(4-3*s)))}},86998:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.width/2,r=t.height/2;return i.x=t.x+n*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},81773:(t,e,i)=>{var s=i(95669);t.exports=function(t){return new s(t.x,t.y,t.width,t.height)}},72313:t=>{t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var s=(e-t.x)/t.width,n=(i-t.y)/t.height;return(s*=s)+(n*=n)<.25}},34368:(t,e,i)=>{var s=i(72313);t.exports=function(t,e){return s(t,e.x,e.y)}},71431:(t,e,i)=>{var s=i(72313);t.exports=function(t,e){return s(t,e.x,e.y)&&s(t,e.right,e.y)&&s(t,e.x,e.bottom)&&s(t,e.right,e.bottom)}},75459:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},95669:(t,e,i)=>{var s=i(56694),n=i(72313),r=i(95340),o=i(54978),a=i(52394),h=i(72006),l=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=l},98068:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},72897:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},95340:(t,e,i)=>{var s=i(86998),n=i(91806),r=i(83392),o=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=n(e,0,r.PI2);return s(t,a,i)}},54978:(t,e,i)=>{var s=i(39507),n=i(86998),r=i(91806),o=i(83392);t.exports=function(t,e,i,a){void 0===a&&(a=[]),!e&&i>0&&(e=s(t)/i);for(var h=0;h{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},36233:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},72006:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random()*Math.PI*2,n=Math.sqrt(Math.random());return e.x=t.x+n*Math.cos(i)*t.width/2,e.y=t.y+n*Math.sin(i)*t.height/2,e}},40652:(t,e,i)=>{var s=i(95669);s.Area=i(58605),s.Circumference=i(39507),s.CircumferencePoint=i(86998),s.Clone=i(81773),s.Contains=i(72313),s.ContainsPoint=i(34368),s.ContainsRect=i(71431),s.CopyFrom=i(75459),s.Equals=i(98068),s.GetBounds=i(72897),s.GetPoint=i(95340),s.GetPoints=i(54978),s.Offset=i(77951),s.OffsetPoint=i(36233),s.Random=i(72006),t.exports=s},84068:(t,e,i)=>{var s=i(52394),n=i(98611),r={Circle:i(6112),Ellipse:i(40652),Intersects:i(7563),Line:i(28482),Mesh:i(14293),Point:i(63472),Polygon:i(44359),Rectangle:i(66658),Triangle:i(87619)};r=n(!1,r,s),t.exports=r},22184:(t,e,i)=>{var s=i(53996);t.exports=function(t,e){return s(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},26535:t=>{t.exports=function(t,e){var i=e.width/2,s=e.height/2,n=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-s),o=i+t.radius,a=s+t.radius;if(n>o||r>a)return!1;if(n<=i||r<=s)return!0;var h=n-i,l=r-s;return h*h+l*l<=t.radius*t.radius}},71145:(t,e,i)=>{var s=i(79967),n=i(22184);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r,o,a,h,l=t.x,u=t.y,c=t.radius,d=e.x,p=e.y,f=e.radius;if(u===p)0===(a=(o=-2*p)*o-4*(r=1)*(d*d+(h=(f*f-c*c-d*d+l*l)/(2*(l-d)))*h-2*d*h+p*p-f*f))?i.push(new s(h,-o/(2*r))):a>0&&(i.push(new s(h,(-o+Math.sqrt(a))/(2*r))),i.push(new s(h,(-o-Math.sqrt(a))/(2*r))));else{var v=(l-d)/(u-p),g=(f*f-c*c-d*d+l*l-p*p+u*u)/(2*(u-p));0===(a=(o=2*u*v-2*g*v-2*l)*o-4*(r=v*v+1)*(l*l+u*u+g*g-c*c-2*u*g))?(h=-o/(2*r),i.push(new s(h,g-h*v))):a>0&&(h=(-o+Math.sqrt(a))/(2*r),i.push(new s(h,g-h*v)),h=(-o-Math.sqrt(a))/(2*r),i.push(new s(h,g-h*v)))}}return i}},62508:(t,e,i)=>{var s=i(26111),n=i(26535);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC(),h=e.getLineD();s(r,t,i),s(o,t,i),s(a,t,i),s(h,t,i)}return i}},26111:(t,e,i)=>{var s=i(79967),n=i(61472);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r,o,a=t.x1,h=t.y1,l=t.x2,u=t.y2,c=e.x,d=e.y,p=e.radius,f=l-a,v=u-h,g=a-c,m=h-d,y=f*f+v*v,x=2*(f*g+v*m),T=x*x-4*y*(g*g+m*m-p*p);if(0===T){var w=-x/(2*y);r=a+w*f,o=h+w*v,w>=0&&w<=1&&i.push(new s(r,o))}else if(T>0){var b=(-x-Math.sqrt(T))/(2*y);r=a+b*f,o=h+b*v,b>=0&&b<=1&&i.push(new s(r,o));var S=(-x+Math.sqrt(T))/(2*y);r=a+S*f,o=h+S*v,S>=0&&S<=1&&i.push(new s(r,o))}}return i}},96537:(t,e,i)=>{var s=i(70015);t.exports=function(t,e,i,n){void 0===i&&(i=!1);var r,o,a,h=t.x1,l=t.y1,u=t.x2,c=t.y2,d=e.x1,p=e.y1,f=u-h,v=c-l,g=e.x2-d,m=e.y2-p,y=f*m-v*g;if(0===y)return!1;if(i){if((o=(d+g*(r=(f*(p-l)+v*(h-d))/(g*v-m*f))-h)/f)<0||r<0||r>1)return null;a=o}else{if(o=((l-p)*f-(h-d)*v)/y,(r=((d-h)*m-(p-l)*g)/y)<0||r>1||o<0||o>1)return null;a=r}return void 0===n&&(n=new s),n.set(h+f*a,l+v*a,a)}},17647:(t,e,i)=>{var s=i(96537),n=i(88829),r=i(70015),o=new n,a=new r;t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=new r);var h=!1;n.set(),a.set();for(var l=e[0],u=1;u{var s=i(70015),n=i(51729),r=i(17647),o=new s;t.exports=function(t,e,i,s){void 0===s&&(s=new n),Array.isArray(e)||(e=[e]);var a=!1;s.set(),o.set();for(var h=0;h{var s=i(79967),n=i(25227),r=i(47910);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e))for(var o=e.getLineA(),a=e.getLineB(),h=e.getLineC(),l=e.getLineD(),u=[new s,new s,new s,new s],c=[n(o,t,u[0]),n(a,t,u[1]),n(h,t,u[2]),n(l,t,u[3])],d=0;d<4;d++)c[d]&&i.push(u[d]);return i}},7449:(t,e,i)=>{var s=i(51729),n=i(68439),r=new(i(88829));function o(t,e,i,o,a){var h=Math.cos(t),l=Math.sin(t);r.setTo(e,i,e+h,i+l);var u=n(r,o,!0);u&&a.push(new s(u.x,u.y,t,u.w))}function a(t,e){return t.z-e.z}t.exports=function(t,e,i){Array.isArray(i)||(i=[i]);for(var s=[],n=[],r=0;r{var s=i(74118),n=i(90205);t.exports=function(t,e,i){return void 0===i&&(i=new s),n(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},1946:(t,e,i)=>{var s=i(9569),n=i(90205);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC(),h=t.getLineD();s(r,e,i),s(o,e,i),s(a,e,i),s(h,e,i)}return i}},34211:(t,e,i)=>{var s=i(20370),n=i(9569);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();n(r,t,i),n(o,t,i),n(a,t,i)}return i}},80511:(t,e,i)=>{var s=i(26111),n=i(48411);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();s(r,e,i),s(o,e,i),s(a,e,i)}return i}},31343:(t,e,i)=>{var s=i(79967),n=i(86117),r=i(25227);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e))for(var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=[new s,new s,new s],u=[r(o,e,l[0]),r(a,e,l[1]),r(h,e,l[2])],c=0;c<3;c++)u[c]&&i.push(l[c]);return i}},70534:(t,e,i)=>{var s=i(23589),n=i(31343);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();n(t,r,i),n(t,o,i),n(t,a,i)}return i}},61472:(t,e,i)=>{var s=i(65650),n=new(i(79967));t.exports=function(t,e,i){if(void 0===i&&(i=n),s(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(s(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,c=o;if(l>0){var d=(a*r+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*o>=0&&s(e,i.x,i.y)}},25227:t=>{t.exports=function(t,e,i){var s=t.x1,n=t.y1,r=t.x2,o=t.y2,a=e.x1,h=e.y1,l=e.x2,u=e.y2,c=(u-h)*(r-s)-(l-a)*(o-n);if(0===c)return!1;var d=((l-a)*(n-h)-(u-h)*(s-a))/c,p=((r-s)*(n-h)-(o-n)*(s-a))/c;return d>=0&&d<=1&&p>=0&&p<=1&&(i&&(i.x=s+d*(r-s),i.y=n+d*(o-n)),!0)}},47910:t=>{t.exports=function(t,e){var i=t.x1,s=t.y1,n=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,l=e.bottom,u=0;if(i>=o&&i<=h&&s>=a&&s<=l||n>=o&&n<=h&&r>=a&&r<=l)return!0;if(i=o){if((u=s+(r-s)*(o-i)/(n-i))>a&&u<=l)return!0}else if(i>h&&n<=h&&(u=s+(r-s)*(h-i)/(n-i))>=a&&u<=l)return!0;if(s=a){if((u=i+(n-i)*(a-s)/(r-s))>=o&&u<=h)return!0}else if(s>l&&r<=l&&(u=i+(n-i)*(l-s)/(r-s))>=o&&u<=h)return!0;return!1}},34426:t=>{t.exports=function(t,e,i){void 0===i&&(i=1);var s=e.x1,n=e.y1,r=e.x2,o=e.y2,a=t.x,h=t.y,l=(r-s)*(r-s)+(o-n)*(o-n);if(0===l)return!1;var u=((a-s)*(r-s)+(h-n)*(o-n))/l;if(u<0)return Math.sqrt((s-a)*(s-a)+(n-h)*(n-h))<=i;if(u>=0&&u<=1){var c=((n-h)*(r-s)-(s-a)*(o-n))/l;return Math.abs(c)*Math.sqrt(l)<=i}return Math.sqrt((r-a)*(r-a)+(o-h)*(o-h))<=i}},81414:(t,e,i)=>{var s=i(34426);t.exports=function(t,e){if(!s(t,e))return!1;var i=Math.min(e.x1,e.x2),n=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=n&&t.y>=r&&t.y<=o}},90205:t=>{t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0)&&!(t.righte.right||t.y>e.bottom)}},20370:(t,e,i)=>{var s=i(25227),n=i(94287),r=i(86875),o=i(87279);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},8786:t=>{t.exports=function(t,e,i,s,n,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||n{var s=i(61472),n=i(60689);t.exports=function(t,e){return!(t.left>e.right||t.righte.bottom||t.bottom{var s=i(25227);t.exports=function(t,e){return!(!t.contains(e.x1,e.y1)&&!t.contains(e.x2,e.y2))||(!!s(t.getLineA(),e)||(!!s(t.getLineB(),e)||!!s(t.getLineC(),e)))}},23589:(t,e,i)=>{var s=i(86875),n=i(18680),r=i(25227);t.exports=function(t,e){if(t.left>e.right||t.righte.bottom||t.bottom0||(c=n(e),(d=s(t,c,!0)).length>0)}},7563:(t,e,i)=>{t.exports={CircleToCircle:i(22184),CircleToRectangle:i(26535),GetCircleToCircle:i(71145),GetCircleToRectangle:i(62508),GetLineToCircle:i(26111),GetLineToLine:i(96537),GetLineToPoints:i(17647),GetLineToPolygon:i(68439),GetLineToRectangle:i(9569),GetRaysFromPointToPolygon:i(7449),GetRectangleIntersection:i(82931),GetRectangleToRectangle:i(1946),GetRectangleToTriangle:i(34211),GetTriangleToCircle:i(80511),GetTriangleToLine:i(31343),GetTriangleToTriangle:i(70534),LineToCircle:i(61472),LineToLine:i(25227),LineToRectangle:i(47910),PointToLine:i(34426),PointToLineSegment:i(81414),RectangleToRectangle:i(90205),RectangleToTriangle:i(20370),RectangleToValues:i(8786),TriangleToCircle:i(48411),TriangleToLine:i(86117),TriangleToTriangle:i(23589)}},50599:t=>{t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},58813:t=>{t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=[]);var s=Math.round(t.x1),n=Math.round(t.y1),r=Math.round(t.x2),o=Math.round(t.y2),a=Math.abs(r-s),h=Math.abs(o-n),l=s-h&&(c-=h,s+=l),p{t.exports=function(t,e,i){var s=e-(t.x1+t.x2)/2,n=i-(t.y1+t.y2)/2;return t.x1+=s,t.y1+=n,t.x2+=s,t.y2+=n,t}},26718:(t,e,i)=>{var s=i(88829);t.exports=function(t){return new s(t.x1,t.y1,t.x2,t.y2)}},88930:t=>{t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},90656:t=>{t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},30897:(t,e,i)=>{var s=i(16028);t.exports=function(t,e,i){void 0===i&&(i=e);var n=s(t),r=t.x2-t.x1,o=t.y2-t.y1;return e&&(t.x1=t.x1-r/n*e,t.y1=t.y1-o/n*e),i&&(t.x2=t.x2+r/n*i,t.y2=t.y2+o/n*i),t}},30684:(t,e,i)=>{var s=i(92951),n=i(21902),r=i(79967);t.exports=function(t,e,i,o,a){void 0===o&&(o=0),void 0===a&&(a=[]);var h,l,u=[],c=t.x1,d=t.y1,p=t.x2-c,f=t.y2-d,v=n(e,a),g=i-1;for(h=0;h0){var m=u[0],y=[m];for(h=1;h=o&&(y.push(x),m=x)}var T=u[u.length-1];return s(m,T){var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},11222:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.x1,r=t.y1,o=t.x2,a=t.y2,h=(o-n)*(o-n)+(a-r)*(a-r);if(0===h)return i;var l=((e.x-n)*(o-n)+(e.y-r)*(a-r))/h;return i.x=n+l*(o-n),i.y=r+l*(a-r),i}},7377:(t,e,i)=>{var s=i(83392),n=i(50599),r=i(79967);t.exports=function(t,e){void 0===e&&(e=new r);var i=n(t)-s.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},66464:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},8570:(t,e,i)=>{var s=i(16028),n=i(79967);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(e=s(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u{t.exports=function(t,e){var i=t.x1,s=t.y1,n=t.x2,r=t.y2,o=(n-i)*(n-i)+(r-s)*(r-s);if(0===o)return!1;var a=((s-e.y)*(n-i)-(i-e.x)*(r-s))/o;return Math.abs(a)*Math.sqrt(o)}},82996:t=>{t.exports=function(t){return Math.abs(t.y1-t.y2)}},16028:t=>{t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},88829:(t,e,i)=>{var s=i(56694),n=i(66464),r=i(8570),o=i(52394),a=i(74077),h=i(93736),l=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=o.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=s},getPoint:function(t,e){return n(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},73273:(t,e,i)=>{var s=i(83392),n=i(1071),r=i(50599);t.exports=function(t){var e=r(t)-s.TAU;return n(e,-Math.PI,Math.PI)}},96936:(t,e,i)=>{var s=i(83392),n=i(50599);t.exports=function(t){return Math.cos(n(t)-s.TAU)}},43581:(t,e,i)=>{var s=i(83392),n=i(50599);t.exports=function(t){return Math.sin(n(t)-s.TAU)}},13990:t=>{t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},1298:t=>{t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},74077:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},30473:(t,e,i)=>{var s=i(50599),n=i(73273);t.exports=function(t,e){return 2*n(e)-Math.PI-s(t)}},25968:(t,e,i)=>{var s=i(1809);t.exports=function(t,e){var i=(t.x1+t.x2)/2,n=(t.y1+t.y2)/2;return s(t,i,n,e)}},24296:(t,e,i)=>{var s=i(1809);t.exports=function(t,e,i){return s(t,e.x,e.y,i)}},1809:t=>{t.exports=function(t,e,i,s){var n=Math.cos(s),r=Math.sin(s),o=t.x1-e,a=t.y1-i;return t.x1=o*n-a*r+e,t.y1=o*r+a*n+i,o=t.x2-e,a=t.y2-i,t.x2=o*n-a*r+e,t.y2=o*r+a*n+i,t}},88171:t=>{t.exports=function(t,e,i,s,n){return t.x1=e,t.y1=i,t.x2=e+Math.cos(s)*n,t.y2=i+Math.sin(s)*n,t}},82797:t=>{t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},41067:t=>{t.exports=function(t){return Math.abs(t.x1-t.x2)}},28482:(t,e,i)=>{var s=i(88829);s.Angle=i(50599),s.BresenhamPoints=i(58813),s.CenterOn=i(88513),s.Clone=i(26718),s.CopyFrom=i(88930),s.Equals=i(90656),s.Extend=i(30897),s.GetEasedPoints=i(30684),s.GetMidPoint=i(20487),s.GetNearestPoint=i(11222),s.GetNormal=i(7377),s.GetPoint=i(66464),s.GetPoints=i(8570),s.GetShortestDistance=i(65269),s.Height=i(82996),s.Length=i(16028),s.NormalAngle=i(73273),s.NormalX=i(96936),s.NormalY=i(43581),s.Offset=i(13990),s.PerpSlope=i(1298),s.Random=i(74077),s.ReflectAngle=i(30473),s.Rotate=i(25968),s.RotateAroundPoint=i(24296),s.RotateAroundXY=i(1809),s.SetToAngle=i(88171),s.Slope=i(82797),s.Width=i(41067),t.exports=s},18693:(t,e,i)=>{var s=i(56694),n=i(74118),r=i(93736);function o(t,e,i,s){var n=t-i,r=e-s,o=n*n+r*r;return Math.sqrt(o)}var a=new s({initialize:function(t,e,i){this.vertex1=t,this.vertex2=e,this.vertex3=i,this.bounds=new n,this._inCenter=new r},getInCenter:function(t){void 0===t&&(t=!0);var e,i,s,n,r,a,h=this.vertex1,l=this.vertex2,u=this.vertex3;t?(e=h.x,i=h.y,s=l.x,n=l.y,r=u.x,a=u.y):(e=h.vx,i=h.vy,s=l.vx,n=l.vy,r=u.vx,a=u.vy);var c=o(r,a,s,n),d=o(e,i,r,a),p=o(s,n,e,i),f=c+d+p;return this._inCenter.set((e*c+s*d+r*p)/f,(i*c+n*d+a*p)/f)},contains:function(t,e,i){var s=this.vertex1,n=this.vertex2,r=this.vertex3,o=s.vx,a=s.vy,h=n.vx,l=n.vy,u=r.vx,c=r.vy;if(i){var d=i.a,p=i.b,f=i.c,v=i.d,g=i.e,m=i.f;o=s.vx*d+s.vy*f+g,a=s.vx*p+s.vy*v+m,h=n.vx*d+n.vy*f+g,l=n.vx*p+n.vy*v+m,u=r.vx*d+r.vy*f+g,c=r.vx*p+r.vy*v+m}var y=u-o,x=c-a,T=h-o,w=l-a,b=t-o,S=e-a,E=y*y+x*x,A=y*T+x*w,_=y*b+x*S,C=T*T+w*w,M=T*b+w*S,R=E*C-A*A,P=0===R?0:1/R,O=(C*_-A*M)*P,L=(E*M-A*_)*P;return O>=0&&L>=0&&O+L<1},isCounterClockwise:function(t){var e=this.vertex1,i=this.vertex2,s=this.vertex3,n=(i.vx-e.vx)*(s.vy-e.vy)-(i.vy-e.vy)*(s.vx-e.vx);return t<=0?n>=0:n<0},load:function(t,e,i,s,n){return i=this.vertex1.load(t,e,i,s,n),i=this.vertex2.load(t,e,i,s,n),i=this.vertex3.load(t,e,i,s,n)},transformCoordinatesLocal:function(t,e,i,s){return this.vertex1.transformCoordinatesLocal(t,e,i,s),this.vertex2.transformCoordinatesLocal(t,e,i,s),this.vertex3.transformCoordinatesLocal(t,e,i,s),this},updateBounds:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3,s=this.bounds;return s.x=Math.min(t.vx,e.vx,i.vx),s.y=Math.min(t.vy,e.vy,i.vy),s.width=Math.max(t.vx,e.vx,i.vx)-s.x,s.height=Math.max(t.vy,e.vy,i.vy)-s.y,this},isInView:function(t,e,i,s,n,r,o,a,h,l,u){this.update(s,n,r,o,a,h,l,u);var c=this.vertex1,d=this.vertex2,p=this.vertex3;if(c.ta<=0&&d.ta<=0&&p.ta<=0)return!1;if(e&&!this.isCounterClockwise(i))return!1;var f=this.bounds;f.x=Math.min(c.tx,d.tx,p.tx),f.y=Math.min(c.ty,d.ty,p.ty),f.width=Math.max(c.tx,d.tx,p.tx)-f.x,f.height=Math.max(c.ty,d.ty,p.ty)-f.y;var v=t.x+t.width,g=t.y+t.height;return!(f.width<=0||f.height<=0||t.width<=0||t.height<=0)&&!(f.rightv||f.y>g)},update:function(t,e,i,s,n,r,o,a){return this.vertex1.update(e,i,s,n,r,o,a,t),this.vertex2.update(e,i,s,n,r,o,a,t),this.vertex3.update(e,i,s,n,r,o,a,t),this},translate:function(t,e){void 0===e&&(e=0);var i=this.vertex1,s=this.vertex2,n=this.vertex3;return i.x+=t,i.y+=e,s.x+=t,s.y+=e,n.x+=t,n.y+=e,this},x:{get:function(){return this.getInCenter().x},set:function(t){var e=this.getInCenter();this.translate(t-e.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(t){var e=this.getInCenter();this.translate(0,t-e.y)}},alpha:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.alpha+e.alpha+i.alpha)/3},set:function(t){this.vertex1.alpha=t,this.vertex2.alpha=t,this.vertex3.alpha=t}},depth:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.vz+e.vz+i.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});t.exports=a},99425:(t,e,i)=>{var s=i(18693),n=i(72632),r=i(16650),o=i(70015),a=i(85769),h=new o,l=new o,u=new r;t.exports=function(t){var e=n(t,"mesh"),i=n(t,"texture",null),r=n(t,"frame"),o=n(t,"width",1),c=n(t,"height",o),d=n(t,"widthSegments",1),p=n(t,"heightSegments",d),f=n(t,"x",0),v=n(t,"y",0),g=n(t,"z",0),m=n(t,"rotateX",0),y=n(t,"rotateY",0),x=n(t,"rotateZ",0),T=n(t,"zIsUp",!0),w=n(t,"isOrtho",!!e&&e.dirtyCache[11]),b=n(t,"colors",[16777215]),S=n(t,"alphas",[1]),E=n(t,"tile",!1),A=n(t,"flipY",!1),_=n(t,"width",null),C={faces:[],verts:[]};if(h.set(f,v,g),l.set(m,y,x),u.fromRotationXYTranslation(l,h,T),!i&&e)i=e.texture;else if(e&&"string"==typeof i)i=e.scene.sys.textures.get(i);else if(!i)return C;var M=i.get(r);!_&&w&&i&&e&&(o=M.width/e.height,c=M.height/e.height);var R,P,O=o/2,L=c/2,F=Math.floor(d),D=Math.floor(p),k=F+1,I=D+1,B=o/F,N=c/D,Y=[],U=[],X=0,z=1,G=0,V=1;M&&(X=M.u0,z=M.u1,A?(G=M.v1,V=M.v0):(G=M.v0,V=M.v1));var W=z-X,H=V-G;for(P=0;P{var s=i(18693),n=i(16650),r=i(70015),o=i(85769),a=new r,h=new r,l=new n;t.exports=function(t,e,i,n,r,u,c,d,p,f){void 0===i&&(i=1),void 0===n&&(n=0),void 0===r&&(r=0),void 0===u&&(u=0),void 0===c&&(c=0),void 0===d&&(d=0),void 0===p&&(p=0),void 0===f&&(f=!0);var v={faces:[],verts:[]},g=t.materials;a.set(n,r,u),h.set(c,d,p),l.fromRotationXYTranslation(h,a,f);for(var m=0;m{var s=i(18693),n=i(85769);t.exports=function(t,e,i,r,o,a,h){if(void 0===r&&(r=!1),void 0===a&&(a=16777215),void 0===h&&(h=1),t.length===e.length){var l,u,c,d,p,f,v,g,m,y,x,T={faces:[],vertices:[]},w=r?3:2,b=Array.isArray(a),S=Array.isArray(h);if(Array.isArray(i)&&i.length>0)for(l=0;l{var e=!0,i="untitled",s="",n="";function r(t){var e=t.indexOf("#");return e>-1?t.substring(0,e):t}function o(t){return 0===t.models.length&&t.models.push({faces:[],name:i,textureCoords:[],vertexNormals:[],vertices:[]}),s="",t.models[t.models.length-1]}function a(t,e){var n=t.length>=2?t[1]:i;e.models.push({faces:[],name:n,textureCoords:[],vertexNormals:[],vertices:[]}),s=""}function h(t){2===t.length&&(s=t[1])}function l(t,e){var i=t.length,s=i>=2?parseFloat(t[1]):0,n=i>=3?parseFloat(t[2]):0,r=i>=4?parseFloat(t[3]):0;o(e).vertices.push({x:s,y:n,z:r})}function u(t,i){var s=t.length,n=s>=2?parseFloat(t[1]):0,r=s>=3?parseFloat(t[2]):0,a=s>=4?parseFloat(t[3]):0;isNaN(n)&&(n=0),isNaN(r)&&(r=0),isNaN(a)&&(a=0),e&&(r=1-r),o(i).textureCoords.push({u:n,v:r,w:a})}function c(t,e){var i=t.length,s=i>=2?parseFloat(t[1]):0,n=i>=3?parseFloat(t[2]):0,r=i>=4?parseFloat(t[3]):0;o(e).vertexNormals.push({x:s,y:n,z:r})}function d(t,e){var i=t.length-1;if(!(i<3)){for(var r={group:s,material:n,vertices:[]},a=0;a3)){var u=0,c=0,d=0;u=parseInt(h[0],10),l>1&&""!==h[1]&&(c=parseInt(h[1],10)),l>2&&(d=parseInt(h[2],10)),0!==u&&(u<0&&(u=o(e).vertices.length+1+u),c-=1,u-=1,d-=1,r.vertices.push({textureCoordsIndex:c,vertexIndex:u,vertexNormalIndex:d}))}}o(e).faces.push(r)}}function p(t,e){t.length>=2&&e.materialLibraries.push(t[1])}function f(t){t.length>=2&&(n=t[1])}t.exports=function(t,i){void 0===i&&(i=!0),e=i;var o={materials:{},materialLibraries:[],models:[]};s="",n="";for(var v=t.split("\n"),g=0;g{var s=i(22946);t.exports=function(t){for(var e={},i=t.split("\n"),n="",r=0;r=2?Math.floor(255*a[2]):h,u=a.length>=3?Math.floor(255*a[3]):h;e[n]=s(h,l,u)}}}return e}},15313:t=>{t.exports=function(t,e,i,s){var n,r;if(void 0===i&&void 0===s){var o=t.getInCenter();n=o.x,r=o.y}var a=Math.cos(e),h=Math.sin(e),l=t.vertex1,u=t.vertex2,c=t.vertex3,d=l.x-n,p=l.y-r;l.set(d*a-p*h+n,d*h+p*a+r),d=u.x-n,p=u.y-r,u.set(d*a-p*h+n,d*h+p*a+r),d=c.x-n,p=c.y-r,c.set(d*a-p*h+n,d*h+p*a+r)}},85769:(t,e,i)=>{var s=i(56694),n=i(75512),r=i(70015),o=new s({Extends:r,initialize:function(t,e,i,s,n,o,a,h,l,u){void 0===o&&(o=16777215),void 0===a&&(a=1),void 0===h&&(h=0),void 0===l&&(l=0),void 0===u&&(u=0),r.call(this,t,e,i),this.vx=0,this.vy=0,this.vz=0,this.nx=h,this.ny=l,this.nz=u,this.u=s,this.v=n,this.color=o,this.alpha=a,this.tx=0,this.ty=0,this.ta=0},setUVs:function(t,e){return this.u=t,this.v=e,this},transformCoordinatesLocal:function(t,e,i,s){var n=this.x,r=this.y,o=this.z,a=t.val,h=n*a[0]+r*a[4]+o*a[8]+a[12],l=n*a[1]+r*a[5]+o*a[9]+a[13],u=n*a[2]+r*a[6]+o*a[10]+a[14],c=n*a[3]+r*a[7]+o*a[11]+a[15];this.vx=h/c*e,this.vy=-l/c*i,this.vz=s<=0?u/c:-u/c},resize:function(t,e,i,s,n,r){return this.x=t,this.y=e,this.vx=this.x*i,this.vy=-this.y*s,this.vz=0,n<.5?this.vx+=i*(.5-n):n>.5&&(this.vx-=i*(n-.5)),r<.5?this.vy+=s*(.5-r):r>.5&&(this.vy-=s*(r-.5)),this},update:function(t,e,i,s,n,r,o,a){var h=this.vx*t+this.vy*i+n,l=this.vx*e+this.vy*s+r;return o&&(h=Math.round(h),l=Math.round(l)),this.tx=h,this.ty=l,this.ta=this.alpha*a,this},load:function(t,e,i,s,r){return t[++i]=this.tx,t[++i]=this.ty,t[++i]=this.u,t[++i]=this.v,t[++i]=s,t[++i]=r,e[++i]=n.getTintAppendFloatAlpha(this.color,this.ta),i}});t.exports=o},14293:(t,e,i)=>{var s={Face:i(18693),GenerateGridVerts:i(99425),GenerateObjVerts:i(53267),GenerateVerts:i(67623),ParseObj:i(27291),ParseObjMaterial:i(76799),RotateFace:i(15313),Vertex:i(85769)};t.exports=s},77601:t=>{t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},38933:(t,e,i)=>{var s=i(79967);t.exports=function(t){return new s(t.x,t.y)}},47103:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y)}},13625:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},12536:t=>{t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},54205:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){if(void 0===e&&(e=new s),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var n=0;n{t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},82712:t=>{t.exports=function(t){return t.x*t.x+t.y*t.y}},20052:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){void 0===e&&(e=new s);for(var i=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,a=0;ai&&(i=h.x),h.xr&&(r=h.y),h.y{var s=i(79967);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=new s),n.x=t.x+(e.x-t.x)*i,n.y=t.y+(e.y-t.y)*i,n}},42397:t=>{t.exports=function(t){return t.setTo(t.y,t.x)}},59464:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.setTo(-t.x,-t.y)}},79967:(t,e,i)=>{var s=i(56694),n=i(52394),r=new s({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=n.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=r},53581:(t,e,i)=>{var s=i(79967),n=i(82712);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=(t.x*e.x+t.y*e.y)/n(e);return 0!==r&&(i.x=r*e.x,i.y=r*e.y),i}},50817:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.x*e.x+t.y*e.y;return 0!==n&&(i.x=n*e.x,i.y=n*e.y),i}},40525:(t,e,i)=>{var s=i(50083);t.exports=function(t,e){if(0!==t.x||0!==t.y){var i=s(t);t.x/=i,t.y/=i}return t.x*=e,t.y*=e,t}},63472:(t,e,i)=>{var s=i(79967);s.Ceil=i(77601),s.Clone=i(38933),s.CopyFrom=i(47103),s.Equals=i(13625),s.Floor=i(12536),s.GetCentroid=i(54205),s.GetMagnitude=i(50083),s.GetMagnitudeSq=i(82712),s.GetRectangleFromPoints=i(20052),s.Interpolate=i(77154),s.Invert=i(42397),s.Negative=i(59464),s.Project=i(53581),s.ProjectUnit=i(50817),s.SetMagnitude=i(40525),t.exports=s},19631:(t,e,i)=>{var s=i(8580);t.exports=function(t){return new s(t.points)}},45604:t=>{t.exports=function(t,e,i){for(var s=!1,n=-1,r=t.points.length-1;++n{var s=i(45604);t.exports=function(t,e){return s(t,e.x,e.y)}},11117:t=>{"use strict";function e(t,e,s){s=s||2;var r,o,a,h,c,d,f,v=e&&e.length,g=v?e[0]*s:t.length,m=i(t,0,g,s,!0),y=[];if(!m||m.next===m.prev)return y;if(v&&(m=function(t,e,s,n){var r,o,a,h=[];for(r=0,o=e.length;r80*s){r=a=t[0],o=h=t[1];for(var x=s;xa&&(a=c),d>h&&(h=d);f=0!==(f=Math.max(a-r,h-o))?32767/f:0}return n(m,y,s,r,o,f,0),y}function i(t,e,i,s,n){var r,o;if(n===_(t,e,i,s)>0)for(r=e;r=e;r-=s)o=S(r,t[r],t[r+1],o);return o&&m(o,o.next)&&(E(o),o=o.next),o}function s(t,e){if(!t)return t;e||(e=t);var i,s=t;do{if(i=!1,s.steiner||!m(s,s.next)&&0!==g(s.prev,s,s.next))s=s.next;else{if(E(s),(s=e=s.prev)===s.next)break;i=!0}}while(i||s!==e);return e}function n(t,e,i,l,u,c,p){if(t){!p&&c&&function(t,e,i,s){var n=t;do{0===n.z&&(n.z=d(n.x,n.y,e,i,s)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,i,s,n,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,s=i,a=0,e=0;e0||h>0&&s;)0!==a&&(0===h||!s||i.z<=s.z)?(n=i,i=i.nextZ,a--):(n=s,s=s.nextZ,h--),r?r.nextZ=n:t=n,n.prevZ=r,r=n;i=s}r.nextZ=null,l*=2}while(o>1)}(n)}(t,l,u,c);for(var f,v,g=t;t.prev!==t.next;)if(f=t.prev,v=t.next,c?o(t,l,u,c):r(t))e.push(f.i/i|0),e.push(t.i/i|0),e.push(v.i/i|0),E(t),t=v.next,g=v.next;else if((t=v)===g){p?1===p?n(t=a(s(t),e,i),e,i,l,u,c,2):2===p&&h(t,e,i,l,u,c):n(s(t),e,i,l,u,c,1);break}}}function r(t){var e=t.prev,i=t,s=t.next;if(g(e,i,s)>=0)return!1;for(var n=e.x,r=i.x,o=s.x,a=e.y,h=i.y,l=s.y,u=nr?n>o?n:o:r>o?r:o,p=a>h?a>l?a:l:h>l?h:l,v=s.next;v!==e;){if(v.x>=u&&v.x<=d&&v.y>=c&&v.y<=p&&f(n,a,r,h,o,l,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function o(t,e,i,s){var n=t.prev,r=t,o=t.next;if(g(n,r,o)>=0)return!1;for(var a=n.x,h=r.x,l=o.x,u=n.y,c=r.y,p=o.y,v=ah?a>l?a:l:h>l?h:l,x=u>c?u>p?u:p:c>p?c:p,T=d(v,m,e,i,s),w=d(y,x,e,i,s),b=t.prevZ,S=t.nextZ;b&&b.z>=T&&S&&S.z<=w;){if(b.x>=v&&b.x<=y&&b.y>=m&&b.y<=x&&b!==n&&b!==o&&f(a,u,h,c,l,p,b.x,b.y)&&g(b.prev,b,b.next)>=0)return!1;if(b=b.prevZ,S.x>=v&&S.x<=y&&S.y>=m&&S.y<=x&&S!==n&&S!==o&&f(a,u,h,c,l,p,S.x,S.y)&&g(S.prev,S,S.next)>=0)return!1;S=S.nextZ}for(;b&&b.z>=T;){if(b.x>=v&&b.x<=y&&b.y>=m&&b.y<=x&&b!==n&&b!==o&&f(a,u,h,c,l,p,b.x,b.y)&&g(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;S&&S.z<=w;){if(S.x>=v&&S.x<=y&&S.y>=m&&S.y<=x&&S!==n&&S!==o&&f(a,u,h,c,l,p,S.x,S.y)&&g(S.prev,S,S.next)>=0)return!1;S=S.nextZ}return!0}function a(t,e,i){var n=t;do{var r=n.prev,o=n.next.next;!m(r,o)&&y(r,n,n.next,o)&&w(r,o)&&w(o,r)&&(e.push(r.i/i|0),e.push(n.i/i|0),e.push(o.i/i|0),E(n),E(n.next),n=t=o),n=n.next}while(n!==t);return s(n)}function h(t,e,i,r,o,a){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&v(h,l)){var u=b(h,l);return h=s(h,h.next),u=s(u,u.next),n(h,e,i,r,o,a,0),void n(u,e,i,r,o,a,0)}l=l.next}h=h.next}while(h!==t)}function l(t,e){return t.x-e.x}function u(t,e){var i=function(t,e){var i,s=e,n=t.x,r=t.y,o=-1/0;do{if(r<=s.y&&r>=s.next.y&&s.next.y!==s.y){var a=s.x+(r-s.y)*(s.next.x-s.x)/(s.next.y-s.y);if(a<=n&&a>o&&(o=a,i=s.x=s.x&&s.x>=u&&n!==s.x&&f(ri.x||s.x===i.x&&c(i,s)))&&(i=s,p=h)),s=s.next}while(s!==l);return i}(t,e);if(!i)return e;var n=b(i,t);return s(n,n.next),s(i,i.next)}function c(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function d(t,e,i,s,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-i)*n|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-s)*n|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{(e.x=(t-o)*(r-a)&&(t-o)*(s-a)>=(i-o)*(e-a)&&(i-o)*(r-a)>=(n-o)*(s-a)}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&y(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(w(t,e)&&w(e,t)&&function(t,e){var i=t,s=!1,n=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&n<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(s=!s),i=i.next}while(i!==t);return s}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||m(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function m(t,e){return t.x===e.x&&t.y===e.y}function y(t,e,i,s){var n=T(g(t,e,i)),r=T(g(t,e,s)),o=T(g(i,s,t)),a=T(g(i,s,e));return n!==r&&o!==a||(!(0!==n||!x(t,i,e))||(!(0!==r||!x(t,s,e))||(!(0!==o||!x(i,t,s))||!(0!==a||!x(i,e,s)))))}function x(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function T(t){return t>0?1:t<0?-1:0}function w(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function b(t,e){var i=new A(t.i,t.x,t.y),s=new A(e.i,e.x,e.y),n=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=n,n.prev=i,s.next=i,i.prev=s,r.next=s,s.prev=r,s}function S(t,e,i,s){var n=new A(t,e,i);return s?(n.next=s.next,n.prev=s,s.next.prev=n,s.next=n):(n.prev=n,n.next=n),n}function E(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function A(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function _(t,e,i,s){for(var n=0,r=e,o=i-s;r0&&(s+=t[n-1].length,i.holes.push(s))}return i},t.exports=e},14045:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){void 0===e&&(e=new s);for(var i,n=1/0,r=1/0,o=-n,a=-r,h=0;h{t.exports=function(t,e){void 0===e&&(e=[]);for(var i=0;i{var s=i(16028),n=i(88829),r=i(5159);t.exports=function(t,e,i,o){void 0===o&&(o=[]);var a=t.points,h=r(t);!e&&i>0&&(e=h/i);for(var l=0;lc+g)){var m=v.getPoint((u-c)/g);o.push(m);break}c+=g}return o}},5159:(t,e,i)=>{var s=i(16028),n=i(88829);t.exports=function(t){for(var e=t.points,i=0,r=0;r{var s=i(56694),n=i(45604),r=i(89294),o=i(52394),a=new s({initialize:function(t){this.type=o.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return n(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,s=0;s{t.exports=function(t){return t.points.reverse(),t}},95874:t=>{function e(t,e,i){var s=e.x,n=e.y,r=i.x-s,o=i.y-n;if(0!==r||0!==o){var a=((t.x-s)*r+(t.y-n)*o)/(r*r+o*o);a>1?(s=i.x,n=i.y):a>0&&(s+=r*a,n+=o*a)}return(r=t.x-s)*r+(o=t.y-n)*o}function i(t,s,n,r,o){for(var a,h=r,l=s+1;lh&&(a=l,h=u)}h>r&&(a-s>1&&i(t,s,a,r,o),o.push(t[a]),n-a>1&&i(t,a,n,r,o))}function s(t,e){var s=t.length-1,n=[t[0]];return i(t,0,s,e,n),n.push(t[s]),n}t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=!1);var n=t.points;if(n.length>2){var r=e*e;i||(n=function(t,e){for(var i,s,n,r,o,a=t[0],h=[a],l=1,u=t.length;le&&(h.push(i),a=i);return a!==i&&h.push(i),h}(n,r)),t.setTo(s(n,r))}return t}},18974:t=>{var e=function(t,e){return t[0]=e[0],t[1]=e[1],t};t.exports=function(t){var i,s=[],n=t.points;for(i=0;i0&&r.push(e([0,0],s[0])),i=0;i1&&r.push(e([0,0],s[s.length-1])),t.setTo(r)}},23490:t=>{t.exports=function(t,e,i){for(var s=t.points,n=0;n{var s=i(8580);s.Clone=i(19631),s.Contains=i(45604),s.ContainsPoint=i(87289),s.Earcut=i(11117),s.GetAABB=i(14045),s.GetNumberArray=i(98286),s.GetPoints=i(89294),s.Perimeter=i(5159),s.Reverse=i(32244),s.Simplify=i(95874),s.Smooth=i(18974),s.Translate=i(23490),t.exports=s},1653:t=>{t.exports=function(t){return t.width*t.height}},33943:t=>{t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t}},58662:t=>{t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t.width=Math.ceil(t.width),t.height=Math.ceil(t.height),t}},79993:t=>{t.exports=function(t,e,i){return t.x=e-t.width/2,t.y=i-t.height/2,t}},81572:(t,e,i)=>{var s=i(74118);t.exports=function(t){return new s(t.x,t.y,t.width,t.height)}},94287:t=>{t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i)}},28687:(t,e,i)=>{var s=i(94287);t.exports=function(t,e){return s(t,e.x,e.y)}},73222:t=>{t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&(e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom{t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},87279:t=>{t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},19989:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},92628:(t,e,i)=>{var s=i(6700);t.exports=function(t,e){var i=s(t);return i{var s=i(6700);t.exports=function(t,e){var i=s(t);return i>s(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},71356:t=>{t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},21687:t=>{t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},80222:(t,e,i)=>{var s=i(74118),n=i(83392);t.exports=function(t,e){if(void 0===e&&(e=new s),0===t.length)return e;for(var i,r,o,a=Number.MAX_VALUE,h=Number.MAX_VALUE,l=n.MIN_SAFE_INTEGER,u=n.MIN_SAFE_INTEGER,c=0;c{var s=i(74118);t.exports=function(t,e,i,n,r){return void 0===r&&(r=new s),r.setTo(Math.min(t,i),Math.min(e,n),Math.abs(t-i),Math.abs(e-n))}},6700:t=>{t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},35242:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.centerX,e.y=t.centerY,e}},47698:(t,e,i)=>{var s=i(85876),n=i(79967);t.exports=function(t,e,i){if(void 0===i&&(i=new n),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=s(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},54932:(t,e,i)=>{var s=i(47698),n=i(85876);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(e=n(t)/i);for(var o=0;o{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.width,e.y=t.height,e}},7782:(t,e,i)=>{var s=i(79993);t.exports=function(t,e,i){var n=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),s(t,n,r)}},66217:(t,e,i)=>{var s=i(74118),n=i(90205);t.exports=function(t,e,i){return void 0===i&&(i=new s),n(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},40053:(t,e,i)=>{var s=i(85876),n=i(79967);t.exports=function(t,e,i,r){if(void 0===r&&(r=[]),!e&&!i)return r;e?i=Math.round(s(t)/e):e=s(t)/i;for(var o=t.x,a=t.y,h=0,l=0;l=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},86673:t=>{t.exports=function(t,e){for(var i=t.x,s=t.right,n=t.y,r=t.bottom,o=0;o{t.exports=function(t,e){var i=Math.min(t.x,e.x),s=Math.max(t.right,e.right);t.x=i,t.width=s-i;var n=Math.min(t.y,e.y),r=Math.max(t.bottom,e.bottom);return t.y=n,t.height=r-n,t}},44755:t=>{t.exports=function(t,e,i){var s=Math.min(t.x,e),n=Math.max(t.right,e);t.x=s,t.width=n-s;var r=Math.min(t.y,i),o=Math.max(t.bottom,i);return t.y=r,t.height=o-r,t}},74466:t=>{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},55946:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},97474:t=>{t.exports=function(t,e){return t.xe.x&&t.ye.y}},85876:t=>{t.exports=function(t){return 2*(t.width+t.height)}},20243:(t,e,i)=>{var s=i(79967),n=i(75606);t.exports=function(t,e,i){void 0===i&&(i=new s),e=n(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r){var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},97691:(t,e,i)=>{var s=i(17489),n=i(73222),r=i(79967);t.exports=function(t,e,i){if(void 0===i&&(i=new r),n(t,e))switch(s(0,3)){case 0:i.x=t.x+Math.random()*(e.right-t.x),i.y=t.y+Math.random()*(e.top-t.y);break;case 1:i.x=e.x+Math.random()*(t.right-e.x),i.y=e.bottom+Math.random()*(t.bottom-e.bottom);break;case 2:i.x=t.x+Math.random()*(e.x-t.x),i.y=e.y+Math.random()*(t.bottom-e.y);break;case 3:i.x=e.right+Math.random()*(t.right-e.right),i.y=t.y+Math.random()*(e.bottom-t.y)}return i}},74118:(t,e,i)=>{var s=i(56694),n=i(94287),r=i(47698),o=i(54932),a=i(52394),h=i(88829),l=i(30001),u=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=a.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},51828:t=>{t.exports=function(t,e){return t.width===e.width&&t.height===e.height}},5691:t=>{t.exports=function(t,e,i){return void 0===i&&(i=e),t.width*=e,t.height*=i,t}},58795:(t,e,i)=>{var s=i(74118);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=Math.min(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-n,a=Math.max(t.bottom,e.bottom)-r;return i.setTo(n,r,o,a)}},66658:(t,e,i)=>{var s=i(74118);s.Area=i(1653),s.Ceil=i(33943),s.CeilAll=i(58662),s.CenterOn=i(79993),s.Clone=i(81572),s.Contains=i(94287),s.ContainsPoint=i(28687),s.ContainsRect=i(73222),s.CopyFrom=i(29538),s.Decompose=i(87279),s.Equals=i(19989),s.FitInside=i(92628),s.FitOutside=i(85028),s.Floor=i(71356),s.FloorAll=i(21687),s.FromPoints=i(80222),s.FromXY=i(75785),s.GetAspectRatio=i(6700),s.GetCenter=i(35242),s.GetPoint=i(47698),s.GetPoints=i(54932),s.GetSize=i(31591),s.Inflate=i(7782),s.Intersection=i(66217),s.MarchingAnts=i(40053),s.MergePoints=i(86673),s.MergeRect=i(14655),s.MergeXY=i(44755),s.Offset=i(74466),s.OffsetPoint=i(55946),s.Overlaps=i(97474),s.Perimeter=i(85876),s.PerimeterPoint=i(20243),s.Random=i(30001),s.RandomOutside=i(97691),s.SameDimensions=i(51828),s.Scale=i(5691),s.Union=i(58795),t.exports=s},19108:t=>{t.exports=function(t){var e=t.x1,i=t.y1,s=t.x2,n=t.y2,r=t.x3,o=t.y3;return Math.abs(((r-e)*(n-i)-(s-e)*(o-i))/2)}},41199:(t,e,i)=>{var s=i(66349);t.exports=function(t,e,i){var n=i*(Math.sqrt(3)/2);return new s(t,e,t+i/2,e+n,t-i/2,e+n)}},88730:(t,e,i)=>{var s=i(11117),n=i(66349);t.exports=function(t,e,i,r,o){void 0===e&&(e=null),void 0===i&&(i=1),void 0===r&&(r=1),void 0===o&&(o=[]);for(var a,h,l,u,c,d,p,f,v,g=s(t,e),m=0;m{var s=i(66349);t.exports=function(t,e,i,n){return void 0===n&&(n=i),new s(t,e,t,e-n,t+i,e)}},1882:(t,e,i)=>{var s=i(56595),n=i(9640);t.exports=function(t,e,i,r){void 0===r&&(r=s);var o=r(t),a=e-o.x,h=i-o.y;return n(t,a,h)}},56595:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},91835:(t,e,i)=>{var s=i(93736);function n(t,e,i,s){return t*s-e*i}t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x3,r=t.y3,o=t.x1-i,a=t.y1-r,h=t.x2-i,l=t.y2-r,u=2*n(o,a,h,l),c=n(a,o*o+a*a,l,h*h+l*l),d=n(o,o*o+a*a,h,h*h+l*l);return e.x=i-c/u,e.y=r+d/u,e}},97073:(t,e,i)=>{var s=i(26673);t.exports=function(t,e){void 0===e&&(e=new s);var i,n,r=t.x1,o=t.y1,a=t.x2,h=t.y2,l=t.x3,u=t.y3,c=a-r,d=h-o,p=l-r,f=u-o,v=c*(r+a)+d*(o+h),g=p*(r+l)+f*(o+u),m=2*(c*(u-h)-d*(l-a));if(Math.abs(m)<1e-6){var y=Math.min(r,a,l),x=Math.min(o,h,u);i=.5*(Math.max(r,a,l)-y),n=.5*(Math.max(o,h,u)-x),e.x=y+i,e.y=x+n,e.radius=Math.sqrt(i*i+n*n)}else e.x=(f*v-d*g)/m,e.y=(c*g-p*v)/m,i=e.x-r,n=e.y-o,e.radius=Math.sqrt(i*i+n*n);return e}},75974:(t,e,i)=>{var s=i(66349);t.exports=function(t){return new s(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},60689:t=>{t.exports=function(t,e,i){var s=t.x3-t.x1,n=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,l=s*s+n*n,u=s*r+n*o,c=s*a+n*h,d=r*r+o*o,p=r*a+o*h,f=l*d-u*u,v=0===f?0:1/f,g=(d*c-u*p)*v,m=(l*p-u*c)*v;return g>=0&&m>=0&&g+m<1}},86875:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=!1),void 0===s&&(s=[]);for(var n,r,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,p=t.y2-t.y1,f=u*u+c*c,v=u*d+c*p,g=d*d+p*p,m=f*g-v*v,y=0===m?0:1/m,x=t.x1,T=t.y1,w=0;w=0&&r>=0&&n+r<1&&(s.push({x:e[w].x,y:e[w].y}),i)));w++);return s}},51532:(t,e,i)=>{var s=i(60689);t.exports=function(t,e){return s(t,e.x,e.y)}},42538:t=>{t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},18680:t=>{t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},29977:t=>{t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2&&t.x3===e.x3&&t.y3===e.y3}},56088:(t,e,i)=>{var s=i(79967),n=i(16028);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();if(e<=0||e>=1)return i.x=r.x1,i.y=r.y1,i;var h=n(r),l=n(o),u=n(a),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},24402:(t,e,i)=>{var s=i(16028),n=i(79967);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=s(o),u=s(a),c=s(h),d=l+u+c;!e&&i>0&&(e=d/i);for(var p=0;pl+u?(v=(f-=l+u)/c,g.x=h.x1+(h.x2-h.x1)*v,g.y=h.y1+(h.y2-h.y1)*v):(v=(f-=l)/u,g.x=a.x1+(a.x2-a.x1)*v,g.y=a.y1+(a.y2-a.y1)*v),r.push(g)}return r}},83648:(t,e,i)=>{var s=i(79967);function n(t,e,i,s){var n=t-i,r=e-s,o=n*n+r*r;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,l=t.y3,u=n(h,l,o,a),c=n(i,r,h,l),d=n(o,a,i,r),p=u+c+d;return e.x=(i*u+o*c+h*d)/p,e.y=(r*u+a*c+l*d)/p,e}},9640:t=>{t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},95290:(t,e,i)=>{var s=i(16028);t.exports=function(t){var e=t.getLineA(),i=t.getLineB(),n=t.getLineC();return s(e)+s(i)+s(n)}},99761:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x2-t.x1,n=t.y2-t.y1,r=t.x3-t.x1,o=t.y3-t.y1,a=Math.random(),h=Math.random();return a+h>=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(n*a+o*h),e}},21934:(t,e,i)=>{var s=i(19211),n=i(83648);t.exports=function(t,e){var i=n(t);return s(t,i.x,i.y,e)}},68454:(t,e,i)=>{var s=i(19211);t.exports=function(t,e,i){return s(t,e.x,e.y,i)}},19211:t=>{t.exports=function(t,e,i,s){var n=Math.cos(s),r=Math.sin(s),o=t.x1-e,a=t.y1-i;return t.x1=o*n-a*r+e,t.y1=o*r+a*n+i,o=t.x2-e,a=t.y2-i,t.x2=o*n-a*r+e,t.y2=o*r+a*n+i,o=t.x3-e,a=t.y3-i,t.x3=o*n-a*r+e,t.y3=o*r+a*n+i,t}},66349:(t,e,i)=>{var s=i(56694),n=i(60689),r=i(56088),o=i(24402),a=i(52394),h=i(88829),l=i(99761),u=new s({initialize:function(t,e,i,s,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=0),this.type=a.TRIANGLE,this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.x3=n,this.y3=r},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,s,n,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.x3=n,this.y3=r,this},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.x3,this.y3,this.x1,this.y1),t},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=u},87619:(t,e,i)=>{var s=i(66349);s.Area=i(19108),s.BuildEquilateral=i(41199),s.BuildFromPolygon=i(88730),s.BuildRight=i(3635),s.CenterOn=i(1882),s.Centroid=i(56595),s.CircumCenter=i(91835),s.CircumCircle=i(97073),s.Clone=i(75974),s.Contains=i(60689),s.ContainsArray=i(86875),s.ContainsPoint=i(51532),s.CopyFrom=i(42538),s.Decompose=i(18680),s.Equals=i(29977),s.GetPoint=i(56088),s.GetPoints=i(24402),s.InCenter=i(83648),s.Perimeter=i(95290),s.Offset=i(9640),s.Random=i(99761),s.Rotate=i(21934),s.RotateAroundPoint=i(68454),s.RotateAroundXY=i(19211),t.exports=s},27395:t=>{t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}}},18104:t=>{t.exports=function(t,e){return function(i,s,n,r){var o=t.getPixelAlpha(s,n,r.texture.key,r.frame.name);return o&&o>=e}}},69898:(t,e,i)=>{var s=i(56694),n=i(72687),r=i(6659),o=i(33963),a=i(97081),h=i(71064),l=i(7905),u=i(40398),c=i(37579),d=i(69360),p=i(64462),f=new s({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new r,this.isOver=!0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new h(this):null,this.mouse=e.inputMouse?new l(this):null,this.touch=e.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var s=new u(this,i);s.smoothFactor=e.inputSmoothFactor,this.pointers.push(s)}this.mousePointer=e.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new d,this._tempMatrix2=new d,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(a.BOOT,this.boot,this)},boot:function(){var t=this.game,e=t.events;this.canvas=t.canvas,this.scaleManager=t.scale,this.events.emit(o.MANAGER_BOOT),e.on(a.PRE_RENDER,this.preRender,this),e.once(a.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(o.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(o.GAME_OUT,t)},preRender:function(){var t=this.game.loop.now,e=this.game.loop.delta,i=this.game.scene.getScenes(!0,!0);this.time=t,this.events.emit(o.MANAGER_UPDATE);for(var s=0;s10&&(t=10-this.pointersTotal);for(var i=0;i{var s=i(26673),n=i(65650),r=i(56694),o=i(72687),a=i(27395),h=i(18104),l=i(53996),u=i(95669),c=i(72313),d=i(33963),p=i(6659),f=i(72632),v=i(52394),g=i(63399),m=i(42911),y=i(91963),x=i(74118),T=i(94287),w=i(7599),b=i(66349),S=i(60689),E=new r({Extends:p,initialize:function(t){p.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.pluginEvents=new p,this.enabled=!0,this.displayList,this.cameras,g.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var e={cancelled:!1};this._eventContainer={stopPropagation:function(){e.cancelled=!0}},this._eventData=e,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,t.sys.events.once(w.BOOT,this.boot,this),t.sys.events.on(w.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(w.DESTROY,this.destroy,this),this.pluginEvents.emit(d.BOOT)},start:function(){var t=this.systems.events;t.on(w.TRANSITION_START,this.transitionIn,this),t.on(w.TRANSITION_OUT,this.transitionOut,this),t.on(w.TRANSITION_COMPLETE,this.transitionComplete,this),t.on(w.PRE_UPDATE,this.preUpdate,this),t.once(w.SHUTDOWN,this.shutdown,this),this.manager.events.on(d.GAME_OUT,this.onGameOut,this),this.manager.events.on(d.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(d.START)},onGameOver:function(t){this.isActive()&&this.emit(d.GAME_OVER,t.timeStamp,t)},onGameOut:function(t){this.isActive()&&this.emit(d.GAME_OUT,t.timeStamp,t)},preUpdate:function(){this.pluginEvents.emit(d.PRE_UPDATE);var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,s=e.length;if(0!==i||0!==s){for(var n=this._list,r=0;r-1&&(n.splice(a,1),this.clear(o,!0))}this._pendingRemoval.length=0,this._list=n.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.canInput()},updatePoll:function(t,e){if(!this.isActive())return!1;if(this.pluginEvents.emit(d.UPDATE,t,e),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var i,s=this.manager,n=s.pointers,r=s.pointersTotal;for(i=0;i0){if(this._pollTimer-=e,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var a=!1;for(i=0;i0&&(a=!0)}return a},update:function(t,e){if(!this.isActive())return!1;for(var i=e.length,s=!1,n=0;n0&&(s=!0)}return this._updatedThisFrame=!0,s},clear:function(t,e){void 0===e&&(e=!1),this.disable(t);var i=t.input;i&&(this.removeDebug(t),i.gameObject=void 0,i.target=void 0,i.hitArea=void 0,i.hitAreaCallback=void 0,i.callbackContext=void 0,t.input=null),e||this.queueForRemoval(t);var s=this._draggable.indexOf(t);return s>-1&&this._draggable.splice(s,1),t},disable:function(t){var e=t.input;e&&(e.enabled=!1,e.dragState=0);var i=this._temp,s=this._drag,n=this._over,r=this.manager,o=i.indexOf(t);o>-1&&i.splice(o,1);for(var a=0;a-1&&s[a].splice(o,1),(o=n[a].indexOf(t))>-1&&(n[a].splice(o,1),r.resetCursor(e));return this},enable:function(t,e,i,s){return void 0===s&&(s=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&s&&!t.input.dropZone&&(t.input.dropZone=s),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i0)return t.camera=s,n}return t.camera=e[0],[]},processDownEvents:function(t){var e=0,i=this._temp,s=this._eventData,n=this._eventContainer;s.cancelled=!1;for(var r=!1,o=0;o0&&l(t.x,t.y,t.downX,t.downY)>=n||s>0&&e>=t.downTime+s)&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;i1&&(this.sortGameObjects(i,t),this.topOnly&&i.splice(1)),this._drag[t.id]=i,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?(this.setDragState(t,3),this.processDragStartList(t)):(this.setDragState(t,2),0))},processDragMoveEvent:function(t){if(2===this.getDragState(t)&&this.processDragThresholdEvent(t,this.manager.game.loop.now),4!==this.getDragState(t))return 0;for(var e=this._tempZones,i=this._drag[t.id],s=0;s0?(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),e[0]?(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):a.target=null)}else!h&&e[0]&&(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h));if(o.parentContainer){var u=t.worldX-a.dragStartXGlobal,c=t.worldY-a.dragStartYGlobal,p=o.getParentRotation(),f=u*Math.cos(p)+c*Math.sin(p),v=c*Math.cos(p)-u*Math.sin(p);f*=1/o.parentContainer.scaleX,v*=1/o.parentContainer.scaleY,n=f+a.dragStartX,r=v+a.dragStartY}else n=t.worldX-a.dragX,r=t.worldY-a.dragY;o.emit(d.GAMEOBJECT_DRAG,t,n,r),this.emit(d.DRAG,t,o,n,r)}return i.length},processDragUpEvent:function(t){for(var e=this._drag[t.id],i=0;i0){var r=this.manager,o=this._eventData,a=this._eventContainer;o.cancelled=!1;for(var h=!1,l=0;l0){var n=this.manager,r=this._eventData,o=this._eventContainer;r.cancelled=!1;var a=!1;this.sortGameObjects(e,t);for(var h=0;h0){for(this.sortGameObjects(n,t),e=0;e0){for(this.sortGameObjects(r,t),e=0;e-1&&this._draggable.splice(n,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return h(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var s=!1,n=!1,r=!1,o=!1,h=!1,l=!0;if(m(e)){var u=e;e=f(u,"hitArea",null),i=f(u,"hitAreaCallback",null),s=f(u,"draggable",!1),n=f(u,"dropZone",!1),r=f(u,"cursor",!1),o=f(u,"useHandCursor",!1),h=f(u,"pixelPerfect",!1);var c=f(u,"alphaTolerance",1);h&&(e={},i=this.makePixelPerfect(c)),e&&i||(this.setHitAreaFromTexture(t),l=!1)}else"function"!=typeof e||i||(i=e,e={});for(var d=0;d{var s=i(10850),n={},r={register:function(t,e,i,s,r){n[t]={plugin:e,mapping:i,settingsKey:s,configKey:r}},getPlugin:function(t){return n[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,r=e.game.config;for(var o in n){var a=n[o].plugin,h=n[o].mapping,l=n[o].settingsKey,u=n[o].configKey;s(i,l,r[u])&&(t[h]=new a(t))}},remove:function(t){n.hasOwnProperty(t)&&delete n[t]}};t.exports=r},40398:(t,e,i)=>{var s=i(90447),n=i(56694),r=i(53996),o=i(88456),a=i(44521),h=i(93736),l=i(36580),u=new n({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new h,this.prevPosition=new h,this.midPoint=new h(-1,-1),this.velocity=new h,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===e,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(t){var e=t.getWorldPoint(this.x,this.y);return this.worldX=e.x,this.worldY=e.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t=this.position.x,e=this.position.y,i=this.midPoint.x,n=this.midPoint.y;if(t!==i||e!==n){var r=a(this.motionFactor,i,t),h=a(this.motionFactor,n,e);o(r,t,.1)&&(r=t),o(h,e,.1)&&(h=e),this.midPoint.set(r,h);var l=t-r,u=e-h;this.velocity.set(l,u),this.angle=s(r,h,t,e),this.distance=Math.sqrt(l*l+u*u)}},up:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),0===this.buttons&&(this.isDown=!1,this.upTime=t.timeStamp,this.wasTouch=!1)},down:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),l.macOS&&t.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=t.timeStamp),this.wasTouch=!1},move:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.locked&&(this.movementX=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.moveTime=t.timeStamp,this.wasTouch=!1},wheel:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=e,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(t,e){this.event=e,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.moveTime=e.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?s(this.downX,this.downY,this.x,this.y):s(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,s=this.prevPosition.y,n=this.position.x,r=this.position.y,o=0;o{t.exports={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8}},14874:t=>{t.exports="boot"},54168:t=>{t.exports="destroy"},526:t=>{t.exports="dragend"},81623:t=>{t.exports="dragenter"},94472:t=>{t.exports="drag"},9304:t=>{t.exports="dragleave"},34265:t=>{t.exports="dragover"},50151:t=>{t.exports="dragstart"},98134:t=>{t.exports="drop"},56773:t=>{t.exports="gameobjectdown"},45824:t=>{t.exports="dragend"},39578:t=>{t.exports="dragenter"},72072:t=>{t.exports="drag"},82569:t=>{t.exports="dragleave"},70833:t=>{t.exports="dragover"},81442:t=>{t.exports="dragstart"},32936:t=>{t.exports="drop"},99658:t=>{t.exports="gameobjectmove"},60515:t=>{t.exports="gameobjectout"},55254:t=>{t.exports="gameobjectover"},34782:t=>{t.exports="pointerdown"},41769:t=>{t.exports="pointermove"},65588:t=>{t.exports="pointerout"},61640:t=>{t.exports="pointerover"},49342:t=>{t.exports="pointerup"},82662:t=>{t.exports="wheel"},13058:t=>{t.exports="gameobjectup"},52426:t=>{t.exports="gameobjectwheel"},78072:t=>{t.exports="gameout"},1545:t=>{t.exports="gameover"},67137:t=>{t.exports="boot"},27678:t=>{t.exports="process"},22257:t=>{t.exports="update"},90379:t=>{t.exports="pointerlockchange"},88909:t=>{t.exports="pointerdown"},36548:t=>{t.exports="pointerdownoutside"},18483:t=>{t.exports="pointermove"},22355:t=>{t.exports="pointerout"},7997:t=>{t.exports="pointerover"},66318:t=>{t.exports="pointerup"},94812:t=>{t.exports="pointerupoutside"},37310:t=>{t.exports="wheel"},24196:t=>{t.exports="preupdate"},27053:t=>{t.exports="shutdown"},29413:t=>{t.exports="start"},25165:t=>{t.exports="update"},33963:(t,e,i)=>{t.exports={BOOT:i(14874),DESTROY:i(54168),DRAG_END:i(526),DRAG_ENTER:i(81623),DRAG:i(94472),DRAG_LEAVE:i(9304),DRAG_OVER:i(34265),DRAG_START:i(50151),DROP:i(98134),GAME_OUT:i(78072),GAME_OVER:i(1545),GAMEOBJECT_DOWN:i(56773),GAMEOBJECT_DRAG_END:i(45824),GAMEOBJECT_DRAG_ENTER:i(39578),GAMEOBJECT_DRAG:i(72072),GAMEOBJECT_DRAG_LEAVE:i(82569),GAMEOBJECT_DRAG_OVER:i(70833),GAMEOBJECT_DRAG_START:i(81442),GAMEOBJECT_DROP:i(32936),GAMEOBJECT_MOVE:i(99658),GAMEOBJECT_OUT:i(60515),GAMEOBJECT_OVER:i(55254),GAMEOBJECT_POINTER_DOWN:i(34782),GAMEOBJECT_POINTER_MOVE:i(41769),GAMEOBJECT_POINTER_OUT:i(65588),GAMEOBJECT_POINTER_OVER:i(61640),GAMEOBJECT_POINTER_UP:i(49342),GAMEOBJECT_POINTER_WHEEL:i(82662),GAMEOBJECT_UP:i(13058),GAMEOBJECT_WHEEL:i(52426),MANAGER_BOOT:i(67137),MANAGER_PROCESS:i(27678),MANAGER_UPDATE:i(22257),POINTER_DOWN:i(88909),POINTER_DOWN_OUTSIDE:i(36548),POINTER_MOVE:i(18483),POINTER_OUT:i(22355),POINTER_OVER:i(7997),POINTER_UP:i(66318),POINTER_UP_OUTSIDE:i(94812),POINTER_WHEEL:i(37310),POINTERLOCK_CHANGE:i(90379),PRE_UPDATE:i(24196),SHUTDOWN:i(27053),START:i(29413),UPDATE:i(25165)}},70848:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=.1},update:function(t){this.value=t},getValue:function(){return Math.abs(this.value){var s=i(56694),n=i(43200),r=new s({initialize:function(t,e){this.pad=t,this.events=t.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(t){this.value=t;var e=this.pad,i=this.index;t>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(n.BUTTON_DOWN,e,this,t),this.pad.emit(n.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(n.BUTTON_UP,e,this,t),this.pad.emit(n.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},75956:(t,e,i)=>{var s=i(70848),n=i(21274),r=i(56694),o=i(6659),a=i(93736),h=new r({Extends:o,initialize:function(t,e){o.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],r=0;r=2&&(this.leftStick.set(r[0].getValue(),r[1].getValue()),n>=4&&this.rightStick.set(r[2].getValue(),r[3].getValue()))}},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t{var s=i(56694),n=i(6659),r=i(43200),o=i(75956),a=i(10850),h=i(63399),l=i(33963),u=new s({Extends:n,initialize:function(t){n.call(this),this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,t.pluginEvents.once(l.BOOT,this.boot,this),t.pluginEvents.on(l.START,this.start,this)},boot:function(){var t=this.scene.sys.game,e=this.settings.input,i=t.config;this.enabled=a(e,"gamepad",i.inputGamepad)&&t.device.input.gamepads,this.target=a(e,"gamepad.target",i.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(l.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(l.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var t=this,e=this.target,i=function(e){!e.defaultPrevented&&t.isActive()&&(t.refreshPads(),t.queue.push(e))};this.onGamepadHandler=i,e.addEventListener("gamepadconnected",i,!1),e.addEventListener("gamepaddisconnected",i,!1),this.sceneInputPlugin.pluginEvents.on(l.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(l.UPDATE,this.update);for(var t=0;t{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},74982:t=>{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},43247:t=>{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},4898:(t,e,i)=>{t.exports={DUALSHOCK_4:i(74982),SNES_USB:i(33171),XBOX_360:i(43247)}},17344:t=>{t.exports="down"},36635:t=>{t.exports="up"},85724:t=>{t.exports="connected"},55832:t=>{t.exports="disconnected"},772:t=>{t.exports="down"},33608:t=>{t.exports="up"},43200:(t,e,i)=>{t.exports={BUTTON_DOWN:i(17344),BUTTON_UP:i(36635),CONNECTED:i(85724),DISCONNECTED:i(55832),GAMEPAD_BUTTON_DOWN:i(772),GAMEPAD_BUTTON_UP:i(33608)}},92636:(t,e,i)=>{t.exports={Axis:i(70848),Button:i(21274),Events:i(43200),Gamepad:i(75956),GamepadPlugin:i(1379),Configs:i(4898)}},20873:(t,e,i)=>{var s=i(72687),n=i(98611),r={CreatePixelPerfectHandler:i(18104),CreateInteractiveObject:i(27395),Events:i(33963),Gamepad:i(92636),InputManager:i(69898),InputPlugin:i(12499),InputPluginCache:i(63399),Keyboard:i(28388),Mouse:i(11343),Pointer:i(40398),Touch:i(77423)};r=n(!1,r,s),t.exports=r},71064:(t,e,i)=>{var s=i(66458),n=i(56694),r=i(97081),o=i(33963),a=i(11873),h=i(72283),l=new n({initialize:function(t){this.manager=t,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=h,this.onKeyUp=h,t.events.once(o.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.addCapture(t.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(r.POST_STEP,this.postUpdate,this)},startListeners:function(){var t=this;this.onKeyDown=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}},this.onKeyUp=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}};var e=this.target;e&&(e.addEventListener("keydown",this.onKeyDown,!1),e.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var t=this.target;t.removeEventListener("keydown",this.onKeyDown,!1),t.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},removeCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(r.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=l},89666:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(94030),o=i(97081),a=i(10850),h=i(33963),l=i(63399),u=i(50165),c=i(11873),d=i(95625),p=i(48044),f=i(7599),v=i(84314),g=new s({Extends:n,initialize:function(t){n.call(this),this.game=t.systems.game,this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.manager=t.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,t.pluginEvents.once(h.BOOT,this.boot,this),t.pluginEvents.on(h.START,this.start,this)},boot:function(){var t=this.settings.input;this.enabled=a(t,"keyboard",!0);var e=a(t,"keyboard.capture",null);e&&this.addCaptures(e),this.sceneInputPlugin.pluginEvents.once(h.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(h.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(h.SHUTDOWN,this.shutdown,this),this.game.events.on(o.BLUR,this.resetKeys,this),this.scene.sys.events.on(f.PAUSE,this.resetKeys,this),this.scene.sys.events.on(f.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(t){return this.manager.addCapture(t),this},removeCapture:function(t){return this.manager.removeCapture(t),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:c.UP,down:c.DOWN,left:c.LEFT,right:c.RIGHT,space:c.SPACE,shift:c.SHIFT})},addKeys:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var s={};if("string"==typeof t){t=t.split(",");for(var n=0;n-1?s[n]=t:s[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t}return"string"==typeof t&&(t=c[t.toUpperCase()]),s[t]||(s[t]=new u(this,t),e&&this.addCapture(t),s[t].setEmitOnRepeat(i)),s[t]},removeKey:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var s,n=this.keys;if(t instanceof u){var r=n.indexOf(t);r>-1&&(s=this.keys[r],this.keys[r]=void 0)}else"string"==typeof t&&(t=c[t.toUpperCase()]);return n[t]&&(s=n[t],n[t]=void 0),s&&(s.plugin=null,i&&this.removeCapture(s.keyCode),e&&s.destroy()),this},removeAllKeys:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);for(var i=this.keys,s=0;st._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,s=0;s{t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},95625:(t,e,i)=>{var s=i(56694),n=i(94030),r=i(72632),o=i(2544),a=i(88754),h=new s({initialize:function(t,e,i){if(void 0===i&&(i={}),e.length<2)return!1;this.manager=t,this.enabled=!0,this.keyCodes=[];for(var s=0;s{var s=i(60258);t.exports=function(t,e){if(e.matched)return!0;var i=!1,n=!1;if(t.keyCode===e.current)if(e.index>0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(n=!0,i=s(t,e))}else n=!0,i=s(t,e);return!n&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},88754:t=>{t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},5044:t=>{t.exports="keydown"},40813:t=>{t.exports="keyup"},89319:t=>{t.exports="keycombomatch"},43267:t=>{t.exports="down"},78595:t=>{t.exports="keydown-"},30056:t=>{t.exports="keyup-"},81939:t=>{t.exports="up"},94030:(t,e,i)=>{t.exports={ANY_KEY_DOWN:i(5044),ANY_KEY_UP:i(40813),COMBO_MATCH:i(89319),DOWN:i(43267),KEY_DOWN:i(78595),KEY_UP:i(30056),UP:i(81939)}},28388:(t,e,i)=>{t.exports={Events:i(94030),KeyboardManager:i(71064),KeyboardPlugin:i(89666),Key:i(50165),KeyCodes:i(11873),KeyCombo:i(95625),AdvanceKeyCombo:i(60258),ProcessKeyCombo:i(2544),ResetKeyCombo:i(88754),JustDown:i(42460),JustUp:i(53162),DownDuration:i(64964),UpDuration:i(70331)}},64964:t=>{t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeDown;return t.isDown&&i{t.exports=function(t){return!!t._justDown&&(t._justDown=!1,!0)}},53162:t=>{t.exports=function(t){return!!t._justUp&&(t._justUp=!1,!0)}},50165:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(94030),o=new s({Extends:n,initialize:function(t,e){n.call(this),this.plugin=t,this.keyCode=e,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(t){return this.emitOnRepeat=t,this},onDown:function(t){this.originalEvent=t,this.enabled&&(this.altKey=t.altKey,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.location=t.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(r.DOWN,this,t):(this.isDown=!0,this.isUp=!1,this.timeDown=t.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(r.DOWN,this,t)))},onUp:function(t){this.originalEvent=t,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=t.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(r.UP,this,t))},reset:function(){return this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});t.exports=o},11873:t=>{t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},48044:(t,e,i)=>{var s=i(11873),n={};for(var r in s)n[s[r]]=r;t.exports=n},70331:t=>{t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeUp;return t.isUp&&i{var s=i(56694),n=i(90185),r=i(33963),o=i(72283),a=new s({initialize:function(t){this.manager=t,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=o,this.onMouseDown=o,this.onMouseUp=o,this.onMouseDownWindow=o,this.onMouseUpWindow=o,this.onMouseOver=o,this.onMouseOut=o,this.onMouseWheel=o,this.pointerLockChange=o,this.isTop=!0,t.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.passive=t.inputMousePassive,this.preventDefaultDown=t.inputMousePreventDefaultDown,this.preventDefaultUp=t.inputMousePreventDefaultUp,this.preventDefaultMove=t.inputMousePreventDefaultMove,this.preventDefaultWheel=t.inputMousePreventDefaultWheel,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",(function(t){return t.preventDefault(),!1})),this},requestPointerLock:function(){if(n.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},releasePointerLock:function(){n.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this.target;if(t){var e=this,i=this.manager,s=i.canvas,r=window&&window.focus&&i.game.config.autoFocus;this.onMouseMove=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseMove(t),e.preventDefaultMove&&t.preventDefault())},this.onMouseDown=function(t){r&&window.focus(),!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseDown(t),e.preventDefaultDown&&t.target===s&&t.preventDefault())},this.onMouseDownWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onMouseDown(t)},this.onMouseUp=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseUp(t),e.preventDefaultUp&&t.target===s&&t.preventDefault())},this.onMouseUpWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onMouseUp(t)},this.onMouseOver=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOver(t)},this.onMouseOut=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOut(t)},this.onMouseWheel=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onMouseWheel(t),e.preventDefaultWheel&&t.target===s&&t.preventDefault()};var o={passive:!0};if(t.addEventListener("mousemove",this.onMouseMove),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("mouseover",this.onMouseOver,o),t.addEventListener("mouseout",this.onMouseOut,o),this.preventDefaultWheel?t.addEventListener("wheel",this.onMouseWheel,{passive:!1}):t.addEventListener("wheel",this.onMouseWheel,o),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,o),window.top.addEventListener("mouseup",this.onMouseUpWindow,o)}catch(t){window.addEventListener("mousedown",this.onMouseDownWindow,o),window.addEventListener("mouseup",this.onMouseUpWindow,o),this.isTop=!1}n.pointerLock&&(this.pointerLockChange=function(t){var s=e.target;e.locked=document.pointerLockElement===s||document.mozPointerLockElement===s||document.webkitPointerLockElement===s,i.onPointerLockChange(t)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&((t=this.isTop?window.top:window).removeEventListener("mousedown",this.onMouseDownWindow),t.removeEventListener("mouseup",this.onMouseUpWindow)),n.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=a},11343:(t,e,i)=>{t.exports={MouseManager:i(7905)}},37579:(t,e,i)=>{var s=i(56694),n=i(33963),r=i(72283),o=new s({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=r,this.onTouchStartWindow=r,this.onTouchMove=r,this.onTouchEnd=r,this.onTouchEndWindow=r,this.onTouchCancel=r,this.onTouchCancelWindow=r,this.isTop=!0,t.events.once(n.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputTouch,this.target=t.inputTouchEventTarget,this.capture=t.inputTouchCapture,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",(function(t){return t.preventDefault(),!1})),this},startListeners:function(){var t=this.target;if(t){var e=this,i=this.manager,s=i.canvas,n=window&&window.focus&&i.game.config.autoFocus;this.onTouchMove=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchMove(t),e.capture&&t.cancelable&&t.preventDefault())},this.onTouchStart=function(t){n&&window.focus(),!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchStart(t),e.capture&&t.cancelable&&t.target===s&&t.preventDefault())},this.onTouchStartWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onTouchStart(t)},this.onTouchEnd=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchEnd(t),e.capture&&t.cancelable&&t.target===s&&t.preventDefault())},this.onTouchEndWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onTouchEnd(t)},this.onTouchCancel=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchCancel(t),e.capture&&t.preventDefault())},this.onTouchCancelWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onTouchCancel(t)};var r=this.capture,o={passive:!0},a={passive:!1};if(t.addEventListener("touchstart",this.onTouchStart,r?a:o),t.addEventListener("touchmove",this.onTouchMove,r?a:o),t.addEventListener("touchend",this.onTouchEnd,r?a:o),t.addEventListener("touchcancel",this.onTouchCancel,r?a:o),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,a),window.top.addEventListener("touchend",this.onTouchEndWindow,a),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,a)}catch(t){window.addEventListener("touchstart",this.onTouchStartWindow,a),window.addEventListener("touchend",this.onTouchEndWindow,a),window.addEventListener("touchcancel",this.onTouchCancelWindow,a),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("touchstart",this.onTouchStart),t.removeEventListener("touchmove",this.onTouchMove),t.removeEventListener("touchend",this.onTouchEnd),t.removeEventListener("touchcancel",this.onTouchCancel),window&&((t=this.isTop?window.top:window).removeEventListener("touchstart",this.onTouchStartWindow),t.removeEventListener("touchend",this.onTouchEndWindow),t.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=o},77423:(t,e,i)=>{t.exports={TouchManager:i(37579)}},98035:(t,e,i)=>{var s=i(56694),n=i(12117),r=i(683),o=i(72632),a=i(30750),h=i(43531),l=i(88490),u=i(33868),c=new s({initialize:function(t,e){if(this.loader=t,this.cache=o(e,"cache",!1),this.type=o(e,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=o(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.key)throw new Error("Invalid File key: "+this.key);var s=o(e,"url");void 0===s?s=t.path+i+"."+o(e,"extension",""):"string"!=typeof s||s.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(s=t.path+s),this.url=s,this.src="",this.xhrSettings=u(o(e,"responseType",void 0)),o(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,o(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?n.FILE_POPULATED:n.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=o(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===n.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=n.FILE_LOADING,this.src=a(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&this.loader.localSchemes.some((function(e){return 0===t.responseURL.indexOf(e)}))&&0===e.target.status,s=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(s=!1),this.state=n.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,s)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(r.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=n.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=n.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=n.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(t){if(this.state!==n.FILE_PENDING_DESTROY){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(r.FILE_COMPLETE,e,i,t),this.loader.emit(r.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this),this.state=n.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var s=new FileReader;s.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+s.result.split(",")[1]},s.onerror=t.onerror,s.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},76846:t=>{var e={},i={install:function(t){for(var i in e)t[i]=e[i]},register:function(t,i){e[t]=i},destroy:function(){e={}}};t.exports=i},30750:t=>{t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},67285:(t,e,i)=>{var s=i(56694),n=i(12117),r=i(58403),o=i(6659),a=i(683),h=i(76846),l=i(72632),u=i(10850),c=i(91963),d=i(7599),p=i(33868),f=new s({Extends:o,initialize:function(t){o.call(this);var e=t.sys.game.config,i=t.sys.settings.loader;this.scene=t,this.systems=t.sys,this.cacheManager=t.sys.cache,this.textureManager=t.sys.textures,this.sceneManager=t.sys.game.scene,h.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(l(i,"baseURL",e.loaderBaseURL)),this.setPath(l(i,"path",e.loaderPath)),this.setPrefix(l(i,"prefix",e.loaderPrefix)),this.maxParallelDownloads=l(i,"maxParallelDownloads",e.loaderMaxParallelDownloads),this.xhr=p(l(i,"responseType",e.loaderResponseType),l(i,"async",e.loaderAsync),l(i,"user",e.loaderUser),l(i,"password",e.loaderPassword),l(i,"timeout",e.loaderTimeout),l(i,"withCredentials",e.loaderWithCredentials)),this.crossOrigin=l(i,"crossOrigin",e.loaderCrossOrigin),this.imageLoadType=l(i,"imageLoadType",e.loaderImageLoadType),this.localSchemes=l(i,"localScheme",e.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new r,this.inflight=new r,this.queue=new r,this._deleteQueue=new r,this.totalFailed=0,this.totalComplete=0,this.state=n.LOADER_IDLE,this.multiKeyIndex=0,t.sys.events.once(d.BOOT,this.boot,this),t.sys.events.on(d.START,this.pluginStart,this)},boot:function(){this.systems.events.once(d.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(d.SHUTDOWN,this.shutdown,this)},setBaseURL:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.baseURL=t,this},setPath:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.path=t,this},setPrefix:function(t){return void 0===t&&(t=""),this.prefix=t,this},setCORS:function(t){return this.crossOrigin=t,this},addFile:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e0},isLoading:function(){return this.state===n.LOADER_LOADING||this.state===n.LOADER_PROCESSING},isReady:function(){return this.state===n.LOADER_IDLE||this.state===n.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(a.START,this),0===this.list.size?this.loadComplete():(this.state=n.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(d.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(a.PROGRESS,this.progress)},update:function(){this.state===n.LOADER_LOADING&&this.list.size>0&&this.inflight.size{var s=i(98611),n=i(33868);t.exports=function(t,e){var i=void 0===t?n():s({},t);if(e)for(var r in e)void 0!==e[r]&&(i[r]=e[r]);return i}},45176:(t,e,i)=>{var s=i(56694),n=i(12117),r=i(683),o=new s({initialize:function(t,e,i,s){var r=[];s.forEach((function(t){t&&r.push(t)})),this.loader=t,this.type=e,this.key=i,this.multiKeyIndex=t.multiKeyIndex++,this.files=r,this.state=n.FILE_PENDING,this.complete=!1,this.pending=r.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var o=0;o{var s=i(43531);t.exports=function(t,e){var i=s(e,t.xhrSettings),n=new XMLHttpRequest;if(n.open("GET",t.src,i.async,i.user,i.password),n.responseType=t.xhrSettings.responseType,n.timeout=i.timeout,i.headers)for(var r in i.headers)n.setRequestHeader(r,i.headers[r]);return i.header&&i.headerValue&&n.setRequestHeader(i.header,i.headerValue),i.requestedWith&&n.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&n.overrideMimeType(i.overrideMimeType),i.withCredentials&&(n.withCredentials=!0),n.onload=t.onLoad.bind(t,n),n.onerror=t.onError.bind(t,n),n.onprogress=t.onProgress.bind(t),n.send(),n}},33868:t=>{t.exports=function(t,e,i,s,n,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===s&&(s=""),void 0===n&&(n=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:s,timeout:n,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},12117:t=>{t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20}},7398:t=>{t.exports="addfile"},52187:t=>{t.exports="complete"},36627:t=>{t.exports="filecomplete"},81925:t=>{t.exports="filecomplete-"},29774:t=>{t.exports="loaderror"},20943:t=>{t.exports="load"},74693:t=>{t.exports="fileprogress"},71176:t=>{t.exports="postprocess"},88984:t=>{t.exports="progress"},72753:t=>{t.exports="start"},683:(t,e,i)=>{t.exports={ADD:i(7398),COMPLETE:i(52187),FILE_COMPLETE:i(36627),FILE_KEY_COMPLETE:i(81925),FILE_LOAD_ERROR:i(29774),FILE_LOAD:i(20943),FILE_PROGRESS:i(74693),POST_PROCESS:i(71176),PROGRESS:i(88984),START:i(72753)}},46468:(t,e,i)=>{var s=i(56694),n=i(76846),r=i(70806),o=i(683),a=new s({Extends:r,initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.type="animationJSON"},onProcess:function(){this.loader.once(o.POST_PROCESS,this.onLoadComplete,this),r.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});n.register("animation",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(70806),l=i(45176),u=new s({Extends:l,initialize:function(t,e,i,s,n,u){var c,d;if(a(e)){var p=e;e=r(p,"key"),c=new o(t,{key:e,url:r(p,"textureURL"),extension:r(p,"textureExtension","png"),normalMap:r(p,"normalMap"),xhrSettings:r(p,"textureXhrSettings")}),d=new h(t,{key:e,url:r(p,"atlasURL"),extension:r(p,"atlasExtension","json"),xhrSettings:r(p,"atlasXhrSettings")})}else c=new o(t,e,i,n),d=new h(t,e,s,u);c.linkFile?l.call(this,t,"atlasjson",e,[c,d,c.linkFile]):l.call(this,t,"atlasjson",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),e.addToCache(),this.complete=!0}}});n.register("aseprite",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(70806),l=i(45176),u=new s({Extends:l,initialize:function(t,e,i,s,n,u){var c,d;if(a(e)){var p=e;e=r(p,"key"),c=new o(t,{key:e,url:r(p,"textureURL"),extension:r(p,"textureExtension","png"),normalMap:r(p,"normalMap"),xhrSettings:r(p,"textureXhrSettings")}),d=new h(t,{key:e,url:r(p,"atlasURL"),extension:r(p,"atlasExtension","json"),xhrSettings:r(p,"atlasXhrSettings")})}else c=new o(t,e,i,n),d=new h(t,e,s,u);c.linkFile?l.call(this,t,"atlasjson",e,[c,d,c.linkFile]):l.call(this,t,"atlasjson",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),this.complete=!0}}});n.register("atlas",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(45176),l=i(15297),u=new s({Extends:h,initialize:function(t,e,i,s,n,u){var c,d;if(a(e)){var p=e;e=r(p,"key"),c=new o(t,{key:e,url:r(p,"textureURL"),extension:r(p,"textureExtension","png"),normalMap:r(p,"normalMap"),xhrSettings:r(p,"textureXhrSettings")}),d=new l(t,{key:e,url:r(p,"atlasURL"),extension:r(p,"atlasExtension","xml"),xhrSettings:r(p,"atlasXhrSettings")})}else c=new o(t,e,i,n),d=new l(t,e,s,u);c.linkFile?h.call(this,t,"atlasxml",e,[c,d,c.linkFile]):h.call(this,t,"atlasxml",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(t.key,t.data,e.data,i),this.complete=!0}}});n.register("atlasXML",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(30929),l=i(42911),u=new s({Extends:r,initialize:function(t,e,i,s,n){if(l(e)){var o=e;e=a(o,"key"),s=a(o,"xhrSettings"),n=a(o,"context",n)}var h={type:"audio",cache:t.cacheManager.audio,extension:i.type,responseType:"arraybuffer",key:e,url:i.url,xhrSettings:s,config:{context:n}};r.call(this,t,h)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this;this.config.context.decodeAudioData(this.xhrLoader.response,(function(e){t.data=e,t.onProcessComplete()}),(function(e){console.error("Error decoding audio: "+t.key+" - ",e?e.message:null),t.onProcessError()})),this.config.context=null}});u.create=function(t,e,i,s,n){var r=t.systems.game,o=r.config.audio,c=r.device.audio;l(e)&&(i=a(e,"url",[]),s=a(e,"config",{}));var d=u.getAudioURL(r,i);return d?c.webAudio&&!o.disableWebAudio?new u(t,e,d,n,r.sound.context):new h(t,e,d,s):null},u.getAudioURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i{var s=i(67448),n=i(56694),r=i(76846),o=i(72632),a=i(42911),h=i(70806),l=i(45176),u=new n({Extends:l,initialize:function(t,e,i,n,r,u,c){if(a(e)){var d=e;e=o(d,"key"),i=o(d,"jsonURL"),n=o(d,"audioURL"),r=o(d,"audioConfig"),u=o(d,"audioXhrSettings"),c=o(d,"jsonXhrSettings")}var p;if(n){var f=s.create(t,e,n,r,u);f&&(p=new h(t,e,i,c),l.call(this,t,"audiosprite",e,[f,p]),this.config.resourceLoad=!1)}else p=new h(t,e,i,c),l.call(this,t,"audiosprite",e,[p]),this.config.resourceLoad=!0,this.config.audioConfig=r,this.config.audioXhrSettings=u},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,this.config.resourceLoad&&"json"===t.type&&t.data.hasOwnProperty("resources"))){var e=t.data.resources,i=o(this.config,"audioConfig"),n=o(this.config,"audioXhrSettings"),r=s.create(this.loader,t.key,e,i,n);r&&(this.addToMultiFile(r),this.loader.addFile(r))}},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache(),e.addToCache(),this.complete=!0}}});r.register("audioSprite",(function(t,e,i,s,n,r){var o,a=this.systems.game,h=a.config.audio,l=a.device.audio;if(h&&h.noAudio||!l.webAudio&&!l.audioData)return this;if(Array.isArray(t))for(var c=0;c{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n){var o="bin";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),s=a(l,"xhrSettings"),o=a(l,"extension",o),n=a(l,"dataType",n)}var u={type:"binary",cache:t.cacheManager.binary,extension:o,responseType:"arraybuffer",key:e,url:i,xhrSettings:s,config:{dataType:n}};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this.config.dataType;this.data=t?new t(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});o.register("binary",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(45176),l=i(31476),u=i(15297),c=new s({Extends:h,initialize:function(t,e,i,s,n,l){var c,d;if(a(e)){var p=e;e=r(p,"key"),c=new o(t,{key:e,url:r(p,"textureURL"),extension:r(p,"textureExtension","png"),normalMap:r(p,"normalMap"),xhrSettings:r(p,"textureXhrSettings")}),d=new u(t,{key:e,url:r(p,"fontDataURL"),extension:r(p,"fontDataExtension","xml"),xhrSettings:r(p,"fontDataXhrSettings")})}else c=new o(t,e,i,n),d=new u(t,e,s,l);c.linkFile?h.call(this,t,"bitmapfont",e,[c,d,c.linkFile]):h.call(this,t,"bitmapfont",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache();var i=t.cache.get(t.key),s=l(e.data,t.cache.getFrame(t.key),0,0,i);this.loader.cacheManager.bitmapFont.add(t.key,{data:s,texture:t.key,frame:null}),this.complete=!0}}});n.register("bitmapFont",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="css";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var l={type:"script",cache:!1,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});o.register("css",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(73152),n=i(40612),r=i(56694),o=i(76846),a=i(72632),h=i(42927),l=i(42911),u=i(70806),c=i(67409),d=i(30657),p=i(80802),f=i(45176),v=i(24904),g=new r({Extends:f,initialize:function(t,e,i,s){if(i.multiAtlasURL){var r=new u(t,{key:e,url:i.multiAtlasURL,xhrSettings:s,config:i});f.call(this,t,"texture",e,[r])}else{var o=i.textureURL.substr(i.textureURL.length-3);i.type||(i.type="ktx"===o.toLowerCase()?"KTX":"PVR");var a=new n(t,{key:e,url:i.textureURL,extension:o,xhrSettings:s,config:i});if(i.atlasURL){var h=new u(t,{key:e,url:i.atlasURL,xhrSettings:s,config:i});f.call(this,t,"texture",e,[a,h])}else f.call(this,t,"texture",e,[a])}this.config=i},onFileComplete:function(t){if(-1!==this.files.indexOf(t)){if(this.pending--,!this.config.multiAtlasURL)return;if("json"===t.type&&t.data.hasOwnProperty("textures")){var e=t.data.textures,i=this.config,s=this.loader,r=s.baseURL,o=s.path,h=s.prefix,l=a(i,"multiBaseURL",this.baseURL),u=a(i,"multiPath",this.path),c=a(i,"prefix",this.prefix),d=a(i,"textureXhrSettings");l&&s.setBaseURL(l),u&&s.setPath(u),c&&s.setPrefix(c);for(var p=0;p{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=i(31053),u=new s({Extends:r,initialize:function(t,e,i,s,n){var o="glsl";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),s=a(l,"shaderType","fragment"),n=a(l,"xhrSettings"),o=a(l,"extension",o)}else void 0===s&&(s="fragment");var u={type:"glsl",cache:t.cacheManager.shader,extension:o,responseType:"text",key:e,url:i,config:{shaderType:s},xhrSettings:n};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.split("\n"),e=this.extractBlock(t,0);if(e)for(;e;){var i=this.getShaderName(e.header),s=this.getShaderType(e.header),n=this.getShaderUniforms(e.header),r=e.shader;if(this.cache.has(i)){var o=this.cache.get(i);"fragment"===s?o.fragmentSrc=r:o.vertexSrc=r,o.uniforms||(o.uniforms=n)}else"fragment"===s?this.cache.add(i,new l(i,r,"",n)):this.cache.add(i,new l(i,"",r,n));e=this.extractBlock(t,e.offset)}else"fragment"===this.config.shaderType?this.cache.add(this.key,new l(this.key,this.data)):this.cache.add(this.key,new l(this.key,"",this.data))},getShaderName:function(t){for(var e=0;e{var s=i(56694),n=i(683),r=i(98035),o=i(72632),a=i(30750),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){if(h(e)){var n=e;e=o(n,"key"),s=o(n,"config",s)}var a={type:"audio",cache:t.cacheManager.audio,extension:i.type,key:e,url:i.url,config:s};r.call(this,t,a),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="html";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var l={type:"text",cache:t.cacheManager.html,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("html",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n,o){void 0===s&&(s=512),void 0===n&&(n=512);var l="html";if(h(e)){var u=e;e=a(u,"key"),i=a(u,"url"),o=a(u,"xhrSettings"),l=a(u,"extension",l),s=a(u,"width",s),n=a(u,"height",n)}var c={type:"html",cache:t.textureManager,extension:l,responseType:"text",key:e,url:i,xhrSettings:o,config:{width:s,height:n}};r.call(this,t,c)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this.config.width,e=this.config.height,i=[];i.push(''),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var s=[i.join("\n")],o=this;try{var a=new window.Blob(s,{type:"image/svg+xml;charset=utf-8"})}catch(t){return o.state=n.FILE_ERRORED,void o.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(o.data),o.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(o.data),o.onProcessError()},r.createObjectURL(this.data,a,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});o.register("htmlTexture",(function(t,e,i,s,n){if(Array.isArray(t))for(var r=0;r{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=i(30750),u=new s({Extends:r,initialize:function t(e,i,s,n,o){var l,u="png";if(h(i)){var c=i;i=a(c,"key"),s=a(c,"url"),l=a(c,"normalMap"),n=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"frameConfig")}Array.isArray(s)&&(l=s[1],s=s[0]);var d={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:s,xhrSettings:n,config:o};if(r.call(this,e,d),l){var p=new t(e,this.key,l,n,o);p.type="normalMap",this.setLink(p),e.addFile(p)}this.useImageElementLoad="HTMLImageElement"===e.imageLoadType,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){r.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(t.data),t.onProcessError()},r.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=n.FILE_PROCESSING,t===n.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){if(this.state=n.FILE_LOADING,this.src=l(this,this.loader.baseURL),0===this.src.indexOf("data:"))console.warn("Local data URIs are not supported: "+this.key);else{this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=n.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src}},addToCache:function(){var t=this.linkFile;t?t.state>=n.FILE_COMPLETE&&("normalMap"===this.type?this.cache.addImage(this.key,t.data,this.data):this.cache.addImage(this.key,this.data,t.data)):this.cache.addImage(this.key,this.data)}});o.register("image",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(10850),l=i(42911),u=new s({Extends:r,initialize:function(t,e,i,s,o){var u="json";if(l(e)){var c=e;e=a(c,"key"),i=a(c,"url"),s=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"dataKey",o)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:s,config:o};r.call(this,t,d),l(i)&&(this.data=o?h(i,o):i,this.state=n.FILE_POPULATED)},onProcess:function(){if(this.state!==n.FILE_POPULATED){this.state=n.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});o.register("json",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(70806),l=i(45176),u=new s({Extends:l,initialize:function(t,e,i,s,n,o,u){if(a(e)){var c=e;e=r(c,"key"),i=r(c,"url",!1)?r(c,"url"):r(c,"atlasURL"),o=r(c,"xhrSettings"),s=r(c,"path"),n=r(c,"baseURL"),u=r(c,"textureXhrSettings")}var d=new h(t,e,i,o);l.call(this,t,"multiatlas",e,[d]),this.config.path=s,this.config.baseURL=n,this.config.textureXhrSettings=u},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"json"===t.type&&t.data.hasOwnProperty("textures"))){var e=t.data.textures,i=this.config,s=this.loader,n=s.baseURL,a=s.path,h=s.prefix,l=r(i,"baseURL",this.baseURL),u=r(i,"path",this.path),c=r(i,"prefix",this.prefix),d=r(i,"textureXhrSettings");s.setBaseURL(l),s.setPath(u),s.setPrefix(c);for(var p=0;p{var s=i(56694),n=i(76846),r=i(72632),o=i(42911),a=i(45176),h=i(55188),l=new s({Extends:a,initialize:function(t,e,i,s){var n="js",l=[];if(o(e)){var u=e;e=r(u,"key"),i=r(u,"url"),s=r(u,"xhrSettings"),n=r(u,"extension",n)}Array.isArray(i)||(i=[i]);for(var c=0;c{var s=i(56694),n=i(76846),r=i(72632),o=i(42911),a=i(45176),h=i(27291),l=i(76799),u=i(86897),c=new s({Extends:a,initialize:function(t,e,i,s,n,h){var l,c,d=t.cacheManager.obj;if(o(e)){var p=e;e=r(p,"key"),l=new u(t,{key:e,type:"obj",cache:d,url:r(p,"url"),extension:r(p,"extension","obj"),xhrSettings:r(p,"xhrSettings"),config:{flipUV:r(p,"flipUV",n)}}),(s=r(p,"matURL"))&&(c=new u(t,{key:e,type:"mat",cache:d,url:s,extension:r(p,"matExtension","mat"),xhrSettings:r(p,"xhrSettings")}))}else l=new u(t,{key:e,url:i,type:"obj",cache:d,extension:"obj",xhrSettings:h,config:{flipUV:n}}),s&&(c=new u(t,{key:e,url:s,type:"mat",cache:d,extension:"mat",xhrSettings:h}));a.call(this,t,"obj",e,[l,c])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=h(t.data,t.config.flipUV);e&&(i.materials=l(e.data)),t.cache.add(t.key,i),this.complete=!0}}});n.register("obj",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(12117),r=i(76846),o=i(70806),a=new s({Extends:o,initialize:function(t,e,i,s,n){o.call(this,t,e,i,s,n),this.type="packfile"},onProcess:function(){if(this.state!==n.FILE_POPULATED&&(this.state=n.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var t={};t[this.config]=this.data,this.data=t}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});r.register("pack",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,o,l){var u="js";if(h(e)){var c=e;e=a(c,"key"),i=a(c,"url"),l=a(c,"xhrSettings"),u=a(c,"extension",u),s=a(c,"start"),o=a(c,"mapping")}var d={type:"plugin",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:l,config:{start:s,mapping:o}};r.call(this,t,d),"function"==typeof i&&(this.data=i,this.state=n.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=a(e,"start",!1),s=a(e,"mapping",null);if(this.state===n.FILE_POPULATED)t.install(this.key,this.data,i,s);else{this.state=n.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var r=t.install(this.key,window[this.key],i,s);(i||s)&&(this.loader.systems[s]=r,this.loader.scene[s]=r)}this.onProcessComplete()}});o.register("plugin",(function(t,e,i,s,n){if(Array.isArray(t))for(var r=0;r{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n){var o="svg";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),s=a(l,"svgConfig",{}),n=a(l,"xhrSettings"),o=a(l,"extension",o)}var u={type:"svg",cache:t.textureManager,extension:o,responseType:"text",key:e,url:i,xhrSettings:n,config:{width:a(s,"width"),height:a(s,"height"),scale:a(s,"scale")}};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this.xhrLoader.responseText,e=[t],i=this.config.width,s=this.config.height,o=this.config.scale;t:if(i&&s||o){var a=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("svg")[0],h=a.hasAttribute("viewBox"),l=parseFloat(a.getAttribute("width")),u=parseFloat(a.getAttribute("height"));if(!h&&l&&u)a.setAttribute("viewBox","0 0 "+l+" "+u);else if(h&&!l&&!u){var c=a.getAttribute("viewBox").split(/\s+|,/);l=c[2],u=c[3]}if(o){if(!l||!u)break t;i=l*o,s=u*o}a.setAttribute("width",i.toString()+"px"),a.setAttribute("height",s.toString()+"px"),e=[(new XMLSerializer).serializeToString(a)]}try{var d=new window.Blob(e,{type:"image/svg+xml;charset=utf-8"})}catch(t){return void this.onProcessError()}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var p=this,f=!1;this.data.onload=function(){f||r.revokeObjectURL(p.data),p.onProcessComplete()},this.data.onerror=function(){f?p.onProcessError():(f=!0,r.revokeObjectURL(p.data),p.data.src="data:image/svg+xml,"+encodeURIComponent(e.join("")))},r.createObjectURL(this.data,d,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});o.register("svg",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="js";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var l={type:"text",extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.concat("(function(){\nreturn new "+this.key+"();\n}).call(this);"),e=eval;this.loader.sceneManager.add(this.key,e(t)),this.complete=!0}});o.register("sceneFile",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,o,l){var u="js";if(h(e)){var c=e;e=a(c,"key"),i=a(c,"url"),l=a(c,"xhrSettings"),u=a(c,"extension",u),s=a(c,"systemKey"),o=a(c,"sceneKey")}var d={type:"scenePlugin",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:l,config:{systemKey:s,sceneKey:o}};r.call(this,t,d),"function"==typeof i&&(this.data=i,this.state=n.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=this.key,s=a(e,"systemKey",i),r=a(e,"sceneKey",i);this.state===n.FILE_POPULATED?t.installScenePlugin(s,this.data,r,this.loader.scene,!0):(this.state=n.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),t.installScenePlugin(s,window[this.key],r,this.loader.scene,!0)),this.onProcessComplete()}});o.register("scenePlugin",(function(t,e,i,s,n){if(Array.isArray(t))for(var r=0;r{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n){var o="js";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),s=a(l,"type","script"),n=a(l,"xhrSettings"),o=a(l,"extension",o)}else void 0===s&&(s="script");var u={type:s,cache:!1,extension:o,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});o.register("script",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(42927),o=new s({Extends:r,initialize:function(t,e,i,s,n){r.call(this,t,e,i,n,s),this.type="spritesheet"},addToCache:function(){this.cache.addSpriteSheet(this.key,this.data,this.config)}});n.register("spritesheet",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="text",o="txt",l=t.cacheManager.text;if(h(e)){var u=e;e=a(u,"key"),i=a(u,"url"),s=a(u,"xhrSettings"),o=a(u,"extension",o),n=a(u,"type",n),l=a(u,"cache",l)}var c={type:n,cache:l,extension:o,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,c)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("text",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=i(93560),u=new s({Extends:r,initialize:function(t,e,i,s){var n="csv";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var u={type:"tilemapCSV",cache:t.cacheManager.tilemap,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,u),this.tilemapFormat=l.CSV},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,t)}});o.register("tilemapCSV",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(76846),r=i(70806),o=i(93560),a=new s({Extends:r,initialize:function(t,e,i,s){r.call(this,t,e,i,s),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:o.WELTMEISTER,data:this.data};this.cache.add(this.key,t)}});n.register("tilemapImpact",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(76846),r=i(70806),o=i(93560),a=new s({Extends:r,initialize:function(t,e,i,s){r.call(this,t,e,i,s),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:o.TILED_JSON,data:this.data};this.cache.add(this.key,t)}});n.register("tilemapTiledJSON",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(45176),l=i(86897),u=new s({Extends:h,initialize:function(t,e,i,s,n,u){var c,d;if(a(e)){var p=e;e=r(p,"key"),c=new o(t,{key:e,url:r(p,"textureURL"),extension:r(p,"textureExtension","png"),normalMap:r(p,"normalMap"),xhrSettings:r(p,"textureXhrSettings")}),d=new l(t,{key:e,url:r(p,"atlasURL"),extension:r(p,"atlasExtension","txt"),xhrSettings:r(p,"atlasXhrSettings")})}else c=new o(t,e,i,n),d=new l(t,e,s,u);c.linkFile?h.call(this,t,"unityatlas",e,[c,d,c.linkFile]):h.call(this,t,"unityatlas",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(t.key,t.data,e.data,i),this.complete=!0}}});n.register("unityAtlas",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(30750),h=i(72632),l=i(42911),u=new s({Extends:r,initialize:function(t,e,i,s,n,o,a){void 0===s&&(s="loadeddata"),void 0===n&&(n=!1),void 0===o&&(o=!1),"loadeddata"!==s&&"canplay"!==s&&"canplaythrough"!==s&&(s="loadeddata");var h={type:"video",cache:t.cacheManager.video,extension:i.type,responseType:"blob",key:e,url:i.url,xhrSettings:a,config:{loadEvent:s,asBlob:n,noAudio:o}};this.onLoadCallback=this.onVideoLoadHandler.bind(this),this.onErrorCallback=this.onVideoErrorHandler.bind(this),r.call(this,t,h)},onProcess:function(){if(this.state=n.FILE_PROCESSING,this.config.asBlob){var t=this.createVideoElement();this.data=t;var e=this;this.data.onloadeddata=function(){e.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(e.data),e.onProcessError()},r.createObjectURL(t,this.xhrLoader.response,""),t.load()}else this.onProcessComplete()},createVideoElement:function(){var t=document.createElement("video");return t.controls=!1,t.crossOrigin=this.loader.crossOrigin,this.config.noAudio&&(t.muted=!0,t.defaultMuted=!0,t.setAttribute("autoplay","autoplay")),t.setAttribute("playsinline","playsinline"),t.setAttribute("preload","auto"),t},onVideoLoadHandler:function(t){var e=t.target;e.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),e.removeEventListener("error",this.onErrorCallback,!0),this.data=e,this.resetXHR(),this.loader.nextFile(this,!0)},onVideoErrorHandler:function(t){var e=t.target;e&&(e.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),e.removeEventListener("error",this.onErrorCallback,!0)),this.resetXHR(),this.loader.nextFile(this,!1)},load:function(){var t=this.config.loadEvent;if(this.config.asBlob)r.prototype.load.call(this);else{this.percentComplete=0;var e=this.createVideoElement();e.addEventListener(t,this.onLoadCallback,!0),e.addEventListener("error",this.onErrorCallback,!0),e.src=a(this,this.loader.baseURL),e.load()}}});u.create=function(t,e,i,s,n,r,o){var a=t.systems.game;l(e)&&(i=h(e,"url",[]),s=h(e,"loadEvent","loadeddata"),n=h(e,"asBlob",!1),r=h(e,"noAudio",!1),o=h(e,"xhrSettings"),e=h(e,"key"));var c=u.getVideoURL(a,i);if(c)return new u(t,e,c,s,n,r,o)},u.getVideoURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=i(89200),u=new s({Extends:r,initialize:function(t,e,i,s){var n="xml";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var l={type:"xml",cache:t.cacheManager.xml,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});o.register("xml",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{t.exports={AnimationJSONFile:i(46468),AsepriteFile:i(31648),AtlasJSONFile:i(73152),AtlasXMLFile:i(24616),AudioFile:i(67448),AudioSpriteFile:i(66109),BinaryFile:i(40612),BitmapFontFile:i(54565),CompressedTextureFile:i(47375),CSSFile:i(99898),GLSLFile:i(46568),HTML5AudioFile:i(30929),HTMLFile:i(77459),HTMLTextureFile:i(9755),ImageFile:i(42927),JSONFile:i(70806),MultiAtlasFile:i(80802),MultiScriptFile:i(39034),OBJFile:i(85527),PackFile:i(3616),PluginFile:i(12217),SceneFile:i(95171),ScenePluginFile:i(82458),ScriptFile:i(55188),SpriteSheetFile:i(33536),SVGFile:i(4474),TextFile:i(86897),TilemapCSVFile:i(58673),TilemapImpactFile:i(98896),TilemapJSONFile:i(50563),UnityAtlasFile:i(82857),VideoFile:i(22833),XMLFile:i(15297)}},95695:(t,e,i)=>{var s=i(12117),n=i(98611),r={Events:i(683),FileTypes:i(34034),File:i(98035),FileTypesManager:i(76846),GetURL:i(30750),LoaderPlugin:i(67285),MergeXHRSettings:i(43531),MultiFile:i(45176),XHRLoader:i(88490),XHRSettings:i(33868)};r=n(!1,r,s),t.exports=r},26042:t=>{t.exports=function(t){for(var e=0,i=0;i{var s=i(8034);t.exports=function(t,e){return s(t)/s(e)/s(t-e)}},17489:t=>{t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},14976:t=>{t.exports=function(t,e,i,s,n){var r=.5*(s-e),o=.5*(n-i),a=t*t;return(2*i-2*s+r+o)*(t*a)+(-3*i+3*s-2*r-o)*a+r*t+i}},89129:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.ceil(t*s)/s}},82897:t=>{t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},75606:(t,e,i)=>{var s=i(83392);t.exports=function(t){return t*s.DEG_TO_RAD}},767:t=>{t.exports=function(t,e){return Math.abs(t-e)}},9849:(t,e,i)=>{var s=i(82897),n=i(56694),r=i(16650),o=i(72283),a=new r,h=new n({initialize:function t(e,i,s,n){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=t.DefaultOrder),this._x=e,this._y=i,this._z=s,this._order=n,this.onChangeCallback=o},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,s){return void 0===s&&(s=this._order),this._x=t,this._y=e,this._z=i,this._order=s,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),a.fromQuat(t),this.setFromRotationMatrix(a,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var n=t.val,r=n[0],o=n[4],a=n[8],h=n[1],l=n[5],u=n[9],c=n[2],d=n[6],p=n[10],f=0,v=0,g=0,m=.99999;switch(e){case"XYZ":v=Math.asin(s(a,-1,1)),Math.abs(a){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},61616:t=>{t.exports=function(t,e){return Math.random()*(e-t)+t}},60679:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.floor(t*s)/s}},91806:(t,e,i)=>{var s=i(82897);t.exports=function(t,e,i){return(i-e)*(t=s(t,0,1))+e}},79366:t=>{t.exports=function(t,e){return t/e/1e3}},43776:t=>{t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},58442:t=>{t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},42798:t=>{t.exports=function(t,e,i){return(e-t)*i+t}},61072:t=>{t.exports=function(t,e,i){return void 0===i&&(i=0),t.clone().lerp(e,i)}},5341:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new s(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=s,this},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*n+o*a,d=h*n-r*a,p=e*u+i*c+s*d;return p?(p=1/p,t[0]=u*p,t[1]=(-l*i+s*h)*p,t[2]=(o*i-s*r)*p,t[3]=c*p,t[4]=(l*e-s*a)*p,t[5]=(-o*e+s*n)*p,t[6]=d*p,t[7]=(-h*e+i*a)*p,t[8]=(r*e-i*n)*p,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=s*h-i*l,t[2]=i*o-s*r,t[3]=o*a-n*l,t[4]=e*l-s*a,t[5]=s*n-e*o,t[6]=n*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*n,this},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*n+o*a)+s*(h*n-r*a)},multiply:function(t){var e=this.val,i=e[0],s=e[1],n=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],p=c[1],f=c[2],v=c[3],g=c[4],m=c[5],y=c[6],x=c[7],T=c[8];return e[0]=d*i+p*r+f*h,e[1]=d*s+p*o+f*l,e[2]=d*n+p*a+f*u,e[3]=v*i+g*r+m*h,e[4]=v*s+g*o+m*l,e[5]=v*n+g*a+m*u,e[6]=y*i+x*r+T*h,e[7]=y*s+x*o+T*l,e[8]=y*n+x*a+T*u,this},translate:function(t){var e=this.val,i=t.x,s=t.y;return e[6]=i*e[0]+s*e[3]+e[6],e[7]=i*e[1]+s*e[4]+e[7],e[8]=i*e[2]+s*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],s=e[1],n=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*s+h*o,e[2]=l*n+h*a,e[3]=l*r-h*i,e[4]=l*o-h*s,e[5]=l*a-h*n,this},scale:function(t){var e=this.val,i=t.x,s=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=s*e[3],e[4]=s*e[4],e[5]=s*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,s=t.z,n=t.w,r=e+e,o=i+i,a=s+s,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,p=s*a,f=n*r,v=n*o,g=n*a,m=this.val;return m[0]=1-(c+p),m[3]=l+g,m[6]=u-v,m[1]=l-g,m[4]=1-(h+p),m[7]=d+f,m[2]=u+v,m[5]=d-f,m[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,s=e[0],n=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],p=e[10],f=e[11],v=e[12],g=e[13],m=e[14],y=e[15],x=s*h-n*a,T=s*l-r*a,w=s*u-o*a,b=n*l-r*h,S=n*u-o*h,E=r*u-o*l,A=c*g-d*v,_=c*m-p*v,C=c*y-f*v,M=d*m-p*g,R=d*y-f*g,P=p*y-f*m,O=x*P-T*R+w*M+b*C-S*_+E*A;return O?(O=1/O,i[0]=(h*P-l*R+u*M)*O,i[1]=(l*C-a*P-u*_)*O,i[2]=(a*R-h*C+u*A)*O,i[3]=(r*R-n*P-o*M)*O,i[4]=(s*P-r*C+o*_)*O,i[5]=(n*C-s*R-o*A)*O,i[6]=(g*E-m*S+y*b)*O,i[7]=(m*w-v*E-y*T)*O,i[8]=(v*S-g*w+y*x)*O,this):null}});t.exports=s},16650:(t,e,i)=>{var s=i(56694),n=i(70015),r=1e-6,o=new s({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new o(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,s,n,r,o,a,h,l,u,c,d,p,f,v){var g=this.val;return g[0]=t,g[1]=e,g[2]=i,g[3]=s,g[4]=n,g[5]=r,g[6]=o,g[7]=a,g[8]=h,g[9]=l,g[10]=u,g[11]=c,g[12]=d,g[13]=p,g[14]=f,g[15]=v,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var s=a.fromQuat(i).val,n=e.x,r=e.y,o=e.z;return this.setValues(s[0]*n,s[1]*n,s[2]*n,0,s[4]*r,s[5]*r,s[6]*r,0,s[8]*o,s[9]*o,s[10]*o,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var s=this.val;return s[12]=t,s[13]=e,s[14]=i,this},scaling:function(t,e,i){this.zero();var s=this.val;return s[0]=t,s[5]=e,s[10]=i,s[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[3],n=t[6],r=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=n,t[11]=t[14],t[12]=s,t[13]=r,t[14]=o,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],p=t[12],f=t[13],v=t[14],g=t[15],m=e*o-i*r,y=e*a-s*r,x=e*h-n*r,T=i*a-s*o,w=i*h-n*o,b=s*h-n*a,S=l*f-u*p,E=l*v-c*p,A=l*g-d*p,_=u*v-c*f,C=u*g-d*f,M=c*g-d*v,R=m*M-y*C+x*_+T*A-w*E+b*S;return R?(R=1/R,this.setValues((o*M-a*C+h*_)*R,(s*C-i*M-n*_)*R,(f*b-v*w+g*T)*R,(c*w-u*b-d*T)*R,(a*A-r*M-h*E)*R,(e*M-s*A+n*E)*R,(v*x-p*b-g*y)*R,(l*b-c*x+d*y)*R,(r*C-o*A+h*S)*R,(i*A-e*C-n*S)*R,(p*w-f*x+g*m)*R,(u*x-l*w-d*m)*R,(o*E-r*_-a*S)*R,(e*_-i*E+s*S)*R,(f*y-p*T-v*m)*R,(l*T-u*y+c*m)*R)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],p=t[12],f=t[13],v=t[14],g=t[15];return this.setValues(o*(c*g-d*v)-u*(a*g-h*v)+f*(a*d-h*c),-(i*(c*g-d*v)-u*(s*g-n*v)+f*(s*d-n*c)),i*(a*g-h*v)-o*(s*g-n*v)+f*(s*h-n*a),-(i*(a*d-h*c)-o*(s*d-n*c)+u*(s*h-n*a)),-(r*(c*g-d*v)-l*(a*g-h*v)+p*(a*d-h*c)),e*(c*g-d*v)-l*(s*g-n*v)+p*(s*d-n*c),-(e*(a*g-h*v)-r*(s*g-n*v)+p*(s*h-n*a)),e*(a*d-h*c)-r*(s*d-n*c)+l*(s*h-n*a),r*(u*g-d*f)-l*(o*g-h*f)+p*(o*d-h*u),-(e*(u*g-d*f)-l*(i*g-n*f)+p*(i*d-n*u)),e*(o*g-h*f)-r*(i*g-n*f)+p*(i*h-n*o),-(e*(o*d-h*u)-r*(i*d-n*u)+l*(i*h-n*o)),-(r*(u*v-c*f)-l*(o*v-a*f)+p*(o*c-a*u)),e*(u*v-c*f)-l*(i*v-s*f)+p*(i*c-s*u),-(e*(o*v-a*f)-r*(i*v-s*f)+p*(i*a-s*o)),e*(o*c-a*u)-r*(i*c-s*u)+l*(i*a-s*o))},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],p=t[12],f=t[13],v=t[14],g=t[15];return(e*o-i*r)*(c*g-d*v)-(e*a-s*r)*(u*g-d*f)+(e*h-n*r)*(u*v-c*f)+(i*a-s*o)*(l*g-d*p)-(i*h-n*o)*(l*v-c*p)+(s*h-n*a)*(l*f-u*p)},multiply:function(t){var e=this.val,i=e[0],s=e[1],n=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],p=e[11],f=e[12],v=e[13],g=e[14],m=e[15],y=t.val,x=y[0],T=y[1],w=y[2],b=y[3];return e[0]=x*i+T*o+w*u+b*f,e[1]=x*s+T*a+w*c+b*v,e[2]=x*n+T*h+w*d+b*g,e[3]=x*r+T*l+w*p+b*m,x=y[4],T=y[5],w=y[6],b=y[7],e[4]=x*i+T*o+w*u+b*f,e[5]=x*s+T*a+w*c+b*v,e[6]=x*n+T*h+w*d+b*g,e[7]=x*r+T*l+w*p+b*m,x=y[8],T=y[9],w=y[10],b=y[11],e[8]=x*i+T*o+w*u+b*f,e[9]=x*s+T*a+w*c+b*v,e[10]=x*n+T*h+w*d+b*g,e[11]=x*r+T*l+w*p+b*m,x=y[12],T=y[13],w=y[14],b=y[15],e[12]=x*i+T*o+w*u+b*f,e[13]=x*s+T*a+w*c+b*v,e[14]=x*n+T*h+w*d+b*g,e[15]=x*r+T*l+w*p+b*m,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,s=e.val,n=i[0],r=i[4],o=i[8],a=i[12],h=i[1],l=i[5],u=i[9],c=i[13],d=i[2],p=i[6],f=i[10],v=i[14],g=i[3],m=i[7],y=i[11],x=i[15],T=s[0],w=s[4],b=s[8],S=s[12],E=s[1],A=s[5],_=s[9],C=s[13],M=s[2],R=s[6],P=s[10],O=s[14],L=s[3],F=s[7],D=s[11],k=s[15];return this.setValues(n*T+r*E+o*M+a*L,h*T+l*E+u*M+c*L,d*T+p*E+f*M+v*L,g*T+m*E+y*M+x*L,n*w+r*A+o*R+a*F,h*w+l*A+u*R+c*F,d*w+p*A+f*R+v*F,g*w+m*A+y*R+x*F,n*b+r*_+o*P+a*D,h*b+l*_+u*P+c*D,d*b+p*_+f*P+v*D,g*b+m*_+y*P+x*D,n*S+r*C+o*O+a*k,h*S+l*C+u*O+c*k,d*S+p*C+f*O+v*k,g*S+m*C+y*O+x*k)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var s=this.val;return s[12]=s[0]*t+s[4]*e+s[8]*i+s[12],s[13]=s[1]*t+s[5]*e+s[9]*i+s[13],s[14]=s[2]*t+s[6]*e+s[10]*i+s[14],s[15]=s[3]*t+s[7]*e+s[11]*i+s[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var s=this.val;return s[0]=s[0]*t,s[1]=s[1]*t,s[2]=s[2]*t,s[3]=s[3]*t,s[4]=s[4]*e,s[5]=s[5]*e,s[6]=s[6]*e,s[7]=s[7]*e,s[8]=s[8]*i,s[9]=s[9]*i,s[10]=s[10]*i,s[11]=s[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),s=Math.sin(e),n=1-i,r=t.x,o=t.y,a=t.z,h=n*r,l=n*o;return this.setValues(h*r+i,h*o-s*a,h*a+s*o,0,h*o+s*a,l*o+i,l*a-s*r,0,h*a-s*o,l*a+s*r,n*a*a+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,s=e.x,n=e.y,o=e.z,a=Math.sqrt(s*s+n*n+o*o);if(Math.abs(a){t.exports=function(t,e,i){return Math.min(t+e,i)}},37394:t=>{t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort((function(t,e){return t-e}));var i=Math.floor(e/2);return e%2==0?(t[i]+t[i-1])/2:t[i]}},17259:t=>{t.exports=function(t,e,i){return Math.max(t-e,i)}},61820:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=e+1);var n=(t-e)/(i-e);return n>1?void 0!==s?(n=(s-t)/(s-i))<0&&(n=0):n=1:n<0&&(n=0),n}},75003:(t,e,i)=>{var s=i(56694),n=i(5341),r=i(72283),o=i(70015),a=1e-6,h=new Int8Array([1,2,0]),l=new Float32Array([0,0,0]),u=new o(1,0,0),c=new o(0,1,0),d=new o,p=new n,f=new s({initialize:function(t,e,i,s){this.onChangeCallback=r,this.set(t,e,i,s)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,s,n){return void 0===n&&(n=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=s||0),n&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,n=t*t+e*e+i*i+s*s;return n>0&&(n=1/Math.sqrt(n),this._x=t*n,this._y=e*n,this._z=i*n,this._w=s*n),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,n=this.z,r=this.w;return this.set(i+e*(t.x-i),s+e*(t.y-s),n+e*(t.z-n),r+e*(t.w-r))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(d.copy(u).cross(t).length().999999?this.set(0,0,0,1):(d.copy(t).cross(e),this._x=d.x,this._y=d.y,this._z=d.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var s=p.val;return s[0]=e.x,s[3]=e.y,s[6]=e.z,s[1]=i.x,s[4]=i.y,s[7]=i.z,s[2]=-t.x,s[5]=-t.y,s[8]=-t.z,this.fromMat3(p).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,s=this.z,n=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.set(e*h+n*r+i*a-s*o,i*h+n*o+s*r-e*a,s*h+n*a+e*o-i*r,n*h-e*r-i*o-s*a)},slerp:function(t,e){var i=this.x,s=this.y,n=this.z,r=this.w,o=t.x,h=t.y,l=t.z,u=t.w,c=i*o+s*h+n*l+r*u;c<0&&(c=-c,o=-o,h=-h,l=-l,u=-u);var d=1-e,p=e;if(1-c>a){var f=Math.acos(c),v=Math.sin(f);d=Math.sin((1-e)*f)/v,p=Math.sin(e*f)/v}return this.set(d*i+p*o,d*s+p*h,d*n+p*l,d*r+p*u)},invert:function(){var t=this.x,e=this.y,i=this.z,s=this.w,n=t*t+e*e+i*i+s*s,r=n?1/n:0;return this.set(-t*r,-e*r,-i*r,s*r)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,n=this.w,r=Math.sin(t),o=Math.cos(t);return this.set(e*o+n*r,i*o+s*r,s*o-i*r,n*o-e*r)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,n=this.w,r=Math.sin(t),o=Math.cos(t);return this.set(e*o-s*r,i*o+n*r,s*o+e*r,n*o-i*r)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,n=this.w,r=Math.sin(t),o=Math.cos(t);return this.set(e*o+i*r,i*o-e*r,s*o+n*r,n*o-s*r)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,s=t.y/2,n=t.z/2,r=Math.cos(i),o=Math.cos(s),a=Math.cos(n),h=Math.sin(i),l=Math.sin(s),u=Math.sin(n);switch(t.order){case"XYZ":this.set(h*o*a+r*l*u,r*l*a-h*o*u,r*o*u+h*l*a,r*o*a-h*l*u,e);break;case"YXZ":this.set(h*o*a+r*l*u,r*l*a-h*o*u,r*o*u-h*l*a,r*o*a+h*l*u,e);break;case"ZXY":this.set(h*o*a-r*l*u,r*l*a+h*o*u,r*o*u+h*l*a,r*o*a-h*l*u,e);break;case"ZYX":this.set(h*o*a-r*l*u,r*l*a+h*o*u,r*o*u-h*l*a,r*o*a+h*l*u,e);break;case"YZX":this.set(h*o*a+r*l*u,r*l*a+h*o*u,r*o*u-h*l*a,r*o*a-h*l*u,e);break;case"XZY":this.set(h*o*a-r*l*u,r*l*a-h*o*u,r*o*u+h*l*a,r*o*a+h*l*u,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,s=i[0],n=i[4],r=i[8],o=i[1],a=i[5],h=i[9],l=i[2],u=i[6],c=i[10],d=s+a+c;return d>0?(e=.5/Math.sqrt(d+1),this.set((u-h)*e,(r-l)*e,(o-n)*e,.25/e)):s>a&&s>c?(e=2*Math.sqrt(1+s-a-c),this.set(.25*e,(n+o)/e,(r+l)/e,(u-h)/e)):a>c?(e=2*Math.sqrt(1+a-s-c),this.set((n+o)/e,.25*e,(h+u)/e,(r-l)/e)):(e=2*Math.sqrt(1+c-s-a),this.set((r+l)/e,(h+u)/e,.25*e,(o-n)/e)),this},fromMat3:function(t){var e,i=t.val,s=i[0]+i[4]+i[8];if(s>0)e=Math.sqrt(s+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var n=0;i[4]>i[0]&&(n=1),i[8]>i[3*n+n]&&(n=2);var r=h[n],o=h[r];e=Math.sqrt(i[3*n+n]-i[3*r+r]-i[3*o+o]+1),l[n]=.5*e,e=.5/e,l[r]=(i[3*r+n]+i[3*n+r])*e,l[o]=(i[3*o+n]+i[3*n+o])*e,this._x=l[0],this._y=l[1],this._z=l[2],this._w=(i[3*o+r]-i[3*r+o])*e}return this.onChangeCallback(this),this}});t.exports=f},23701:(t,e,i)=>{var s=i(83392);t.exports=function(t){return t*s.RAD_TO_DEG}},16906:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},52417:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,s=2*Math.random()-1,n=Math.sqrt(1-s*s)*e;return t.x=Math.cos(i)*n,t.y=Math.sin(i)*n,t.z=s*e,t}},17915:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},52257:t=>{t.exports=function(t,e){var i=t.x,s=t.y;return t.x=i*Math.cos(e)-s*Math.sin(e),t.y=i*Math.sin(e)+s*Math.cos(e),t}},2386:t=>{t.exports=function(t,e,i,s){var n=Math.cos(s),r=Math.sin(s),o=t.x-e,a=t.y-i;return t.x=o*n-a*r+e,t.y=o*r+a*n+i,t}},72395:t=>{t.exports=function(t,e,i,s,n){var r=s+Math.atan2(t.y-i,t.x-e);return t.x=e+n*Math.cos(r),t.y=i+n*Math.sin(r),t}},41061:t=>{t.exports=function(t,e,i,s,n){return t.x=e+n*Math.cos(s),t.y=i+n*Math.sin(s),t}},93709:(t,e,i)=>{var s=i(70015),n=i(16650),r=i(75003),o=new n,a=new r,h=new s;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},67233:t=>{t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},64333:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.round(t*s)/s}},59533:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=1),s*=Math.PI/t;for(var n=[],r=[],o=0;o{t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},87736:t=>{t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},55805:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n){void 0===n&&(n=new s);var r=0,o=0;return t>0&&t<=e*i&&(r=t>e-1?t-(o=Math.floor(t/e))*e:t),n.set(r,o)}},64462:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,o,a,h){void 0===h&&(h=new s);var l=Math.sin(r),u=Math.cos(r),c=u*o,d=l*o,p=-l*a,f=u*a,v=1/(c*f+p*-d);return h.x=f*v*t+-p*v*e+(n*p-i*f)*v,h.y=c*v*e+-d*v*t+(-n*c+i*d)*v,h}},93736:(t,e,i)=>{var s=i(56694),n=i(88456),r=new s({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new r(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return n(this.x,t.x,e)&&n(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this},transformMat3:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[3]*i+s[6],this.y=s[1]*e+s[4]*i+s[7],this},transformMat4:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[4]*i+s[12],this.y=s[1]*e+s[5]*i+s[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)},project:function(t){var e=this.dot(t)/t.dot(t);return this.copy(t).scale(e)}});r.ZERO=new r,r.RIGHT=new r(1,0),r.LEFT=new r(-1,0),r.UP=new r(0,-1),r.DOWN=new r(0,1),r.ONE=new r(1,1),t.exports=r},70015:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new s(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var i=t.x,s=t.y,n=t.z,r=e.x,o=e.y,a=e.z;return this.x=s*a-n*o,this.y=n*r-i*a,this.z=i*o-s*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return Math.sqrt(e*e+i*i+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return e*e+i*i+s*s},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,s=t*t+e*e+i*i;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,s=this.z,n=t.x,r=t.y,o=t.z;return this.x=i*o-s*r,this.y=s*n-e*o,this.z=e*r-i*n,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,n=this.z;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=n+e*(t.z-n),this},applyMatrix3:function(t){var e=this.x,i=this.y,s=this.z,n=t.val;return this.x=n[0]*e+n[3]*i+n[6]*s,this.y=n[1]*e+n[4]*i+n[7]*s,this.z=n[2]*e+n[5]*i+n[8]*s,this},applyMatrix4:function(t){var e=this.x,i=this.y,s=this.z,n=t.val,r=1/(n[3]*e+n[7]*i+n[11]*s+n[15]);return this.x=(n[0]*e+n[4]*i+n[8]*s+n[12])*r,this.y=(n[1]*e+n[5]*i+n[9]*s+n[13])*r,this.z=(n[2]*e+n[6]*i+n[10]*s+n[14])*r,this},transformMat3:function(t){var e=this.x,i=this.y,s=this.z,n=t.val;return this.x=e*n[0]+i*n[3]+s*n[6],this.y=e*n[1]+i*n[4]+s*n[7],this.z=e*n[2]+i*n[5]+s*n[8],this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,n=t.val;return this.x=n[0]*e+n[4]*i+n[8]*s+n[12],this.y=n[1]*e+n[5]*i+n[9]*s+n[13],this.z=n[2]*e+n[6]*i+n[10]*s+n[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,s=this.z,n=t.val,r=e*n[0]+i*n[4]+s*n[8]+n[12],o=e*n[1]+i*n[5]+s*n[9]+n[13],a=e*n[2]+i*n[6]+s*n[10]+n[14],h=e*n[3]+i*n[7]+s*n[11]+n[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,n=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*s-o*i,l=a*i+o*e-n*s,u=a*s+n*i-r*e,c=-n*e-r*i-o*s;return this.x=h*a+c*-n+l*-o-u*-r,this.y=l*a+c*-r+u*-n-h*-o,this.z=u*a+c*-o+h*-r-l*-n,this},project:function(t){var e=this.x,i=this.y,s=this.z,n=t.val,r=n[0],o=n[1],a=n[2],h=n[3],l=n[4],u=n[5],c=n[6],d=n[7],p=n[8],f=n[9],v=n[10],g=n[11],m=n[12],y=n[13],x=n[14],T=1/(e*h+i*d+s*g+n[15]);return this.x=(e*r+i*l+s*p+m)*T,this.y=(e*o+i*u+s*f+y)*T,this.z=(e*a+i*c+s*v+x)*T,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,s=t.y,n=t.z,r=t.w,o=this.x-i,a=r-this.y-1-s,h=this.z;return this.x=2*o/n-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});s.ZERO=new s,s.RIGHT=new s(1,0,0),s.LEFT=new s(-1,0,0),s.UP=new s(0,-1,0),s.DOWN=new s(0,1,0),s.FORWARD=new s(0,0,1),s.BACK=new s(0,0,-1),s.ONE=new s(1,1,1),t.exports=s},51729:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0)},clone:function(){return new s(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,s){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,n=t*t+e*e+i*i+s*s;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n,this.w=s*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,n=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=n+e*(t.z-n),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,n=t.w-this.w||0;return Math.sqrt(e*e+i*i+s*s+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,n=t.w-this.w||0;return e*e+i*i+s*s+n*n},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,n=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*s+r[12]*n,this.y=r[1]*e+r[5]*i+r[9]*s+r[13]*n,this.z=r[2]*e+r[6]*i+r[10]*s+r[14]*n,this.w=r[3]*e+r[7]*i+r[11]*s+r[15]*n,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,n=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*s-o*i,l=a*i+o*e-n*s,u=a*s+n*i-r*e,c=-n*e-r*i-o*s;return this.x=h*a+c*-n+l*-o-u*-r,this.y=l*a+c*-r+u*-n-h*-o,this.z=u*a+c*-o+h*-r-l*-n,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});s.prototype.sub=s.prototype.subtract,s.prototype.mul=s.prototype.multiply,s.prototype.div=s.prototype.divide,s.prototype.dist=s.prototype.distance,s.prototype.distSq=s.prototype.distanceSq,s.prototype.len=s.prototype.length,s.prototype.lenSq=s.prototype.lengthSq,t.exports=s},9557:t=>{t.exports=function(t,e,i){return Math.abs(t-e)<=i}},1071:t=>{t.exports=function(t,e,i){var s=i-e;return e+((t-e)%s+s)%s}},90447:t=>{t.exports=function(t,e,i,s){return Math.atan2(s-e,i-t)}},94240:t=>{t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},84066:t=>{t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},9678:t=>{t.exports=function(t,e,i,s){return Math.atan2(i-t,s-e)}},76861:(t,e,i)=>{var s=i(83392);t.exports=function(t){return t>Math.PI&&(t-=s.PI2),Math.abs(((t+s.TAU)%s.PI2-s.PI2)%s.PI2)}},37570:t=>{t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},87597:(t,e,i)=>{var s=i(61616);t.exports=function(){return s(-Math.PI,Math.PI)}},74493:(t,e,i)=>{var s=i(61616);t.exports=function(){return s(-180,180)}},19049:(t,e,i)=>{var s=i(37570);t.exports=function(t){return s(t+Math.PI)}},90612:(t,e,i)=>{var s=i(83392);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=s.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e{t.exports=function(t,e){var i=e-t;return 0===i?0:i-360*Math.floor((i- -180)/360)}},35786:(t,e,i)=>{var s=i(1071);t.exports=function(t){return s(t,-Math.PI,Math.PI)}},62138:(t,e,i)=>{var s=i(1071);t.exports=function(t){return s(t,-180,180)}},22153:(t,e,i)=>{t.exports={Between:i(90447),BetweenPoints:i(94240),BetweenPointsY:i(84066),BetweenY:i(9678),CounterClockwise:i(76861),Normalize:i(37570),Random:i(87597),RandomDegrees:i(74493),Reverse:i(19049),RotateTo:i(90612),ShortestBetween:i(93954),Wrap:i(35786),WrapDegrees:i(62138)}},83392:t=>{var e={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=e},53996:t=>{t.exports=function(t,e,i,s){var n=t-i,r=e-s;return Math.sqrt(n*n+r*r)}},92951:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return Math.sqrt(i*i+s*s)}},12161:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return i*i+s*s}},38057:t=>{t.exports=function(t,e,i,s){return Math.max(Math.abs(t-i),Math.abs(e-s))}},33297:t=>{t.exports=function(t,e,i,s,n){return void 0===n&&(n=2),Math.sqrt(Math.pow(i-t,n)+Math.pow(s-e,n))}},90366:t=>{t.exports=function(t,e,i,s){return Math.abs(t-i)+Math.abs(e-s)}},35032:t=>{t.exports=function(t,e,i,s){var n=t-i,r=e-s;return n*n+r*r}},10130:(t,e,i)=>{t.exports={Between:i(53996),BetweenPoints:i(92951),BetweenPointsSquared:i(12161),Chebyshev:i(38057),Power:i(33297),Snake:i(90366),Squared:i(35032)}},35060:(t,e,i)=>{var s=i(25265),n=i(57428),r=i(73214),o=i(71778),a=i(36468),h=i(88258),l=i(52910),u=i(67799),c=i(74083),d=i(92284),p=i(28035),f=i(8754);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:p.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:s.Out,Bounce:n.Out,Stepped:f,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":p.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":s.In,"Bounce.easeIn":n.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":p.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":s.Out,"Bounce.easeOut":n.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":p.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":s.InOut,"Bounce.easeInOut":n.InOut}},25860:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},45264:t=>{t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},36699:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},25265:(t,e,i)=>{t.exports={In:i(25860),Out:i(36699),InOut:i(45264)}},62191:t=>{t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},24799:t=>{t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},60819:t=>{t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},57428:(t,e,i)=>{t.exports={In:i(62191),Out:i(60819),InOut:i(24799)}},86855:t=>{t.exports=function(t){return 1-Math.sqrt(1-t*t)}},7280:t=>{t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},18058:t=>{t.exports=function(t){return Math.sqrt(1- --t*t)}},73214:(t,e,i)=>{t.exports={In:i(86855),Out:i(18058),InOut:i(7280)}},91532:t=>{t.exports=function(t){return t*t*t}},63180:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},16518:t=>{t.exports=function(t){return--t*t*t+1}},71778:(t,e,i)=>{t.exports={In:i(91532),Out:i(16518),InOut:i(63180)}},24729:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)}},50325:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*.5+1}},84074:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-s)*(2*Math.PI)/i)+1}},36468:(t,e,i)=>{t.exports={In:i(24729),Out:i(84074),InOut:i(50325)}},95638:t=>{t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},10357:t=>{t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},14894:t=>{t.exports=function(t){return 1-Math.pow(2,-10*t)}},88258:(t,e,i)=>{t.exports={In:i(95638),Out:i(14894),InOut:i(10357)}},33063:(t,e,i)=>{t.exports={Back:i(25265),Bounce:i(57428),Circular:i(73214),Cubic:i(71778),Elastic:i(36468),Expo:i(88258),Linear:i(52910),Quadratic:i(67799),Quartic:i(74083),Quintic:i(92284),Sine:i(28035),Stepped:i(8754)}},43927:t=>{t.exports=function(t){return t}},52910:(t,e,i)=>{t.exports=i(43927)},77471:t=>{t.exports=function(t){return t*t}},83863:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},44383:t=>{t.exports=function(t){return t*(2-t)}},67799:(t,e,i)=>{t.exports={In:i(77471),Out:i(44383),InOut:i(83863)}},48311:t=>{t.exports=function(t){return t*t*t*t}},55248:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},23135:t=>{t.exports=function(t){return 1- --t*t*t*t}},74083:(t,e,i)=>{t.exports={In:i(48311),Out:i(23135),InOut:i(55248)}},7313:t=>{t.exports=function(t){return t*t*t*t*t}},98759:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},26670:t=>{t.exports=function(t){return--t*t*t*t*t+1}},92284:(t,e,i)=>{t.exports={In:i(7313),Out:i(26670),InOut:i(98759)}},52929:t=>{t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},66333:t=>{t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},37255:t=>{t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},28035:(t,e,i)=>{t.exports={In:i(52929),Out:i(37255),InOut:i(66333)}},52770:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},8754:(t,e,i)=>{t.exports=i(52770)},17247:t=>{t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},88456:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},41935:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},54726:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t{t.exports={Ceil:i(17247),Equal:i(88456),Floor:i(61824),GreaterThan:i(41935),LessThan:i(54726)}},5923:(t,e,i)=>{var s=i(83392),n=i(98611),r={Angle:i(22153),Distance:i(10130),Easing:i(33063),Fuzzy:i(52778),Interpolation:i(48528),Pow2:i(73773),Snap:i(23679),RandomDataGenerator:i(81429),Average:i(26042),Bernstein:i(22824),Between:i(17489),CatmullRom:i(14976),CeilTo:i(89129),Clamp:i(82897),DegToRad:i(75606),Difference:i(767),Euler:i(9849),Factorial:i(8034),FloatBetween:i(61616),FloorTo:i(60679),FromPercent:i(91806),GetSpeed:i(79366),IsEven:i(43776),IsEvenStrict:i(58442),Linear:i(42798),LinearXY:i(61072),MaxAdd:i(69635),Median:i(37394),MinSub:i(17259),Percent:i(61820),RadToDeg:i(23701),RandomXY:i(16906),RandomXYZ:i(52417),RandomXYZW:i(17915),Rotate:i(52257),RotateAround:i(2386),RotateAroundDistance:i(72395),RotateTo:i(41061),RoundAwayFromZero:i(67233),RoundTo:i(64333),SinCosTableGenerator:i(59533),SmootherStep:i(87736),SmoothStep:i(5514),ToXY:i(55805),TransformXY:i(64462),Within:i(9557),Wrap:i(1071),Vector2:i(93736),Vector3:i(70015),Vector4:i(51729),Matrix3:i(5341),Matrix4:i(16650),Quaternion:i(75003),RotateVec3:i(93709)};r=n(!1,r,s),t.exports=r},63210:(t,e,i)=>{var s=i(22824);t.exports=function(t,e){for(var i=0,n=t.length-1,r=0;r<=n;r++)i+=Math.pow(1-e,n-r)*Math.pow(e,r)*t[r]*s(n,r);return i}},88332:(t,e,i)=>{var s=i(14976);t.exports=function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n);return t[0]===t[i]?(e<0&&(r=Math.floor(n=i*(1+e))),s(n-r,t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i])):e<0?t[0]-(s(-n,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(s(n-i,t[i],t[i],t[i-1],t[i-1])-t[i]):s(n-r,t[r?r-1:0],t[r],t[i{t.exports=function(t,e,i,s,n){return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,s)+function(t,e){return t*t*t*e}(t,n)}},47614:(t,e,i)=>{var s=i(42798);t.exports=function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n);return e<0?s(t[0],t[1],n):e>1?s(t[i],t[i-1],i-n):s(t[r],t[r+1>i?i:r+1],n-r)}},16252:t=>{t.exports=function(t,e,i,s){return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,s)}},44521:(t,e,i)=>{var s=i(5514);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},45507:(t,e,i)=>{var s=i(87736);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},48528:(t,e,i)=>{t.exports={Bezier:i(63210),CatmullRom:i(88332),CubicBezier:i(34631),Linear:i(47614),QuadraticBezier:i(16252),SmoothStep:i(44521),SmootherStep:i(45507)}},3504:t=>{t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<{t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},2018:t=>{t.exports=function(t){return t>0&&0==(t&t-1)}},73773:(t,e,i)=>{t.exports={GetNext:i(3504),IsSize:i(28621),IsValue:i(2018)}},81429:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),s=t[i];t[i]=t[e],t[e]=s}return t}});t.exports=s},82127:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),s?(i+t)/e:i+t)}},84314:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),s?(i+t)/e:i+t)}},88462:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),s?(i+t)/e:i+t)}},23679:(t,e,i)=>{t.exports={Ceil:i(82127),Floor:i(84314),To:i(88462)}},10654:(t,e,i)=>{i(92244);var s=i(86459),n=i(98611),r={Actions:i(83979),Animations:i(13517),BlendModes:i(95723),Cache:i(45820),Cameras:i(44143),Core:i(80293),Class:i(56694),Create:i(84106),Curves:i(73962),Data:i(1999),Display:i(24816),DOM:i(3590),Events:i(95146),Game:i(15213),GameObjects:i(48013),Geom:i(84068),Input:i(20873),Loader:i(95695),Math:i(5923),Physics:i(53954),Plugins:i(45615),Renderer:i(42069),Scale:i(86754),ScaleModes:i(27394),Scene:i(87157),Scenes:i(20436),Structs:i(20010),Textures:i(87499),Tilemaps:i(52678),Time:i(97121),Tweens:i(75193),Utils:i(22178)};r.Sound=i(56751),r=n(!1,r,s),t.exports=r,i.g.Phaser=r},62832:(t,e,i)=>{var s=i(56694),n=i(7864),r=i(1539),o=new s({Extends:r,Mixins:[n.Acceleration,n.Angular,n.Bounce,n.Debug,n.Drag,n.Enable,n.Friction,n.Gravity,n.Immovable,n.Mass,n.Pushable,n.Size,n.Velocity],initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.body=null}});t.exports=o},66150:(t,e,i)=>{var s=i(56694),n=i(75606),r=i(53996),o=i(35032),a=i(99523),h=i(72632),l=i(30657),u=i(2732),c=i(15147),d=i(91963),p=i(7599),f=i(93736),v=i(85233),g=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,t.sys.events.once(p.BOOT,this.boot,this),t.sys.events.on(p.START,this.start,this)},boot:function(){this.world=new v(this.scene,this.config),this.add=new a(this.world),this.systems.events.once(p.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new v(this.scene,this.config),this.add=new a(this.world));var t=this.systems.events;h(this.config,"customUpdate",!1)||t.on(p.UPDATE,this.world.update,this.world),t.on(p.POST_UPDATE,this.world.postUpdate,this.world),t.once(p.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(p.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(p.UPDATE,this.world.update,this.world)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return l(h(e,"arcade",{}),h(t,"arcade",{}))},overlap:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.world.collideObjects(t,e,i,s,n,!0)},collide:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.world.collideObjects(t,e,i,s,n,!1)},collideTiles:function(t,e,i,s,n){return this.world.collideTiles(t,e,i,s,n)},overlapTiles:function(t,e,i,s,n){return this.world.overlapTiles(t,e,i,s,n)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(t,e,i,s,n,r){void 0===s&&(s=60);var o=Math.atan2(i-t.y,e-t.x);return t.body.acceleration.setToPolar(o,s),void 0!==n&&void 0!==r&&t.body.maxVelocity.set(n,r),o},accelerateToObject:function(t,e,i,s,n){return this.accelerateTo(t,e.x,e.y,i,s,n)},closest:function(t,e){e||(e=this.world.bodies.entries);for(var i=Number.MAX_VALUE,s=null,n=t.x,r=t.y,a=e.length,h=0;hi&&(s=l,i=c)}}return s},moveTo:function(t,e,i,s,n){void 0===s&&(s=60),void 0===n&&(n=0);var o=Math.atan2(i-t.y,e-t.x);return n>0&&(s=r(t.x,t.y,e,i)/(n/1e3)),t.body.velocity.setToPolar(o,s),o},moveToObject:function(t,e,i,s){return this.moveTo(t,e.x,e.y,i,s)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new f),i.setToPolar(n(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new f),i.setToPolar(t,e)},overlapRect:function(t,e,i,s,n,r){return c(this.world,t,e,i,s,n,r)},overlapCirc:function(t,e,i,s,n){return u(this.world,t,e,i,s,n)},shutdown:function(){if(this.world){var t=this.systems.events;t.off(p.UPDATE,this.world.update,this.world),t.off(p.POST_UPDATE,this.world.postUpdate,this.world),t.off(p.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null}},destroy:function(){this.shutdown(),this.scene.sys.events.off(p.START,this.start,this),this.scene=null,this.systems=null}});d.register("ArcadePhysics",g,"arcadePhysics"),t.exports=g},25084:(t,e,i)=>{var s=i(56694),n=i(7864),r=i(13747),o=new s({Extends:r,Mixins:[n.Acceleration,n.Angular,n.Bounce,n.Debug,n.Drag,n.Enable,n.Friction,n.Gravity,n.Immovable,n.Mass,n.Pushable,n.Size,n.Velocity],initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.body=null}});t.exports=o},97602:(t,e,i)=>{var s=i(56694),n=i(47401),r=i(27037),o=i(23701),a=i(74118),h=i(94287),l=i(93736),u=new s({initialize:function(t,e){var i=64,s=64,r=void 0!==e;r&&e.displayWidth&&(i=e.displayWidth,s=e.displayHeight),r||(e={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=t,this.gameObject=r?e:void 0,this.isBody=!0,this.transform={x:e.x,y:e.y,rotation:e.angle,scaleX:e.scaleX,scaleY:e.scaleY,displayOriginX:e.displayOriginX,displayOriginY:e.displayOriginY},this.debugShowBody=t.defaults.debugShowBody,this.debugShowVelocity=t.defaults.debugShowVelocity,this.debugBodyColor=t.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new l,this.position=new l(e.x-e.scaleX*e.displayOriginX,e.y-e.scaleY*e.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=e.angle,this.preRotation=e.angle,this.width=i,this.height=s,this.sourceWidth=i,this.sourceHeight=s,e.frame&&(this.sourceWidth=e.frame.realWidth,this.sourceHeight=e.frame.realHeight),this.halfWidth=Math.abs(i/2),this.halfHeight=Math.abs(s/2),this.center=new l(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new l,this.newVelocity=new l,this.deltaMax=new l,this.acceleration=new l,this.allowDrag=!0,this.drag=new l,this.allowGravity=!0,this.gravity=new l,this.bounce=new l,this.worldBounce=null,this.customBoundsRectangle=t.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new l(1e4,1e4),this.maxSpeed=-1,this.friction=new l(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=n.FACING_NONE,this.immovable=!1,this.pushable=!0,this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.syncBounds=!1,this.physicsType=n.DYNAMIC_BODY,this._sx=e.scaleX,this._sy=e.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new a},updateBounds:function(){var t=this.gameObject,e=this.transform;if(t.parentContainer){var i=t.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);e.x=i.tx,e.y=i.ty,e.rotation=o(i.rotation),e.scaleX=i.scaleX,e.scaleY=i.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY}else e.x=t.x,e.y=t.y,e.rotation=t.angle,e.scaleX=t.scaleX,e.scaleY=t.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY;var s=!1;if(this.syncBounds){var n=t.getBounds(this._bounds);this.width=n.width,this.height=n.height,s=!0}else{var r=Math.abs(e.scaleX),a=Math.abs(e.scaleY);this._sx===r&&this._sy===a||(this.width=this.sourceWidth*r,this.height=this.sourceHeight*a,this._sx=r,this._sy=a,s=!0)}s&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var t=this.transform;this.position.x=t.x+t.scaleX*(this.offset.x-t.displayOriginX),this.position.y=t.y+t.scaleY*(this.offset.y-t.displayOriginY),this.updateCenter()},resetFlags:function(t){void 0===t&&(t=!1);var e=this.wasTouching,i=this.touching,s=this.blocked;t?(e.none=!0,e.up=!1,e.down=!1,e.left=!1,e.right=!1):(e.none=i.none,e.up=i.up,e.down=i.down,e.left=i.left,e.right=i.right),i.none=!0,i.up=!1,i.down=!1,i.left=!1,i.right=!1,s.none=!0,s.up=!1,s.down=!1,s.left=!1,s.right=!1,this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(t,e){t&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves&&(this.prev.x=this.position.x,this.prev.y=this.position.y,this.prevFrame.x=this.position.x,this.prevFrame.y=this.position.y),t&&this.update(e)},update:function(t){if(this.prev.x=this.position.x,this.prev.y=this.position.y,this.moves){this.world.updateMotion(this,t);var e=this.velocity.x,i=this.velocity.y;this.newVelocity.set(e*t,i*t),this.position.add(this.newVelocity),this.updateCenter(),this.angle=Math.atan2(i,e),this.speed=Math.sqrt(e*e+i*i),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds&&this.world.emit(r.WORLD_BOUNDS,this,this.blocked.up,this.blocked.down,this.blocked.left,this.blocked.right)}this._dx=this.position.x-this.prev.x,this._dy=this.position.y-this.prev.y},postUpdate:function(){var t=this.position.x-this.prevFrame.x,e=this.position.y-this.prevFrame.y,i=this.gameObject;if(this.moves){var s=this.deltaMax.x,r=this.deltaMax.y;0!==s&&0!==t&&(t<0&&t<-s?t=-s:t>0&&t>s&&(t=s)),0!==r&&0!==e&&(e<0&&e<-r?e=-r:e>0&&e>r&&(e=r)),i&&(i.x+=t,i.y+=e)}t<0?this.facing=n.FACING_LEFT:t>0&&(this.facing=n.FACING_RIGHT),e<0?this.facing=n.FACING_UP:e>0&&(this.facing=n.FACING_DOWN),this.allowRotation&&i&&(i.angle+=this.deltaZ()),this._tx=t,this._ty=e},setBoundsRectangle:function(t){return this.customBoundsRectangle=t||this.world.bounds,this},checkWorldBounds:function(){var t=this.position,e=this.customBoundsRectangle,i=this.world.checkCollision,s=this.worldBounce?-this.worldBounce.x:-this.bounce.x,n=this.worldBounce?-this.worldBounce.y:-this.bounce.y,r=!1;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=s,this.blocked.right=!0,r=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=n,this.blocked.down=!0,r=!0),r&&(this.blocked.none=!1,this.updateCenter()),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setGameObject:function(t,e){return void 0===e&&(e=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=t,t.body&&(t.body=this),this.setSize(),this.world.add(this),this.enable=e,this},setSize:function(t,e,i){void 0===i&&(i=!0);var s=this.gameObject;if(s&&(!t&&s.frame&&(t=s.frame.realWidth),!e&&s.frame&&(e=s.frame.realHeight)),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&s&&s.getCenter){var n=(s.width-t)/2,r=(s.height-e)/2;this.offset.set(n,r)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i&&(i.setPosition(t,e),this.rotation=i.angle,this.preRotation=i.angle);var s=this.position;i&&i.getTopLeft?i.getTopLeft(s):s.set(t,e),this.prev.copy(s),this.prevFrame.copy(s),i&&this.updateBounds(),this.updateCenter(),this.collideWorldBounds&&this.checkWorldBounds(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?this.radius>0&&t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:h(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,s=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor),this.isCircle?t.strokeCircle(i,s,this.width/2):(this.checkCollision.up&&t.lineBetween(e.x,e.y,e.x+this.width,e.y),this.checkCollision.right&&t.lineBetween(e.x+this.width,e.y,e.x+this.width,e.y+this.height),this.checkCollision.down&&t.lineBetween(e.x,e.y+this.height,e.x+this.width,e.y+this.height),this.checkCollision.left&&t.lineBetween(e.x,e.y,e.x,e.y+this.height))),this.debugShowVelocity&&(t.lineStyle(t.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,s,i+this.velocity.x/2,s+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t,e,i,s){void 0===t&&(t=!0),this.collideWorldBounds=t;var n=void 0!==e,r=void 0!==i;return(n||r)&&(this.worldBounce||(this.worldBounce=new l),n&&(this.worldBounce.x=e),r&&(this.worldBounce.y=i)),void 0!==s&&(this.onWorldBounds=s),this},setVelocity:function(t,e){return this.velocity.set(t,e),t=this.velocity.x,e=this.velocity.y,this.speed=Math.sqrt(t*t+e*e),this},setVelocityX:function(t){return this.setVelocity(t,this.velocity.y)},setVelocityY:function(t){return this.setVelocity(this.velocity.x,t)},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),this},setMaxVelocityX:function(t){return this.maxVelocity.x=t,this},setMaxVelocityY:function(t){return this.maxVelocity.y=t,this},setMaxSpeed:function(t){return this.maxSpeed=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setAllowDrag:function(t){return void 0===t&&(t=!0),this.allowDrag=t,this},setAllowGravity:function(t){return void 0===t&&(t=!0),this.allowGravity=t,this},setAllowRotation:function(t){return void 0===t&&(t=!0),this.allowRotation=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDamping:function(t){return this.useDamping=t,this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return void 0===t&&(t=!0),this.immovable=t,this},setEnable:function(t){return void 0===t&&(t=!0),this.enable=t,this},processX:function(t,e,i,s){this.x+=t,this.updateCenter(),null!==e&&(this.velocity.x=e);var n=this.blocked;i&&(n.left=!0),s&&(n.right=!0)},processY:function(t,e,i,s){this.y+=t,this.updateCenter(),null!==e&&(this.velocity.y=e);var n=this.blocked;i&&(n.up=!0),s&&(n.down=!0)},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},3909:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s,n,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=s,this.collideCallback=n,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=s},99523:(t,e,i)=>{var s=i(62832),n=i(25084),r=i(97602),o=i(56694),a=i(47401),h=i(10481),l=i(66634),u=i(46346),c=new o({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,s,n){return this.world.addCollider(t,e,i,s,n)},overlap:function(t,e,i,s,n){return this.world.addOverlap(t,e,i,s,n)},existing:function(t,e){var i=e?a.STATIC_BODY:a.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.world.enableBody(r,a.STATIC_BODY),r},image:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.world.enableBody(r,a.DYNAMIC_BODY),r},staticSprite:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,a.STATIC_BODY),r},sprite:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,a.DYNAMIC_BODY),r},staticGroup:function(t,e){return this.sys.updateList.add(new u(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},body:function(t,e,i,s){var n=new r(this.world);return n.position.set(t,e),i&&s&&n.setSize(i,s),this.world.add(n,a.DYNAMIC_BODY),n},staticBody:function(t,e,i,s){var n=new l(this.world);return n.position.set(t,e),i&&s&&n.setSize(i,s),this.world.add(n,a.STATIC_BODY),n},destroy:function(){this.world=null,this.scene=null,this.sys=null}});t.exports=c},75671:(t,e,i)=>{var s=i(47401);t.exports=function(t,e,i,n){var r=0,o=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?(r=t.right-e.x)>o&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?r=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.right=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.left=!0)):t._dxo&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?r=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.left=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=r,e.overlapX=r,r}},66185:(t,e,i)=>{var s=i(47401);t.exports=function(t,e,i,n){var r=0,o=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(r=t.bottom-e.y)>o&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?r=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.down=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.up=!0)):t._dyo&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?r=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.up=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=r,e.overlapY=r,r}},10481:(t,e,i)=>{var s=i(25084),n=i(56694),r=i(47401),o=i(72632),a=i(59192),h=i(42911),l=new n({Extends:a,initialize:function(t,e,i,n){if(i||n)if(h(i))n=i,i=null,n.internalCreateCallback=this.createCallbackHandler,n.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(i)&&h(i[0])){n=i[0];var l=this;i.forEach((function(t){t.internalCreateCallback=l.createCallbackHandler,t.internalRemoveCallback=l.removeCallbackHandler})),i=null}else n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=t,n.classType=o(n,"classType",s),this.physicsType=r.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:o(n,"collideWorldBounds",!1),setBoundsRectangle:o(n,"customBoundsRectangle",null),setAccelerationX:o(n,"accelerationX",0),setAccelerationY:o(n,"accelerationY",0),setAllowDrag:o(n,"allowDrag",!0),setAllowGravity:o(n,"allowGravity",!0),setAllowRotation:o(n,"allowRotation",!0),setDamping:o(n,"useDamping",!1),setBounceX:o(n,"bounceX",0),setBounceY:o(n,"bounceY",0),setDragX:o(n,"dragX",0),setDragY:o(n,"dragY",0),setEnable:o(n,"enable",!0),setGravityX:o(n,"gravityX",0),setGravityY:o(n,"gravityY",0),setFrictionX:o(n,"frictionX",0),setFrictionY:o(n,"frictionY",0),setMaxSpeed:o(n,"maxSpeed",-1),setMaxVelocityX:o(n,"maxVelocityX",1e4),setMaxVelocityY:o(n,"maxVelocityY",1e4),setVelocityX:o(n,"velocityX",0),setVelocityY:o(n,"velocityY",0),setAngularVelocity:o(n,"angularVelocity",0),setAngularAcceleration:o(n,"angularAcceleration",0),setAngularDrag:o(n,"angularDrag",0),setMass:o(n,"mass",1),setImmovable:o(n,"immovable",!1)},a.call(this,e,i,n),this.type="PhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,r.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var s=this.getChildren(),n=0;n{var e,i,s,n,r,o,a,h,l,u,c,d,p,f,v,g,m,y=function(){return u&&v&&i.blocked.right?(e.processX(-m,a,!1,!0),1):l&&g&&i.blocked.left?(e.processX(m,a,!0),1):p&&g&&e.blocked.right?(i.processX(-m,h,!1,!0),2):d&&v&&e.blocked.left?(i.processX(m,h,!0),2):0},x=function(t){if(s&&n)m*=.5,0===t||3===t?(e.processX(m,r),i.processX(-m,o)):(e.processX(-m,r),i.processX(m,o));else if(s&&!n)0===t||3===t?e.processX(m,a,!0):e.processX(-m,a,!1,!0);else if(!s&&n)0===t||3===t?i.processX(-m,h,!1,!0):i.processX(m,h,!0);else{var v=.5*m;0===t?f?(e.processX(m,0,!0),i.processX(0,null,!1,!0)):p?(e.processX(v,0,!0),i.processX(-v,0,!1,!0)):(e.processX(v,i.velocity.x,!0),i.processX(-v,null,!1,!0)):1===t?c?(e.processX(0,null,!1,!0),i.processX(m,0,!0)):u?(e.processX(-v,0,!1,!0),i.processX(v,0,!0)):(e.processX(-v,null,!1,!0),i.processX(v,e.velocity.x,!0)):2===t?f?(e.processX(-m,0,!1,!0),i.processX(0,null,!0)):d?(e.processX(-v,0,!1,!0),i.processX(v,0,!0)):(e.processX(-v,i.velocity.x,!1,!0),i.processX(v,null,!0)):3===t&&(c?(e.processX(0,null,!0),i.processX(-m,0,!1,!0)):l?(e.processX(v,0,!0),i.processX(-v,0,!1,!0)):(e.processX(v,i.velocity.y,!0),i.processX(-v,null,!1,!0)))}return!0};t.exports={BlockCheck:y,Check:function(){var t=e.velocity.x,s=i.velocity.x,n=Math.sqrt(s*s*i.mass/e.mass)*(s>0?1:-1),a=Math.sqrt(t*t*e.mass/i.mass)*(t>0?1:-1),h=.5*(n+a);return a-=h,r=h+(n-=h)*e.bounce.x,o=h+a*i.bounce.x,l&&g?x(0):d&&v?x(1):u&&v?x(2):!(!p||!g)&&x(3)},Set:function(t,r,o){i=r;var x=(e=t).velocity.x,T=i.velocity.x;return s=e.pushable,l=e._dx<0,u=e._dx>0,c=0===e._dx,v=Math.abs(e.right-i.x)<=Math.abs(i.right-e.x),a=T-x*e.bounce.x,n=i.pushable,d=i._dx<0,p=i._dx>0,f=0===i._dx,g=!v,h=x-T*i.bounce.x,m=Math.abs(o),y()},Run:x,RunImmovableBody1:function(t){1===t?i.velocity.x=0:v?i.processX(m,h,!0):i.processX(-m,h,!1,!0),e.moves&&(i.y+=(e.y-e.prev.y)*e.friction.y,i._dy=i.y-i.prev.y)},RunImmovableBody2:function(t){2===t?e.velocity.x=0:g?e.processX(m,a,!0):e.processX(-m,a,!1,!0),i.moves&&(e.y+=(i.y-i.prev.y)*i.friction.y,e._dy=e.y-e.prev.y)}}},67050:t=>{var e,i,s,n,r,o,a,h,l,u,c,d,p,f,v,g,m,y=function(){return u&&v&&i.blocked.down?(e.processY(-m,a,!1,!0),1):l&&g&&i.blocked.up?(e.processY(m,a,!0),1):p&&g&&e.blocked.down?(i.processY(-m,h,!1,!0),2):d&&v&&e.blocked.up?(i.processY(m,h,!0),2):0},x=function(t){if(s&&n)m*=.5,0===t||3===t?(e.processY(m,r),i.processY(-m,o)):(e.processY(-m,r),i.processY(m,o));else if(s&&!n)0===t||3===t?e.processY(m,a,!0):e.processY(-m,a,!1,!0);else if(!s&&n)0===t||3===t?i.processY(-m,h,!1,!0):i.processY(m,h,!0);else{var v=.5*m;0===t?f?(e.processY(m,0,!0),i.processY(0,null,!1,!0)):p?(e.processY(v,0,!0),i.processY(-v,0,!1,!0)):(e.processY(v,i.velocity.y,!0),i.processY(-v,null,!1,!0)):1===t?c?(e.processY(0,null,!1,!0),i.processY(m,0,!0)):u?(e.processY(-v,0,!1,!0),i.processY(v,0,!0)):(e.processY(-v,null,!1,!0),i.processY(v,e.velocity.y,!0)):2===t?f?(e.processY(-m,0,!1,!0),i.processY(0,null,!0)):d?(e.processY(-v,0,!1,!0),i.processY(v,0,!0)):(e.processY(-v,i.velocity.y,!1,!0),i.processY(v,null,!0)):3===t&&(c?(e.processY(0,null,!0),i.processY(-m,0,!1,!0)):l?(e.processY(v,0,!0),i.processY(-v,0,!1,!0)):(e.processY(v,i.velocity.y,!0),i.processY(-v,null,!1,!0)))}return!0};t.exports={BlockCheck:y,Check:function(){var t=e.velocity.y,s=i.velocity.y,n=Math.sqrt(s*s*i.mass/e.mass)*(s>0?1:-1),a=Math.sqrt(t*t*e.mass/i.mass)*(t>0?1:-1),h=.5*(n+a);return a-=h,r=h+(n-=h)*e.bounce.y,o=h+a*i.bounce.y,l&&g?x(0):d&&v?x(1):u&&v?x(2):!(!p||!g)&&x(3)},Set:function(t,r,o){i=r;var x=(e=t).velocity.y,T=i.velocity.y;return s=e.pushable,l=e._dy<0,u=e._dy>0,c=0===e._dy,v=Math.abs(e.bottom-i.y)<=Math.abs(i.bottom-e.y),a=T-x*e.bounce.y,n=i.pushable,d=i._dy<0,p=i._dy>0,f=0===i._dy,g=!v,h=x-T*i.bounce.y,m=Math.abs(o),y()},Run:x,RunImmovableBody1:function(t){1===t?i.velocity.y=0:v?i.processY(m,h,!0):i.processY(-m,h,!1,!0),e.moves&&(i.x+=(e.x-e.prev.x)*e.friction.x,i._dx=i.x-i.prev.x)},RunImmovableBody2:function(t){2===t?e.velocity.y=0:g?e.processY(m,a,!0):e.processY(-m,a,!1,!0),i.moves&&(e.x+=(i.x-i.prev.x)*i.friction.x,e._dx=e.x-e.prev.x)}}},61777:(t,e,i)=>{var s=i(75671),n=i(22916);t.exports=function(t,e,i,r){var o=s(t,e,i,r),a=t.immovable,h=e.immovable;if(i||0===o||a&&h||t.customSeparateX||e.customSeparateX)return 0!==o||t.embedded&&e.embedded;var l=n.Set(t,e,o);return a||h?(a?n.RunImmovableBody1(l):h&&n.RunImmovableBody2(l),!0):l>0||n.Check()}},25299:(t,e,i)=>{var s=i(66185),n=i(67050);t.exports=function(t,e,i,r){var o=s(t,e,i,r),a=t.immovable,h=e.immovable;if(i||0===o||a&&h||t.customSeparateY||e.customSeparateY)return 0!==o||t.embedded&&e.embedded;var l=n.Set(t,e,o);return a||h?(a?n.RunImmovableBody1(l):h&&n.RunImmovableBody2(l),!0):l>0||n.Check()}},66634:(t,e,i)=>{var s=i(65650),n=i(56694),r=i(47401),o=i(94287),a=i(93736),h=new n({initialize:function(t,e){var i=64,s=64,n=void 0!==e;n&&e.displayWidth&&(i=e.displayWidth,s=e.displayHeight),n||(e={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=t,this.gameObject=n?e:void 0,this.isBody=!0,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-i*e.originX,e.y-s*e.originY),this.width=i,this.height=s,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var s=this.gameObject;if(!t&&s.frame&&(t=s.frame.realWidth),!e&&s.frame&&(e=s.frame.realHeight),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&s.getCenter){var n=s.displayWidth/2,r=s.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(n-this.halfWidth,r-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.setPosition(t,e),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?s(this,t,e):o(this,t,e)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,s=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?t.strokeCircle(i,s,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},46346:(t,e,i)=>{var s=i(25084),n=i(56694),r=i(47401),o=i(72632),a=i(59192),h=i(42911),l=new n({Extends:a,initialize:function(t,e,i,n){i||n?h(i)?(n=i,i=null,n.internalCreateCallback=this.createCallbackHandler,n.internalRemoveCallback=this.removeCallbackHandler,n.createMultipleCallback=this.createMultipleCallbackHandler,n.classType=o(n,"classType",s)):Array.isArray(i)&&h(i[0])?(n=i,i=null,n.forEach((function(t){t.internalCreateCallback=this.createCallbackHandler,t.internalRemoveCallback=this.removeCallbackHandler,t.createMultipleCallback=this.createMultipleCallbackHandler,t.classType=o(t,"classType",s)}))):n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler}:n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:s},this.world=t,this.physicsType=r.STATIC_BODY,a.call(this,e,i,n),this.type="StaticPhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,r.STATIC_BODY)},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var t=this.children.entries,e=0;e{var s=i(94240),n=i(97602),r=i(82897),o=i(56694),a=i(3909),h=i(47401),l=i(53996),u=i(6659),c=i(27037),d=i(88456),p=i(41935),f=i(54726),v=i(75671),g=i(66185),m=i(44662),y=i(10850),x=i(83392),T=i(74623),w=i(25163),b=i(74118),S=i(68687),E=i(27354),A=i(61777),_=i(25299),C=i(58403),M=i(66634),R=i(28808),P=i(69360),O=i(93736),L=i(1071),F=new o({Extends:u,initialize:function(t,e){u.call(this),this.scene=t,this.bodies=new C,this.staticBodies=new C,this.pendingDestroy=new C,this.colliders=new T,this.gravity=new O(y(e,"gravity.x",0),y(e,"gravity.y",0)),this.bounds=new b(y(e,"x",0),y(e,"y",0),y(e,"width",t.sys.scale.width),y(e,"height",t.sys.scale.height)),this.checkCollision={up:y(e,"checkCollision.up",!0),down:y(e,"checkCollision.down",!0),left:y(e,"checkCollision.left",!0),right:y(e,"checkCollision.right",!0)},this.fps=y(e,"fps",60),this.fixedStep=y(e,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=y(e,"timeScale",1),this.OVERLAP_BIAS=y(e,"overlapBias",4),this.TILE_BIAS=y(e,"tileBias",16),this.forceX=y(e,"forceX",!1),this.isPaused=y(e,"isPaused",!1),this._total=0,this.drawDebug=y(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:y(e,"debugShowBody",!0),debugShowStaticBody:y(e,"debugShowStaticBody",!0),debugShowVelocity:y(e,"debugShowVelocity",!0),bodyDebugColor:y(e,"debugBodyColor",16711935),staticBodyDebugColor:y(e,"debugStaticBodyColor",255),velocityDebugColor:y(e,"debugVelocityColor",65280)},this.maxEntries=y(e,"maxEntries",16),this.useTree=y(e,"useTree",!0),this.tree=new S(this.maxEntries),this.staticTree=new S(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new P,this._tempMatrix2=new P,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(t,e){void 0===e&&(e=h.DYNAMIC_BODY),Array.isArray(t)||(t=[t]);for(var i=0;i=r;for(this.fixedStep||(n=.001*e,a=!0,this._elapsed=0),i=0;i=r;)this._elapsed-=r,this.step(n)}},step:function(t){var e,i,s=this.bodies.entries,n=s.length;for(e=0;e0){var l=this.tree,u=this.staticTree;for(s=(i=a.entries).length,t=0;t-1&&c>v&&(t.velocity.normalize().scale(v),c=v),t.speed=c},separate:function(t,e,i,s,n){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(s,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,n);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,n)}var l=!1,u=!1;n?(l=A(t,e,n,this.OVERLAP_BIAS),u=_(t,e,n,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)o.right&&(r=l(a.x,a.y,o.right,o.y)-a.radius):a.y>o.bottom&&(a.xo.right&&(r=l(a.x,a.y,o.right,o.bottom)-a.radius)),r*=-1}else r=t.halfWidth+e.halfWidth-l(t.center.x,t.center.y,e.center.x,e.center.y);if(t.overlapR=r,e.overlapR=r,i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r&&(t.onOverlap||e.onOverlap)&&this.emit(c.OVERLAP,t.gameObject,e.gameObject,t,e),0!==r;var h=t.center.x-e.center.x,u=t.center.y-e.center.y,d=Math.sqrt(Math.pow(h,2)+Math.pow(u,2)),p=(e.center.x-t.center.x)/d||0,f=(e.center.y-t.center.y)/d||0,m=2*(t.velocity.x*p+t.velocity.y*f-e.velocity.x*p-e.velocity.y*f)/(t.mass+e.mass);(t.immovable||e.immovable)&&(m*=2),t.immovable||(t.velocity.x=t.velocity.x-m/t.mass*p,t.velocity.y=t.velocity.y-m/t.mass*f),e.immovable||(e.velocity.x=e.velocity.x+m/e.mass*p,e.velocity.y=e.velocity.y+m/e.mass*f),t.immovable||e.immovable||(r/=2);var y=s(t.center,e.center),T=(r+x.EPSILON)*Math.cos(y),w=(r+x.EPSILON)*Math.sin(y);return t.immovable||(t.x-=T,t.y-=w,t.updateCenter()),e.immovable||(e.x+=T,e.y+=w,e.updateCenter()),t.velocity.x*=t.bounce.x,t.velocity.y*=t.bounce.y,e.velocity.x*=e.bounce.x,e.velocity.y*=e.bounce.y,(t.onCollide||e.onCollide)&&this.emit(c.COLLIDE,t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?l(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.position.x||t.bottom<=e.position.y||t.position.x>=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=r(t.center.x,e.left,e.right),s=r(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-s)*(t.center.y-s)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.collideObjects(t,e,i,s,n,!0)},collide:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.collideObjects(t,e,i,s,n,!1)},collideObjects:function(t,e,i,s,n,r){var o,a;!t.isParent||void 0!==t.physicsType&&void 0!==e&&t!==e||(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var h=Array.isArray(t),l=Array.isArray(e);if(this._total=0,h||l)if(!h&&l)for(o=0;o0},collideHandler:function(t,e,i,s,n,r){if(void 0===e&&t.isParent)return this.collideGroupVsGroup(t,t,i,s,n,r);if(!t||!e)return!1;if(t.body||t.isBody){if(e.body||e.isBody)return this.collideSpriteVsSprite(t,e,i,s,n,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,s,n,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,s,n,r)}else if(t.isParent){if(e.body||e.isBody)return this.collideSpriteVsGroup(e,t,i,s,n,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,s,n,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,s,n,r)}else if(t.isTilemap){if(e.body||e.isBody)return this.collideSpriteVsTilemapLayer(e,t,i,s,n,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,s,n,r)}},collideSpriteVsSprite:function(t,e,i,s,n,r){var o=t.isBody?t:t.body,a=e.isBody?e:e.body;return!(!o||!a)&&(this.separate(o,a,s,n,r)&&(i&&i.call(n,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,s,n,r){var o,a,l,u=t.isBody?t:t.body;if(0!==e.length&&u&&u.enable&&!u.checkCollision.none)if(this.useTree||e.physicsType===h.STATIC_BODY){var c=this.treeMinMax;c.minX=u.left,c.minY=u.top,c.maxX=u.right,c.maxY=u.bottom;var d=e.physicsType===h.DYNAMIC_BODY?this.tree.search(c):this.staticTree.search(c);for(a=d.length,o=0;oc.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=d,l+=d}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var p=r?null:this.tileFilterOptions,f=m(a,h,l,u,p,e.scene.cameras.main,e.layer);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,s,n,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,s,n,r,o){for(var a,h,l=t.isBody?t:t.body,u={left:0,right:0,top:0,bottom:0},d=!1,p=0;p{t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},29257:t=>{t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},62122:t=>{t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,e,i,s){return this.body.setCollideWorldBounds(t,e,i,s),this}}},99803:t=>{t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},87145:t=>{t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}}},96174:t=>{var e={enableBody:function(t,e,i,s,n){return t&&this.body.reset(e,i),s&&(this.body.gameObject.active=!0),n&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=e},51702:t=>{t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},25578:t=>{t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},72029:t=>{var e={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=e},34566:t=>{t.exports={setMass:function(t){return this.body.mass=t,this}}},2732:(t,e,i)=>{var s=i(15147),n=i(26673),r=i(22184),o=i(26535);t.exports=function(t,e,i,a,h,l){var u=s(t,e-a,i-a,2*a,2*a,h,l);if(0===u.length)return u;for(var c=new n(e,i,a),d=new n,p=[],f=0;f{t.exports=function(t,e,i,s,n,r,o){void 0===r&&(r=!0),void 0===o&&(o=!1);var a=[],h=[],l=t.treeMinMax;if(l.minX=e,l.minY=i,l.maxX=e+s,l.maxY=i+n,o&&(h=t.staticTree.search(l)),r&&t.useTree)a=t.tree.search(l);else if(r){var u=t.bodies,c={position:{x:e,y:i},left:e,top:i,right:e+s,bottom:i+n,isCircle:!1},d=t.intersects;u.iterate((function(t){d(t,c)&&a.push(t)}))}return h.concat(a)}},57527:t=>{var e={setPushable:function(t){return void 0===t&&(t=!0),this.body.pushable=t,this}};t.exports=e},77687:t=>{t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setBodySize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},66536:t=>{t.exports={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}}},7864:(t,e,i)=>{t.exports={Acceleration:i(5321),Angular:i(29257),Bounce:i(62122),Debug:i(99803),Drag:i(87145),Enable:i(96174),Friction:i(51702),Gravity:i(25578),Immovable:i(72029),Mass:i(34566),OverlapCirc:i(2732),OverlapRect:i(15147),Pushable:i(57527),Size:i(77687),Velocity:i(66536)}},47401:t=>{t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},22346:t=>{t.exports="collide"},95092:t=>{t.exports="overlap"},15775:t=>{t.exports="pause"},74142:t=>{t.exports="resume"},22825:t=>{t.exports="tilecollide"},10851:t=>{t.exports="tileoverlap"},7543:t=>{t.exports="worldbounds"},1487:t=>{t.exports="worldstep"},27037:(t,e,i)=>{t.exports={COLLIDE:i(22346),OVERLAP:i(95092),PAUSE:i(15775),RESUME:i(74142),TILE_COLLIDE:i(22825),TILE_OVERLAP:i(10851),WORLD_BOUNDS:i(7543),WORLD_STEP:i(1487)}},39977:(t,e,i)=>{var s=i(47401),n=i(98611),r={ArcadePhysics:i(66150),Body:i(97602),Collider:i(3909),Components:i(7864),Events:i(27037),Factory:i(99523),GetOverlapX:i(75671),GetOverlapY:i(66185),SeparateX:i(61777),SeparateY:i(25299),Group:i(10481),Image:i(62832),Sprite:i(25084),StaticBody:i(66634),StaticGroup:i(46346),Tilemap:i(8413),World:i(85233)};r=n(!1,r,s),t.exports=r},25163:t=>{t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},98209:t=>{t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):e>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,t.updateCenter(),0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},72792:t=>{t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):e>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,t.updateCenter(),0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},27354:(t,e,i)=>{var s=i(14405),n=i(52926),r=i(28808);t.exports=function(t,e,i,o,a,h,l){var u=o.left,c=o.top,d=o.right,p=o.bottom,f=i.faceLeft||i.faceRight,v=i.faceTop||i.faceBottom;if(l||(f=!0,v=!0),!f&&!v)return!1;var g=0,m=0,y=0,x=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX(){var s=i(98209);t.exports=function(t,e,i,n,r,o){var a=0,h=e.faceLeft,l=e.faceRight,u=e.collideLeft,c=e.collideRight;return o||(h=!0,l=!0,u=!0,c=!0),t.deltaX()<0&&c&&t.checkCollision.left?l&&t.x0&&u&&t.checkCollision.right&&h&&t.right>i&&(a=t.right-i)>r&&(a=0),0!==a&&(t.customSeparateX?t.overlapX=a:s(t,a)),a}},52926:(t,e,i)=>{var s=i(72792);t.exports=function(t,e,i,n,r,o){var a=0,h=e.faceTop,l=e.faceBottom,u=e.collideUp,c=e.collideDown;return o||(h=!0,l=!0,u=!0,c=!0),t.deltaY()<0&&c&&t.checkCollision.up?l&&t.y0&&u&&t.checkCollision.down&&h&&t.bottom>i&&(a=t.bottom-i)>r&&(a=0),0!==a&&(t.customSeparateY?t.overlapY=a:s(t,a)),a}},28808:t=>{t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},8413:(t,e,i)=>{var s={ProcessTileCallbacks:i(25163),ProcessTileSeparationX:i(98209),ProcessTileSeparationY:i(72792),SeparateTile:i(27354),TileCheckX:i(14405),TileCheckY:i(52926),TileIntersectsBody:i(28808)};t.exports=s},53954:(t,e,i)=>{t.exports={Arcade:i(39977),Matter:i(45949)}},63568:(t,e,i)=>{var s=i(56694),n=i(93736),r=new s({initialize:function(){this.boundsCenter=new n,this.centerDiff=new n},parseBody:function(t){if(!(t=t.hasOwnProperty("body")?t.body:t).hasOwnProperty("bounds")||!t.hasOwnProperty("centerOfMass"))return!1;var e=this.boundsCenter,i=this.centerDiff,s=t.bounds.max.x-t.bounds.min.x,n=t.bounds.max.y-t.bounds.min.y,r=s*t.centerOfMass.x,o=n*t.centerOfMass.y;return e.set(s/2,n/2),i.set(r-e.x,o-e.y),!0},getTopLeft:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e+s.x+r.x,i+s.y+r.y)}return!1},getTopCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e+r.x,i+s.y+r.y)}return!1},getTopRight:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e-(s.x-r.x),i+s.y+r.y)}return!1},getLeftCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e+s.x+r.x,i+r.y)}return!1},getCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.centerDiff;return new n(e+s.x,i+s.y)}return!1},getRightCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e-(s.x-r.x),i+r.y)}return!1},getBottomLeft:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e+s.x+r.x,i-(s.y-r.y))}return!1},getBottomCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e+r.x,i-(s.y-r.y))}return!1},getBottomRight:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e-(s.x-r.x),i-(s.y-r.y))}return!1}});t.exports=r},18171:(t,e,i)=>{var s=i(16929);s.Body=i(84125),s.Composite=i(11299),s.World=i(72005),s.Collision=i(63454),s.Detector=i(13657),s.Pairs=i(91327),s.Pair=i(70584),s.Query=i(13390),s.Resolver=i(44272),s.Constraint=i(52838),s.Common=i(68758),s.Engine=i(45775),s.Events=i(39073),s.Sleeping=i(22806),s.Plugin=i(84474),s.Bodies=i(68516),s.Composites=i(56643),s.Axes=i(50658),s.Bounds=i(84091),s.Svg=i(92765),s.Vector=i(10438),s.Vertices=i(39745),s.World.add=s.Composite.add,s.World.remove=s.Composite.remove,s.World.addComposite=s.Composite.addComposite,s.World.addBody=s.Composite.addBody,s.World.addConstraint=s.Composite.addConstraint,s.World.clear=s.Composite.clear,t.exports=s},72653:(t,e,i)=>{var s=i(68516),n=i(56694),r=i(56643),o=i(52838),a=i(92765),h=i(3860),l=i(7030),u=i(73658),c=i(84720),d=i(10998),p=i(72829),f=i(88596),v=i(39745),g=new n({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},rectangle:function(t,e,i,n,r){var o=s.rectangle(t,e,i,n,r);return this.world.add(o),o},trapezoid:function(t,e,i,n,r,o){var a=s.trapezoid(t,e,i,n,r,o);return this.world.add(a),a},circle:function(t,e,i,n,r){var o=s.circle(t,e,i,n,r);return this.world.add(o),o},polygon:function(t,e,i,n,r){var o=s.polygon(t,e,i,n,r);return this.world.add(o),o},fromVertices:function(t,e,i,n,r,o,a){"string"==typeof i&&(i=v.fromPath(i));var h=s.fromVertices(t,e,i,n,r,o,a);return this.world.add(h),h},fromPhysicsEditor:function(t,e,i,s,n){void 0===n&&(n=!0);var r=d.parseBody(t,e,i,s);return n&&!this.world.has(r)&&this.world.add(r),r},fromSVG:function(t,e,i,n,r,o){void 0===n&&(n=1),void 0===r&&(r={}),void 0===o&&(o=!0);for(var h=i.getElementsByTagName("path"),l=[],u=0;u{var s=i(74527),n=i(72632),r=i(93736);t.exports=function(t,e,i,o){void 0===i&&(i={}),void 0===o&&(o=!0);var a=e.x,h=e.y;if(e.body={temp:!0,position:{x:a,y:h}},[s.Bounce,s.Collision,s.Force,s.Friction,s.Gravity,s.Mass,s.Sensor,s.SetBody,s.Sleep,s.Static,s.Transform,s.Velocity].forEach((function(t){for(var i in t)(s=t[i]).get&&"function"==typeof s.get||s.set&&"function"==typeof s.set?Object.defineProperty(e,i,{get:t[i].get,set:t[i].set}):Object.defineProperty(e,i,{value:t[i]});var s})),e.world=t,e._tempVec2=new r(a,h),i.hasOwnProperty("type")&&"body"===i.type)e.setExistingBody(i,o);else{var l=n(i,"shape",null);l||(l="rectangle"),i.addToWorld=o,e.setBody(l,i)}return e}},7030:(t,e,i)=>{var s=i(56694),n=i(74527),r=i(89980),o=i(72632),a=i(1539),h=i(58210),l=i(93736),u=new s({Extends:a,Mixins:[n.Bounce,n.Collision,n.Force,n.Friction,n.Gravity,n.Mass,n.Sensor,n.SetBody,n.Sleep,n.Static,n.Transform,n.Velocity,h],initialize:function(t,e,i,s,n,a){r.call(this,t.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(s,n),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new l(e,i);var h=o(a,"shape",null);h?this.setBody(h,a):this.setRectangle(this.width,this.height,a),this.setPosition(e,i),this.initPipeline()}});t.exports=u},50583:(t,e,i)=>{var s=i(84093),n=i(50658),r=i(68516),o=i(84125),a=i(63568),h=i(84091),l=i(56694),u=i(63454),c=i(68758),d=i(11299),p=i(56643),f=i(52838),v=i(13657),g=i(53996),m=i(72653),y=i(72632),x=i(10850),T=i(1675),w=i(80391),b=i(16929),S=i(44097),E=i(30657),A=i(70584),_=i(91327),C=i(84474),M=i(91963),R=i(13390),P=i(44272),O=i(7599),L=i(92765),F=i(10438),D=i(39745),k=i(31468);c.setDecomp(i(81084));var I=new l({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=o,this.composite=d,this.collision=u,this.detector=v,this.pair=A,this.pairs=_,this.query=R,this.resolver=P,this.constraint=f,this.bodies=r,this.composites=p,this.axes=n,this.bounds=h,this.svg=L,this.vector=F,this.vertices=D,this.verts=D,this._tempVec2=F.create(),x(this.config,"plugins.collisionevents",!0)&&this.enableCollisionEventsPlugin(),x(this.config,"plugins.attractors",!1)&&this.enableAttractorPlugin(),x(this.config,"plugins.wrap",!1)&&this.enableWrapPlugin(),P._restingThresh=x(this.config,"restingThresh",4),P._restingThreshTangent=x(this.config,"restingThreshTangent",6),P._positionDampen=x(this.config,"positionDampen",.9),P._positionWarming=x(this.config,"positionWarming",.8),P._frictionNormalMultiplier=x(this.config,"frictionNormalMultiplier",5),t.sys.events.once(O.BOOT,this.boot,this),t.sys.events.on(O.START,this.start,this)},boot:function(){this.world=new k(this.scene,this.config),this.add=new m(this.world),this.bodyBounds=new a,this.systems.events.once(O.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new k(this.scene,this.config),this.add=new m(this.world));var t=this.systems.events;t.on(O.UPDATE,this.world.update,this.world),t.on(O.POST_UPDATE,this.world.postUpdate,this.world),t.once(O.SHUTDOWN,this.shutdown,this)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return E(y(e,"matter",{}),y(t,"matter",{}))},enableAttractorPlugin:function(){return C.register(T),C.use(b,T),this},enableWrapPlugin:function(){return C.register(S),C.use(b,S),this},enableCollisionEventsPlugin:function(){return C.register(w),C.use(b,w),this},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(t,e){this.world.step(t,e)},containsPoint:function(t,e,i){t=this.getMatterBodies(t);var s=F.create(e,i);return R.point(t,s).length>0},intersectPoint:function(t,e,i){i=this.getMatterBodies(i);var s=F.create(t,e),n=[];return R.point(i,s).forEach((function(t){-1===n.indexOf(t)&&n.push(t)})),n},intersectRect:function(t,e,i,s,n,r){void 0===n&&(n=!1),r=this.getMatterBodies(r);var o={min:{x:t,y:e},max:{x:t+i,y:e+s}},a=[];return R.region(r,o,n).forEach((function(t){-1===a.indexOf(t)&&a.push(t)})),a},intersectRay:function(t,e,i,s,n,r){void 0===n&&(n=1),r=this.getMatterBodies(r);for(var o=[],a=R.ray(r,F.create(t,e),F.create(i,s),n),h=0;h{var s=i(16569),n=i(56694),r=i(74527),o=i(89980),a=i(72632),h=i(58210),l=i(13747),u=i(93736),c=new n({Extends:l,Mixins:[r.Bounce,r.Collision,r.Force,r.Friction,r.Gravity,r.Mass,r.Sensor,r.SetBody,r.Sleep,r.Static,r.Transform,r.Velocity,h],initialize:function(t,e,i,n,r,h){o.call(this,t.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s(this),this.setTexture(n,r),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new u(e,i);var l=a(h,"shape",null);l?this.setBody(l,h):this.setRectangle(this.width,this.height,h),this.setPosition(e,i),this.initPipeline()}});t.exports=c},84720:(t,e,i)=>{var s=i(68516),n=i(84125),r=i(56694),o=i(74527),a=i(6659),h=i(72632),l=i(19256),u=i(39745),c=new r({Extends:a,Mixins:[o.Bounce,o.Collision,o.Friction,o.Gravity,o.Mass,o.Sensor,o.Sleep,o.Static],initialize:function(t,e,i){a.call(this),this.tile=e,this.world=t,e.physics.matterBody&&e.physics.matterBody.destroy(),e.physics.matterBody=this;var s=h(i,"body",null),n=h(i,"addToWorld",!0);if(s)this.setBody(s,n);else{var r=e.getCollisionGroup();h(r,"objects",[]).length>0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}},setFromTileRectangle:function(t){void 0===t&&(t={}),l(t,"isStatic")||(t.isStatic=!0),l(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,n=e.y+e.height/2,r=s.rectangle(i,n,e.width,e.height,t);return this.setBody(r,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),l(t,"isStatic")||(t.isStatic=!0),l(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,r=this.tile.getLeft(),o=this.tile.getTop(),a=this.tile.getCollisionGroup(),c=h(a,"objects",[]),d=[],p=0;p1&&(t.parts=d,this.setBody(n.create(t),t.addToWorld)),this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0,this.removeAllListeners()}});t.exports=c},10998:(t,e,i)=>{var s=i(68516),n=i(84125),r=i(68758),o=i(72632),a=i(39745),h={parseBody:function(t,e,i,s){void 0===s&&(s={});for(var a=o(i,"fixtures",[]),h=[],l=0;l{var s=i(68516),n=i(84125),r={parseBody:function(t,e,i,r){var o;void 0===r&&(r={});var a=i.vertices;if(1===a.length)r.vertices=a[0],o=n.create(r),s.flagCoincidentParts(o.parts);else{for(var h=[],l=0;l{var s=i(84091),n=i(56694),r=i(11299),o=i(52838),a=i(13657),h=i(35416),l=i(33963),u=i(30657),c=i(22806),d=i(93736),p=i(39745),f=new n({initialize:function(t,e,i){void 0===i&&(i={});this.scene=t,this.world=e,this.camera=null,this.pointer=null,this.active=!0,this.position=new d,this.body=null,this.part=null,this.constraint=o.create(u(i,{label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}})),this.world.on(h.BEFORE_UPDATE,this.update,this),t.sys.input.on(l.POINTER_DOWN,this.onDown,this),t.sys.input.on(l.POINTER_UP,this.onUp,this)},onDown:function(t){this.pointer||(this.pointer=t,this.camera=t.camera)},onUp:function(t){t===this.pointer&&(this.pointer=null)},getBody:function(t){var e=this.position,i=this.constraint;this.camera.getWorldPoint(t.x,t.y,e);for(var n=r.allBodies(this.world.localWorld),o=0;o1?1:0;n{var s=i(68516),n=i(84125),r=i(56694),o=i(68758),a=i(11299),h=i(45775),l=i(6659),u=i(35416),c=i(72632),d=i(10850),p=i(84125),f=i(39073),v=i(84720),g=i(72005),m=i(10438),y=new r({Extends:l,initialize:function(t,e){l.call(this),this.scene=t,this.engine=h.create(e),this.localWorld=this.engine.world;var i=d(e,"gravity",null);i?this.setGravity(i.x,i.y,i.scale):!1===i&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=d(e,"enabled",!0),this.correction=d(e,"correction",1),this.getDelta=d(e,"getDelta",this.update60Hz);var s=c(e,"runner",{}),n=c(s,"fps",!1),r=c(s,"fps",60),o=c(s,"delta",1e3/r),a=c(s,"deltaMin",1e3/r),u=c(s,"deltaMax",1e3/(.5*r));n||(r=1e3/o),this.runner={fps:r,correction:c(s,"correction",1),deltaSampleSize:c(s,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:c(s,"isFixed",!1),delta:o,deltaMin:a,deltaMax:u},this.autoUpdate=d(e,"autoUpdate",!0);var p=d(e,"debug",!1);if(this.drawDebug="object"==typeof p||p,this.debugGraphic,this.debugConfig={showAxes:c(p,"showAxes",!1),showAngleIndicator:c(p,"showAngleIndicator",!1),angleColor:c(p,"angleColor",15208787),showBroadphase:c(p,"showBroadphase",!1),broadphaseColor:c(p,"broadphaseColor",16757760),showBounds:c(p,"showBounds",!1),boundsColor:c(p,"boundsColor",16777215),showVelocity:c(p,"showVelocity",!1),velocityColor:c(p,"velocityColor",44783),showCollisions:c(p,"showCollisions",!1),collisionColor:c(p,"collisionColor",16094476),showSeparations:c(p,"showSeparations",!1),separationColor:c(p,"separationColor",16753920),showBody:c(p,"showBody",!0),showStaticBody:c(p,"showStaticBody",!0),showInternalEdges:c(p,"showInternalEdges",!1),renderFill:c(p,"renderFill",!1),renderLine:c(p,"renderLine",!0),fillColor:c(p,"fillColor",1075465),fillOpacity:c(p,"fillOpacity",1),lineColor:c(p,"lineColor",2678297),lineOpacity:c(p,"lineOpacity",1),lineThickness:c(p,"lineThickness",1),staticFillColor:c(p,"staticFillColor",857979),staticLineColor:c(p,"staticLineColor",1255396),showSleeping:c(p,"showSleeping",!1),staticBodySleepOpacity:c(p,"staticBodySleepOpacity",.7),sleepFillColor:c(p,"sleepFillColor",4605510),sleepLineColor:c(p,"sleepLineColor",10066585),showSensors:c(p,"showSensors",!0),sensorFillColor:c(p,"sensorFillColor",857979),sensorLineColor:c(p,"sensorLineColor",1255396),showPositions:c(p,"showPositions",!0),positionSize:c(p,"positionSize",4),positionColor:c(p,"positionColor",14697178),showJoint:c(p,"showJoint",!0),jointColor:c(p,"jointColor",14737474),jointLineOpacity:c(p,"jointLineOpacity",1),jointLineThickness:c(p,"jointLineThickness",2),pinSize:c(p,"pinSize",4),pinColor:c(p,"pinColor",4382944),springColor:c(p,"springColor",14697184),anchorColor:c(p,"anchorColor",15724527),anchorSize:c(p,"anchorSize",4),showConvexHulls:c(p,"showConvexHulls",!1),hullColor:c(p,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),c(e,"setBounds",!1)){var f=e.setBounds;if("boolean"==typeof f)this.setBounds();else{var v=c(f,"x",0),g=c(f,"y",0),m=c(f,"width",t.sys.scale.width),y=c(f,"height",t.sys.scale.height),x=c(f,"thickness",64),T=c(f,"left",!0),w=c(f,"right",!0),b=c(f,"top",!0),S=c(f,"bottom",!0);this.setBounds(v,g,m,y,x,T,w,b,S)}}},setCompositeRenderStyle:function(t){var e,i,s,n=t.bodies,r=t.constraints,o=t.composites;for(e=0;e0&&(i=n[0].bodyA,s=n[0].bodyB),t.emit(u.COLLISION_START,e,i,s)})),f.on(e,"collisionActive",(function(e){var i,s,n=e.pairs;n.length>0&&(i=n[0].bodyA,s=n[0].bodyB),t.emit(u.COLLISION_ACTIVE,e,i,s)})),f.on(e,"collisionEnd",(function(e){var i,s,n=e.pairs;n.length>0&&(i=n[0].bodyA,s=n[0].bodyB),t.emit(u.COLLISION_END,e,i,s)}))},setBounds:function(t,e,i,s,n,r,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===s&&(s=this.scene.sys.scale.height),void 0===n&&(n=64),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-n,e-n,n,s+2*n),this.updateWall(o,"right",t+i,e-n,n,s+2*n),this.updateWall(a,"top",t,e-n,i,n),this.updateWall(h,"bottom",t,e+s,i,n),this},updateWall:function(t,e,i,s,n,r){var o=this.walls[e];t?(o&&g.remove(this.localWorld,o),i+=n/2,s+=r/2,this.walls[e]=this.create(i,s,n,r,{isStatic:!0,friction:0,frictionStatic:0})):(o&&g.remove(this.localWorld,o),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setDepth(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=1),this.localWorld.gravity.x=t,this.localWorld.gravity.y=e,void 0!==i&&(this.localWorld.gravity.scale=i),this},create:function(t,e,i,n,r){var o=s.rectangle(t,e,i,n,r);return g.add(this.localWorld,o),o},add:function(t){return g.add(this.localWorld,t),this},remove:function(t,e){Array.isArray(t)||(t=[t]);for(var i=0;is.deltaMax?s.deltaMax:e)/s.delta,s.delta=e),0!==s.timeScalePrev&&(r*=n.timeScale/s.timeScalePrev),0===n.timeScale&&(r=0),s.timeScalePrev=n.timeScale,s.correction=r,s.frameCounter+=1,t-s.counterTimestamp>=1e3&&(s.fps=s.frameCounter*((t-s.counterTimestamp)/1e3),s.counterTimestamp=t,s.frameCounter=0),h.update(i,e,r)}},step:function(t,e){h.update(this.engine,t,e)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(t){var e=t.hasOwnProperty("body")?t.body:t;return null!==a.get(this.localWorld,e.id,e.type)},getAllBodies:function(){return a.allBodies(this.localWorld)},getAllConstraints:function(){return a.allConstraints(this.localWorld)},getAllComposites:function(){return a.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var t=this.debugConfig,e=this.engine,i=this.debugGraphic,s=a.allBodies(this.localWorld);this.debugGraphic.clear(),t.showBroadphase&&e.broadphase.controller&&this.renderGrid(e.broadphase,i,t.broadphaseColor,.5),t.showBounds&&this.renderBodyBounds(s,i,t.boundsColor,.5),(t.showBody||t.showStaticBody)&&this.renderBodies(s),t.showJoint&&this.renderJoints(),(t.showAxes||t.showAngleIndicator)&&this.renderBodyAxes(s,i,t.showAxes,t.angleColor,.5),t.showVelocity&&this.renderBodyVelocity(s,i,t.velocityColor,1,2),t.showSeparations&&this.renderSeparations(e.pairs.list,i,t.separationColor),t.showCollisions&&this.renderCollisions(e.pairs.list,i,t.collisionColor)}},renderGrid:function(t,e,i,s){e.lineStyle(1,i,s);for(var n=o.keys(t.buckets),r=0;r0){var l=h[0].vertex.x,u=h[0].vertex.y;2===h.length&&(l=(h[0].vertex.x+h[1].vertex.x)/2,u=(h[0].vertex.y+h[1].vertex.y)/2),a.bodyB===a.supports[0].body||a.bodyA.isStatic?e.lineBetween(l-8*a.normal.x,u-8*a.normal.y,l,u):e.lineBetween(l+8*a.normal.x,u+8*a.normal.y,l,u)}}return this},renderBodyBounds:function(t,e,i,s){e.lineStyle(1,i,s);for(var n=0;n1?1:0;h1?1:0;a1?1:0;a1&&this.renderConvexHull(v,e,p,y)}}},renderBody:function(t,e,i,s,n,r,o,a){void 0===s&&(s=null),void 0===n&&(n=null),void 0===r&&(r=1),void 0===o&&(o=null),void 0===a&&(a=null);for(var h=this.debugConfig,l=h.sensorFillColor,u=h.sensorLineColor,c=t.parts,d=c.length,p=d>1?1:0;p1){var n=t.vertices;e.lineStyle(s,i),e.beginPath(),e.moveTo(n[0].x,n[0].y);for(var r=1;r0&&(e.fillStyle(a),e.fillCircle(u.x,u.y,h),e.fillCircle(c.x,c.y,h)),this},resetCollisionIDs:function(){return n._nextCollidingGroupId=1,n._nextNonCollidingGroupId=-1,n._nextCategory=1,this},shutdown:function(){f.off(this.engine),this.removeAllListeners(),g.clear(this.localWorld,!1),h.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});t.exports=y},95349:t=>{t.exports={setBounce:function(t){return this.body.restitution=t,this}}},70679:t=>{var e={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var e=0;if(Array.isArray(t))for(var i=0;i{var s=i(84125),n={applyForce:function(t){return this._tempVec2.set(this.body.position.x,this.body.position.y),s.applyForce(this.body,this._tempVec2,t),this},applyForceFrom:function(t,e){return s.applyForce(this.body,t,e),this},thrust:function(t){var e=this.body.angle;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),s.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(t){var e=this.body.angle-Math.PI/2;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),s.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(t){var e=this.body.angle+Math.PI/2;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),s.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(t){var e=this.body.angle-Math.PI;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),s.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};t.exports=n},74015:t=>{var e={setFriction:function(t,e,i){return this.body.friction=t,void 0!==e&&(this.body.frictionAir=e),void 0!==i&&(this.body.frictionStatic=i),this},setFrictionAir:function(t){return this.body.frictionAir=t,this},setFrictionStatic:function(t){return this.body.frictionStatic=t,this}};t.exports=e},11535:t=>{t.exports={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}}},74497:(t,e,i)=>{var s=i(84125),n=i(93736),r={setMass:function(t){return s.setMass(this.body,t),this},setDensity:function(t){return s.setDensity(this.body,t),this},centerOfMass:{get:function(){return new n(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};t.exports=r},75529:t=>{t.exports={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}}},64024:(t,e,i)=>{var s=i(68516),n=i(84125),r=i(88456),o=i(72632),a=i(10998),h=i(72829),l=i(39745),u={setRectangle:function(t,e,i){return this.setBody({type:"rectangle",width:t,height:e},i)},setCircle:function(t,e){return this.setBody({type:"circle",radius:t},e)},setPolygon:function(t,e,i){return this.setBody({type:"polygon",sides:e,radius:t},i)},setTrapezoid:function(t,e,i,s){return this.setBody({type:"trapezoid",width:t,height:e,slope:i},s)},setExistingBody:function(t,e){void 0===e&&(e=!0),this.body&&this.world.remove(this.body,!0),this.body=t;for(var i=0;i{var s=i(35416),n=i(22806),r=i(39073),o={setToSleep:function(){return n.set(this.body,!0),this},setAwake:function(){return n.set(this.body,!1),this},setSleepThreshold:function(t){return void 0===t&&(t=60),this.body.sleepThreshold=t,this},setSleepEvents:function(t,e){return this.setSleepStartEvent(t),this.setSleepEndEvent(e),this},setSleepStartEvent:function(t){if(t){var e=this.world;r.on(this.body,"sleepStart",(function(t){e.emit(s.SLEEP_START,t,this)}))}else r.off(this.body,"sleepStart");return this},setSleepEndEvent:function(t){if(t){var e=this.world;r.on(this.body,"sleepEnd",(function(t){e.emit(s.SLEEP_END,t,this)}))}else r.off(this.body,"sleepEnd");return this}};t.exports=o},82884:(t,e,i)=>{var s=i(84125),n={setStatic:function(t){return s.setStatic(this.body,t),this},isStatic:function(){return this.body.isStatic}};t.exports=n},4753:(t,e,i)=>{var s=i(84125),n=i(83392),r=i(35786),o=i(62138),a={x:{get:function(){return this.body.position.x},set:function(t){this._tempVec2.set(t,this.y),s.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(t){this._tempVec2.set(this.x,t),s.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(t){var e=1/this._scaleX,i=1/this._scaleY;this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4,s.scale(this.body,e,i),s.scale(this.body,t,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(t){var e=1/this._scaleX,i=1/this._scaleY;this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4,s.scale(this.body,e,i),s.scale(this.body,this._scaleX,t)}},angle:{get:function(){return o(this.body.angle*n.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(t){this._rotation=r(t),s.setAngle(this.body,this._rotation)}},setPosition:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this._tempVec2.set(t,e),s.setPosition(this.body,this._tempVec2),this},setRotation:function(t){return void 0===t&&(t=0),this._rotation=r(t),s.setAngle(this.body,t),this},setFixedRotation:function(){return s.setInertia(this.body,1/0),this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,s.setAngle(this.body,this.rotation),this},setScale:function(t,e,i){void 0===t&&(t=1),void 0===e&&(e=t);var n=1/this._scaleX,r=1/this._scaleY;return this._scaleX=t,this._scaleY=e,s.scale(this.body,n,r,i),s.scale(this.body,t,e,i),this}};t.exports=a},37268:(t,e,i)=>{var s=i(84125),n={setAngularVelocity:function(t){return s.setAngularVelocity(this.body,t),this},setVelocityX:function(t){return this._tempVec2.set(t,this.body.velocity.y),s.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(t){return this._tempVec2.set(this.body.velocity.x,t),s.setVelocity(this.body,this._tempVec2),this},setVelocity:function(t,e){return this._tempVec2.set(t,e),s.setVelocity(this.body,this._tempVec2),this}};t.exports=n},74527:(t,e,i)=>{t.exports={Bounce:i(95349),Collision:i(70679),Force:i(77178),Friction:i(74015),Gravity:i(11535),Mass:i(74497),Sensor:i(75529),SetBody:i(64024),Sleep:i(25106),Static:i(82884),Transform:i(4753),Velocity:i(37268)}},63201:t=>{t.exports="afteradd"},30474:t=>{t.exports="afterremove"},44822:t=>{t.exports="afterupdate"},88820:t=>{t.exports="beforeadd"},94849:t=>{t.exports="beforeremove"},6391:t=>{t.exports="beforeupdate"},96738:t=>{t.exports="collisionactive"},7916:t=>{t.exports="collisionend"},59529:t=>{t.exports="collisionstart"},10219:t=>{t.exports="dragend"},183:t=>{t.exports="drag"},39143:t=>{t.exports="dragstart"},16483:t=>{t.exports="pause"},35806:t=>{t.exports="resume"},22106:t=>{t.exports="sleepend"},5803:t=>{t.exports="sleepstart"},35416:(t,e,i)=>{t.exports={AFTER_ADD:i(63201),AFTER_REMOVE:i(30474),AFTER_UPDATE:i(44822),BEFORE_ADD:i(88820),BEFORE_REMOVE:i(94849),BEFORE_UPDATE:i(6391),COLLISION_ACTIVE:i(96738),COLLISION_END:i(7916),COLLISION_START:i(59529),DRAG_END:i(10219),DRAG:i(183),DRAG_START:i(39143),PAUSE:i(16483),RESUME:i(35806),SLEEP_END:i(22106),SLEEP_START:i(5803)}},45949:(t,e,i)=>{t.exports={BodyBounds:i(63568),Components:i(74527),Events:i(35416),Factory:i(72653),MatterGameObject:i(3860),Image:i(7030),Matter:i(18171),MatterPhysics:i(50583),PolyDecomp:i(81084),Sprite:i(73658),TileBody:i(84720),PhysicsEditorParser:i(10998),PhysicsJSONParser:i(72829),PointerConstraint:i(88596),World:i(31468)}},84125:(t,e,i)=>{var s={};t.exports=s;var n=i(39745),r=i(10438),o=i(22806),a=i(68758),h=i(84091),l=i(50658);!function(){s._inertiaScale=4,s._nextCollidingGroupId=1,s._nextNonCollidingGroupId=-1,s._nextCategory=1,s.create=function(e){var i={id:a.nextId(),type:"body",label:"Body",parts:[],plugin:{},angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!e.hasOwnProperty("position")&&e.hasOwnProperty("vertices")?e.position=n.centre(e.vertices):e.hasOwnProperty("vertices")||(i.vertices=n.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var s=a.extend(i,e);return t(s,e),s.setOnCollideWith=function(t,e){return e?this.onCollideWith[t.id]=e:delete this.onCollideWith[t.id],this},s},s.nextGroup=function(t){return t?s._nextNonCollidingGroupId--:s._nextCollidingGroupId++},s.nextCategory=function(){return s._nextCategory=s._nextCategory<<1,s._nextCategory};var t=function(t,e){e=e||{},s.set(t,{bounds:t.bounds||h.create(t.vertices),positionPrev:t.positionPrev||r.clone(t.position),anglePrev:t.anglePrev||t.angle,vertices:t.vertices,parts:t.parts||[t],isStatic:t.isStatic,isSleeping:t.isSleeping,parent:t.parent||t});var i=t.bounds;if(n.rotate(t.vertices,t.angle,t.position),l.rotate(t.axes,t.angle),h.update(i,t.vertices,t.velocity),s.set(t,{axes:e.axes||t.axes,area:e.area||t.area,mass:e.mass||t.mass,inertia:e.inertia||t.inertia}),1===t.parts.length){var o=t.centerOfMass,a=t.centerOffset,u=i.max.x-i.min.x,c=i.max.y-i.min.y;o.x=-(i.min.x-t.position.x)/u,o.y=-(i.min.y-t.position.y)/c,a.x=u*o.x,a.y=c*o.y}};s.set=function(t,e,i){var n;for(n in"string"==typeof e&&(n=e,(e={})[n]=i),e)if(Object.prototype.hasOwnProperty.call(e,n))switch(i=e[n],n){case"isStatic":s.setStatic(t,i);break;case"isSleeping":o.set(t,i);break;case"mass":s.setMass(t,i);break;case"density":s.setDensity(t,i);break;case"inertia":s.setInertia(t,i);break;case"vertices":s.setVertices(t,i);break;case"position":s.setPosition(t,i);break;case"angle":s.setAngle(t,i);break;case"velocity":s.setVelocity(t,i);break;case"angularVelocity":s.setAngularVelocity(t,i);break;case"parts":s.setParts(t,i);break;case"centre":s.setCentre(t,i);break;default:t[n]=i}},s.setStatic=function(t,e){for(var i=0;i0&&r.rotateAbout(o.position,i,t.position,o.position)}},s.setVelocity=function(t,e){t.positionPrev.x=t.position.x-e.x,t.positionPrev.y=t.position.y-e.y,t.velocity.x=e.x,t.velocity.y=e.y,t.speed=r.magnitude(t.velocity)},s.setAngularVelocity=function(t,e){t.anglePrev=t.angle-e,t.angularVelocity=e,t.angularSpeed=Math.abs(t.angularVelocity)},s.translate=function(t,e){s.setPosition(t,r.add(t.position,e))},s.rotate=function(t,e,i){if(i){var n=Math.cos(e),r=Math.sin(e),o=t.position.x-i.x,a=t.position.y-i.y;s.setPosition(t,{x:i.x+(o*n-a*r),y:i.y+(o*r+a*n)}),s.setAngle(t,t.angle+e)}else s.setAngle(t,t.angle+e)},s.scale=function(t,e,i,r){var o=0,a=0;r=r||t.position;for(var u=0;u0&&(o+=c.area,a+=c.inertia),c.position.x=r.x+(c.position.x-r.x)*e,c.position.y=r.y+(c.position.y-r.y)*i,h.update(c.bounds,c.vertices,t.velocity)}t.parts.length>1&&(t.area=o,t.isStatic||(s.setMass(t,t.density*o),s.setInertia(t,a))),t.circleRadius&&(e===i?t.circleRadius*=e:t.circleRadius=null)},s.update=function(t,e,i,s){var o=Math.pow(e*i*t.timeScale,2),a=1-t.frictionAir*i*t.timeScale,u=t.position.x-t.positionPrev.x,c=t.position.y-t.positionPrev.y;t.velocity.x=u*a*s+t.force.x/t.mass*o,t.velocity.y=c*a*s+t.force.y/t.mass*o,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.position.x+=t.velocity.x,t.position.y+=t.velocity.y,t.angularVelocity=(t.angle-t.anglePrev)*a*s+t.torque/t.inertia*o,t.anglePrev=t.angle,t.angle+=t.angularVelocity,t.speed=r.magnitude(t.velocity),t.angularSpeed=Math.abs(t.angularVelocity);for(var d=0;d0&&(p.position.x+=t.velocity.x,p.position.y+=t.velocity.y),0!==t.angularVelocity&&(n.rotate(p.vertices,t.angularVelocity,t.position),l.rotate(p.axes,t.angularVelocity),d>0&&r.rotateAbout(p.position,t.angularVelocity,t.position,p.position)),h.update(p.bounds,p.vertices,t.velocity)}},s.applyForce=function(t,e,i){t.force.x+=i.x,t.force.y+=i.y;var s=e.x-t.position.x,n=e.y-t.position.y;t.torque+=s*i.y-n*i.x},s._totalProperties=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;i{var s={};t.exports=s;var n=i(39073),r=i(68758),o=i(84091),a=i(84125);s.create=function(t){return r.extend({id:r.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},cache:{allBodies:null,allConstraints:null,allComposites:null}},t)},s.setModified=function(t,e,i,r){if(n.trigger(t,"compositeModified",t),t.isModified=e,e&&t.cache&&(t.cache.allBodies=null,t.cache.allConstraints=null,t.cache.allComposites=null),i&&t.parent&&s.setModified(t.parent,e,i,r),r)for(var o=0;o{var s={};t.exports=s;var n=i(11299);s.create=n.create,s.add=n.add,s.remove=n.remove,s.clear=n.clear,s.addComposite=n.addComposite,s.addBody=n.addBody,s.addConstraint=n.addConstraint},63454:(t,e,i)=>{var s={};t.exports=s;var n,r,o,a=i(39745),h=i(70584);n=[],r={overlap:0,axis:null},o={overlap:0,axis:null},s.create=function(t,e){return{pair:null,collided:!1,bodyA:t,bodyB:e,parentA:t.parent,parentB:e.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[]}},s.collides=function(t,e,i){if(s._overlapAxes(r,t.vertices,e.vertices,t.axes),r.overlap<=0)return null;if(s._overlapAxes(o,e.vertices,t.vertices,e.axes),o.overlap<=0)return null;var n,l,u=i&&i.table[h.id(t,e)];u?n=u.collision:((n=s.create(t,e)).collided=!0,n.bodyA=t.idE?E=a:aA?A=a:an?n=o:o{var e={};t.exports=e,e.create=function(t){return{vertex:t,normalImpulse:0,tangentImpulse:0}}},13657:(t,e,i)=>{var s={};t.exports=s;var n=i(68758),r=i(63454);s.create=function(t){return n.extend({bodies:[],pairs:null},t)},s.setBodies=function(t,e){t.bodies=e.slice(0)},s.clear=function(t){t.bodies=[]},s.collisions=function(t){var e,i,n=[],o=t.pairs,a=t.bodies,h=a.length,l=s.canCollide,u=r.collides;for(a.sort(s._compareBoundsX),e=0;ep)break;if(!(fC.max.y)&&(!g||!x.isStatic&&!x.isSleeping)&&l(c.collisionFilter,x.collisionFilter)){var T=x.parts.length;if(y&&1===T)(A=u(c,x,o))&&n.push(A);else for(var w=T>1?1:0,b=m>1?1:0;bC.max.x||d.max.xC.max.y||(A=u(S,_,o))&&n.push(A)}}}}return n},s.canCollide=function(t,e){return t.group===e.group&&0!==t.group?t.group>0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)},s._compareBoundsX=function(t,e){return t.bounds.min.x-e.bounds.min.x}},70584:(t,e,i)=>{var s={};t.exports=s;var n=i(17319);s.create=function(t,e){var i=t.bodyA,n=t.bodyB,r={id:s.id(i,n),bodyA:i,bodyB:n,collision:t,contacts:[],activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:i.isSensor||n.isSensor,timeCreated:e,timeUpdated:e,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return s.update(r,t,e),r},s.update=function(t,e,i){var s=t.contacts,r=e.supports,o=t.activeContacts,a=e.parentA,h=e.parentB,l=a.vertices.length;t.isActive=!0,t.timeUpdated=i,t.collision=e,t.separation=e.depth,t.inverseMass=a.inverseMass+h.inverseMass,t.friction=a.frictionh.frictionStatic?a.frictionStatic:h.frictionStatic,t.restitution=a.restitution>h.restitution?a.restitution:h.restitution,t.slop=a.slop>h.slop?a.slop:h.slop,e.pair=t,o.length=0;for(var u=0;u{var s={};t.exports=s;var n=i(70584),r=i(68758);s.create=function(t){return r.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},s.update=function(t,e,i){var s,r,o,a,h=t.list,l=h.length,u=t.table,c=e.length,d=t.collisionStart,p=t.collisionEnd,f=t.collisionActive;for(d.length=0,p.length=0,f.length=0,a=0;a{var s={};t.exports=s;var n=i(10438),r=i(63454),o=i(84091),a=i(68516),h=i(39745);s.collides=function(t,e){for(var i=[],s=e.length,n=t.bounds,a=r.collides,h=o.overlaps,l=0;l{var s={};t.exports=s;var n=i(39745),r=i(84091);s._restingThresh=4,s._restingThreshTangent=6,s._positionDampen=.9,s._positionWarming=.8,s._frictionNormalMultiplier=5,s.preSolvePosition=function(t){var e,i,s,n=t.length;for(e=0;ez||-Y>z?(n=Y>0?Y:-Y,(i=p.friction*(Y>0?1:-1)*a)<-n?i=-n:i>n&&(i=n)):(i=Y,n=c);var G=P*T-O*x,V=L*T-F*x,W=A/(_+v.inverseInertia*G*G+g.inverseInertia*V*V),H=(1+p.restitution)*N*W;if(i*=W,N*N>h&&N<0)M.normalImpulse=0;else{var j=M.normalImpulse;M.normalImpulse+=H,M.normalImpulse=Math.min(M.normalImpulse,0),H=M.normalImpulse-j}if(Y*Y>u)M.tangentImpulse=0;else{var K=M.tangentImpulse;M.tangentImpulse+=i,M.tangentImpulse<-n&&(M.tangentImpulse=-n),M.tangentImpulse>n&&(M.tangentImpulse=n),i=M.tangentImpulse-K}var q=x*H+w*i,Z=T*H+b*i;v.isStatic||v.isSleeping||(v.positionPrev.x+=q*v.inverseMass,v.positionPrev.y+=Z*v.inverseMass,v.anglePrev+=(P*Z-O*q)*v.inverseInertia),g.isStatic||g.isSleeping||(g.positionPrev.x-=q*g.inverseMass,g.positionPrev.y-=Z*g.inverseMass,g.anglePrev-=(L*Z-F*q)*g.inverseInertia)}}}}},52838:(t,e,i)=>{var s={};t.exports=s;var n=i(39745),r=i(10438),o=i(22806),a=i(84091),h=i(50658),l=i(68758);s._warming=.4,s._torqueDampen=1,s._minLength=1e-6,s.create=function(t){var e=t;e.bodyA&&!e.pointA&&(e.pointA={x:0,y:0}),e.bodyB&&!e.pointB&&(e.pointB={x:0,y:0});var i=e.bodyA?r.add(e.bodyA.position,e.pointA):e.pointA,s=e.bodyB?r.add(e.bodyB.position,e.pointB):e.pointB,n=r.magnitude(r.sub(i,s));e.length=void 0!==e.length?e.length:n,e.id=e.id||l.nextId(),e.label=e.label||"Constraint",e.type="constraint",e.stiffness=e.stiffness||(e.length>0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=l.extend(o,e.render),e},s.preSolveAll=function(t){for(var e=0;e0&&(c.position.x+=l.x,c.position.y+=l.y),0!==l.angle&&(n.rotate(c.vertices,l.angle,i.position),h.rotate(c.axes,l.angle),u>0&&r.rotateAbout(c.position,l.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}l.angle*=s._warming,l.x*=s._warming,l.y*=s._warming}}},s.pointAWorld=function(t){return{x:(t.bodyA?t.bodyA.position.x:0)+(t.pointA?t.pointA.x:0),y:(t.bodyA?t.bodyA.position.y:0)+(t.pointA?t.pointA.y:0)}},s.pointBWorld=function(t){return{x:(t.bodyB?t.bodyB.position.x:0)+(t.pointB?t.pointB.x:0),y:(t.bodyB?t.bodyB.position.y:0)+(t.pointB?t.pointB.y:0)}}},68758:(t,e,i)=>{var s={};t.exports=s,function(){s._nextId=0,s._seed=0,s._nowStartTime=+new Date,s._warnedOnce={},s._decomp=null,s.extend=function(t,e){var i,n;"boolean"==typeof e?(i=2,n=e):(i=1,n=!0);for(var r=i;r0;e--){var i=Math.floor(s.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t},s.choose=function(t){return t[Math.floor(s.random()*t.length)]},s.isElement=function(t){return"undefined"!=typeof HTMLElement?t instanceof HTMLElement:!!(t&&t.nodeType&&t.nodeName)},s.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},s.isFunction=function(t){return"function"==typeof t},s.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},s.isString=function(t){return"[object String]"===toString.call(t)},s.clamp=function(t,e,i){return ti?i:t},s.sign=function(t){return t<0?-1:1},s.now=function(){if("undefined"!=typeof window&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return Date.now?Date.now():new Date-s._nowStartTime},s.random=function(e,i){return i=void 0!==i?i:1,(e=void 0!==e?e:0)+t()*(i-e)};var t=function(){return s._seed=(9301*s._seed+49297)%233280,s._seed/233280};s.colorToNumber=function(t){return 3==(t=t.replace("#","")).length&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),parseInt(t,16)},s.logLevel=1,s.log=function(){console&&s.logLevel>0&&s.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},s.info=function(){console&&s.logLevel>0&&s.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},s.warn=function(){console&&s.logLevel>0&&s.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},s.warnOnce=function(){var t=Array.prototype.slice.call(arguments).join(" ");s._warnedOnce[t]||(s.warn(t),s._warnedOnce[t]=!0)},s.deprecated=function(t,e,i){t[e]=s.chain((function(){s.warnOnce("🔅 deprecated 🔅",i)}),t[e])},s.nextId=function(){return s._nextId++},s.indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var i=0;i{var s={};t.exports=s;var n=i(22806),r=i(44272),o=i(13657),a=i(91327),h=i(39073),l=i(11299),u=i(52838),c=i(68758),d=i(84125);s.create=function(t){t=t||{};var e=c.extend({positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},gravity:{x:0,y:1,scale:.001},timing:{timestamp:0,timeScale:1,lastDelta:0,lastElapsed:0}},t);return e.world=t.world||l.create({label:"World"}),e.pairs=t.pairs||a.create(),e.detector=t.detector||o.create(),e.grid={buckets:[]},e.world.gravity=e.gravity,e.broadphase=e.grid,e.metrics={},e},s.update=function(t,e,i){var d=c.now();e=e||1e3/60,i=i||1;var p,f=t.world,v=t.detector,g=t.pairs,m=t.timing,y=m.timestamp;m.timestamp+=e*m.timeScale,m.lastDelta=e*m.timeScale;var x={timestamp:m.timestamp};h.trigger(t,"beforeUpdate",x);var T=l.allBodies(f),w=l.allConstraints(f);for(f.isModified&&o.setBodies(v,T),f.isModified&&l.setModified(f,!1,!1,!0),t.enableSleeping&&n.update(T,m.timeScale),s._bodiesApplyGravity(T,t.gravity),s._bodiesUpdate(T,e,m.timeScale,i,f.bounds),u.preSolveAll(T),p=0;p0&&h.trigger(t,"collisionStart",{pairs:g.collisionStart}),r.preSolvePosition(g.list),p=0;p0&&h.trigger(t,"collisionActive",{pairs:g.collisionActive}),g.collisionEnd.length>0&&h.trigger(t,"collisionEnd",{pairs:g.collisionEnd}),s._bodiesClearForces(T),h.trigger(t,"afterUpdate",x),t.timing.lastElapsed=c.now()-d,t},s.merge=function(t,e){if(c.extend(t,e),e.world){t.world=e.world,s.clear(t);for(var i=l.allBodies(t.world),r=0;r{var s={};t.exports=s;var n=i(68758);s.on=function(t,e,i){for(var s,n=e.split(" "),r=0;r0){i||(i={}),s=e.split(" ");for(var l=0;l{var s={};t.exports=s;var n=i(84474),r=i(68758);s.name="matter-js",s.version="0.18.0",s.uses=[],s.used=[],s.use=function(){n.use(s,Array.prototype.slice.call(arguments))},s.before=function(t,e){return t=t.replace(/^Matter./,""),r.chainPathBefore(s,t,e)},s.after=function(t,e){return t=t.replace(/^Matter./,""),r.chainPathAfter(s,t,e)}},84474:(t,e,i)=>{var s={};t.exports=s;var n=i(68758);s._registry={},s.register=function(t){if(s.isPlugin(t)||n.warn("Plugin.register:",s.toString(t),"does not implement all required fields."),t.name in s._registry){var e=s._registry[t.name],i=s.versionParse(t.version).number,r=s.versionParse(e.version).number;i>r?(n.warn("Plugin.register:",s.toString(e),"was upgraded to",s.toString(t)),s._registry[t.name]=t):i-1},s.isFor=function(t,e){var i=t.for&&s.dependencyParse(t.for);return!t.for||e.name===i.name&&s.versionSatisfies(e.version,i.range)},s.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i=s.dependencies(t),r=n.topologicalSort(i),o=[],a=0;a0&&!h.silent&&n.info(o.join(" "))}else n.warn("Plugin.use:",s.toString(t),"does not specify any dependencies to install.")},s.dependencies=function(t,e){var i=s.dependencyParse(t),r=i.name;if(!(r in(e=e||{}))){t=s.resolve(t)||t,e[r]=n.map(t.uses||[],(function(e){s.isPlugin(e)&&s.register(e);var r=s.dependencyParse(e),o=s.resolve(e);return o&&!s.versionSatisfies(o.version,r.range)?(n.warn("Plugin.dependencies:",s.toString(o),"does not satisfy",s.toString(r),"used by",s.toString(i)+"."),o._warned=!0,t._warned=!0):o||(n.warn("Plugin.dependencies:",s.toString(e),"used by",s.toString(i),"could not be resolved."),t._warned=!0),r.name}));for(var o=0;o=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;e.test(t)||n.warn("Plugin.versionParse:",t,"is not a valid version or range.");var i=e.exec(t),s=Number(i[4]),r=Number(i[5]),o=Number(i[6]);return{isRange:Boolean(i[1]||i[2]),version:i[3],range:t,operator:i[1]||i[2]||"",major:s,minor:r,patch:o,parts:[s,r,o],prerelease:i[7],number:1e8*s+1e4*r+o}},s.versionSatisfies=function(t,e){e=e||"*";var i=s.versionParse(e),n=s.versionParse(t);if(i.isRange){if("*"===i.operator||"*"===t)return!0;if(">"===i.operator)return n.number>i.number;if(">="===i.operator)return n.number>=i.number;if("~"===i.operator)return n.major===i.major&&n.minor===i.minor&&n.patch>=i.patch;if("^"===i.operator)return i.major>0?n.major===i.major&&n.number>=i.number:i.minor>0?n.minor===i.minor&&n.patch>=i.patch:n.patch===i.patch}return t===e||"*"===t}},22806:(t,e,i)=>{var s={};t.exports=s;var n=i(39073);s._motionWakeThreshold=.18,s._motionSleepThreshold=.08,s._minBias=.9,s.update=function(t,e){for(var i=e*e*e,n=0;n0&&r.motion=r.sleepThreshold&&s.set(r,!0)):r.sleepCounter>0&&(r.sleepCounter-=1)}else s.set(r,!1)}},s.afterCollisions=function(t,e){for(var i=e*e*e,n=0;ns._motionWakeThreshold*i&&s.set(l,!1)}}}},s.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||n.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&n.trigger(t,"sleepEnd"))}},68516:(t,e,i)=>{var s={};t.exports=s;var n=i(39745),r=i(68758),o=i(84125),a=i(84091),h=i(10438);s.rectangle=function(t,e,i,s,a){a=a||{};var h={label:"Rectangle Body",position:{x:t,y:e},vertices:n.fromPath("L 0 0 L "+i+" 0 L "+i+" "+s+" L 0 "+s)};if(a.chamfer){var l=a.chamfer;h.vertices=n.chamfer(h.vertices,l.radius,l.quality,l.qualityMin,l.qualityMax),delete a.chamfer}return o.create(r.extend({},h,a))},s.trapezoid=function(t,e,i,s,a,h){h=h||{};var l,u=i*(a*=.5),c=u+(1-2*a)*i,d=c+u;l=a<.5?"L 0 0 L "+u+" "+-s+" L "+c+" "+-s+" L "+d+" 0":"L 0 0 L "+c+" "+-s+" L "+d+" 0";var p={label:"Trapezoid Body",position:{x:t,y:e},vertices:n.fromPath(l)};if(h.chamfer){var f=h.chamfer;p.vertices=n.chamfer(p.vertices,f.radius,f.quality,f.qualityMin,f.qualityMax),delete h.chamfer}return o.create(r.extend({},p,h))},s.circle=function(t,e,i,n,o){n=n||{};var a={label:"Circle Body",circleRadius:i};o=o||25;var h=Math.ceil(Math.max(10,Math.min(o,i)));return h%2==1&&(h+=1),s.polygon(t,e,h,i,r.extend({},a,n))},s.polygon=function(t,e,i,a,h){if(h=h||{},i<3)return s.circle(t,e,a,h);for(var l=2*Math.PI/i,u="",c=.5*l,d=0;d0&&n.area(b)1?(p=o.create(r.extend({parts:f.slice(0)},a)),o.setPosition(p,{x:t,y:e}),p):f[0]},s.flagCoincidentParts=function(t,e){void 0===e&&(e=5);for(var i=0;i{var s={};t.exports=s;var n=i(11299),r=i(52838),o=i(68758),a=i(84125),h=i(68516),l=o.deprecated;s.stack=function(t,e,i,s,r,o,h){for(var l,u=n.create({label:"Stack"}),c=t,d=e,p=0,f=0;fv&&(v=y),a.translate(m,{x:.5*x,y:.5*y}),c=m.bounds.max.x+r,n.addBody(u,m),l=m,p+=1}else c+=r}d+=v+o,c=t}return u},s.chain=function(t,e,i,s,a,h){for(var l=t.bodies,u=1;u0)for(l=0;l0&&(d=p[l-1+(h-1)*e],n.addConstraint(t,r.create(o.extend({bodyA:d,bodyB:c},a)))),s&&ld||o<(l=d-l)||o>i-1-l))return 1===c&&a.translate(u,{x:(o+(i%2==1?1:-1))*p,y:0}),h(t+(u?o*p:0)+o*r,s,o,l,u,c)}))},s.newtonsCradle=function(t,e,i,s,o){for(var a=n.create({label:"Newtons Cradle"}),l=0;l{var s={};t.exports=s;var n=i(10438),r=i(68758);s.fromVertices=function(t){for(var e={},i=0;i{var e={};t.exports=e,e.create=function(t){var i={min:{x:0,y:0},max:{x:0,y:0}};return t&&e.update(i,t),i},e.update=function(t,e,i){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var s=0;st.max.x&&(t.max.x=n.x),n.xt.max.y&&(t.max.y=n.y),n.y0?t.max.x+=i.x:t.min.x+=i.x,i.y>0?t.max.y+=i.y:t.min.y+=i.y)},e.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},e.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},e.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},e.shift=function(t,e){var i=t.max.x-t.min.x,s=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+s}},92765:(t,e,i)=>{var s={};t.exports=s;i(84091);var n=i(68758);s.pathToVertices=function(t,e){"undefined"==typeof window||"SVGPathSeg"in window||n.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var i,r,o,a,h,l,u,c,d,p,f,v=[],g=0,m=0,y=0;e=e||15;var x=function(t,e,i){var s=i%2==1&&i>1;if(!d||t!=d.x||e!=d.y){d&&s?(p=d.x,f=d.y):(p=0,f=0);var n={x:p+t,y:f+e};!s&&d||(d=n),v.push(n),m=p+t,y=f+e}},T=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":m=t.x,y=t.y;break;case"H":m=t.x;break;case"V":y=t.y}x(m,y,t.pathSegType)}};for(s._svgPathToAbsolute(t),o=t.getTotalLength(),l=[],i=0;i{var e={};t.exports=e,e.create=function(t,e){return{x:t||0,y:e||0}},e.clone=function(t){return{x:t.x,y:t.y}},e.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},e.rotate=function(t,e,i){var s=Math.cos(e),n=Math.sin(e);i||(i={});var r=t.x*s-t.y*n;return i.y=t.x*n+t.y*s,i.x=r,i},e.rotateAbout=function(t,e,i,s){var n=Math.cos(e),r=Math.sin(e);s||(s={});var o=i.x+((t.x-i.x)*n-(t.y-i.y)*r);return s.y=i.y+((t.x-i.x)*r+(t.y-i.y)*n),s.x=o,s},e.normalise=function(t){var i=e.magnitude(t);return 0===i?{x:0,y:0}:{x:t.x/i,y:t.y/i}},e.dot=function(t,e){return t.x*e.x+t.y*e.y},e.cross=function(t,e){return t.x*e.y-t.y*e.x},e.cross3=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x)},e.add=function(t,e,i){return i||(i={}),i.x=t.x+e.x,i.y=t.y+e.y,i},e.sub=function(t,e,i){return i||(i={}),i.x=t.x-e.x,i.y=t.y-e.y,i},e.mult=function(t,e){return{x:t.x*e,y:t.y*e}},e.div=function(t,e){return{x:t.x/e,y:t.y/e}},e.perp=function(t,e){return{x:(e=!0===e?-1:1)*-t.y,y:e*t.x}},e.neg=function(t){return{x:-t.x,y:-t.y}},e.angle=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},e._temp=[e.create(),e.create(),e.create(),e.create(),e.create(),e.create()]},39745:(t,e,i)=>{var s={};t.exports=s;var n=i(10438),r=i(68758);s.create=function(t,e){for(var i=[],s=0;s0)return!1;o=i}return!0},s.scale=function(t,e,i,r){if(1===e&&1===i)return t;var o,a;r=r||s.centre(t);for(var h=0;h=0?h-1:t.length-1],u=t[h],c=t[(h+1)%t.length],d=e[h0&&(r|=2),3===r)return!1;return 0!==r||null},s.hull=function(t){var e,i,s=[],r=[];for((t=t.slice(0)).sort((function(t,e){var i=t.x-e.x;return 0!==i?i:t.y-e.y})),i=0;i=2&&n.cross3(r[r.length-2],r[r.length-1],e)<=0;)r.pop();r.push(e)}for(i=t.length-1;i>=0;i-=1){for(e=t[i];s.length>=2&&n.cross3(s[s.length-2],s[s.length-1],e)<=0;)s.pop();s.push(e)}return s.pop(),r.pop(),s.concat(r)}},1675:(t,e,i)=>{var s=i(18171),n={name:"matter-attractors",version:"0.1.7",for:"matter-js@^0.18.0",silent:!0,install:function(t){t.after("Body.create",(function(){n.Body.init(this)})),t.before("Engine.update",(function(t){n.Engine.update(t)}))},Body:{init:function(t){t.plugin.attractors=t.plugin.attractors||[]}},Engine:{update:function(t){for(var e=s.Composite.allBodies(t.world),i=0;i0)for(var o=0;o{t.exports={name:"matter-collision-events",version:"0.1.6",for:"matter-js@^0.18.0",silent:!0,install:function(t){t.after("Engine.create",(function(){t.Events.on(this,"collisionStart",(function(e){e.pairs.map((function(e){var i=e.bodyA,s=e.bodyB;i.gameObject&&i.gameObject.emit("collide",i,s,e),s.gameObject&&s.gameObject.emit("collide",s,i,e),t.Events.trigger(i,"onCollide",{pair:e}),t.Events.trigger(s,"onCollide",{pair:e}),i.onCollideCallback&&i.onCollideCallback(e),s.onCollideCallback&&s.onCollideCallback(e),i.onCollideWith[s.id]&&i.onCollideWith[s.id](s,e),s.onCollideWith[i.id]&&s.onCollideWith[i.id](i,e)}))})),t.Events.on(this,"collisionActive",(function(e){e.pairs.map((function(e){var i=e.bodyA,s=e.bodyB;i.gameObject&&i.gameObject.emit("collideActive",i,s,e),s.gameObject&&s.gameObject.emit("collideActive",s,i,e),t.Events.trigger(i,"onCollideActive",{pair:e}),t.Events.trigger(s,"onCollideActive",{pair:e}),i.onCollideActiveCallback&&i.onCollideActiveCallback(e),s.onCollideActiveCallback&&s.onCollideActiveCallback(e)}))})),t.Events.on(this,"collisionEnd",(function(e){e.pairs.map((function(e){var i=e.bodyA,s=e.bodyB;i.gameObject&&i.gameObject.emit("collideEnd",i,s,e),s.gameObject&&s.gameObject.emit("collideEnd",s,i,e),t.Events.trigger(i,"onCollideEnd",{pair:e}),t.Events.trigger(s,"onCollideEnd",{pair:e}),i.onCollideEndCallback&&i.onCollideEndCallback(e),s.onCollideEndCallback&&s.onCollideEndCallback(e)}))}))}))}}},44097:(t,e,i)=>{var s=i(18171),n={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.18.0",silent:!0,install:function(t){t.after("Engine.update",(function(){n.Engine.update(this)}))},Engine:{update:function(t){for(var e=t.world,i=s.Composite.allBodies(e),r=s.Composite.allComposites(e),o=0;oe.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?s=e.min.y-t.max.y:t.max.y{function e(t,e,i){i=i||0;var s,n,r,o,a,h,l,u=[0,0];return s=t[1][1]-t[0][1],n=t[0][0]-t[1][0],r=s*t[0][0]+n*t[0][1],o=e[1][1]-e[0][1],a=e[0][0]-e[1][0],h=o*e[0][0]+a*e[0][1],S(l=s*a-o*n,0,i)||(u[0]=(a*r-n*h)/l,u[1]=(s*h-o*r)/l),u}function i(t,e,i,s){var n=e[0]-t[0],r=e[1]-t[1],o=s[0]-i[0],a=s[1]-i[1];if(o*r-a*n==0)return!1;var h=(n*(i[1]-t[1])+r*(t[0]-i[0]))/(o*r-a*n),l=(o*(t[1]-i[1])+a*(i[0]-t[0]))/(a*n-o*r);return h>=0&&h<=1&&l>=0&&l<=1}function s(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function n(t,e,i){return s(t,e,i)>0}function r(t,e,i){return s(t,e,i)>=0}function o(t,e,i){return s(t,e,i)<0}function a(t,e,i){return s(t,e,i)<=0}t.exports={decomp:function(t){var e=T(t);return e.length>0?w(t,e):[t]},quickDecomp:function t(e,i,s,h,l,u,v){u=u||100,v=v||0,l=l||25,i=void 0!==i?i:[],s=s||[],h=h||[];var g=[0,0],m=[0,0],x=[0,0],T=0,w=0,S=0,E=0,A=0,_=0,C=0,M=[],R=[],P=e,O=e;if(O.length<3)return i;if(++v>u)return console.warn("quickDecomp: max level ("+u+") reached."),i;for(var L=0;LA&&(A+=e.length),E=Number.MAX_VALUE,A<_)return i;for(F=_;F<=A;++F)r(d(P,L-1),d(P,L),d(P,F))&&a(d(P,L+1),d(P,L),d(P,F))&&(S=c(d(P,L),d(P,F)))3&&s>=0;--s)u(d(t,s-1),d(t,s),d(t,s+1),e)&&(t.splice(s%t.length,1),i++);return i},removeDuplicatePoints:function(t,e){for(var i=t.length-1;i>=1;--i)for(var s=t[i],n=i-1;n>=0;--n)E(s,t[n],e)&&t.splice(i,1)},makeCCW:function(t){for(var e=0,i=t,s=1;si[e][0])&&(e=s);return!n(d(t,e-1),d(t,e),d(t,e+1))&&(function(t){for(var e=[],i=t.length,s=0;s!==i;s++)e.push(t.pop());for(s=0;s!==i;s++)t[s]=e[s]}(t),!0)}};var h=[],l=[];function u(t,e,i,n){if(n){var r=h,o=l;r[0]=e[0]-t[0],r[1]=e[1]-t[1],o[0]=i[0]-e[0],o[1]=i[1]-e[1];var a=r[0]*o[0]+r[1]*o[1],u=Math.sqrt(r[0]*r[0]+r[1]*r[1]),c=Math.sqrt(o[0]*o[0]+o[1]*o[1]);return Math.acos(a/(u*c)){var s=new(i(56694))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=s},18360:t=>{t.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},91963:t=>{var e={},i={},s={register:function(t,i,s,n){void 0===n&&(n=!1),e[t]={plugin:i,mapping:s,custom:n}},registerCustom:function(t,e,s,n){i[t]={plugin:e,mapping:s,data:n}},hasCore:function(t){return e.hasOwnProperty(t)},hasCustom:function(t){return i.hasOwnProperty(t)},getCore:function(t){return e[t]},getCustom:function(t){return i[t]},getCustomClass:function(t){return i.hasOwnProperty(t)?i[t].plugin:null},remove:function(t){e.hasOwnProperty(t)&&delete e[t]},removeCustom:function(t){i.hasOwnProperty(t)&&delete i[t]},destroyCorePlugins:function(){for(var t in e)e.hasOwnProperty(t)&&delete e[t]},destroyCustomPlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]}};t.exports=s},49274:(t,e,i)=>{var s=i(56694),n=i(97081),r=i(6659),o=i(76846),a=i(99325),h=i(61286),l=i(72632),u=i(91963),c=i(66458),d=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],t.isBooted?this.boot():t.events.once(n.BOOT,this.boot,this)},boot:function(){var t,e,i,s,r,o,a,h=this.game.config,u=h.installGlobalPlugins;for(u=u.concat(this._pendingGlobal),t=0;t{var s=i(88257),n=i(56694),r=i(7599),o=new n({Extends:s,initialize:function(t,e,i){s.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,t.sys.events.once(r.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=o},45615:(t,e,i)=>{t.exports={BasePlugin:i(88257),DefaultPlugins:i(18360),PluginCache:i(91963),PluginManager:i(49274),ScenePlugin:i(39283)}},37823:()=>{Array.prototype.forEach||(Array.prototype.forEach=function(t){"use strict";if(null==this)throw new TypeError;var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError;for(var s=arguments.length>=2?arguments[1]:void 0,n=0;n{Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)})},22782:()=>{!function(){function t(t){t&&(t.setTargetAtTime||(t.setTargetAtTime=t.setTargetValueAtTime))}window.hasOwnProperty("webkitAudioContext")&&!window.hasOwnProperty("AudioContext")&&(window.AudioContext=webkitAudioContext,AudioContext.prototype.hasOwnProperty("createGain")||(AudioContext.prototype.createGain=AudioContext.prototype.createGainNode),AudioContext.prototype.hasOwnProperty("createDelay")||(AudioContext.prototype.createDelay=AudioContext.prototype.createDelayNode),AudioContext.prototype.hasOwnProperty("createScriptProcessor")||(AudioContext.prototype.createScriptProcessor=AudioContext.prototype.createJavaScriptNode),AudioContext.prototype.hasOwnProperty("createPeriodicWave")||(AudioContext.prototype.createPeriodicWave=AudioContext.prototype.createWaveTable),AudioContext.prototype.internal_createGain=AudioContext.prototype.createGain,AudioContext.prototype.createGain=function(){var e=this.internal_createGain();return t(e.gain),e},AudioContext.prototype.internal_createDelay=AudioContext.prototype.createDelay,AudioContext.prototype.createDelay=function(e){var i=e?this.internal_createDelay(e):this.internal_createDelay();return t(i.delayTime),i},AudioContext.prototype.internal_createBufferSource=AudioContext.prototype.createBufferSource,AudioContext.prototype.createBufferSource=function(){var e=this.internal_createBufferSource();return e.start?(e.internal_start=e.start,e.start=function(t,i,s){void 0!==s?e.internal_start(t||0,i,s):e.internal_start(t||0,i||0)}):e.start=function(t,e,i){e||i?this.noteGrainOn(t||0,e,i):this.noteOn(t||0)},e.stop?(e.internal_stop=e.stop,e.stop=function(t){e.internal_stop(t||0)}):e.stop=function(t){this.noteOff(t||0)},t(e.playbackRate),e},AudioContext.prototype.internal_createDynamicsCompressor=AudioContext.prototype.createDynamicsCompressor,AudioContext.prototype.createDynamicsCompressor=function(){var e=this.internal_createDynamicsCompressor();return t(e.threshold),t(e.knee),t(e.ratio),t(e.reduction),t(e.attack),t(e.release),e},AudioContext.prototype.internal_createBiquadFilter=AudioContext.prototype.createBiquadFilter,AudioContext.prototype.createBiquadFilter=function(){var e=this.internal_createBiquadFilter();return t(e.frequency),t(e.detune),t(e.Q),t(e.gain),e},AudioContext.prototype.hasOwnProperty("createOscillator")&&(AudioContext.prototype.internal_createOscillator=AudioContext.prototype.createOscillator,AudioContext.prototype.createOscillator=function(){var e=this.internal_createOscillator();return e.start?(e.internal_start=e.start,e.start=function(t){e.internal_start(t||0)}):e.start=function(t){this.noteOn(t||0)},e.stop?(e.internal_stop=e.stop,e.stop=function(t){e.internal_stop(t||0)}):e.stop=function(t){this.noteOff(t||0)},e.setPeriodicWave||(e.setPeriodicWave=e.setWaveTable),t(e.frequency),t(e.detune),e})),window.hasOwnProperty("webkitOfflineAudioContext")&&!window.hasOwnProperty("OfflineAudioContext")&&(window.OfflineAudioContext=webkitOfflineAudioContext)}()},58909:()=>{Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)})},52273:()=>{if("function"!=typeof window.Uint32Array&&"object"!=typeof window.Uint32Array){var t=function(t){var e=new Array;window[t]=function(t){if("number"==typeof t){Array.call(this,t),this.length=t;for(var e=0;e{window.console||(window.console={},window.console.log=window.console.assert=function(){},window.console.warn=window.console.assert=function(){})},92244:(t,e,i)=>{i(37823),i(60680),i(22782),i(77844),i(58909),i(52108),i(77359),i(52273)},52108:()=>{!function(){if("performance"in window==!1&&(window.performance={}),Date.now=Date.now||function(){return(new Date).getTime()},"now"in window.performance==!1){var t=Date.now();performance.timing&&performance.timing.navigationStart&&(t=performance.timing.navigationStart),window.performance.now=function(){return Date.now()-t}}}()},77359:()=>{for(var t=Date.now(),e=["ms","moz","webkit","o"],i=0;i{t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},27394:t=>{t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},91135:(t,e,i)=>{var s=i(89787),n=i(61840),r=i(56694),o=i(86459),a=i(6659),h=i(81044),l=i(32834),u=i(40444),c=i(38203),d=i(69360),p=new r({Extends:a,initialize:function(t){a.call(this);var e=t.config;this.config={clearBeforeRender:e.clearBeforeRender,backgroundColor:e.backgroundColor,antialias:e.antialias,roundPixels:e.roundPixels},this.game=t,this.type=o.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=t.canvas;var i={alpha:t.config.transparent,desynchronized:t.config.desynchronized,willReadFrequently:!1};this.gameContext=e.context?e.context:this.gameCanvas.getContext("2d",i),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=l(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new d,this._tempMatrix2=new d,this._tempMatrix3=new d,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(c.READY,this.boot,this)},boot:function(){var t=this.game,e=t.scale.baseSize;this.width=e.width,this.height=e.height,this.isBooted=!0,t.scale.on(u.RESIZE,this.onResize,this),this.resize(e.width,e.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e,this.emit(h.RESIZE,t,e)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,s=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&(t.clearRect(0,0,i,s),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,s))),t.save(),this.drawCount=0,this.emit(h.PRE_RENDER)},render:function(t,e,i){var n=e.length;this.emit(h.RENDER,t,i);var r=i.x,o=i.y,a=i.width,l=i.height,u=i.renderToTexture?i.context:t.sys.context;u.save(),this.game.scene.customViewports&&(u.beginPath(),u.rect(r,o,a,l),u.clip()),i.emit(s.PRE_RENDER,i),this.currentContext=u;var c=i.mask;c&&c.preRenderCanvas(this,null,i._maskCamera),i.transparent||(u.fillStyle=i.backgroundColor.rgba,u.fillRect(r,o,a,l)),u.globalAlpha=i.alpha,u.globalCompositeOperation="source-over",this.drawCount+=n,i.renderToTexture&&i.emit(s.PRE_RENDER,i),i.matrix.copyToContext(u);for(var d=0;d=0?m=-(m+c):m<0&&(m=Math.abs(m)-c)),t.flipY&&(y>=0?y=-(y+d):y<0&&(y=Math.abs(y)-d))}var T=1,w=1;t.flipX&&(p||(m+=-e.realWidth+2*v),T=-1),t.flipY&&(p||(y+=-e.realHeight+2*g),w=-1);var b=t.x,S=t.y;i.roundPixels&&(b=Math.floor(b),S=Math.floor(S)),a.applyITRS(b,S,t.rotation,t.scaleX*T,t.scaleY*w),o.copyFrom(i.matrix),s?(o.multiplyWithOffset(s,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),a.e=b,a.f=S):(a.e-=i.scrollX*t.scrollFactorX,a.f-=i.scrollY*t.scrollFactorY),o.multiply(a),i.roundPixels&&(o.e=Math.round(o.e),o.f=Math.round(o.f)),r.save(),o.setToContext(r),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=n,r.imageSmoothingEnabled=!e.source.scaleMode,t.mask&&t.mask.preRenderCanvas(this,t,i),c>0&&d>0&&r.drawImage(e.source.image,l,u,c,d,m,y,c/f,d/f),t.mask&&t.mask.postRenderCanvas(this,t,i),r.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});t.exports=p},6046:(t,e,i)=>{t.exports={CanvasRenderer:i(91135),GetBlendModes:i(32834),SetTransform:i(49584)}},32834:(t,e,i)=>{var s=i(95723),n=i(98581);t.exports=function(){var t=[],e=n.supportNewBlendModes,i="source-over";return t[s.NORMAL]=i,t[s.ADD]="lighter",t[s.MULTIPLY]=e?"multiply":i,t[s.SCREEN]=e?"screen":i,t[s.OVERLAY]=e?"overlay":i,t[s.DARKEN]=e?"darken":i,t[s.LIGHTEN]=e?"lighten":i,t[s.COLOR_DODGE]=e?"color-dodge":i,t[s.COLOR_BURN]=e?"color-burn":i,t[s.HARD_LIGHT]=e?"hard-light":i,t[s.SOFT_LIGHT]=e?"soft-light":i,t[s.DIFFERENCE]=e?"difference":i,t[s.EXCLUSION]=e?"exclusion":i,t[s.HUE]=e?"hue":i,t[s.SATURATION]=e?"saturation":i,t[s.COLOR]=e?"color":i,t[s.LUMINOSITY]=e?"luminosity":i,t[s.ERASE]="destination-out",t[s.SOURCE_IN]="source-in",t[s.SOURCE_OUT]="source-out",t[s.SOURCE_ATOP]="source-atop",t[s.DESTINATION_OVER]="destination-over",t[s.DESTINATION_IN]="destination-in",t[s.DESTINATION_OUT]="destination-out",t[s.DESTINATION_ATOP]="destination-atop",t[s.LIGHTER]="lighter",t[s.COPY]="copy",t[s.XOR]="xor",t}},49584:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n,r){var o=n.alpha*i.alpha;if(o<=0)return!1;var a=s(i,n,r).calc;return e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=o,e.save(),a.setToContext(e),e.imageSmoothingEnabled=i.frame?!i.frame.source.scaleMode:t.antialias,!0}},70936:t=>{t.exports="postrender"},99298:t=>{t.exports="prerender"},7743:t=>{t.exports="render"},99519:t=>{t.exports="resize"},81044:(t,e,i)=>{t.exports={POST_RENDER:i(70936),PRE_RENDER:i(99298),RENDER:i(7743),RESIZE:i(99519)}},42069:(t,e,i)=>{t.exports={Canvas:i(6046),Events:i(81044),Snapshot:i(95528),WebGL:i(55478)}},61840:(t,e,i)=>{var s=i(61068),n=i(27119),r=i(72632);t.exports=function(t,e){var i=r(e,"callback"),o=r(e,"type","image/png"),a=r(e,"encoder",.92),h=Math.abs(Math.round(r(e,"x",0))),l=Math.abs(Math.round(r(e,"y",0))),u=Math.floor(r(e,"width",t.width)),c=Math.floor(r(e,"height",t.height));if(r(e,"getPixel",!1)){var d=t.getContext("2d").getImageData(h,l,1,1).data;i.call(null,new n(d[0],d[1],d[2],d[3]))}else if(0!==h||0!==l||u!==t.width||c!==t.height){var p=s.createWebGL(this,u,c),f=p.getContext("2d");u>0&&c>0&&f.drawImage(t,h,l,u,c,0,0,u,c);var v=new Image;v.onerror=function(){i.call(null),s.remove(p)},v.onload=function(){i.call(null,v),s.remove(p)},v.src=p.toDataURL(o,a)}else{var g=new Image;g.onerror=function(){i.call(null)},g.onload=function(){i.call(null,g)},g.src=t.toDataURL(o,a)}}},1217:(t,e,i)=>{var s=i(61068),n=i(27119),r=i(72632);t.exports=function(t,e){var i=t,o=r(e,"callback"),a=r(e,"type","image/png"),h=r(e,"encoder",.92),l=Math.abs(Math.round(r(e,"x",0))),u=Math.abs(Math.round(r(e,"y",0))),c=r(e,"getPixel",!1),d=r(e,"isFramebuffer",!1),p=d?r(e,"bufferWidth",1):i.drawingBufferWidth,f=d?r(e,"bufferHeight",1):i.drawingBufferHeight;if(c){var v=new Uint8Array(4),g=d?u:f-u;i.readPixels(l,g,1,1,i.RGBA,i.UNSIGNED_BYTE,v),o.call(null,new n(v[0],v[1],v[2],v[3]))}else{var m=Math.floor(r(e,"width",p)),y=Math.floor(r(e,"height",f)),x=m*y*4,T=new Uint8Array(x);i.readPixels(l,f-u-y,m,y,i.RGBA,i.UNSIGNED_BYTE,T);for(var w=s.createWebGL(this,m,y),b=w.getContext("2d"),S=b.getImageData(0,0,m,y),E=S.data,A=0;A{t.exports={Canvas:i(61840),WebGL:i(1217)}},35217:(t,e,i)=>{var s=i(56694),n=i(65641),r=i(33885),o=i(77290),a=i(72632),h=i(37410),l=i(82127),u=i(5583),c=i(66901),d=i(71264),p=i(77310),f=i(10919),v=i(21213),g=i(51212),m=i(60848),y=new s({initialize:function(t){this.game=t.game,this.renderer=t,this.classes=new r([[n.UTILITY_PIPELINE,m],[n.MULTI_PIPELINE,p],[n.BITMAPMASK_PIPELINE,u],[n.SINGLE_PIPELINE,g],[n.ROPE_PIPELINE,v],[n.LIGHT_PIPELINE,c],[n.POINTLIGHT_PIPELINE,f],[n.MOBILE_PIPELINE,d]]),this.postPipelineClasses=new r,this.pipelines=new r,this.default=null,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.MOBILE_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderTargets=[],this.maxDimension=0,this.frameInc=32,this.targetIndex=0},boot:function(t,e,i){var s=this.renderer,r=this.renderTargets;this.frameInc=Math.floor(a(t,"frameInc",32));for(var l,u,c=s.width,d=s.height,p=Math.min(c,d),f=Math.ceil(p/this.frameInc),v=1;v=0;i--){var s=e[i];s.active&&s.preBatch(t)}}},postBatch:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;i=0;i--){var s=e[i];s.active&&s.preBatch(t)}}},postBatchCamera:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;ithis.maxDimension)return this.targetIndex=e.length-3,e[this.targetIndex];var i=3*(l(t,this.frameInc,0,!0)-1);return this.targetIndex=i,e[i]},getSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+1]},getAltSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+2]},destroy:function(){this.flush(),this.classes.clear(),this.postPipelineClasses.clear(),this.pipelines.clear(),this.renderer=null,this.game=null,this.classes=null,this.postPipelineClasses=null,this.pipelines=null,this.default=null,this.current=null,this.previous=null}});t.exports=y},37410:(t,e,i)=>{var s=i(56694),n=i(81044),r=new s({initialize:function(t,e,i,s,n,r,o){void 0===s&&(s=1),void 0===n&&(n=0),void 0===r&&(r=!0),void 0===o&&(o=!1),this.renderer=t,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=s,this.minFilter=n,this.autoClear=r,this.autoResize=!1,this.resize(e,i),o&&this.setAutoResize(!0)},setAutoResize:function(t){return t&&!this.autoResize?(this.renderer.on(n.RESIZE,this.resize,this),this.autoResize=!0):!t&&this.autoResize&&(this.renderer.off(n.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(t,e){var i=t*this.scale,s=e*this.scale;if(i!==this.width||s!==this.height){var n=this.renderer;n.deleteFramebuffer(this.framebuffer),n.deleteTexture(this.texture),t*=this.scale,e*=this.scale,(t=Math.round(t))<=0&&(t=1),(e=Math.round(e))<=0&&(e=1),this.texture=n.createTextureFromSource(null,t,e,this.minFilter,!0),this.framebuffer=n.createFramebuffer(t,e,this.texture,!0),this.width=t,this.height=e}return this},bind:function(t,e,i){if(void 0===t&&(t=!1),t&&this.renderer.flush(),e&&i&&this.resize(e,i),this.renderer.pushFramebuffer(this.framebuffer,!1,!1,!1),t&&this.adjustViewport(),this.autoClear){var s=this.renderer.gl;s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT)}},adjustViewport:function(){var t=this.renderer.gl;t.viewport(0,0,this.width,this.height),t.disable(t.SCISSOR_TEST)},clear:function(){var t=this.renderer,e=t.gl;t.pushFramebuffer(this.framebuffer),e.disable(e.SCISSOR_TEST),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),t.popFramebuffer(),t.resetScissor()},unbind:function(t){void 0===t&&(t=!1);var e=this.renderer;return t&&e.flush(),e.popFramebuffer()},destroy:function(){var t=this.renderer;t.deleteFramebuffer(this.framebuffer),t.deleteTexture(this.texture),t.off(n.RESIZE,this.resize,this),this.renderer=null,this.framebuffer=null,this.texture=null}});t.exports=r},75512:t=>{t.exports={getTintFromFloats:function(t,e,i,s){return((255&(255*s|0))<<24|(255&(255*t|0))<<16|(255&(255*e|0))<<8|255&(255*i|0))>>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},checkShaderMax:function(t,e){var i=Math.min(16,t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS));return e&&-1!==e?Math.min(i,e):i},parseFragmentShaderMaxTextures:function(t,e){if(!t)return"";for(var i="",s=0;s0&&(i+="\n\telse "),s{var s=i(56694),n=i(28699),r=i(6659),o=i(18970),a=i(72632),h=i(16650),l=i(81044),u=i(37410),c=i(75512),d=i(71305),p=new s({Extends:r,initialize:function(t){r.call(this);var e=t.game,i=e.renderer,s=i.gl;this.name=a(t,"name","WebGLPipeline"),this.game=e,this.renderer=i,this.manager,this.gl=s,this.view=e.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=a(t,"topology",s.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=a(t,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.isSpriteFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=t,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[]},boot:function(){var t,e=this.gl,i=this.config,s=this.renderer;this.isPostFX||(this.projectionMatrix=(new h).identity());var n=this.renderTargets,r=a(i,"renderTarget",!1);"boolean"==typeof r&&r&&(r=1);var c=s.width,d=s.height;if("number"==typeof r)for(t=0;tx&&(x=y[t].vertexSize);var T=a(i,"batchSize",s.config.batchSize);this.vertexCapacity=6*T;var w=new ArrayBuffer(this.vertexCapacity*x);this.vertexData=w,this.bytes=new Uint8Array(w),this.vertexViewF32=new Float32Array(w),this.vertexViewU32=new Uint32Array(w);var b=a(i,"vertices",null);for(b?(this.vertexViewF32.set(b),this.vertexBuffer=s.createVertexBuffer(w,e.STATIC_DRAW)):this.vertexBuffer=s.createVertexBuffer(w.byteLength,e.DYNAMIC_DRAW),this.setVertexBuffer(),t=y.length-1;t>=0;t--)y[t].rebind();this.hasBooted=!0,s.on(l.RESIZE,this.resize,this),s.on(l.PRE_RENDER,this.onPreRender,this),s.on(l.RENDER,this.onRender,this),s.on(l.POST_RENDER,this.onPostRender,this),this.emit(o.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(t,e,i){var s=this.renderer;t===this.currentShader&&s.currentProgram===this.currentShader.program||(this.flush(),this.setVertexBuffer(i)&&!e&&(e=!0),t.bind(e,!1),this.currentShader=t);return this},getShaderByName:function(t){for(var e=this.shaders,i=0;ithis.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(t,e){t===this.width&&e===this.height||this.flush(),this.width=t,this.height=e;for(var i=this.renderTargets,s=0;s=0;i--){var s=e[i].rebind();t&&s!==t||(this.currentShader=s)}return this.activeTextures.length=0,this.emit(o.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},setVertexBuffer:function(t){if(void 0===t&&(t=this.vertexBuffer),t!==this.activeBuffer){var e=this.gl;return this.gl.bindBuffer(e.ARRAY_BUFFER,t),this.activeBuffer=t,!0}return!1},preBatch:function(t){return this.currentRenderTarget&&this.currentRenderTarget.bind(),this.onPreBatch(t),this},postBatch:function(t){return this.onDraw(this.currentRenderTarget),this.onPostBatch(t),this},onDraw:function(){},unbind:function(){this.currentRenderTarget&&this.currentRenderTarget.unbind()},flush:function(t){if(void 0===t&&(t=!1),this.vertexCount>0){this.emit(o.BEFORE_FLUSH,this,t),this.onBeforeFlush(t);var e=this.gl,i=this.vertexCount,s=this.currentShader.vertexSize,n=this.topology;if(this.active){var r,a,h;this.setVertexBuffer(),i===this.vertexCapacity?e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.DYNAMIC_DRAW):e.bufferSubData(e.ARRAY_BUFFER,0,this.bytes.subarray(0,i*s));var l=this.batch,u=this.activeTextures;if(this.forceZero)for(u[0]||e.activeTexture(e.TEXTURE0),r=0;r{var s=i(66458),n=i(89787),r=i(56694),o=i(86459),a=i(6659),h=i(81044),l=i(28621),u=i(16650),c=i(72283),d=i(35217),p=i(37410),f=i(40444),v=i(38203),g=i(75512),m=i(1217),y=!1,x=new r({Extends:a,initialize:function(t){a.call(this);var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!1,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference,preserveDrawingBuffer:e.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,roundPixels:e.roundPixels,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=o.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=t.canvas,this.blendModes=[],this.contextLost=!1,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.maxTextures=0,this.textureIndexes,this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=c,this.contextRestoredHandler=c,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats,this.compression,this.drawingBufferHeight=0,this.blankTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.maskSource=null,this.maskTarget=null,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(t){var e,i=this.game,s=this.canvas,n=t.backgroundColor;if(!(e=i.config.context?i.config.context:s.getContext("webgl",t.contextCreation)||s.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=e;var r=this;this.contextLostHandler=function(t){r.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),t.preventDefault()},s.addEventListener("webglcontextlost",this.contextLostHandler,!1),i.context=e;for(var a=0;a<=27;a++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[e.ZERO,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_REVERSE_SUBTRACT},this.glFormats=[e.BYTE,e.SHORT,e.UNSIGNED_BYTE,e.UNSIGNED_SHORT,e.FLOAT],this.glFuncMap={mat2:{func:e.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:e.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:e.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:e.uniform1f,length:1},"1fv":{func:e.uniform1fv,length:1},"1i":{func:e.uniform1i,length:1},"1iv":{func:e.uniform1iv,length:1},"2f":{func:e.uniform2f,length:2},"2fv":{func:e.uniform2fv,length:1},"2i":{func:e.uniform2i,length:2},"2iv":{func:e.uniform2iv,length:1},"3f":{func:e.uniform3f,length:3},"3fv":{func:e.uniform3fv,length:1},"3i":{func:e.uniform3i,length:3},"3iv":{func:e.uniform3iv,length:1},"4f":{func:e.uniform4f,length:4},"4fv":{func:e.uniform4fv,length:1},"4i":{func:e.uniform4i,length:4},"4iv":{func:e.uniform4iv,length:1}};var h=e.getSupportedExtensions();t.maxTextures&&-1!==t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),this.supportedExtensions=h;var l="ANGLE_instanced_arrays";this.instancedArraysExtension=h.indexOf(l)>-1?e.getExtension(l):null;var c="OES_vertex_array_object";this.vaoExtension=h.indexOf(c)>-1?e.getExtension(c):null,e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(n.redGL,n.greenGL,n.blueGL,n.alphaGL),this.mipmapFilter=e[t.mipmapFilter],this.maxTextures=g.checkShaderMax(e,t.maxTextures),this.textureIndexes=[];for(var p=0;p0&&s>0;if(o&&a){var h=o[0],l=o[1],u=o[2],c=o[3];a=h!==t||l!==e||u!==i||c!==s}a&&(this.flush(),r.scissor(t,n-e-s,i,s))},resetScissor:function(){var t=this.gl;t.enable(t.SCISSOR_TEST);var e=this.currentScissor;if(e){var i=e[0],s=e[1],n=e[2],r=e[3];n>0&&r>0&&t.scissor(i,this.drawingBufferHeight-s-r,n,r)}},popScissor:function(){var t=this.scissorStack;t.pop();var e=t[t.length-1];e&&this.setScissor(e[0],e[1],e[2],e[3]),this.currentScissor=e},hasActiveStencilMask:function(){var t=this.currentMask.mask,e=this.currentCameraMask.mask;return t&&t.isStencil||e&&e.isStencil},resetViewport:function(){var t=this.gl;t.viewport(0,0,this.width,this.height),this.drawingBufferHeight=t.drawingBufferHeight},setBlendMode:function(t,e){void 0===e&&(e=!1);var i=this.gl,s=this.blendModes[t];return!!(e||t!==o.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(s.equation),s.func.length>2?i.blendFuncSeparate(s.func[0],s.func[1],s.func[2],s.func[3]):i.blendFunc(s.func[0],s.func[1]),this.currentBlendMode=t,!0)},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>17&&this.blendModes[t]&&this.blendModes.splice(t,1),this},pushFramebuffer:function(t,e,i){return t===this.currentFramebuffer?this:(this.fboStack.push(t),this.setFramebuffer(t,e,i))},setFramebuffer:function(t,e,i){if(void 0===e&&(e=!1),void 0===i&&(i=!0),t===this.currentFramebuffer)return this;var s=this.gl,n=this.width,r=this.height;return t&&t.renderTexture&&i?(n=t.renderTexture.width,r=t.renderTexture.height):this.flush(),s.bindFramebuffer(s.FRAMEBUFFER,t),i&&s.viewport(0,0,n,r),e&&(t?(this.drawingBufferHeight=r,this.pushScissor(0,0,n,r)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=t,this},popFramebuffer:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!0);var i=this.fboStack;i.pop();var s=i[i.length-1];return s||(s=null),this.setFramebuffer(s,t,e),s},setProgram:function(t){return t!==this.currentProgram&&(this.flush(),this.gl.useProgram(t),this.currentProgram=t,!0)},resetProgram:function(){return this.gl.useProgram(this.currentProgram),this},createTextureFromSource:function(t,e,i,s,n){void 0===n&&(n=!1);var r=this.gl,a=r.NEAREST,h=r.NEAREST,u=r.CLAMP_TO_EDGE;e=t?t.width:e,i=t?t.height:i;var c=l(e,i);return c&&!n&&(u=r.REPEAT),s===o.ScaleModes.LINEAR&&this.config.antialias&&(a=c?this.mipmapFilter:r.LINEAR,h=r.LINEAR),t&&t.compressed&&(a=r.LINEAR,h=r.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,h,u,u,r.RGBA,t):this.createTexture2D(0,a,h,u,u,r.RGBA,null,e,i)},createTexture2D:function(t,e,i,s,n,r,o,a,h,u,c,d){u=null==u||u,void 0===c&&(c=!1),void 0===d&&(d=!1);var p=this.gl,f=p.createTexture();p.activeTexture(p.TEXTURE0);var v=p.getParameter(p.TEXTURE_BINDING_2D);p.bindTexture(p.TEXTURE_2D,f),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,e),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,i),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,n),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,s),p.pixelStorei(p.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),d&&p.pixelStorei(p.UNPACK_FLIP_Y_WEBGL,!0);var g=!1;if(null==o)p.texImage2D(p.TEXTURE_2D,t,r,a,h,0,r,p.UNSIGNED_BYTE,null),g=l(a,h);else if(o.compressed){a=o.width,h=o.height,g=o.generateMipmap;for(var m=0;m0)&&this.pipelines.setMulti().drawFillRect(e,i,s,r,g.getTintFromFloats(o.blueGL,o.greenGL,o.redGL,1),o.alphaGL)},getCurrentStencilMask:function(){var t=null,e=this.maskStack,i=this.currentCameraMask;return e.length>0?t=e[e.length-1]:i.mask&&i.mask.isStencil&&(t=i),t},postRenderCamera:function(t){var e=t.flashEffect,i=t.fadeEffect;if(e.isRunning||i.isRunning||i.isComplete){var s=this.pipelines.setMulti();e.postRenderWebGL(s,g.getTintFromFloats),i.postRenderWebGL(s,g.getTintFromFloats)}t.dirty=!1,this.popScissor(),t.mask&&(this.currentCameraMask.mask=null,t.mask.postRenderWebGL(this,t._maskCamera)),this.pipelines.postBatchCamera(t),t.emit(n.POST_RENDER,t)},preRender:function(){if(!this.contextLost){var t=this.gl;if(t.bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender){var e=this.config.backgroundColor;t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)}t.enable(t.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(h.PRE_RENDER)}},render:function(t,e,i){if(!this.contextLost){var s=e.length;if(this.emit(h.RENDER,t,i),this.preRenderCamera(i),0===s)return this.setBlendMode(o.BlendModes.NORMAL),void this.postRenderCamera(i);this.currentType="";for(var n=this.currentMask,r=0;r0&&r>0){s.activeTexture(s.TEXTURE0);var o=s.getParameter(s.TEXTURE_BINDING_2D);s.bindTexture(s.TEXTURE_2D,e),i&&s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!0),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,t),e.width=n,e.height=r,o&&s.bindTexture(s.TEXTURE_2D,o)}return e},createVideoTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var s=this.gl,n=s.NEAREST,r=s.NEAREST,o=t.videoWidth,a=t.videoHeight,h=s.CLAMP_TO_EDGE,u=l(o,a);return!e&&u&&(h=s.REPEAT),this.config.antialias&&(n=u?this.mipmapFilter:s.LINEAR,r=s.LINEAR),this.createTexture2D(0,n,r,h,h,s.RGBA,t,o,a,!0,!0,i)},updateVideoTexture:function(t,e,i){void 0===i&&(i=!1);var s=this.gl,n=t.videoWidth,r=t.videoHeight;if(n>0&&r>0){s.activeTexture(s.TEXTURE0);var o=s.getParameter(s.TEXTURE_BINDING_2D);s.bindTexture(s.TEXTURE_2D,e),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,i),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,t),e.width=n,e.height=r,o&&s.bindTexture(s.TEXTURE_2D,o)}return e},setTextureFilter:function(t,e){var i=this.gl,s=[i.LINEAR,i.NEAREST][e];i.activeTexture(i.TEXTURE0);var n=i.getParameter(i.TEXTURE_BINDING_2D);return i.bindTexture(i.TEXTURE_2D,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,s),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,s),n&&i.bindTexture(i.TEXTURE_2D,n),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.maskTarget.destroy(),this.maskSource.destroy(),this.pipelines.destroy(),this.removeAllListeners(),this.fboStack=[],this.maskStack=[],this.extensions={},this.textureIndexes=[],this.gl=null,this.game=null,this.canvas=null,this.contextLost=!0,this.currentMask=null,this.currentCameraMask=null}});t.exports=x},71305:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(71402),o=new s({initialize:function(t,e,i,s,n){this.pipeline=t,this.name=e,this.renderer=t.renderer,this.gl=this.renderer.gl,this.fragSrc=s,this.vertSrc=i,this.program=this.renderer.createProgram(i,s),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(n),this.createUniforms()},createAttributes:function(t){var e=0,i=0,s=[];this.vertexComponentCount=0;for(var o=0;o=0?(e.enableVertexAttribArray(p),e.vertexAttribPointer(p,a,h,d,i,l),o.enabled=!0,o.location=p):-1!==p&&e.disableVertexAttribArray(p)}else u?e.vertexAttribPointer(c,a,h,d,i,l):!u&&c>-1&&(e.disableVertexAttribArray(c),o.location=-1)}return this},createUniforms:function(){var t,e,i,s=this.gl,n=this.program,r=this.uniforms,o=s.getProgramParameter(n,s.ACTIVE_UNIFORMS);for(t=0;t0&&(e=e.substr(0,h),r.hasOwnProperty(e)||null!==(i=s.getUniformLocation(n,e))&&(r[e]={name:e,location:i,value1:null,value2:null,value3:null,value4:null}))}}return this},hasUniform:function(t){return this.uniforms.hasOwnProperty(t)},resetUniform:function(t){var e=this.uniforms[t];return e&&(e.value1=null,e.value2=null,e.value3=null,e.value4=null),this},setUniform1:function(t,e,i,s){var n=this.uniforms[e];return n?((s||n.value1!==i)&&(n.value1=i,this.renderer.setProgram(this.program),t.call(this.gl,n.location,i),this.pipeline.currentShader=this),this):this},setUniform2:function(t,e,i,s,n){var r=this.uniforms[e];return r?((n||r.value1!==i||r.value2!==s)&&(r.value1=i,r.value2=s,this.renderer.setProgram(this.program),t.call(this.gl,r.location,i,s),this.pipeline.currentShader=this),this):this},setUniform3:function(t,e,i,s,n,r){var o=this.uniforms[e];return o?((r||o.value1!==i||o.value2!==s||o.value3!==n)&&(o.value1=i,o.value2=s,o.value3=n,this.renderer.setProgram(this.program),t.call(this.gl,o.location,i,s,n),this.pipeline.currentShader=this),this):this},setUniform4:function(t,e,i,s,n,r,o){var a=this.uniforms[e];return a?((o||a.value1!==i||a.value2!==s||a.value3!==n||a.value4!==r)&&(a.value1=i,a.value2=s,a.value3=n,a.value4=r,this.renderer.setProgram(this.program),t.call(this.gl,a.location,i,s,n,r),this.pipeline.currentShader=this),this):this},setBoolean:function(t,e){return this.setUniform1(this.gl.uniform1i,t,Number(e))},set1f:function(t,e){return this.setUniform1(this.gl.uniform1f,t,e)},set2f:function(t,e,i){return this.setUniform2(this.gl.uniform2f,t,e,i)},set3f:function(t,e,i,s){return this.setUniform3(this.gl.uniform3f,t,e,i,s)},set4f:function(t,e,i,s,n){return this.setUniform4(this.gl.uniform4f,t,e,i,s,n)},set1fv:function(t,e){return this.setUniform1(this.gl.uniform1fv,t,e,!0)},set2fv:function(t,e){return this.setUniform1(this.gl.uniform2fv,t,e,!0)},set3fv:function(t,e){return this.setUniform1(this.gl.uniform3fv,t,e,!0)},set4fv:function(t,e){return this.setUniform1(this.gl.uniform4fv,t,e,!0)},set1iv:function(t,e){return this.setUniform1(this.gl.uniform1iv,t,e,!0)},set2iv:function(t,e){return this.setUniform1(this.gl.uniform2iv,t,e,!0)},set3iv:function(t,e){return this.setUniform1(this.gl.uniform3iv,t,e,!0)},set4iv:function(t,e){return this.setUniform1(this.gl.uniform4iv,t,e,!0)},set1i:function(t,e){return this.setUniform1(this.gl.uniform1i,t,e)},set2i:function(t,e,i){return this.setUniform2(this.gl.uniform2i,t,e,i)},set3i:function(t,e,i,s){return this.setUniform3(this.gl.uniform3i,t,e,i,s)},set4i:function(t,e,i,s,n){return this.setUniform4(this.gl.uniform4i,t,e,i,s,n)},setMatrix2fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix2fv,t,e,i,!0)},setMatrix3fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix3fv,t,e,i,!0)},setMatrix4fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix4fv,t,e,i,!0)},createProgram:function(t,e){void 0===t&&(t=this.vertSrc),void 0===e&&(e=this.fragSrc);var i=this.gl;return this.program&&i.deleteProgram(this.program),this.vertSrc=t,this.fragSrc=e,this.program=this.renderer.createProgram(t,e),this.createUniforms(),this.rebind()},destroy:function(){this.gl.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null,this.attributes=null,this.uniforms=null}});t.exports=o},71402:t=>{t.exports={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}}},55478:(t,e,i)=>{var s=i(71402),n=i(98611),r={PipelineManager:i(35217),Pipelines:i(62253),RenderTarget:i(37410),Utils:i(75512),WebGLPipeline:i(44775),WebGLRenderer:i(11857),WebGLShader:i(71305)};r=n(!1,r,s),t.exports=r},5583:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(91679),o=i(89053),a=i(71402),h=i(44775),l=new s({Extends:h,initialize:function(t){t.fragShader=n(t,"fragShader",r),t.vertShader=n(t,"vertShader",o),t.batchSize=n(t,"batchSize",1),t.vertices=n(t,"vertices",[-1,1,-1,-7,7,1]),t.attributes=n(t,"attributes",[{name:"inPosition",size:2,type:a.FLOAT}]),h.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(t,e){h.prototype.resize.call(this,t,e),this.set2f("uResolution",t,e)},beginMask:function(t,e,i){this.renderer.beginBitmapMask(t,i)},endMask:function(t,e,i){var s=this.gl,n=this.renderer,r=t.bitmapMask;r&&s&&(n.drawBitmapMask(r,e,this),i&&this.set2f("uResolution",i.width,i.height),this.set1i("uInvertMaskAlpha",t.invertAlpha),s.drawArrays(this.topology,0,3),i&&this.set2f("uResolution",this.width,this.height),s.bindTexture(s.TEXTURE_2D,null))}});t.exports=l},66901:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(65045),o=i(77310),a=i(69360),h=i(93736),l=i(44775),u=new s({Extends:o,initialize:function(t){var e=n(t,"fragShader",r);t.fragShader=e.replace("%LIGHT_COUNT%",t.game.renderer.config.maxLights),o.call(this,t),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.defaultNormalMap,this.currentNormalMap,this.lightsActive=!0,this.tempVec2=new h,this._tempMatrix=new a,this._tempMatrix2=new a},boot:function(){l.prototype.boot.call(this);var t=this.gl,e=t.createTexture();t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([127,127,255,255])),this.defaultNormalMap={glTexture:e}},onRender:function(t,e){var i=t.sys.lights;if(this.lightsActive=!1,i&&i.active){var s,n=i.getLights(e),r=n.length;this.lightsActive=!0;var o=this.renderer.height,a=e.matrix,h=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",e.x,e.y,e.rotation,e.zoom),this.set3f("uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),this.set1i("uLightCount",r),s=0;s0&&this.flush();var e=this.inverseRotationMatrix;if(t){var i=-t,s=Math.cos(i),n=Math.sin(i);e[1]=n,e[3]=-n,e[0]=e[4]=s}else e[0]=e[4]=1,e[1]=e[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,e),this.currentNormalMapRotation=t}},setTexture2D:function(t,e){var i=this.renderer;void 0===t&&(t=i.whiteTexture);var s=this.getNormalMap(e);this.isNewNormalMap(t,s)&&(this.flush(),this.createBatch(t),this.addTextureToBatch(s),this.currentNormalMap=s);var n=0;e&&e.parentContainer?n=e.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2).rotationNormalized:e&&(n=e.rotation);return this.setNormalMapRotation(n),0},setGameObject:function(t,e){void 0===e&&(e=t.frame);var i=e.glTexture,s=this.getNormalMap(t);if(this.isNewNormalMap(i,s)&&(this.flush(),this.createBatch(i),this.addTextureToBatch(s),this.currentNormalMap=s),t.parentContainer){var n=t.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(n.rotationNormalized)}else this.setNormalMapRotation(t.rotation);return 0},isNewNormalMap:function(t,e){return this.currentTexture!==t||this.currentNormalMap!==e},getNormalMap:function(t){var e;return t?t.displayTexture?e=t.displayTexture.dataSource[t.displayFrame.sourceIndex]:t.texture?e=t.texture.dataSource[t.frame.sourceIndex]:t.tileset&&(e=Array.isArray(t.tileset)?t.tileset[0].image.dataSource[0]:t.tileset.image.dataSource[0]):e=this.defaultNormalMap,e||(e=this.defaultNormalMap),e.glTexture},batchSprite:function(t,e,i){this.lightsActive&&o.prototype.batchSprite.call(this,t,e,i)},batchTexture:function(t,e,i,s,n,r,a,h,l,u,c,d,p,f,v,g,m,y,x,T,w,b,S,E,A,_,C,M,R,P,O,L){this.lightsActive&&o.prototype.batchTexture.call(this,t,e,i,s,n,r,a,h,l,u,c,d,p,f,v,g,m,y,x,T,w,b,S,E,A,_,C,M,R,P,O,L)},batchTextureFrame:function(t,e,i,s,n,r,a){this.lightsActive&&o.prototype.batchTextureFrame.call(this,t,e,i,s,n,r,a)}});t.exports=u},71264:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(77310),o=i(85060),a=i(18166),h=i(71402),l=i(44775),u=new s({Extends:r,initialize:function(t){t.fragShader=n(t,"fragShader",o),t.vertShader=n(t,"vertShader",a),t.attributes=n(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:h.UNSIGNED_BYTE,normalized:!0}]),t.forceZero=!0,r.call(this,t)},boot:function(){l.prototype.boot.call(this),this.set1i("uMainSampler",0)}});t.exports=u},77310:(t,e,i)=>{var s=i(56694),n=i(11117),r=i(72632),o=i(53787),a=i(15968),h=i(69360),l=i(75512),u=i(71402),c=i(44775),d=new s({Extends:c,initialize:function(t){var e=t.game.renderer,i=r(t,"fragShader",o);t.fragShader=l.parseFragmentShaderMaxTextures(i,e.maxTextures),t.vertShader=r(t,"vertShader",a),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:u.UNSIGNED_BYTE,normalized:!0}]),c.call(this,t),this._tempMatrix1=new h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.calcMatrix=new h,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){c.prototype.boot.call(this),this.currentShader.set1iv("uMainSampler",this.renderer.textureIndexes)},batchSprite:function(t,e,i){this.manager.set(this,t);var s=this._tempMatrix1,n=this._tempMatrix2,r=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,u=o.v0,c=o.u1,d=o.v1,p=o.x,f=o.y,v=o.cutWidth,g=o.cutHeight,m=o.customPivot,y=t.displayOriginX,x=t.displayOriginY,T=-y+p,w=-x+f;if(t.isCropped){var b=t._crop;b.flipX===t.flipX&&b.flipY===t.flipY||o.updateCropUVs(b,t.flipX,t.flipY),h=b.u0,u=b.v0,c=b.u1,d=b.v1,v=b.width,g=b.height,T=-y+(p=b.x),w=-x+(f=b.y)}var S=1,E=1;t.flipX&&(m||(T+=-o.realWidth+2*y),S=-1),(t.flipY||o.source.isGLTexture&&!a.flipY)&&(m||(w+=-o.realHeight+2*x),E=-1);var A=t.x,_=t.y;e.roundPixels&&(A=Math.floor(A),_=Math.floor(_)),n.applyITRS(A,_,t.rotation,t.scaleX*S,t.scaleY*E),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),n.e=A,n.f=_):(n.e-=e.scrollX*t.scrollFactorX,n.f-=e.scrollY*t.scrollFactorY),s.multiply(n,r);var C=r.setQuad(T,w,T+v,w+g,!1),M=l.getTintAppendFloatAlpha,R=e.alpha,P=M(t.tintTopLeft,R*t._alphaTL),O=M(t.tintTopRight,R*t._alphaTR),L=M(t.tintBottomLeft,R*t._alphaBL),F=M(t.tintBottomRight,R*t._alphaBR);this.shouldFlush(6)&&this.flush();var D=this.setGameObject(t,o);this.manager.preBatch(t),this.batchQuad(t,C[0],C[1],C[2],C[3],C[4],C[5],C[6],C[7],h,u,c,d,P,O,L,F,t.tintFill,a,D),this.manager.postBatch(t)},batchTexture:function(t,e,i,s,n,r,o,a,h,l,u,c,d,p,f,v,g,m,y,x,T,w,b,S,E,A,_,C,M,R,P,O){this.manager.set(this,t);var L=this._tempMatrix1,F=this._tempMatrix2,D=this._tempMatrix3,k=m/i+_,I=y/s+C,B=(m+x)/i+_,N=(y+T)/s+C,Y=o,U=a,X=-v,z=-g;if(t.isCropped){var G=t._crop,V=G.width,W=G.height;Y=V,U=W,o=V,a=W;var H=m=G.x,j=y=G.y;c&&(H=x-G.x-V),d&&(j=T-G.y-W),k=H/i+_,I=j/s+C,B=(H+V)/i+_,N=(j+W)/s+C,X=-v+m,z=-g+y}c&&(Y*=-1,X+=o),(d^=!P&&e.isRenderTexture?1:0)&&(U*=-1,z+=a),M.roundPixels&&(n=Math.floor(n),r=Math.floor(r)),F.applyITRS(n,r,u,h,l),L.copyFrom(M.matrix),R?(L.multiplyWithOffset(R,-M.scrollX*p,-M.scrollY*f),F.e=n,F.f=r):(F.e-=M.scrollX*p,F.f-=M.scrollY*f),L.multiply(F,D);var K=D.setQuad(X,z,X+Y,z+U,!1);void 0===O&&(O=this.setTexture2D(e)),t&&this.manager.preBatch(t),this.batchQuad(t,K[0],K[1],K[2],K[3],K[4],K[5],K[6],K[7],k,I,B,N,w,b,S,E,A,e,O),t&&this.manager.postBatch(t)},batchTextureFrame:function(t,e,i,s,n,r,o){this.manager.set(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2;o?a.multiply(o,h):h=a;var u=h.setQuad(e,i,e+t.width,i+t.height,!1),c=this.setTexture2D(t.source.glTexture);s=l.getTintAppendFloatAlpha(s,n),this.batchQuad(null,u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],t.u0,t.v0,t.u1,t.v1,s,s,s,s,0,t.glTexture,c)},batchFillRect:function(t,e,i,s,n,r){this.renderer.pipelines.set(this);var o=this.calcMatrix;r&&r.multiply(n,o);var a=o.setQuad(t,e,t+i,e+s,!1),h=this.fillTint;this.batchQuad(null,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],0,0,1,1,h.TL,h.TR,h.BL,h.BR,2)},batchFillTriangle:function(t,e,i,s,n,r,o,a){this.renderer.pipelines.set(this);var h=this.calcMatrix;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,s),d=h.getY(i,s),p=h.getX(n,r),f=h.getY(n,r),v=this.fillTint;this.batchTri(null,l,u,c,d,p,f,0,0,1,1,v.TL,v.TR,v.BL,2)},batchStrokeTriangle:function(t,e,i,s,n,r,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=s,l[1].width=o,l[2].x=n,l[2].y=r,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.pipelines.set(this);var s=this.calcMatrix;i&&i.multiply(e,s);for(var r,o,a=t.length,h=this.polygonCache,l=this.fillTint.TL,u=this.fillTint.TR,c=this.fillTint.BL,d=0;d0&&U[4]?this.batchQuad(null,F,D,R,P,U[0],U[1],U[2],U[3],0,0,1,1,I,B,N,Y,2):(X[0]=F,X[1]=D,X[2]=R,X[3]=P,X[4]=1),h&&X[4]?this.batchQuad(null,C,M,O,L,X[0],X[1],X[2],X[3],0,0,1,1,I,B,N,Y,2):(U[0]=C,U[1]=M,U[2]=O,U[3]=L,U[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,c.prototype.destroy.call(this),this}});t.exports=d},10919:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(83327),o=i(54677),a=i(44775),h=new s({Extends:a,initialize:function(t){t.vertShader=n(t,"vertShader",o),t.fragShader=n(t,"fragShader",r),t.attributes=n(t,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),a.call(this,t)},onRender:function(t,e){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",e.zoom)},batchPointLight:function(t,e,i,s,n,r,o,a,h,l,u,c){var d=t.color,p=t.intensity,f=t.radius,v=t.attenuation,g=d.r*p,m=d.g*p,y=d.b*p,x=e.alpha*t.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(i,s,u,c,f,v,g,m,y,x),this.batchLightVert(n,r,u,c,f,v,g,m,y,x),this.batchLightVert(o,a,u,c,f,v,g,m,y,x),this.batchLightVert(i,s,u,c,f,v,g,m,y,x),this.batchLightVert(o,a,u,c,f,v,g,m,y,x),this.batchLightVert(h,l,u,c,f,v,g,m,y,x),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(t,e,i,s,n,r,o,a,h,l){var u=this.vertexViewF32,c=this.vertexCount*this.currentShader.vertexComponentCount-1;u[++c]=t,u[++c]=e,u[++c]=i,u[++c]=s,u[++c]=n,u[++c]=r,u[++c]=o,u[++c]=a,u[++c]=h,u[++c]=l,this.vertexCount++}});t.exports=h},80486:(t,e,i)=>{var s=i(56694),n=i(65246),r=i(72632),o=i(12569),a=i(99365),h=i(44775),l=new s({Extends:h,initialize:function(t){t.renderTarget=r(t,"renderTarget",1),t.fragShader=r(t,"fragShader",o),t.vertShader=r(t,"vertShader",a),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.batchSize=1,t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],h.call(this,t),this.isPostFX=!0,this.gameObject,this.colorMatrix=new n,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){h.prototype.boot.call(this);var t=this.manager.UTILITY_PIPELINE;this.fullFrame1=t.fullFrame1,this.fullFrame2=t.fullFrame2,this.halfFrame1=t.halfFrame1,this.halfFrame2=t.halfFrame2,this.set1i("uMainSampler",0)},onDraw:function(t){this.bindAndDraw(t)},copyFrame:function(t,e,i,s,n){this.manager.copyFrame(t,e,i,s,n)},copyToGame:function(t){this.manager.copyToGame(t)},drawFrame:function(t,e,i){this.manager.drawFrame(t,e,i,this.colorMatrix)},blendFrames:function(t,e,i,s,n){this.manager.blendFrames(t,e,i,s,n)},blendFramesAdditive:function(t,e,i,s,n){this.manager.blendFramesAdditive(t,e,i,s,n)},clearFrame:function(t,e){this.manager.clearFrame(t,e)},blitFrame:function(t,e,i,s,n,r){this.manager.blitFrame(t,e,i,s,n,r)},copyFrameRect:function(t,e,i,s,n,r,o,a){this.manager.copyFrameRect(t,e,i,s,n,r,o,a)},bindAndDraw:function(t,e,i,s,n){void 0===i&&(i=!0),void 0===s&&(s=!0);var r=this.gl,o=this.renderer;this.bind(n),this.set1i("uMainSampler",0),e?(r.viewport(0,0,e.width,e.height),r.bindFramebuffer(r.FRAMEBUFFER,e.framebuffer),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.texture,0),i&&(s?r.clearColor(0,0,0,0):r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT))):(o.popFramebuffer(!1,!1,!1),o.currentFramebuffer||r.viewport(0,0,o.width,o.height)),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,t.texture),r.bufferData(r.ARRAY_BUFFER,this.vertexData,r.STATIC_DRAW),r.drawArrays(r.TRIANGLES,0,6),e&&(r.bindTexture(r.TEXTURE_2D,null),r.bindFramebuffer(r.FRAMEBUFFER,null))}});t.exports=l},21213:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(77310),o=new s({Extends:r,initialize:function(t){t.topology=5,t.batchSize=n(t,"batchSize",256),r.call(this,t)}});t.exports=o},51212:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(77310),o=i(85060),a=i(18166),h=i(44775),l=new s({Extends:r,initialize:function(t){t.fragShader=n(t,"fragShader",o),t.vertShader=n(t,"vertShader",a),t.forceZero=!0,r.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0)}});t.exports=l},38964:(t,e,i)=>{var s=i(95723),n=i(79993),r=i(56694),o=i(72632),a=i(77310),h=i(12569),l=i(74118),u=i(37410),c=i(85060),d=i(18166),p=i(44775),f=new r({Extends:a,initialize:function(t){var e=o(t,"fragShader",h),i=o(t,"vertShader",d),s=o(t,"drawShader",h),n=[{name:"DrawSprite",fragShader:c,vertShader:d},{name:"CopySprite",fragShader:e,vertShader:i},{name:"DrawGame",fragShader:s,vertShader:d}],r=o(t,"shaders",[]);t.shaders=n.concat(r),t.vertShader||(t.vertShader=i),t.batchSize=1,a.call(this,t),this.isSpriteFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new l,this.targetBounds=new l,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){p.prototype.boot.call(this);var t=this.shaders,e=this.renderer;this.drawSpriteShader=t[0],this.copyShader=t[1],this.gameShader=t[2],this.fsTarget=new u(e,e.width,e.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var i=new ArrayBuffer(168);this.quadVertexData=i,this.quadVertexViewF32=new Float32Array(i),this.quadVertexBuffer=e.createVertexBuffer(i,this.gl.STATIC_DRAW),this.onResize(e.width,e.height),this.currentShader=this.copyShader},onResize:function(t,e){var i=this.quadVertexViewF32;i[1]=e,i[22]=e,i[14]=t,i[28]=t,i[35]=t,i[36]=e},batchQuad:function(t,e,i,s,r,o,a,h,l,u,c,d,p,f,v,g,m,y,x){var T=Math.min(e,s,o,h),w=Math.min(i,r,a,l),b=Math.max(e,s,o,h)-T,S=Math.max(i,r,a,l)-w,E=this.spriteBounds.setTo(T,w,b,S),A=t?t.fxPadding:0,_=b+2*A,C=S+2*A,M=Math.abs(Math.max(_,C)),R=this.manager.getRenderTarget(M),P=this.targetBounds.setTo(0,0,R.width,R.height);n(P,E.centerX,E.centerY),this.tempSprite=t;var O=this.gl,L=this.renderer;this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.flipProjectionMatrix(!0),t&&(this.onDrawSprite(t,R),t.onFX(this));var F=this.fsTarget;return this.flush(),O.viewport(0,0,L.width,L.height),O.bindFramebuffer(O.FRAMEBUFFER,F.framebuffer),O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,F.texture,0),O.clearColor(0,0,0,0),O.clear(O.COLOR_BUFFER_BIT),this.setTexture2D(x),this.batchVert(e,i,u,c,0,y,f),this.batchVert(s,r,u,p,0,y,g),this.batchVert(o,a,d,p,0,y,m),this.batchVert(e,i,u,c,0,y,f),this.batchVert(o,a,d,p,0,y,m),this.batchVert(h,l,d,c,0,y,v),this.flush(),this.flipProjectionMatrix(!1),O.activeTexture(O.TEXTURE0),O.bindTexture(O.TEXTURE_2D,R.texture),O.copyTexSubImage2D(O.TEXTURE_2D,0,0,0,P.x,P.y,P.width,P.height),O.bindFramebuffer(O.FRAMEBUFFER,null),O.bindTexture(O.TEXTURE_2D,null),this.onBatch(t),this.currentShader=this.copyShader,this.onDraw(R,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(t,e,i,n,r,o){void 0===i&&(i=!0),void 0===n&&(n=!0),void 0===r&&(r=!1),void 0===o&&(o=this.copyShader);var a=this.gl,h=this.tempSprite;this.currentShader=o;var l=this.setVertexBuffer(this.quadVertexBuffer);if(o.bind(l,!1),this.set1i("uMainSampler",0),h.onFXCopy(this),this.onCopySprite(t,e,h),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,t.texture),t.height>e.height)a.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e);else{var u=e.height-t.height;a.viewport(0,u,t.width,t.height),this.resetUVs()}if(a.bindFramebuffer(a.FRAMEBUFFER,e.framebuffer),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,e.texture,0),i&&(a.clearColor(0,0,0,Number(!n)),a.clear(a.COLOR_BUFFER_BIT)),r){var c=this.renderer.currentBlendMode;this.renderer.setBlendMode(s.ERASE)}a.bufferData(a.ARRAY_BUFFER,this.quadVertexData,a.STATIC_DRAW),a.drawArrays(a.TRIANGLES,0,6),r&&this.renderer.setBlendMode(c),a.bindFramebuffer(a.FRAMEBUFFER,null)},blendFrames:function(t,e,i,s,n){this.manager.blendFrames(t,e,i,s,n)},blendFramesAdditive:function(t,e,i,s,n){this.manager.blendFramesAdditive(t,e,i,s,n)},drawToGame:function(t){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(t)},copyToGame:function(t){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(t)},bindAndDraw:function(t){var e=this.gl,i=this.renderer;this.set1i("uMainSampler",0),i.popFramebuffer(!1,!1,!1),i.currentFramebuffer||e.viewport(0,0,i.width,i.height),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(t.texture);var s=this._tempMatrix1.loadIdentity(),n=this.targetBounds.x,r=this.targetBounds.y,o=n+t.width,a=r+t.height,h=s.getX(n,r),l=s.getX(n,a),u=s.getX(o,a),c=s.getX(o,r),d=s.getY(n,r),p=s.getY(n,a),f=s.getY(o,a),v=s.getY(o,r);this.batchVert(h,d,0,0,0,0,16777215),this.batchVert(l,p,0,1,0,0,16777215),this.batchVert(u,f,1,1,0,0,16777215),this.batchVert(h,d,0,0,0,0,16777215),this.batchVert(u,f,1,1,0,0,16777215),this.batchVert(c,v,1,0,0,0,16777215),this.flush(),this.tempSprite=null},onDraw:function(t){this.drawToGame(t)},setUVs:function(t,e,i,s,n,r,o,a){var h=this.quadVertexViewF32;h[2]=t,h[3]=e,h[9]=i,h[10]=s,h[16]=n,h[17]=r,h[23]=t,h[24]=e,h[30]=n,h[31]=r,h[37]=o,h[38]=a},setTargetUVs:function(t,e){var i=e.height/t.height;i=i>.5?.5-(i-.5):.5-i+.5,this.setUVs(0,i,0,1+i,1,1+i,1,i)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)},destroy:function(){return this.gl.deleteBuffer(this.quadVertexBuffer),this.drawSpriteShader=null,this.copyShader=null,this.gameShader=null,this.quadVertexData=null,this.quadVertexBuffer=null,this.quadVertexViewF32=null,this.fsTarget=null,this.tempSprite=null,a.prototype.destroy.call(this),this}});t.exports=f},60848:(t,e,i)=>{var s=i(2529),n=i(95723),r=i(56694),o=i(65246),a=i(37486),h=i(79060),l=i(72632),u=i(98921),c=i(99365),d=i(44775),p=new r({Extends:d,initialize:function(t){t.renderTarget=l(t,"renderTarget",[{scale:1},{scale:1},{scale:.5},{scale:.5}]),t.vertShader=l(t,"vertShader",c),t.shaders=l(t,"shaders",[{name:"Copy",fragShader:h},{name:"AddBlend",fragShader:s},{name:"LinearBlend",fragShader:u},{name:"ColorMatrix",fragShader:a}]),t.attributes=l(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],t.batchSize=1,d.call(this,t),this.colorMatrix=new o,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){d.prototype.boot.call(this);var t=this.shaders,e=this.renderTargets;this.copyShader=t[0],this.addShader=t[1],this.linearShader=t[2],this.colorMatrixShader=t[3],this.fullFrame1=e[0],this.fullFrame2=e[1],this.halfFrame1=e[2],this.halfFrame2=e[3]},copyFrame:function(t,e,i,s,n){void 0===i&&(i=1),void 0===s&&(s=!0),void 0===n&&(n=!0);var r=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,t.texture),e?(r.viewport(0,0,e.width,e.height),r.bindFramebuffer(r.FRAMEBUFFER,e.framebuffer),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.texture,0)):r.viewport(0,0,t.width,t.height),s&&(n?r.clearColor(0,0,0,0):r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT)),r.bufferData(r.ARRAY_BUFFER,this.vertexData,r.STATIC_DRAW),r.drawArrays(r.TRIANGLES,0,6),r.bindFramebuffer(r.FRAMEBUFFER,null),r.bindTexture(r.TEXTURE_2D,null)},blitFrame:function(t,e,i,s,r,o,a){void 0===i&&(i=1),void 0===s&&(s=!0),void 0===r&&(r=!0),void 0===o&&(o=!1),void 0===a&&(a=!1);var h=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,t.texture),t.height>e.height)h.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e);else{var l=e.height-t.height;h.viewport(0,l,t.width,t.height)}if(h.bindFramebuffer(h.FRAMEBUFFER,e.framebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,e.texture,0),s&&(r?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),o){var u=this.renderer.currentBlendMode;this.renderer.setBlendMode(n.ERASE)}a&&this.flipY(),h.bufferData(h.ARRAY_BUFFER,this.vertexData,h.STATIC_DRAW),h.drawArrays(h.TRIANGLES,0,6),o&&this.renderer.setBlendMode(u),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(t,e,i,s,n,r,o,a){void 0===o&&(o=!0),void 0===a&&(a=!0);var h=this.gl;h.bindFramebuffer(h.FRAMEBUFFER,t.framebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,t.texture,0),o&&(a?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,e.texture),h.copyTexSubImage2D(h.TEXTURE_2D,0,0,0,i,s,n,r),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null)},copyToGame:function(t){var e=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,t.texture),e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.STATIC_DRAW),e.drawArrays(e.TRIANGLES,0,6)},drawFrame:function(t,e,i,s){void 0===i&&(i=!0),void 0===s&&(s=this.colorMatrix);var n=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",s.getData()),this.set1f("uAlpha",s.alpha),n.activeTexture(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,t.texture),e?(n.viewport(0,0,e.width,e.height),n.bindFramebuffer(n.FRAMEBUFFER,e.framebuffer),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e.texture,0)):n.viewport(0,0,t.width,t.height),i?n.clearColor(0,0,0,0):n.clearColor(0,0,0,1),n.clear(n.COLOR_BUFFER_BIT),n.bufferData(n.ARRAY_BUFFER,this.vertexData,n.STATIC_DRAW),n.drawArrays(n.TRIANGLES,0,6),n.bindFramebuffer(n.FRAMEBUFFER,null),n.bindTexture(n.TEXTURE_2D,null)},blendFrames:function(t,e,i,s,n,r){void 0===s&&(s=1),void 0===n&&(n=!0),void 0===r&&(r=this.linearShader);var o=this.gl;this.setShader(r),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",s),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,t.texture),o.activeTexture(o.TEXTURE1),o.bindTexture(o.TEXTURE_2D,e.texture),i?(o.bindFramebuffer(o.FRAMEBUFFER,i.framebuffer),o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,i.texture,0),o.viewport(0,0,i.width,i.height)):o.viewport(0,0,t.width,t.height),n?o.clearColor(0,0,0,0):o.clearColor(0,0,0,1),o.clear(o.COLOR_BUFFER_BIT),o.bufferData(o.ARRAY_BUFFER,this.vertexData,o.STATIC_DRAW),o.drawArrays(o.TRIANGLES,0,6),o.bindFramebuffer(o.FRAMEBUFFER,null),o.bindTexture(o.TEXTURE_2D,null)},blendFramesAdditive:function(t,e,i,s,n){this.blendFrames(t,e,i,s,n,this.addShader)},clearFrame:function(t,e){void 0===e&&(e=!0);var i=this.gl;i.viewport(0,0,t.width,t.height),i.bindFramebuffer(i.FRAMEBUFFER,t.framebuffer),e?i.clearColor(0,0,0,0):i.clearColor(0,0,0,1),i.clear(i.COLOR_BUFFER_BIT);var s=this.renderer.currentFramebuffer;i.bindFramebuffer(i.FRAMEBUFFER,s)},setUVs:function(t,e,i,s,n,r,o,a){var h=this.vertexViewF32;h[2]=t,h[3]=e,h[6]=i,h[7]=s,h[10]=n,h[11]=r,h[14]=t,h[15]=e,h[18]=n,h[19]=r,h[22]=o,h[23]=a},setTargetUVs:function(t,e){var i=e.height/t.height;i=i>.5?.5-(i-.5):.5-i+.5,this.setUVs(0,i,0,1+i,1,1+i,1,i)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});t.exports=p},65641:t=>{t.exports={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline",MOBILE_PIPELINE:"MobilePipeline"}},68726:t=>{t.exports="pipelineafterflush"},67186:t=>{t.exports="pipelinebeforeflush"},22709:t=>{t.exports="pipelinebind"},74469:t=>{t.exports="pipelineboot"},93953:t=>{t.exports="pipelinedestroy"},51687:t=>{t.exports="pipelinerebind"},25034:t=>{t.exports="pipelineresize"},18970:(t,e,i)=>{t.exports={AFTER_FLUSH:i(68726),BEFORE_FLUSH:i(67186),BIND:i(22709),BOOT:i(74469),DESTROY:i(93953),REBIND:i(51687),RESIZE:i(25034)}},62253:(t,e,i)=>{var s=i(65641),n=i(98611),r={BitmapMaskPipeline:i(5583),Events:i(18970),LightPipeline:i(66901),MobilePipeline:i(71264),MultiPipeline:i(77310),PointLightPipeline:i(10919),PostFXPipeline:i(80486),RopePipeline:i(21213),SinglePipeline:i(51212),SpriteFXPipeline:i(38964),UtilityPipeline:i(60848)};r=n(!1,r,s),t.exports=r},2529:t=>{t.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = frame1 + frame2 * uStrength;","}",""].join("\n")},91679:t=>{t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;",""," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);",""," if (!uInvertMaskAlpha)"," {"," mainColor *= maskColor.a;"," }"," else"," {"," mainColor *= (1.0 - maskColor.a);"," }",""," gl_FragColor = mainColor;","}",""].join("\n")},89053:t=>{t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join("\n")},37486:t=>{t.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);",""," if (uAlpha == 0.0)"," {"," gl_FragColor = c;",""," return;"," }",""," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }",""," vec4 result;",""," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];",""," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);",""," rgb *= result.a;",""," gl_FragColor = vec4(rgb, result.a);","}",""].join("\n")},79060:t=>{t.exports=["#define SHADER_NAME PHASER_COPY_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uBrightness;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}",""].join("\n")},65045:t=>{t.exports=["#define SHADER_NAME PHASER_LIGHT_FS","","precision mediump float;","","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","","const int kMaxLights = %LIGHT_COUNT%;","","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","uniform int uLightCount;","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);",""," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;",""," for (int index = 0; index < kMaxLights; ++index)"," {"," if (index < uLightCount)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }"," }",""," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);",""," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}",""].join("\n")},98921:t=>{t.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}",""].join("\n")},53787:t=>{t.exports=["#define SHADER_NAME PHASER_MULTI_FS","","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","","uniform sampler2D uMainSampler[%count%];","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec4 texture;",""," %forloop%",""," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},15968:t=>{t.exports=["#define SHADER_NAME PHASER_MULTI_VS","","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join("\n")},83327:t=>{t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform float uCameraZoom;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);",""," float distToSurf = length(center - gl_FragCoord.xy);",""," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);",""," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);",""," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;",""," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}",""].join("\n")},54677:t=>{t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);",""," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}",""].join("\n")},12569:t=>{t.exports=["#define SHADER_NAME PHASER_POSTFX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}",""].join("\n")},99365:t=>{t.exports=["#define SHADER_NAME PHASER_QUAD_VS","","precision mediump float;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","","varying vec2 outFragCoord;","varying vec2 outTexCoord;","","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;",""," gl_Position = vec4(inPosition, 0, 1);","}",""].join("\n")},85060:t=>{t.exports=["#define SHADER_NAME PHASER_SINGLE_FS","","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},18166:t=>{t.exports=["#define SHADER_NAME PHASER_SINGLE_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join("\n")},756:(t,e,i)=>{var s=i(55301),n=i(56694),r=i(6659),o=i(40444),a=i(97081),h=i(74181),l=i(2893),u=i(9229),c=i(72283),d=i(74118),p=i(90881),f=i(84314),v=i(93736),g=i(47751),m=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.canvas,this.canvasBounds=new d,this.parent=null,this.parentIsWindow=!1,this.parentSize=new p,this.gameSize=new p,this.baseSize=new p,this.displaySize=new p,this.scaleMode=s.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new v(1,1),this.autoRound=!1,this.autoCenter=s.CENTER.NO_CENTER,this.orientation=s.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.domlisteners={orientationChange:c,windowResize:c,fullScreenChange:c,fullScreenError:c}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(a.BOOT,this.boot,this)},boot:function(){var t=this.game;this.canvas=t.canvas,this.fullscreen=t.device.fullscreen,this.scaleMode!==s.SCALE_MODE.RESIZE&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===s.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),t.events.on(a.PRE_STEP,this.step,this),t.events.once(a.READY,this.refresh,this),t.events.once(a.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e=t.width,i=t.height,n=t.scaleMode,r=t.zoom,o=t.autoRound;if("string"==typeof e){var a=this.parentSize.width;0===a&&(a=window.innerWidth);var h=parseInt(e,10)/100;e=Math.floor(a*h)}if("string"==typeof i){var l=this.parentSize.height;0===l&&(l=window.innerHeight);var c=parseInt(i,10)/100;i=Math.floor(l*c)}this.scaleMode=n,this.autoRound=o,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,o&&(e=Math.floor(e),i=Math.floor(i)),this.gameSize.setSize(e,i),r===s.ZOOM.MAX_ZOOM&&(r=this.getMaxZoom()),this.zoom=r,1!==r&&(this._resetZoom=!0),this.baseSize.setSize(e,i),o&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),t.minWidth>0&&this.displaySize.setMin(t.minWidth*r,t.minHeight*r),t.maxWidth>0&&this.displaySize.setMax(t.maxWidth*r,t.maxHeight*r),this.displaySize.setSize(e,i),this.orientation=u(e,i)},getParent:function(t){var e=t.parent;if(null!==e){if(this.parent=l(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==s.SCALE_MODE.NONE){var i=this.parent.getBoundingClientRect();(this.parentIsWindow||0===i.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",i=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==i.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(t.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var t=this.parentSize,e=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(e.height=h(!0));var i=e.width,s=e.height;if(t.width!==i||t.height!==s)return t.setSize(i,s),!0;if(this.canvas){var n=this.canvasBounds,r=this.canvas.getBoundingClientRect();if(r.x!==n.x||r.y!==n.y)return!0}return!1},lockOrientation:function(t){var e=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!e&&e.call(screen,t)},setParentSize:function(t,e){return this.parentSize.setSize(t,e),this.refresh()},setGameSize:function(t,e){var i=this.autoRound;i&&(t=Math.floor(t),e=Math.floor(e));var s=this.width,n=this.height;return this.gameSize.resize(t,e),this.baseSize.resize(t,e),i&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(t/e),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(s,n)},resize:function(t,e){var i=this.zoom,s=this.autoRound;s&&(t=Math.floor(t),e=Math.floor(e));var n=this.width,r=this.height;this.gameSize.resize(t,e),this.baseSize.resize(t,e),s&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t*i,e*i),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var o=this.canvas.style,a=t*i,h=e*i;return s&&(a=Math.floor(a),h=Math.floor(h)),a===t&&h===e||(o.width=a+"px",o.height=h+"px"),this.refresh(n,r)},setZoom:function(t){return this.zoom=t,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var i=this.game.domContainer;if(i){this.baseSize.setCSS(i);var s=this.canvas.style,n=i.style;n.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",n.marginLeft=s.marginLeft,n.marginTop=s.marginTop}return this.emit(o.RESIZE,this.gameSize,this.baseSize,this.displaySize,t,e),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var t=u(this.width,this.height);t!==this.orientation&&(this.orientation=t,this.emit(o.ORIENTATION_CHANGE,t))}},updateScale:function(){var t,e,i=this.canvas.style,n=this.gameSize.width,r=this.gameSize.height,o=this.zoom,a=this.autoRound;this.scaleMode===s.SCALE_MODE.NONE?(this.displaySize.setSize(n*o,r*o),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),this._resetZoom&&(i.width=t+"px",i.height=e+"px",this._resetZoom=!1)):this.scaleMode===s.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=f(this.parentSize.width,this.gameSize.width,0,!0),e=f(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t=this.autoCenter;if(t!==s.CENTER.NO_CENTER){var e=this.canvas,i=e.style,n=e.getBoundingClientRect(),r=n.width,o=n.height,a=Math.floor((this.parentSize.width-r)/2),h=Math.floor((this.parentSize.height-o)/2);t===s.CENTER.CENTER_HORIZONTALLY?h=0:t===s.CENTER.CENTER_VERTICALLY&&(a=0),i.marginLeft=a+"px",i.marginTop=h+"px"}},updateBounds:function(){var t=this.canvasBounds,e=this.canvas.getBoundingClientRect();t.x=e.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),t.y=e.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),t.width=e.width,t.height=e.height},transformX:function(t){return(t-this.canvasBounds.left)*this.displayScale.x},transformY:function(t){return(t-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(t){void 0===t&&(t={navigationUI:"hide"});var e=this.fullscreen;if(e.available){if(!e.active){var i=this.getFullscreenTarget();e.keyboard?i[e.request](Element.ALLOW_KEYBOARD_INPUT):i[e.request](t)}}else this.emit(o.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(o.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(o.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var t=document.createElement("div");t.style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0}this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas));return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var t=this.fullscreenTarget;if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(this.canvas,t),e.removeChild(t)}}},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(o.FULLSCREEN_UNSUPPORTED),!1;t.active&&document[t.cancel](),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(o.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var t=this,e=this.domlisteners;if(e.orientationChange=function(){t.updateBounds(),t._checkOrientation=!0,t.dirty=!0},e.windowResize=function(){t.updateBounds(),t.dirty=!0},window.addEventListener("orientationchange",e.orientationChange,!1),window.addEventListener("resize",e.windowResize,!1),this.fullscreen.available){e.fullScreenChange=function(e){return t.onFullScreenChange(e)},e.fullScreenError=function(e){return t.onFullScreenError(e)};["webkit","moz",""].forEach((function(t){document.addEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",e.fullScreenError,!1)})),document.addEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.addEventListener("MSFullscreenError",e.fullScreenError,!1)}},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():this.stopFullscreen()},onFullScreenError:function(){this.removeFullscreenTarget()},getViewPort:function(t,e){t instanceof g||(e=t,t=void 0),void 0===e&&(e=new d);var i,s,n=this.baseSize,r=this.parentSize,o=this.canvasBounds,a=this.displayScale,h=o.x>=0?0:-o.x*a.x,l=o.y>=0?0:-o.y*a.y;return i=r.width>=o.width?n.width:n.width-(o.width-r.width)*a.x,s=r.height>=o.height?n.height:n.height-(o.height-r.height)*a.y,e.setTo(h,l,i,s),t&&(e.width/=t.zoomX,e.height/=t.zoomY,e.centerX=t.centerX+t.scrollX,e.centerY=t.centerY+t.scrollY),e},step:function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var t=this.domlisteners;window.removeEventListener("orientationchange",t.orientationChange,!1),window.removeEventListener("resize",t.windowResize,!1);["webkit","moz",""].forEach((function(e){document.removeEventListener(e+"fullscreenchange",t.fullScreenChange,!1),document.removeEventListener(e+"fullscreenerror",t.fullScreenError,!1)})),document.removeEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",t.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===s.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===s.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=m},35098:t=>{t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},53539:t=>{t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},12637:t=>{t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},10217:t=>{t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},55301:(t,e,i)=>{var s={CENTER:i(35098),ORIENTATION:i(53539),SCALE_MODE:i(12637),ZOOM:i(10217)};t.exports=s},82085:t=>{t.exports="enterfullscreen"},11826:t=>{t.exports="fullscreenfailed"},56691:t=>{t.exports="fullscreenunsupported"},34739:t=>{t.exports="leavefullscreen"},26681:t=>{t.exports="orientationchange"},11428:t=>{t.exports="resize"},40444:(t,e,i)=>{t.exports={ENTER_FULLSCREEN:i(82085),FULLSCREEN_FAILED:i(11826),FULLSCREEN_UNSUPPORTED:i(56691),LEAVE_FULLSCREEN:i(34739),ORIENTATION_CHANGE:i(26681),RESIZE:i(11428)}},86754:(t,e,i)=>{var s=i(98611),n=i(55301),r={Center:i(35098),Events:i(40444),Orientation:i(53539),ScaleManager:i(756),ScaleModes:i(12637),Zoom:i(10217)};r=s(!1,r,n.CENTER),r=s(!1,r,n.ORIENTATION),r=s(!1,r,n.SCALE_MODE),r=s(!1,r,n.ZOOM),t.exports=r},47736:(t,e,i)=>{var s=i(72632),n=i(40587);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=s(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(n(e+"Physics")),i)for(var o in i)o=n(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},91088:(t,e,i)=>{var s=i(72632);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=s(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},90415:t=>{t.exports={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},87157:(t,e,i)=>{var s=i(56694),n=i(63946),r=new s({initialize:function(t){this.sys=new n(this,t),this.game,this.anims,this.cache,this.registry,this.sound,this.textures,this.events,this.cameras,this.add,this.make,this.scene,this.children,this.lights,this.data,this.input,this.load,this.time,this.tweens,this.physics,this.matter,this.scale,this.plugins,this.renderer},update:function(){}});t.exports=r},13553:(t,e,i)=>{var s=i(56694),n=i(92980),r=i(7599),o=i(97081),a=i(10850),h=i(683),l=i(72283),u=i(87157),c=i(63946),d=new s({initialize:function(t,e){if(this.game=t,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,e){Array.isArray(e)||(e=[e]);for(var i=0;i-1&&(delete this.keys[s],this.scenes.splice(i,1),this._start.indexOf(s)>-1&&(i=this._start.indexOf(s),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,s=i.settings;i.sceneUpdate=l,t.init&&(t.init.call(t,s.data),s.status=n.INIT,s.isTransition&&i.events.emit(r.TRANSITION_INIT,s.transitionFrom,s.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),s.status=n.LOADING,e.once(h.COMPLETE,this.loadComplete,this),e.start()):this.create(t)},loadComplete:function(t){this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(t.scene)},payloadComplete:function(t){this.bootScene(t.scene)},update:function(t,e){this.processQueue(),this.isProcessing=!0;for(var i=this.scenes.length-1;i>=0;i--){var s=this.scenes[i].sys;s.settings.status>n.START&&s.settings.status<=n.RUNNING&&s.step(t,e)}},render:function(t){for(var e=0;e=n.LOADING&&i.settings.status=n.START&&o<=n.CREATING)return this;if(o>=n.RUNNING&&o<=n.SLEEPING)r.shutdown(),r.sceneUpdate=l,r.start(e);else if(r.sceneUpdate=l,r.start(e),r.load&&(s=r.load),s&&r.settings.hasOwnProperty("pack")&&(s.reset(),s.addPack({payload:r.settings.pack})))return r.settings.status=n.LOADING,s.once(h.COMPLETE,this.payloadComplete,this),s.start(),this;return this.bootScene(i),this},stop:function(t,e){var i=this.getScene(t);if(i&&!i.sys.isTransitioning()&&i.sys.settings.status!==n.SHUTDOWN){var s=i.sys.load;s.off(h.COMPLETE,this.loadComplete,this),s.off(h.COMPLETE,this.payloadComplete,this),i.sys.shutdown(e)}return this},switch:function(t,e){var i=this.getScene(t),s=this.getScene(e);return i&&s&&i!==s&&(this.sleep(t),this.isSleeping(e)?this.wake(e):this.start(e)),this},getAt:function(t){return this.scenes[t]},getIndex:function(t){var e=this.getScene(t);return this.scenes.indexOf(e)},bringToTop:function(t){if(this.isProcessing)this._queue.push({op:"bringToTop",keyA:t,keyB:null});else{var e=this.getIndex(t);if(-1!==e&&e0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,s=this.getScene(t),n=this.getAt(i);this.scenes[e]=n,this.scenes[i]=s}}return this},moveUp:function(t){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(ei),0,n)}}return this},moveBelow:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:t,keyB:e});else{var i=this.getIndex(t),s=this.getIndex(e);if(-1!==i&&-1!==s&&s>i){var n=this.getAt(s);this.scenes.splice(s,1),0===i?this.scenes.unshift(n):this.scenes.splice(i-(s{var s=i(82897),n=i(56694),r=i(7599),o=i(72632),a=i(91963),h=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.pluginStart,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=o(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var s=o(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=s,this._willSleep=o(t,"sleep",!1),this._willRemove=o(t,"remove",!1);var n=o(t,"onUpdate",null);n&&(this._onUpdate=n,this._onUpdateScope=o(t,"onUpdateScope",this.scene));var a=o(t,"allowInput",!1);this.settings.transitionAllowInput=a;var h=i.sys.settings;h.isTransition=!0,h.transitionFrom=this.scene,h.transitionDuration=s,h.transitionAllowInput=a,o(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):o(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake(o(t,"data")):this.manager.start(e,o(t,"data"));var l=o(t,"onStart",null),u=o(t,"onStartScope",this.scene);return l&&l.call(u,this.scene,i,s),this.systems.events.emit(r.TRANSITION_OUT,i,s),this.systems.events.on(r.UPDATE,this.step,this),!0},checkValidTransition:function(t){return!(!t||t.sys.isActive()||t.sys.isTransitioning()||t===this.scene||this.systems.isTransitioning())},step:function(t,e){this._elapsed+=e,this.transitionProgress=s(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off(r.UPDATE,this.step,this),t.events.emit(r.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(t,e,i,s){return this.manager.add(t,e,i,s)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var s=this.manager.getScene(e);return s&&s.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getStatus:function(t){var e=this.manager.getScene(t);if(e)return e.sys.getStatus()},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(r.SHUTDOWN,this.shutdown,this),t.off(r.POST_UPDATE,this.step,this),t.off(r.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});a.register("ScenePlugin",h,"scenePlugin"),t.exports=h},36765:(t,e,i)=>{var s=i(92980),n=i(10850),r=i(30657),o=i(90415),a={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:s.PENDING,key:n(t,"key",""),active:n(t,"active",!1),visible:n(t,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:n(t,"pack",!1),cameras:n(t,"cameras",null),map:n(t,"map",r(o,n(t,"mapAdd",{}))),physics:n(t,"physics",{}),loader:n(t,"loader",{}),plugins:n(t,"plugins",!1),input:n(t,"input",{})}}};t.exports=a},63946:(t,e,i)=>{var s=i(56694),n=i(92980),r=i(18360),o=i(7599),a=i(47736),h=i(91088),l=i(72283),u=i(36765),c=new s({initialize:function(t,e){this.scene=t,this.game,this.renderer,this.config=e,this.settings=u.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.scale,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList,this.sceneUpdate=l},init:function(t){this.settings.status=n.INIT,this.sceneUpdate=l,this.game=t,this.renderer=t.renderer,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.addToScene(this,r.Global,[r.CoreScene,h(this),a(this)]),this.events.emit(o.BOOT,this),this.settings.isBooted=!0},step:function(t,e){var i=this.events;i.emit(o.PRE_UPDATE,t,e),i.emit(o.UPDATE,t,e),this.sceneUpdate.call(this.scene,t,e),i.emit(o.POST_UPDATE,t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.events.emit(o.PRE_RENDER,t),this.cameras.render(t,e),this.events.emit(o.RENDER,t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(t){var e=this.settings,i=this.getStatus();return i!==n.CREATING&&i!==n.RUNNING?console.warn("Cannot pause non-running Scene",e.key):this.settings.active&&(e.status=n.PAUSED,e.active=!1,this.events.emit(o.PAUSE,this,t)),this},resume:function(t){var e=this.events,i=this.settings;return this.settings.active||(i.status=n.RUNNING,i.active=!0,e.emit(o.RESUME,this,t)),this},sleep:function(t){var e=this.settings,i=this.getStatus();return i!==n.CREATING&&i!==n.RUNNING?console.warn("Cannot sleep non-running Scene",e.key):(e.status=n.SLEEPING,e.active=!1,e.visible=!1,this.events.emit(o.SLEEP,this,t)),this},wake:function(t){var e=this.events,i=this.settings;return i.status=n.RUNNING,i.active=!0,i.visible=!0,e.emit(o.WAKE,this,t),i.isTransition&&e.emit(o.TRANSITION_WAKE,i.transitionFrom,i.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var t=this.settings.status;return t>n.PENDING&&t<=n.RUNNING},isSleeping:function(){return this.settings.status===n.SLEEPING},isActive:function(){return this.settings.status===n.RUNNING},isPaused:function(){return this.settings.status===n.PAUSED},isTransitioning:function(){return this.settings.isTransition||null!==this.scenePlugin._target},isTransitionOut:function(){return null!==this.scenePlugin._target&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){var e=this.events,i=this.settings;t&&(i.data=t),i.status=n.START,i.active=!0,i.visible=!0,e.emit(o.START,this),e.emit(o.READY,this,t)},shutdown:function(t){var e=this.events,i=this.settings;e.off(o.TRANSITION_INIT),e.off(o.TRANSITION_START),e.off(o.TRANSITION_COMPLETE),e.off(o.TRANSITION_OUT),i.status=n.SHUTDOWN,i.active=!1,i.visible=!1,e.emit(o.SHUTDOWN,this,t)},destroy:function(){var t=this.events,e=this.settings;e.status=n.DESTROYED,e.active=!1,e.visible=!1,t.emit(o.DESTROY,this),t.removeAllListeners();for(var i=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],s=0;s{t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},31803:t=>{t.exports="addedtoscene"},94817:t=>{t.exports="boot"},28977:t=>{t.exports="create"},91959:t=>{t.exports="destroy"},363:t=>{t.exports="pause"},15643:t=>{t.exports="postupdate"},17058:t=>{t.exports="prerender"},77125:t=>{t.exports="preupdate"},76018:t=>{t.exports="ready"},28620:t=>{t.exports="removedfromscene"},41538:t=>{t.exports="render"},34268:t=>{t.exports="resume"},2342:t=>{t.exports="shutdown"},96541:t=>{t.exports="sleep"},74244:t=>{t.exports="start"},17046:t=>{t.exports="transitioncomplete"},13637:t=>{t.exports="transitioninit"},14733:t=>{t.exports="transitionout"},33899:t=>{t.exports="transitionstart"},52418:t=>{t.exports="transitionwake"},31735:t=>{t.exports="update"},8470:t=>{t.exports="wake"},7599:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(31803),BOOT:i(94817),CREATE:i(28977),DESTROY:i(91959),PAUSE:i(363),POST_UPDATE:i(15643),PRE_RENDER:i(17058),PRE_UPDATE:i(77125),READY:i(76018),REMOVED_FROM_SCENE:i(28620),RENDER:i(41538),RESUME:i(34268),SHUTDOWN:i(2342),SLEEP:i(96541),START:i(74244),TRANSITION_COMPLETE:i(17046),TRANSITION_INIT:i(13637),TRANSITION_OUT:i(14733),TRANSITION_START:i(33899),TRANSITION_WAKE:i(52418),UPDATE:i(31735),WAKE:i(8470)}},20436:(t,e,i)=>{var s=i(92980),n=i(98611),r={Events:i(7599),GetPhysicsPlugins:i(47736),GetScenePlugins:i(91088),SceneManager:i(13553),ScenePlugin:i(64051),Settings:i(36765),Systems:i(63946)};r=n(!1,r,s),t.exports=r},25798:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(76038),o=i(98611),a=i(72283),h=new s({Extends:n,initialize:function(t,e,i){n.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=o(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),!1):(t=o(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=o(!0,this.markers[t.name],t),!0):(console.warn("Audio Marker: "+t.name+" missing in Sound: "+this.key),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return console.warn("Marker: "+t+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=o(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop,this.pan=this.currentConfig.pan},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:a,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e},destroy:function(){this.pendingRemove||(this.emit(r.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});t.exports=h},12486:(t,e,i)=>{var s=i(56694),n=i(32742),r=i(6659),o=i(76038),a=i(97081),h=i(72283),l=i(71608),u=i(51463),c=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.jsonCache=t.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,t.events.on(a.BLUR,this.onGameBlur,this),t.events.on(a.FOCUS,this.onGameFocus,this),t.events.on(a.PRE_STEP,this.update,this),t.events.once(a.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var s in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(s)){var r=n(e),o=i.spritemap[s];r.loop=!!o.hasOwnProperty("loop")&&o.loop,i.addMarker({name:s,start:o.start,duration:o.end-o.start,config:r})}return i},get:function(t){return u(this.sounds,"key",t)},getAll:function(t){return t?l(this.sounds,"key",t):l(this.sounds)},getAllPlaying:function(){return l(this.sounds,"isPlaying",!0)},play:function(t,e){var i=this.add(t);return i.once(o.COMPLETE,i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var s=this.addAudioSprite(t);return s.once(o.COMPLETE,s.destroy,s),s.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeAll:function(){this.sounds.forEach((function(t){t.destroy()})),this.sounds.length=0},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var s=this.sounds[i];s.key===t&&(s.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound((function(t){t.pause()})),this.emit(o.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound((function(t){t.resume()})),this.emit(o.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound((function(t){t.stop()})),this.emit(o.STOP_ALL,this)},stopByKey:function(t){var e=0;return this.getAll(t).forEach((function(t){t.stop()&&e++})),e},unlock:h,onBlur:h,onFocus:h,onGameBlur:function(){this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.pauseOnBlur&&this.onFocus()},update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(o.UNLOCKED,this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach((function(i){i.update(t,e)}))},destroy:function(){this.game.events.off(a.BLUR,this.onGameBlur,this),this.game.events.off(a.FOCUS,this.onGameFocus,this),this.game.events.off(a.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach((function(s,n){s&&!s.pendingRemove&&t.call(e||i,s,n,i.sounds)}))},setRate:function(t){return this.rate=t,this},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound((function(t){t.calculateRate()})),this.emit(o.GLOBAL_RATE,this,t)}},setDetune:function(t){return this.detune=t,this},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound((function(t){t.calculateRate()})),this.emit(o.GLOBAL_DETUNE,this,t)}}});t.exports=c},84191:(t,e,i)=>{var s=i(27622),n=i(17546),r=i(55491),o={create:function(t){var e=t.config.audio,i=t.device.audio;return e.noAudio||!i.webAudio&&!i.audioData?new n(t):i.webAudio&&!e.disableWebAudio?new r(t):new s(t)}};t.exports=o},77578:t=>{t.exports="complete"},19679:t=>{t.exports="decodedall"},56951:t=>{t.exports="decoded"},16436:t=>{t.exports="destroy"},55154:t=>{t.exports="detune"},57818:t=>{t.exports="detune"},57890:t=>{t.exports="mute"},83022:t=>{t.exports="rate"},99170:t=>{t.exports="volume"},64289:t=>{t.exports="looped"},67214:t=>{t.exports="loop"},53128:t=>{t.exports="mute"},73078:t=>{t.exports="pan"},76763:t=>{t.exports="pauseall"},88426:t=>{t.exports="pause"},13765:t=>{t.exports="play"},80291:t=>{t.exports="rate"},11124:t=>{t.exports="resumeall"},55382:t=>{t.exports="resume"},71157:t=>{t.exports="seek"},31776:t=>{t.exports="stopall"},39450:t=>{t.exports="stop"},21939:t=>{t.exports="unlocked"},33019:t=>{t.exports="volume"},76038:(t,e,i)=>{t.exports={COMPLETE:i(77578),DECODED:i(56951),DECODED_ALL:i(19679),DESTROY:i(16436),DETUNE:i(55154),GLOBAL_DETUNE:i(57818),GLOBAL_MUTE:i(57890),GLOBAL_RATE:i(83022),GLOBAL_VOLUME:i(99170),LOOP:i(67214),LOOPED:i(64289),MUTE:i(53128),PAN:i(73078),PAUSE_ALL:i(76763),PAUSE:i(88426),PLAY:i(13765),RATE:i(80291),RESUME_ALL:i(11124),RESUME:i(55382),SEEK:i(71157),STOP_ALL:i(31776),STOP:i(39450),UNLOCKED:i(21939),VOLUME:i(33019)}},34350:(t,e,i)=>{var s=i(25798),n=i(56694),r=i(76038),o=i(82897),a=new n({Extends:s,initialize:function(t,e,i){if(void 0===i&&(i={}),this.tags=t.game.cache.audio.get(e),!this.tags)throw new Error('No cached audio asset with key "'+e);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,s.call(this,t,e,i)},play:function(t,e){return!this.manager.isLocked(this,"play",[t,e])&&(!!s.prototype.play.call(this,t,e)&&(!!this.pickAndPlayAudioTag()&&(this.emit(r.PLAY,this),!0)))},pause:function(){return!this.manager.isLocked(this,"pause")&&(!(this.startTime>0)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(r.PAUSE,this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!s.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit(r.RESUME,this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!s.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(r.STOP,this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=i-this.manager.loopEndOffset?(this.audio.currentTime=e+Math.max(0,s-i),s=this.audio.currentTime):s=i)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(r.COMPLETE,this);this.previousTime=s}},destroy:function(){s.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=o(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){s.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.updateMute(),this.emit(r.MUTE,this,t))}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.updateVolume(),this.emit(r.VOLUME,this,t))}},setVolume:function(t){return this.volume=t,this},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,r.RATE,t)||(this.calculateRate(),this.emit(r.RATE,this,t))}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,r.DETUNE,t)||(this.calculateRate(),this.emit(r.DETUNE,this,t))}},setDetune:function(t){return this.detune=t,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit(r.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit(r.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this},pan:{get:function(){return this.currentConfig.pan},set:function(t){this.currentConfig.pan=t,this.emit(r.PAN,this,t)}},setPan:function(t){return this.pan=t,this}});t.exports=a},27622:(t,e,i)=>{var s=i(12486),n=i(56694),r=i(76038),o=i(34350),a=new n({Extends:s,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,s.call(this,t)},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},unlock:function(){this.locked=!1;var t=this;if(this.game.cache.audio.entries.each((function(e,i){for(var s=0;s{t.exports={SoundManagerCreator:i(84191),Events:i(76038),BaseSound:i(25798),BaseSoundManager:i(12486),WebAudioSound:i(96008),WebAudioSoundManager:i(55491),HTML5AudioSound:i(34350),HTML5AudioSoundManager:i(27622),NoAudioSound:i(38662),NoAudioSoundManager:i(17546)}},38662:(t,e,i)=>{var s=i(25798),n=i(56694),r=i(6659),o=i(98611),a=i(72283),h=function(){return!1},l=function(){return null},u=function(){return this},c=new n({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.pan=0,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:h,updateMarker:h,removeMarker:l,play:h,pause:h,resume:h,stop:h,setMute:u,setVolume:u,setRate:u,setDetune:u,setSeek:u,setLoop:u,setPan:u,applyConfig:l,resetConfig:l,update:a,calculateRate:l,destroy:function(){s.prototype.destroy.call(this)}});t.exports=c},17546:(t,e,i)=>{var s=i(12486),n=i(56694),r=i(6659),o=i(38662),a=i(72283),h=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},get:function(t){return s.prototype.get.call(this,t)},getAll:function(t){return s.prototype.getAll.call(this,t)},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return s.prototype.remove.call(this,t)},removeAll:function(){return s.prototype.removeAll.call(this)},removeByKey:function(t){return s.prototype.removeByKey.call(this,t)},stopByKey:function(t){return s.prototype.stopByKey.call(this,t)},onBlur:a,onFocus:a,onGameBlur:a,onGameFocus:a,pauseAll:a,resumeAll:a,stopAll:a,update:a,setRate:a,setDetune:a,setMute:a,setVolume:a,unlock:a,forEachActiveSound:function(t,e){s.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){s.prototype.destroy.call(this)}});t.exports=h},96008:(t,e,i)=>{var s=i(25798),n=i(56694),r=i(76038),o=new n({Extends:s,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('Audio key "'+e+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.pannerNode=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),t.context.createStereoPanner?(this.pannerNode=t.context.createStereoPanner(),this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(t.destination)):this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,s.call(this,t,e,i)},play:function(t,e){return!!s.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime{var s=i(82329),n=i(12486),r=i(56694),o=i(76038),a=i(97081),h=i(96008),l=new r({Extends:n,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),n.call(this,t),this.locked&&t.isBooted?this.unlock():t.events.once(a.BOOT,this.unlock,this)},createAudioContext:function(t){var e=t.config.audio;return e.context?(e.context.resume(),e.context):window.hasOwnProperty("AudioContext")?new AudioContext:window.hasOwnProperty("webkitAudioContext")?new window.webkitAudioContext:void 0},setAudioContext:function(t){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=t,this.masterMuteNode=t.createGain(),this.masterVolumeNode=t.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(t.destination),this.destination=this.masterMuteNode,this},add:function(t,e){var i=new h(this,t,e);return this.sounds.push(i),i},decodeAudio:function(t,e){var i;i=Array.isArray(t)?t:[{key:t,data:e}];for(var n=this.game.cache.audio,r=i.length,a=0;a{var s=i(59959),n=i(56694),r=i(72283),o=i(17922),a=new n({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=r,this.removeCallback=r,this._sortKey=""},add:function(t,e){return e?s.Add(this.list,t):s.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?s.AddAt(this.list,t,e):s.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),o(this.list,e),this):this},getByName:function(t){return s.GetFirst(this.list,"name",t)},getRandom:function(t,e){return s.GetRandom(this.list,t,e)},getFirst:function(t,e,i,n){return s.GetFirst(this.list,t,e,i,n)},getAll:function(t,e,i,n){return s.GetAll(this.list,t,e,i,n)},count:function(t,e){return s.CountAllMatching(this.list,t,e)},swap:function(t,e){s.Swap(this.list,t,e)},moveTo:function(t,e){return s.MoveTo(this.list,t,e)},moveAbove:function(t,e){return s.MoveAbove(this.list,t,e)},moveBelow:function(t,e){return s.MoveBelow(this.list,t,e)},remove:function(t,e){return e?s.Remove(this.list,t):s.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?s.RemoveAt(this.list,t):s.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?s.RemoveBetween(this.list,t,e):s.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return s.BringToTop(this.list,t)},sendToBack:function(t){return s.SendToBack(this.list,t)},moveUp:function(t){return s.MoveUp(this.list,t),t},moveDown:function(t){return s.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return s.Shuffle(this.list),this},replace:function(t,e){return s.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,n){return s.SetAll(this.list,t,e,i,n),this},each:function(t,e){for(var i=[null],s=2;s0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=a},33885:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e{var s=i(56694),n=i(6659),r=i(36716),o=new s({Extends:n,initialize:function(){n.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(t){return this._active.indexOf(t)>-1},isPending:function(t){return this._toProcess>0&&this._pending.indexOf(t)>-1},isDestroying:function(t){return this._destroy.indexOf(t)>-1},add:function(t){return this.checkQueue&&this.isActive()&&!this.isDestroying()||this.isPending()||(this._pending.push(t),this._toProcess++),t},remove:function(t){if(this.isPending(t)){var e=this._pending,i=e.indexOf(t);-1!==i&&e.splice(i,1)}else this.isActive(t)&&(this._destroy.push(t),this._toProcess++);return t},removeAll:function(){for(var t=this._active,e=this._destroy,i=t.length;i--;)e.push(t[i]),this._toProcess++;return this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,s=this._active;for(t=0;t{var s=i(53466);function n(t){if(!(this instanceof n))return new n(t,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function r(t,e,i){if(!i)return e.indexOf(t);for(var s=0;s=t.minX&&e.maxY>=t.minY}function v(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,e,i,n,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=n||(o=e+Math.ceil((i-e)/n/2)*n,s(t,o,e,i,r),a.push(e,o,o,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],s=this.toBBox;if(!f(t,e))return i;for(var n,r,o,a,h=[];e;){for(n=0,r=e.children.length;n=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},_split:function(t,e){var i=t[e],s=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,s);var r=this._chooseSplitIndex(i,n,s),a=v(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=v([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var s,n,r,o,h,l,u,d,p,f,v,g,m,y;for(l=u=1/0,s=e;s<=i-e;s++)n=a(t,0,s,this.toBBox),r=a(t,s,i,this.toBBox),p=n,f=r,v=void 0,g=void 0,m=void 0,y=void 0,v=Math.max(p.minX,f.minX),g=Math.max(p.minY,f.minY),m=Math.min(p.maxX,f.maxX),y=Math.min(p.maxY,f.maxY),o=Math.max(0,m-v)*Math.max(0,y-g),h=c(n)+c(r),o=e;n--)r=t.children[n],h(u,t.leaf?o(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var s=i;s>=0;s--)h(e[s],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=n},58403:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){if(this.entries=[],Array.isArray(t))for(var e=0;e-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new s;return t.entries.forEach((function(t){e.set(t)})),this.entries.forEach((function(t){e.set(t)})),e},intersect:function(t){var e=new s;return this.entries.forEach((function(i){t.contains(i)&&e.set(i)})),e},difference:function(t){var e=new s;return this.entries.forEach((function(i){t.contains(i)||e.set(i)})),e},size:{get:function(){return this.entries.length},set:function(t){return t{var s=i(82897),n=i(56694),r=i(84314),o=i(93736),a=new n({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=null),this._width=t,this._height=e,this._parent=s,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=s(t,0,this.maxWidth),this.minHeight=s(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=s(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=s(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=s(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=s(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var s=this.snapTo,n=0===e?1:t/e;return i&&this.aspectRatio>n||!i&&this.aspectRatio0&&(t=(e=r(e,s.y))*this.aspectRatio)):(i&&this.aspectRation)&&(t=(e=r(e,s.y))*this.aspectRatio,s.x>0&&(e=(t=r(t,s.x))*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(t){t&&t.style&&(t.style.width=this._width+"px",t.style.height=this._height+"px")},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});a.NONE=0,a.WIDTH_CONTROLS_HEIGHT=1,a.HEIGHT_CONTROLS_WIDTH=2,a.FIT=3,a.ENVELOP=4,t.exports=a},94160:t=>{t.exports="add"},95393:t=>{t.exports="remove"},36716:(t,e,i)=>{t.exports={PROCESS_QUEUE_ADD:i(94160),PROCESS_QUEUE_REMOVE:i(95393)}},20010:(t,e,i)=>{t.exports={Events:i(36716),List:i(71207),Map:i(33885),ProcessQueue:i(74623),RTree:i(68687),Set:i(58403),Size:i(90881)}},17487:(t,e,i)=>{var s=i(56694),n=i(82897),r=i(27119),o=i(86459),a=i(28621),h=i(31673),l=new s({Extends:h,initialize:function(t,e,i,s,n){h.call(this,t,e,i,s,n),this.add("__BASE",0,0,0,s,n),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=s,this.height=n,this.imageData=this.context.getImageData(0,0,s,n),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===o.WEBGL&&this.refresh(),this},draw:function(t,e,i){return this.context.drawImage(i,t,e),this.update()},drawFrame:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0);var n=this.manager.getFrame(t,e);if(n){var r=n.canvasData,o=n.cutWidth,a=n.cutHeight,h=n.source.resolution;return this.context.drawImage(n.source.image,r.x,r.y,o,a,i,s,o/h,a/h),this.update()}return this},setPixel:function(t,e,i,s,n,r){if(void 0===r&&(r=255),t=Math.abs(Math.floor(t)),e=Math.abs(Math.floor(e)),this.getIndex(t,e)>-1){var o=this.context.getImageData(t,e,1,1);o.data[0]=i,o.data[1]=s,o.data[2]=n,o.data[3]=r,this.context.putImageData(o,t,e)}return this},putData:function(t,e,i,s,n,r,o){return void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=t.width),void 0===o&&(o=t.height),this.context.putImageData(t,e,i,s,n,r,o),this},getData:function(t,e,i,s){return t=n(Math.floor(t),0,this.width-1),e=n(Math.floor(e),0,this.height-1),i=n(i,1,this.width-t),s=n(s,1,this.height-e),this.context.getImageData(t,e,i,s)},getPixel:function(t,e,i){i||(i=new r);var s=this.getIndex(t,e);if(s>-1){var n=this.data,o=n[s+0],a=n[s+1],h=n[s+2],l=n[s+3];i.setTo(o,a,h,l)}return i},getPixels:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===s&&(s=i),t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e));for(var o=n(t,0,this.width),a=n(t+i,0,this.width),h=n(e,0,this.height),l=n(e+s,0,this.height),u=new r,c=[],d=h;d{var s=i(95723),n=i(51052),r=i(61068),o=i(56694),a=i(86459),h=i(82047),l=i(72632),u=i(65641),c=i(37410),d=i(31673),p=i(75512),f=new o({Extends:d,initialize:function(t,e,i,s){void 0===i&&(i=256),void 0===s&&(s=256),this.type="DynamicTexture";var o=t.game.renderer,h=o&&o.type===a.CANVAS,l=h?r.create2D(this,i,s):[this];d.call(this,t,e,l,i,s),this.add("__BASE",0,0,0,i,s),this.renderer=o,this.isDrawing=!1,this.canvas=h?l:null,this.context=h?l.getContext("2d"):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new n(0,0,i,s).setScene(t.game.scene.systemScene,!1),this.renderTarget=h?null:new c(o,i,s,1,0,!1),this.pipeline=h?null:o.pipelines.get(u.SINGLE_PIPELINE),this.setSize(i,s)},setSize:function(t,e){void 0===e&&(e=t);var i=this.get(),s=i.source;if(t!==this.width||e!==this.height){this.canvas&&(this.canvas.width=t,this.canvas.height=e);var n=this.renderTarget;n&&(n.resize(t,e),i.glTexture=n.texture,s.isRenderTexture=!0,s.isGLTexture=!0,s.glTexture=n.texture,s.glTexture.flipY=!0),this.camera.setSize(t,e),s.width=t,s.height=e,i.setSize(t,e),this.width=t,this.height=e}else{var r=this.getSourceImage();i.cutX+t>r.width&&(t=r.width-i.cutX),i.cutY+e>r.height&&(e=r.height-i.cutY),i.setSize(t,e,i.cutX,i.cutY)}return this},setIsSpriteTexture:function(t){return this.isSpriteTexture=t,this},fill:function(t,e,i,s,n,r){var o=this.camera,a=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=this.width),void 0===r&&(r=this.height);var h=t>>16&255,l=t>>8&255,u=255&t,c=this.renderTarget;if(o.preRender(),c){c.bind(!0);var d=this.pipeline.manager.set(this.pipeline),f=a.width/c.width,v=a.height/c.height;d.drawFillRect(i*f,s*v,n*f,r*v,p.getTintFromFloats(u/255,l/255,h/255,1),e),c.unbind(!0)}else{var g=this.context;a.setContext(g),g.globalCompositeOperation="source-over",g.fillStyle="rgba("+h+","+l+","+u+","+e+")",g.fillRect(i,s,n,r),a.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var t=this.context,e=this.renderTarget;e?e.clear():t&&(t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,this.width,this.height),t.restore()),this.dirty=!1}return this},stamp:function(t,e,i,s,n){void 0===i&&(i=0),void 0===s&&(s=0);var r=l(n,"alpha",1),o=l(n,"tint",16777215),a=l(n,"angle",0),h=l(n,"rotation",0),u=l(n,"scale",1),c=l(n,"scaleX",u),d=l(n,"scaleY",u),p=l(n,"originX",.5),f=l(n,"originY",.5),v=l(n,"blendMode",0),g=l(n,"erase",!1),m=this.manager.resetStamp(r,o);return m.setAngle(0),0!==a?m.setAngle(a):0!==h&&m.setRotation(h),m.setScale(c,d),m.setTexture(t,e),m.setOrigin(p,f),m.setBlendMode(v),g&&(this._eraseMode=!0),this.draw(m,i,s),g&&(this._eraseMode=!1),this},erase:function(t,e,i){return this._eraseMode=!0,this.draw(t,e,i),this._eraseMode=!1,this},draw:function(t,e,i,s,n){return this.beginDraw(),this.batchDraw(t,e,i,s,n),this.endDraw(),this},drawFrame:function(t,e,i,s,n,r){return this.beginDraw(),this.batchDrawFrame(t,e,i,s,n,r),this.endDraw(),this},repeat:function(t,e,i,s,n,r,o,a,l){if(void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=this.width),void 0===r&&(r=this.height),void 0===o&&(o=1),void 0===a&&(a=16777215),void 0===l&&(l=!1),!(e=t instanceof h?t:this.manager.getFrame(t,e)))return this;var u=this.manager.resetStamp(o,a);u.setFrame(e),u.setOrigin(0);var c=e.width,d=e.height;n=Math.floor(n),r=Math.floor(r);var p=Math.ceil(n/c),f=Math.ceil(r/d),v=p*c-n,g=f*d-r;v>0&&(v=c-v),g>0&&(g=d-g),i<0&&(p+=Math.ceil(Math.abs(i)/c)),s<0&&(f+=Math.ceil(Math.abs(s)/d));var m=i,y=s,x=!1,T=this.manager.stampCrop.setTo(0,0,c,d);l||this.beginDraw();for(var w=0;w0&&b===p-1&&(x=!0,T.width=v),g>0&&w===f-1&&(x=!0,T.height=g),x&&u.setCrop(T),this.batchGameObject(u,m,y),u.isCropped=!1,T.setTo(0,0,c,d)),m+=c;m=i,y+=d}return l||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var t=this.camera,e=this.renderer,i=this.renderTarget;t.preRender(),i?e.beginCapture(i.width,i.height):e.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(t,e,i,s,n){return Array.isArray(t)||(t=[t]),this.batchList(t,e,i,s,n),this},batchDrawFrame:function(t,e,i,s,n,r){void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=1),void 0===r&&(r=16777215);var o=this.manager.getFrame(t,e);return o&&(this.renderTarget?this.pipeline.batchTextureFrame(o,i,s,r,n,this.camera.matrix,null):this.batchTextureFrame(o,i,s,n,r)),this},endDraw:function(t){if(void 0===t&&(t=this._eraseMode),this.isDrawing){var e=this.renderer,i=this.renderTarget;if(i){var s=e.endCapture();e.pipelines.setUtility().blitFrame(s,i,1,!1,!1,t,this.isSpriteTexture),e.resetScissor(),e.resetViewport()}else e.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(t,e,i,s,n){var r=t.length;if(0!==r)for(var o=0;o0&&a.height>0&&o.drawImage(h,a.x,a.y,a.width,a.height,e,i,a.width,a.height),o.restore()}},snapshotArea:function(t,e,i,s,n,r,o){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,n,!1,t,e,i,s,r,o):this.renderer.snapshotCanvas(this.canvas,n,!1,t,e,i,s,r,o),this},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.width,this.height,t,e,i)},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i,"pixel")},renderWebGL:function(t,e,i,s){var n=this.manager.resetStamp();n.setTexture(this),n.setOrigin(0),n.renderWebGL(t,n,i,s)},renderCanvas:function(){},preDestroy:function(){r.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.stamp.destroy(),this.canvas=null,this.context=null,this.renderer=null,this.scene=null}});t.exports=f},82047:(t,e,i)=>{var s=i(56694),n=i(82897),r=i(98611),o=new s({initialize:function(t,e,i,s,n,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(r,o,s,n)},setSize:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0),this.cutX=i,this.cutY=s,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var n=this.data,r=n.cut;r.x=i,r.y=s,r.w=t,r.h=e,r.r=i+t,r.b=s+e,n.sourceSize.w=t,n.sourceSize.h=e,n.spriteSourceSize.w=t,n.spriteSourceSize.h=e,n.radius=.5*Math.sqrt(t*t+e*e);var o=n.drawImage;return o.x=i,o.y=s,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,s,n,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=s,a.w=n,a.h=r,a.r=i+n,a.b=s+r,this.x=i,this.y=s,this.width=n,this.height=r,this.halfWidth=.5*n,this.halfHeight=.5*r,this.centerX=Math.floor(n/2),this.centerY=Math.floor(r/2),this.updateUVs()},setCropUVs:function(t,e,i,s,r,o,a){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,p=this.realHeight,f=h+(e=n(e,0,d)),v=l+(i=n(i,0,p)),g=s=n(s,0,d-e),m=r=n(r,0,p-i),y=this.data;if(y.trim){var x=y.spriteSourceSize,T=e+(s=n(s,0,u-e)),w=i+(r=n(r,0,c-i));if(!(x.rT||x.y>w)){var b=Math.max(x.x,e),S=Math.max(x.y,i),E=Math.min(x.r,T)-b,A=Math.min(x.b,w)-S;g=E,m=A,f=o?h+(u-(b-x.x)-E):h+(b-x.x),v=a?l+(c-(S-x.y)-A):l+(S-x.y),e=b,i=S,s=E,r=A}else f=0,v=0,g=0,m=0}else o&&(f=h+(u-e-s)),a&&(v=l+(c-i-r));var _=this.source.width,C=this.source.height;return t.u0=Math.max(0,f/_),t.v0=Math.max(0,v/C),t.u1=Math.min(1,(f+g)/_),t.v1=Math.min(1,(v+m)/C),t.x=e,t.y=i,t.cx=f,t.cy=v,t.cw=g,t.ch=m,t.width=s,t.height=r,t.flipX=o,t.flipY=a,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,s,n,r){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=s,this.u1=n,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,s=this.cutHeight,n=this.data.drawImage;n.width=i,n.height=s;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=e/o,this.u1=(t+i)/r,this.v1=(e+s)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new o(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=r(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=o},31673:(t,e,i)=>{var s=i(56694),n=i(82047),r=i(32547),o='Texture "%s" has no frame "%s"',a=new s({initialize:function(t,e,i,s,n){Array.isArray(i)||(i=[i]),this.manager=t,this.key=e,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var o=0;o{var s=i(61068),n=i(17487),r=i(56694),o=i(27119),a=i(86459),h=i(845),l=i(6659),u=i(38203),c=i(82047),d=i(97081),p=i(52780),f=i(10850),v=i(1539),g=i(42911),m=i(69150),y=i(74118),x=i(31673),T=new r({Extends:l,initialize:function(t){l.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=s.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new y,this.silentWarnings=!1,t.events.once(d.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(u.LOAD,this.updatePending,this),this.on(u.ERROR,this.updatePending,this);var t=this.game.config;this.addBase64("__DEFAULT",t.defaultImage),this.addBase64("__MISSING",t.missingImage),this.addBase64("__WHITE",t.whiteImage),this.game.events.once(d.DESTROY,this.destroy,this)},updatePending:function(){this._pending--,0===this._pending&&(this.off(u.LOAD),this.off(u.ERROR),this.emit(u.READY),this.stamp=new v(this.game.scene.systemScene).setOrigin(0))},checkKey:function(t){return!this.exists(t)||(this.silentWarnings||console.error("Texture key already in use: "+t),!1)},remove:function(t){if("string"==typeof t){if(!this.exists(t))return this.silentWarnings||console.warn("No texture found matching key: "+t),this;t=this.get(t)}return this.list.hasOwnProperty(t.key)&&(t.destroy(),this.emit(u.REMOVE,t.key),this.emit(u.REMOVE_KEY+t.key)),this},removeKey:function(t){return this.list.hasOwnProperty(t)&&delete this.list[t],this},addBase64:function(t,e){if(this.checkKey(t)){var i=this,s=new Image;s.onerror=function(){i.emit(u.ERROR,t)},s.onload=function(){var e=i.create(t,s);m.Image(e,0),i.emit(u.ADD,t,e),i.emit(u.ADD_KEY+t,e),i.emit(u.LOAD,t,e)},s.src=e}return this},getBase64:function(t,e,i,n){void 0===i&&(i="image/png"),void 0===n&&(n=.92);var r="",o=this.getFrame(t,e);if(o&&(o.source.isRenderTexture||o.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(o){var a=o.canvasData,h=s.create2D(this,a.width,a.height),l=h.getContext("2d");a.width>0&&a.height>0&&l.drawImage(o.source.image,a.x,a.y,a.width,a.height,0,0,a.width,a.height),r=h.toDataURL(i,n),s.remove(h)}return r},addImage:function(t,e,i){var s=null;return this.checkKey(t)&&(s=this.create(t,e),m.Image(s,0),i&&s.setDataSource(i),this.emit(u.ADD,t,s),this.emit(u.ADD_KEY+t,s)),s},addGLTexture:function(t,e,i,s){var n=null;return this.checkKey(t)&&(void 0===i&&(i=e.width),void 0===s&&(s=e.height),(n=this.create(t,e,i,s)).add("__BASE",0,0,0,i,s),this.emit(u.ADD,t,n),this.emit(u.ADD_KEY+t,n)),n},addCompressedTexture:function(t,e,i){var s=null;if(this.checkKey(t)){if((s=this.create(t,e)).add("__BASE",0,0,0,e.width,e.height),i)if(Array.isArray(i))for(var n=0;n=r.x&&t=r.y&&e=r.x&&t=r.y&&e{var s=i(61068),n=i(56694),r=i(28621),o=i(27394),a=new n({initialize:function(t,e,i,s,n){void 0===n&&(n=!1);var a=t.manager.game;this.renderer=a.renderer,this.texture=t,this.source=e,this.image=e.compressed?null:e,this.compressionAlgorithm=e.compressed?e.format:null,this.resolution=1,this.width=i||e.naturalWidth||e.videoWidth||e.width||0,this.height=s||e.naturalHeight||e.videoHeight||e.height||0,this.scaleMode=o.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&e instanceof HTMLVideoElement,this.isRenderTexture="RenderTexture"===e.type||"DynamicTexture"===e.type,this.isGLTexture=window.hasOwnProperty("WebGLTexture")&&e instanceof WebGLTexture,this.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.flipY=n,this.init(a)},init:function(t){var e=this.renderer;if(e){var i=this.source;if(e.gl){var s=this.image,n=this.flipY,r=this.width,o=this.height,a=this.scaleMode;this.isCanvas?this.glTexture=e.createCanvasTexture(s,!1,n):this.isVideo?this.glTexture=e.createVideoTexture(s,!1,n):this.isRenderTexture?this.glTexture=e.createTextureFromSource(null,r,o,a):this.isGLTexture?this.glTexture=i:this.compressionAlgorithm?this.glTexture=e.createTextureFromSource(i):this.glTexture=e.createTextureFromSource(s,r,o,a)}else this.isRenderTexture&&(this.image=i.canvas)}t.config.antialias||this.setFilter(1)},setFilter:function(t){this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,t),this.scaleMode=t},setFlipY:function(t){return void 0===t&&(t=!0),this.flipY=t,this},update:function(){var t=this.renderer,e=this.image,i=this.flipY,s=t.gl;s&&this.isCanvas?this.glTexture=t.updateCanvasTexture(e,this.glTexture,i):s&&this.isVideo&&(this.glTexture=t.updateVideoTexture(e,this.glTexture,i))},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture,!0),this.isCanvas&&s.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});t.exports=a},65154:t=>{t.exports={LINEAR:0,NEAREST:1}},49644:t=>{t.exports="addtexture"},29569:t=>{t.exports="addtexture-"},60079:t=>{t.exports="onerror"},72665:t=>{t.exports="onload"},93006:t=>{t.exports="ready"},69018:t=>{t.exports="removetexture"},85549:t=>{t.exports="removetexture-"},38203:(t,e,i)=>{t.exports={ADD:i(49644),ADD_KEY:i(29569),ERROR:i(60079),LOAD:i(72665),READY:i(93006),REMOVE:i(69018),REMOVE_KEY:i(85549)}},87499:(t,e,i)=>{var s=i(98611),n=i(65154),r={CanvasTexture:i(17487),DynamicTexture:i(845),Events:i(38203),FilterMode:n,Frame:i(82047),Parsers:i(69150),Texture:i(31673),TextureManager:i(6237),TextureSource:i(32547)};r=s(!1,r,n),t.exports=r},35082:t=>{t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var n,r=i.getElementsByTagName("SubTexture"),o=0;o{t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},21560:t=>{t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},64423:(t,e,i)=>{var s=i(32742);t.exports=function(t,e,i){if(i.frames||i.textures){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var r,o=Array.isArray(i.textures)?i.textures[e].frames:i.frames,a=0;a{var s=i(32742);t.exports=function(t,e,i){if(i.frames){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);var r,o=i.frames;for(var a in o)if(o.hasOwnProperty(a)){var h=o[a];if(r=t.add(a,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h)){h.trimmed&&r.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(r.rotated=!0,r.updateUVsInverted());var l=h.anchor||h.pivot;l&&(r.customPivot=!0,r.pivotX=l.x,r.pivotY=l.y),r.customData=s(h)}else console.warn("Invalid atlas json, frame already exists: "+a)}for(var u in i)"frames"!==u&&(Array.isArray(i[u])?t.customData[u]=i[u].slice(0):t.customData[u]=i[u]);return t}console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object")}},67409:t=>{t.exports=function(t){var e,i=[171,75,84,88,32,49,49,187,13,10,26,10],s=new Uint8Array(t,0,12);for(e=0;e>1),v=Math.max(1,v>>1),p+=g}return{mipmaps:d,width:h,height:l,internalFormat:a,compressed:!0,generateMipmap:!1}}console.warn("KTXParser - Only compressed formats supported")}},24904:t=>{function e(t,e,i,s,n,r,o){return void 0===o&&(o=16),Math.floor((t+i)/n)*Math.floor((e+s)/r)*o}function i(t,e){return(t=Math.max(t,16))*(e=Math.max(e,8))/4}function s(t,e){return(t=Math.max(t,8))*(e=Math.max(e,8))/2}function n(t,i){return e(t,i,3,3,4,4,8)}function r(t,i){return e(t,i,3,3,4,4)}var o={0:{sizeFunc:i,glFormat:35841},1:{sizeFunc:i,glFormat:35843},2:{sizeFunc:s,glFormat:35840},3:{sizeFunc:s,glFormat:35842},6:{sizeFunc:n,glFormat:36196},7:{sizeFunc:n,glFormat:33776},8:{sizeFunc:r,glFormat:33777},9:{sizeFunc:r,glFormat:33778},11:{sizeFunc:r,glFormat:33779},22:{sizeFunc:n,glFormat:37492},23:{sizeFunc:r,glFormat:37496},24:{sizeFunc:n,glFormat:37494},25:{sizeFunc:n,glFormat:37488},26:{sizeFunc:r,glFormat:37490},27:{sizeFunc:r,glFormat:37808},28:{sizeFunc:function(t,i){return e(t,i,4,3,5,4)},glFormat:37809},29:{sizeFunc:function(t,i){return e(t,i,4,4,5,5)},glFormat:37810},30:{sizeFunc:function(t,i){return e(t,i,5,4,6,5)},glFormat:37811},31:{sizeFunc:function(t,i){return e(t,i,5,5,6,6)},glFormat:37812},32:{sizeFunc:function(t,i){return e(t,i,7,4,8,5)},glFormat:37813},33:{sizeFunc:function(t,i){return e(t,i,7,5,8,6)},glFormat:37814},34:{sizeFunc:function(t,i){return e(t,i,7,7,8,8)},glFormat:37815},35:{sizeFunc:function(t,i){return e(t,i,9,4,10,5)},glFormat:37816},36:{sizeFunc:function(t,i){return e(t,i,9,5,10,6)},glFormat:37817},37:{sizeFunc:function(t,i){return e(t,i,9,7,10,8)},glFormat:37818},38:{sizeFunc:function(t,i){return e(t,i,9,9,10,10)},glFormat:37819},39:{sizeFunc:function(t,i){return e(t,i,11,9,12,10)},glFormat:37820},40:{sizeFunc:function(t,i){return e(t,i,11,11,12,12)},glFormat:37821}};t.exports=function(t){for(var e=new Uint32Array(t,0,13),i=e[2],s=o[i].glFormat,n=o[i].sizeFunc,r=e[11],a=e[7],h=e[6],l=52+e[12],u=new Uint8Array(t,l),c=new Array(r),d=0,p=a,f=h,v=0;v>1),f=Math.max(1,f>>1),d+=g}return{mipmaps:c,width:a,height:h,internalFormat:s,compressed:!0,generateMipmap:!1}}},6143:(t,e,i)=>{var s=i(72632);t.exports=function(t,e,i,n,r,o,a){var h=s(a,"frameWidth",null),l=s(a,"frameHeight",h);if(null===h)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var u=t.source[e];t.add("__BASE",e,0,0,u.width,u.height);var c=s(a,"startFrame",0),d=s(a,"endFrame",-1),p=s(a,"margin",0),f=s(a,"spacing",0),v=Math.floor((r-p+f)/(h+f))*Math.floor((o-p+f)/(l+f));0===v&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",t.key),(c>v||c<-v)&&(c=0),c<0&&(c=v+c),(-1===d||d>v||dr&&(y=b-r),S>o&&(x=S-o),w>=c&&w<=d&&(t.add(T,e,i+g,n+m,h-y,l-x),T++),(g+=h+f)+h>r&&(g=p,m+=l+f)}return t}},20030:(t,e,i)=>{var s=i(72632);t.exports=function(t,e,i){var n=s(i,"frameWidth",null),r=s(i,"frameHeight",n);if(!n)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o=t.source[0];t.add("__BASE",0,0,0,o.width,o.height);var a,h=s(i,"startFrame",0),l=s(i,"endFrame",-1),u=s(i,"margin",0),c=s(i,"spacing",0),d=e.cutX,p=e.cutY,f=e.cutWidth,v=e.cutHeight,g=e.realWidth,m=e.realHeight,y=Math.floor((g-u+c)/(n+c)),x=Math.floor((m-u+c)/(r+c)),T=y*x,w=e.x,b=n-w,S=n-(g-f-w),E=e.y,A=r-E,_=r-(m-v-E);(h>T||h<-T)&&(h=0),h<0&&(h=T+h),-1!==l&&(T=h+(l+1));for(var C=u,M=u,R=0,P=e.sourceIndex,O=0;O{var e=0,i=function(t,i,s,n){var r=e-n.y-n.height;t.add(s,i,n.x,r,n.width,n.height)};t.exports=function(t,s,n){var r=t.source[s];t.add("__BASE",s,0,0,r.width,r.height),e=r.height;for(var o=n.split("\n"),a=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",l="",u={x:0,y:0,width:0,height:0},c=0;c{t.exports={AtlasXML:i(35082),Canvas:i(83332),Image:i(21560),JSONArray:i(64423),JSONHash:i(17264),KTXParser:i(67409),PVRParser:i(24904),SpriteSheet:i(6143),SpriteSheetFromAtlas:i(20030),UnityYAML:i(89187)}},93560:t=>{t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},97042:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s,n,r,o){(void 0===i||i<=0)&&(i=32),(void 0===s||s<=0)&&(s=32),void 0===n&&(n=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|s,this.imageMargin=0|n,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&t{var s=new(i(56694))({initialize:function(t){if(this.gids=[],void 0!==t)for(var e=0;e{var s=i(93560),n=i(16586),r=i(90715),o=i(89797);t.exports=function(t,e,i,a,h,l,u,c){void 0===i&&(i=32),void 0===a&&(a=32),void 0===h&&(h=10),void 0===l&&(l=10),void 0===c&&(c=!1);var d=null;if(Array.isArray(u))d=r(void 0!==e?e:"map",s.ARRAY_2D,u,i,a,c);else if(void 0!==e){var p=t.cache.tilemap.get(e);p?d=r(e,p.format,p.data,i,a,c):console.warn("No map data found for key "+e)}return null===d&&(d=new n({tileWidth:i,tileHeight:a,width:h,height:l})),new o(t,d)}},29633:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(12920),o=i(28699),a=i(66658),h=new s({Mixins:[n.Alpha,n.Flip,n.Visible],initialize:function(t,e,i,s,n,r,o,a){this.layer=t,this.index=e,this.x=i,this.y=s,this.width=n,this.height=r,this.right,this.bottom,this.baseWidth=void 0!==o?o:n,this.baseHeight=void 0!==a?a:r,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,this.collisionCallbackContext=this,this.tint=16777215,this.physics={}},containsPoint:function(t,e){return!(tthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=o(t.properties),this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldXY(this.x,this.y,void 0,t).x:this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldXY(this.x,this.y,void 0,t).y:this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new a),e.x=this.getLeft(t),e.y=this.getTop(t),e.width=this.getRight(t)-e.x,e.height=this.getBottom(t)-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},intersects:function(t,e,i,s){return!(i<=this.pixelX||s<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,s,n){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===s&&(s=t),void 0===n&&(n=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=s,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=s,n)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,s){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==s&&(this.baseHeight=s),this.updatePixelXY(),this},updatePixelXY:function(){var t=this.layer.orientation;if(t===r.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(t===r.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(t===r.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(t===r.HEXAGONAL){var e=this.layer.hexSideLength,i=(this.baseHeight-e)/2+e;this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*i}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||void 0!==this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=h},89797:(t,e,i)=>{var s=i(56694),n=i(75606),r=i(93560),o=i(72632),a=i(94990),h=i(46422),l=i(12920),u=i(52257),c=i(72677),d=i(13747),p=i(29633),f=i(5047),v=i(87177),g=i(47975),m=new s({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.renderOrder=e.renderOrder,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0,this.hexSideLength=e.hexSideLength;var i=this.orientation;this._convert={WorldToTileXY:f.GetWorldToTileXYFunction(i),WorldToTileX:f.GetWorldToTileXFunction(i),WorldToTileY:f.GetWorldToTileYFunction(i),TileToWorldXY:f.GetTileToWorldXYFunction(i),TileToWorldX:f.GetTileToWorldXFunction(i),TileToWorldY:f.GetTileToWorldYFunction(i),GetTileCorners:f.GetTileCornersFunction(i)}},setRenderOrder:function(t){var e=["right-down","left-down","right-up","left-up"];return"number"==typeof t&&(t=e[t]),e.indexOf(t)>-1&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,s,n,o,a){if(void 0===t)return null;if(null==e&&(e=t),!this.scene.sys.textures.exists(e))return console.warn("Invalid Tileset Image: "+e),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===r.TILED_JSON)return console.warn("No data found for Tileset: "+t),null;var u=this.tilesets[l];return u?(u.setTileSize(i,s),u.setSpacing(n,o),u.setImage(h),u):(void 0===i&&(i=this.tileWidth),void 0===s&&(s=this.tileHeight),void 0===n&&(n=0),void 0===o&&(o=0),void 0===a&&(a=0),(u=new g(t,a,i,s,n,o)).setImage(h),this.tilesets.push(u),u)},copy:function(t,e,i,s,n,r,o,a){return null!==(a=this.getLayer(a))?(f.Copy(t,e,i,s,n,r,o,a),this):null},createBlankLayer:function(t,e,i,s,n,r,o,h){if(void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=this.width),void 0===r&&(r=this.height),void 0===o&&(o=this.tileWidth),void 0===h&&(h=this.tileHeight),null!==this.getLayerIndex(t))return console.warn("Invalid Tilemap Layer ID: "+t),null;for(var l,u=new a({name:t,tileWidth:o,tileHeight:h,width:n,height:r,orientation:this.orientation}),c=0;c-1&&this.putTileAt(e,r.x,r.y,i,r.tilemapLayer)}return s},removeTileAt:function(t,e,i,s,n){return void 0===i&&(i=!0),void 0===s&&(s=!0),null===(n=this.getLayer(n))?null:f.RemoveTileAt(t,e,i,s,n)},removeTileAtWorldXY:function(t,e,i,s,n,r){return void 0===i&&(i=!0),void 0===s&&(s=!0),null===(r=this.getLayer(r))?null:f.RemoveTileAtWorldXY(t,e,i,s,n,r)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(this.orientation===l.ORTHOGONAL&&f.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,s=0;s{var s=i(99325),n=i(15043);s.register("tilemap",(function(t){var e=void 0!==t?t:{};return n(this.scene,e.key,e.tileWidth,e.tileHeight,e.width,e.height,e.data,e.insertNull)}))},37940:(t,e,i)=>{var s=i(61286),n=i(15043);s.register("tilemap",(function(t,e,i,s,r,o,a){return null===t&&(t=void 0),null===e&&(e=void 0),null===i&&(i=void 0),null===s&&(s=void 0),null===r&&(r=void 0),n(this.scene,t,e,i,s,r,o,a)}))},87177:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),o=i(5047),a=i(96193),h=i(93736),l=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.ComputedSize,n.Depth,n.Flip,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.Transform,n.Visible,n.ScrollFactor,a],initialize:function(t,e,i,s,n,a){r.call(this,t,"TilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],this.layer.tilemapLayer=this,this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=o.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new h,this.setTilesets(s),this.setAlpha(this.layer.alpha),this.setPosition(n,a),this.setOrigin(0,0),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.initPipeline()},setTilesets:function(t){var e=[],i=[],s=this.tilemap;Array.isArray(t)||(t=[t]);for(var n=0;n=0&&t<4&&(this._renderOrder=t),this},calculateFacesAt:function(t,e){return o.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,s){return o.CalculateFacesWithin(t,e,i,s,this.layer),this},createFromTiles:function(t,e,i,s,n){return o.CreateFromTiles(t,e,i,s,n,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,s,n,r,a){return o.Copy(t,e,i,s,n,r,a,this.layer),this},fill:function(t,e,i,s,n,r){return o.Fill(t,e,i,s,n,r,this.layer),this},filterTiles:function(t,e,i,s,n,r,a){return o.FilterTiles(t,e,i,s,n,r,a,this.layer)},findByIndex:function(t,e,i){return o.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,s,n,r,a){return o.FindTile(t,e,i,s,n,r,a,this.layer)},forEachTile:function(t,e,i,s,n,r,a){return o.ForEachTile(t,e,i,s,n,r,a,this.layer),this},setTint:function(t,e,i,s,n,r){void 0===t&&(t=16777215);return this.forEachTile((function(e){e.tint=t}),this,e,i,s,n,r)},getTileAt:function(t,e,i){return o.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,s){return o.GetTileAtWorldXY(t,e,i,s,this.layer)},getIsoTileAtWorldXY:function(t,e,i,s,n){void 0===i&&(i=!0);var r=this.tempVec;return o.IsometricWorldToTileXY(t,e,!0,r,n,this.layer,i),this.getTileAt(r.x,r.y,s)},getTilesWithin:function(t,e,i,s,n){return o.GetTilesWithin(t,e,i,s,n,this.layer)},getTilesWithinShape:function(t,e,i){return o.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,s,n,r){return o.GetTilesWithinWorldXY(t,e,i,s,n,r,this.layer)},hasTileAt:function(t,e){return o.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return o.HasTileAtWorldXY(t,e,i,this.layer)},putTileAt:function(t,e,i,s){return o.PutTileAt(t,e,i,s,this.layer)},putTileAtWorldXY:function(t,e,i,s,n){return o.PutTileAtWorldXY(t,e,i,s,n,this.layer)},putTilesAt:function(t,e,i,s){return o.PutTilesAt(t,e,i,s,this.layer),this},randomize:function(t,e,i,s,n){return o.Randomize(t,e,i,s,n,this.layer),this},removeTileAt:function(t,e,i,s){return o.RemoveTileAt(t,e,i,s,this.layer)},removeTileAtWorldXY:function(t,e,i,s,n){return o.RemoveTileAtWorldXY(t,e,i,s,n,this.layer)},renderDebug:function(t,e){return o.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,s,n,r){return o.ReplaceByIndex(t,e,i,s,n,r,this.layer),this},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this},setCollision:function(t,e,i,s){return o.SetCollision(t,e,i,this.layer,s),this},setCollisionBetween:function(t,e,i,s){return o.SetCollisionBetween(t,e,i,s,this.layer),this},setCollisionByProperty:function(t,e,i){return o.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return o.SetCollisionByExclusion(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return o.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileIndexCallback:function(t,e,i){return o.SetTileIndexCallback(t,e,i,this.layer),this},setTileLocationCallback:function(t,e,i,s,n,r){return o.SetTileLocationCallback(t,e,i,s,n,r,this.layer),this},shuffle:function(t,e,i,s){return o.Shuffle(t,e,i,s,this.layer),this},swapByIndex:function(t,e,i,s,n,r){return o.SwapByIndex(t,e,i,s,n,r,this.layer),this},tileToWorldX:function(t,e){return this.tilemap.tileToWorldX(t,e,this)},tileToWorldY:function(t,e){return this.tilemap.tileToWorldY(t,e,this)},tileToWorldXY:function(t,e,i,s){return this.tilemap.tileToWorldXY(t,e,i,s,this)},getTileCorners:function(t,e,i){return this.tilemap.getTileCorners(t,e,i,this)},weightedRandomize:function(t,e,i,s,n){return o.WeightedRandomize(e,i,s,n,t,this.layer),this},worldToTileX:function(t,e,i){return this.tilemap.worldToTileX(t,e,i,this)},worldToTileY:function(t,e,i){return this.tilemap.worldToTileY(t,e,i,this)},worldToTileXY:function(t,e,i,s,n){return this.tilemap.worldToTileXY(t,e,i,s,n,this)},destroy:function(t){void 0===t&&(t=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),t&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],r.prototype.destroy.call(this))}});t.exports=l},17394:(t,e,i)=>{var s=i(69360),n=new s,r=new s,o=new s;t.exports=function(t,e,i,s){var a=e.cull(i),h=a.length,l=i.alpha*e.alpha;if(!(0===h||l<=0)){var u=n,c=r,d=o;c.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),u.copyFrom(i.matrix);var p=t.currentContext,f=e.gidMap;p.save(),s?(u.multiplyWithOffset(s,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),c.e=e.x,c.f=e.y,u.multiply(c,d),d.copyToContext(p)):(c.e-=i.scrollX*e.scrollFactorX,c.f-=i.scrollY*e.scrollFactorY,c.copyToContext(p)),(!t.antialias||e.scaleX>1||e.scaleY>1)&&(p.imageSmoothingEnabled=!1);for(var v=0;v{var s=i(72283),n=s,r=s;n=i(51395),r=i(17394),t.exports={renderWebGL:n,renderCanvas:r}},51395:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i){var n=e.cull(i),r=n.length,o=i.alpha*e.alpha;if(!(0===r||o<=0)){var a=e.gidMap,h=t.pipelines.set(e.pipeline,e),l=s.getTintAppendFloatAlpha,u=e.scrollFactorX,c=e.scrollFactorY,d=e.x,p=e.y,f=e.scaleX,v=e.scaleY;t.pipelines.preBatch(e);for(var g=0;g{var s=i(56694),n=i(93736),r=new s({initialize:function(t,e,i,s,r,o,a,h,l){(void 0===i||i<=0)&&(i=32),(void 0===s||s<=0)&&(s=32),void 0===r&&(r=0),void 0===o&&(o=0),void 0===a&&(a={}),void 0===h&&(h={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=s,this.tileMargin=r,this.tileSpacing=o,this.tileProperties=a,this.tileData=h,this.tileOffset=new n,void 0!==l&&this.tileOffset.set(l.x,l.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t{var s=i(15494);t.exports=function(t,e,i){var n=s(t,e,!0,i),r=s(t,e-1,!0,i),o=s(t,e+1,!0,i),a=s(t-1,e,!0,i),h=s(t+1,e,!0,i),l=n&&n.collides;return l&&(n.faceTop=!0,n.faceBottom=!0,n.faceLeft=!0,n.faceRight=!0),r&&r.collides&&(l&&(n.faceTop=!1),r.faceBottom=!l),o&&o.collides&&(l&&(n.faceBottom=!1),o.faceTop=!l),a&&a.collides&&(l&&(n.faceLeft=!1),a.faceRight=!l),h&&h.collides&&(l&&(n.faceRight=!1),h.faceLeft=!l),n&&!n.collides&&n.resetFaces(),n}},60386:(t,e,i)=>{var s=i(15494),n=i(50811);t.exports=function(t,e,i,r,o){for(var a=null,h=null,l=null,u=null,c=n(t,e,i,r,null,o),d=0;d{var s=new(i(93736));t.exports=function(t,e,i,n){var r=i.tilemapLayer,o=r.cullPaddingX,a=r.cullPaddingY,h=r.tilemap.tileToWorldXY(t,e,s,n,r);return h.x>n.worldView.x+r.scaleX*i.tileWidth*(-o-.5)&&h.xn.worldView.y+r.scaleY*i.tileHeight*(-a-1)&&h.y{var s=i(60386),n=i(50811),r=i(62839),o=i(29633);t.exports=function(t,e,i,a,h,l,u,c){void 0===u&&(u=!0);var d=n(t,e,i,a,null,c),p=[];d.forEach((function(t){var e=new o(t.layer,t.index,t.x,t.y,t.width,t.height,t.baseWidth,t.baseHeight);e.copy(t),p.push(e)}));for(var f=h-t,v=l-e,g=0;g{var s=i(50811),n=i(51202);t.exports=function(t,e,i,r,o,a){i||(i={}),Array.isArray(t)||(t=[t]);var h=a.tilemapLayer;r||(r=h.scene),o||(o=r.cameras.main);var l,u=s(0,0,a.width,a.height,null,a),c=[];for(l=0;l{var s=i(74118),n=i(82127),r=i(84314),o=new s;t.exports=function(t,e){var i=t.tilemapLayer.tilemap,s=t.tilemapLayer,a=Math.floor(i.tileWidth*s.scaleX),h=Math.floor(i.tileHeight*s.scaleY),l=r(e.worldView.x-s.x,a,0,!0)-s.cullPaddingX,u=n(e.worldView.right-s.x,a,0,!0)+s.cullPaddingX,c=r(e.worldView.y-s.y,h,0,!0)-s.cullPaddingY,d=n(e.worldView.bottom-s.y,h,0,!0)+s.cullPaddingY;return o.setTo(l,c,u-l,d-c)}},381:(t,e,i)=>{var s=i(71586),n=i(6987);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var o=t.tilemapLayer,a=s(t,e);return(o.skipCull||1!==o.scrollFactorX||1!==o.scrollFactorY)&&(a.left=0,a.right=t.width,a.top=0,a.bottom=t.height),n(t,a,r,i),i}},97734:(t,e,i)=>{var s=i(50811),n=i(60386),r=i(68234);t.exports=function(t,e,i,o,a,h,l){for(var u=-1!==l.collideIndexes.indexOf(t),c=s(e,i,o,a,null,l),d=0;d{var s=i(50811);t.exports=function(t,e,i,n,r,o,a,h){return s(i,n,r,o,a,h).filter(t,e)}},37982:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=0),void 0===i&&(i=!1);var n,r,o,a=0;if(i){for(r=s.height-1;r>=0;r--)for(n=s.width-1;n>=0;n--)if((o=s.data[r][n])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;r{var s=i(50811);t.exports=function(t,e,i,n,r,o,a,h){return s(i,n,r,o,a,h).find(t,e)||null}},80916:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,n,r,o,a,h){s(i,n,r,o,a,h).forEach(t,e)}},31493:(t,e,i)=>{var s=i(12920),n=i(381),r=i(37524),o=i(20887),a=i(72283),h=i(19242);t.exports=function(t){return t===s.ORTHOGONAL?n:t===s.HEXAGONAL?r:t===s.STAGGERED?h:t===s.ISOMETRIC?o:a}},15494:(t,e,i)=>{var s=i(62839);t.exports=function(t,e,i,n){if(void 0===i&&(i=!1),s(t,e,n)){var r=n.data[e][t]||null;return r?-1===r.index?i?r:null:r:null}return null}},24640:(t,e,i)=>{var s=i(15494),n=new(i(93736));t.exports=function(t,e,i,r,o){return o.tilemapLayer.worldToTileXY(t,e,!0,n,r),s(n.x,n.y,i,o)}},48495:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n){var r=n.baseTileWidth,o=n.baseTileHeight,a=n.tilemapLayer,h=0,l=0;a&&(i||(i=a.scene.cameras.main),h=a.x+i.scrollX*(1-a.scrollFactorX),l=a.y+i.scrollY*(1-a.scrollFactorY),r*=a.scaleX,o*=a.scaleY);var u=h+t*r,c=l+e*o;return[new s(u,c),new s(u+r,c),new s(u+r,c+o),new s(u,c+o)]}},7160:(t,e,i)=>{var s=i(12920),n=i(63634),r=i(72283),o=i(48495);t.exports=function(t){return t===s.ORTHOGONAL?o:t===s.ISOMETRIC?r:t===s.HEXAGONAL?n:(s.STAGGERED,r)}},16884:(t,e,i)=>{var s=i(12920),n=i(72283),r=i(44150);t.exports=function(t){return t===s.ORTHOGONAL?r:n}},68182:(t,e,i)=>{var s=i(12920),n=i(21715),r=i(21808),o=i(72283),a=i(33388),h=i(46836);t.exports=function(t){return t===s.ORTHOGONAL?h:t===s.ISOMETRIC?r:t===s.HEXAGONAL?n:t===s.STAGGERED?a:o}},3752:(t,e,i)=>{var s=i(12920),n=i(72283),r=i(84132),o=i(42477);t.exports=function(t){return t===s.ORTHOGONAL?o:t===s.STAGGERED?r:n}},50811:(t,e,i)=>{var s=i(72632);t.exports=function(t,e,i,n,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=o.width),void 0===n&&(n=o.height),r||(r={});var a=s(r,"isNotEmpty",!1),h=s(r,"isColliding",!1),l=s(r,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(n+=e,e=0),t+i>o.width&&(i=Math.max(o.width-t,0)),e+n>o.height&&(n=Math.max(o.height-e,0));for(var u=[],c=e;c{var s=i(84068),n=i(50811),r=i(7563),o=i(72283),a=i(93736),h=function(t,e){return r.RectangleToTriangle(e,t)},l=new a,u=new a,c=new a;t.exports=function(t,e,i,a){if(void 0===t)return[];var d=o;t instanceof s.Circle?d=r.CircleToRectangle:t instanceof s.Rectangle?d=r.RectangleToRectangle:t instanceof s.Triangle?d=h:t instanceof s.Line&&(d=r.LineToRectangle),a.tilemapLayer.worldToTileXY(t.left,t.top,!0,u,i);var p=u.x,f=u.y;a.tilemapLayer.worldToTileXY(t.right,t.bottom,!1,c,i);var v=Math.ceil(c.x),g=Math.ceil(c.y),m=Math.max(v-p,1),y=Math.max(g-f,1),x=n(p,f,m,y,e,a),T=a.tileWidth,w=a.tileHeight;a.tilemapLayer&&(T*=a.tilemapLayer.scaleX,w*=a.tilemapLayer.scaleY);for(var b=[],S=new s.Rectangle(0,0,T,w),E=0;E{var s=i(50811),n=i(93736),r=new n,o=new n;t.exports=function(t,e,i,n,a,h,l){var u=l.tilemapLayer.tilemap._convert.WorldToTileXY;u(t,e,!0,r,h,l);var c=r.x,d=r.y;u(t+i,e+n,!1,o,h,l);var p=Math.ceil(o.x),f=Math.ceil(o.y);return s(c,d,p-c,f-d,a,l)}},29296:(t,e,i)=>{var s=i(12920),n=i(10618),r=i(806);t.exports=function(t){return t===s.ORTHOGONAL?r:n}},32688:(t,e,i)=>{var s=i(12920),n=i(11516),r=i(18750),o=i(72283),a=i(90562),h=i(45676);t.exports=function(t){return t===s.ORTHOGONAL?h:t===s.ISOMETRIC?r:t===s.HEXAGONAL?n:t===s.STAGGERED?a:o}},74326:(t,e,i)=>{var s=i(12920),n=i(10618),r=i(3689),o=i(70520);t.exports=function(t){return t===s.ORTHOGONAL?o:t===s.STAGGERED?r:n}},46598:(t,e,i)=>{var s=i(62839);t.exports=function(t,e,i){if(s(t,e,i)){var n=i.data[e][t];return null!==n&&n.index>-1}return!1}},28654:(t,e,i)=>{var s=i(46598),n=new(i(93736));t.exports=function(t,e,i,r){r.tilemapLayer.worldToTileXY(t,e,!0,n,i);var o=n.x,a=n.y;return s(o,a,r)}},6358:(t,e,i)=>{var s=i(82127),n=i(84314);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,r=t.tilemapLayer,o=Math.floor(i.tileWidth*r.scaleX),a=Math.floor(i.tileHeight*r.scaleY),h=t.hexSideLength,l=(a-h)/2+h;return{left:n(e.worldView.x-r.x,o,0,!0)-r.cullPaddingX,right:s(e.worldView.right-r.x,o,0,!0)+r.cullPaddingX,top:n(e.worldView.y-r.y,l,0,!0)-r.cullPaddingY,bottom:s(e.worldView.bottom-r.y,l,0,!0)+r.cullPaddingY}}},37524:(t,e,i)=>{var s=i(6358),n=i(6987);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var o=t.tilemapLayer;if(!o.skipCull&&1===o.scrollFactorX&&1===o.scrollFactorY){var a=s(t,e);n(t,a,r,i)}return i}},63634:(t,e,i)=>{var s=i(21715),n=i(93736),r=new n;t.exports=function(t,e,i,o){var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(a*=l.scaleX,h*=l.scaleY);for(var u=s(t,e,r,i,o),c=[],d=.5773502691896257*a,p=h/2,f=0;f<6;f++){var v=2*Math.PI*(.5-f)/6;c.push(new n(u.x+d*Math.cos(v),u.y+p*Math.sin(v)))}return c}},21715:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){i||(i=new s);var o=r.baseTileWidth,a=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(n||(n=h.scene.cameras.main),l=h.x+n.scrollX*(1-h.scrollFactorX),u=h.y+n.scrollY*(1-h.scrollFactorY),o*=h.scaleX,a*=h.scaleY);var c=a/2,d=l+o*t+o,p=u+1.5*e*c+c;return e%2==0&&(d-=o/2),i.set(d,p)}},11516:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,o){n||(n=new s);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(r||(r=l.scene.cameras.main),t-=l.x+r.scrollX*(1-l.scrollFactorX),e-=l.y+r.scrollY*(1-l.scrollFactorY),a*=l.scaleX,h*=l.scaleY);var u=.5773502691896257,c=h/2,d=(t-a/2)/(u*a),p=(e-c)/c,f=u*d+-.3333333333333333*p,v=0*d+.6666666666666666*p,g=-f-v,m=Math.round(f),y=Math.round(v),x=Math.round(g),T=Math.abs(m-f),w=Math.abs(y-v),b=Math.abs(x-g);T>w&&T>b?m=-y-x:w>b&&(y=-m-x);var S=y,E=S%2==0?y/2+m:y/2+m-.5;return n.set(E,S)}},62839:t=>{t.exports=function(t,e,i){return t>=0&&t=0&&e{var s=i(13125);t.exports=function(t,e,i,n){void 0===i&&(i=[]),void 0===n&&(n=0),i.length=0;var r,o,a,h=t.tilemapLayer,l=t.data,u=t.width,c=t.height,d=u,p=c;if(!h.skipCull)if(0===n){for(o=0;o=0;r--)if(s(r,o,t,e)){if(!(a=l[o][r])||-1===a.index||!a.visible||0===a.alpha)continue;i.push(a)}}else if(2===n){for(o=p;o>=0;o--)for(r=0;l[o]&&r=0;o--)for(r=d;l[o]&&r>=0;r--)if(s(r,o,t,e)){if(!(a=l[o][r])||-1===a.index||!a.visible||0===a.alpha)continue;i.push(a)}return h.tilesDrawn=i.length,h.tilesTotal=u*c,i}},21808:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){i||(i=new s);var o=r.baseTileWidth,a=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(n||(n=h.scene.cameras.main),l=h.x+n.scrollX*(1-h.scrollFactorX),o*=h.scaleX,u=h.y+n.scrollY*(1-h.scrollFactorY),a*=h.scaleY);var c=l+o/2*(t-e),d=u+(t+e)*(a/2);return i.set(c,d)}},18750:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,o,a){n||(n=new s);var h=o.baseTileWidth,l=o.baseTileHeight,u=o.tilemapLayer;u&&(r||(r=u.scene.cameras.main),e-=u.y+r.scrollY*(1-u.scrollFactorY),l*=u.scaleY,t-=u.x+r.scrollX*(1-u.scrollFactorX),h*=u.scaleX);var c=h/2,d=l/2;a||(e-=l);var p=.5*((t-=c)/c+e/d),f=.5*(-t/c+e/d);return i&&(p=Math.floor(p),f=Math.floor(f)),n.set(p,f)}},29003:(t,e,i)=>{var s=i(29633),n=i(62839),r=i(92839),o=i(68234),a=i(14556);t.exports=function(t,e,i,h,l){if(void 0===h&&(h=!0),!n(e,i,l))return null;var u,c=l.data[i][e],d=c&&c.collides;t instanceof s?(null===l.data[i][e]&&(l.data[i][e]=new s(l,t.index,e,i,l.tileWidth,l.tileHeight)),l.data[i][e].copy(t)):(u=t,null===l.data[i][e]?l.data[i][e]=new s(l,u,e,i,l.tileWidth,l.tileHeight):l.data[i][e].index=u);var p=l.data[i][e],f=-1!==l.collideIndexes.indexOf(p.index),v=a(l.tilemapLayer.tilemap)[u=t instanceof s?t.index:t][2],g=l.tilemapLayer.tileset[v];return p.width=g.tileWidth,p.height=g.tileHeight,o(p,f),h&&d!==p.collides&&r(e,i,l),p}},48565:(t,e,i)=>{var s=i(29003),n=new(i(93736));t.exports=function(t,e,i,r,o,a){return a.tilemapLayer.worldToTileXY(e,i,!0,n,o,a),s(t,n.x,n.y,r,a)}},56547:(t,e,i)=>{var s=i(60386),n=i(29003);t.exports=function(t,e,i,r,o){if(void 0===r&&(r=!0),!Array.isArray(t))return null;Array.isArray(t[0])||(t=[t]);for(var a=t.length,h=t[0].length,l=0;l{var s=i(50811),n=i(72861);t.exports=function(t,e,i,r,o,a){var h,l=s(t,e,i,r,{},a);if(!o)for(o=[],h=0;h{var s=i(29633),n=i(62839),r=i(92839);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!0),void 0===o&&(o=!0),!n(t,e,a))return null;var h=a.data[e][t];return h?(a.data[e][t]=i?null:new s(a,-1,t,e,a.tileWidth,a.tileHeight),o&&h&&h.collides&&r(t,e,a),h):null}},17384:(t,e,i)=>{var s=i(929),n=new(i(93736));t.exports=function(t,e,i,r,o,a){return a.tilemapLayer.worldToTileXY(t,e,!0,n,o,a),s(n.x,n.y,i,r,a)}},93763:(t,e,i)=>{var s=i(50811),n=i(95509),r=new n(105,210,231,150),o=new n(243,134,48,200),a=new n(40,39,37,150);t.exports=function(t,e,i){void 0===e&&(e={});var n=void 0!==e.tileColor?e.tileColor:r,h=void 0!==e.collidingTileColor?e.collidingTileColor:o,l=void 0!==e.faceColor?e.faceColor:a,u=s(0,0,i.width,i.height,null,i);t.translateCanvas(i.tilemapLayer.x,i.tilemapLayer.y),t.scaleCanvas(i.tilemapLayer.scaleX,i.tilemapLayer.scaleY);for(var c=0;c{var s=i(50811);t.exports=function(t,e,i,n,r,o,a){for(var h=s(i,n,r,o,null,a),l=0;l{t.exports=function(t,e,i,s){var n,r,o,a=t.data,h=t.width,l=t.height,u=t.tilemapLayer,c=Math.max(0,e.left),d=Math.min(h,e.right),p=Math.max(0,e.top),f=Math.min(l,e.bottom);if(0===i)for(r=p;r=c;n--)(o=a[r][n])&&-1!==o.index&&o.visible&&0!==o.alpha&&s.push(o);else if(2===i)for(r=f;r>=p;r--)for(n=c;a[r]&&n=p;r--)for(n=d;a[r]&&n>=c;n--)(o=a[r][n])&&-1!==o.index&&o.visible&&0!==o.alpha&&s.push(o);return u.tilesDrawn=s.length,u.tilesTotal=h*l,s}},51710:(t,e,i)=>{var s=i(68234),n=i(60386),r=i(91181);t.exports=function(t,e,i,o,a){void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===a&&(a=!0),Array.isArray(t)||(t=[t]);for(var h=0;h{var s=i(68234),n=i(60386),r=i(91181);t.exports=function(t,e,i,o,a,h){if(void 0===i&&(i=!0),void 0===o&&(o=!0),void 0===h&&(h=!0),!(t>e)){for(var l=t;l<=e;l++)r(l,i,a);if(h)for(var u=0;u=t&&d.index<=e&&s(d,i)}o&&n(0,0,a.width,a.height,a)}}},33158:(t,e,i)=>{var s=i(68234),n=i(60386),r=i(91181);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a{var s=i(68234),n=i(60386),r=i(19256);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0);for(var a=0;a{var s=i(68234),n=i(60386);t.exports=function(t,e,i){void 0===t&&(t=!0),void 0===e&&(e=!0);for(var r=0;r0&&s(a,t)}}e&&n(0,0,i.width,i.height,i)}},91181:t=>{t.exports=function(t,e,i){var s=i.collideIndexes.indexOf(t);e&&-1===s?i.collideIndexes.push(t):e||-1===s||i.collideIndexes.splice(s,1)}},68234:t=>{t.exports=function(t,e){e?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)}},11628:t=>{t.exports=function(t,e,i,s){if("number"==typeof t)s.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var n=0,r=t.length;n{var s=i(50811);t.exports=function(t,e,i,n,r,o,a){for(var h=s(t,e,i,n,null,a),l=0;l{var s=i(50811),n=i(18592);t.exports=function(t,e,i,r,o){var a=s(t,e,i,r,null,o),h=a.map((function(t){return t.index}));n(h);for(var l=0;l{var s=i(82127),n=i(84314);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,r=t.tilemapLayer,o=Math.floor(i.tileWidth*r.scaleX),a=Math.floor(i.tileHeight*r.scaleY);return{left:n(e.worldView.x-r.x,o,0,!0)-r.cullPaddingX,right:s(e.worldView.right-r.x,o,0,!0)+r.cullPaddingX,top:n(e.worldView.y-r.y,a/2,0,!0)-r.cullPaddingY,bottom:s(e.worldView.bottom-r.y,a/2,0,!0)+r.cullPaddingY}}},19242:(t,e,i)=>{var s=i(53945),n=i(6987);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var o=t.tilemapLayer;if(!o.skipCull&&1===o.scrollFactorX&&1===o.scrollFactorY){var a=s(t,e);n(t,a,r,i)}return i}},33388:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){i||(i=new s);var o=r.baseTileWidth,a=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(n||(n=h.scene.cameras.main),l=h.x+n.scrollX*(1-h.scrollFactorX),o*=h.scaleX,u=h.y+n.scrollY*(1-h.scrollFactorY),a*=h.scaleY);var c=l+t*o+e%2*(o/2),d=u+e*(a/2);return i.set(c,d)}},84132:t=>{t.exports=function(t,e,i){var s=i.baseTileHeight,n=i.tilemapLayer,r=0;return n&&(void 0===e&&(e=n.scene.cameras.main),r=n.y+e.scrollY*(1-n.scrollFactorY),s*=n.scaleY),r+t*(s/2)+s}},90562:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,o){n||(n=new s);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(r||(r=l.scene.cameras.main),e-=l.y+r.scrollY*(1-l.scrollFactorY),h*=l.scaleY,t-=l.x+r.scrollX*(1-l.scrollFactorX),a*=l.scaleX);var u=i?Math.floor(e/(h/2)):e/(h/2),c=i?Math.floor((t+u%2*.5*a)/a):(t+u%2*.5*a)/a;return n.set(c,u)}},3689:t=>{t.exports=function(t,e,i,s){var n=s.baseTileHeight,r=s.tilemapLayer;return r&&(i||(i=r.scene.cameras.main),t-=r.y+i.scrollY*(1-r.scrollFactorY),n*=r.scaleY),e?Math.floor(t/(n/2)):t/(n/2)}},55217:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,n,r,o,a){for(var h=s(i,n,r,o,null,a),l=0;l{t.exports=function(t,e,i){var s=i.baseTileWidth,n=i.tilemapLayer,r=0;return n&&(e||(e=n.scene.cameras.main),r=n.x+e.scrollX*(1-n.scrollFactorX),s*=n.scaleX),r+t*s}},46836:(t,e,i)=>{var s=i(44150),n=i(42477),r=i(93736);t.exports=function(t,e,i,o,a){return i||(i=new r(0,0)),i.x=s(t,o,a),i.y=n(e,o,a),i}},42477:t=>{t.exports=function(t,e,i){var s=i.baseTileHeight,n=i.tilemapLayer,r=0;return n&&(e||(e=n.scene.cameras.main),r=n.y+e.scrollY*(1-n.scrollFactorY),s*=n.scaleY),r+t*s}},39677:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,n,r,o){if(r){var a,h=s(t,e,i,n,null,o),l=0;for(a=0;a{var s=i(45676),n=new(i(93736));t.exports=function(t,e,i,r){return s(t,0,e,n,i,r),n.x}},45676:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,o){void 0===i&&(i=!0),n||(n=new s);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(r||(r=l.scene.cameras.main),t-=l.x+r.scrollX*(1-l.scrollFactorX),e-=l.y+r.scrollY*(1-l.scrollFactorY),a*=l.scaleX,h*=l.scaleY);var u=t/a,c=e/h;return i&&(u=Math.floor(u),c=Math.floor(c)),n.set(u,c)}},70520:(t,e,i)=>{var s=i(45676),n=new(i(93736));t.exports=function(t,e,i,r){return s(0,t,e,n,i,r),n.y}},5047:(t,e,i)=>{t.exports={CalculateFacesAt:i(92839),CalculateFacesWithin:i(60386),CheckIsoBounds:i(13125),Copy:i(17347),CreateFromTiles:i(93604),CullBounds:i(71586),CullTiles:i(381),Fill:i(97734),FilterTiles:i(63555),FindByIndex:i(37982),FindTile:i(48297),ForEachTile:i(80916),GetCullTilesFunction:i(31493),GetTileAt:i(15494),GetTileAtWorldXY:i(24640),GetTileCorners:i(48495),GetTileCornersFunction:i(7160),GetTilesWithin:i(50811),GetTilesWithinShape:i(31674),GetTilesWithinWorldXY:i(44662),GetTileToWorldXFunction:i(16884),GetTileToWorldXYFunction:i(68182),GetTileToWorldYFunction:i(3752),GetWorldToTileXFunction:i(29296),GetWorldToTileXYFunction:i(32688),GetWorldToTileYFunction:i(74326),HasTileAt:i(46598),HasTileAtWorldXY:i(28654),HexagonalCullBounds:i(6358),HexagonalCullTiles:i(37524),HexagonalGetTileCorners:i(63634),HexagonalTileToWorldXY:i(21715),HexagonalWorldToTileXY:i(11516),IsInLayerBounds:i(62839),IsometricCullTiles:i(20887),IsometricTileToWorldXY:i(21808),IsometricWorldToTileXY:i(18750),PutTileAt:i(29003),PutTileAtWorldXY:i(48565),PutTilesAt:i(56547),Randomize:i(91180),RemoveTileAt:i(929),RemoveTileAtWorldXY:i(17384),RenderDebug:i(93763),ReplaceByIndex:i(51202),RunCull:i(6987),SetCollision:i(51710),SetCollisionBetween:i(15216),SetCollisionByExclusion:i(33158),SetCollisionByProperty:i(4180),SetCollisionFromCollisionGroup:i(18625),SetLayerCollisionIndex:i(91181),SetTileCollision:i(68234),SetTileIndexCallback:i(11628),SetTileLocationCallback:i(72732),Shuffle:i(34397),StaggeredCullBounds:i(53945),StaggeredCullTiles:i(19242),StaggeredTileToWorldXY:i(33388),StaggeredTileToWorldY:i(84132),StaggeredWorldToTileXY:i(90562),StaggeredWorldToTileY:i(3689),SwapByIndex:i(55217),TileToWorldX:i(44150),TileToWorldXY:i(46836),TileToWorldY:i(42477),WeightedRandomize:i(39677),WorldToTileX:i(806),WorldToTileXY:i(45676),WorldToTileY:i(70520)}},12920:t=>{t.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},84758:(t,e,i)=>{var s={ORIENTATION:i(12920)};t.exports=s},52678:(t,e,i)=>{var s=i(98611),n=i(84758),r={Components:i(5047),Parsers:i(34124),Formats:i(93560),ImageCollection:i(97042),ParseToTilemap:i(15043),Tile:i(29633),Tilemap:i(89797),TilemapCreator:i(4843),TilemapFactory:i(37940),Tileset:i(47975),TilemapLayer:i(87177),Orientation:i(12920),LayerData:i(94990),MapData:i(16586),ObjectLayer:i(15256)};r=s(!1,r,n.ORIENTATION),t.exports=r},94990:(t,e,i)=>{var s=i(56694),n=i(12920),r=i(72632),o=new s({initialize:function(t){void 0===t&&(t={}),this.name=r(t,"name","layer"),this.x=r(t,"x",0),this.y=r(t,"y",0),this.width=r(t,"width",0),this.height=r(t,"height",0),this.tileWidth=r(t,"tileWidth",0),this.tileHeight=r(t,"tileHeight",0),this.baseTileWidth=r(t,"baseTileWidth",this.tileWidth),this.baseTileHeight=r(t,"baseTileHeight",this.tileHeight),this.orientation=r(t,"orientation",n.ORTHOGONAL),this.widthInPixels=r(t,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=r(t,"heightInPixels",this.height*this.baseTileHeight),this.alpha=r(t,"alpha",1),this.visible=r(t,"visible",!0),this.properties=r(t,"properties",[]),this.indexes=r(t,"indexes",[]),this.collideIndexes=r(t,"collideIndexes",[]),this.callbacks=r(t,"callbacks",[]),this.bodies=r(t,"bodies",[]),this.data=r(t,"data",[]),this.tilemapLayer=r(t,"tilemapLayer",null),this.hexSideLength=r(t,"hexSideLength",0)}});t.exports=o},16586:(t,e,i)=>{var s=i(56694),n=i(12920),r=i(72632),o=new s({initialize:function(t){void 0===t&&(t={}),this.name=r(t,"name","map"),this.width=r(t,"width",0),this.height=r(t,"height",0),this.infinite=r(t,"infinite",!1),this.tileWidth=r(t,"tileWidth",0),this.tileHeight=r(t,"tileHeight",0),this.widthInPixels=r(t,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=r(t,"heightInPixels",this.height*this.tileHeight),this.format=r(t,"format",null),this.orientation=r(t,"orientation",n.ORTHOGONAL),this.renderOrder=r(t,"renderOrder","right-down"),this.version=r(t,"version","1"),this.properties=r(t,"properties",{}),this.layers=r(t,"layers",[]),this.images=r(t,"images",[]),this.objects=r(t,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=r(t,"collision",{}),this.tilesets=r(t,"tilesets",[]),this.imageCollections=r(t,"imageCollections",[]),this.tiles=r(t,"tiles",[]),this.hexSideLength=r(t,"hexSideLength",0),this.staggerAxis=r(t,"staggerAxis","y"),this.staggerIndex=r(t,"staggerIndex","odd")}});t.exports=o},15256:(t,e,i)=>{var s=i(56694),n=i(72632),r=new s({initialize:function(t){void 0===t&&(t={}),this.name=n(t,"name","object layer"),this.opacity=n(t,"opacity",1),this.properties=n(t,"properties",{}),this.propertyTypes=n(t,"propertytypes",{}),this.type=n(t,"type","objectgroup"),this.visible=n(t,"visible",!0),this.objects=n(t,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});t.exports=r},21394:(t,e,i)=>{var s=i(12920);t.exports=function(t){return"isometric"===(t=t.toLowerCase())?s.ISOMETRIC:"staggered"===t?s.STAGGERED:"hexagonal"===t?s.HEXAGONAL:s.ORTHOGONAL}},90715:(t,e,i)=>{var s=i(93560),n=i(84346),r=i(96097),o=i(2378),a=i(44909);t.exports=function(t,e,i,h,l,u){var c;switch(e){case s.ARRAY_2D:c=n(t,i,h,l,u);break;case s.CSV:c=r(t,i,h,l,u);break;case s.TILED_JSON:c=o(t,i,u);break;case s.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},84346:(t,e,i)=>{var s=i(93560),n=i(94990),r=i(16586),o=i(29633);t.exports=function(t,e,i,a,h){for(var l=new n({tileWidth:i,tileHeight:a}),u=new r({name:t,tileWidth:i,tileHeight:a,format:s.ARRAY_2D,layers:[l]}),c=[],d=e.length,p=0,f=0;f{var s=i(93560),n=i(84346);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map((function(t){return t.split(",")})),h=n(t,a,i,r,o);return h.format=s.CSV,h}},30951:(t,e,i)=>{var s=i(94990),n=i(29633);t.exports=function(t,e){for(var i=[],r=0;r-1?new n(a,p,c,u,o.tilesize,o.tilesize):e?null:new n(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},47488:(t,e,i)=>{var s=i(47975);t.exports=function(t){for(var e=[],i=[],n=0;n{var s=i(93560),n=i(16586),r=i(30951),o=i(47488);t.exports=function(t,e,i){if(0===e.layer.length)return console.warn("No layers found in the Weltmeister map: "+t),null;for(var a=0,h=0,l=0;la&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new n({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:s.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},24507:(t,e,i)=>{t.exports={ParseTileLayers:i(30951),ParseTilesets:i(47488),ParseWeltmeister:i(44909)}},34124:(t,e,i)=>{t.exports={FromOrientationString:i(21394),Parse:i(90715),Parse2DArray:i(84346),ParseCSV:i(96097),Impact:i(24507),Tiled:i(50044)}},48646:(t,e,i)=>{var s=i(98611);t.exports=function(t){for(var e,i,n,r,o,a=0;a{t.exports=function(t){for(var e=window.atob(t),i=e.length,s=new Array(i/4),n=0;n>>0;return s}},14556:(t,e,i)=>{var s=i(47975);t.exports=function(t){var e,i,n=[];for(e=0;e{var s=i(72632);t.exports=function(t,e,i){if(!e)return{i:0,layers:t.layers,name:"",opacity:1,visible:!0,x:0,y:0};var n=e.x+s(e,"startx",0)*t.tilewidth+s(e,"offsetx",0),r=e.y+s(e,"starty",0)*t.tileheight+s(e,"offsety",0);return{i:0,layers:e.layers,name:i.name+e.name+"/",opacity:i.opacity*e.opacity,visible:i.visible&&e.visible,x:i.x+n,y:i.y+r}}},8847:t=>{var e=2147483648,i=1073741824,s=536870912;t.exports=function(t){var n=Boolean(t&e),r=Boolean(t&i),o=Boolean(t&s);t&=536870911;var a=0,h=!1;return n&&r&&o?(a=Math.PI/2,h=!0):n&&r&&!o?(a=Math.PI,h=!1):n&&!r&&o?(a=Math.PI/2,h=!1):!n||r||o?!n&&r&&o?(a=3*Math.PI/2,h=!1):n||!r||o?n||r||!o?n||r||o||(a=0,h=!1):(a=3*Math.PI/2,h=!0):(a=Math.PI,h=!0):(a=0,h=!0),{gid:t,flippedHorizontal:n,flippedVertical:r,flippedAntiDiagonal:o,rotation:a,flipped:h}}},78339:(t,e,i)=>{var s=i(72632),n=i(92044);t.exports=function(t){for(var e=[],i=[],r=n(t);r.i0;)if(r.i>=r.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=i.pop()}else{var o=r.layers[r.i];if(r.i++,"imagelayer"===o.type){var a=s(o,"offsetx",0)+s(o,"startx",0),h=s(o,"offsety",0)+s(o,"starty",0);e.push({name:r.name+o.name,image:o.image,x:r.x+a+o.x,y:r.y+h+o.y,alpha:r.opacity*o.opacity,visible:r.visible&&o.visible,properties:s(o,"properties",{})})}else if("group"===o.type){var l=n(t,o,r);i.push(r),r=l}}return e}},2378:(t,e,i)=>{var s=i(48646),n=i(14556),r=i(12920),o=i(28699),a=i(93560),h=i(21394),l=i(16586),u=i(78339),c=i(61136),d=i(95925),p=i(93392);t.exports=function(t,e,i){var f=o(e),v=new l({width:f.width,height:f.height,name:t,tileWidth:f.tilewidth,tileHeight:f.tileheight,orientation:h(f.orientation),format:a.TILED_JSON,version:f.version,properties:f.properties,renderOrder:f.renderorder,infinite:f.infinite});v.orientation===r.HEXAGONAL&&(v.hexSideLength=f.hexsidelength,v.staggerAxis=f.staggeraxis,v.staggerIndex=f.staggerindex),v.layers=d(f,i),v.images=u(f);var g=p(f);return v.tilesets=g.tilesets,v.imageCollections=g.imageCollections,v.objects=c(f),v.tiles=n(v),s(v),v}},4281:(t,e,i)=>{var s=i(28820),n=i(8847),r=function(t){return{x:t.x,y:t.y}},o=["id","name","type","rotation","properties","visible","x","y","width","height"];t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var a=s(t,o);if(a.x+=e,a.y+=i,t.gid){var h=n(t.gid);a.gid=h.gid,a.flippedHorizontal=h.flippedHorizontal,a.flippedVertical=h.flippedVertical,a.flippedAntiDiagonal=h.flippedAntiDiagonal}else t.polyline?a.polyline=t.polyline.map(r):t.polygon?a.polygon=t.polygon.map(r):t.ellipse?a.ellipse=t.ellipse:t.text?a.text=t.text:t.point?a.point=!0:a.rectangle=!0;return a}},61136:(t,e,i)=>{var s=i(72632),n=i(4281),r=i(15256),o=i(92044);t.exports=function(t){for(var e=[],i=[],a=o(t);a.i0;)if(a.i>=a.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}a=i.pop()}else{var h=a.layers[a.i];if(a.i++,h.opacity*=a.opacity,h.visible=a.visible&&h.visible,"objectgroup"===h.type){h.name=a.name+h.name;for(var l=a.x+s(h,"startx",0)+s(h,"offsetx",0),u=a.y+s(h,"starty",0)+s(h,"offsety",0),c=[],d=0;d{var s=i(43908),n=i(12920),r=i(92044),o=i(21394),a=i(72632),h=i(94990),l=i(8847),u=i(29633);t.exports=function(t,e){for(var i=a(t,"infinite",!1),c=[],d=[],p=r(t);p.i0;)if(p.i>=p.layers.length){if(d.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}p=d.pop()}else{var f=p.layers[p.i];if(p.i++,"tilelayer"===f.type)if(f.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+f.name+"'");else{if(f.encoding&&"base64"===f.encoding){if(f.chunks)for(var v=0;v0?((y=new u(g,m.gid,L,F,t.tilewidth,t.tileheight)).rotation=m.rotation,y.flipX=m.flipped,T[F][L]=y):(x=e?null:new u(g,-1,L,F,t.tilewidth,t.tileheight),T[F][L]=x),++w===_.width&&(R++,w=0)}}else{(g=new h({name:p.name+f.name,x:p.x+a(f,"offsetx",0)+f.x,y:p.y+a(f,"offsety",0)+f.y,width:f.width,height:f.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:p.opacity*f.opacity,visible:p.visible&&f.visible,properties:a(f,"properties",[]),orientation:o(t.orientation)})).orientation===n.HEXAGONAL&&(g.hexSideLength=t.hexsidelength);for(var D=[],k=0,I=f.data.length;k0?((y=new u(g,m.gid,w,T.length,t.tilewidth,t.tileheight)).rotation=m.rotation,y.flipX=m.flipped,D.push(y)):(x=e?null:new u(g,-1,w,T.length,t.tilewidth,t.tileheight),D.push(x)),++w===f.width&&(T.push(D),w=0,D=[])}g.data=T,c.push(g)}else if("group"===f.type){var B=r(t,f,p);d.push(p),p=B}}return c}},93392:(t,e,i)=>{var s=i(47975),n=i(97042),r=i(4281),o=i(39642);t.exports=function(t){for(var e,i=[],a=[],h=null,l=0;l1){var d=void 0,p=void 0;if(Array.isArray(u.tiles)){d=d||{},p=p||{};for(var f=0;f{t.exports=function(t,e){for(var i=0;i0){var r,o,a,h={},l={};if(Array.isArray(s.edgecolors))for(r=0;r{t.exports={AssignTileProperties:i(48646),Base64Decode:i(43908),BuildTilesetIndex:i(14556),CreateGroupLayer:i(92044),ParseGID:i(8847),ParseImageLayers:i(78339),ParseJSONTiled:i(2378),ParseObject:i(4281),ParseObjectLayers:i(61136),ParseTileLayers:i(95925),ParseTilesets:i(93392)}},73779:(t,e,i)=>{var s=i(56694),n=i(91963),r=i(7599),o=i(57911),a=i(66458),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.now=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(r.PRE_UPDATE,this.preUpdate,this),t.on(r.UPDATE,this.update,this),t.once(r.SHUTDOWN,this.shutdown,this)},addEvent:function(t){var e;return t instanceof o?(e=t,this.removeEvent(e),e.elapsed=e.startAt,e.hasDispatched=!1,e.repeatCount=-1===e.repeat||e.loop?999999999999:e.repeat):e=new o(t),this._pendingInsertion.push(e),e},delayedCall:function(t,e,i,s){return this.addEvent({delay:t,callback:e,args:i,callbackScope:s})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e-1&&this._active.splice(n,1),s.destroy()}for(i=0;i=s.delay)){var n=s.elapsed-s.delay;if(s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),s.repeatCount>0){if(s.repeatCount--,n>=s.delay)for(;n>=s.delay&&s.repeatCount>0;)s.callback&&s.callback.apply(s.callbackScope,s.args),n-=s.delay,s.repeatCount--;s.elapsed=n,s.hasDispatched=!1}else s.hasDispatched&&this._pendingRemoval.push(s)}}}},shutdown:function(){var t;for(t=0;t{var s=i(56694),n=i(72632),r=new s({initialize:function(t){this.delay=0,this.repeat=0,this.repeatCount=0,this.loop=!1,this.callback,this.callbackScope,this.args,this.timeScale=1,this.startAt=0,this.elapsed=0,this.paused=!1,this.hasDispatched=!1,this.reset(t)},reset:function(t){if(this.delay=n(t,"delay",0),this.repeat=n(t,"repeat",0),this.loop=n(t,"loop",!1),this.callback=n(t,"callback",void 0),this.callbackScope=n(t,"callbackScope",this.callback),this.args=n(t,"args",[]),this.timeScale=n(t,"timeScale",1),this.startAt=n(t,"startAt",0),this.paused=n(t,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=-1===this.repeat||this.loop?999999999999:this.repeat,0===this.delay&&(this.repeat>0||this.loop))throw new Error("TimerEvent infinite loop created via zero delay");return this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return.001*this.getRemaining()},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return.001*this.getOverallRemaining()},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},97121:(t,e,i)=>{t.exports={Clock:i(73779),TimerEvent:i(57911)}},64532:(t,e,i)=>{var s=i(66458),n=i(56694),r=i(5454),o=i(68710),a=i(91963),h=i(7599),l=i(91944),u=i(39366),c=i(68061),d=i(45641),p=i(56034),f=new n({initialize:function(t){this.scene=t,this.events=t.sys.events,this.timeScale=1,this.paused=!1,this.processing=!1,this.tweens=[],this.time=0,this.startTime=0,this.nextTime=0,this.prevTime=0,this.maxLag=500,this.lagSkip=33,this.gap=1e3/240,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.events.once(h.DESTROY,this.destroy,this)},start:function(){this.timeScale=1,this.paused=!1,this.startTime=Date.now(),this.prevTime=this.startTime,this.nextTime=this.gap,this.events.on(h.UPDATE,this.update,this),this.events.once(h.SHUTDOWN,this.shutdown,this)},create:function(t){Array.isArray(t)||(t=[t]);for(var e=[],i=0;i-1},existing:function(t){return this.has(t)||this.tweens.push(t.reset()),this},addCounter:function(t){var e=o(this,t);return this.tweens.push(e.reset()),e},stagger:function(t,e){return l(t,e)},setLagSmooth:function(t,e){return void 0===t&&(t=1/1e-8),void 0===e&&(e=0),this.maxLag=t,this.lagSkip=Math.min(e,this.maxLag),this},setFps:function(t){return void 0===t&&(t=240),this.gap=1e3/t,this.nextTime=1e3*this.time+this.gap,this},getDelta:function(t){var e=Date.now()-this.prevTime;e>this.maxLag&&(this.startTime+=e-this.lagSkip),this.prevTime+=e;var i=this.prevTime-this.startTime,s=i-this.nextTime,n=i-1e3*this.time;return s>0||t?(i/=1e3,this.time=i,this.nextTime+=s+(s>=this.gap?4:this.gap-s)):n=0,n},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(t){void 0===t&&(t=!1);var e=this.getDelta(t);if(!(e<=0)){var i,s;this.processing=!0;var n=[],r=this.tweens;for(i=0;i0){for(i=0;i-1&&(s.isPendingRemove()||s.isDestroyed())&&(r.splice(a,1),s.destroy())}n.length=0}this.processing=!1}},remove:function(t){return this.processing?t.setPendingRemoveState():(s(this.tweens,t),t.setRemovedState()),this},reset:function(t){return this.existing(t),t.seek(),t.setActiveState(),this},makeActive:function(t){return this.existing(t),t.setActiveState(),this},each:function(t,e){var i,s=[null];for(i=1;i{t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},21902:(t,e,i)=>{var s=i(35060),n=i(40587);t.exports=function(t,e){var i=s.Power0;if("string"==typeof t)if(s.hasOwnProperty(t))i=s[t];else{var r="";if(t.indexOf(".")){var o=(r=t.substring(t.indexOf(".")+1)).toLowerCase();"in"===o?r="easeIn":"out"===o?r="easeOut":"inout"===o&&(r="easeInOut")}t=n(t.substring(0,t.indexOf(".")+1)+r),s.hasOwnProperty(t)&&(i=s[t])}else"function"==typeof t&&(i=t);if(!e)return i;var a=e.slice(0);return a.unshift(0),function(t){return a[0]=t,i.apply(this,a)}}},4840:(t,e,i)=>{var s=i(63210),n=i(88332),r={bezier:s,catmull:n,catmullrom:n,linear:i(47614)};t.exports=function(t){if(null===t)return null;var e=r.linear;return"string"==typeof t?r.hasOwnProperty(t)&&(e=r[t]):"function"==typeof t&&(e=t),e}},28348:t=>{t.exports=function(t,e,i){var s;t.hasOwnProperty(e)?s="function"===typeof t[e]?function(i,s,n,r,o,a){return t[e](i,s,n,r,o,a)}:function(){return t[e]}:s="function"==typeof i?i:function(){return i};return s}},92407:(t,e,i)=>{var s=i(53709);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substring(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===s.indexOf(e)&&"_"!==e.substring(0,1)&&i.push({key:e,value:t[e]});return i}},65868:(t,e,i)=>{var s=i(10850);t.exports=function(t){var e=s(t,"targets",null);return null===e||("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e])),e}},9744:(t,e,i)=>{var s=i(17489),n=i(61616);function r(t){return!!t.getActive&&"function"==typeof t.getActive}function o(t){return!!t.getStart&&"function"==typeof t.getStart}function a(t){return!!t.getEnd&&"function"==typeof t.getEnd}var h=function(t,e){var i,l,u=function(t,e,i){return i},c=function(t,e,i){return i},d=null,p=typeof e;if("number"===p)u=function(){return e};else if(Array.isArray(e))c=function(){return e[0]},u=function(){return e[e.length-1]};else if("string"===p){var f=e.toLowerCase(),v="random"===f.substring(0,6),g="int"===f.substring(0,3);if(v||g){var m=f.indexOf("("),y=f.indexOf(")"),x=f.indexOf(",");if(!(m&&y&&x))throw new Error("invalid random() format");var T=parseFloat(f.substring(m+1,x)),w=parseFloat(f.substring(x+1,y));u=v?function(){return n(T,w)}:function(){return s(T,w)}}else{f=f[0];var b=parseFloat(e.substr(2));switch(f){case"+":u=function(t,e,i){return i+b};break;case"-":u=function(t,e,i){return i-b};break;case"*":u=function(t,e,i){return i*b};break;case"/":u=function(t,e,i){return i/b};break;default:u=function(){return parseFloat(e)}}}}else if("function"===p)u=e;else if("object"===p)if(o(l=e)||a(l)||r(l))r(e)&&(d=e.getActive),a(e)&&(u=e.getEnd),o(e)&&(c=e.getStart);else if(e.hasOwnProperty("value"))i=h(t,e.value);else{var S=e.hasOwnProperty("to"),E=e.hasOwnProperty("from"),A=e.hasOwnProperty("start");if(S&&(E||A)){if(i=h(t,e.to),A){var _=h(t,e.start);i.getActive=_.getEnd}if(E){var C=h(t,e.from);i.getStart=C.getEnd}}}return i||(i={getActive:d,getEnd:u,getStart:c}),i};t.exports=h},68710:(t,e,i)=>{var s=i(502),n=i(99730),r=i(20494),o=i(63130),a=i(21902),h=i(28348),l=i(10850),u=i(9744),c=i(72066),d=i(39366);t.exports=function(t,e,i){if(e instanceof d)return e.parent=t,e;i=void 0===i?n:c(n,i);var p=l(e,"from",0),f=l(e,"to",1),v=[{value:p}],g=l(e,"delay",i.delay),m=l(e,"easeParams",i.easeParams),y=l(e,"ease",i.ease),x=u("value",f),T=new d(t,v),w=T.add(0,"value",x.getEnd,x.getStart,x.getActive,a(l(e,"ease",y),l(e,"easeParams",m)),h(e,"delay",g),l(e,"duration",i.duration),o(e,"yoyo",i.yoyo),l(e,"hold",i.hold),l(e,"repeat",i.repeat),l(e,"repeatDelay",i.repeatDelay),!1,!1);w.start=p,w.current=p,T.completeDelay=r(e,"completeDelay",0),T.loop=Math.round(r(e,"loop",0)),T.loopDelay=Math.round(r(e,"loopDelay",0)),T.paused=o(e,"paused",!1),T.persist=o(e,"persist",!1),T.callbackScope=l(e,"callbackScope",T);for(var b=s.TYPES,S=0;S{var s=i(21902),n=i(10850),r=i(83392);t.exports=function(t,e){var i;void 0===e&&(e={});var o=n(e,"start",0),a=n(e,"ease",null),h=n(e,"grid",null),l=n(e,"from",0),u="first"===l,c="center"===l,d="last"===l,p="number"==typeof l,f=Array.isArray(t),v=f?parseFloat(t[0]):parseFloat(t),g=f?parseFloat(t[1]):0,m=Math.max(v,g);if(f&&(o+=v),h){var y=h[0],x=h[1],T=0,w=0,b=0,S=0,E=[];d?(T=y-1,w=x-1):p?(T=l%y,w=Math.floor(l/y)):c&&(T=(y-1)/2,w=(x-1)/2);for(var A=r.MIN_SAFE_INTEGER,_=0;_A&&(A=M),E[_][C]=M}}}var R=a?s(a):null;return i=h?function(t,e,i,s){var n,r=0,a=s%y,h=Math.floor(s/y);if(a>=0&&a=0&&h{var s=i(502),n=i(99730),r=i(20494),o=i(63130),a=i(21902),h=i(4840),l=i(28348),u=i(92407),c=i(65868),d=i(10850),p=i(9744),f=i(72066),v=i(39366);t.exports=function(t,e,i){if(e instanceof v)return e.parent=t,e;i=void 0===i?n:f(n,i);var g=c(e);!g&&i.targets&&(g=i.targets);for(var m=u(e),y=d(e,"delay",i.delay),x=d(e,"duration",i.duration),T=d(e,"easeParams",i.easeParams),w=d(e,"ease",i.ease),b=d(e,"hold",i.hold),S=d(e,"repeat",i.repeat),E=d(e,"repeatDelay",i.repeatDelay),A=o(e,"yoyo",i.yoyo),_=o(e,"flipX",i.flipX),C=o(e,"flipY",i.flipY),M=d(e,"interpolation",i.interpolation),R=function(t,e,i,s){if("texture"===i){var n=s,r=void 0;Array.isArray(s)?(n=s[0],r=s[1]):s.hasOwnProperty("value")?(n=s.value,Array.isArray(s.value)?(n=s.value[0],r=s.value[1]):"string"==typeof s.value&&(n=s.value)):"string"==typeof s&&(n=s),t.addFrame(e,n,r,l(s,"delay",y),d(s,"duration",x),d(s,"hold",b),d(s,"repeat",S),d(s,"repeatDelay",E),o(s,"flipX",_),o(s,"flipY",C))}else{var u=p(i,s),c=h(d(s,"interpolation",M));t.add(e,i,u.getEnd,u.getStart,u.getActive,a(d(s,"ease",w),d(s,"easeParams",T)),l(s,"delay",y),d(s,"duration",x),o(s,"yoyo",A),d(s,"hold",b),d(s,"repeat",S),d(s,"repeatDelay",E),o(s,"flipX",_),o(s,"flipY",C),c,c?s:null)}},P=new v(t,g),O=0;O{var s=i(502),n=i(20494),r=i(63130),o=i(65868),a=i(10850),h=i(68061),l=i(45641);t.exports=function(t,e){if(e instanceof l)return e.parent=t,e;var i,u=new l(t);u.startDelay=a(e,"delay",0),u.completeDelay=n(e,"completeDelay",0),u.loop=Math.round(n(e,"loop",a(e,"repeat",0))),u.loopDelay=Math.round(n(e,"loopDelay",a(e,"repeatDelay",0))),u.paused=r(e,"paused",!1),u.persist=r(e,"persist",!0),u.callbackScope=a(e,"callbackScope",u);var c=s.TYPES;for(i=0;i{t.exports={GetBoolean:i(63130),GetEaseFunction:i(21902),GetInterpolationFunction:i(4840),GetNewValue:i(28348),GetProps:i(92407),GetTargets:i(65868),GetValueOp:i(9744),NumberTweenBuilder:i(68710),StaggerBuilder:i(91944),TweenBuilder:i(68061)}},5570:t=>{t.exports="active"},6383:t=>{t.exports="complete"},72582:t=>{t.exports="loop"},90281:t=>{t.exports="pause"},80803:t=>{t.exports="repeat"},13640:t=>{t.exports="resume"},10472:t=>{t.exports="start"},5379:t=>{t.exports="stop"},43449:t=>{t.exports="update"},61541:t=>{t.exports="yoyo"},54272:(t,e,i)=>{t.exports={TWEEN_ACTIVE:i(5570),TWEEN_COMPLETE:i(6383),TWEEN_LOOP:i(72582),TWEEN_PAUSE:i(90281),TWEEN_RESUME:i(13640),TWEEN_REPEAT:i(80803),TWEEN_START:i(10472),TWEEN_STOP:i(5379),TWEEN_UPDATE:i(43449),TWEEN_YOYO:i(61541)}},75193:(t,e,i)=>{var s={States:i(55303),Builders:i(79619),Events:i(54272),TweenManager:i(64532),Tween:i(39366),TweenData:i(15718),TweenFrameData:i(96490),BaseTween:i(502),TweenChain:i(45641)};t.exports=s},502:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(54272),o=i(55303),a=new s({Extends:n,initialize:function(t){n.call(this),this.parent=t,this.data=[],this.totalData=0,this.startDelay=0,this.hasStarted=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=o.PENDING,this.paused=!1,this.callbacks={onActive:null,onComplete:null,onLoop:null,onPause:null,onRepeat:null,onResume:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope,this.persist=!1},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return!this.paused&&this.isActive()},isPaused:function(){return this.paused},pause:function(){return this.paused||(this.paused=!0,this.dispatchEvent(r.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(r.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(r.TWEEN_COMPLETE,"onComplete")},complete:function(t){return void 0===t&&(t=0),t?(this.setCompleteDelayState(),this.countdown=t):this.onCompleteHandler(),this},completeAfterLoop:function(t){return void 0===t&&(t=0),this.loopCounter>t&&(this.loopCounter=t),this},remove:function(){return this.parent.remove(this),this},stop:function(){return this.isRemoved()||this.isPendingRemove()||this.isDestroyed()||(this.dispatchEvent(r.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(t){this.countdown-=t,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(r.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(t){return this.countdown-=t,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(r.TWEEN_START,"onStart"),t=0),t},updateCompleteDelay:function(t){this.countdown-=t,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(t,e,i){return void 0===i&&(i=[]),this.callbacks.hasOwnProperty(t)&&(this.callbacks[t]={func:e,params:i}),this},setPendingState:function(){this.state=o.PENDING},setActiveState:function(){this.state=o.ACTIVE},setLoopDelayState:function(){this.state=o.LOOP_DELAY},setCompleteDelayState:function(){this.state=o.COMPLETE_DELAY},setStartDelayState:function(){this.state=o.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=o.PENDING_REMOVE},setRemovedState:function(){this.state=o.REMOVED},setFinishedState:function(){this.state=o.FINISHED},setDestroyedState:function(){this.state=o.DESTROYED},isPending:function(){return this.state===o.PENDING},isActive:function(){return this.state===o.ACTIVE},isLoopDelayed:function(){return this.state===o.LOOP_DELAY},isCompleteDelayed:function(){return this.state===o.COMPLETE_DELAY},isStartDelayed:function(){return this.state===o.START_DELAY},isPendingRemove:function(){return this.state===o.PENDING_REMOVE},isRemoved:function(){return this.state===o.REMOVED},isFinished:function(){return this.state===o.FINISHED},isDestroyed:function(){return this.state===o.DESTROYED},destroy:function(){this.data&&this.data.forEach((function(t){t.destroy()})),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});a.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],t.exports=a},65521:(t,e,i)=>{var s=i(56694),n=i(54272),r=i(55303),o=new s({initialize:function(t,e,i,s,n,r,o,a,h,l){this.tween=t,this.targetIndex=e,this.duration=s,this.totalDuration=0,this.delay=0,this.getDelay=i,this.yoyo=n,this.hold=r,this.repeat=o,this.repeatDelay=a,this.repeatCounter=0,this.flipX=h,this.flipY=l,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(t){void 0===t&&(t=this.current),this.tween.targets[this.targetIndex][this.key]=t},setCreatedState:function(){this.state=r.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=r.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=r.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=r.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=r.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=r.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=r.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=r.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===r.CREATED},isDelayed:function(){return this.state===r.DELAY},isPendingRender:function(){return this.state===r.PENDING_RENDER},isPlayingForward:function(){return this.state===r.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===r.PLAYING_BACKWARD},isHolding:function(){return this.state===r.HOLD_DELAY},isRepeating:function(){return this.state===r.REPEAT_DELAY},isComplete:function(){return this.state===r.COMPLETE},setStateFromEnd:function(t){this.yoyo?this.onRepeat(t,!0,!0):this.repeatCounter>0?this.onRepeat(t,!0,!1):this.setCompleteState()},setStateFromStart:function(t){this.repeatCounter>0?this.onRepeat(t,!1):this.setCompleteState()},reset:function(){var t=this.tween,e=t.totalTargets,i=this.targetIndex,s=t.targets[i],n=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(s,n,0,i,e,t),this.repeatCounter=-1===this.repeat?r.MAX:this.repeat,this.setPendingRenderState();var o=this.duration+this.hold;this.yoyo&&(o+=this.duration);var a=o+this.repeatDelay;this.totalDuration=this.delay+o,-1===this.repeat?(this.totalDuration+=a*r.MAX,t.isInfinite=!0):this.repeat>0&&(this.totalDuration+=a*this.repeat),this.totalDuration>t.duration&&(t.duration=this.totalDuration),this.delay0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(t,e,i){var s=this.tween,r=s.totalTargets,o=this.targetIndex,a=s.targets[o],h=this.key,l="texture"!==h;if(this.elapsed=t,this.progress=t/this.duration,this.flipX&&a.toggleFlipX(),this.flipY&&a.toggleFlipY(),l&&(e||i)&&(this.start=this.getStartValue(a,h,this.start,o,r,s)),i)return this.setPlayingBackwardState(),void this.dispatchEvent(n.TWEEN_YOYO,"onYoyo");this.repeatCounter--,l&&(this.end=this.getEndValue(a,h,this.start,o,r,s)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-t,l&&(this.current=this.start,a[h]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(n.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});t.exports=o},99730:t=>{t.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1,persist:!1,interpolation:null}},53709:t=>{t.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","interpolation","loop","loopDelay","onActive","onActiveParams","onComplete","onCompleteParams","onLoop","onLoopParams","onPause","onPauseParams","onRepeat","onRepeatParams","onResume","onResumeParams","onStart","onStartParams","onStop","onStopParams","onUpdate","onUpdateParams","onYoyo","onYoyoParams","paused","persist","props","repeat","repeatDelay","targets","yoyo"]},39366:(t,e,i)=>{var s=i(502),n=i(56694),r=i(54272),o=i(99325),a=i(61286),h=i(83392),l=i(55303),u=i(15718),c=i(96490),d=new n({Extends:s,initialize:function(t,e){s.call(this,t),this.targets=e,this.totalTargets=e.length,this.isSeeking=!1,this.isInfinite=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0},add:function(t,e,i,s,n,r,o,a,h,l,c,d,p,f,v,g){var m=new u(this,t,e,i,s,n,r,o,a,h,l,c,d,p,f,v,g);return this.totalData=this.data.push(m),m},addFrame:function(t,e,i,s,n,r,o,a,h,l){var u=new c(this,t,e,i,s,n,r,o,a,h,l);return this.totalData=this.data.push(u),u},getValue:function(t){void 0===t&&(t=0);var e=null;return this.data&&(e=this.data[t].current),e},hasTarget:function(t){return this.targets&&-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){if(void 0===i&&(i=!1),"texture"!==t&&(this.isPlayingForward()||this.isPlayingBackward()))for(var s=0;s0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(r.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,s.prototype.onCompleteHandler.call(this)},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed Tween",this),this):((this.isPendingRemove()||this.isFinished())&&this.seek(),this.paused=!1,this.setActiveState(),this)},seek:function(t,e,i){if(void 0===t&&(t=0),void 0===e&&(e=16.6),void 0===i&&(i=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;i||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive");var s=this.paused;if(this.paused=!1,t>0){for(var n=Math.floor(t/e),o=t-n*e,a=0;a0&&this.update(o)}return this.paused=s,this.isSeeking=!1,this},initTweenData:function(t){void 0===t&&(t=!1),this.duration=0,this.startDelay=h.MAX_SAFE_INTEGER;for(var e=this.data,i=0;i0?s+n+(s+o)*r:s+n},reset:function(t){return void 0===t&&(t=!1),this.elapsed=0,this.totalElapsed=0,this.progress=0,this.totalProgress=0,this.loopCounter=this.loop,-1===this.loop&&(this.isInfinite=!0,this.loopCounter=l.MAX),t||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive")),this},update:function(t){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(t*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(t),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(t),!1;this.hasStarted||(this.startDelay-=t,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(r.TWEEN_START,"onStart"),t=0));var e=!1;if(this.isActive())for(var i=this.data,s=0;s{var s=i(66458),n=i(502),r=i(56694),o=i(54272),a=i(99325),h=i(61286),l=i(55303),u=new r({Extends:n,initialize:function(t){n.call(this,t),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=-1===this.loop?l.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this.dispatchEvent(o.TWEEN_ACTIVE,"onActive"),this},add:function(t){var e=this.parent.create(t);Array.isArray(e)||(e=[e]);for(var i=this.data,s=0;s0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(o.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed TweenChain",this),this):((this.isPendingRemove()||this.isPending())&&this.resetTweens(),this.paused=!1,this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this)},resetTweens:function(){for(var t=this.data,e=this.totalData,i=0;i{var s=i(65521),n=i(82897),r=i(56694),o=i(54272),a=new r({Extends:s,initialize:function(t,e,i,n,r,o,a,h,l,u,c,d,p,f,v,g,m){s.call(this,t,e,h,l,u,c,d,p,f,v),this.key=i,this.getActiveValue=o,this.getEndValue=n,this.getStartValue=r,this.ease=a,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=g,this.interpolationData=m},reset:function(t){s.prototype.reset.call(this);var e=this.tween.targets[this.targetIndex],i=this.key;t&&(e[i]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(e[i]=this.getActiveValue(e,i,0))},update:function(t){var e=this.tween,i=e.totalTargets,s=this.targetIndex,r=e.targets[s],a=this.key;if(!r)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=t,this.elapsed<=0&&(this.elapsed=0,t=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(o.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(r,a,r[a],s,i,e),this.end=this.getEndValue(r,a,this.start,s,i,e),this.current=this.start,r[a]=this.start,this.setPlayingForwardState(),!0;var h=this.isPlayingForward(),l=this.isPlayingBackward();if(h||l){var u=this.elapsed,c=this.duration,d=0,p=!1;(u+=t)>=c?(d=u-c,u=c,p=!0):u<0&&(u=0);var f=n(u/c,0,1);if(this.elapsed=u,this.progress=f,this.previous=this.current,p)h?(this.current=this.end,r[a]=this.end,this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(d)):(this.current=this.start,r[a]=this.start,this.setStateFromStart(d));else{h||(f=1-f);var v=this.ease(f);this.interpolation?this.current=this.interpolation(this.interpolationData,v):this.current=this.start+(this.end-this.start)*v,r[a]=this.current}this.dispatchEvent(o.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(t,e){var i=this.tween;if(!i.isSeeking){var s=i.targets[this.targetIndex],n=this.key,r=this.current,o=this.previous;i.emit(t,i,n,s,r,o);var a=i.callbacks[e];a&&a.func.apply(i.callbackScope,[i,s,n,r,o].concat(a.params))}},destroy:function(){s.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});t.exports=a},96490:(t,e,i)=>{var s=i(65521),n=i(82897),r=i(56694),o=i(54272),a=new r({Extends:s,initialize:function(t,e,i,n,r,o,a,h,l,u,c){s.call(this,t,e,r,o,!1,a,h,l,u,c),this.key="texture",this.startTexture=null,this.endTexture=i,this.startFrame=null,this.endFrame=n,this.yoyo=0!==h},reset:function(t){s.prototype.reset.call(this);var e=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=e.texture.key,this.startFrame=e.frame.name),t&&e.setTexture(this.startTexture,this.startFrame)},update:function(t){var e=this.tween,i=this.targetIndex,s=e.targets[i];if(!s)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=t,this.elapsed<=0&&(this.elapsed=0,t=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(o.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&s.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var r=this.isPlayingForward(),a=this.isPlayingBackward();if(r||a){var h=this.elapsed,l=this.duration,u=0,c=!1;(h+=t)>=l?(u=h-l,h=l,c=!0):h<0&&(h=0);var d=n(h/l,0,1);this.elapsed=h,this.progress=d,c&&(r?(s.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(u)):(s.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(u))),this.dispatchEvent(o.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(t,e){var i=this.tween;if(!i.isSeeking){var s=i.targets[this.targetIndex],n=this.key;i.emit(t,i,n,s);var r=i.callbacks[e];r&&r.func.apply(i.callbackScope,[i,s,n].concat(r.params))}},destroy:function(){s.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});t.exports=a},55303:t=>{t.exports={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999}},56694:t=>{function e(t,e,i){var s=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&s.value&&"object"==typeof s.value&&(s=s.value),!(!s||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(s))&&(void 0===s.enumerable&&(s.enumerable=!0),void 0===s.configurable&&(s.configurable=!0),s)}function i(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,s,n,o){for(var a in s)if(s.hasOwnProperty(a)){var h=e(s,a,n);if(!1!==h){if(i((o||t).prototype,a)){if(r.ignoreFinals)continue;throw new Error("cannot override final property '"+a+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,a,h)}else t.prototype[a]=s[a]}}function n(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i{t.exports=function(){}},10618:t=>{t.exports=function(){return null}},78991:t=>{t.exports=function(t,e,i,s,n){if(void 0===n&&(n=t),i>0){var r=i-t.length;if(r<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),s&&s.call(n,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a{t.exports=function(t,e,i,s,n,r){if(void 0===i&&(i=0),void 0===r&&(r=t),s>0){var o=s-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),n&&n.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;s>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var l=e[h];t.splice(i,0,l),n&&n.call(r,l)}return e}},58742:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i{var s=i(45838);t.exports=function(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);var o=0;if(s(t,n,r))for(var a=n;a{t.exports=function(t,e,i){var s,n=[null];for(s=3;s{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r)){var o,a=[null];for(o=5;o{t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var s,n,r=1;if(i){if(te.length&&(r=e.length),i?(s=e[r-1][i],(n=e[r][i])-t<=t-s?e[r]:e[r-1]):(s=e[r-1],(n=e[r])-t<=t-s?n:s)}},5454:t=>{var e=function(t,i){void 0===i&&(i=[]);for(var s=0;s{var s=i(45838);t.exports=function(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);var o=[];if(s(t,n,r))for(var a=n;a{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r))for(var o=n;o{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var s=e+Math.floor(Math.random()*i);return void 0===t[s]?null:t[s]}},24218:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),n=t.indexOf(i);if(s<0||n<0)throw new Error("Supplied items must be elements of the same array");return s>n||(t.splice(s,1),n===t.length-1?t.push(e):t.splice(n,0,e)),t}},58258:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),n=t.indexOf(i);if(s<0||n<0)throw new Error("Supplied items must be elements of the same array");return s{t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var s=t[i-1],n=t.indexOf(s);t[i]=s,t[n]=e}return t}},68396:t=>{t.exports=function(t,e,i){var s=t.indexOf(e);if(-1===s||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return s!==i&&(t.splice(s,1),t.splice(i,0,e)),e}},27555:t=>{t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i{t.exports=function(t,e,i,s){var n,r=[],o=!1;if((i||s)&&(o=!0,i||(i=""),s||(s="")),e=e;n--)o?r.push(i+n.toString()+s):r.push(n);else for(n=t;n<=e;n++)o?r.push(i+n.toString()+s):r.push(n);return r}},89955:(t,e,i)=>{var s=i(67233);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var n=[],r=Math.max(s((e-t)/(i||1)),0),o=0;o{function e(t,e,i){var s=t[e];t[e]=t[i],t[i]=s}function i(t,e){return te?1:0}var s=function(t,n,r,o,a){for(void 0===r&&(r=0),void 0===o&&(o=t.length-1),void 0===a&&(a=i);o>r;){if(o-r>600){var h=o-r+1,l=n-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),p=Math.max(r,Math.floor(n-l*c/h+d)),f=Math.min(o,Math.floor(n+(h-l)*c/h+d));s(t,n,p,f,a)}var v=t[n],g=r,m=o;for(e(t,r,n),a(t[o],v)>0&&e(t,r,o);g0;)m--}0===a(t[r],v)?e(t,r,m):e(t,++m,o),m<=n&&(r=m+1),n<=m&&(o=m-1)}};t.exports=s},75757:(t,e,i)=>{var s=i(10850),n=i(18592),r=function(t,e,i){for(var s=[],n=0;n{var s=i(72677);t.exports=function(t,e,i,n){var r;if(void 0===n&&(n=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(s(t,r),i&&i.call(n,e),e):null;for(var o=e.length-1,a=[];o>=0;){var h=e[o];-1!==(r=t.indexOf(h))&&(s(t,r),a.push(h),i&&i.call(n,h)),o--}return a}},8324:(t,e,i)=>{var s=i(72677);t.exports=function(t,e,i,n){if(void 0===n&&(n=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var r=s(t,e);return i&&i.call(n,r),r}},47427:(t,e,i)=>{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),s(t,e,i)){var o=i-e,a=t.splice(e,o);if(n)for(var h=0;h{var s=i(72677);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var n=e+Math.floor(Math.random()*i);return s(t,n)}},80402:t=>{t.exports=function(t,e,i){var s=t.indexOf(e),n=t.indexOf(i);return-1!==s&&-1===n&&(t[s]=i,!0)}},77640:t=>{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e,i,s){var n=t.length;if(e<0||e>n||e>=i||i>n){if(s)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},27847:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},6034:(t,e,i)=>{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r))for(var o=n;o{t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[i],t[i]=s}return t}},28834:t=>{t.exports=function(t){var e=/\D/g;return t.sort((function(t,i){return parseInt(t.replace(e,""),10)-parseInt(i.replace(e,""),10)})),t}},72677:t=>{t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,s=t[e],n=e;n{var s=i(77290);function n(t,e){return String(t).localeCompare(e)}function r(t,e,i,s){var n,r,o,a,h,l=t.length,u=0,c=2*i;for(n=0;nl&&(r=l),o>l&&(o=l),a=n,h=r;;)if(a{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),n=t.indexOf(i);if(s<0||n<0)throw new Error("Supplied items must be elements of the same array");return t[s]=i,t[n]=e,t}},59959:(t,e,i)=>{t.exports={Matrix:i(13515),Add:i(78991),AddAt:i(48522),BringToTop:i(58742),CountAllMatching:i(30164),Each:i(36337),EachInRange:i(46208),FindClosestInSorted:i(2406),Flatten:i(5454),GetAll:i(71608),GetFirst:i(51463),GetRandom:i(72861),MoveDown:i(51172),MoveTo:i(68396),MoveUp:i(27555),MoveAbove:i(24218),MoveBelow:i(58258),NumberArray:i(13401),NumberArrayStep:i(89955),QuickSelect:i(53466),Range:i(75757),Remove:i(66458),RemoveAt:i(8324),RemoveBetween:i(47427),RemoveRandomElement:i(50147),Replace:i(80402),RotateLeft:i(77640),RotateRight:i(38487),SafeRange:i(45838),SendToBack:i(27847),SetAll:i(6034),Shuffle:i(18592),SortByDigits:i(28834),SpliceOne:i(72677),StableSort:i(17922),Swap:i(96928)}},97494:t=>{t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i{var s=i(76400),n=i(97494);t.exports=function(t){var e="";if(!n(t))return e;for(var i=0;i{t.exports=function(t){return t.reverse()}},51995:t=>{t.exports=function(t){for(var e=0;e{var s=i(63515);t.exports=function(t){return s(t,180)}},42549:(t,e,i)=>{var s=i(63515);t.exports=function(t){return s(t,90)}},63515:(t,e,i)=>{var s=i(97494),n=i(78581);t.exports=function(t,e){if(void 0===e&&(e=90),!s(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=n(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=n(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i{var s=i(63515);t.exports=function(t){return s(t,-90)}},27365:(t,e,i)=>{var s=i(77640),n=i(38487);t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?s(t,Math.abs(i)):n(t,i)),0!==e)for(var r=0;r{t.exports=function(t){for(var e=t.length,i=t[0].length,s=new Array(i),n=0;n-1;r--)s[n][r]=t[r][n]}return s}},13515:(t,e,i)=>{t.exports={CheckMatrix:i(97494),MatrixToString:i(68428),ReverseColumns:i(59521),ReverseRows:i(51995),Rotate180:i(89011),RotateLeft:i(42549),RotateMatrix:i(63515),RotateRight:i(14305),Translate:i(27365),TransposeMatrix:i(78581)}},40581:t=>{var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";t.exports=function(t,i){for(var s=new Uint8Array(t),n=s.length,r=i?"data:"+i+";base64,":"",o=0;o>2],r+=e[(3&s[o])<<4|s[o+1]>>4],r+=e[(15&s[o+1])<<2|s[o+2]>>6],r+=e[63&s[o+2]];return n%3==2?r=r.substring(0,r.length-1)+"=":n%3==1&&(r=r.substring(0,r.length-2)+"=="),r}},82329:t=>{for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(256),s=0;s>4,u[h++]=(15&s)<<4|n>>2,u[h++]=(3&n)<<6|63&r;return l}},78417:(t,e,i)=>{t.exports={ArrayBufferToBase64:i(40581),Base64ToArrayBuffer:i(82329)}},22178:(t,e,i)=>{t.exports={Array:i(59959),Base64:i(78417),Objects:i(64615),String:i(50379),NOOP:i(72283),NULL:i(10618)}},32742:t=>{t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},28699:t=>{var e=function(t){var i,s,n;if("object"!=typeof t||null===t)return t;for(n in i=Array.isArray(t)?[]:{},t)s=t[n],i[n]=e(s);return i};t.exports=e},98611:(t,e,i)=>{var s=i(42911),n=function(){var t,e,i,r,o,a,h=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},l=2),u===l&&(h=this,--l);l{var s=i(5923),n=i(10850);t.exports=function(t,e,i){var r=n(t,e,null);if(null===r)return i;if(Array.isArray(r))return s.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return s.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return s.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},72632:t=>{t.exports=function(t,e,i){var s=typeof t;return t&&"number"!==s&&"string"!==s&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},94324:(t,e,i)=>{var s=i(10850),n=i(82897);t.exports=function(t,e,i,r,o){void 0===o&&(o=i);var a=s(t,e,o);return n(a,i,r)}},10850:t=>{t.exports=function(t,e,i,s){if(!t&&!s||"number"==typeof t)return i;if(t&&t.hasOwnProperty(e))return t[e];if(s&&s.hasOwnProperty(e))return s[e];if(-1!==e.indexOf(".")){for(var n=e.split("."),r=t,o=s,a=i,h=i,l=!0,u=!0,c=0;c{t.exports=function(t,e){for(var i=0;i{t.exports=function(t,e){for(var i=0;i{t.exports=function(t,e){return t.hasOwnProperty(e)}},42911:t=>{t.exports=function(t){if(!t||"object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},30657:(t,e,i)=>{var s=i(32742);t.exports=function(t,e){var i=s(t);for(var n in e)i.hasOwnProperty(n)||(i[n]=e[n]);return i}},72066:(t,e,i)=>{var s=i(32742);t.exports=function(t,e){var i=s(t);for(var n in e)i.hasOwnProperty(n)&&(i[n]=e[n]);return i}},28820:(t,e,i)=>{var s=i(19256);t.exports=function(t,e){for(var i={},n=0;n{t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))return t[e]=i,!0;if(-1!==e.indexOf(".")){for(var s=e.split("."),n=t,r=t,o=0;o{t.exports={Clone:i(32742),DeepCopy:i(28699),Extend:i(98611),GetAdvancedValue:i(20494),GetFastValue:i(72632),GetMinMaxValue:i(94324),GetValue:i(10850),HasAll:i(87701),HasAny:i(53523),HasValue:i(19256),IsPlainObject:i(42911),Merge:i(30657),MergeRight:i(72066),Pick:i(28820),SetValue:i(22440)}},69429:t=>{t.exports=function(t,e){return t.replace(/%([0-9]+)/g,(function(t,i){return e[Number(i)-1]}))}},76400:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===s&&(s=3);var n=0;if(e+1>=(t=t.toString()).length)switch(s){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((n=e-t.length)/2);t=new Array(n-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},76872:t=>{t.exports=function(t,e){return 0===e?t.slice(1):t.slice(0,e-1)+t.slice(e)}},8051:t=>{t.exports=function(t){return t.split("").reverse().join("")}},76583:t=>{t.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}},40587:t=>{t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},50379:(t,e,i)=>{t.exports={Format:i(69429),Pad:i(76400),RemoveAt:i(76872),Reverse:i(8051),UppercaseFirst:i(40587),UUID:i(76583)}}},e={};function i(s){var n=e[s];if(void 0!==n)return n.exports;var r=e[s]={exports:{}};return t[s](r,r.exports,i),r.exports}return i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i(10654)})())); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Phaser",[],e):"object"==typeof exports?exports.Phaser=e():t.Phaser=e()}(this,(()=>(()=>{var t={6659:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function s(){}function n(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function r(t,e,s,r,o){if("function"!=typeof s)throw new TypeError("The listener must be a function");var a=new n(s,r||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 s:delete t._events[e]}function a(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(i=!1)),a.prototype.eventNames=function(){var t,s,n=[];if(0===this._eventsCount)return n;for(s in t=this._events)e.call(t,s)&&n.push(i?s.slice(1):s);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},a.prototype.listeners=function(t){var e=i?i+t:t,s=this._events[e];if(!s)return[];if(s.fn)return[s.fn];for(var n=0,r=s.length,o=new Array(r);n{var s=i(82590);t.exports=function(t,e,i,n){for(var r=t[0],o=1;o{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"angle",e,i,n,r)}},22015:t=>{t.exports=function(t,e,i){for(var s=0;s{t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=i;s{t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=i;s{var s=i(40327),n=i(84093),r=i(72632),o=i(72283),a=new(i(71030))({sys:{queueDepthSort:o,events:{once:o}}},0,0,1,1).setOrigin(0,0);t.exports=function(t,e){void 0===e&&(e={});var i=e.hasOwnProperty("width"),o=e.hasOwnProperty("height"),h=r(e,"width",-1),l=r(e,"height",-1),u=r(e,"cellWidth",1),c=r(e,"cellHeight",u),d=r(e,"position",n.TOP_LEFT),p=r(e,"x",0),f=r(e,"y",0),v=0,g=0,m=h*u,y=l*c;a.setPosition(p,f),a.setSize(u,c);for(var x=0;x{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"alpha",e,i,n,r)}},3877:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"x",e,i,n,r)}},71020:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"x",e,n,o,a),s(t,"y",i,r,o,a)}},28970:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"y",e,i,n,r)}},82249:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=6.28);for(var n=i,r=(s-i)/t.length,o=e.x,a=e.y,h=e.radius,l=0;l{t.exports=function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=6.28);for(var n=i,r=(s-i)/t.length,o=e.width/2,a=e.height/2,h=0;h{var s=i(8570);t.exports=function(t,e){for(var i=s(e,t.length),n=0;n{var s=i(40053),n=i(77640),r=i(38487);t.exports=function(t,e,i){void 0===i&&(i=0);var o=s(e,!1,t.length);i>0?n(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a{var s=i(58813);t.exports=function(t,e,i){var n=s({x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},i),r=s({x1:e.x2,y1:e.y2,x2:e.x3,y2:e.y3},i),o=s({x1:e.x3,y1:e.y3,x2:e.x1,y2:e.y1},i);n.pop(),r.pop(),o.pop();for(var a=(n=n.concat(r,o)).length/t.length,h=0,l=0;l{t.exports=function(t,e,i){for(var s=0;s{t.exports=function(t,e,i,s,n,r){var o;void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=1);var a=0,h=t.length;if(1===r)for(o=n;o=0;o--)t[o][e]+=i+a*s,a++;return t}},23646:t=>{t.exports=function(t,e,i,s,n,r){var o;void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=1);var a=0,h=t.length;if(1===r)for(o=n;o=0;o--)t[o][e]=i+a*s,a++;return t}},4392:(t,e,i)=>{var s=i(30977);t.exports=function(t,e){for(var i=0;i{var s=i(72006);t.exports=function(t,e){for(var i=0;i{var s=i(74077);t.exports=function(t,e){for(var i=0;i{var s=i(30001);t.exports=function(t,e){for(var i=0;i{var s=i(99761);t.exports=function(t,e){for(var i=0;i{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"rotation",e,i,n,r)}},87299:(t,e,i)=>{var s=i(72395),n=i(53996);t.exports=function(t,e,i){for(var r=e.x,o=e.y,a=0;a{var s=i(72395);t.exports=function(t,e,i,n){var r=e.x,o=e.y;if(0===n)return t;for(var a=0;a{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"scaleX",e,i,n,r)}},51449:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"scaleX",e,n,o,a),s(t,"scaleY",i,r,o,a)}},64895:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"scaleY",e,i,n,r)}},30329:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"alpha",e,i,n,r)}},43954:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n){return s(t,"blendMode",e,0,i,n)}},70688:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"depth",e,i,n,r)}},8314:t=>{t.exports=function(t,e,i){for(var s=0;s{var s=i(23646);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"originX",e,n,o,a),s(t,"originY",i,r,o,a),t.forEach((function(t){t.updateDisplayOrigin()})),t}},38767:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"rotation",e,i,n,r)}},18584:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"scaleX",e,n,o,a),s(t,"scaleY",i,r,o,a)}},17381:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scaleX",e,i,n,r)}},74370:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scaleY",e,i,n,r)}},27773:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"scrollFactorX",e,n,o,a),s(t,"scrollFactorY",i,r,o,a)}},75257:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scrollFactorX",e,i,n,r)}},54512:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scrollFactorY",e,i,n,r)}},69423:t=>{t.exports=function(t,e,i,s,n){for(var r=0;r{var s=i(23646);t.exports=function(t,e,i,n){return s(t,"visible",e,0,i,n)}},94833:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"x",e,i,n,r)}},14284:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"x",e,n,o,a),s(t,"y",i,r,o,a)}},96574:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"y",e,i,n,r)}},74086:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){var o,a;void 0===n&&(n=0),void 0===r&&(r=new s);var h=t.length;if(1===h)o=t[0].x,a=t[0].y,t[0].x=e,t[0].y=i;else{var l=1,u=0;0===n&&(u=h-1,l=h-2),o=t[u].x,a=t[u].y,t[u].x=e,t[u].y=i;for(var c=0;c=h||-1===l)){var d=t[l],p=d.x,f=d.y;d.x=o,d.y=a,o=p,a=f,0===n?l--:l++}}return r.x=o,r.y=a,r}},86347:(t,e,i)=>{var s=i(18592);t.exports=function(t){return s(t)}},1558:(t,e,i)=>{var s=i(5514);t.exports=function(t,e,i,n,r){void 0===r&&(r=!1);var o,a=Math.abs(n-i)/t.length;if(r)for(o=0;o{var s=i(87736);t.exports=function(t,e,i,n,r){void 0===r&&(r=!1);var o,a=Math.abs(n-i)/t.length;if(r)for(o=0;o{t.exports=function(t,e,i,s,n){if(void 0===n&&(n=!1),0===t.length)return t;if(1===t.length)return n?t[0][e]+=(s+i)/2:t[0][e]=(s+i)/2,t;var r,o=Math.abs(s-i)/(t.length-1);if(n)for(r=0;r{t.exports=function(t){for(var e=0;e{var s=i(1071);t.exports=function(t,e,i){void 0===i&&(i=0);for(var n=0;n{t.exports={AlignTo:i(62270),Angle:i(61148),Call:i(22015),GetFirst:i(31060),GetLast:i(52367),GridAlign:i(12673),IncAlpha:i(691),IncX:i(3877),IncXY:i(71020),IncY:i(28970),PlaceOnCircle:i(82249),PlaceOnEllipse:i(30285),PlaceOnLine:i(61557),PlaceOnRectangle:i(63549),PlaceOnTriangle:i(51629),PlayAnimation:i(1045),PropertyValueInc:i(6124),PropertyValueSet:i(23646),RandomCircle:i(4392),RandomEllipse:i(94985),RandomLine:i(63305),RandomRectangle:i(90739),RandomTriangle:i(91417),Rotate:i(26182),RotateAround:i(87299),RotateAroundDistance:i(92194),ScaleX:i(30363),ScaleXY:i(51449),ScaleY:i(64895),SetAlpha:i(30329),SetBlendMode:i(43954),SetDepth:i(70688),SetHitArea:i(8314),SetOrigin:i(12894),SetRotation:i(38767),SetScale:i(18584),SetScaleX:i(17381),SetScaleY:i(74370),SetScrollFactor:i(27773),SetScrollFactorX:i(75257),SetScrollFactorY:i(54512),SetTint:i(69423),SetVisible:i(58291),SetX:i(94833),SetXY:i(14284),SetY:i(96574),ShiftPosition:i(74086),Shuffle:i(86347),SmootherStep:i(9938),SmoothStep:i(1558),Spread:i(71060),ToggleVisible:i(11207),WrapInRectangle:i(24404)}},85463:(t,e,i)=>{var s=i(82897),n=i(56694),r=i(16938),o=i(2406),a=i(71519),h=i(10850),l=i(28834),u=new n({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,h(i,"frames",[]),h(i,"defaultTextureKey",null),h(i,"sortFrames",!0)),this.frameRate=h(i,"frameRate",null),this.duration=h(i,"duration",null),this.msPerFrame,this.skipMissedFrames=h(i,"skipMissedFrames",!0),this.delay=h(i,"delay",0),this.repeat=h(i,"repeat",0),this.repeatDelay=h(i,"repeatDelay",0),this.yoyo=h(i,"yoyo",!1),this.showBeforeDelay=h(i,"showBeforeDelay",!1),this.showOnStart=h(i,"showOnStart",!1),this.hideOnComplete=h(i,"hideOnComplete",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(r.PAUSE_ALL,this.pause,this),this.manager.on(r.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(t,e,i,s){null===i&&null===s?(t.frameRate=24,t.duration=24/e*1e3):i&&null===s?(t.duration=i,t.frameRate=e/(i/1e3)):(t.frameRate=s,t.duration=e/s*1e3),t.msPerFrame=1e3/t.frameRate},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i=this.getFrames(this.manager.textureManager,e);if(i.length>0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var s=this.frames.slice(0,t),n=this.frames.slice(t);this.frames=s.concat(i,n)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t0){r.isLast=!0,r.nextFrame=c[0],c[0].prevFrame=r;var y=1/(c.length-1);for(o=0;o0?t.inReverse&&t.forward?t.forward=!1:this.repeatAnimation(t):t.complete():this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e||(e=!1),t.inReverse===!e&&t.repeatCounter>0)return(0===t.repeatDelay||t.pendingRepeat)&&(t.forward=e),void this.repeatAnimation(t);if(t.inReverse===e||0!==t.repeatCounter){t.forward=e;var i=e?t.currentFrame.nextFrame:t.currentFrame.prevFrame;this.updateAndGetNextTick(t,i)}else t.complete()},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.yoyo?this.handleYoyoFrame(t,!0):t.repeatCounter>0?(t.inReverse&&!t.forward||(t.forward=!0),this.repeatAnimation(t)):t.complete():this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.setCurrentFrame(e),this.getNextTick(t)},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop){if(0===t._pendingStopValue)return t.stop();t._pendingStopValue--}t.repeatDelay>0&&!t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t.repeatDelay):(t.repeatCounter--,t.forward?t.setCurrentFrame(t.currentFrame.nextFrame):t.setCurrentFrame(t.currentFrame.prevFrame),t.isPlaying&&(this.getNextTick(t),t.handleRepeat()))},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showBeforeDelay:this.showBeforeDelay,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach((function(e){t.frames.push(e.toJSON())})),t},updateFrameSequence:function(){for(var t,e=this.frames.length,i=1/(e-1),s=0;s1?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):e>1&&(t.prevFrame=this.frames[s-1],t.nextFrame=this.frames[s+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(r.PAUSE_ALL,this.pause,this),this.manager.off(r.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var t=0;t{var s=new(i(56694))({initialize:function(t,e,i,s,n){void 0===n&&(n=!1),this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=s,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=n},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});t.exports=s},90249:(t,e,i)=>{var s=i(85463),n=i(56694),r=i(33885),o=i(6659),a=i(16938),h=i(97081),l=i(72632),u=i(10850),c=i(83392),d=i(13401),p=i(76400),f=new n({Extends:o,initialize:function(t){o.call(this),this.game=t,this.textureManager=null,this.globalTimeScale=1,this.anims=new r,this.mixes=new r,this.paused=!1,this.name="AnimationManager",t.events.once(h.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(h.DESTROY,this.destroy,this)},addMix:function(t,e,i){var s=this.anims,n=this.mixes,r="string"==typeof t?t:t.key,o="string"==typeof e?e:e.key;if(s.has(r)&&s.has(o)){var a=n.get(r);a||(a={}),a[o]=i,n.set(r,a)}return this},removeMix:function(t,e){var i=this.mixes,s="string"==typeof t?t:t.key,n=i.get(s);if(n)if(e){var r="string"==typeof e?e:e.key;n.hasOwnProperty(r)&&delete n[r]}else e||i.delete(s);return this},getMix:function(t,e){var i=this.mixes,s="string"==typeof t?t:t.key,n="string"==typeof e?e:e.key,r=i.get(s);return r&&r.hasOwnProperty(n)?r[n]:0},add:function(t,e){return this.anims.has(t)?(console.warn("Animation key exists: "+t),this):(e.key=t,this.anims.set(t,e),this.emit(a.ADD_ANIMATION,t,e),this)},exists:function(t){return this.anims.has(t)},createFromAseprite:function(t,e,i){var s=[],n=this.game.cache.json.get(t);if(!n)return s;var r=this,o=u(n,"meta",null),a=u(n,"frames",null);o&&a&&u(o,"frameTags",[]).forEach((function(n){var o=[],h=l(n,"name",null),u=l(n,"from",0),d=l(n,"to",0),p=l(n,"direction","forward");if(h&&(!e||e&&e.indexOf(h)>-1)){for(var f=0,v=u;v<=d;v++){var g=v.toString(),m=a[g];if(m){var y=l(m,"duration",c.MAX_SAFE_INTEGER);o.push({key:t,frame:g,duration:y}),f+=y}}var x=f/o.length;o.forEach((function(t){t.duration-=x})),"reverse"===p&&(o=o.reverse());var T,w={key:h,frames:o,duration:f,yoyo:"pingpong"===p};i?i.anims&&(T=i.anims.create(w)):T=r.create(w),T&&s.push(T)}}));return s},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))||(i=new s(this,e,t),this.anims.set(e,i),this.emit(a.ADD_ANIMATION,e,i))),i},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var s=0;s{var s=i(56694),n=i(33885),r=i(72632),o=i(16938),a=i(85463),h=new s({initialize:function(t){this.parent=t,this.animationManager=t.scene.sys.anims,this.animationManager.on(o.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.showBeforeDelay=!1,this.showOnStart=!1,this.hideOnComplete=!1,this.forward=!0,this.inReverse=!1,this.accumulator=0,this.nextTick=0,this.delayCounter=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},chain:function(t){var e=this.parent;if(void 0===t)return this.nextAnimsQueue.length=0,this.nextAnim=null,e;Array.isArray(t)||(t=[t]);for(var i=0;is.getTotalFrames()&&(h=0);var l=s.frames[h];0!==h||this.forward||(l=s.getLastFrame()),this.currentFrame=l}else console.warn("Missing animation: "+i);return this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.setCurrentFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.setCurrentFrame(t),this.parent},playAfterDelay:function(t,e){if(this.isPlaying){var i=this.nextAnim,s=this.nextAnimsQueue;i&&s.unshift(i),this.nextAnim=t,this._pendingStop=1,this._pendingStopValue=e}else this.delayCounter=e,this.play(t,!0);return this.parent},playAfterRepeat:function(t,e){if(void 0===e&&(e=1),this.isPlaying){var i=this.nextAnim,s=this.nextAnimsQueue;i&&s.unshift(i),-1!==this.repeatCounter&&e>this.repeatCounter&&(e=this.repeatCounter),this.nextAnim=t,this._pendingStop=2,this._pendingStopValue=e}else this.play(t);return this.parent},play:function(t,e){void 0===e&&(e=!1);var i=this.currentAnim,s=this.parent,n="string"==typeof t?t:t.key;if(e&&this.isPlaying&&i.key===n)return s;if(i&&this.isPlaying){var r=this.animationManager.getMix(i.key,t);if(r>0)return this.playAfterDelay(t,r)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t)},playReverse:function(t,e){void 0===e&&(e=!1);var i="string"==typeof t?t:t.key;return e&&this.isPlaying&&this.currentAnim.key===i?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t))},startAnimation:function(t){this.load(t);var e=this.currentAnim,i=this.parent;return e?(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat,e.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,0===this.delayCounter?this.handleStart():this.showBeforeDelay&&this.setCurrentFrame(this.currentFrame),i):i},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(o.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(o.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(o.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(o.ANIMATION_COMPLETE,o.ANIMATION_COMPLETE_KEY)},emitEvents:function(t,e){var i=this.currentAnim;if(i){var s=this.currentFrame,n=this.parent,r=s.textureFrame;n.emit(t,i,s,n,r),e&&n.emit(e+i.key,i,s,n,r)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var t=this.currentFrame;if(!t)return 0;var e=t.progress;return this.inReverse&&(e*=-1),e},setProgress:function(t){return this.forward||(t=1-t),this.setCurrentFrame(this.currentAnim.getFrameByProgress(t)),this.parent},setRepeat:function(t){return this.repeatCounter=-1===t?Number.MAX_VALUE:t,this.parent},globalRemove:function(t,e){void 0===e&&(e=this.currentAnim),this.isPlaying&&e.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var i=this.currentAnim,s=this.parent;return i?(e&&(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat),i.getFirstTick(this),this.emitEvents(o.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!t,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(i.frames[0]),this.parent):s},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(t)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(t)}return this.parent},stopAfterDelay:function(t){return this._pendingStop=1,this._pendingStopValue=t,this.parent},stopAfterRepeat:function(t){return void 0===t&&(t=1),-1!==this.repeatCounter&&t>this.repeatCounter&&(t=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=t,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(t,e){var i=this.currentAnim;if(this.isPlaying&&i&&!i.paused){if(this.accumulator+=e*this.timeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.stop();if(this.hasStarted){if(this.accumulator>=this.nextTick&&(this.forward?i.nextFrame(this):i.previousFrame(this),this.isPlaying&&0===this._pendingStop&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var s=0;do{this.forward?i.nextFrame(this):i.previousFrame(this),s++}while(this.isPlaying&&this.accumulator>this.nextTick&&s<60)}}else this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart())}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),t.setAlpha&&(e.alpha=t.alpha),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(o.ANIMATION_UPDATE),3===this._pendingStop&&this._pendingStopValue===t&&this.stop()),e},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(t){return this.anims?this.anims.get(t):null},exists:function(t){return!!this.anims&&this.anims.has(t)},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))||(i=new a(this,e,t),this.anims||(this.anims=new n),this.anims.set(e,i))),i},createFromAseprite:function(t,e){return this.animationManager.createFromAseprite(t,e,this.parent)},generateFrameNames:function(t,e){return this.animationManager.generateFrameNames(t,e)},generateFrameNumbers:function(t,e){return this.animationManager.generateFrameNumbers(t,e)},remove:function(t){var e=this.get(t);return e&&(this.currentAnim===e&&this.stop(),this.anims.delete(t)),e},destroy:function(){this.animationManager.off(o.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});t.exports=h},44509:t=>{t.exports="add"},84563:t=>{t.exports="animationcomplete"},61586:t=>{t.exports="animationcomplete-"},72175:t=>{t.exports="animationrepeat"},568:t=>{t.exports="animationrestart"},37690:t=>{t.exports="animationstart"},58525:t=>{t.exports="animationstop"},5243:t=>{t.exports="animationupdate"},10598:t=>{t.exports="pauseall"},4860:t=>{t.exports="remove"},31865:t=>{t.exports="resumeall"},16938:(t,e,i)=>{t.exports={ADD_ANIMATION:i(44509),ANIMATION_COMPLETE:i(84563),ANIMATION_COMPLETE_KEY:i(61586),ANIMATION_REPEAT:i(72175),ANIMATION_RESTART:i(568),ANIMATION_START:i(37690),ANIMATION_STOP:i(58525),ANIMATION_UPDATE:i(5243),PAUSE_ALL:i(10598),REMOVE_ANIMATION:i(4860),RESUME_ALL:i(31865)}},13517:(t,e,i)=>{t.exports={Animation:i(85463),AnimationFrame:i(71519),AnimationManager:i(90249),AnimationState:i(16569),Events:i(16938)}},23740:(t,e,i)=>{var s=i(56694),n=i(33885),r=i(6659),o=i(69773),a=new s({initialize:function(){this.entries=new n,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit(o.ADD,this,t,e),this},has:function(t){return this.entries.has(t)},exists:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit(o.REMOVE,this,t,e.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=a},43474:(t,e,i)=>{var s=i(23740),n=i(56694),r=i(97081),o=new n({initialize:function(t){this.game=t,this.binary=new s,this.bitmapFont=new s,this.json=new s,this.physics=new s,this.shader=new s,this.audio=new s,this.video=new s,this.text=new s,this.html=new s,this.obj=new s,this.tilemap=new s,this.xml=new s,this.custom={},this.game.events.once(r.DESTROY,this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new s),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],e=0;e{t.exports="add"},75968:t=>{t.exports="remove"},69773:(t,e,i)=>{t.exports={ADD:i(94762),REMOVE:i(75968)}},45820:(t,e,i)=>{t.exports={BaseCache:i(23740),CacheManager:i(43474),Events:i(69773)}},51052:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(75606),o=i(6659),a=i(89787),h=i(74118),l=i(69360),u=i(93222),c=i(93736),d=new s({Extends:o,Mixins:[n.Alpha,n.Visible],initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),o.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new h,this.dirty=!0,this._x=t,this._y=e,this._width=i,this._height=s,this._bounds=new h,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new l,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new c(i/2,s/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0},addToRenderList:function(t){this.renderList.push(t)},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this},getScroll:function(t,e,i){void 0===i&&(i=new c);var s=.5*this.width,n=.5*this.height;return i.x=t-s,i.y=e-n,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOnX:function(t){var e=.5*this.width;return this.midPoint.x=t,this.scrollX=t-e,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(t){var e=.5*this.height;return this.midPoint.y=t,this.scrollY=t-e,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(t,e){return this.centerOnX(t),this.centerOnY(e),this},centerToBounds:function(){if(this.useBounds){var t=this._bounds,e=.5*this.width,i=.5*this.height;this.midPoint.set(t.centerX,t.centerY),this.scrollX=t.centerX-e,this.scrollY=t.centerY-i}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(t){if(this.disableCull)return t;var e=this.matrix.matrix,i=e[0],s=e[1],n=e[2],r=e[3],o=i*r-s*n;if(!o)return t;var a=e[4],h=e[5],l=this.scrollX,u=this.scrollY,c=this.width,d=this.height,p=this.y,f=p+d,v=this.x,g=v+c,m=this.culledObjects,y=t.length;o=1/o,m.length=0;for(var x=0;xv&&E*i+S*n+ap&&E*s+S*r+hn&&(t=n),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,s=e.y+(i-this.height)/2,n=Math.max(s,s+e.height-i);return tn&&(t=n),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=r(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,s,n){return void 0===n&&(n=!1),this._bounds.setTo(t,e,i,s),this.dirty=!0,this.useBounds=!0,n?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t,e){void 0===e&&(e=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=t,this.isSceneCamera=e;var i=t.sys;return this.sceneManager=i.game.scene,this.scaleManager=i.scale,this.cameraManager=i.cameras,this.updateSystem(),this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setZoom:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),0===t&&(t=.001),0===e&&(e=.001),this.zoomX=t,this.zoomY=e,this},setMask:function(t,e){return void 0===e&&(e=!0),this.mask=t,this._maskCamera=e?this.cameraManager.default:this,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},update:function(){},setIsSceneCamera:function(t){return this.isSceneCamera=t,this},updateSystem:function(){if(this.scaleManager&&this.isSceneCamera){var t=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,e=this.sceneManager;t&&!this._customViewport?e.customViewports++:!t&&this._customViewport&&e.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit(a.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(t){this._x=t,this.updateSystem()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.updateSystem()}},width:{get:function(){return this._width},set:function(t){this._width=t,this.updateSystem()}},height:{get:function(){return this._height},set:function(t){this._height=t,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(t){t!==this._scrollX&&(this._scrollX=t,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(t){t!==this._scrollY&&(this._scrollY=t,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(t){this._zoomX=t,this._zoomY=t,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(t){this._zoomX=t,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(t){this._zoomY=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});t.exports=d},47751:(t,e,i)=>{var s=i(51052),n=i(79993),r=i(82897),o=i(56694),a=i(64937),h=i(53030),l=i(89787),u=i(42798),c=i(74118),d=i(93736),p=new o({Extends:s,Mixins:[a.Pipeline],initialize:function(t,e,i,n){s.call(this,t,e,i,n),this.postPipelines=[],this.pipelineData={},this.inputEnabled=!0,this.fadeEffect=new h.Fade(this),this.flashEffect=new h.Flash(this),this.shakeEffect=new h.Shake(this),this.panEffect=new h.Pan(this),this.rotateToEffect=new h.RotateTo(this),this.zoomEffect=new h.Zoom(this),this.lerp=new d(1,1),this.followOffset=new d,this.deadzone=null,this._follow=null},setDeadzone:function(t,e){if(void 0===t)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=t,this.deadzone.height=e):this.deadzone=new c(0,0,t,e),this._follow){var i=this.width/2,s=this.height/2,r=this._follow.x-this.followOffset.x,o=this._follow.y-this.followOffset.y;this.midPoint.set(r,o),this.scrollX=r-i,this.scrollY=o-s}n(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(t,e,i,s,n,r){return this.fadeEffect.start(!1,t,e,i,s,!0,n,r)},fadeOut:function(t,e,i,s,n,r){return this.fadeEffect.start(!0,t,e,i,s,!0,n,r)},fadeFrom:function(t,e,i,s,n,r,o){return this.fadeEffect.start(!1,t,e,i,s,n,r,o)},fade:function(t,e,i,s,n,r,o){return this.fadeEffect.start(!0,t,e,i,s,n,r,o)},flash:function(t,e,i,s,n,r,o){return this.flashEffect.start(t,e,i,s,n,r,o)},shake:function(t,e,i,s,n){return this.shakeEffect.start(t,e,i,s,n)},pan:function(t,e,i,s,n,r,o){return this.panEffect.start(t,e,i,s,n,r,o)},rotateTo:function(t,e,i,s,n,r,o){return this.rotateToEffect.start(t,e,i,s,n,r,o)},zoomTo:function(t,e,i,s,n,r){return this.zoomEffect.start(t,e,i,s,n,r)},preRender:function(){this.renderList.length=0;var t=this.width,e=this.height,i=.5*t,s=.5*e,r=this.zoom,o=this.matrix,a=t*this.originX,h=e*this.originY,c=this._follow,d=this.deadzone,p=this.scrollX,f=this.scrollY;d&&n(d,this.midPoint.x,this.midPoint.y);var v=!1;if(this.roundPixels&&(a=Math.floor(a),h=Math.floor(h)),c&&!this.panEffect.isRunning){var g=this.lerp,m=c.x-this.followOffset.x,y=c.y-this.followOffset.y;this.roundPixels&&(m=Math.floor(m),y=Math.floor(y)),d?(md.right&&(p=u(p,p+(m-d.right),g.x)),yd.bottom&&(f=u(f,f+(y-d.bottom),g.y))):(p=u(p,m-a,g.x),f=u(f,y-h,g.y)),v=!0}this.useBounds&&(p=this.clampX(p),f=this.clampY(f)),this.roundPixels&&(p=Math.floor(p),f=Math.floor(f)),this.scrollX=p,this.scrollY=f;var x=p+i,T=f+s;this.midPoint.set(x,T);var w=t/r,b=e/r,E=x-w/2,S=T-b/2;this.roundPixels&&(E=Math.floor(E),S=Math.floor(S)),this.worldView.setTo(E,S,w,b),o.applyITRS(Math.floor(this.x+a),Math.floor(this.y+h),this.rotation,r,r),o.translate(-a,-h),this.shakeEffect.preRender(),v&&this.emit(l.FOLLOW_UPDATE,this,c)},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,s,n,o){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===s&&(s=i),void 0===n&&(n=0),void 0===o&&(o=n),this._follow=t,this.roundPixels=e,i=r(i,0,1),s=r(s,0,1),this.lerp.set(i,s),this.followOffset.set(n,o);var a=this.width/2,h=this.height/2,l=t.x-n,u=t.y-o;return this.midPoint.set(l,u),this.scrollX=l-a,this.scrollY=u-h,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.rotateToEffect.update(t,e),this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.resetFX(),s.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=p},62382:(t,e,i)=>{var s=i(47751),n=i(56694),r=i(72632),o=i(91963),a=i(94287),h=i(40444),l=i(7599),u=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.roundPixels=t.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,t.sys.events.once(l.BOOT,this.boot,this),t.sys.events.on(l.START,this.start,this)},boot:function(){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new s(0,0,t.scale.width,t.scale.height).setScene(this.scene),t.game.scale.on(h.RESIZE,this.onResize,this),this.systems.events.once(l.DESTROY,this.destroy,this)},start:function(){if(!this.main){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0]}var e=this.systems.events;e.on(l.UPDATE,this.update,this),e.once(l.SHUTDOWN,this.shutdown,this)},add:function(t,e,i,n,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=new s(t,e,i,n);return a.setName(o),a.setScene(this.scene),a.setRoundPixels(this.roundPixels),a.id=this.getNextID(),this.cameras.push(a),r&&(this.main=a),a},addExisting:function(t,e){return void 0===e&&(e=!1),-1===this.cameras.indexOf(t)?(t.id=this.getNextID(),t.setRoundPixels(this.roundPixels),this.cameras.push(t),e&&(this.main=t),t):null},getNextID:function(){for(var t=this.cameras,e=1,i=0;i<32;i++){for(var s=!1,n=0;n0){r.preRender();var o=this.getVisibleChildren(e.getChildren(),r);t.render(i,o,r)}}},getVisibleChildren:function(t,e){return t.filter((function(t){return t.willRender(e)}))},resetAll:function(){for(var t=0;t{var s=i(82897),n=i(56694),r=i(89787),o=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,o,a,h){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===o&&(o=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),!o&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=s,this.blue=n,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h;var l=t?r.FADE_OUT_START:r.FADE_IN_START;return this.camera.emit(l,this.camera,this,e,i,s,n),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var s=i(82897),n=i(56694),r=i(89787),o=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=1,this.progress=0,this._elapsed=0,this._alpha,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,o,a){return void 0===t&&(t=250),void 0===e&&(e=255),void 0===i&&(i=255),void 0===s&&(s=255),void 0===n&&(n=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!n&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,this.red=e,this.green=i,this.blue=s,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a,this.camera.emit(r.FLASH_START,this.camera,this,t,e,i,s)),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var s=i(82897),n=i(56694),r=i(35060),o=i(89787),a=i(93736),h=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=new a,this.current=new a,this.destination=new a,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,a,h){void 0===i&&(i=1e3),void 0===s&&(s=r.Linear),void 0===n&&(n=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene);var l=this.camera;return!n&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(l.scrollX,l.scrollY),this.destination.set(t,e),l.getScroll(t,e,this.current),"string"==typeof s&&r.hasOwnProperty(s)?this.ease=r[s]:"function"==typeof s&&(this.ease=s),this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h,this.camera.emit(o.PAN_START,this.camera,this,i,t,e)),l},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=s(this._elapsed/this.duration,0,1);this.progress=i;var n=this.camera;if(this._elapsed{var s=i(82897),n=i(56694),r=i(89787),o=i(35060),a=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope,this.clockwise=!0,this.shortestPath=!1},start:function(t,e,i,s,n,a,h){void 0===i&&(i=1e3),void 0===s&&(s=o.Linear),void 0===n&&(n=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),void 0===e&&(e=!1),this.shortestPath=e;var l=t;t<0?(l=-1*t,this.clockwise=!1):this.clockwise=!0;var u=360*Math.PI/180;l-=Math.floor(l/u)*u;var c=this.camera;if(!n&&this.isRunning)return c;if(this.isRunning=!0,this.duration=i,this.progress=0,this.source=c.rotation,this.destination=l,"string"==typeof s&&o.hasOwnProperty(s)?this.ease=o[s]:"function"==typeof s&&(this.ease=s),this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h,this.shortestPath){var d=0,p=0;(d=this.destination>this.source?Math.abs(this.destination-this.source):Math.abs(this.destination+u)-this.source)<(p=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+u)-this.destination)?this.clockwise=!0:d>p&&(this.clockwise=!1)}return this.camera.emit(r.ROTATE_START,this.camera,this,i,l),c},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=s(this._elapsed/this.duration,0,1);this.progress=i;var n=this.camera;if(this._elapsed=l?Math.abs(h-l):Math.abs(h+a)-l;var u=0;u=this.clockwise?n.rotation+o*r:n.rotation-o*r,n.rotation=u,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,n,i,u)}else n.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,n,i,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(r.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});t.exports=a},3241:(t,e,i)=>{var s=i(82897),n=i(56694),r=i(89787),o=i(93736),a=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new o,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===i&&(i=!1),void 0===s&&(s=null),void 0===n&&(n=this.camera.scene),!i&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,"number"==typeof e?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=s,this._onUpdateScope=n,this.camera.emit(r.SHAKE_START,this.camera,this,t,e)),this.camera},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){if(this.isRunning)if(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var s=i(82897),n=i(56694),r=i(35060),o=i(89787),a=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,a){void 0===e&&(e=1e3),void 0===i&&(i=r.Linear),void 0===s&&(s=!1),void 0===n&&(n=null),void 0===a&&(a=this.camera.scene);var h=this.camera;return!s&&this.isRunning||(this.isRunning=!0,this.duration=e,this.progress=0,this.source=h.zoom,this.destination=t,"string"==typeof i&&r.hasOwnProperty(i)?this.ease=r[i]:"function"==typeof i&&(this.ease=i),this._elapsed=0,this._onUpdate=n,this._onUpdateScope=a,this.camera.emit(o.ZOOM_START,this.camera,this,e,t)),h},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._elapsed{t.exports={Fade:i(92522),Flash:i(22151),Pan:i(37551),Shake:i(3241),RotateTo:i(1771),Zoom:i(13383)}},39577:t=>{t.exports="cameradestroy"},85373:t=>{t.exports="camerafadeincomplete"},92057:t=>{t.exports="camerafadeinstart"},1903:t=>{t.exports="camerafadeoutcomplete"},96131:t=>{t.exports="camerafadeoutstart"},85409:t=>{t.exports="cameraflashcomplete"},25500:t=>{t.exports="cameraflashstart"},44071:t=>{t.exports="followupdate"},19818:t=>{t.exports="camerapancomplete"},80002:t=>{t.exports="camerapanstart"},87966:t=>{t.exports="postrender"},74217:t=>{t.exports="prerender"},34805:t=>{t.exports="camerarotatecomplete"},30408:t=>{t.exports="camerarotatestart"},49856:t=>{t.exports="camerashakecomplete"},69189:t=>{t.exports="camerashakestart"},67657:t=>{t.exports="camerazoomcomplete"},14229:t=>{t.exports="camerazoomstart"},89787:(t,e,i)=>{t.exports={DESTROY:i(39577),FADE_IN_COMPLETE:i(85373),FADE_IN_START:i(92057),FADE_OUT_COMPLETE:i(1903),FADE_OUT_START:i(96131),FLASH_COMPLETE:i(85409),FLASH_START:i(25500),FOLLOW_UPDATE:i(44071),PAN_COMPLETE:i(19818),PAN_START:i(80002),POST_RENDER:i(87966),PRE_RENDER:i(74217),ROTATE_COMPLETE:i(34805),ROTATE_START:i(30408),SHAKE_COMPLETE:i(49856),SHAKE_START:i(69189),ZOOM_COMPLETE:i(67657),ZOOM_START:i(14229)}},32356:(t,e,i)=>{t.exports={Camera:i(47751),BaseCamera:i(51052),CameraManager:i(62382),Effects:i(53030),Events:i(89787)}},84219:(t,e,i)=>{var s=i(56694),n=i(10850),r=new s({initialize:function(t){this.camera=n(t,"camera",null),this.left=n(t,"left",null),this.right=n(t,"right",null),this.up=n(t,"up",null),this.down=n(t,"down",null),this.zoomIn=n(t,"zoomIn",null),this.zoomOut=n(t,"zoomOut",null),this.zoomSpeed=n(t,"zoomSpeed",.01),this.minZoom=n(t,"minZoom",.001),this.maxZoom=n(t,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=n(t,"speed",null);"number"==typeof e?(this.speedX=e,this.speedY=e):(this.speedX=n(t,"speed.x",0),this.speedY=n(t,"speed.y",0)),this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this.up&&this.up.isDown?e.scrollY-=this.speedY*t|0:this.down&&this.down.isDown&&(e.scrollY+=this.speedY*t|0),this.left&&this.left.isDown?e.scrollX-=this.speedX*t|0:this.right&&this.right.isDown&&(e.scrollX+=this.speedX*t|0),this.zoomIn&&this.zoomIn.isDown?(e.zoom-=this.zoomSpeed,e.zoomthis.maxZoom&&(e.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},69370:(t,e,i)=>{var s=i(56694),n=i(10850),r=new s({initialize:function(t){this.camera=n(t,"camera",null),this.left=n(t,"left",null),this.right=n(t,"right",null),this.up=n(t,"up",null),this.down=n(t,"down",null),this.zoomIn=n(t,"zoomIn",null),this.zoomOut=n(t,"zoomOut",null),this.zoomSpeed=n(t,"zoomSpeed",.01),this.minZoom=n(t,"minZoom",.001),this.maxZoom=n(t,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=n(t,"acceleration",null);"number"==typeof e?(this.accelX=e,this.accelY=e):(this.accelX=n(t,"acceleration.x",0),this.accelY=n(t,"acceleration.y",0)),this.dragX=0,this.dragY=0;var i=n(t,"drag",null);"number"==typeof i?(this.dragX=i,this.dragY=i):(this.dragX=n(t,"drag.x",0),this.dragY=n(t,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var s=n(t,"maxSpeed",null);"number"==typeof s?(this.maxSpeedX=s,this.maxSpeedY=s):(this.maxSpeedX=n(t,"maxSpeed.x",0),this.maxSpeedY=n(t,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this._speedX>0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoomthis.maxZoom&&(e.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},6524:(t,e,i)=>{t.exports={FixedKeyControl:i(84219),SmoothedKeyControl:i(69370)}},44143:(t,e,i)=>{t.exports={Controls:i(6524),Scene2D:i(32356)}},86459:(t,e,i)=>{var s={VERSION:"3.60.0-beta.18",BlendModes:i(95723),ScaleModes:i(27394),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=s},14033:(t,e,i)=>{var s=i(56694),n=i(86459),r=i(18360),o=i(77290),a=i(72632),h=i(10850),l=i(42911),u=i(72283),c=i(5923),d=i(65641),p=i(93222),f=new s({initialize:function(t){void 0===t&&(t={});var e=h(t,"scale",null);this.width=h(e,"width",1024,t),this.height=h(e,"height",768,t),this.zoom=h(e,"zoom",1,t),this.parent=h(e,"parent",void 0,t),this.scaleMode=h(e,e?"mode":"scaleMode",0,t),this.expandParent=h(e,"expandParent",!0,t),this.autoRound=h(e,"autoRound",!1,t),this.autoCenter=h(e,"autoCenter",0,t),this.resizeInterval=h(e,"resizeInterval",500,t),this.fullscreenTarget=h(e,"fullscreenTarget",null,t),this.minWidth=h(e,"minWidth",0,t),this.maxWidth=h(e,"maxWidth",0,t),this.minHeight=h(e,"minHeight",0,t),this.maxHeight=h(e,"maxHeight",0,t),this.renderType=h(t,"type",n.AUTO),this.canvas=h(t,"canvas",null),this.context=h(t,"context",null),this.canvasStyle=h(t,"canvasStyle",null),this.customEnvironment=h(t,"customEnvironment",!1),this.sceneConfig=h(t,"scene",null),this.seed=h(t,"seed",[(Date.now()*Math.random()).toString()]),c.RND=new c.RandomDataGenerator(this.seed),this.gameTitle=h(t,"title",""),this.gameURL=h(t,"url","https://phaser.io"),this.gameVersion=h(t,"version",""),this.autoFocus=h(t,"autoFocus",!0),this.stableSort=h(t,"stableSort",-1),-1===this.stableSort&&(this.stableSort=o.browser.es2019?1:0),o.features.stableSort=this.stableSort,this.domCreateContainer=h(t,"dom.createContainer",!1),this.domPointerEvents=h(t,"dom.pointerEvents","none"),this.inputKeyboard=h(t,"input.keyboard",!0),this.inputKeyboardEventTarget=h(t,"input.keyboard.target",window),this.inputKeyboardCapture=h(t,"input.keyboard.capture",[]),this.inputMouse=h(t,"input.mouse",!0),this.inputMouseEventTarget=h(t,"input.mouse.target",null),this.inputMousePreventDefaultDown=h(t,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=h(t,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=h(t,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=h(t,"input.mouse.preventDefaultWheel",!0),this.inputTouch=h(t,"input.touch",o.input.touch),this.inputTouchEventTarget=h(t,"input.touch.target",null),this.inputTouchCapture=h(t,"input.touch.capture",!0),this.inputActivePointers=h(t,"input.activePointers",1),this.inputSmoothFactor=h(t,"input.smoothFactor",0),this.inputWindowEvents=h(t,"input.windowEvents",!0),this.inputGamepad=h(t,"input.gamepad",!1),this.inputGamepadEventTarget=h(t,"input.gamepad.target",window),this.disableContextMenu=h(t,"disableContextMenu",!1),this.audio=h(t,"audio",{}),this.hideBanner=!1===h(t,"banner",null),this.hidePhaser=h(t,"banner.hidePhaser",!1),this.bannerTextColor=h(t,"banner.text","#ffffff"),this.bannerBackgroundColor=h(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=h(t,"fps",null);var i=h(t,"render",null);this.pipeline=h(i,"pipeline",null,t),this.autoMobilePipeline=h(i,"autoMobilePipeline",!0,t),this.defaultPipeline=h(i,"defaultPipeline",d.MULTI_PIPELINE,t),this.antialias=h(i,"antialias",!0,t),this.antialiasGL=h(i,"antialiasGL",!0,t),this.mipmapFilter=h(i,"mipmapFilter","LINEAR",t),this.desynchronized=h(i,"desynchronized",!1,t),this.roundPixels=h(i,"roundPixels",!1,t),this.pixelArt=h(i,"pixelArt",1!==this.zoom,t),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=h(i,"transparent",!1,t),this.clearBeforeRender=h(i,"clearBeforeRender",!0,t),this.preserveDrawingBuffer=h(i,"preserveDrawingBuffer",!1,t),this.premultipliedAlpha=h(i,"premultipliedAlpha",!0,t),this.failIfMajorPerformanceCaveat=h(i,"failIfMajorPerformanceCaveat",!1,t),this.powerPreference=h(i,"powerPreference","default",t),this.batchSize=h(i,"batchSize",4096,t),this.maxTextures=h(i,"maxTextures",-1,t),this.maxLights=h(i,"maxLights",10,t);var s=h(t,"backgroundColor",0);this.backgroundColor=p(s),this.transparent&&(this.backgroundColor=p(0),this.backgroundColor.alpha=0),this.preBoot=h(t,"callbacks.preBoot",u),this.postBoot=h(t,"callbacks.postBoot",u),this.physics=h(t,"physics",{}),this.defaultPhysicsSystem=h(this.physics,"default",!1),this.loaderBaseURL=h(t,"loader.baseURL",""),this.loaderPath=h(t,"loader.path",""),this.loaderMaxParallelDownloads=h(t,"loader.maxParallelDownloads",o.os.android?6:32),this.loaderCrossOrigin=h(t,"loader.crossOrigin",void 0),this.loaderResponseType=h(t,"loader.responseType",""),this.loaderAsync=h(t,"loader.async",!0),this.loaderUser=h(t,"loader.user",""),this.loaderPassword=h(t,"loader.password",""),this.loaderTimeout=h(t,"loader.timeout",0),this.loaderWithCredentials=h(t,"loader.withCredentials",!1),this.loaderImageLoadType=h(t,"loader.imageLoadType","XHR"),this.loaderLocalScheme=h(t,"loader.localScheme",["file://","capacitor://"]),this.installGlobalPlugins=[],this.installScenePlugins=[];var f=h(t,"plugins",null),v=r.DefaultScene;f&&(Array.isArray(f)?this.defaultPlugins=f:l(f)&&(this.installGlobalPlugins=a(f,"global",[]),this.installScenePlugins=a(f,"scene",[]),Array.isArray(f.default)?v=f.default:Array.isArray(f.defaultMerge)&&(v=v.concat(f.defaultMerge)))),this.defaultPlugins=v;var g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=h(t,"images.default",g+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=h(t,"images.missing",g+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=h(t,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=n.WEBGL:window.FORCE_CANVAS&&(this.renderType=n.CANVAS))}});t.exports=f},50150:(t,e,i)=>{var s=i(70616),n=i(61068),r=i(86459),o=i(90185);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===r.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==r.HEADLESS)if(e.renderType===r.AUTO&&(e.renderType=o.webGL?r.WEBGL:r.CANVAS),e.renderType===r.WEBGL){if(!o.webGL)throw new Error("Cannot create WebGL context, aborting.")}else{if(e.renderType!==r.CANVAS)throw new Error("Unknown value for renderer type: "+e.renderType);if(!o.canvas)throw new Error("Cannot create Canvas context, aborting.")}e.antialias||n.disableSmoothing();var a,h,l=t.scale.baseSize,u=l.width,c=l.height;(e.canvas?(t.canvas=e.canvas,t.canvas.width=u,t.canvas.height=c):t.canvas=n.create(t,u,c,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||s.setCrisp(t.canvas),e.renderType!==r.HEADLESS)&&(a=i(91135),h=i(11857),e.renderType===r.WEBGL?t.renderer=new h(t):(t.renderer=new a(t),t.context=t.renderer.gameContext))}},77291:(t,e,i)=>{var s=i(86459);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===s.CANVAS?i="Canvas":e.renderType===s.HEADLESS&&(i="Headless");var n,r=e.audio,o=t.device.audio;if(n=o.webAudio&&!r.disableWebAudio?"Web Audio":r.noAudio||!o.webAudio&&!o.audioData?"No Audio":"HTML5 Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+s.VERSION+" / https://phaser.io");else{var a,h="",l=[h];if(Array.isArray(e.bannerBackgroundColor))e.bannerBackgroundColor.forEach((function(t){h=h.concat("%c "),l.push("background: "+t),a=t})),l[l.length-1]="color: "+e.bannerTextColor+"; background: "+a;else h=h.concat("%c "),l.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor);l.push("background: transparent"),e.gameTitle&&(h=h.concat(e.gameTitle),e.gameVersion&&(h=h.concat(" v"+e.gameVersion)),e.hidePhaser||(h=h.concat(" / ")));e.hidePhaser||(h=h.concat("Phaser v"+s.VERSION+" ("+i+" | "+n+")")),h=h.concat(" %c "+e.gameURL),l[0]=h,console.log.apply(console,l)}}}},15213:(t,e,i)=>{var s=i(99584),n=i(90249),r=i(43474),o=i(61068),a=i(56694),h=i(14033),l=i(85178),u=i(50150),c=i(81078),d=i(77291),p=i(77290),f=i(21546),v=i(6659),g=i(97081),m=i(69898),y=i(91963),x=i(49274),T=i(756),w=i(13553),b=i(38203),E=i(6237),S=i(26617),A=i(26493),C=i(84191),_=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new v,this.anims=new n(this),this.textures=new E(this),this.cache=new r(this),this.registry=new c(this,new v),this.input=new m(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=p,this.scale=new T(this,this.config),this.sound=null,this.sound=C.create(this),this.loop=new S(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,f(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),d(this),s(this.canvas,this.config.parent),this.textures.once(b.READY,this.texturesReady,this),this.events.emit(g.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(g.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),A(this);var t=this.events;t.on(g.HIDDEN,this.onHidden,this),t.on(g.VISIBLE,this.onVisible,this),t.on(g.BLUR,this.onBlur,this),t.on(g.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(g.PRE_STEP,t,e),i.emit(g.STEP,t,e),this.scene.update(t,e),i.emit(g.POST_STEP,t,e);var s=this.renderer;s.preRender(),i.emit(g.PRE_RENDER,s,t,e),this.scene.render(s),s.postRender(),i.emit(g.POST_RENDER,s,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(g.PRE_STEP,t,e),i.emit(g.STEP,t,e),this.scene.update(t,e),i.emit(g.POST_STEP,t,e),this.scene.isProcessing=!1,i.emit(g.PRE_RENDER,null,t,e),i.emit(g.POST_RENDER,null,t,e)},onHidden:function(){this.loop.pause(),this.events.emit(g.PAUSE)},pause:function(){this.onHidden()},onVisible:function(){this.loop.resume(),this.events.emit(g.RESUME)},resume:function(){this.onVisible()},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.scene.destroy(),this.events.emit(g.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=_},26617:(t,e,i)=>{var s=i(56694),n=i(10850),r=i(72283),o=i(27385),a=new s({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=n(e,"min",5),this.targetFps=n(e,"target",60),this.fpsLimit=n(e,"limit",0),this.hasFpsLimit=this.fpsLimit>0,this._limitRate=this.hasFpsLimit?1e3/this.fpsLimit:0,this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=n(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=n(e,"deltaHistory",10),this.panicMax=n(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=n(e,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0;for(var e=0;e0||!this.inFocus)&&(this._coolDown--,t=Math.min(t,this._target)),t>this._min&&(t=i[e],t=Math.min(t,this._min)),i[e]=t,this.deltaIndex++,this.deltaIndex>=s&&(this.deltaIndex=0);for(var n=0,r=0;r=this.nextFpsUpdate&&this.updateFPS(t),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(t,this.delta),this.delta=0),this.lastTime=t,this.frame++},step:function(t){this.now=t;var e=Math.max(0,t-this.lastTime);this.rawDelta=e,this.time+=this.rawDelta,this.smoothStep&&(e=this.smoothDelta(e)),this.delta=e,t>=this.nextFpsUpdate&&this.updateFPS(t),this.framesThisSecond++,this.callback(t,e),this.lastTime=t,this.frame++},tick:function(){var t=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(t):this.step(t)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){void 0===t&&(t=!1);var e=window.performance.now();if(!this.running){t&&(this.startTime+=-this.lastTime+(this.lastTime+e));var i=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(i,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0,this.fpsLimitTriggered=!1,this.tick()}},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.raf.destroy(),this.raf=null,this.game=null,this.callback=null}});t.exports=a},26493:(t,e,i)=>{var s=i(97081);t.exports=function(t){var e,i=t.events;if(void 0!==document.hidden)e="visibilitychange";else{["webkit","moz","ms"].forEach((function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")}))}e&&document.addEventListener(e,(function(t){document.hidden||"pause"===t.type?i.emit(s.HIDDEN):i.emit(s.VISIBLE)}),!1),window.onblur=function(){i.emit(s.BLUR)},window.onfocus=function(){i.emit(s.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},41651:t=>{t.exports="blur"},5520:t=>{t.exports="boot"},51673:t=>{t.exports="contextlost"},25055:t=>{t.exports="destroy"},23767:t=>{t.exports="focus"},57564:t=>{t.exports="hidden"},38327:t=>{t.exports="pause"},43807:t=>{t.exports="postrender"},73652:t=>{t.exports="poststep"},780:t=>{t.exports="prerender"},13781:t=>{t.exports="prestep"},38247:t=>{t.exports="ready"},29129:t=>{t.exports="resume"},34994:t=>{t.exports="step"},98704:t=>{t.exports="visible"},97081:(t,e,i)=>{t.exports={BLUR:i(41651),BOOT:i(5520),CONTEXT_LOST:i(51673),DESTROY:i(25055),FOCUS:i(23767),HIDDEN:i(57564),PAUSE:i(38327),POST_RENDER:i(43807),POST_STEP:i(73652),PRE_RENDER:i(780),PRE_STEP:i(13781),READY:i(38247),RESUME:i(29129),STEP:i(34994),VISIBLE:i(98704)}},80293:(t,e,i)=>{t.exports={Config:i(14033),CreateRenderer:i(50150),DebugHeader:i(77291),Events:i(97081),TimeStep:i(26617),VisibilityHandler:i(26493)}},52780:(t,e,i)=>{var s=i(81543),n=i(61068),r=i(10850);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",s),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),p=Math.floor(Math.abs(e[0].length*a)),f=Math.floor(Math.abs(e.length*h));i||(i=n.create2D(this,p,f),l=!1,u=!1),l&&(i.width=p,i.height=f);var v=i.getContext("2d");u&&v.clearRect(0,0,p,f),c&&c(i,v);for(var g=0;g{t.exports={GenerateTexture:i(52780),Palettes:i(25235)}},81543:t=>{t.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},75846:t=>{t.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},83206:t=>{t.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},13194:t=>{t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},50686:t=>{t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},25235:(t,e,i)=>{t.exports={ARNE16:i(81543),C64:i(75846),CGA:i(83206),JMP:i(13194),MSX:i(50686)}},63120:(t,e,i)=>{var s=i(56694),n=i(34631),r=i(38517),o=i(93736),a=new s({Extends:r,initialize:function(t,e,i,s){r.call(this,"CubicBezierCurve"),Array.isArray(t)&&(s=new o(t[6],t[7]),i=new o(t[4],t[5]),e=new o(t[2],t[3]),t=new o(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i,this.p3=s},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.p0,s=this.p1,r=this.p2,a=this.p3;return e.set(n(t,i.x,s.x,r.x,a.x),n(t,i.y,s.y,r.y,a.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var s=1;s{var s=i(56694),n=i(80222),r=i(74118),o=i(93736),a=new s({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var s=Math.max(1,Math.round(i/e));return n(this.getSpacedPoints(s),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],s=this.getPoint(0,this._tmpVec2A),n=0;i.push(0);for(var r=1;r<=t;r++)n+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(s),i.push(n),s.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var s=0;s<=t;s++)i.push(this.getPoint(s/t));return i},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var s=0;s<=t;s++){var n=this.getUtoTmapping(s/t,null,t);i.push(this.getPoint(n))}return i},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=1e-4,s=t-i,n=t+i;return s<0&&(s=0),n>1&&(n=1),this.getPoint(s,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var s,n=this.getLengths(i),r=0,o=n.length;s=e?Math.min(e,n[o-1]):t*n[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=n[r=Math.floor(h+(l-h)/2)]-s)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(n[r=l]===s)return r/(o-1);var u=n[r];return(r+(s-u)/(n[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},48835:(t,e,i)=>{var s=i(56694),n=i(38517),r=i(75606),o=i(10850),a=i(23701),h=i(93736),l=new s({Extends:n,initialize:function(t,e,i,s,a,l,u,c){if("object"==typeof t){var d=t;t=o(d,"x",0),e=o(d,"y",0),i=o(d,"xRadius",0),s=o(d,"yRadius",i),a=o(d,"startAngle",0),l=o(d,"endAngle",360),u=o(d,"clockwise",!1),c=o(d,"rotation",0)}else void 0===s&&(s=i),void 0===a&&(a=0),void 0===l&&(l=360),void 0===u&&(u=!1),void 0===c&&(c=0);n.call(this,"EllipseCurve"),this.p0=new h(t,e),this._xRadius=i,this._yRadius=s,this._startAngle=r(a),this._endAngle=r(l),this._clockwise=u,this._rotation=r(c)},getStartPoint:function(t){return void 0===t&&(t=new h),this.getPoint(0,t)},getResolution:function(t){return 2*t},getPoint:function(t,e){void 0===e&&(e=new h);for(var i=2*Math.PI,s=this._endAngle-this._startAngle,n=Math.abs(s)i;)s-=i;s{var s=i(56694),n=i(38517),r=i(80222),o=i(74118),a=i(93736),h=new s({Extends:n,initialize:function(t,e){n.call(this,"LineCurve"),Array.isArray(t)&&(e=new a(t[2],t[3]),t=new a(t[0],t[1])),this.p0=t,this.p1=e,this.arcLengthDivisions=1},getBounds:function(t){return void 0===t&&(t=new o),r([this.p0,this.p1],t)},getStartPoint:function(t){return void 0===t&&(t=new a),t.copy(this.p0)},getResolution:function(t){return void 0===t&&(t=1),t},getPoint:function(t,e){return void 0===e&&(e=new a),1===t?e.copy(this.p1):(e.copy(this.p1).subtract(this.p0).scale(t).add(this.p0),e)},getPointAt:function(t,e){return this.getPoint(t,e)},getTangent:function(t,e){return void 0===e&&(e=new a),e.copy(this.p1).subtract(this.p0).normalize(),e},getUtoTmapping:function(t,e,i){var s;if(e){var n=this.getLengths(i),r=n[n.length-1];s=Math.min(e,r)/r}else s=t;return s},draw:function(t){return t.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});h.fromJSON=function(t){var e=t.points,i=new a(e[0],e[1]),s=new a(e[2],e[3]);return new h(i,s)},t.exports=h},64761:(t,e,i)=>{var s=i(56694),n=i(38517),r=i(16252),o=i(93736),a=new s({Extends:n,initialize:function(t,e,i){n.call(this,"QuadraticBezierCurve"),Array.isArray(t)&&(i=new o(t[4],t[5]),e=new o(t[2],t[3]),t=new o(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.p0,s=this.p1,n=this.p2;return e.set(r(t,i.x,s.x,n.x),r(t,i.y,s.y,n.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var s=1;s{var s=i(14976),n=i(56694),r=i(38517),o=i(93736),a=new n({Extends:r,initialize:function(t){void 0===t&&(t=[]),r.call(this,"SplineCurve"),this.points=[],this.addPoints(t)},addPoints:function(t){for(var e=0;ei.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(s(a,h.x,l.x,u.x,c.x),s(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e{t.exports={Path:i(12822),MoveTo:i(53639),CubicBezier:i(63120),Curve:i(38517),Ellipse:i(48835),Line:i(58084),QuadraticBezier:i(64761),Spline:i(11956)}},53639:(t,e,i)=>{var s=i(56694),n=i(93736),r=new s({initialize:function(t,e){this.active=!1,this.p0=new n(t,e)},getPoint:function(t,e){return void 0===e&&(e=new n),e.copy(this.p0)},getPointAt:function(t,e){return this.getPoint(t,e)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});t.exports=r},12822:(t,e,i)=>{var s=i(56694),n=i(63120),r=i(48835),o=i(61286),a=i(58084),h=i(53639),l=i(64761),u=i(74118),c=i(11956),d=i(93736),p=i(83392),f=new s({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new d,this._tmpVec2A=new d,this._tmpVec2B=new d,"object"==typeof t?this.fromJSON(t):this.startPoint.set(t,e)},add:function(t){return this.curves.push(t),this},circleTo:function(t,e,i){return void 0===e&&(e=!1),this.ellipseTo(t,t,0,360,e,i)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);return t.equals(e)||this.curves.push(new a(e,t)),this},cubicBezierTo:function(t,e,i,s,r,o){var a,h,l,u=this.getEndPoint();return t instanceof d?(a=t,h=e,l=i):(a=new d(i,s),h=new d(r,o),l=new d(t,e)),this.add(new n(u,a,h,l))},quadraticBezierTo:function(t,e,i,s){var n,r,o=this.getEndPoint();return t instanceof d?(n=t,r=e):(n=new d(i,s),r=new d(t,e)),this.add(new l(o,n,r))},draw:function(t,e){for(var i=0;i=e)return this.curves[s];s++}return null},getEndPoint:function(t){return void 0===t&&(t=new d),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),s=this.getCurveLengths(),n=0;n=i){var r=s[n]-i,o=this.curves[n],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}n++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],s=0;s1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new d),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new d),t.copy(this.startPoint)},getTangent:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),s=this.getCurveLengths(),n=0;n=i){var r=s[n]-i,o=this.curves[n],a=o.getLength(),h=0===a?0:1-r/a;return o.getTangentAt(h,e)}n++}return null},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new h(t.x,t.y)):this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e{var s=i(56694),n=i(35026),r=new s({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(n.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],s=0;s{var s=i(56694),n=i(81078),r=i(91963),o=i(7599),a=new s({Extends:n,initialize:function(t){n.call(this,t,t.sys.events),this.scene=t,this.systems=t.sys,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(o.DESTROY,this.destroy,this)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){n.prototype.destroy.call(this),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null}});r.register("DataManagerPlugin",a,"data"),t.exports=a},73569:t=>{t.exports="changedata"},15590:t=>{t.exports="changedata-"},37669:t=>{t.exports="destroy"},87090:t=>{t.exports="removedata"},90142:t=>{t.exports="setdata"},35026:(t,e,i)=>{t.exports={CHANGE_DATA:i(73569),CHANGE_DATA_KEY:i(15590),DESTROY:i(37669),REMOVE_DATA:i(87090),SET_DATA:i(90142)}},1999:(t,e,i)=>{t.exports={DataManager:i(81078),DataManagerPlugin:i(76508),Events:i(35026)}},10720:(t,e,i)=>{var s=i(1350),n={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return n;n.audioData=!!window.Audio,n.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e){var i=function(e,i){var s=t.canPlayType("audio/"+e).replace(/^no$/,"");return i?Boolean(s||t.canPlayType("audio/"+i).replace(/^no$/,"")):Boolean(s)};if(n.ogg=i('ogg; codecs="vorbis"'),n.opus=i('ogg; codecs="opus"',"opus"),n.mp3=i("mpeg"),n.wav=i("wav"),n.m4a=i("x-m4a"),n.aac=i("aac"),n.flac=i("flac","x-flac"),n.webm=i('webm; codecs="vorbis"'),""!==t.canPlayType('audio/mp4; codecs="ec-3"'))if(s.edge)n.dolby=!0;else if(s.safari&&s.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var r=parseInt(RegExp.$1,10),o=parseInt(RegExp.$2,10);(10===r&&o>=11||r>10)&&(n.dolby=!0)}}}catch(t){}return n}()},1350:(t,e,i)=>{var s,n=i(36580),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};t.exports=(s=navigator.userAgent,/Edg\/\d+/.test(s)?(r.edge=!0,r.es2019=!0):/OPR/.test(s)?(r.opera=!0,r.es2019=!0):/Chrome\/(\d+)/.test(s)&&!n.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10),r.es2019=r.chromeVersion>69):/Firefox\D+(\d+)/.test(s)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10),r.es2019=r.firefoxVersion>10):/AppleWebKit/.test(s)&&n.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(s)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+) Safari/.test(s)&&!n.windowsPhone?(r.safari=!0,r.safariVersion=parseInt(RegExp.$1,10),r.es2019=r.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(s)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(s)&&(r.silk=!0),r)},98581:(t,e,i)=>{var s,n,r,o=i(61068),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(a.supportNewBlendModes=(s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",n="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create2D(t,6).getContext("2d",{willReadFrequently:!0});if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=s+"/wCKxvRF"+n},r.src=s+"AP804Oa6"+n,!1),a.supportInverseAlpha=function(){var t=o.create2D(this,2).getContext("2d",{willReadFrequently:!0});t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1),s=i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3];return o.remove(this),s}()),a)},90185:(t,e,i)=>{var s=i(36580),n=i(1350),r=i(61068),o={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){if("function"==typeof importScripts)return o;o.canvas=!!window.CanvasRenderingContext2D;try{o.localStorage=!!localStorage.getItem}catch(t){o.localStorage=!1}o.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),o.fileSystem=!!window.requestFileSystem;var t,e,i,a=!1;return o.webGL=function(){if(window.WebGLRenderingContext)try{var t=r.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=r.create2D(this),s=i.getContext("2d",{willReadFrequently:!0}).createImageData(1,1);return a=s.data instanceof Uint8ClampedArray,r.remove(t),r.remove(i),!!e}catch(t){return!1}return!1}(),o.worker=!!window.Worker,o.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,o.getUserMedia=o.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,n.firefox&&n.firefoxVersion<21&&(o.getUserMedia=!1),!s.iOS&&(n.ie||n.firefox||n.chrome)&&(o.canvasBitBltShift=!0),(n.safari||n.mobileSafari)&&(o.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(o.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(o.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),o.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==o.littleEndian&&a,o}()},33553:t=>{var e={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"==typeof importScripts)return e;var t,i="Fullscreen",s="FullScreen",n=["request"+i,"request"+s,"webkitRequest"+i,"webkitRequest"+s,"msRequest"+i,"msRequest"+s,"mozRequest"+s,"mozRequest"+i];for(t=0;t{var s=i(1350),n={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=("function"==typeof importScripts||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(n.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(n.mspointer=!0),navigator.getGamepads&&(n.gamepads=!0),"onwheel"in window||s.ie&&"WheelEvent"in window?n.wheelEvent="wheel":"onmousewheel"in window?n.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(n.wheelEvent="DOMMouseScroll")),n)},36580:t=>{var e={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){if("function"==typeof importScripts)return e;var t=navigator.userAgent;/Windows/.test(t)?e.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(e.iOS=!0,e.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),e.iOSVersion=parseInt(RegExp.$1,10)):e.macOS=!0:/Android/.test(t)?e.android=!0:/Linux/.test(t)?e.linux=!0:/iP[ao]d|iPhone/i.test(t)?(e.iOS=!0,navigator.appVersion.match(/OS (\d+)/),e.iOSVersion=parseInt(RegExp.$1,10),e.iPhone=-1!==t.toLowerCase().indexOf("iphone"),e.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?e.kindle=!0:/CrOS/.test(t)&&(e.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(e.android=!1,e.iOS=!1,e.macOS=!1,e.windows=!0,e.windowsPhone=!0);var i=/Silk/.test(t);return(e.windows||e.macOS||e.linux&&!i||e.chromeOS)&&(e.desktop=!0),(e.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(e.desktop=!1),navigator.standalone&&(e.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(e.cordova=!0),void 0!==window.ejecta&&(e.ejecta=!0)),"undefined"!=typeof process&&process.versions&&process.versions.node&&(e.node=!0),e.node&&"object"==typeof process.versions&&(e.nodeWebkit=!!process.versions["node-webkit"],e.electron=!!process.versions.electron),/Crosswalk/.test(t)&&(e.crosswalk=!0),e.pixelRatio=window.devicePixelRatio||1,e}()},53861:t=>{var e={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return e;var t=document.createElement("video"),i=!!t.canPlayType,s=/^no$/;try{i&&(t.canPlayType('video/ogg; codecs="theora"').replace(s,"")&&(e.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(s,"")&&(e.h264=!0,e.mp4=!0),t.canPlayType("video/x-m4v").replace(s,"")&&(e.m4v=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(s,"")&&(e.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(s,"")&&(e.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(s,"")&&(e.hls=!0))}catch(t){}return e}()},77290:(t,e,i)=>{t.exports={os:i(36580),browser:i(1350),features:i(90185),input:i(95872),audio:i(10720),video:i(53861),fullscreen:i(33553),canvasFeatures:i(98581)}},65246:(t,e,i)=>{var s=new(i(56694))({initialize:function(){this._matrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],this.alpha=1,this._dirty=!0,this._data},set:function(t){return this._matrix=t,this._dirty=!0,this},reset:function(){var t=this._matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=1,t[13]=0,t[14]=0,t[15]=0,t[16]=0,t[17]=0,t[18]=1,t[19]=0,this._dirty=!0,this},getData:function(){if(this._dirty){var t=new Float32Array(this._matrix);t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,this._data=t,this._dirty=!1}return this._data},brightness:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t;return this.multiply([i,0,0,0,0,0,i,0,0,0,0,0,i,0,0,0,0,0,1,0],e)},saturate:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=2*t/3+1,s=-.5*(i-1);return this.multiply([i,s,s,0,0,s,i,s,0,0,s,s,i,0,0,0,0,0,1,0],e)},desaturate:function(t){return void 0===t&&(t=!1),this.saturate(-1,t)},hue:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1),t=t/180*Math.PI;var i=Math.cos(t),s=Math.sin(t),n=.213,r=.715,o=.072;return this.multiply([n+.787*i+s*-n,r+i*-r+s*-r,o+i*-o+.928*s,0,0,n+i*-n+.143*s,r+i*(1-r)+.14*s,o+i*-o+-.283*s,0,0,n+i*-n+-.787*s,r+i*-r+s*r,o+.928*i+s*o,0,0,0,0,0,1,0],e)},grayscale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=!1),this.saturate(-t,e)},blackWhite:function(t){return void 0===t&&(t=!1),this.multiply([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t)},contrast:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t+1,s=-.5*(i-1);return this.multiply([i,0,0,0,s,0,i,0,0,s,0,0,i,0,s,0,0,0,1,0],e)},negative:function(t){return void 0===t&&(t=!1),this.multiply([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],t)},desaturateLuminance:function(t){return void 0===t&&(t=!1),this.multiply([.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],t)},sepia:function(t){return void 0===t&&(t=!1),this.multiply([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t)},night:function(t,e){return void 0===t&&(t=.1),void 0===e&&(e=!1),this.multiply([-2*t,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0],e)},lsd:function(t){return void 0===t&&(t=!1),this.multiply([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},brown:function(t){return void 0===t&&(t=!1),this.multiply([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t)},vintagePinhole:function(t){return void 0===t&&(t=!1),this.multiply([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t)},kodachrome:function(t){return void 0===t&&(t=!1),this.multiply([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],t)},technicolor:function(t){return void 0===t&&(t=!1),this.multiply([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],t)},polaroid:function(t){return void 0===t&&(t=!1),this.multiply([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t)},shiftToBGR:function(t){return void 0===t&&(t=!1),this.multiply([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t)},multiply:function(t,e){e||this.reset();for(var i=this._matrix,s=[],n=0;n<20;n++)s[n]=i[n];return i[0]=s[0]*t[0]+s[1]*t[5]+s[2]*t[10]+s[3]*t[15],i[1]=s[0]*t[1]+s[1]*t[6]+s[2]*t[11]+s[3]*t[16],i[2]=s[0]*t[2]+s[1]*t[7]+s[2]*t[12]+s[3]*t[17],i[3]=s[0]*t[3]+s[1]*t[8]+s[2]*t[13]+s[3]*t[18],i[4]=s[0]*t[4]+s[1]*t[9]+s[2]*t[14]+s[3]*t[19]+s[4],i[5]=s[5]*t[0]+s[6]*t[5]+s[7]*t[10]+s[8]*t[15],i[6]=s[5]*t[1]+s[6]*t[6]+s[7]*t[11]+s[8]*t[16],i[7]=s[5]*t[2]+s[6]*t[7]+s[7]*t[12]+s[8]*t[17],i[8]=s[5]*t[3]+s[6]*t[8]+s[7]*t[13]+s[8]*t[18],i[9]=s[5]*t[4]+s[6]*t[9]+s[7]*t[14]+s[8]*t[19]+s[9],i[10]=s[10]*t[0]+s[11]*t[5]+s[12]*t[10]+s[13]*t[15],i[11]=s[10]*t[1]+s[11]*t[6]+s[12]*t[11]+s[13]*t[16],i[12]=s[10]*t[2]+s[11]*t[7]+s[12]*t[12]+s[13]*t[17],i[13]=s[10]*t[3]+s[11]*t[8]+s[12]*t[13]+s[13]*t[18],i[14]=s[10]*t[4]+s[11]*t[9]+s[12]*t[14]+s[13]*t[19]+s[14],i[15]=s[15]*t[0]+s[16]*t[5]+s[17]*t[10]+s[18]*t[15],i[16]=s[15]*t[1]+s[16]*t[6]+s[17]*t[11]+s[18]*t[16],i[17]=s[15]*t[2]+s[16]*t[7]+s[17]*t[12]+s[18]*t[17],i[18]=s[15]*t[3]+s[16]*t[8]+s[17]*t[13]+s[18]*t[18],i[19]=s[15]*t[4]+s[16]*t[9]+s[17]*t[14]+s[18]*t[19]+s[19],this._dirty=!0,this}});t.exports=s},39298:(t,e,i)=>{var s=i(56694),n=i(72283),r=new s({initialize:function(t,e,i){this._rgb=[0,0,0],this.onChangeCallback=n,this.dirty=!1,this.set(t,e,i)},set:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this._rgb=[t,e,i],this.onChange(),this},equals:function(t,e,i){var s=this._rgb;return s[0]===t&&s[1]===e&&s[2]===i},onChange:function(){this.dirty=!0;var t=this._rgb;this.onChangeCallback.call(this,t[0],t[1],t[2])},r:{get:function(){return this._rgb[0]},set:function(t){this._rgb[0]=t,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(t){this._rgb[1]=t,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(t){this._rgb[2]=t,this.onChange()}},destroy:function(){this.onChangeCallback=null}});t.exports=r},84093:t=>{t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},32058:(t,e,i)=>{var s=i(97328),n=i(59994),r=i(73174),o=i(28417);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)+a),t}},85535:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(73174),o=i(74465);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)+a),t}},9605:(t,e,i)=>{var s=i(97328),n=i(70271),r=i(73174),o=i(19298);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)+a),t}},22529:(t,e,i)=>{var s=i(21843),n=i(59994),r=i(29568);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),s(t,n(e)+i,r(e)+o),t}},5739:(t,e,i)=>{var s=i(29568),n=i(40163),r=i(81711),o=i(74465);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)+a),t}},40327:(t,e,i)=>{var s=i(84093),n=[];n[s.BOTTOM_CENTER]=i(32058),n[s.BOTTOM_LEFT]=i(85535),n[s.BOTTOM_RIGHT]=i(9605),n[s.CENTER]=i(22529),n[s.LEFT_CENTER]=i(5739),n[s.RIGHT_CENTER]=i(27683),n[s.TOP_CENTER]=i(96439),n[s.TOP_LEFT]=i(81447),n[s.TOP_RIGHT]=i(47888),n[s.LEFT_BOTTOM]=n[s.BOTTOM_LEFT],n[s.LEFT_TOP]=n[s.TOP_LEFT],n[s.RIGHT_BOTTOM]=n[s.BOTTOM_RIGHT],n[s.RIGHT_TOP]=n[s.TOP_RIGHT];t.exports=function(t,e,i,s,r){return n[i](t,e,s,r)}},27683:(t,e,i)=>{var s=i(29568),n=i(70271),r=i(81711),o=i(19298);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)+a),t}},96439:(t,e,i)=>{var s=i(59994),n=i(47196),r=i(28417),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)-a),t}},81447:(t,e,i)=>{var s=i(40163),n=i(47196),r=i(74465),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)-i),o(t,n(e)-a),t}},47888:(t,e,i)=>{var s=i(70271),n=i(47196),r=i(19298),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)-a),t}},46997:(t,e,i)=>{t.exports={BottomCenter:i(32058),BottomLeft:i(85535),BottomRight:i(9605),Center:i(22529),LeftCenter:i(5739),QuickSet:i(40327),RightCenter:i(27683),TopCenter:i(96439),TopLeft:i(81447),TopRight:i(47888)}},93545:(t,e,i)=>{var s=i(84093),n=i(98611),r={In:i(46997),To:i(86639)};r=n(!1,r,s),t.exports=r},27118:(t,e,i)=>{var s=i(97328),n=i(59994),r=i(28417),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)+a),t}},84469:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(74465),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)+a),t}},51577:(t,e,i)=>{var s=i(97328),n=i(70271),r=i(19298),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)+a),t}},90271:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(73174),o=i(19298);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)+a),t}},30466:(t,e,i)=>{var s=i(29568),n=i(40163),r=i(81711),o=i(19298);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)+a),t}},50087:(t,e,i)=>{var s=i(40163),n=i(47196),r=i(19298),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)-i),o(t,n(e)-a),t}},82590:(t,e,i)=>{var s=i(84093),n=[];n[s.BOTTOM_CENTER]=i(27118),n[s.BOTTOM_LEFT]=i(84469),n[s.BOTTOM_RIGHT]=i(51577),n[s.LEFT_BOTTOM]=i(90271),n[s.LEFT_CENTER]=i(30466),n[s.LEFT_TOP]=i(50087),n[s.RIGHT_BOTTOM]=i(13555),n[s.RIGHT_CENTER]=i(99049),n[s.RIGHT_TOP]=i(67788),n[s.TOP_CENTER]=i(78170),n[s.TOP_LEFT]=i(54145),n[s.TOP_RIGHT]=i(75548);t.exports=function(t,e,i,s,r){return n[i](t,e,s,r)}},13555:(t,e,i)=>{var s=i(97328),n=i(70271),r=i(73174),o=i(74465);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)+a),t}},99049:(t,e,i)=>{var s=i(29568),n=i(70271),r=i(81711),o=i(74465);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)+a),t}},67788:(t,e,i)=>{var s=i(70271),n=i(47196),r=i(74465),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)-a),t}},78170:(t,e,i)=>{var s=i(59994),n=i(47196),r=i(73174),o=i(28417);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)-a),t}},54145:(t,e,i)=>{var s=i(40163),n=i(47196),r=i(73174),o=i(74465);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)-a),t}},75548:(t,e,i)=>{var s=i(70271),n=i(47196),r=i(73174),o=i(19298);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)-a),t}},86639:(t,e,i)=>{t.exports={BottomCenter:i(27118),BottomLeft:i(84469),BottomRight:i(51577),LeftBottom:i(90271),LeftCenter:i(30466),LeftTop:i(50087),QuickSet:i(82590),RightBottom:i(13555),RightCenter:i(99049),RightTop:i(67788),TopCenter:i(78170),TopLeft:i(54145),TopRight:i(75548)}},21843:(t,e,i)=>{var s=i(28417),n=i(81711);t.exports=function(t,e,i){return s(t,e),n(t,i)}},97328:t=>{t.exports=function(t){return t.y+t.height-t.height*t.originY}},7126:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(70271),o=i(47196);t.exports=function(t,e){void 0===e&&(e={});var i=n(t),a=o(t);return e.x=i,e.y=a,e.width=r(t)-i,e.height=s(t)-a,e}},59994:t=>{t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},29568:t=>{t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},40163:t=>{t.exports=function(t){return t.x-t.width*t.originX}},52088:t=>{t.exports=function(t){return t.width*t.originX}},23379:t=>{t.exports=function(t){return t.height*t.originY}},70271:t=>{t.exports=function(t){return t.x+t.width-t.width*t.originX}},47196:t=>{t.exports=function(t){return t.y-t.height*t.originY}},73174:t=>{t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},28417:t=>{t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},81711:t=>{t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},74465:t=>{t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},19298:t=>{t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},84349:t=>{t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},15252:(t,e,i)=>{t.exports={CenterOn:i(21843),GetBottom:i(97328),GetBounds:i(7126),GetCenterX:i(59994),GetCenterY:i(29568),GetLeft:i(40163),GetOffsetX:i(52088),GetOffsetY:i(23379),GetRight:i(70271),GetTop:i(47196),SetBottom:i(73174),SetCenterX:i(28417),SetCenterY:i(81711),SetLeft:i(74465),SetRight:i(19298),SetTop:i(84349)}},70616:t=>{t.exports={setCrisp:function(t){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach((function(e){t.style["image-rendering"]=e})),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},61068:(t,e,i)=>{var s,n,r,o=i(86459),a=i(8213),h=[],l=!1;t.exports=(r=function(){var t=0;return h.forEach((function(e){e.parent&&t++})),t},{create2D:function(t,e,i){return s(t,e,i,o.CANVAS)},create:s=function(t,e,i,s,r){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=o.CANVAS),void 0===r&&(r=!1);var c=n(s);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:s},s===o.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),r&&(c.parent=u),u.width=e,u.height=i,l&&s===o.CANVAS&&a.disable(u.getContext("2d")),u},createWebGL:function(t,e,i){return s(t,e,i,o.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:n=function(t){if(void 0===t&&(t=o.CANVAS),t===o.WEBGL)return null;for(var e=0;e{var e,i="";t.exports={disable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!1),t},enable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!0),t},getPrefix:e=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i{t.exports=function(t,e){return void 0===e&&(e="none"),t.style.msTouchAction=e,t.style["ms-touch-action"]=e,t.style["touch-action"]=e,t}},36505:t=>{t.exports=function(t,e){void 0===e&&(e="none");return["-webkit-","-khtml-","-moz-","-ms-",""].forEach((function(i){t.style[i+"user-select"]=e})),t.style["-webkit-touch-callout"]=e,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t}},23514:(t,e,i)=>{t.exports={CanvasInterpolation:i(70616),CanvasPool:i(61068),Smoothing:i(8213),TouchAction:i(59271),UserSelect:i(36505)}},27119:(t,e,i)=>{var s=i(56694),n=i(22946),r=i(5657),o=i(24650),a=i(68033),h=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,s)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(t,e,i,s,n){return void 0===s&&(s=255),void 0===n&&(n=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=s,this._locked=!1,this.update(n)},setGLTo:function(t,e,i,s){return void 0===s&&(s=1),this._locked=!0,this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=s,this._locked=!1,this.update(!0)},setFromRGB:function(t){return this._locked=!0,this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this._locked=!1,this.update(!0)},setFromHSV:function(t,e,i){return o(t,e,i,this)},update:function(t){if(void 0===t&&(t=!1),this._locked)return this;var e=this.r,i=this.g,s=this.b,o=this.a;return this._color=n(e,i,s),this._color32=r(e,i,s,o),this._rgba="rgba("+e+","+i+","+s+","+o/255+")",t&&a(e,i,s,this),this},updateHSV:function(){var t=this.r,e=this.g,i=this.b;return a(t,e,i,this),this},clone:function(){return new h(this.r,this.g,this.b,this.a)},gray:function(t){return this.setTo(t,t,t)},random:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t)),s=Math.floor(t+Math.random()*(e-t)),n=Math.floor(t+Math.random()*(e-t));return this.setTo(i,s,n)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t));return this.setTo(i,i,i)},saturate:function(t){return this.s+=t/100,this},desaturate:function(t){return this.s-=t/100,this},lighten:function(t){return this.v+=t/100,this},darken:function(t){return this.v-=t/100,this},brighten:function(t){var e=this.r,i=this.g,s=this.b;return e=Math.max(0,Math.min(255,e-Math.round(-t/100*255))),i=Math.max(0,Math.min(255,i-Math.round(-t/100*255))),s=Math.max(0,Math.min(255,s-Math.round(-t/100*255))),this.setTo(e,i,s)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(t){this.gl[0]=Math.min(Math.abs(t),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(t){this.gl[1]=Math.min(Math.abs(t),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(t){this.gl[2]=Math.min(Math.abs(t),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(t){this.gl[3]=Math.min(Math.abs(t),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(t){t=Math.floor(Math.abs(t)),this.r=Math.min(t,255),this.gl[0]=t/255,this.update(!0)}},green:{get:function(){return this.g},set:function(t){t=Math.floor(Math.abs(t)),this.g=Math.min(t,255),this.gl[1]=t/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(t){t=Math.floor(Math.abs(t)),this.b=Math.min(t,255),this.gl[2]=t/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(t){t=Math.floor(Math.abs(t)),this.a=Math.min(t,255),this.gl[3]=t/255,this.update()}},h:{get:function(){return this._h},set:function(t){this._h=t,o(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,o(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,o(this._h,this._s,t,this)}}});t.exports=h},30245:(t,e,i)=>{var s=i(22946);t.exports=function(t){void 0===t&&(t=1024);var e,i=[],n=255,r=255,o=0,a=0;for(e=0;e<=n;e++)i.push({r:r,g:e,b:a,color:s(r,e,a)});for(o=255,e=n;e>=0;e--)i.push({r:e,g:o,b:a,color:s(e,o,a)});for(r=0,e=0;e<=n;e++,o--)i.push({r:r,g:o,b:e,color:s(r,o,e)});for(o=0,a=255,e=0;e<=n;e++,a--,r++)i.push({r:r,g:o,b:a,color:s(r,o,a)});if(1024===t)return i;var h=[],l=0,u=1024/t;for(e=0;e{t.exports=function(t){var e={r:t>>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},25409:t=>{t.exports=function(t){var e=t.toString(16);return 1===e.length?"0"+e:e}},22946:t=>{t.exports=function(t,e,i){return t<<16|e<<8|i}},5657:t=>{t.exports=function(t,e,i,s){return s<<24|t<<16|e<<8|i}},74777:(t,e,i)=>{var s=i(27119),n=i(59998);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=n(l,h,t+1/3),o=n(l,h,t),a=n(l,h,t-1/3)}return(new s).setGLTo(r,o,a,1)}},89263:(t,e,i)=>{var s=i(24650);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],n=0;n<=359;n++)i.push(s(n/359,t,e));return i}},24650:(t,e,i)=>{var s=i(22946);function n(t,e,i,s){var n=(t+6*e)%6,r=Math.min(n,4-n,1);return Math.round(255*(s-s*i*Math.max(0,r)))}t.exports=function(t,e,i,r){void 0===e&&(e=1),void 0===i&&(i=1);var o=n(5,t,e,i),a=n(3,t,e,i),h=n(1,t,e,i);return r?r.setTo?r.setTo(o,a,h,r.alpha,!0):(r.r=o,r.g=a,r.b=h,r.color=s(o,a,h),r):{r:o,g:a,b:h,color:s(o,a,h)}}},91487:(t,e,i)=>{var s=i(27119);t.exports=function(t){var e=new s;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,i,s){return e+e+i+i+s+s}));var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var n=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(n,r,o)}return e}},59998:t=>{t.exports=function(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},74853:(t,e,i)=>{var s=i(27119),n=i(15978);t.exports=function(t){var e=n(t);return new s(e.r,e.g,e.b,e.a)}},15978:t=>{t.exports=function(t){return t>16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},53756:(t,e,i)=>{var s=i(42798),n=function(t,e,i,n,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var l=h/a;return{r:s(t,n,l),g:s(e,r,l),b:s(i,o,l)}};t.exports={RGBWithRGB:n,ColorWithRGB:function(t,e,i,s,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),n(t.r,t.g,t.b,e,i,s,r,o)},ColorWithColor:function(t,e,i,s){return void 0===i&&(i=100),void 0===s&&(s=0),n(t.r,t.g,t.b,e.r,e.g,e.b,i,s)}}},73904:(t,e,i)=>{var s=i(27119);t.exports=function(t){return new s(t.r,t.g,t.b,t.a)}},26841:(t,e,i)=>{var s=i(27119);t.exports=function(t){var e=new s,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var n=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(n,r,o,255*a)}return e}},68033:t=>{t.exports=function(t,e,i,s){void 0===s&&(s={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var n=Math.min(t,e,i),r=Math.max(t,e,i),o=r-n,a=0,h=0===r?0:o/r,l=r;return r!==n&&(r===t?a=(e-i)/o+(e{var s=i(25409);t.exports=function(t,e,i,n,r){return void 0===n&&(n=255),void 0===r&&(r="#"),"#"===r?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1,7):"0x"+s(n)+s(t)+s(e)+s(i)}},37243:(t,e,i)=>{var s=i(17489),n=i(27119);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new n(s(t,e),s(t,e),s(t,e))}},93222:(t,e,i)=>{var s=i(91487),n=i(74853),r=i(73904),o=i(26841);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):s(t);case"number":return n(t);case"object":return r(t)}}},95509:(t,e,i)=>{var s=i(27119);s.ColorSpectrum=i(30245),s.ColorToRGBA=i(86672),s.ComponentToHex=i(25409),s.GetColor=i(22946),s.GetColor32=i(5657),s.HexStringToColor=i(91487),s.HSLToColor=i(74777),s.HSVColorWheel=i(89263),s.HSVToRGB=i(24650),s.HueToComponent=i(59998),s.IntegerToColor=i(74853),s.IntegerToRGB=i(15978),s.Interpolate=i(53756),s.ObjectToColor=i(73904),s.RandomRGB=i(37243),s.RGBStringToColor=i(26841),s.RGBToHSV=i(68033),s.RGBToString=i(4880),s.ValueToColor=i(93222),t.exports=s},24816:(t,e,i)=>{t.exports={Align:i(93545),BaseShader:i(31053),Bounds:i(15252),Canvas:i(23514),Color:i(95509),ColorMatrix:i(65246),Masks:i(93310),RGB:i(39298)}},76756:(t,e,i)=>{var s=i(56694),n=i(61286),r=new s({initialize:function(t,e,i,s,n,r){e||(e=t.sys.make.image({x:i,y:s,key:n,frame:r,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e,i)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});n.register("bitmapMask",(function(t,e,i,s,n){return new r(this.scene,t,e,i,s,n)})),t.exports=r},63037:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var s=t.gl;t.flush(),0===t.maskStack.length&&(s.enable(s.STENCIL_TEST),s.clear(s.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var s=t.gl,n=this.geometryMask,r=t.maskCount;s.colorMask(!1,!1,!1,!1),i?(s.stencilFunc(s.EQUAL,r,255),s.stencilOp(s.KEEP,s.KEEP,s.INCR)):(s.stencilFunc(s.EQUAL,r+1,255),s.stencilOp(s.KEEP,s.KEEP,s.DECR)),n.renderWebGL(t,n,e),t.flush(),s.colorMask(!0,!0,!0,!0),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),i?this.invertAlpha?s.stencilFunc(s.NOTEQUAL,r+1,255):s.stencilFunc(s.EQUAL,r+1,255):this.invertAlpha?s.stencilFunc(s.NOTEQUAL,r,255):s.stencilFunc(s.EQUAL,r,255)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;if(0===t.maskStack.length)i.mask=null,e.disable(e.STENCIL_TEST);else{var s=t.maskStack[t.maskStack.length-1];s.mask.applyStencil(t,s.camera,!1),t.currentCameraMask.mask!==s.mask?(i.mask=s.mask,i.camera=s.camera):i.mask=null}},preRenderCanvas:function(t,e,i){var s=this.geometryMask;t.currentContext.save(),s.renderCanvas(t,s,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=s},93310:(t,e,i)=>{t.exports={BitmapMask:i(76756),GeometryMask:i(63037)}},31053:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s){e&&""!==e||(e=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join("\n")),i&&""!==i||(i=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join("\n")),void 0===s&&(s=null),this.key=t,this.fragmentSrc=e,this.vertexSrc=i,this.uniforms=s}});t.exports=s},99584:t=>{t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement||null===e)return t;return i||(i=document.body),i.appendChild(t),t}},85178:(t,e,i)=>{var s=i(99584);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+e.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=i,s(i,e.parent)}}},21546:(t,e,i)=>{var s=i(36580);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?s.cordova?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},74181:t=>{t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},s=document.createElement("div");return s.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(s),i.w=90===e?s.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:s.offsetHeight,document.documentElement.removeChild(s),s=null,90!==Math.abs(window.orientation)?i.h:i.w}},9229:(t,e,i)=>{var s=i(55301);t.exports=function(t,e){var i=window.screen,n=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);return n&&"string"==typeof n.type?n.type:"string"==typeof n?n:"number"==typeof window.orientation?0===window.orientation||180===window.orientation?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE:window.matchMedia?window.matchMedia("(orientation: portrait)").matches?s.ORIENTATION.PORTRAIT:window.matchMedia("(orientation: landscape)").matches?s.ORIENTATION.LANDSCAPE:void 0:e>t?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE}},2893:t=>{t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||(e=document.body),e}},89200:t=>{t.exports=function(t){var e="";try{if(window.DOMParser)e=(new DOMParser).parseFromString(t,"text/xml");else(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},55638:t=>{t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},27385:(t,e,i)=>{var s=i(56694),n=i(72283),r=new s({initialize:function(){this.isRunning=!1,this.callback=n,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var t=this;this.step=function e(i){t.callback(i),t.isRunning&&(t.timeOutID=window.requestAnimationFrame(e))},this.stepTimeout=function e(){t.isRunning&&(t.timeOutID=window.setTimeout(e,t.delay)),t.callback(window.performance.now())}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.delay=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=n}});t.exports=r},3590:(t,e,i)=>{var s={AddToDOM:i(99584),DOMContentLoaded:i(21546),GetInnerHeight:i(74181),GetScreenOrientation:i(9229),GetTarget:i(2893),ParseXML:i(89200),RemoveFromDOM:i(55638),RequestAnimationFrame:i(27385)};t.exports=s},78491:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(91963),o=new s({Extends:n,initialize:function(){n.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},95146:(t,e,i)=>{t.exports={EventEmitter:i(78491)}},88933:(t,e,i)=>{var s=i(95723),n=i(20494);t.exports=function(t,e,i){e.x=n(i,"x",0),e.y=n(i,"y",0),e.depth=n(i,"depth",0),e.flipX=n(i,"flipX",!1),e.flipY=n(i,"flipY",!1);var r=n(i,"scale",null);"number"==typeof r?e.setScale(r):null!==r&&(e.scaleX=n(r,"x",1),e.scaleY=n(r,"y",1));var o=n(i,"scrollFactor",null);"number"==typeof o?e.setScrollFactor(o):null!==o&&(e.scrollFactorX=n(o,"x",1),e.scrollFactorY=n(o,"y",1)),e.rotation=n(i,"rotation",0);var a=n(i,"angle",null);null!==a&&(e.angle=a),e.alpha=n(i,"alpha",1);var h=n(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=n(h,"x",.5),u=n(h,"y",.5);e.setOrigin(l,u)}return e.blendMode=n(i,"blendMode",s.NORMAL),e.visible=n(i,"visible",!0),n(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},32291:(t,e,i)=>{var s=i(20494);t.exports=function(t,e){var i=s(e,"anims",null);if(null===i)return t;if("string"==typeof i)t.anims.play(i);else if("object"==typeof i){var n=t.anims,r=s(i,"key",void 0);if(r){var o=s(i,"startFrame",void 0),a=s(i,"delay",0),h=s(i,"repeat",0),l=s(i,"repeatDelay",0),u=s(i,"yoyo",!1),c=s(i,"play",!1),d=s(i,"delayedPlay",0),p={key:r,delay:a,repeat:h,repeatDelay:l,yoyo:u,startFrame:o};c?n.play(p):d>0?n.playAfterDelay(p,d):n.load(p)}}return t}},91713:(t,e,i)=>{var s=i(56694),n=i(71207),r=i(91963),o=i(56631),a=i(7599),h=i(17922),l=new s({Extends:n,initialize:function(t){n.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(a.BOOT,this.boot,this),this.events.on(a.START,this.start,this)},boot:function(){this.events.once(a.DESTROY,this.destroy,this)},addChildCallback:function(t){t.displayList&&t.displayList!==this&&t.removeFromDisplayList(),t.parentContainer&&t.parentContainer.remove(t),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(o.ADDED_TO_SCENE,t,this.scene),this.events.emit(a.ADDED_TO_SCENE,t,this.scene))},removeChildCallback:function(t){this.queueDepthSort(),t.displayList=null,t.emit(o.REMOVED_FROM_SCENE,t,this.scene),this.events.emit(a.REMOVED_FROM_SCENE,t,this.scene)},start:function(){this.events.once(a.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(h(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},shutdown:function(){for(var t=this.list;t.length;)t[0].destroy(!0);this.events.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});r.register("DisplayList",l,"displayList"),t.exports=l},89980:(t,e,i)=>{var s=i(56694),n=i(48129),r=i(81078),o=i(6659),a=i(56631),h=i(7599),l=new s({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(a.ADDED_TO_SCENE,this.addedToScene,this),this.on(a.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(t,e){return this.data||(this.data=new r(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new r(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new r(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new r(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return n(this)},willRender:function(t){return!(!(!this.displayList||!this.displayList.active||this.displayList.willRender(t))||l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(a.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t&&t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(a.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},99325:(t,e,i)=>{var s=i(56694),n=i(91963),r=i(7599),o=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},n.register("GameObjectCreator",o,"make"),t.exports=o},61286:(t,e,i)=>{var s=i(56694),n=i(91963),r=i(7599),o=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},n.register("GameObjectFactory",o,"add"),t.exports=o},73329:(t,e,i)=>{var s=i(69360),n=new s,r=new s,o=new s,a={camera:n,sprite:r,calc:o};t.exports=function(t,e,i){var s=n,h=r,l=o;return h.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),h.e=t.x,h.f=t.y):(h.e-=e.scrollX*t.scrollFactorX,h.f-=e.scrollY*t.scrollFactorY),s.multiply(h,l),a}},92034:(t,e,i)=>{var s=i(56694),n=i(74623),r=i(91963),o=i(7599),a=new s({Extends:n,initialize:function(t){n.call(this),this.checkQueue=!0,this.scene=t,this.systems=t.sys,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.start,this)},boot:function(){this.systems.events.once(o.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(o.PRE_UPDATE,this.update,this),t.on(o.UPDATE,this.sceneUpdate,this),t.once(o.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(t,e){for(var i=this._active,s=i.length,n=0;n{t.exports=function(t,e,i,s,n,r,o,a,h,l,u,c,d,p,f){var v=i.x-e.displayOriginX+n,g=i.y-e.displayOriginY+r,m=v+i.w,y=g+i.h,x=o.getXRound(v,g,a),T=o.getYRound(v,g,a),w=o.getXRound(v,y,a),b=o.getYRound(v,y,a),E=o.getXRound(m,y,a),S=o.getYRound(m,y,a),A=o.getXRound(m,g,a),C=o.getYRound(m,g,a);t.batchQuad(e,x,T,w,b,E,S,A,C,s.u0,s.v0,s.u1,s.v1,h,l,u,c,d,p,f)}},82173:t=>{t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),void 0===s)return s={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0};var n,r,o,a,h=t.text,l=h.length,u=t.maxWidth,c=t.wordWrapCharCode,d=Number.MAX_VALUE,p=Number.MAX_VALUE,f=0,v=0,g=t.fontData.chars,m=t.fontData.lineHeight,y=t.letterSpacing,x=t.lineSpacing,T=0,w=0,b=0,E=null,S=t._align,A=0,C=0,_=t.fontSize/t.fontData.size,M=_*t.scaleX,R=_*t.scaleY,P=null,O=0,L=[],F=Number.MAX_VALUE,D=0,k=0,I=0,B=[],N=[],Y=null;if(u>0){for(n=0;nu||H-z>u?(G.push(V.i-1),V.cr?(G.push(V.i+V.word.length),z=0,X=null):X=V):V.cr&&(G.push(V.i+V.word.length),z=0,X=null)}for(n=G.length-1;n>=0;n--)r=h,o=G[n],a="\n",h=r.substr(0,o)+a+r.substr(o+1);s.wrappedText=h,l=h.length,B=[],Y=null}var j=0;for(n=0;nA&&(d=A),p>C&&(p=C);var K=A+E.xAdvance,Z=C+m;fD&&(D=I),ID&&(D=I),I0)for(var Q=0;Q{var s=i(31476);t.exports=function(t,e,i,n,r,o,a){var h=t.sys.textures.get(i),l=h.get(n),u=t.sys.cache.xml.get(r);if(l&&u){var c=s(u,l,o,a,h);return t.sys.cache.bitmapFont.add(e,{data:c,texture:i,frame:n,fromAtlas:!0}),!0}return!1}},39860:(t,e,i)=>{var s=i(10850);t.exports=function(t,e){var i=e.width,n=e.height,r=Math.floor(i/2),o=Math.floor(n/2),a=s(e,"chars","");if(""!==a){var h=s(e,"image",""),l=t.sys.textures.getFrame(h),u=l.cutX,c=l.cutY,d=l.source.width,p=l.source.height,f=s(e,"offset.x",0),v=s(e,"offset.y",0),g=s(e,"spacing.x",0),m=s(e,"spacing.y",0),y=s(e,"lineSpacing",0),x=s(e,"charsPerRow",null);null===x&&(x=d/i)>a.length&&(x=a.length);for(var T=f,w=v,b={retroFont:!0,font:h,size:i,lineHeight:n+y,chars:{}},E=0,S=0;S{function e(t,e){return parseInt(t.getAttribute(e),10)}t.exports=function(t,i,s,n,r){void 0===s&&(s=0),void 0===n&&(n=0);var o=i.cutX,a=i.cutY,h=i.source.width,l=i.source.height,u=i.sourceIndex,c={},d=t.getElementsByTagName("info")[0],p=t.getElementsByTagName("common")[0];c.font=d.getAttribute("face"),c.size=e(d,"size"),c.lineHeight=e(p,"lineHeight")+n,c.chars={};var f=t.getElementsByTagName("char"),v=void 0!==i&&i.trimmed;if(v)var g=i.height,m=i.width;for(var y=0;y{var s=i(66863),n=i(98611),r={Parse:i(39860)};r=n(!1,r,s),t.exports=r},66863:t=>{t.exports={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},13468:(t,e,i)=>{var s=i(44616),n=i(56694),r=i(88899),o=new n({Extends:s,Mixins:[r],initialize:function(t,e,i,n,r,o,a){s.call(this,t,e,i,n,r,o,a),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}});t.exports=o},93438:(t,e,i)=>{var s=i(49584);t.exports=function(t,e,i,n){var r=e._text,o=r.length,a=t.currentContext;if(0!==o&&s(t,a,e,i,n)){i.addToRenderList(e);var h=e.fromAtlas?e.frame:e.texture.frames.__BASE,l=e.displayCallback,u=e.callbackData,c=e.fontData.chars,d=e.fontData.lineHeight,p=e._letterSpacing,f=0,v=0,g=0,m=null,y=0,x=0,T=0,w=0,b=0,E=0,S=null,A=0,C=e.frame.source.image,_=h.cutX,M=h.cutY,R=0,P=0,O=e._fontSize/e.fontData.size,L=e._align,F=0,D=0;e.getTextBounds(!1);var k=e._bounds.lines;1===L?D=(k.longest-k.lengths[0])/2:2===L&&(D=k.longest-k.lengths[0]),a.translate(-e.displayOriginX,-e.displayOriginY);var I=i.roundPixels;e.cropWidth>0&&e.cropHeight>0&&(a.beginPath(),a.rect(0,0,e.cropWidth,e.cropHeight),a.clip());for(var B=0;B{var s=i(13468),n=i(88933),r=i(99325),o=i(20494);r.register("dynamicBitmapText",(function(t,e){void 0===t&&(t={});var i=o(t,"font",""),r=o(t,"text",""),a=o(t,"size",!1),h=new s(this.scene,0,0,i,r,a);return void 0!==e&&(t.add=e),n(this.scene,h,t),h}))},94145:(t,e,i)=>{var s=i(13468);i(61286).register("dynamicBitmapText",(function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,n,r))}))},88899:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(16873),r=i(93438),t.exports={renderWebGL:n,renderCanvas:r}},16873:(t,e,i)=>{var s=i(73329),n=i(69360),r=i(75512),o=new n;t.exports=function(t,e,i,n){var a=e.text,h=a.length;if(0!==h){i.addToRenderList(e);var l=t.pipelines.set(e.pipeline,e),u=s(e,i,n),c=u.sprite,d=u.calc,p=o,f=e.cropWidth>0||e.cropHeight>0;f&&(l.flush(),t.pushScissor(d.tx,d.ty,e.cropWidth*d.scaleX,e.cropHeight*d.scaleY));var v,g,m=e.frame.glTexture,y=e.tintFill,x=r.getTintAppendFloatAlpha(e.tintTopLeft,i.alpha*e._alphaTL),T=r.getTintAppendFloatAlpha(e.tintTopRight,i.alpha*e._alphaTR),w=r.getTintAppendFloatAlpha(e.tintBottomLeft,i.alpha*e._alphaBL),b=r.getTintAppendFloatAlpha(e.tintBottomRight,i.alpha*e._alphaBR),E=l.setGameObject(e),S=0,A=0,C=0,_=0,M=e.letterSpacing,R=0,P=0,O=e.scrollX,L=e.scrollY,F=e.fontData,D=F.chars,k=F.lineHeight,I=e.fontSize/F.size,B=0,N=e._align,Y=0,U=0,X=e.getTextBounds(!1);e.maxWidth>0&&(h=(a=X.wrappedText).length);var z=e._bounds.lines;1===N?U=(z.longest-z.lengths[0])/2:2===N&&(U=z.longest-z.lengths[0]);var G=i.roundPixels,V=e.displayCallback,W=e.callbackData;t.pipelines.preBatch(e);for(var H=0;H{var s=i(56694),n=i(82897),r=i(64937),o=i(89980),a=i(82173),h=i(68298),l=i(31476),u=i(74118),c=i(84557),d=new s({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Texture,r.Tint,r.Transform,r.Visible,c],initialize:function(t,e,i,s,n,r,h){void 0===n&&(n=""),void 0===h&&(h=0),o.call(this,t,"BitmapText"),this.font=s;var l=this.scene.sys.cache.bitmapFont.get(s);l||console.warn("Invalid BitmapText key: "+s),this.fontData=l.data,this._text="",this._fontSize=r||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=h,this._bounds=a(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=l.fromAtlas,this.setTexture(l.texture,l.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.setText(n)},setLeftAlign:function(){return this._align=d.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=d.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=d.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(t){return this._fontSize=t,this._dirty=!0,this},setLetterSpacing:function(t){return void 0===t&&(t=0),this._letterSpacing=t,this._dirty=!0,this},setLineSpacing:function(t){return void 0===t&&(t=0),this.lineSpacing=t,this},setText:function(t){return t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t!==this.text&&(this._text=t.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=.5),this.dropShadowX=t,this.dropShadowY=e,this.dropShadowColor=i,this.dropShadowAlpha=s,this},setCharacterTint:function(t,e,i,s,r,o,a){void 0===t&&(t=0),void 0===e&&(e=1),void 0===i&&(i=!1),void 0===s&&(s=-1),void 0===r&&(r=s,o=s,a=s);var h=this.text.length;-1===e&&(e=h),t<0&&(t=h+t),t=n(t,0,h-1);for(var l=n(t+e,t,h),u=this.charColors,c=t;c{var s=i(49584);t.exports=function(t,e,i,n){var r=e._text,o=r.length,a=t.currentContext;if(0!==o&&s(t,a,e,i,n)){i.addToRenderList(e);var h=e.fromAtlas?e.frame:e.texture.frames.__BASE,l=e.fontData.chars,u=e.fontData.lineHeight,c=e._letterSpacing,d=e._lineSpacing,p=0,f=0,v=0,g=null,m=0,y=0,x=0,T=0,w=0,b=0,E=null,S=0,A=h.source.image,C=h.cutX,_=h.cutY,M=e._fontSize/e.fontData.size,R=e._align,P=0,O=0,L=e.getTextBounds(!1);e.maxWidth>0&&(o=(r=L.wrappedText).length);var F=e._bounds.lines;1===R?O=(F.longest-F.lengths[0])/2:2===R&&(O=F.longest-F.lengths[0]),a.translate(-e.displayOriginX,-e.displayOriginY);for(var D=i.roundPixels,k=0;k{var s=i(44616),n=i(88933),r=i(99325),o=i(20494),a=i(10850);r.register("bitmapText",(function(t,e){void 0===t&&(t={});var i=a(t,"font",""),r=o(t,"text",""),h=o(t,"size",!1),l=a(t,"align",0),u=new s(this.scene,0,0,i,r,h,l);return void 0!==e&&(t.add=e),n(this.scene,u,t),u}))},21797:(t,e,i)=>{var s=i(44616);i(61286).register("bitmapText",(function(t,e,i,n,r,o){return this.displayList.add(new s(this.scene,t,e,i,n,r,o))}))},84557:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(26372),r=i(97545),t.exports={renderWebGL:n,renderCanvas:r}},26372:(t,e,i)=>{var s=i(8810),n=i(73329),r=i(75512);t.exports=function(t,e,i,o){if(0!==e._text.length){i.addToRenderList(e);var a,h,l,u=t.pipelines.set(e.pipeline,e),c=n(e,i,o).calc,d=i.roundPixels,p=i.alpha,f=e.charColors,v=e.tintFill,g=r.getTintAppendFloatAlpha,m=g(e.tintTopLeft,p*e._alphaTL),y=g(e.tintTopRight,p*e._alphaTR),x=g(e.tintBottomLeft,p*e._alphaBL),T=g(e.tintBottomRight,p*e._alphaBR),w=e.frame.glTexture,b=u.setGameObject(e),E=e.getTextBounds(!1).characters,S=e.dropShadowX,A=e.dropShadowY,C=0!==S||0!==A;if(t.pipelines.preBatch(e),C){var _=e.dropShadowColor,M=e.dropShadowAlpha,R=g(_,p*M*e._alphaTL),P=g(_,p*M*e._alphaTR),O=g(_,p*M*e._alphaBL),L=g(_,p*M*e._alphaBR);for(a=0;a{var s=i(92246),n=i(41664),r=i(56694),o=i(64937),a=i(82047),h=i(89980),l=i(71207),u=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,s],initialize:function(t,e,i,s,n){h.call(this,t,"Blitter"),this.setTexture(s,n),this.setPosition(e,i),this.initPipeline(),this.children=new l,this.renderList=[],this.dirty=!1},create:function(t,e,i,s,r){void 0===s&&(s=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));var o=new n(this,t,e,i,s);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,s){for(var n=this.createMultiple(e,i,s),r=0;r0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});t.exports=u},33177:t=>{t.exports=function(t,e,i,s){var n=e.getRenderList();if(0!==n.length){var r=t.currentContext,o=i.alpha*e.alpha;if(0!==o){i.addToRenderList(e),r.globalCompositeOperation=t.blendModes[e.blendMode],r.imageSmoothingEnabled=!e.frame.source.scaleMode;var a=e.x-i.scrollX*e.scrollFactorX,h=e.y-i.scrollY*e.scrollFactorY;r.save(),s&&s.copyToContext(r);for(var l=i.roundPixels,u=0;u0&&f.height>0&&(r.save(),r.translate(c.x+a,c.y+h),r.scale(m,y),r.drawImage(p.source.image,f.x,f.y,f.width,f.height,v,g,f.width,f.height),r.restore())):(l&&(v=Math.round(v),g=Math.round(g)),f.width>0&&f.height>0&&r.drawImage(p.source.image,f.x,f.y,f.width,f.height,v+c.x+a,g+c.y+h,f.width,f.height)))}r.restore()}}}},68452:(t,e,i)=>{var s=i(52816),n=i(88933),r=i(99325),o=i(20494);r.register("blitter",(function(t,e){void 0===t&&(t={});var i=o(t,"key",null),r=o(t,"frame",null),a=new s(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),n(this.scene,a,t),a}))},38906:(t,e,i)=>{var s=i(52816);i(61286).register("blitter",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},92246:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(89165),r=i(33177),t.exports={renderWebGL:n,renderCanvas:r}},89165:(t,e,i)=>{var s=i(69360),n=i(75512),r=new s;t.exports=function(t,e,i,s){var o=e.getRenderList(),a=i.alpha*e.alpha;if(0!==o.length&&0!==a){i.addToRenderList(e);var h=t.pipelines.set(this.pipeline,e),l=i.scrollX*e.scrollFactorX,u=i.scrollY*e.scrollFactorY,c=r.copyFrom(i.matrix);s&&(c.multiplyWithOffset(s,-l,-u),l=0,u=0);var d=e.x-l,p=e.y-u,f=-1,v=i.roundPixels;t.pipelines.preBatch(e);for(var g=0;g{var s=i(56694),n=i(82047),r=new s({initialize:function(t,e,i,s,n){this.parent=t,this.x=e,this.y=i,this.frame=s,this.data={},this.tint=16777215,this._visible=n,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(t){return void 0===t?this.frame=this.parent.frame:t instanceof n&&t.texture===this.parent.texture?this.frame=t:this.frame=this.parent.texture.get(t),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(t,e,i){return this.x=t,this.y=e,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,i&&this.setFrame(i),this},setPosition:function(t,e){return this.x=t,this.y=e,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},setVisible:function(t){return this.visible=t,this},setAlpha:function(t){return this.alpha=t,this},setTint:function(t){return this.tint=t,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(t){this.parent.dirty|=this._visible!==t,this._visible=t}},alpha:{get:function(){return this._alpha},set:function(t){this.parent.dirty|=this._alpha>0!=t>0,this._alpha=t}}});t.exports=r},97123:(t,e,i)=>{var s=i(82897),n={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,n){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=s(t,0,1),this._alphaTR=s(e,0,1),this._alphaBL=s(i,0,1),this._alphaBR=s(n,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=s(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=s(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=s(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=s(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=n},15720:(t,e,i)=>{var s=i(82897),n={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=n},69732:(t,e,i)=>{var s=i(95723),n={_blendMode:s.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=s[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=n},28284:t=>{t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},85293:t=>{var e={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var n=t;this.frame.setCropUVs(this._crop,n.x,n.y,n.width,n.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=e},14975:t=>{var e={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=e},88677:t=>{var e={fxPadding:0,setFXPadding:function(t){return void 0===t&&(t=0),this.fxPadding=t,this},onFXCopy:function(){},onFX:function(){}};t.exports=e},92972:t=>{t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},80693:(t,e,i)=>{var s=i(74118),n=i(2386),r=i(93736),o={prepareBoundsOutput:function(t,e){(void 0===e&&(e=!1),0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,n,r,o,a,h,l;if(void 0===t&&(t=new s),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),u.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),n=t.x,r=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),o=t.x,a=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),n=t.x,r=t.y,this.getBottomLeft(t),o=t.x,a=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,n,o,h),t.y=Math.min(i,r,a,l),t.width=Math.max(e,n,o,h)-t.x,t.height=Math.max(i,r,a,l)-t.y,t}};t.exports=o},39171:(t,e,i)=>{var s=i(76756),n=i(63037),r={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t,e,i,n,r){return void 0===t&&(this.texture||this.shader||this.geom)&&(t=this),new s(this.scene,t,e,i,n,r)},createGeometryMask:function(t){return void 0!==t||"Graphics"!==this.type&&!this.geom||(t=this),new n(this.scene,t)}};t.exports=r},28072:t=>{var e={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=e},54211:(t,e,i)=>{var s=i(75606),n=i(63130),r=i(10850),o=i(55303),a=i(93736),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:o.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=r(t,"from",0),t.to=r(t,"to",1);var h=n(t,"positionOnPath",!1);this.rotateToPath=n(t,"rotateToPath",!1),this.pathRotationOffset=r(t,"rotationOffset",0);var l=r(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.setTargetValue()}),this.pathOffset||(this.pathOffset=new a(this.x,this.y)),this.pathVector||(this.pathVector=new a),this.pathDelta||(this.pathDelta=new a),this.pathDelta.reset(),t.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=o.PLAYING_FORWARD,this.rotateToPath){var u=this.path.getPoint(.1);this.rotation=Math.atan2(u.y-this.y,u.x-this.x)+s(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t){var e=t.data[0],i=this.pathDelta,n=this.pathVector;if(i.copy(n).negate(),e.state===o.COMPLETE)return this.path.getPoint(e.end,n),i.add(n),n.add(this.pathOffset),void this.setPosition(n.x,n.y);if(e.state!==o.PLAYING_FORWARD&&e.state!==o.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),n),i.add(n),n.add(this.pathOffset);var r=this.x,a=this.y;this.setPosition(n.x,n.y);var h=this.x-r,l=this.y-a;if(0===h&&0===l)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(l,h)+s(this.pathRotationOffset))}}};t.exports=h},58210:(t,e,i)=>{var s=i(28699),n=i(72677),r={defaultPipeline:null,pipeline:null,hasPostPipeline:!1,postPipelines:null,pipelineData:null,initPipeline:function(t){var e=this.scene.sys.renderer;if(!e)return!1;var i=e.pipelines;if(this.postPipelines=[],this.pipelineData={},i){void 0===t&&(t=i.default);var s=i.get(t);if(s)return this.defaultPipeline=s,this.pipeline=s,!0}return!1},setPipeline:function(t,e,i){var n=this.scene.sys.renderer;if(!n)return this;var r=n.pipelines;if(r){var o=r.get(t);o&&(this.pipeline=o),e&&(this.pipelineData=i?s(e):e)}return this},setPostPipeline:function(t,e,i){var n=this.scene.sys.renderer;if(!n)return this;var r=n.pipelines;if(r){Array.isArray(t)||(t=[t]);for(var o=0;o0,this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e="string"==typeof t,i=this.postPipelines,s=[],n=0;n=0;i--){var s=e[i];("string"==typeof t&&s.name===t||"string"!=typeof t&&s instanceof t)&&(s.destroy(),n(e,i))}return this.hasPostPipeline=this.postPipelines.length>0,this},getPipelineName:function(){return this.pipeline.name}};t.exports=r},45900:t=>{var e={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=e},31654:t=>{var e={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=this.width,e.hitArea.height=this.height),this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=e},82081:(t,e,i)=>{var s=i(82047),n={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=n},21850:(t,e,i)=>{var s=i(82047),n={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var n=t;this.frame.setCropUVs(this._crop,n.x,n.y,n.width,n.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=n},58072:t=>{var e={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,i=t,s=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=s,this.tintFill=!1,this},setTintFill:function(t,e,i,s){return this.setTint(t,e,i,s),this.tintFill=!0,this},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};t.exports=e},48129:t=>{t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},56584:(t,e,i)=>{var s=i(83392),n=i(69360),r=i(64462),o=i(35786),a=i(62138),h=i(93736),l={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return a(this._rotation*s.RAD_TO_DEG)},set:function(t){this.rotation=a(t)*s.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=o(t)}},setPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=0),this.x=t,this.y=e,this.z=i,this.w=s,this},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===s&&(s=this.scene.sys.scale.height),this.x=t+Math.random()*i,this.y=e+Math.random()*s,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new n),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new n),void 0===e&&(e=new n);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);i;)e.applyITRS(i.x,i.y,i._rotation,i._scaleX,i._scaleY),e.multiply(t,t),i=i.parentContainer;return t},getLocalPoint:function(t,e,i,s){i||(i=new h),s||(s=this.scene.sys.cameras.main);var n=s.scrollX,o=s.scrollY,a=t+n*this.scrollFactorX-n,l=e+o*this.scrollFactorY-o;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(a,l,i):r(a,l,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=l},69360:(t,e,i)=>{var s=i(56694),n=i(83392),r=i(93736),o=new s({initialize:function(t,e,i,s,n,r){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=1),void 0===n&&(n=0),void 0===r&&(r=0),this.matrix=new Float32Array([t,e,i,s,n,r,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],r=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):s||r?n.TAU-(r>0?Math.acos(-s/this.scaleY):-Math.acos(s/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),s=this.matrix,n=s[0],r=s[1],o=s[2],a=s[3];return s[0]=n*i+o*e,s[1]=r*i+a*e,s[2]=n*-e+o*i,s[3]=r*-e+a*i,this},multiply:function(t,e){var i=this.matrix,s=t.matrix,n=i[0],r=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=s[0],c=s[1],d=s[2],p=s[3],f=s[4],v=s[5],g=void 0===e?i:e.matrix;return g[0]=u*n+c*o,g[1]=u*r+c*a,g[2]=d*n+p*o,g[3]=d*r+p*a,g[4]=f*n+v*o+h,g[5]=f*r+v*a+l,g},multiplyWithOffset:function(t,e,i){var s=this.matrix,n=t.matrix,r=s[0],o=s[1],a=s[2],h=s[3],l=e*r+i*a+s[4],u=e*o+i*h+s[5],c=n[0],d=n[1],p=n[2],f=n[3],v=n[4],g=n[5];return s[0]=c*r+d*a,s[1]=c*o+d*h,s[2]=p*r+f*a,s[3]=p*o+f*h,s[4]=v*r+g*a+l,s[5]=v*o+g*h+u,this},transform:function(t,e,i,s,n,r){var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*u,o[2]=i*a+s*l,o[3]=i*h+s*u,o[4]=n*a+r*l+c,o[5]=n*h+r*u+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var s=this.matrix,n=s[0],r=s[1],o=s[2],a=s[3],h=s[4],l=s[5];return i.x=t*n+e*o+h,i.y=t*r+e*a+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=e*n-i*s;return t[0]=n/a,t[1]=-i/a,t[2]=-s/a,t[3]=e/a,t[4]=(s*o-n*r)/a,t[5]=-(e*o-i*r)/a,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,s,n,r){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=s,o[4]=n,o[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],s=e[1],n=e[2],r=e[3],o=i*r-s*n;if(t.translateX=e[4],t.translateY=e[5],i||s){var a=Math.sqrt(i*i+s*s);t.rotation=s>0?Math.acos(i/a):-Math.acos(i/a),t.scaleX=a,t.scaleY=o/a}else if(n||r){var h=Math.sqrt(n*n+r*r);t.rotation=.5*Math.PI-(r>0?Math.acos(-n/h):-Math.acos(n/h)),t.scaleX=o/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,s,n){var r=this.matrix,o=Math.sin(i),a=Math.cos(i);return r[4]=t,r[5]=e,r[0]=a*s,r[1]=o*s,r[2]=-o*n,r[3]=a*n,this},applyInverse:function(t,e,i){void 0===i&&(i=new r);var s=this.matrix,n=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],c=1/(n*h+a*-o);return i.x=h*c*t+-a*c*e+(u*a-l*h)*c,i.y=n*c*e+-o*c*t+(-u*n+l*o)*c,i},setQuad:function(t,e,i,s,n,r){void 0===r&&(r=this.quad);var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return r[0]=t*a+e*l+c,r[1]=t*h+e*u+d,r[2]=t*a+s*l+c,r[3]=t*h+s*u+d,r[4]=i*a+s*l+c,r[5]=i*h+s*u+d,r[6]=i*a+e*l+c,r[7]=i*h+e*u+d,n&&r.forEach((function(t,e){r[e]=Math.round(t)})),r},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var s=this.getX(t,e);return i&&(s=Math.round(s)),s},getYRound:function(t,e,i){var s=this.getY(t,e);return i&&(s=Math.round(s)),s},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});t.exports=o},59694:t=>{var e={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=e},64937:(t,e,i)=>{t.exports={Alpha:i(97123),AlphaSingle:i(15720),BlendMode:i(69732),ComputedSize:i(28284),Crop:i(85293),Depth:i(14975),Flip:i(92972),FX:i(88677),GetBounds:i(80693),Mask:i(39171),Origin:i(28072),PathFollower:i(54211),Pipeline:i(58210),ScrollFactor:i(45900),Size:i(31654),Texture:i(82081),TextureCrop:i(21850),Tint:i(58072),ToJSON:i(48129),Transform:i(56584),TransformMatrix:i(69360),Visible:i(59694)}},70339:(t,e,i)=>{var s=i(59959),n=i(95723),r=i(56694),o=i(64937),a=i(56631),h=i(89980),l=i(74118),u=i(98524),c=i(58795),d=i(93736),p=new r({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Pipeline,o.Transform,o.Visible,u],initialize:function(t,e,i,s){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPipeline(),this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(n.SKIP_CHECK),s&&this.add(s)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,s=new l,n=!1;t.setEmpty();for(var r=0;r-1},setAll:function(t,e,i,n){return s.SetAll(this.list,t,e,i,n),this},each:function(t,e){var i,s=[null],n=this.list.slice(),r=n.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=p},13916:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var n=e.list;if(0!==n.length){var r=e.localTransform;s?(r.loadIdentity(),r.multiply(s),r.translate(e.x,e.y),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY)):r.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var o=-1!==e.blendMode;o||t.setBlendMode(0);var a=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var u=0;u{var s=i(88933),n=i(70339),r=i(99325),o=i(20494);r.register("container",(function(t,e){void 0===t&&(t={});var i=o(t,"x",0),r=o(t,"y",0),a=o(t,"children",null),h=new n(this.scene,i,r,a);return void 0!==e&&(t.add=e),s(this.scene,h,t),h}))},23400:(t,e,i)=>{var s=i(70339);i(61286).register("container",(function(t,e,i){return this.displayList.add(new s(this.scene,t,e,i))}))},98524:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(36934),r=i(13916),t.exports={renderWebGL:n,renderCanvas:r}},36934:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var n=e.list,r=n.length;if(0!==r){var o=e.localTransform;s?(o.loadIdentity(),o.multiply(s),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.pipelines.preBatch(e);var a=-1!==e.blendMode;a||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=0;c{t.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},38943:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(11603),o=i(89980),a=i(42911),h=i(55638),l=i(7599),u=i(51729),c=new s({Extends:o,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Origin,n.ScrollFactor,n.Transform,n.Visible,r],initialize:function(t,e,i,s,n,r){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new u,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),"string"==typeof s?"#"===s[0]?this.setElement(s.substr(1),n,r):this.createElement(s,n,r):s&&this.setElement(s,n,r),t.sys.events.on(l.SLEEP,this.handleSceneEvent,this),t.sys.events.on(l.WAKE,this.handleSceneEvent,this),t.sys.events.on(l.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(t){var e=this.node,i=e.style;e&&(i.display=t.settings.visible?"block":"none")},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e{var s=i(2452),n=i(89980),r=i(69360),o=new r,a=new r,h=new r;t.exports=function(t,e,i,r){if(e.node){var l=e.node.style,u=e.scene.sys.settings;if(!l||!u.visible||n.RENDER_MASK!==e.renderFlags||0!==e.cameraFilter&&e.cameraFilter&i.id||e.parentContainer&&!e.parentContainer.willRender())l.display="none";else{var c=e.parentContainer,d=i.alpha*e.alpha;c&&(d*=c.alpha);var p=o,f=a,v=h,g=0,m=0,y="0%",x="0%";r?(g=e.width*e.scaleX*e.originX,m=e.height*e.scaleY*e.originY,f.applyITRS(e.x-g,e.y-m,e.rotation,e.scaleX,e.scaleY),p.copyFrom(i.matrix),p.multiplyWithOffset(r,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),f.e=e.x-g,f.f=e.y-m,p.multiply(f,v)):(g=e.width*e.originX,m=e.height*e.originY,f.applyITRS(e.x-g,e.y-m,e.rotation,e.scaleX,e.scaleY),p.copyFrom(i.matrix),y=100*e.originX+"%",x=100*e.originY+"%",f.e-=i.scrollX*e.scrollFactorX,f.f-=i.scrollY*e.scrollFactorY,p.multiply(f,v)),e.transformOnly||(l.display="block",l.opacity=d,l.zIndex=e._depth,l.pointerEvents=e.pointerEvents,l.mixBlendMode=s[e._blendMode]),l.transform=v.getCSSMatrix()+" skew("+e.skewX+"rad, "+e.skewY+"rad) rotate3d("+e.rotate3d.x+","+e.rotate3d.y+","+e.rotate3d.z+","+e.rotate3d.w+e.rotate3dAngle+")",l.transformOrigin=y+" "+x}}}},66788:(t,e,i)=>{var s=i(38943);i(61286).register("dom",(function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),o}))},11603:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(66070),r=i(66070),t.exports={renderWebGL:n,renderCanvas:r}},65492:t=>{t.exports="addedtoscene"},98398:t=>{t.exports="destroy"},40239:t=>{t.exports="removedfromscene"},17286:t=>{t.exports="complete"},31496:t=>{t.exports="created"},89587:t=>{t.exports="error"},96342:t=>{t.exports="loop"},49614:t=>{t.exports="play"},24418:t=>{t.exports="seeked"},87318:t=>{t.exports="seeking"},61922:t=>{t.exports="stop"},13991:t=>{t.exports="timeout"},4052:t=>{t.exports="unlocked"},56631:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(65492),DESTROY:i(98398),REMOVED_FROM_SCENE:i(40239),VIDEO_COMPLETE:i(17286),VIDEO_CREATED:i(31496),VIDEO_ERROR:i(89587),VIDEO_LOOP:i(96342),VIDEO_PLAY:i(49614),VIDEO_SEEKED:i(24418),VIDEO_SEEKING:i(87318),VIDEO_STOP:i(61922),VIDEO_TIMEOUT:i(13991),VIDEO_UNLOCKED:i(4052)}},39419:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),o=i(79394),a=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.Origin,n.ScrollFactor,n.Size,n.Texture,n.Tint,n.Transform,n.Visible,o],initialize:function(t){r.call(this,t,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});t.exports=a},96699:()=>{},41155:(t,e,i)=>{var s=i(39419);i(61286).register("extern",(function(){var t=new s(this.scene);return this.displayList.add(t),t}))},79394:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(81410),r=i(96699),t.exports={renderWebGL:n,renderCanvas:r}},81410:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){t.pipelines.clear();var r=s(e,i,n).calc;e.render.call(e,t,i,r),t.pipelines.rebind()}},36266:t=>{t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},33182:(t,e,i)=>{var s=i(51052),n=i(56694),r=i(36266),o=i(15720),a=i(69732),h=i(14975),l=i(39171),u=i(58210),c=i(45900),d=i(56584),p=i(59694),f=i(95669),v=i(89980),g=i(72632),m=i(10850),y=i(83392),x=i(60898),T=new n({Extends:v,Mixins:[o,a,h,l,u,d,p,c,x],initialize:function(t,e){var i=m(e,"x",0),s=m(e,"y",0);v.call(this,t,"Graphics"),this.setPosition(i,s),this.initPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return m(t,"lineStyle",null)&&(this.defaultStrokeWidth=m(t,"lineStyle.width",1),this.defaultStrokeColor=m(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=m(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),m(t,"fillStyle",null)&&(this.defaultFillColor=m(t,"fillStyle.color",16777215),this.defaultFillAlpha=m(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},fillGradientStyle:function(t,e,i,s,n,o,a,h){return void 0===n&&(n=1),void 0===o&&(o=n),void 0===a&&(a=n),void 0===h&&(h=n),this.commandBuffer.push(r.GRADIENT_FILL_STYLE,n,o,a,h,t,e,i,s),this},lineGradientStyle:function(t,e,i,s,n,o){return void 0===o&&(o=1),this.commandBuffer.push(r.GRADIENT_LINE_STYLE,t,o,e,i,s,n),this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},fill:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,y.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,y.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,s){return this.commandBuffer.push(r.FILL_RECT,t,e,i,s),this},strokeRect:function(t,e,i,s){var n=this._lineWidth/2,r=t-n,o=t+n;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+s),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+s),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+s),this.lineTo(o+i,e+s),this.strokePath(),this},fillRoundedRect:function(t,e,i,s,n){void 0===n&&(n=20);var r=n,o=n,a=n,h=n;"number"!=typeof n&&(r=g(n,"tl",20),o=g(n,"tr",20),a=g(n,"bl",20),h=g(n,"br",20));var l=r>=0,u=o>=0,c=a>=0,d=h>=0;return r=Math.abs(r),o=Math.abs(o),a=Math.abs(a),h=Math.abs(h),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),u?this.arc(t+i-o,e+o,o,-y.TAU,0):this.arc(t+i,e,o,Math.PI,y.TAU,!0),this.lineTo(t+i,e+s-h),d?this.arc(t+i-h,e+s-h,h,0,y.TAU):this.arc(t+i,e+s,h,-y.TAU,Math.PI,!0),this.lineTo(t+a,e+s),c?this.arc(t+a,e+s-a,a,y.TAU,Math.PI):this.arc(t,e+s,a,0,-y.TAU,!0),this.lineTo(t,e+r),l?this.arc(t+r,e+r,r,-Math.PI,-y.TAU):this.arc(t,e,r,y.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(t,e,i,s,n){void 0===n&&(n=20);var r=n,o=n,a=n,h=n,l=Math.min(i,s)/2;"number"!=typeof n&&(r=g(n,"tl",20),o=g(n,"tr",20),a=g(n,"bl",20),h=g(n,"br",20));var u=r>=0,c=o>=0,d=a>=0,p=h>=0;return r=Math.min(Math.abs(r),l),o=Math.min(Math.abs(o),l),a=Math.min(Math.abs(a),l),h=Math.min(Math.abs(h),l),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.moveTo(t+i-o,e),c?this.arc(t+i-o,e+o,o,-y.TAU,0):this.arc(t+i,e,o,Math.PI,y.TAU,!0),this.lineTo(t+i,e+s-h),this.moveTo(t+i,e+s-h),p?this.arc(t+i-h,e+s-h,h,0,y.TAU):this.arc(t+i,e+s,h,-y.TAU,Math.PI,!0),this.lineTo(t+a,e+s),this.moveTo(t+a,e+s),d?this.arc(t+a,e+s-a,a,y.TAU,Math.PI):this.arc(t,e+s,a,0,-y.TAU,!0),this.lineTo(t,e+r),this.moveTo(t,e+r),u?this.arc(t+r,e+r,r,-Math.PI,-y.TAU):this.arc(t,e,r,y.TAU,0,!0),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,s,n,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,s,n,o),this},strokeTriangle:function(t,e,i,s,n,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,s,n,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,s){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,s),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},strokePoints:function(t,e,i,s){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===s&&(s=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var n=1;n-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var s,n,r=this.scene.sys,o=r.game.renderer;if(void 0===e&&(e=r.scale.width),void 0===i&&(i=r.scale.height),T.TargetCamera.setScene(this.scene),T.TargetCamera.setViewport(0,0,e,i),T.TargetCamera.scrollX=this.x,T.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var a=(s=r.textures.get(t)).getSourceImage();a instanceof HTMLCanvasElement&&(n=a.getContext("2d"))}else n=(s=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(n=t.getContext("2d"));return n&&(this.renderCanvas(o,this,T.TargetCamera,null,n,!1),s&&s.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});T.TargetCamera=new s,t.exports=T},91543:(t,e,i)=>{var s=i(36266),n=i(49584);t.exports=function(t,e,i,r,o,a){var h=e.commandBuffer,l=h.length,u=o||t.currentContext;if(0!==l&&n(t,u,e,i,r)){i.addToRenderList(e);var c=1,d=1,p=0,f=0,v=1,g=0,m=0,y=0;u.beginPath();for(var x=0;x>>16,m=(65280&p)>>>8,y=255&p,u.strokeStyle="rgba("+g+","+m+","+y+","+c+")",u.lineWidth=v,x+=3;break;case s.FILL_STYLE:f=h[x+1],d=h[x+2],g=(16711680&f)>>>16,m=(65280&f)>>>8,y=255&f,u.fillStyle="rgba("+g+","+m+","+y+","+d+")",x+=2;break;case s.BEGIN_PATH:u.beginPath();break;case s.CLOSE_PATH:u.closePath();break;case s.FILL_PATH:a||u.fill();break;case s.STROKE_PATH:a||u.stroke();break;case s.FILL_RECT:a?u.rect(h[x+1],h[x+2],h[x+3],h[x+4]):u.fillRect(h[x+1],h[x+2],h[x+3],h[x+4]),x+=4;break;case s.FILL_TRIANGLE:u.beginPath(),u.moveTo(h[x+1],h[x+2]),u.lineTo(h[x+3],h[x+4]),u.lineTo(h[x+5],h[x+6]),u.closePath(),a||u.fill(),x+=6;break;case s.STROKE_TRIANGLE:u.beginPath(),u.moveTo(h[x+1],h[x+2]),u.lineTo(h[x+3],h[x+4]),u.lineTo(h[x+5],h[x+6]),u.closePath(),a||u.stroke(),x+=6;break;case s.LINE_TO:u.lineTo(h[x+1],h[x+2]),x+=2;break;case s.MOVE_TO:u.moveTo(h[x+1],h[x+2]),x+=2;break;case s.LINE_FX_TO:u.lineTo(h[x+1],h[x+2]),x+=5;break;case s.MOVE_FX_TO:u.moveTo(h[x+1],h[x+2]),x+=5;break;case s.SAVE:u.save();break;case s.RESTORE:u.restore();break;case s.TRANSLATE:u.translate(h[x+1],h[x+2]),x+=2;break;case s.SCALE:u.scale(h[x+1],h[x+2]),x+=2;break;case s.ROTATE:u.rotate(h[x+1]),x+=1;break;case s.GRADIENT_FILL_STYLE:x+=5;break;case s.GRADIENT_LINE_STYLE:x+=6}}u.restore()}}},41286:(t,e,i)=>{var s=i(99325),n=i(33182);s.register("graphics",(function(t,e){void 0===t&&(t={}),void 0!==e&&(t.add=e);var i=new n(this.scene,t);return t.add&&this.scene.sys.displayList.add(i),i}))},13122:(t,e,i)=>{var s=i(33182);i(61286).register("graphics",(function(t){return this.displayList.add(new s(this.scene,t))}))},60898:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(34429),r=i(91543),r=i(91543),t.exports={renderWebGL:n,renderCanvas:r}},34429:(t,e,i)=>{var s=i(36266),n=i(73329),r=i(69360),o=i(75512),a=function(t,e,i){this.x=t,this.y=e,this.width=i},h=function(t,e,i){this.points=[],this.pointsLength=1,this.points[0]=new a(t,e,i)},l=[],u=new r;t.exports=function(t,e,i,r){if(0!==e.commandBuffer.length){i.addToRenderList(e);var c=t.pipelines.set(e.pipeline,e);t.pipelines.preBatch(e);for(var d=n(e,i,r).calc,p=u.loadIdentity(),f=e.commandBuffer,v=i.alpha*e.alpha,g=1,m=c.fillTint,y=c.strokeTint,x=0,T=0,w=0,b=2*Math.PI,E=[],S=0,A=!0,C=null,_=o.getTintAppendFloatAlpha,M=0;M0&&(X=X%b-b):X>b?X=b:X<0&&(X=b+X%b),null===C&&(C=new h(B+Math.cos(U)*Y,N+Math.sin(U)*Y,g),E.push(C),I+=.01);I<1+G;)w=X*I+U,x=B+Math.cos(w)*Y,T=N+Math.sin(w)*Y,C.points.push(new a(x,T,g)),I+=.01;w=X+U,x=B+Math.cos(w)*Y,T=N+Math.sin(w)*Y,C.points.push(new a(x,T,g));break;case s.FILL_RECT:c.batchFillRect(f[++M],f[++M],f[++M],f[++M],p,d);break;case s.FILL_TRIANGLE:c.batchFillTriangle(f[++M],f[++M],f[++M],f[++M],f[++M],f[++M],p,d);break;case s.STROKE_TRIANGLE:c.batchStrokeTriangle(f[++M],f[++M],f[++M],f[++M],f[++M],f[++M],g,p,d);break;case s.LINE_TO:null!==C?C.points.push(new a(f[++M],f[++M],g)):(C=new h(f[++M],f[++M],g),E.push(C));break;case s.MOVE_TO:C=new h(f[++M],f[++M],g),E.push(C);break;case s.SAVE:l.push(p.copyToArray());break;case s.RESTORE:p.copyFromArray(l.pop());break;case s.TRANSLATE:B=f[++M],N=f[++M],p.translate(B,N);break;case s.SCALE:B=f[++M],N=f[++M],p.scale(B,N);break;case s.ROTATE:p.rotate(f[++M])}t.pipelines.postBatch(e)}}},59192:(t,e,i)=>{var s=i(83979),n=i(56694),r=i(56631),o=i(6659),a=i(71608),h=i(72632),l=i(10850),u=i(19256),c=i(42911),d=i(75757),p=i(58403),f=i(13747),v=new n({Extends:o,initialize:function(t,e,i){o.call(this),i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?c(e[0])&&(i=e,e=null):c(e)&&(i=e,e=null),this.scene=t,this.children=new p,this.isParent=!0,this.type="Group",this.classType=h(i,"classType",f),this.name=h(i,"name",""),this.active=h(i,"active",!0),this.maxSize=h(i,"maxSize",-1),this.defaultKey=h(i,"defaultKey",null),this.defaultFrame=h(i,"defaultFrame",null),this.runChildUpdate=h(i,"runChildUpdate",!1),this.createCallback=h(i,"createCallback",null),this.removeCallback=h(i,"removeCallback",null),this.createMultipleCallback=h(i,"createMultipleCallback",null),this.internalCreateCallback=h(i,"internalCreateCallback",null),this.internalRemoveCallback=h(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i),this.on(r.ADDED_TO_SCENE,this.addedToScene,this),this.on(r.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(t,e,i,s,n,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===s&&(s=this.defaultFrame),void 0===n&&(n=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,s);return o.addToDisplayList(this.scene.sys.displayList),o.addToUpdateList(),o.visible=n,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof n&&(l.x=n),"number"==typeof r&&(l.y=r),l):s?this.create(n,r,o,a,h):null},get:function(t,e,i,s,n){return this.getFirst(!1,!0,t,e,i,s,n)},getFirstAlive:function(t,e,i,s,n,r){return this.getFirst(!0,t,e,i,s,n,r)},getFirstDead:function(t,e,i,s,n,r){return this.getFirst(!1,t,e,i,s,n,r)},playAnimation:function(t,e){return s.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i{var s=i(99325),n=i(59192);s.register("group",(function(t){return new n(this.scene,null,t)}))},62598:(t,e,i)=>{var s=i(59192);i(61286).register("group",(function(t,e){return this.updateList.add(new s(this.scene,t,e))}))},1539:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),o=i(57322),a=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.FX,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.ScrollFactor,n.Size,n.TextureCrop,n.Tint,n.Transform,n.Visible,o],initialize:function(t,e,i,s,n){r.call(this,t,"Image"),this._crop=this.resetCropObject(),this.setTexture(s,n),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()}});t.exports=a},57786:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},83556:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(1539);n.register("image",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),a=new o(this.scene,0,0,i,n);return void 0!==e&&(t.add=e),s(this.scene,a,t),a}))},20927:(t,e,i)=>{var s=i(1539);i(61286).register("image",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},57322:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(59390),r=i(57786),t.exports={renderWebGL:n,renderCanvas:r}},59390:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),this.pipeline.batchSprite(e,i,s)}},48013:(t,e,i)=>{var s={Events:i(56631),DisplayList:i(91713),GameObjectCreator:i(99325),GameObjectFactory:i(61286),UpdateList:i(92034),Components:i(64937),GetCalcMatrix:i(73329),BuildGameObject:i(88933),BuildGameObjectAnimation:i(32291),GameObject:i(89980),BitmapText:i(44616),Blitter:i(52816),Bob:i(41664),Container:i(70339),DOMElement:i(38943),DynamicBitmapText:i(13468),Extern:i(39419),Graphics:i(33182),Group:i(59192),Image:i(1539),Layer:i(85305),Particles:i(27684),PathFollower:i(29598),RenderTexture:i(15996),RetroFont:i(55873),Rope:i(79968),Sprite:i(13747),Text:i(76555),GetTextSize:i(32979),MeasureText:i(27030),TextStyle:i(74744),TileSprite:i(35856),Zone:i(71030),Video:i(8630),Shape:i(91461),Arc:i(28593),Curve:i(15220),Ellipse:i(28591),Grid:i(39169),IsoBox:i(4415),IsoTriangle:i(65159),Line:i(579),Polygon:i(91249),Rectangle:i(517),Star:i(77843),Triangle:i(21873),Factories:{Blitter:i(38906),Container:i(23400),DOMElement:i(66788),DynamicBitmapText:i(94145),Extern:i(41155),Graphics:i(13122),Group:i(62598),Image:i(20927),Layer:i(17676),Particles:i(81212),PathFollower:i(19626),RenderTexture:i(29599),Rope:i(31982),Sprite:i(66135),StaticBitmapText:i(21797),Text:i(94627),TileSprite:i(20509),Zone:i(34546),Video:i(215),Arc:i(10369),Curve:i(10147),Ellipse:i(99869),Grid:i(9326),IsoBox:i(88154),IsoTriangle:i(67765),Line:i(85665),Polygon:i(88203),Rectangle:i(94355),Star:i(23962),Triangle:i(79296)},Creators:{Blitter:i(68452),Container:i(44516),DynamicBitmapText:i(67513),Graphics:i(41286),Group:i(61295),Image:i(83556),Layer:i(56378),Particles:i(765),RenderTexture:i(85692),Rope:i(96027),Sprite:i(89219),StaticBitmapText:i(95499),Text:i(75397),TileSprite:i(63950),Zone:i(24067),Video:i(65601)}};s.Shader=i(27902),s.Mesh=i(83321),s.NineSlice=i(44139),s.PointLight=i(13171),s.Factories.Shader=i(51979),s.Factories.Mesh=i(8767),s.Factories.NineSlice=i(53778),s.Factories.PointLight=i(91201),s.Creators.Shader=i(13908),s.Creators.Mesh=i(41839),s.Creators.NineSlice=i(40964),s.Creators.PointLight=i(162),s.Light=i(14455),s.LightsManager=i(26193),s.LightsPlugin=i(50296),t.exports=s},85305:(t,e,i)=>{var s=i(95723),n=i(56694),r=i(64937),o=i(48129),a=i(81078),h=i(6659),l=i(56631),u=i(71207),c=i(58010),d=i(7599),p=i(17922),f=new n({Extends:u,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.Visible,h,c],initialize:function(t,e){u.call(this,t),h.call(this),this.scene=t,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=t.sys,this.events=t.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPipeline(),this.clearAlpha(),this.setBlendMode(s.SKIP_CHECK),e&&this.add(e),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new a(this)),this},setData:function(t,e){return this.data||(this.data=new a(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new a(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new a(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new a(this)),this.data.get(t)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return o(this)},willRender:function(t){return!(15!==this.renderFlags||0===this.list.length||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return i.unshift(this.displayList.getIndex(t)),i},addChildCallback:function(t){t.displayList&&t.displayList!==this&&t.removeFromDisplayList(),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(l.ADDED_TO_SCENE,t,this.scene),this.events.emit(d.ADDED_TO_SCENE,t,this.scene))},removeChildCallback:function(t){this.queueDepthSort(),t.displayList=null,t.emit(l.REMOVED_FROM_SCENE,t,this.scene),this.events.emit(d.REMOVED_FROM_SCENE,t,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(p(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(l.ADDED_TO_SCENE,this,this.scene),t.events.emit(d.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(l.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(d.REMOVED_FROM_SCENE,this,this.scene)),this},destroy:function(t){if(this.scene&&!this.ignoreDestroy){this.emit(l.DESTROY,this);for(var e=this.list;e.length;)e[0].destroy(t);this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});t.exports=f},834:t=>{t.exports=function(t,e,i){var s=e.list;if(0!==s.length){e.depthSort();var n=-1!==e.blendMode;n||t.setBlendMode(0);var r=e._alpha;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var o=0;o{var s=i(88933),n=i(85305),r=i(99325),o=i(20494);r.register("layer",(function(t,e){void 0===t&&(t={});var i=o(t,"children",null),r=new n(this.scene,i);return void 0!==e&&(t.add=e),s(this.scene,r,t),r}))},17676:(t,e,i)=>{var s=i(85305);i(61286).register("layer",(function(t){return this.displayList.add(new s(this.scene,t))}))},58010:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(17576),r=i(834),t.exports={renderWebGL:n,renderCanvas:r}},17576:t=>{t.exports=function(t,e,i){var s=e.list,n=s.length;if(0!==n){e.depthSort(),t.pipelines.preBatch(e);var r=-1!==e.blendMode;r||t.setBlendMode(0);for(var o=e.alpha,a=0;a{var s=i(26673),n=i(56694),r=i(64937),o=i(39298),a=i(75512),h=new n({Extends:s,Mixins:[r.Origin,r.ScrollFactor,r.Transform,r.Visible],initialize:function(t,e,i,n,r,a,h){s.call(this,t,e,i),this.color=new o(n,r,a),this.intensity=h,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(i)},displayWidth:{get:function(){return this.diameter},set:function(t){this.diameter=t}},displayHeight:{get:function(){return this.diameter},set:function(t){this.diameter=t}},width:{get:function(){return this.diameter},set:function(t){this.diameter=t}},height:{get:function(){return this.diameter},set:function(t){this.diameter=t}},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setColor:function(t){var e=a.getFloatsFromUintRGB(t);return this.color.set(e[0],e[1],e[2]),this},setIntensity:function(t){return this.intensity=t,this},setRadius:function(t){return this.radius=t,this}});h.RENDER_MASK=15,t.exports=h},26193:(t,e,i)=>{var s=i(26535),n=i(56694),r=i(53996),o=i(14455),a=i(13171),h=i(39298),l=i(72677),u=i(17922),c=i(75512),d=new n({initialize:function(){this.lights=[],this.ambientColor=new h(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(t,e,i,s,n,r){return this.systems.displayList.add(new a(this.scene,t,e,i,s,n,r))},enable:function(){return-1===this.maxLights&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(t){for(var e=this.lights,i=t.worldView,n=[],o=0;othis.maxLights&&(u(n,this.sortByDistance),n=n.slice(0,this.maxLights)),this.visibleLights=n.length,n},sortByDistance:function(t,e){return t.distance>=e.distance},setAmbientColor:function(t){var e=c.getFloatsFromUintRGB(t);return this.ambientColor.set(e[0],e[1],e[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(t,e,i,s,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=128),void 0===s&&(s=16777215),void 0===n&&(n=1);var r=c.getFloatsFromUintRGB(s),a=new o(t,e,i,r[0],r[1],r[2],n);return this.lights.push(a),a},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&l(this.lights,e),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=d},50296:(t,e,i)=>{var s=i(56694),n=i(26193),r=i(91963),o=i(7599),a=new s({Extends:n,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once(o.BOOT,this.boot,this),n.call(this)},boot:function(){var t=this.systems.events;t.on(o.SHUTDOWN,this.shutdown,this),t.on(o.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",a,"lights"),t.exports=a},83321:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(75606),o=i(18693),a=i(89980),h=i(67623),l=i(53267),u=i(73329),c=i(16650),d=i(23464),p=i(17922),f=i(70015),v=i(85769),g=new s({Extends:a,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Mask,n.Pipeline,n.Size,n.Texture,n.Transform,n.Visible,n.ScrollFactor,d],initialize:function(t,e,i,s,n,r,o,h,l,u,d,p){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s="__WHITE"),a.call(this,t,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new f,this.modelScale=new f(1,1,1),this.modelRotation=new f,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new c,this.viewPosition=new f,this.viewMatrix=new c,this.projectionMatrix=new c,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1;var v=t.sys.renderer;this.setPosition(e,i),this.setTexture(s,n),this.setSize(v.width,v.height),this.initPipeline(),this.setPerspective(v.width,v.height),r&&this.addVertices(r,o,h,l,u,d,p)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(t){return this.viewPosition.addScale(f.LEFT,t),this.dirtyCache[10]=1,this},panY:function(t){return this.viewPosition.y+=f.DOWN.y*t,this.dirtyCache[10]=1,this},panZ:function(t){return this.viewPosition.z+=t,this.dirtyCache[10]=1,this},setPerspective:function(t,e,i,s,n){return void 0===i&&(i=45),void 0===s&&(s=.01),void 0===n&&(n=1e3),this.projectionMatrix.perspective(r(i),t/e,s,n),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(t,e,i,s){return void 0===t&&(t=this.scene.sys.renderer.getAspectRatio()),void 0===e&&(e=1),void 0===i&&(i=-1e3),void 0===s&&(s=1e3),this.projectionMatrix.ortho(-t,t,-e,e,i,s),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach((function(t){t.destroy()})),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(t,e,i,s,n,r,o,a,h){var u,c=this.scene.sys.cache.obj.get(t);return c&&(u=l(c,this,e,i,s,n,r,o,a,h)),u&&0!==u.verts.length||console.warn("Mesh.addVerticesFromObj data empty:",t),this},sortByDepth:function(t,e){return t.depth-e.depth},depthSort:function(){return p(this.faces,this.sortByDepth),this},addVertex:function(t,e,i,s,n,r,o){var a=new v(t,e,i,s,n,r,o);return this.vertices.push(a),a},addFace:function(t,e,i){var s=new o(t,e,i);return this.faces.push(s),this.dirtyCache[9]=-1,s},addVertices:function(t,e,i,s,n,r,o){var a=h(t,e,i,s,n,r,o);return a?(this.faces=this.faces.concat(a.faces),this.vertices=this.vertices.concat(a.vertices)):console.warn("Mesh.addVertices data empty or invalid"),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(t){return this.faces[t]},getFaceAt:function(t,e,i){void 0===i&&(i=this.scene.sys.cameras.main);for(var s=u(this,i).calc,n=this.faces,r=[],o=0;o{t.exports=function(){}},41839:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(10850),a=i(83321);n.register("mesh",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),h=o(t,"vertices",[]),l=o(t,"uvs",[]),u=o(t,"indicies",[]),c=o(t,"containsZ",!1),d=o(t,"normals",[]),p=o(t,"colors",16777215),f=o(t,"alphas",1),v=new a(this.scene,0,0,i,n,h,l,u,c,d,p,f);return void 0!==e&&(t.add=e),s(this.scene,v,t),v}))},8767:(t,e,i)=>{var s=i(83321);i(61286).register("mesh",(function(t,e,i,n,r,o,a,h,l,u,c){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h,l,u,c))}))},23464:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(57410),r=i(6317),t.exports={renderWebGL:n,renderCanvas:r}},57410:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){var r=e.faces,o=r.length;if(0!==o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline,e),h=s(e,i,n).calc,l=a.setGameObject(e),u=a.vertexViewF32,c=a.vertexViewU32,d=a.vertexCount*a.currentShader.vertexComponentCount-1,p=e.tintFill,f=[],v=e.debugCallback,g=h.a,m=h.b,y=h.c,x=h.d,T=h.e,w=h.f,b=e.viewPosition.z,E=e.hideCCW,S=i.roundPixels,A=i.alpha*e.alpha,C=0;t.pipelines.preBatch(e);for(var _=0;_{var s=i(56694),n=i(64937),r=i(89980),o=i(94456),a=i(85769),h=new s({Extends:r,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.FX,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.ScrollFactor,n.Texture,n.Transform,n.Visible,o],initialize:function(t,e,i,s,n,o,h,l,u,c,d){void 0===o&&(o=256),void 0===h&&(h=256),void 0===l&&(l=10),void 0===u&&(u=10),void 0===c&&(c=0),void 0===d&&(d=0),r.call(this,t,"NineSlice"),this._width=o,this._height=h,this._originX=.5,this._originY=.5,this._sizeComponent=!0,this.vertices=[],this.leftWidth=l,this.rightWidth=u,this.topHeight=c,this.bottomHeight=d,this.tint=16777215,this.tintFill=!1,this.is3Slice=0===c&&0===d;for(var p=this.is3Slice?18:54,f=0;f{var s=i(88933),n=i(99325),r=i(20494),o=i(10850),a=i(44139);n.register("nineslice",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),h=o(t,"width",256),l=o(t,"height",256),u=o(t,"leftWidth",10),c=o(t,"rightWidth",10),d=o(t,"topHeight",0),p=o(t,"bottomHeight",0),f=new a(this.scene,0,0,i,n,h,l,u,c,d,p);return void 0!==e&&(t.add=e),s(this.scene,f,t),f}))},53778:(t,e,i)=>{var s=i(44139);i(61286).register("nineslice",(function(t,e,i,n,r,o,a,h,l,u){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h,l,u))}))},94456:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(27420),t.exports={renderWebGL:n,renderCanvas:r}},27420:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){var o=e.vertices,a=o.length;if(0!==a){i.addToRenderList(e);var h=t.pipelines.set(e.pipeline,e),l=s(e,i,r,!1).calc,u=h.setGameObject(e),c=h.vertexViewF32,d=h.vertexViewU32,p=h.vertexCount*h.currentShader.vertexComponentCount-1,f=i.roundPixels,v=e.tintFill,g=i.alpha*e.alpha,m=n.getTintAppendFloatAlpha(e.tint,g);t.pipelines.preBatch(e);var y=h.vertexAvailable(),x=-1;y{var s=i(56694),n=i(93025),r=i(22946),o=i(21902),a=i(4840),h=i(15978),l=new s({Extends:n,initialize:function(t){n.call(this,t,null,!1),this.active=!1,this.easeName="Linear",this.r=[],this.g=[],this.b=[]},getMethod:function(){return null===this.propertyValue?0:9},setMethods:function(){var t=this.propertyValue,e=t,i=this.defaultEmit,s=this.defaultUpdate;if(9===this.method){this.start=t[0],this.ease=o("Linear"),this.interpolation=a("linear"),i=this.easedValueEmit,s=this.easeValueUpdate,e=t[0],this.active=!0;for(var n=0;n{var s=i(17489),n=i(82897),r=i(56694),o=i(61616),a=i(21902),h=i(72632),l=i(4840),u=i(88462),c=i(1071),d=new r({initialize:function(t,e,i){void 0===i&&(i=!1),this.propertyKey=t,this.propertyValue=e,this.defaultValue=e,this.steps=0,this.counter=0,this.yoyo=!1,this.direction=0,this.start=0,this.current=0,this.end=0,this.ease=null,this.interpolation=null,this.emitOnly=i,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=h(t,this.propertyKey,this.defaultValue),this.method=this.getMethod(),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(t){var e;switch(this.method){case 1:case 3:case 8:e=t;break;case 2:this.propertyValue.indexOf(t)>=0&&(e=t);break;case 4:var i=(this.end-this.start)/this.steps;e=u(t,i),this.counter=e;break;case 5:case 6:case 7:e=n(t,this.start,this.end);break;case 9:e=this.start[0]}return this.current=e,this},getMethod:function(){var t=this.propertyValue;if(null===t)return 0;var e=typeof t;if("number"===e)return 1;if(Array.isArray(t))return 2;if("function"===e)return 3;if("object"===e){if(this.hasBoth(t,"start","end"))return this.has(t,"steps")?4:5;if(this.hasBoth(t,"min","max"))return 6;if(this.has(t,"random"))return 7;if(this.hasEither(t,"onEmit","onUpdate"))return 8;if(this.has(t,"interpolation"))return 9}return 0},setMethods:function(){var t=this.propertyValue,e=t,i=this.defaultEmit,s=this.defaultUpdate;switch(this.method){case 1:i=this.staticValueEmit;break;case 2:i=this.randomStaticValueEmit,e=t[0];break;case 3:this._onEmit=t,i=this.proxyEmit;break;case 4:this.start=t.start,this.end=t.end,this.steps=t.steps,this.counter=this.start,this.yoyo=!!this.has(t,"yoyo")&&t.yoyo,this.direction=0,i=this.steppedEmit,e=this.start;break;case 5:this.start=t.start,this.end=t.end;var n=this.has(t,"ease")?t.ease:"Linear";this.ease=a(n,t.easeParams),i=this.has(t,"random")&&t.random?this.randomRangedValueEmit:this.easedValueEmit,s=this.easeValueUpdate,e=this.start;break;case 6:this.start=t.min,this.end=t.max,i=this.has(t,"int")&&t.int?this.randomRangedIntEmit:this.randomRangedValueEmit,e=this.start;break;case 7:var r=t.random;Array.isArray(r)&&(this.start=r[0],this.end=r[1]),i=this.randomRangedIntEmit,e=this.start;break;case 8:this._onEmit=this.has(t,"onEmit")?t.onEmit:this.defaultEmit,this._onUpdate=this.has(t,"onUpdate")?t.onUpdate:this.defaultUpdate,i=this.proxyEmit,s=this.proxyUpdate;break;case 9:this.start=t.values;var o=this.has(t,"ease")?t.ease:"Linear";this.ease=a(o,t.easeParams),this.interpolation=l(t.interpolation),i=this.easedValueEmit,s=this.easeValueUpdate,e=this.start[0]}return this.onEmit=i,this.onUpdate=s,this.current=e,this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,s){return s},proxyEmit:function(t,e,i){var s=this._onEmit(t,e,i);return this.current=s,s},proxyUpdate:function(t,e,i,s){var n=this._onUpdate(t,e,i,s);return this.current=n,n},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[t],this.current},randomRangedValueEmit:function(t,e){var i=o(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i,t.data[e].max=this.end),this.current=i,i},randomRangedIntEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i,t.data[e].max=this.end),this.current=i,i},steppedEmit:function(){var t,e=this.counter,i=e,s=(this.end-this.start)/this.steps;this.yoyo?(0===this.direction?(i+=s)>=this.end&&(t=i-this.end,i=this.end-t,this.direction=1):(i-=s)<=this.start&&(t=this.start-i,i=this.start+t,this.direction=0),this.counter=i):this.counter=c(i+s,this.start,this.end);return this.current=e,e},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(t,e,i){var s,n=t.data[e],r=this.ease(i);return s=this.interpolation?this.interpolation(this.start,r):(n.max-n.min)*r+n.min,this.current=s,s},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});t.exports=d},87811:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(30891),o=new s({Extends:r,initialize:function(t,e,i,s,o){if("object"==typeof t){var a=t;t=n(a,"x",0),e=n(a,"y",0),i=n(a,"power",0),s=n(a,"epsilon",100),o=n(a,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=100),void 0===o&&(o=50);r.call(this,t,e,!0),this._gravity=o,this._power=0,this._epsilon=0,this.power=i,this.epsilon=s},update:function(t,e){var i=this.x-t.x,s=this.y-t.y,n=i*i+s*s;if(0!==n){var r=Math.sqrt(n);n{var s=i(16569),n=i(56694),r=i(75606),o=i(74118),a=i(2386),h=i(93736),l=new n({initialize:function(t){this.emitter=t,this.texture=null,this.frame=null,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1},x:{min:0,max:0},y:{min:0,max:0},accelerationX:{min:0,max:0},accelerationY:{min:0,max:0},maxVelocityX:{min:0,max:0},maxVelocityY:{min:0,max:0},moveToX:{min:0,max:0},moveToY:{min:0,max:0},bounce:{min:0,max:0}},this.isCropped=!1,this.scene=t.scene,this.anims=new s(this),this.bounds=new o},emit:function(t,e,i,s,n,r){return this.emitter.emit(t,e,i,s,n,r)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e},fire:function(t,e){var i=this.emitter,s=i.ops,n=i.getAnim();if(n?this.anims.play(n):(this.frame=i.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(i.getEmitZone(this),void 0===t?this.x+=s.x.onEmit(this,"x"):s.x.steps>0?this.x+=t+s.x.onEmit(this,"x"):this.x+=t,void 0===e?this.y+=s.y.onEmit(this,"y"):s.y.steps>0?this.y+=e+s.y.onEmit(this,"y"):this.y+=e,this.life=s.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=s.delay.onEmit(this,"delay"),this.scaleX=s.scaleX.onEmit(this,"scaleX"),this.scaleY=s.scaleY.active?s.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=s.rotate.onEmit(this,"rotate"),this.rotation=r(this.angle),0===this.delayCurrent&&i.getDeathZone(this))return this.lifeCurrent=0,!1;var o=s.speedX.onEmit(this,"speedX"),a=s.speedY.active?s.speedY.onEmit(this,"speedY"):o;if(i.radial){var h=r(s.angle.onEmit(this,"angle"));this.velocityX=Math.cos(h)*Math.abs(o),this.velocityY=Math.sin(h)*Math.abs(a)}else if(i.moveTo){var l=s.moveToX.onEmit(this,"moveToX"),u=s.moveToY.onEmit(this,"moveToY"),c=this.life/1e3;this.velocityX=(l-this.x)/c,this.velocityY=(u-this.y)/c}else this.velocityX=o,this.velocityY=a;return i.acceleration&&(this.accelerationX=s.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=s.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=s.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=s.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=s.bounce.onEmit(this,"bounce"),this.alpha=s.alpha.onEmit(this,"alpha"),s.color.active?this.tint=s.color.onEmit(this,"tint"):this.tint=s.tint.onEmit(this,"tint"),!0},computeVelocity:function(t,e,i,s,n){var r=t.ops,o=this.velocityX,a=this.velocityY,h=r.accelerationX.onUpdate(this,"accelerationX",n,this.accelerationX),l=r.accelerationY.onUpdate(this,"accelerationY",n,this.accelerationY),u=r.maxVelocityX.onUpdate(this,"maxVelocityX",n,this.maxVelocityX),c=r.maxVelocityY.onUpdate(this,"maxVelocityY",n,this.maxVelocityY);o+=t.gravityX*i,a+=t.gravityY*i,h&&(o+=h*i),l&&(a+=l*i),o>u?o=u:o<-u&&(o=-u),a>c?a=c:a<-c&&(a=-c),this.velocityX=o,this.velocityY=a;for(var d=0;de.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(0===this.lifeCurrent)return!0;if(this.delayCurrent>0)return this.delayCurrent-=t,!1;this.anims.update(0,t);var s=this.emitter,n=s.ops,o=1-this.lifeCurrent/this.life;if(this.lifeT=o,this.x=n.x.onUpdate(this,"x",o,this.x),this.y=n.y.onUpdate(this,"y",o,this.y),s.moveTo){var a=n.moveToX.onUpdate(this,"moveToX",o,s.moveToX),h=n.moveToY.onUpdate(this,"moveToY",o,s.moveToY),l=this.lifeCurrent/1e3;this.velocityX=(a-this.x)/l,this.velocityY=(h-this.y)/l}return this.computeVelocity(s,t,e,i,o),this.x+=this.velocityX*e,this.y+=this.velocityY*e,s.bounds&&(this.bounce=n.bounce.onUpdate(this,"bounce",o,this.bounce),this.checkBounds(s)),this.scaleX=n.scaleX.onUpdate(this,"scaleX",o,this.scaleX),this.scaleY=this.scaleX,n.scaleY.active&&(this.scaleY=n.scaleY.onUpdate(this,"scaleY",o,this.scaleY)),this.angle=n.rotate.onUpdate(this,"rotate",o,this.angle),this.rotation=r(this.angle),s.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=n.alpha.onUpdate(this,"alpha",o,this.alpha),n.color.active?this.tint=n.color.onUpdate(this,"color",o,this.tint):this.tint=n.tint.onUpdate(this,"tint",o,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0)},setSizeToFrame:function(){},getBounds:function(t){void 0===t&&(t=this.emitter.getWorldTransformMatrix());var e=Math.abs(t.scaleX)*this.scaleX,i=Math.abs(t.scaleY)*this.scaleY,s=this.x,n=this.y,r=this.rotation,o=this.frame.width*e/2,l=this.frame.height*i/2,u=this.bounds,c=new h(s-o,n-l),d=new h(s+o,n-l),p=new h(s-o,n+l),f=new h(s+o,n+l);return 0!==r&&(a(c,s,n,r),a(d,s,n,r),a(p,s,n,r),a(f,s,n,r)),t.transformPoint(c.x,c.y,c),t.transformPoint(d.x,d.y,d),t.transformPoint(p.x,p.y,p),t.transformPoint(f.x,f.y,f),u.x=Math.min(c.x,d.x,p.x,f.x),u.y=Math.min(c.y,d.y,p.y,f.y),u.width=Math.max(c.x,d.x,p.x,f.x)-u.x,u.height=Math.max(c.y,d.y,p.y,f.y)-u.y,u},destroy:function(){this.anims.destroy(),this.anims=null,this.emitter=null,this.texture=null,this.frame=null,this.scene=null}});t.exports=l},9216:(t,e,i)=>{var s=i(78991),n=i(56694),r=i(64937),o=i(48129),a=i(29538),h=i(69361),l=i(54213),u=i(19737),c=i(93025),d=i(40629),p=i(89980),f=i(72632),v=i(72861),g=i(87811),m=i(53523),y=i(19256),x=i(7782),T=i(71207),w=i(14655),b=i(14909),E=i(68433),S=i(74118),A=i(90205),C=i(66458),_=i(69116),M=i(17922),R=i(69360),P=i(93736),O=i(1071),L=["active","advance","blendMode","collideBottom","collideLeft","collideRight","collideTop","colorEase","deathCallback","deathCallbackScope","duration","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxAliveParticles","maxParticles","name","emitting","particleBringToTop","particleClass","radial","sortCallback","sortOrderAsc","sortProperty","stopAfter","tintFill","timeScale","trackVisible","visible"],F=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],D=new n({Extends:p,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.FX,r.Mask,r.Pipeline,r.ScrollFactor,r.Texture,r.Transform,r.Visible,_],initialize:function(t,e,i,s,n){p.call(this,t,"ParticleEmitter"),this.particleClass=b,this.ops={accelerationX:new c("accelerationX",0),accelerationY:new c("accelerationY",0),alpha:new c("alpha",1),angle:new c("angle",{min:0,max:360},!0),bounce:new c("bounce",0),color:new u("color"),delay:new c("delay",0,!0),lifespan:new c("lifespan",1e3,!0),maxVelocityX:new c("maxVelocityX",1e4),maxVelocityY:new c("maxVelocityY",1e4),moveToX:new c("moveToX",0),moveToY:new c("moveToY",0),quantity:new c("quantity",1,!0),rotate:new c("rotate",0),scaleX:new c("scaleX",1),scaleY:new c("scaleY",1),speedX:new c("speedX",0,!0),speedY:new c("speedY",0,!0),tint:new c("tint",16777215),x:new c("x",0),y:new c("y",0)},this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.moveTo=!1,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.maxAliveParticles=0,this.stopAfter=0,this.duration=0,this.frequency=0,this.emitting=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZones=[],this.deathZones=[],this.viewBounds=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.follow=null,this.followOffset=new P,this.trackVisible=!1,this.frames=[],this.randomFrame=!0,this.frameQuantity=1,this.anims=[],this.randomAnim=!0,this.animQuantity=1,this.dead=[],this.alive=[],this.counters=new Float32Array(10),this._frameLength=0,this._animLength=0,this.skipping=!1,this.worldMatrix=new R,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new T(this),this.tintFill=!1,this.initPipeline(),this.setPosition(e,i),this.setTexture(s),n&&this.setConfig(n)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},getProcessors:function(){return this.processors.getAll("active",!0)},setConfig:function(t){if(!t)return this;var e=0,i="",s=this.ops;for(e=0;e=this.frameQuantity&&(this.frameCounter=0,this.currentFrame=O(this.currentFrame+1,0,this._frameLength))),this.texture.get(t)},setEmitterFrame:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=1),this.randomFrame=e,this.frameQuantity=i,this.currentFrame=0;var s=typeof t;if(this.frames.length=0,Array.isArray(t))this.frames=this.frames.concat(t);else if("string"===s||"number"===s)this.frames.push(t);else if("object"===s){var n=t;(t=f(n,"frames",null))&&(this.frames=this.frames.concat(t));var r=f(n,"cycle",!1);this.randomFrame=!r,this.frameQuantity=f(n,"quantity",i)}return this._frameLength=this.frames.length,1===this._frameLength&&(this.frameQuantity=1,this.randomFrame=!1),this},getAnim:function(){var t=this.anims;if(0===t.length)return null;if(1===t.length)return t[0];if(this.randomAnim)return v(t);var e=t[this.currentAnim];return this.animCounter++,this.animCounter>=this.animQuantity&&(this.animCounter=0,this.currentAnim=O(this.currentAnim+1,0,this._animLength)),e},setAnim:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=1),this.randomAnim=e,this.animQuantity=i,this.currentAnim=0;var s=typeof t;if(this.anims.length=0,Array.isArray(t))this.anims=this.anims.concat(t);else if("string"===s)this.anims.push(t);else if("object"===s){var n=t;(t=f(n,"anims",null))&&(this.anims=this.anims.concat(t));var r=f(n,"cycle",!1);this.randomAnim=!r,this.animQuantity=f(n,"quantity",i)}return this._animLength=this.anims.length,1===this._animLength&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(t){return void 0===t&&(t=!0),this.radial=t,this},setParticleBounds:function(t,e,i,s){if("object"==typeof t){var n=t;t=n.x,e=n.y,i=y(n,"w")?n.w:n.width,s=y(n,"h")?n.h:n.height}return this.bounds?this.bounds.setTo(t,e,i,s):this.bounds=new S(t,e,i,s),this},setParticleSpeed:function(t,e){return void 0===e&&(e=t),this.ops.speedX.onChange(t),t===e?this.ops.speedY.active=!1:this.ops.speedY.onChange(e),this.radial=!0,this},setParticleScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.ops.scaleX.onChange(t),this.ops.scaleY.onChange(e),this},setParticleGravity:function(t,e){return this.gravityX=t,this.gravityY=e,this},setParticleAlpha:function(t){return this.ops.alpha.onChange(t),this},setParticleTint:function(t){return this.ops.tint.onChange(t),this},setEmitterAngle:function(t){return this.ops.angle.onChange(t),this},setParticleLifespan:function(t){return this.lifespan.onChange(t),this},setQuantity:function(t){return this.quantity=t,this},setFrequency:function(t,e){return this.frequency=t,this.flowCounter=t>0?t:0,e&&(this.quantity=e),this},addDeathZone:function(t){var e;Array.isArray(t)||(t=[t]);for(var i=0;i-1&&(this.zoneTotal++,this.zoneTotal>=s.total&&(this.zoneTotal=0,this.zoneIndex=O(this.zoneIndex+1,0,i)))}},getDeathZone:function(t){for(var e=this.deathZones,i=0;i=0&&(this.zoneIndex=e),this},addParticleProcessor:function(t){return this.processors.exists(t)||(t.emitter&&t.emitter.removeParticleProcessor(t),this.processors.add(t),t.emitter=this),t},removeParticleProcessor:function(t){return this.processors.exists(t)&&(this.processors.remove(t,!0),t.emitter=null),t},createGravityWell:function(t){return this.addParticleProcessor(new g(t))},reserve:function(t){var e=this.dead;if(this.maxParticles>0){var i=this.getParticleCount();i+t>this.maxParticles&&(t=this.maxParticles-(i+t))}for(var s=0;s0&&this.getParticleCount()>=this.maxParticles||this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,s=i.length,n=0;n0&&this.fastForward(t),this.emitting=!0,this.resetCounters(this.frequency,!0),void 0!==e&&(this.duration=Math.abs(e)),this.emit(d.START,this)),this},stop:function(t){return void 0===t&&(t=!1),this.emitting&&(this.emitting=!1,t&&this.killAll(),this.emit(d.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(t,e){return void 0===t&&(t=""),void 0===e&&(e=this.true),this.sortProperty=t,this.sortOrderAsc=e,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(t){return t=""!==this.sortProperty?this.depthSortCallback:null,this.sortCallback=t,this},depthSort:function(){return M(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(t,e){var i=this.sortProperty;return this.sortOrderAsc?t[i]-e[i]:e[i]-t[i]},flow:function(t,e,i){return void 0===e&&(e=1),this.emitting=!1,this.frequency=t,this.quantity=e,void 0!==i&&(this.stopAfter=i),this.start()},explode:function(t,e,i){this.frequency=-1,this.resetCounters(-1,!0);var s=this.emitParticle(t,e,i);return this.emit(d.EXPLODE,this,s),s},emitParticleAt:function(t,e,i){return this.emitParticle(i,t,e)},emitParticle:function(t,e,i){if(!this.atLimit()){void 0===t&&(t=this.ops.quantity.onEmit());for(var s=this.dead,n=this.stopAfter,r=this.follow?this.follow.x+this.followOffset.x:e,o=this.follow?this.follow.y+this.followOffset.y:i,a=0;a0&&(this.stopCounter++,this.stopCounter>=n))break;if(this.atLimit())break}return h}},fastForward:function(t,e){void 0===e&&(e=1e3/60);var i=0;for(this.skipping=!0;i0&&(this.worldMatrix=this.getWorldTransformMatrix());var s=this.getProcessors(),n=this.alive,r=this.dead,o=0,a=[],h=n.length;for(o=0;o0){var u=this.deathCallback,c=this.deathCallbackScope;for(o=h-1;o>=0;o--){var p=a[o];n.splice(p.index,1),r.push(p.particle),u&&u.call(c,p.particle),p.particle.setPosition()}}if(this.emitting||this.skipping){if(0===this.frequency)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=e;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=e,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())}else 1===this.completeFlag&&0===n.length&&(this.completeFlag=0,this.emit(d.COMPLETE,this))},overlap:function(t){for(var e=this.getWorldTransformMatrix(),i=this.alive,s=i.length,n=[],r=0;r0){var u=0;for(this.skipping=!0;u0&&x(s,t,t),s},particleX:{get:function(){return this.ops.x.current},set:function(t){this.ops.x.onChange(t)}},particleY:{get:function(){return this.ops.y.current},set:function(t){this.ops.y.onChange(t)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(t){this.ops.accelerationX.onChange(t)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(t){this.ops.accelerationY.onChange(t)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(t){this.ops.maxVelocityX.onChange(t)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(t){this.ops.maxVelocityY.onChange(t)}},speed:{get:function(){return this.ops.speedX.current},set:function(t){this.ops.speedX.onChange(t),this.ops.speedY.onChange(t)}},speedX:{get:function(){return this.ops.speedX.current},set:function(t){this.ops.speedX.onChange(t)}},speedY:{get:function(){return this.ops.speedY.current},set:function(t){this.ops.speedY.onChange(t)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(t){this.ops.moveToX.onChange(t)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(t){this.ops.moveToY.onChange(t)}},bounce:{get:function(){return this.ops.bounce.current},set:function(t){this.ops.bounce.onChange(t)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(t){this.ops.scaleX.onChange(t)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(t){this.ops.scaleY.onChange(t)}},particleColor:{get:function(){return this.ops.color.current},set:function(t){this.ops.color.onChange(t)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(t){this.ops.color.setEase(t)}},particleTint:{get:function(){return this.ops.tint.current},set:function(t){this.ops.tint.onChange(t)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(t){this.ops.alpha.onChange(t)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(t){this.ops.lifespan.onChange(t)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(t){this.ops.angle.onChange(t)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(t){this.ops.rotate.onChange(t)}},quantity:{get:function(){return this.ops.quantity.current},set:function(t){this.ops.quantity.onChange(t)}},delay:{get:function(){return this.ops.delay.current},set:function(t){this.ops.delay.onChange(t)}},flowCounter:{get:function(){return this.counters[0]},set:function(t){this.counters[0]=t}},frameCounter:{get:function(){return this.counters[1]},set:function(t){this.counters[1]=t}},animCounter:{get:function(){return this.counters[2]},set:function(t){this.counters[2]=t}},elapsed:{get:function(){return this.counters[3]},set:function(t){this.counters[3]=t}},stopCounter:{get:function(){return this.counters[4]},set:function(t){this.counters[4]=t}},completeFlag:{get:function(){return this.counters[5]},set:function(t){this.counters[5]=t}},zoneIndex:{get:function(){return this.counters[6]},set:function(t){this.counters[6]=t}},zoneTotal:{get:function(){return this.counters[7]},set:function(t){this.counters[7]=t}},currentFrame:{get:function(){return this.counters[8]},set:function(t){this.counters[8]=t}},currentAnim:{get:function(){return this.counters[9]},set:function(t){this.counters[9]=t}},preDestroy:function(){var t;this.texture=null,this.frames=null,this.anims=null,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.emitZones=null,this.deathZones=null,this.bounds=null,this.follow=null,this.counters=null;var e=this.ops;for(t=0;t{var s=i(90205),n=i(69360),r=new n,o=new n,a=new n,h=new n;t.exports=function(t,e,i,n){var l=r,u=o,c=a,d=h;n?(d.loadIdentity(),d.multiply(n),d.translate(e.x,e.y),d.rotate(e.rotation),d.scale(e.scaleX,e.scaleY)):d.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var p=t.currentContext,f=i.roundPixels,v=i.alpha,g=e.alpha,m=e.alive,y=m.length,x=e.viewBounds;if(e.visible&&0!==y&&(!x||s(x,i.worldView))){e.sortCallback&&e.depthSort(),i.addToRenderList(e);var T=e.scrollFactorX,w=e.scrollFactorY;p.save(),p.globalCompositeOperation=t.blendModes[e.blendMode];for(var b=0;b0&&C.height>0){var _=-A.halfWidth,M=-A.halfHeight;p.globalAlpha=S,p.save(),u.setToContext(p),f&&(_=Math.round(_),M=Math.round(M)),p.imageSmoothingEnabled=!A.source.scaleMode,p.drawImage(A.source.image,C.x,C.y,C.width,C.height,_,M,C.width,C.height),p.restore()}}}p.restore()}}},765:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(72632),a=i(9216);n.register("particles",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=o(t,"config",null),h=new a(this.scene,0,0,i);return void 0!==e&&(t.add=e),s(this.scene,h,t),n&&h.setConfig(n),h}))},81212:(t,e,i)=>{var s=i(61286),n=i(9216);s.register("particles",(function(t,e,i,s){return void 0!==t&&"string"==typeof t&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new n(this.scene,t,e,i,s))}))},69116:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(10275),r=i(10456),t.exports={renderWebGL:n,renderCanvas:r}},10275:(t,e,i)=>{var s=i(90205),n=i(69360),r=i(75512),o=new n,a=new n,h=new n,l=new n;t.exports=function(t,e,i,n){var u=t.pipelines.set(e.pipeline),c=o,d=a,p=h,f=l;n?(f.loadIdentity(),f.multiply(n),f.translate(e.x,e.y),f.rotate(e.rotation),f.scale(e.scaleX,e.scaleY)):f.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var v=i.roundPixels,g=r.getTintAppendFloatAlpha,m=i.alpha,y=e.alpha,x=e.texture.glTexture;t.pipelines.preBatch(e);var T=e.alive,w=T.length,b=e.viewBounds;if(e.visible&&0!==w&&(!b||s(b,i.worldView))){e.sortCallback&&e.depthSort();var E=u.setGameObject(e,e.frame);i.addToRenderList(e);var S=e.scrollFactorX,A=e.scrollFactorY;t.setBlendMode(e.blendMode),e.mask&&(e.mask.preRenderWebGL(t,e,i),t.pipelines.set(e.pipeline));for(var C=e.tintFill,_=0;_{var s=new(i(56694))({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=!0),this.emitter,this.x=t,this.y=e,this.active=i},update:function(){},destroy:function(){this.emitter=null}});t.exports=s},76100:t=>{t.exports="complete"},26677:t=>{t.exports="deathzone"},62736:t=>{t.exports="explode"},56490:t=>{t.exports="start"},85715:t=>{t.exports="stop"},40629:(t,e,i)=>{t.exports={COMPLETE:i(76100),DEATH_ZONE:i(26677),EXPLODE:i(62736),START:i(56490),STOP:i(85715)}},27684:(t,e,i)=>{t.exports={EmitterColorOp:i(19737),EmitterOp:i(93025),Events:i(40629),GravityWell:i(87811),Particle:i(14909),ParticleEmitter:i(9216),ParticleProcessor:i(30891),Zones:i(25962)}},69361:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t,e){var i=this.source.contains(t,e);return i&&this.killOnEnter||!i&&!this.killOnEnter}});t.exports=s},54213:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s,n,r){void 0===s&&(s=!1),void 0===n&&(n=!0),void 0===r&&(r=-1),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=s,this.counter=-1,this.seamless=n,this._length=0,this._direction=0,this.total=r,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=s},68433:(t,e,i)=>{var s=i(56694),n=i(93736),r=new s({initialize:function(t){this.source=t,this._tempVec=new n,this.total=-1},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},25962:(t,e,i)=>{t.exports={DeathZone:i(69361),EdgeZone:i(54213),RandomZone:i(68433)}},29598:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(13747),o=new s({Extends:r,Mixins:[n.PathFollower],initialize:function(t,e,i,s,n,o){r.call(this,t,i,s,n,o),this.path=e},preUpdate:function(t,e){this.anims.update(t,e),this.pathUpdate(t)}});t.exports=o},19626:(t,e,i)=>{var s=i(61286),n=i(29598);s.register("follower",(function(t,e,i,s,r){var o=new n(this.scene,t,e,i,s,r);return this.displayList.add(o),this.updateList.add(o),o}))},13171:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),o=i(74853),a=i(65641),h=i(71606),l=new s({Extends:r,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Mask,n.Pipeline,n.ScrollFactor,n.Transform,n.Visible,h],initialize:function(t,e,i,s,n,h,l){void 0===s&&(s=16777215),void 0===n&&(n=128),void 0===h&&(h=1),void 0===l&&(l=.1),r.call(this,t,"PointLight"),this.initPipeline(a.POINTLIGHT_PIPELINE),this.setPosition(e,i),this.color=o(s),this.intensity=h,this.attenuation=l,this.width=2*n,this.height=2*n,this._radius=n},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this.width=2*t,this.height=2*t}},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});t.exports=l},162:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(13171);n.register("pointlight",(function(t,e){void 0===t&&(t={});var i=r(t,"color",16777215),n=r(t,"radius",128),a=r(t,"intensity",1),h=r(t,"attenuation",.1),l=new o(this.scene,0,0,i,n,a,h);return void 0!==e&&(t.add=e),s(this.scene,l,t),l}))},91201:(t,e,i)=>{var s=i(61286),n=i(13171);s.register("pointlight",(function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))}))},71606:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(80590),t.exports={renderWebGL:n,renderCanvas:r}},80590:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),o=s(e,i,n).calc,a=e.width,h=e.height,l=-e._radius,u=-e._radius,c=l+a,d=u+h,p=o.getX(0,0),f=o.getY(0,0),v=o.getX(l,u),g=o.getY(l,u),m=o.getX(l,d),y=o.getY(l,d),x=o.getX(c,d),T=o.getY(c,d),w=o.getX(c,u),b=o.getY(c,u);t.pipelines.preBatch(e),r.batchPointLight(e,i,v,g,m,y,x,T,w,b,p,f),t.pipelines.postBatch(e)}},15996:(t,e,i)=>{var s=i(56694),n=i(845),r=i(1539),o=new s({Extends:r,initialize:function(t,e,i,s,o){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=32),void 0===o&&(o=32);var a=new n(t.sys.textures,"",s,o);r.call(this,t,e,i,a),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(t,e){this.width=t,this.height=e,this.texture.setSize(t,e),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this},resize:function(t,e){return this.setSize(t,e),this},saveTexture:function(t){var e=this.texture;return e.key=t,e.manager.addDynamicTexture(e)&&(this._saved=!0),e},fill:function(t,e,i,s,n,r){return this.texture.fill(t,e,i,s,n,r),this},clear:function(){return this.texture.clear(),this},stamp:function(t,e,i,s,n){return this.texture.stamp(t,e,i,s,n),this},erase:function(t,e,i){return this.texture.erase(t,e,i),this},draw:function(t,e,i,s,n){return this.texture.draw(t,e,i,s,n),this},drawFrame:function(t,e,i,s,n,r){return this.texture.drawFrame(t,e,i,s,n,r),this},repeat:function(t,e,i,s,n,r,o,a,h){return this.texture.repeat(t,e,i,s,n,r,o,a,h),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(t,e,i,s,n){return this.texture.batchDraw(t,e,i,s,n),this},batchDrawFrame:function(t,e,i,s,n,r){return this.texture.batchDrawFrame(t,e,i,s,n,r),this},endDraw:function(t){return this.texture.endDraw(t),this},snapshotArea:function(t,e,i,s,n,r,o){return this.texture.snapshotArea(t,e,i,s,n,r,o),this},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.width,this.height,t,e,i)},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i,"pixel")},preDestroy:function(){this._saved||this.texture.destroy()}});t.exports=o},85692:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(15996);n.register("renderTexture",(function(t,e){void 0===t&&(t={});var i=r(t,"x",0),n=r(t,"y",0),a=r(t,"width",32),h=r(t,"height",32),l=new o(this.scene,i,n,a,h);return void 0!==e&&(t.add=e),s(this.scene,l,t),l}))},29599:(t,e,i)=>{var s=i(61286),n=i(15996);s.register("renderTexture",(function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))}))},79968:(t,e,i)=>{var s=i(16569),n=i(56694),r=i(64937),o=i(89980),a=i(65641),h=i(58912),l=i(93736),u=new n({Extends:o,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Flip,r.Mask,r.Pipeline,r.Size,r.Texture,r.Transform,r.Visible,r.ScrollFactor,h],initialize:function(t,e,i,n,r,h,u,c,d){void 0===n&&(n="__DEFAULT"),void 0===h&&(h=2),void 0===u&&(u=!0),o.call(this,t,"Rope"),this.anims=new s(this),this.points=h,this.vertices,this.uv,this.colors,this.alphas,this.tintFill="__DEFAULT"===n,this.dirty=!1,this.horizontal=u,this._flipX=!1,this._flipY=!1,this._perp=new l,this.debugCallback=null,this.debugGraphic=null,this.setTexture(n,r),this.setPosition(e,i),this.setSizeToFrame(),this.initPipeline(a.ROPE_PIPELINE),Array.isArray(h)&&this.resizeArrays(h.length),this.setPoints(h,c,d),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){var i=this.anims.currentFrame;this.anims.update(t,e),this.anims.currentFrame!==i&&(this.updateUVs(),this.updateVertices())},play:function(t,e,i){return this.anims.play(t,e,i),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(t,e,i){return void 0===t&&(t=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(t,e,i))},setVertical:function(t,e,i){return void 0===t&&(t=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(t,e,i)):this},setTintFill:function(t){return void 0===t&&(t=!1),this.tintFill=t,this},setAlphas:function(t,e){var i=this.points.length;if(i<1)return this;var s,n=this.alphas;void 0===t?t=[1]:Array.isArray(t)||void 0!==e||(t=[t]);var r=0;if(void 0!==e)for(s=0;sr&&(o=t[r]),n[r]=o,t.length>r+1&&(o=t[r+1]),n[r+1]=o}return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i,s=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var n=0;if(t.length===e)for(i=0;in&&(r=t[n]),s[n]=r,t.length>n+1&&(r=t[n+1]),s[n+1]=r}return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var s,n,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,n=this.frame.width/(o-1),s=0;s{t.exports=function(){}},96027:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(10850),a=i(79968);n.register("rope",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),h=r(t,"horizontal",!0),l=o(t,"points",void 0),u=o(t,"colors",void 0),c=o(t,"alphas",void 0),d=new a(this.scene,0,0,i,n,l,h,u,c);return void 0!==e&&(t.add=e),s(this.scene,d,t),d}))},31982:(t,e,i)=>{var s=i(79968);i(61286).register("rope",(function(t,e,i,n,r,o,a,h){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h))}))},58912:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(49489),r=i(44598),t.exports={renderWebGL:n,renderCanvas:r}},49489:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline,e),a=s(e,i,r).calc,h=e.vertices,l=e.uv,u=e.colors,c=e.alphas,d=e.alpha,p=n.getTintAppendFloatAlpha,f=i.roundPixels,v=h.length,g=Math.floor(.5*v);o.flush(),t.pipelines.preBatch(e);var m=o.setGameObject(e),y=o.vertexViewF32,x=o.vertexViewU32,T=o.vertexCount*o.currentShader.vertexComponentCount-1,w=0,b=e.tintFill;e.dirty&&e.updateVertices();for(var E=e.debugCallback,S=[],A=0;A{var s=i(56694),n=i(64937),r=i(89980),o=i(72632),a=i(98611),h=i(22440),l=i(24252),u=i(69360),c=new s({Extends:r,Mixins:[n.ComputedSize,n.Depth,n.GetBounds,n.Mask,n.Origin,n.ScrollFactor,n.Transform,n.Visible,l],initialize:function(t,e,i,s,n,o,a,h){void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=128),void 0===o&&(o=128),r.call(this,t,"Shader"),this.blendMode=-1,this.shader;var l=t.sys.renderer;this.renderer=l,this.gl=l.gl,this.vertexData=new ArrayBuffer(2*Float32Array.BYTES_PER_ELEMENT*6),this.vertexBuffer=l.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new u,this._tempMatrix2=new u,this._tempMatrix3=new u,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=l.width,this._rendererHeight=l.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(i,s),this.setSize(n,o),this.setOrigin(.5,.5),this.setShader(e,a,h)},willRender:function(t){return!!this.renderToTexture||!(r.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setRenderToTexture:function(t,e){if(void 0===e&&(e=!1),!this.renderToTexture){var i=this.width,s=this.height,n=this.renderer;this.glTexture=n.createTextureFromSource(null,i,s,0),this.glTexture.flipY=e,this.framebuffer=n.createFramebuffer(i,s,this.glTexture,!1),this._rendererWidth=i,this._rendererHeight=s,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),t&&(this.texture=this.scene.sys.textures.addGLTexture(t,this.glTexture,i,s))}return this.shader&&(n.pipelines.clear(),this.load(),this.flush(),n.pipelines.rebind()),this},setShader:function(t,e,i){if(void 0===e&&(e=[]),"string"==typeof t){var s=this.scene.sys.cache.shader;if(!s.has(t))return console.warn("Shader missing: "+t),this;this.shader=s.get(t)}else this.shader=t;var n=this.gl,r=this.renderer;this.program&&n.deleteProgram(this.program);var o=r.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);n.uniformMatrix4fv(n.getUniformLocation(o,"uViewMatrix"),!1,this.viewMatrix),n.uniformMatrix4fv(n.getUniformLocation(o,"uProjectionMatrix"),!1,this.projectionMatrix),n.uniform2f(n.getUniformLocation(o,"uResolution"),this.width,this.height),this.program=o;var h=new Date,l={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[h.getFullYear(),h.getMonth(),h.getDate(),60*h.getHours()*60+60*h.getMinutes()+h.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=a(!0,{},this.shader.uniforms,l):this.uniforms=l;for(var u=0;u<4;u++)e[u]&&this.setSampler2D("iChannel"+u,e[u],u,i);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(t){return this.pointer=t,this},projOrtho:function(t,e,i,s){var n=1/(t-e),r=1/(i-s),o=this.projectionMatrix;o[0]=-2*n,o[5]=-2*r,o[10]=-.001,o[12]=(t+e)*n,o[13]=(s+i)*r,o[14]=-0;var a=this.program,h=this.gl;this.renderer.setProgram(a),h.uniformMatrix4fv(h.getUniformLocation(a,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=e,this._rendererHeight=i},initUniforms:function(){var t=this.gl,e=this.renderer.glFuncMap,i=this.program;for(var s in this._textureCount=0,this.uniforms){var n=this.uniforms[s],r=n.type,o=e[r];n.uniformLocation=t.getUniformLocation(i,s),"sampler2D"!==r&&(n.glMatrix=o.matrix,n.glValueLength=o.length,n.glFunc=o.func)}},setSampler2DBuffer:function(t,e,i,s,n,r){void 0===n&&(n=0),void 0===r&&(r={});var o=this.uniforms[t];return o.value=e,r.width=i,r.height=s,o.textureData=r,this._textureCount=n,this.initSampler2D(o),this},setSampler2D:function(t,e,i,s){void 0===i&&(i=0);var n=this.scene.sys.textures;if(n.exists(e)){var r=n.getFrame(e);if(r.glTexture&&r.glTexture.isRenderTexture)return this.setSampler2DBuffer(t,r.glTexture,r.width,r.height,i,s);var o=this.uniforms[t],a=r.source;o.textureKey=e,o.source=a.image,o.value=r.glTexture,a.isGLTexture&&(s||(s={}),s.width=a.width,s.height=a.height),s&&(o.textureData=s),this._textureCount=i,this.initSampler2D(o)}return this},setUniform:function(t,e){return h(this.uniforms,t,e),this},getUniform:function(t){return o(this.uniforms,t,null)},setChannel0:function(t,e){return this.setSampler2D("iChannel0",t,0,e)},setChannel1:function(t,e){return this.setSampler2D("iChannel1",t,1,e)},setChannel2:function(t,e){return this.setSampler2D("iChannel2",t,2,e)},setChannel3:function(t,e){return this.setSampler2D("iChannel3",t,3,e)},initSampler2D:function(t){if(t.value){var e=this.gl;e.activeTexture(e.TEXTURE0+this._textureCount),e.bindTexture(e.TEXTURE_2D,t.value);var i=t.textureData;if(i&&!t.value.isRenderTexture){var s=e[o(i,"magFilter","linear").toUpperCase()],n=e[o(i,"minFilter","linear").toUpperCase()],r=e[o(i,"wrapS","repeat").toUpperCase()],a=e[o(i,"wrapT","repeat").toUpperCase()],h=e[o(i,"format","rgba").toUpperCase()];if(i.repeat&&(r=e.REPEAT,a=e.REPEAT),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!!i.flipY),i.width){var l=o(i,"width",512),u=o(i,"height",2),c=o(i,"border",0);e.texImage2D(e.TEXTURE_2D,0,h,l,u,c,h,e.UNSIGNED_BYTE,null)}else e.texImage2D(e.TEXTURE_2D,0,h,e.RGBA,e.UNSIGNED_BYTE,t.source);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,s),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,a)}this.renderer.setProgram(this.program),e.uniform1i(t.uniformLocation,this._textureCount),this._textureCount++}},syncUniforms:function(){var t,e,i,s,n,r=this.gl,o=this.uniforms,a=0;for(var h in o)i=(t=o[h]).glFunc,e=t.glValueLength,s=t.uniformLocation,null!==(n=t.value)&&(1===e?t.glMatrix?i.call(r,s,t.transpose,n):i.call(r,s,n):2===e?i.call(r,s,n.x,n.y):3===e?i.call(r,s,n.x,n.y,n.z):4===e?i.call(r,s,n.x,n.y,n.z,n.w):"sampler2D"===t.type&&(r.activeTexture(r.TEXTURE0+a),r.bindTexture(r.TEXTURE_2D,n),r.uniform1i(s,a),a++))},load:function(t){var e=this.gl,i=this.width,s=this.height,n=this.renderer,r=this.program,o=this.viewMatrix;if(!this.renderToTexture){var a=-this._displayOriginX,h=-this._displayOriginY;o[0]=t[0],o[1]=t[1],o[4]=t[2],o[5]=t[3],o[8]=t[4],o[9]=t[5],o[12]=o[0]*a+o[4]*h,o[13]=o[1]*a+o[5]*h}e.useProgram(r),e.uniformMatrix4fv(e.getUniformLocation(r,"uViewMatrix"),!1,o),e.uniform2f(e.getUniformLocation(r,"uResolution"),this.width,this.height);var l=this.uniforms,u=l.resolution;u.value.x=i,u.value.y=s,l.time.value=n.game.loop.getDuration();var c=this.pointer;if(c){var d=l.mouse,p=c.x/i,f=1-c.y/s;d.value.x=p.toFixed(2),d.value.y=f.toFixed(2)}this.syncUniforms()},flush:function(){var t=this.width,e=this.height,i=this.program,s=this.gl,n=this.vertexBuffer,r=this.renderer,o=2*Float32Array.BYTES_PER_ELEMENT;this.renderToTexture&&(r.setFramebuffer(this.framebuffer),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT)),s.bindBuffer(s.ARRAY_BUFFER,n);var a=s.getAttribLocation(i,"inPosition");-1!==a&&(s.enableVertexAttribArray(a),s.vertexAttribPointer(a,2,s.FLOAT,!1,o,0));var h=this.vertexViewF32;h[3]=e,h[4]=t,h[5]=e,h[8]=t,h[9]=e,h[10]=t;s.bufferSubData(s.ARRAY_BUFFER,0,this.bytes.subarray(0,6*o)),s.drawArrays(s.TRIANGLES,0,6),this.renderToTexture&&r.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},preDestroy:function(){var t=this.gl;t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(this.renderer.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null)}});t.exports=c},10612:t=>{t.exports=function(){}},13908:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(27902);n.register("shader",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"x",0),a=r(t,"y",0),h=r(t,"width",128),l=r(t,"height",128),u=new o(this.scene,i,n,a,h,l);return void 0!==e&&(t.add=e),s(this.scene,u,t),u}))},51979:(t,e,i)=>{var s=i(27902);i(61286).register("shader",(function(t,e,i,n,r,o,a){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a))}))},24252:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(19782),r=i(10612),t.exports={renderWebGL:n,renderCanvas:r}},19782:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){if(e.shader){if(i.addToRenderList(e),t.pipelines.clear(),e.renderToTexture)e.load(),e.flush();else{var r=s(e,i,n).calc;t.width===e._rendererWidth&&t.height===e._rendererHeight||e.projOrtho(0,t.width,t.height,0),e.load(r.matrix),e.flush()}t.pipelines.rebind()}}},19543:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n,r,o){for(var a=s.getTintAppendFloatAlpha(i.fillColor,i.fillAlpha*n),h=i.pathData,l=i.pathIndexes,u=0;u{t.exports=function(t,e,i,s){var n=i||e.fillColor,r=s||e.fillAlpha,o=(16711680&n)>>>16,a=(65280&n)>>>8,h=255&n;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},17876:t=>{t.exports=function(t,e,i,s){var n=i||e.strokeColor,r=s||e.strokeAlpha,o=(16711680&n)>>>16,a=(65280&n)>>>8,h=255&n;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},91461:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),o=i(88829),a=new s({Extends:r,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.GetBounds,n.FX,n.Mask,n.Origin,n.Pipeline,n.ScrollFactor,n.Transform,n.Visible],initialize:function(t,e,i){void 0===e&&(e="Shape"),r.call(this,t,e),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new o,this.width=0,this.height=0,this.initPipeline()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.isFilled=!1:(this.fillColor=t,this.fillAlpha=e,this.isFilled=!0),this},setStrokeStyle:function(t,e,i){return void 0===i&&(i=1),void 0===t?this.isStroked=!1:(this.lineWidth=t,this.strokeColor=e,this.strokeAlpha=i,this.isStroked=!0),this},setClosePath:function(t){return this.closePath=t,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}}});t.exports=a},50262:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n,r){var o=t.strokeTint,a=s.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*i);o.TL=a,o.TR=a,o.BL=a,o.BR=a;var h=e.pathData,l=h.length-1,u=e.lineWidth,c=u/2,d=h[0]-n,p=h[1]-r;e.closePath||(l-=2);for(var f=2;f{var s=i(2213),n=i(56694),r=i(75606),o=i(11117),a=i(26673),h=i(83392),l=i(91461),u=new n({Extends:l,Mixins:[s],initialize:function(t,e,i,s,n,r,o,h,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===n&&(n=0),void 0===r&&(r=360),void 0===o&&(o=!1),l.call(this,t,"Arc",new a(0,0,s)),this._startAngle=n,this._endAngle=r,this._anticlockwise=o,this._iterations=.01,this.setPosition(e,i);var c=2*this.geom.radius;this.setSize(c,c),void 0!==h&&this.setFillStyle(h,u),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(t){this._iterations=t,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(t){this.geom.radius=t;var e=2*t;this.setSize(e,e),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(t){this._startAngle=t,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(t){this._endAngle=t,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(t){this._anticlockwise=t,this.updateData()}},setRadius:function(t){return this.radius=t,this},setIterations:function(t){return void 0===t&&(t=.01),this.iterations=t,this},setStartAngle:function(t,e){return this._startAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},setEndAngle:function(t,e){return this._endAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},updateData:function(){var t=this._iterations,e=t,i=this.geom.radius,s=r(this._startAngle),n=r(this._endAngle),a=i,l=i;n-=s,this._anticlockwise?n<-h.PI2?n=-h.PI2:n>0&&(n=-h.PI2+n%h.PI2):n>h.PI2?n=h.PI2:n<0&&(n=h.PI2+n%h.PI2);for(var u,c=[a+Math.cos(s)*i,l+Math.sin(s)*i];e<1;)u=n*e+s,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),e+=t;return u=n+s,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),c.push(a+Math.cos(s)*i,l+Math.sin(s)*i),this.pathIndexes=o(c),this.pathData=c,this}});t.exports=u},23560:(t,e,i)=>{var s=i(75606),n=i(15608),r=i(17876),o=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var h=t.currentContext;if(o(t,h,e,i,a)){var l=e.radius;h.beginPath(),h.arc(l-e.originX*(2*l),l-e.originY*(2*l),l,s(e._startAngle),s(e._endAngle),e.anticlockwise),e.closePath&&h.closePath(),e.isFilled&&(n(h,e),h.fill()),e.isStroked&&(r(h,e),h.stroke()),h.restore()}}},10369:(t,e,i)=>{var s=i(28593),n=i(61286);n.register("arc",(function(t,e,i,n,r,o,a,h){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h))})),n.register("circle",(function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,0,360,!1,n,r))}))},2213:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(58356),r=i(23560),t.exports={renderWebGL:n,renderCanvas:r}},58356:(t,e,i)=>{var s=i(73329),n=i(19543),r=i(50262);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=s(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&n(a,l,e,d,u,c),e.isStroked&&r(a,e,d,u,c),t.pipelines.postBatch(e)}},15220:(t,e,i)=>{var s=i(56694),n=i(87203),r=i(11117),o=i(74118),a=i(91461),h=new s({Extends:a,Mixins:[n],initialize:function(t,e,i,s,n,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",s),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==n&&this.setFillStyle(n,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],s=this.geom.getPoints(e),n=0;n{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX+e._curveBounds.x,l=e._displayOriginY+e._curveBounds.y,u=e.pathData,c=u.length-1,d=u[0]-h,p=u[1]-l;a.beginPath(),a.moveTo(d,p),e.closePath||(c-=2);for(var f=2;f{var s=i(61286),n=i(15220);s.register("curve",(function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))}))},87203:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(82958),r=i(4024),t.exports={renderWebGL:n,renderCanvas:r}},82958:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=n(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX+e._curveBounds.x,c=e._displayOriginY+e._curveBounds.y,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(a,l,e,d,u,c),e.isStroked&&r(a,e,d,u,c),t.pipelines.postBatch(e)}},28591:(t,e,i)=>{var s=i(56694),n=i(11117),r=i(84171),o=i(95669),a=i(91461),h=new s({Extends:a,Mixins:[r],initialize:function(t,e,i,s,n,r,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===n&&(n=128),a.call(this,t,"Ellipse",new o(s/2,n/2,s,n)),this._smoothness=64,this.setPosition(e,i),this.width=s,this.height=n,void 0!==r&&this.setFillStyle(r,h),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSize:function(t,e){return this.width=t,this.height=e,this.geom.setPosition(t/2,e/2),this.geom.setSize(t,e),this.updateData()},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){for(var t=[],e=this.geom.getPoints(this._smoothness),i=0;i{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,p=u[1]-l;a.beginPath(),a.moveTo(d,p),e.closePath||(c-=2);for(var f=2;f{var s=i(28591);i(61286).register("ellipse",(function(t,e,i,n,r,o){return this.displayList.add(new s(this.scene,t,e,i,n,r,o))}))},84171:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(17554),r=i(55881),t.exports={renderWebGL:n,renderCanvas:r}},17554:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=n(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(a,l,e,d,u,c),e.isStroked&&r(a,e,d,u,c),t.pipelines.postBatch(e)}},39169:(t,e,i)=>{var s=i(56694),n=i(91461),r=i(88059),o=new s({Extends:n,Mixins:[r],initialize:function(t,e,i,s,r,o,a,h,l,u,c){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===r&&(r=128),void 0===o&&(o=32),void 0===a&&(a=32),n.call(this,t,"Grid",null),this.cellWidth=o,this.cellHeight=a,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(e,i),this.setSize(s,r),this.setFillStyle(h,l),void 0!==u&&this.setOutlineStyle(u,c),this.updateDisplayOrigin()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showCells=!1:(this.fillColor=t,this.fillAlpha=e,this.showCells=!0),this},setAltFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showAltCells=!1:(this.altFillColor=t,this.altFillAlpha=e,this.showAltCells=!0),this},setOutlineStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showOutline=!1:(this.outlineFillColor=t,this.outlineFillAlpha=e,this.showOutline=!0),this}});t.exports=o},95525:(t,e,i)=>{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=-e._displayOriginX,l=-e._displayOriginY,u=i.alpha*e.alpha,c=e.width,d=e.height,p=e.cellWidth,f=e.cellHeight,v=Math.ceil(c/p),g=Math.ceil(d/f),m=p,y=f,x=p-(v*p-c),T=f-(g*f-d),w=e.showCells,b=e.showAltCells,E=e.showOutline,S=0,A=0,C=0,_=0,M=0;if(E&&(m--,y--,x===p&&x--,T===f&&T--),w&&e.fillAlpha>0)for(s(a,e),A=0;A0)for(s(a,e,e.altFillColor,e.altFillAlpha*u),A=0;A0){for(n(a,e,e.outlineFillColor,e.outlineFillAlpha*u),S=1;S{var s=i(61286),n=i(39169);s.register("grid",(function(t,e,i,s,r,o,a,h,l,u){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h,l,u))}))},88059:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(50639),r=i(95525),t.exports={renderWebGL:n,renderCanvas:r}},50639:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),a=s(e,i,r);o.calcMatrix.copyFrom(a.calc).translate(-e._displayOriginX,-e._displayOriginY);var h,l,u=i.alpha*e.alpha,c=e.width,d=e.height,p=e.cellWidth,f=e.cellHeight,v=Math.ceil(c/p),g=Math.ceil(d/f),m=p,y=f,x=p-(v*p-c),T=f-(g*f-d),w=e.showCells,b=e.showAltCells,E=e.showOutline,S=0,A=0,C=0,_=0,M=0;if(E&&(m--,y--,x===p&&x--,T===f&&T--),t.pipelines.preBatch(e),w&&e.fillAlpha>0)for(h=o.fillTint,l=n.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*u),h.TL=l,h.TR=l,h.BL=l,h.BR=l,A=0;A0)for(h=o.fillTint,l=n.getTintAppendFloatAlpha(e.altFillColor,e.altFillAlpha*u),h.TL=l,h.TR=l,h.BL=l,h.BR=l,A=0;A0){var R=o.strokeTint,P=n.getTintAppendFloatAlpha(e.outlineFillColor,e.outlineFillAlpha*u);for(R.TL=P,R.TR=P,R.BL=P,R.BR=P,S=1;S{var s=i(72296),n=i(56694),r=i(91461),o=new n({Extends:r,Mixins:[s],initialize:function(t,e,i,s,n,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=48),void 0===n&&(n=32),void 0===o&&(o=15658734),void 0===a&&(a=10066329),void 0===h&&(h=13421772),r.call(this,t,"IsoBox",null),this.projection=4,this.fillTop=o,this.fillLeft=a,this.fillRight=h,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(e,i),this.setSize(s,n),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=o},32884:(t,e,i)=>{var s=i(15608),n=i(49584);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.currentContext;if(n(t,o,e,i,r)&&e.isFilled){var a=e.width,h=e.height,l=a/2,u=a/e.projection;e.showTop&&(s(o,e,e.fillTop),o.beginPath(),o.moveTo(-l,-h),o.lineTo(0,-u-h),o.lineTo(l,-h),o.lineTo(l,-1),o.lineTo(0,u-1),o.lineTo(-l,-1),o.lineTo(-l,-h),o.fill()),e.showLeft&&(s(o,e,e.fillLeft),o.beginPath(),o.moveTo(-l,0),o.lineTo(0,u),o.lineTo(0,u-h),o.lineTo(-l,-h),o.lineTo(-l,0),o.fill()),e.showRight&&(s(o,e,e.fillRight),o.beginPath(),o.moveTo(l,0),o.lineTo(0,u),o.lineTo(0,u-h),o.lineTo(l,-h),o.lineTo(l,0),o.fill()),o.restore()}}},88154:(t,e,i)=>{var s=i(61286),n=i(4415);s.register("isobox",(function(t,e,i,s,r,o,a){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a))}))},72296:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(33101),r=i(32884),t.exports={renderWebGL:n,renderCanvas:r}},33101:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var o,a,h,l,u,c,d,p,f,v=t.pipelines.set(e.pipeline),g=s(e,i,r),m=v.calcMatrix.copyFrom(g.calc),y=e.width,x=e.height,T=y/2,w=y/e.projection,b=i.alpha*e.alpha;e.isFilled&&(t.pipelines.preBatch(e),e.showTop&&(o=n.getTintAppendFloatAlpha(e.fillTop,b),a=m.getX(-T,-x),h=m.getY(-T,-x),l=m.getX(0,-w-x),u=m.getY(0,-w-x),c=m.getX(T,-x),d=m.getY(T,-x),p=m.getX(0,w-x),f=m.getY(0,w-x),v.batchQuad(e,a,h,l,u,c,d,p,f,0,0,1,1,o,o,o,o,2)),e.showLeft&&(o=n.getTintAppendFloatAlpha(e.fillLeft,b),a=m.getX(-T,0),h=m.getY(-T,0),l=m.getX(0,w),u=m.getY(0,w),c=m.getX(0,w-x),d=m.getY(0,w-x),p=m.getX(-T,-x),f=m.getY(-T,-x),v.batchQuad(e,a,h,l,u,c,d,p,f,0,0,1,1,o,o,o,o,2)),e.showRight&&(o=n.getTintAppendFloatAlpha(e.fillRight,b),a=m.getX(T,0),h=m.getY(T,0),l=m.getX(0,w),u=m.getY(0,w),c=m.getX(0,w-x),d=m.getY(0,w-x),p=m.getX(T,-x),f=m.getY(T,-x),v.batchQuad(e,a,h,l,u,c,d,p,f,0,0,1,1,o,o,o,o,2)),t.pipelines.postBatch(e))}},65159:(t,e,i)=>{var s=i(56694),n=i(93387),r=i(91461),o=new s({Extends:r,Mixins:[n],initialize:function(t,e,i,s,n,o,a,h,l){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=48),void 0===n&&(n=32),void 0===o&&(o=!1),void 0===a&&(a=15658734),void 0===h&&(h=10066329),void 0===l&&(l=13421772),r.call(this,t,"IsoTriangle",null),this.projection=4,this.fillTop=a,this.fillLeft=h,this.fillRight=l,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=o,this.isFilled=!0,this.setPosition(e,i),this.setSize(s,n),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setReversed:function(t){return this.isReversed=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=o},9923:(t,e,i)=>{var s=i(15608),n=i(49584);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.currentContext;if(n(t,o,e,i,r)&&e.isFilled){var a=e.width,h=e.height,l=a/2,u=a/e.projection,c=e.isReversed;e.showTop&&c&&(s(o,e,e.fillTop),o.beginPath(),o.moveTo(-l,-h),o.lineTo(0,-u-h),o.lineTo(l,-h),o.lineTo(0,u-h),o.fill()),e.showLeft&&(s(o,e,e.fillLeft),o.beginPath(),c?(o.moveTo(-l,-h),o.lineTo(0,u),o.lineTo(0,u-h)):(o.moveTo(-l,0),o.lineTo(0,u),o.lineTo(0,u-h)),o.fill()),e.showRight&&(s(o,e,e.fillRight),o.beginPath(),c?(o.moveTo(l,-h),o.lineTo(0,u),o.lineTo(0,u-h)):(o.moveTo(l,0),o.lineTo(0,u),o.lineTo(0,u-h)),o.fill()),o.restore()}}},67765:(t,e,i)=>{var s=i(61286),n=i(65159);s.register("isotriangle",(function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))}))},93387:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(54946),r=i(9923),t.exports={renderWebGL:n,renderCanvas:r}},54946:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),a=s(e,i,r),h=o.calcMatrix.copyFrom(a.calc),l=e.width,u=e.height,c=l/2,d=l/e.projection,p=e.isReversed,f=i.alpha*e.alpha;if(e.isFilled){var v,g,m,y,x,T,w;if(t.pipelines.preBatch(e),e.showTop&&p){v=n.getTintAppendFloatAlpha(e.fillTop,f),g=h.getX(-c,-u),m=h.getY(-c,-u),y=h.getX(0,-d-u),x=h.getY(0,-d-u),T=h.getX(c,-u),w=h.getY(c,-u);var b=h.getX(0,d-u),E=h.getY(0,d-u);o.batchQuad(e,g,m,y,x,T,w,b,E,0,0,1,1,v,v,v,v,2)}e.showLeft&&(v=n.getTintAppendFloatAlpha(e.fillLeft,f),p?(g=h.getX(-c,-u),m=h.getY(-c,-u),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)):(g=h.getX(-c,0),m=h.getY(-c,0),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)),o.batchTri(e,g,m,y,x,T,w,0,0,1,1,v,v,v,2)),e.showRight&&(v=n.getTintAppendFloatAlpha(e.fillRight,f),p?(g=h.getX(c,-u),m=h.getY(c,-u),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)):(g=h.getX(c,0),m=h.getY(c,0),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)),o.batchTri(e,g,m,y,x,T,w,0,0,1,1,v,v,v,2)),t.pipelines.postBatch(e)}}},579:(t,e,i)=>{var s=i(56694),n=i(91461),r=i(88829),o=i(52660),a=new s({Extends:n,Mixins:[o],initialize:function(t,e,i,s,o,a,h,l,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===o&&(o=0),void 0===a&&(a=128),void 0===h&&(h=0),n.call(this,t,"Line",new r(s,o,a,h));var c=Math.max(1,this.geom.right-this.geom.left),d=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(e,i),this.setSize(c,d),void 0!==l&&this.setStrokeStyle(1,l,u),this.updateDisplayOrigin()},setLineWidth:function(t,e){return void 0===e&&(e=t),this._startWidth=t,this._endWidth=e,this.lineWidth=t,this},setTo:function(t,e,i,s){return this.geom.setTo(t,e,i,s),this}});t.exports=a},52044:(t,e,i)=>{var s=i(17876),n=i(49584);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.currentContext;if(n(t,o,e,i,r)){var a=e._displayOriginX,h=e._displayOriginY;e.isStroked&&(s(o,e),o.beginPath(),o.moveTo(e.geom.x1-a,e.geom.y1-h),o.lineTo(e.geom.x2-a,e.geom.y2-h),o.stroke()),o.restore()}}},85665:(t,e,i)=>{var s=i(61286),n=i(579);s.register("line",(function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))}))},52660:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(46952),r=i(52044),t.exports={renderWebGL:n,renderCanvas:r}},46952:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),a=s(e,i,r);o.calcMatrix.copyFrom(a.calc);var h=e._displayOriginX,l=e._displayOriginY,u=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isStroked){var c=o.strokeTint,d=n.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*u);c.TL=d,c.TR=d,c.BL=d,c.BR=d;var p=e._startWidth,f=e._endWidth;o.batchLine(e.geom.x1-h,e.geom.y1-l,e.geom.x2-h,e.geom.y2-l,p,f,1,0,!1,a.sprite,a.camera)}t.pipelines.postBatch(e)}},91249:(t,e,i)=>{var s=i(70573),n=i(56694),r=i(11117),o=i(14045),a=i(8580),h=i(91461),l=i(18974),u=new n({Extends:h,Mixins:[s],initialize:function(t,e,i,s,n,r){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Polygon",new a(s));var l=o(this.geom);this.setPosition(e,i),this.setSize(l.width,l.height),void 0!==n&&this.setFillStyle(n,r),this.updateDisplayOrigin(),this.updateData()},smooth:function(t){void 0===t&&(t=1);for(var e=0;e{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,p=u[1]-l;a.beginPath(),a.moveTo(d,p),e.closePath||(c-=2);for(var f=2;f{var s=i(61286),n=i(91249);s.register("polygon",(function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))}))},70573:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(72841),r=i(40834),t.exports={renderWebGL:n,renderCanvas:r}},72841:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=n(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(a,l,e,d,u,c),e.isStroked&&r(a,e,d,u,c),t.pipelines.postBatch(e)}},517:(t,e,i)=>{var s=i(56694),n=i(74118),r=i(91461),o=i(37673),a=new s({Extends:r,Mixins:[o],initialize:function(t,e,i,s,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===o&&(o=128),r.call(this,t,"Rectangle",new n(0,0,s,o)),this.setPosition(e,i),this.setSize(s,o),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setSize:function(t,e){this.width=t,this.height=e,this.geom.setSize(t,e),this.updateData(),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},4091:(t,e,i)=>{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY;e.isFilled&&(s(a,e),a.fillRect(-h,-l,e.width,e.height)),e.isStroked&&(n(a,e),a.beginPath(),a.rect(-h,-l,e.width,e.height),a.stroke()),a.restore()}}},94355:(t,e,i)=>{var s=i(61286),n=i(517);s.register("rectangle",(function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))}))},37673:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(43532),r=i(4091),t.exports={renderWebGL:n,renderCanvas:r}},43532:(t,e,i)=>{var s=i(73329),n=i(50262),r=i(75512);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=s(e,i,o);a.calcMatrix.copyFrom(h.calc);var l=e._displayOriginX,u=e._displayOriginY,c=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isFilled){var d=a.fillTint,p=r.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*c);d.TL=p,d.TR=p,d.BL=p,d.BR=p,a.batchFillRect(-l,-u,e.width,e.height)}e.isStroked&&n(a,e,c,l,u),t.pipelines.postBatch(e)}},77843:(t,e,i)=>{var s=i(87956),n=i(56694),r=i(11117),o=i(91461),a=new n({Extends:o,Mixins:[s],initialize:function(t,e,i,s,n,r,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=5),void 0===n&&(n=32),void 0===r&&(r=64),o.call(this,t,"Star",null),this._points=s,this._innerRadius=n,this._outerRadius=r,this.setPosition(e,i),this.setSize(2*r,2*r),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,s=this._outerRadius,n=Math.PI/2*3,o=Math.PI/e,a=s,h=s;t.push(a,h+-s);for(var l=0;l{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,p=u[1]-l;a.beginPath(),a.moveTo(d,p),e.closePath||(c-=2);for(var f=2;f{var s=i(77843);i(61286).register("star",(function(t,e,i,n,r,o,a){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a))}))},87956:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(12037),r=i(11401),t.exports={renderWebGL:n,renderCanvas:r}},12037:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=n(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(a,l,e,d,u,c),e.isStroked&&r(a,e,d,u,c),t.pipelines.postBatch(e)}},21873:(t,e,i)=>{var s=i(56694),n=i(91461),r=i(66349),o=i(70498),a=new s({Extends:n,Mixins:[o],initialize:function(t,e,i,s,o,a,h,l,u,c,d){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===o&&(o=128),void 0===a&&(a=64),void 0===h&&(h=0),void 0===l&&(l=128),void 0===u&&(u=128),n.call(this,t,"Triangle",new r(s,o,a,h,l,u));var p=this.geom.right-this.geom.left,f=this.geom.bottom-this.geom.top;this.setPosition(e,i),this.setSize(p,f),void 0!==c&&this.setFillStyle(c,d),this.updateDisplayOrigin(),this.updateData()},setTo:function(t,e,i,s,n,r){return this.geom.setTo(t,e,i,s,n,r),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},60213:(t,e,i)=>{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.geom.x1-h,c=e.geom.y1-l,d=e.geom.x2-h,p=e.geom.y2-l,f=e.geom.x3-h,v=e.geom.y3-l;a.beginPath(),a.moveTo(u,c),a.lineTo(d,p),a.lineTo(f,v),a.closePath(),e.isFilled&&(s(a,e),a.fill()),e.isStroked&&(n(a,e),a.stroke()),a.restore()}}},79296:(t,e,i)=>{var s=i(61286),n=i(21873);s.register("triangle",(function(t,e,i,s,r,o,a,h,l,u){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h,l,u))}))},70498:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(72291),r=i(60213),t.exports={renderWebGL:n,renderCanvas:r}},72291:(t,e,i)=>{var s=i(73329),n=i(50262),r=i(75512);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=s(e,i,o);a.calcMatrix.copyFrom(h.calc);var l=e._displayOriginX,u=e._displayOriginY,c=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isFilled){var d=a.fillTint,p=r.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*c);d.TL=p,d.TR=p,d.BL=p,d.BR=p;var f=e.geom.x1-l,v=e.geom.y1-u,g=e.geom.x2-l,m=e.geom.y2-u,y=e.geom.x3-l,x=e.geom.y3-u;a.batchFillTriangle(f,v,g,m,y,x,h.sprite,h.camera)}e.isStroked&&n(a,e,c,l,u),t.pipelines.postBatch(e)}},13747:(t,e,i)=>{var s=i(16569),n=i(56694),r=i(64937),o=i(89980),a=i(20791),h=new n({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.FX,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,a],initialize:function(t,e,i,n,r){o.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s(this),this.setTexture(n,r),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e){return this.anims.play(t,e)},playReverse:function(t,e){return this.anims.playReverse(t,e)},playAfterDelay:function(t,e){return this.anims.playAfterDelay(t,e)},playAfterRepeat:function(t,e){return this.anims.playAfterRepeat(t,e)},chain:function(t){return this.anims.chain(t)},stop:function(){return this.anims.stop()},stopAfterDelay:function(t){return this.anims.stopAfterDelay(t)},stopAfterRepeat:function(t){return this.anims.stopAfterRepeat(t)},stopOnFrame:function(t){return this.anims.stopOnFrame(t)},toJSON:function(){return r.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=h},27573:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},89219:(t,e,i)=>{var s=i(88933),n=i(32291),r=i(99325),o=i(20494),a=i(13747);r.register("sprite",(function(t,e){void 0===t&&(t={});var i=o(t,"key",null),r=o(t,"frame",null),h=new a(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),s(this.scene,h,t),n(h,t),h}))},66135:(t,e,i)=>{var s=i(61286),n=i(13747);s.register("sprite",(function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))}))},20791:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(21034),r=i(27573),t.exports={renderWebGL:n,renderCanvas:r}},21034:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),e.pipeline.batchSprite(e,i,s)}},32979:t=>{t.exports=function(t,e,i){var s=t.canvas,n=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&r.maxLines1&&(d+=p*(h-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:p,lineHeight:c}}},27030:(t,e,i)=>{var s=i(61068);t.exports=function(t){var e=s.create(this),i=e.getContext("2d",{willReadFrequently:!0});t.syncFont(e,i);var n=i.measureText(t.testString);if("actualBoundingBoxAscent"in n){var r=n.actualBoundingBoxAscent,o=n.actualBoundingBoxDescent;return s.remove(e),{ascent:r,descent:o,fontSize:r+o}}var a=Math.ceil(n.width*t.baselineX),h=a,l=2*h;h=h*t.baselineY|0,e.width=a,e.height=l,i.fillStyle="#f00",i.fillRect(0,0,a,l),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,h);var u={ascent:0,descent:0,fontSize:0},c=i.getImageData(0,0,a,l);if(!c)return u.ascent=h,u.descent=h+6,u.fontSize=u.ascent+u.descent,s.remove(e),u;var d,p,f=c.data,v=f.length,g=4*a,m=0,y=!1;for(d=0;dh;d--){for(p=0;p{var s=i(99584),n=i(61068),r=i(56694),o=i(64937),a=i(89980),h=i(32979),l=i(10850),u=i(55638),c=i(80032),d=i(74744),p=new r({Extends:a,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.FX,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.ScrollFactor,o.Tint,o.Transform,o.Visible,c],initialize:function(t,e,i,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Text"),this.renderer=t.sys.renderer,this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.canvas=n.create(this),this.context=this.canvas.getContext("2d"),this.style=new d(this,r),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this._text=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.lineSpacing=0,this.dirty=!1,0===this.style.resolution&&(this.style.resolution=1),this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(s),r&&r.padding&&this.setPadding(r.padding),r&&r.lineSpacing&&this.setLineSpacing(r.lineSpacing)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",s(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(t){var e=this.style;if(e.wordWrapCallback){var i=e.wordWrapCallback.call(e.wordWrapCallbackScope,t,this);return Array.isArray(i)&&(i=i.join("\n")),i}return e.wordWrapWidth?e.wordWrapUseAdvanced?this.advancedWordWrap(t,this.context,this.style.wordWrapWidth):this.basicWordWrap(t,this.context,this.style.wordWrapWidth):t},advancedWordWrap:function(t,e,i){for(var s="",n=t.replace(/ +/gi," ").split(this.splitRegExp),r=n.length,o=0;ol){if(0===c){for(var v=p;v.length&&(v=v.slice(0,-1),!((f=e.measureText(v).width)<=l)););if(!v.length)throw new Error("wordWrapWidth < a single character");var g=d.substr(v.length);u[c]=g,h+=v}var m=u[c].length?c:c+1,y=u.slice(m).join(" ").replace(/[ \n]*$/gi,"");n.splice(o+1,0,y),r=n.length;break}h+=p,l-=f}s+=h.replace(/[ \n]*$/gi,"")+"\n"}}return s=s.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var s="",n=t.split(this.splitRegExp),r=n.length-1,o=e.measureText(" ").width,a=0;a<=r;a++){for(var h=i,l=n[a].split(" "),u=l.length-1,c=0;c<=u;c++){var d=l[c],p=e.measureText(d).width,f=p;ch&&c>0&&(s+="\n",h=i),s+=d,c0&&(d+=l.lineSpacing*v),i.rtl)c=p-c-u.left-u.right;else if("right"===i.align)c+=o-l.lineWidths[v];else if("center"===i.align)c+=(o-l.lineWidths[v])/2;else if("justify"===i.align){if(l.lineWidths[v]/l.width>=.85){var g=l.width-l.lineWidths[v],m=e.measureText(" ").width,y=a[v].trim(),x=y.split(" ");g+=(a[v].length-y.length)*m;for(var T=Math.floor(g/m),w=0;T>0;)x[w]+=" ",w=(w+1)%(x.length-1||1),--T;a[v]=x.join(" ")}}this.autoRound&&(c=Math.round(c),d=Math.round(d)),i.strokeThickness&&(i.syncShadow(e,i.shadowStroke),e.strokeText(a[v],c,d)),i.color&&(i.syncShadow(e,i.shadowFill),e.fillText(a[v],c,d))}e.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var b=this.input;return b&&!b.customHitArea&&(b.hitArea.width=this.width,b.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(t){this.setText(t)}},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&u(this.canvas),n.remove(this.canvas),this.texture.destroy()}});t.exports=p},71649:t=>{t.exports=function(t,e,i,s){0!==e.width&&0!==e.height&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,s))}},75397:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(76555);n.register("text",(function(t,e){void 0===t&&(t={});var i=r(t,"text",""),n=r(t,"style",null),a=r(t,"padding",null);null!==a&&(n.padding=a);var h=new o(this.scene,0,0,i,n);return void 0!==e&&(t.add=e),s(this.scene,h,t),h.autoRound=r(t,"autoRound",!0),h.resolution=r(t,"resolution",1),h}))},94627:(t,e,i)=>{var s=i(76555);i(61286).register("text",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},80032:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(76128),r=i(71649),t.exports={renderWebGL:n,renderCanvas:r}},74744:(t,e,i)=>{var s=i(56694),n=i(20494),r=i(10850),o=i(27030),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new s({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this.wordWrapWidth,this.wordWrapCallback,this.wordWrapCallbackScope,this.wordWrapUseAdvanced,this._font,this.setStyle(e,!1,!0)},setStyle:function(t,e,i){for(var s in void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),a){var h=i?a[s][1]:this[s];this[s]="wordWrapCallback"===s||"wordWrapCallbackScope"===s?r(t,a[s][0],h):n(t,a[s][0],h)}var l=r(t,"font",null);null!==l&&this.setFont(l,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var u=r(t,"fill",null);null!==u&&(this.color=u);var c=r(t,"metrics",!1);return c?this.metrics={ascent:r(c,"ascent",0),descent:r(c,"descent",0),fontSize:r(c,"fontSize",0)}:!e&&this.metrics||(this.metrics=o(this)),e?this.parent.updateText():this.parent},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow: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)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=o(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i=t,s="",n="";if("string"!=typeof t)i=r(t,"fontFamily","Courier"),s=r(t,"fontSize","16px"),n=r(t,"fontStyle","");else{var o=t.split(" "),a=0;n=o.length>2?o[a++]:"",s=o[a++]||"16px",i=o[a++]||"Courier"}return i===this.fontFamily&&s===this.fontSize&&n===this.fontStyle||(this.fontFamily=i,this.fontSize=s,this.fontStyle=n,e&&this.update(!0)),this.parent},setFontFamily:function(t){return this.fontFamily!==t&&(this.fontFamily=t,this.update(!0)),this.parent},setFontStyle:function(t){return this.fontStyle!==t&&(this.fontStyle=t,this.update(!0)),this.parent},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize!==t&&(this.fontSize=t,this.update(!0)),this.parent},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setResolution:function(t){return this.resolution=t,this.update(!1)},setStroke:function(t,e){return void 0===e&&(e=this.strokeThickness),void 0===t&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):this.stroke===t&&this.strokeThickness===e||(this.stroke=t,this.strokeThickness=e,this.update(!0)),this.parent},setShadow:function(t,e,i,s,n,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===s&&(s=0),void 0===n&&(n=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=s,this.shadowStroke=n,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},76128:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n){if(0!==e.width&&0!==e.height){i.addToRenderList(e);var r=e.frame,o=r.width,a=r.height,h=s.getTintAppendFloatAlpha,l=t.pipelines.set(e.pipeline,e),u=l.setTexture2D(r.glTexture,e);l.batchTexture(e,r.glTexture,o,a,e.x,e.y,o/e.style.resolution,a/e.style.resolution,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,o,a,h(e.tintTopLeft,i.alpha*e._alphaTL),h(e.tintTopRight,i.alpha*e._alphaTR),h(e.tintBottomLeft,i.alpha*e._alphaBL),h(e.tintBottomRight,i.alpha*e._alphaBR),e.tintFill,0,0,i,n,!1,u)}}},35856:(t,e,i)=>{var s=i(61068),n=i(56694),r=i(64937),o=i(89980),a=i(3504),h=i(8213),l=i(9271),u=i(93736),c=new n({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.FX,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,l],initialize:function(t,e,i,n,r,h,l){var c=t.sys.renderer;o.call(this,t,"TileSprite");var d=t.sys.textures.get(h),p=d.get(l);p.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed textures"),p=(d=t.sys.textures.get("__MISSING")).get()),n&&r?(n=Math.floor(n),r=Math.floor(r)):(n=p.width,r=p.height),this._tilePosition=new u,this._tileScale=new u(1,1),this.dirty=!1,this.renderer=c,this.canvas=s.create(this,n,r),this.context=this.canvas.getContext("2d"),this.displayTexture=d,this.displayFrame=p,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=a(p.width),this.potHeight=a(p.height),this.fillCanvas=s.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(e,i),this.setSize(n,r),this.setFrame(l),this.setOriginFromFrame(),this.initPipeline()},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){var e=this.displayTexture.get(t);return this.potWidth=a(e.width),this.potHeight=a(e.height),this.canvas.width=0,e.cutWidth&&e.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=e,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileScale:function(t,e){return void 0===t&&(t=this.tileScaleX),void 0===e&&(e=t),this.tileScaleX=t,this.tileScaleY=e,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var t=this.displayFrame;if(t.source.isRenderTexture||t.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var e=this.fillContext,i=this.fillCanvas,s=this.potWidth,n=this.potHeight;this.renderer&&this.renderer.gl||(s=t.cutWidth,n=t.cutHeight),e.clearRect(0,0,s,n),i.width=s,i.height=n,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,s,n),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var t=this.canvas;if(t.width===this.width&&t.height===this.height||(t.width=this.width,t.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context;this.scene.sys.game.config.antialias||h.disable(e);var i=this._tileScale.x,s=this._tileScale.y,n=this._tilePosition.x,r=this._tilePosition.y;e.clearRect(0,0,this.width,this.height),e.save(),e.scale(i,s),e.translate(-n,-r),e.fillStyle=this.fillPattern,e.fillRect(n,r,this.width/i,this.height/s),e.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),s.remove(this.canvas),s.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}});t.exports=c},93305:t=>{t.exports=function(t,e,i,s){e.updateCanvas(),i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},63950:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(35856);n.register("tileSprite",(function(t,e){void 0===t&&(t={});var i=r(t,"x",0),n=r(t,"y",0),a=r(t,"width",512),h=r(t,"height",512),l=r(t,"key",""),u=r(t,"frame",""),c=new o(this.scene,i,n,a,h,l,u);return void 0!==e&&(t.add=e),s(this.scene,c,t),c}))},20509:(t,e,i)=>{var s=i(35856);i(61286).register("tileSprite",(function(t,e,i,n,r,o){return this.displayList.add(new s(this.scene,t,e,i,n,r,o))}))},9271:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(74287),r=i(93305),t.exports={renderWebGL:n,renderCanvas:r}},74287:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n){e.updateCanvas();var r=e.width,o=e.height;if(0!==r&&0!==o){i.addToRenderList(e);var a=s.getTintAppendFloatAlpha,h=t.pipelines.set(e.pipeline,e),l=h.setTexture2D(e.fillPattern,e);h.batchTexture(e,e.fillPattern,e.displayFrame.width*e.tileScaleX,e.displayFrame.height*e.tileScaleY,e.x,e.y,r,o,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.originX*r,e.originY*o,0,0,r,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,e.tilePositionX%e.displayFrame.width/e.displayFrame.width,e.tilePositionY%e.displayFrame.height/e.displayFrame.height,i,n,!1,l)}}},8630:(t,e,i)=>{var s=i(56694),n=i(82897),r=i(64937),o=i(56631),a=i(97081),h=i(33963),l=i(89980),u=i(76038),c=i(76583),d=i(77974),p=i(83392),f=new s({Extends:l,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.FX,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,d],initialize:function(t,e,i,s){l.call(this,t,"Video"),this.video=null,this.videoTexture=null,this.videoTextureSource=null,this.snapshotTexture=null,this.flipY=!1,this._key=c(),this.touchLocked=!0,this.playWhenUnlocked=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={play:this.playHandler.bind(this),load:this.loadHandler.bind(this),error:this.loadErrorHandler.bind(this),end:this.completeHandler.bind(this),time:this.timeUpdateHandler.bind(this),seeking:this.seekingHandler.bind(this),seeked:this.seekedHandler.bind(this)},this._crop=this.resetCropObject(),this.markers={},this._markerIn=-1,this._markerOut=p.MAX_SAFE_INTEGER,this._lastUpdate=0,this._cacheKey="",this._isSeeking=!1,this.removeVideoElementOnDestroy=!1,this.setPosition(e,i),this.setSize(256,256),this.initPipeline(),s&&this.changeSource(s,!1);var n=t.sys.game.events;n.on(a.PAUSE,this.globalPause,this),n.on(a.RESUME,this.globalResume,this);var r=t.sys.sound;r&&r.on(u.GLOBAL_MUTE,this.globalMute,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},play:function(t,e,i){if(this.touchLocked&&this.playWhenUnlocked||this.isPlaying())return this;var s=this.video;if(!s)return console.warn("Video not loaded"),this;void 0===t&&(t=s.loop);var n=this.scene.sys.sound;return n&&n.mute&&this.setMute(!0),isNaN(e)||(this._markerIn=e),!isNaN(i)&&i>e&&(this._markerOut=i),s.loop=t,this.createPlayPromise()},createPlayPromise:function(){var t=this.video,e=this._callbacks;this.isPlaying();var i=t.play();return void 0!==i?i.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)):(t.addEventListener("playing",e.play),t.readyState<2&&(this.retry=this.retryLimit,this._retryID&&window.clearTimeout(this._retryID),this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))),t.addEventListener("error",e.error),t.addEventListener("abort",e.error),t.addEventListener("stalled",e.error),t.addEventListener("suspend",e.error),t.addEventListener("waiting",e.error),t.addEventListener("ended",e.end),t.addEventListener("timeupdate",e.time),t.addEventListener("seeking",e.seeking),t.addEventListener("seeked",e.seeked),t.addEventListener("play",this.playHandler2.bind(this)),t.addEventListener("pause",this.pauseHandler.bind(this)),this},playHandler2:function(t){console.log("play",this._cacheKey)},pauseHandler:function(t){console.log("paused",this._cacheKey)},changeSource:function(t,e,i,s,n){void 0===e&&(e=!0),this.video&&this.stop();var r=this.scene.sys.cache.video.get(t);return r?(this.video=r,this._cacheKey=t,this._codePaused=r.paused,this._codeMuted=r.muted,this.videoTexture?(this.scene.sys.textures.remove(this._key),this.videoTexture=this.scene.sys.textures.create(this._key,r,r.videoWidth,r.videoHeight),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,r.videoWidth,r.videoHeight),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,r.videoWidth,r.videoHeight)):this.updateTexture(),r.currentTime=0,this._lastUpdate=0,e&&this.play(i,s,n)):this.video=null,this},addMarker:function(t,e,i){return!isNaN(e)&&e>=0&&!isNaN(i)&&(this.markers[t]=[e,i]),this},playMarker:function(t,e){var i=this.markers[t];return i&&this.play(e,i[0],i[1]),this},removeMarker:function(t){return delete this.markers[t],this},snapshot:function(t,e){return void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.snapshotArea(0,0,this.width,this.height,t,e)},snapshotArea:function(t,e,i,s,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===s&&(s=this.height),void 0===n&&(n=i),void 0===r&&(r=s);var o=this.video,a=this.snapshotTexture;return a?(a.setSize(n,r),o&&a.context.drawImage(o,t,e,i,s,0,0,n,r)):(a=this.scene.sys.textures.createCanvas(c(),n,r),this.snapshotTexture=a,o&&a.context.drawImage(o,t,e,i,s,0,0,n,r)),a.update()},saveSnapshotTexture:function(t){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,t):this.snapshotTexture=this.scene.sys.textures.createCanvas(t,this.width,this.height),this.snapshotTexture},loadURL:function(t,e,i,s){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var n=document.createElement("video");return n.controls=!1,i&&(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")),n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),void 0!==s&&n.setAttribute("crossorigin",s),n.addEventListener("error",this._callbacks.error),n.addEventListener(e,this._callbacks.load),n.src=t,n.load(),this.video=n,this},loadMediaStream:function(t,e,i){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var s=document.createElement("video");s.controls=!1,i&&(s.muted=!0,s.defaultMuted=!0,s.setAttribute("autoplay","autoplay")),s.setAttribute("playsinline","playsinline"),s.setAttribute("preload","auto"),s.addEventListener("error",this._callbacks.error,!0),s.addEventListener(e,this._callbacks.load,!0);try{s.srcObject=t}catch(e){s.src=window.URL.createObjectURL(t)}return s.load(),this.video=s,this},playPromiseSuccessHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn)},playPromiseErrorHandler:function(t){console.log("pp error handler",t),this.scene.sys.input.once(h.POINTER_DOWN,this.unlockHandler,this),this.touchLocked=!0,this.playWhenUnlocked=!0,this.emit(o.VIDEO_ERROR,this,t)},playHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this.video.removeEventListener("playing",this._callbacks.play,!0)},loadHandler:function(){this.updateTexture()},loadErrorHandler:function(t){this.stop(),this.emit(o.VIDEO_ERROR,this,t)},unlockHandler:function(){this.touchLocked=!1,this.playWhenUnlocked=!1,this.emit(o.VIDEO_UNLOCKED,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn),this.createPlayPromise()},completeHandler:function(){console.log("ended"),this.emit(o.VIDEO_COMPLETE,this)},timeUpdateHandler:function(){this.video&&this.video.currentTime=this._markerOut&&(t.loop?(t.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=e,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),console.log("prEUp stop"),this.stop())))}},checkVideoProgress:function(){this.video.readyState>=2?this.updateTexture():(this.retry--,this.retry>0?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):this.emit(o.VIDEO_TIMEOUT,this))},updateTexture:function(){var t=this.video,e=t.videoWidth,i=t.videoHeight;if(this.videoTexture){var s=this.videoTextureSource;s.source!==t&&(s.source=t,s.width=e,s.height=i),s.update()}else this.videoTexture=this.scene.sys.textures.create(this._key,t,e,i),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,e,i),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,e,i)},getVideoKey:function(){return this._cacheKey},seekTo:function(t){var e=this.video;if(e){var i=e.duration;if(i!==1/0&&!isNaN(i)){var s=i*t;this.setCurrentTime(s)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e=this.video;if(e){if("string"==typeof t){var i=t[0],s=parseFloat(t.substr(1));"+"===i?t=e.currentTime+s:"-"===i&&(t=e.currentTime-s)}e.currentTime=t,this._lastUpdate=t}return this},isSeeking:function(){return this._isSeeking},seekingHandler:function(){this._isSeeking=!0,this.emit(o.VIDEO_SEEKING,this)},seekedHandler:function(){this._isSeeking=!1,this.emit(o.VIDEO_SEEKED,this),this.video&&this.updateTexture()},getProgress:function(){var t=this.video;if(t){var e=t.currentTime,i=t.duration;if(i!==1/0&&!isNaN(i))return e/i}return 0},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){void 0===t&&(t=!0),this._codeMuted=t;var e=this.video;return e&&(e.muted=!!this._systemMuted||t),this},isMuted:function(){return this._codeMuted},globalMute:function(t,e){this._systemMuted=e;var i=this.video;i&&(i.muted=!!this._codeMuted||e)},globalPause:function(){this._systemPaused=!0,this.video&&this.video.pause()},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&this.createPlayPromise()},setPaused:function(t){void 0===t&&(t=!0);var e=this.video;return this._codePaused=t,e&&(t?e.paused||e.pause():t||e.paused&&!this._systemPaused&&this.createPlayPromise()),this},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(t){return void 0===t&&(t=1),this.video&&(this.video.volume=n(t,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(t){return this.video&&(this.video.playbackRate=t),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(t){return void 0===t&&(t=!0),this.video&&(this.video.loop=t),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!1),this.videoTexture&&this.scene.sys.textures.renameTexture(this._key,t),this._key=t,this.flipY=e,this.videoTextureSource&&this.videoTextureSource.setFlipY(e),this.videoTexture},stop:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.removeEventListener(i,e[i]);t.pause()}return this._retryID&&window.clearTimeout(this._retryID),this.emit(o.VIDEO_STOP,this),this},removeVideoElement:function(){var t=this.video;if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("autoplay"),t.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(),this.removeVideoElementOnDestroy&&this.removeVideoElement();var t=this.scene.sys.game.events;t.off(a.PAUSE,this.globalPause,this),t.off(a.RESUME,this.globalResume,this);var e=this.scene.sys.sound;e&&e.off(u.GLOBAL_MUTE,this.globalMute,this),this._retryID&&window.clearTimeout(this._retryID)}});t.exports=f},56933:t=>{t.exports=function(t,e,i,s){e.videoTexture&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,s))}},65601:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(8630);n.register("video",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=new o(this.scene,0,0,i);return void 0!==e&&(t.add=e),s(this.scene,n,t),n}))},215:(t,e,i)=>{var s=i(8630);i(61286).register("video",(function(t,e,i){return this.displayList.add(new s(this.scene,t,e,i))}))},77974:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(83572),r=i(56933),t.exports={renderWebGL:n,renderCanvas:r}},83572:t=>{t.exports=function(t,e,i,s){e.videoTexture&&(i.addToRenderList(e),e.pipeline.batchSprite(e,i,s))}},71030:(t,e,i)=>{var s=i(95723),n=i(26673),r=i(65650),o=i(56694),a=i(64937),h=i(89980),l=i(74118),u=i(94287),c=new o({Extends:h,Mixins:[a.Depth,a.GetBounds,a.Origin,a.Transform,a.ScrollFactor,a.Visible],initialize:function(t,e,i,n,r){void 0===n&&(n=1),void 0===r&&(r=n),h.call(this,t,"Zone"),this.setPosition(e,i),this.width=n,this.height=r,this.blendMode=s.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e,i){void 0===i&&(i=!0),this.width=t,this.height=e,this.updateDisplayOrigin();var s=this.input;return i&&s&&!s.customHitArea&&(s.hitArea.width=t,s.hitArea.height=e),this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},setCircleDropZone:function(t){return this.setDropZone(new n(0,0,t),r)},setRectangleDropZone:function(t,e){return this.setDropZone(new l(0,0,t,e),u)},setDropZone:function(t,e){return this.input||this.setInteractive(t,e,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(t,e,i){i.addToRenderList(e)},renderWebGL:function(t,e,i){i.addToRenderList(e)}});t.exports=c},24067:(t,e,i)=>{var s=i(99325),n=i(20494),r=i(71030);s.register("zone",(function(t){var e=n(t,"x",0),i=n(t,"y",0),s=n(t,"width",1),o=n(t,"height",s);return new r(this.scene,e,i,s,o)}))},34546:(t,e,i)=>{var s=i(71030);i(61286).register("zone",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},95847:t=>{t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},26673:(t,e,i)=>{var s=i(56694),n=i(65650),r=i(94026),o=i(62941),a=i(52394),h=i(30977),l=new s({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.type=a.CIRCLE,this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=l},37964:t=>{t.exports=function(t){return Math.PI*t.radius*2}},72233:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x+t.radius*Math.cos(e),i.y=t.y+t.radius*Math.sin(e),i}},61761:(t,e,i)=>{var s=i(26673);t.exports=function(t){return new s(t.x,t.y,t.radius)}},65650:t=>{t.exports=function(t,e,i){return t.radius>0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},39187:(t,e,i)=>{var s=i(65650);t.exports=function(t,e){return s(t,e.x,e.y)}},58672:(t,e,i)=>{var s=i(65650);t.exports=function(t,e){return s(t,e.x,e.y)&&s(t,e.right,e.y)&&s(t,e.x,e.bottom)&&s(t,e.right,e.bottom)}},42997:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},94894:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},48027:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},94026:(t,e,i)=>{var s=i(72233),n=i(91806),r=i(83392),o=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=n(e,0,r.PI2);return s(t,a,i)}},62941:(t,e,i)=>{var s=i(37964),n=i(72233),r=i(91806),o=i(83392);t.exports=function(t,e,i,a){void 0===a&&(a=[]),!e&&i>0&&(e=s(t)/i);for(var h=0;h{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},88665:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},30977:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=2*Math.PI*Math.random(),n=Math.random()+Math.random(),r=n>1?2-n:n,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},6112:(t,e,i)=>{var s=i(26673);s.Area=i(95847),s.Circumference=i(37964),s.CircumferencePoint=i(72233),s.Clone=i(61761),s.Contains=i(65650),s.ContainsPoint=i(39187),s.ContainsRect=i(58672),s.CopyFrom=i(42997),s.Equals=i(94894),s.GetBounds=i(48027),s.GetPoint=i(94026),s.GetPoints=i(62941),s.Offset=i(34585),s.OffsetPoint=i(88665),s.Random=i(30977),t.exports=s},52394:t=>{t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},58605:t=>{t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},39507:t=>{t.exports=function(t){var e=t.width/2,i=t.height/2,s=Math.pow(e-i,2)/Math.pow(e+i,2);return Math.PI*(e+i)*(1+3*s/(10+Math.sqrt(4-3*s)))}},86998:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.width/2,r=t.height/2;return i.x=t.x+n*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},81773:(t,e,i)=>{var s=i(95669);t.exports=function(t){return new s(t.x,t.y,t.width,t.height)}},72313:t=>{t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var s=(e-t.x)/t.width,n=(i-t.y)/t.height;return(s*=s)+(n*=n)<.25}},34368:(t,e,i)=>{var s=i(72313);t.exports=function(t,e){return s(t,e.x,e.y)}},71431:(t,e,i)=>{var s=i(72313);t.exports=function(t,e){return s(t,e.x,e.y)&&s(t,e.right,e.y)&&s(t,e.x,e.bottom)&&s(t,e.right,e.bottom)}},75459:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},95669:(t,e,i)=>{var s=i(56694),n=i(72313),r=i(95340),o=i(54978),a=i(52394),h=i(72006),l=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=l},98068:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},72897:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},95340:(t,e,i)=>{var s=i(86998),n=i(91806),r=i(83392),o=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=n(e,0,r.PI2);return s(t,a,i)}},54978:(t,e,i)=>{var s=i(39507),n=i(86998),r=i(91806),o=i(83392);t.exports=function(t,e,i,a){void 0===a&&(a=[]),!e&&i>0&&(e=s(t)/i);for(var h=0;h{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},36233:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},72006:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random()*Math.PI*2,n=Math.sqrt(Math.random());return e.x=t.x+n*Math.cos(i)*t.width/2,e.y=t.y+n*Math.sin(i)*t.height/2,e}},40652:(t,e,i)=>{var s=i(95669);s.Area=i(58605),s.Circumference=i(39507),s.CircumferencePoint=i(86998),s.Clone=i(81773),s.Contains=i(72313),s.ContainsPoint=i(34368),s.ContainsRect=i(71431),s.CopyFrom=i(75459),s.Equals=i(98068),s.GetBounds=i(72897),s.GetPoint=i(95340),s.GetPoints=i(54978),s.Offset=i(77951),s.OffsetPoint=i(36233),s.Random=i(72006),t.exports=s},84068:(t,e,i)=>{var s=i(52394),n=i(98611),r={Circle:i(6112),Ellipse:i(40652),Intersects:i(7563),Line:i(28482),Mesh:i(14293),Point:i(63472),Polygon:i(44359),Rectangle:i(66658),Triangle:i(87619)};r=n(!1,r,s),t.exports=r},22184:(t,e,i)=>{var s=i(53996);t.exports=function(t,e){return s(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},26535:t=>{t.exports=function(t,e){var i=e.width/2,s=e.height/2,n=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-s),o=i+t.radius,a=s+t.radius;if(n>o||r>a)return!1;if(n<=i||r<=s)return!0;var h=n-i,l=r-s;return h*h+l*l<=t.radius*t.radius}},71145:(t,e,i)=>{var s=i(79967),n=i(22184);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r,o,a,h,l=t.x,u=t.y,c=t.radius,d=e.x,p=e.y,f=e.radius;if(u===p)0===(a=(o=-2*p)*o-4*(r=1)*(d*d+(h=(f*f-c*c-d*d+l*l)/(2*(l-d)))*h-2*d*h+p*p-f*f))?i.push(new s(h,-o/(2*r))):a>0&&(i.push(new s(h,(-o+Math.sqrt(a))/(2*r))),i.push(new s(h,(-o-Math.sqrt(a))/(2*r))));else{var v=(l-d)/(u-p),g=(f*f-c*c-d*d+l*l-p*p+u*u)/(2*(u-p));0===(a=(o=2*u*v-2*g*v-2*l)*o-4*(r=v*v+1)*(l*l+u*u+g*g-c*c-2*u*g))?(h=-o/(2*r),i.push(new s(h,g-h*v))):a>0&&(h=(-o+Math.sqrt(a))/(2*r),i.push(new s(h,g-h*v)),h=(-o-Math.sqrt(a))/(2*r),i.push(new s(h,g-h*v)))}}return i}},62508:(t,e,i)=>{var s=i(26111),n=i(26535);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC(),h=e.getLineD();s(r,t,i),s(o,t,i),s(a,t,i),s(h,t,i)}return i}},26111:(t,e,i)=>{var s=i(79967),n=i(61472);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r,o,a=t.x1,h=t.y1,l=t.x2,u=t.y2,c=e.x,d=e.y,p=e.radius,f=l-a,v=u-h,g=a-c,m=h-d,y=f*f+v*v,x=2*(f*g+v*m),T=x*x-4*y*(g*g+m*m-p*p);if(0===T){var w=-x/(2*y);r=a+w*f,o=h+w*v,w>=0&&w<=1&&i.push(new s(r,o))}else if(T>0){var b=(-x-Math.sqrt(T))/(2*y);r=a+b*f,o=h+b*v,b>=0&&b<=1&&i.push(new s(r,o));var E=(-x+Math.sqrt(T))/(2*y);r=a+E*f,o=h+E*v,E>=0&&E<=1&&i.push(new s(r,o))}}return i}},96537:(t,e,i)=>{var s=i(70015);t.exports=function(t,e,i,n){void 0===i&&(i=!1);var r,o,a,h=t.x1,l=t.y1,u=t.x2,c=t.y2,d=e.x1,p=e.y1,f=u-h,v=c-l,g=e.x2-d,m=e.y2-p,y=f*m-v*g;if(0===y)return null;if(i){if((o=(d+g*(r=(f*(p-l)+v*(h-d))/(g*v-m*f))-h)/f)<0||r<0||r>1)return null;a=o}else{if(o=((l-p)*f-(h-d)*v)/y,(r=((d-h)*m-(p-l)*g)/y)<0||r>1||o<0||o>1)return null;a=r}return void 0===n&&(n=new s),n.set(h+f*a,l+v*a,a)}},17647:(t,e,i)=>{var s=i(96537),n=i(88829),r=i(70015),o=new n,a=new r;t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=new r);var h=!1;n.set(),a.set();for(var l=e[0],u=1;u{var s=i(70015),n=i(51729),r=i(17647),o=new s;t.exports=function(t,e,i,s){void 0===s&&(s=new n),Array.isArray(e)||(e=[e]);var a=!1;s.set(),o.set();for(var h=0;h{var s=i(79967),n=i(25227),r=i(47910);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e))for(var o=e.getLineA(),a=e.getLineB(),h=e.getLineC(),l=e.getLineD(),u=[new s,new s,new s,new s],c=[n(o,t,u[0]),n(a,t,u[1]),n(h,t,u[2]),n(l,t,u[3])],d=0;d<4;d++)c[d]&&i.push(u[d]);return i}},7449:(t,e,i)=>{var s=i(51729),n=i(68439),r=new(i(88829));function o(t,e,i,o,a){var h=Math.cos(t),l=Math.sin(t);r.setTo(e,i,e+h,i+l);var u=n(r,o,!0);u&&a.push(new s(u.x,u.y,t,u.w))}function a(t,e){return t.z-e.z}t.exports=function(t,e,i){Array.isArray(i)||(i=[i]);for(var s=[],n=[],r=0;r{var s=i(74118),n=i(90205);t.exports=function(t,e,i){return void 0===i&&(i=new s),n(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},1946:(t,e,i)=>{var s=i(9569),n=i(90205);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC(),h=t.getLineD();s(r,e,i),s(o,e,i),s(a,e,i),s(h,e,i)}return i}},34211:(t,e,i)=>{var s=i(20370),n=i(9569);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();n(r,t,i),n(o,t,i),n(a,t,i)}return i}},80511:(t,e,i)=>{var s=i(26111),n=i(48411);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();s(r,e,i),s(o,e,i),s(a,e,i)}return i}},31343:(t,e,i)=>{var s=i(79967),n=i(86117),r=i(25227);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e))for(var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=[new s,new s,new s],u=[r(o,e,l[0]),r(a,e,l[1]),r(h,e,l[2])],c=0;c<3;c++)u[c]&&i.push(l[c]);return i}},70534:(t,e,i)=>{var s=i(23589),n=i(31343);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();n(t,r,i),n(t,o,i),n(t,a,i)}return i}},61472:(t,e,i)=>{var s=i(65650),n=new(i(79967));t.exports=function(t,e,i){if(void 0===i&&(i=n),s(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(s(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,c=o;if(l>0){var d=(a*r+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*o>=0&&s(e,i.x,i.y)}},25227:t=>{t.exports=function(t,e,i){var s=t.x1,n=t.y1,r=t.x2,o=t.y2,a=e.x1,h=e.y1,l=e.x2,u=e.y2;if(s===r&&n===o||a===l&&h===u)return!1;var c=(u-h)*(r-s)-(l-a)*(o-n);if(0===c)return!1;var d=((l-a)*(n-h)-(u-h)*(s-a))/c,p=((r-s)*(n-h)-(o-n)*(s-a))/c;return!(d<0||d>1||p<0||p>1)&&(i&&(i.x=s+d*(r-s),i.y=n+d*(o-n)),!0)}},47910:t=>{t.exports=function(t,e){var i=t.x1,s=t.y1,n=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,l=e.bottom,u=0;if(i>=o&&i<=h&&s>=a&&s<=l||n>=o&&n<=h&&r>=a&&r<=l)return!0;if(i=o){if((u=s+(r-s)*(o-i)/(n-i))>a&&u<=l)return!0}else if(i>h&&n<=h&&(u=s+(r-s)*(h-i)/(n-i))>=a&&u<=l)return!0;if(s=a){if((u=i+(n-i)*(a-s)/(r-s))>=o&&u<=h)return!0}else if(s>l&&r<=l&&(u=i+(n-i)*(l-s)/(r-s))>=o&&u<=h)return!0;return!1}},34426:t=>{t.exports=function(t,e,i){void 0===i&&(i=1);var s=e.x1,n=e.y1,r=e.x2,o=e.y2,a=t.x,h=t.y,l=(r-s)*(r-s)+(o-n)*(o-n);if(0===l)return!1;var u=((a-s)*(r-s)+(h-n)*(o-n))/l;if(u<0)return Math.sqrt((s-a)*(s-a)+(n-h)*(n-h))<=i;if(u>=0&&u<=1){var c=((n-h)*(r-s)-(s-a)*(o-n))/l;return Math.abs(c)*Math.sqrt(l)<=i}return Math.sqrt((r-a)*(r-a)+(o-h)*(o-h))<=i}},81414:(t,e,i)=>{var s=i(34426);t.exports=function(t,e){if(!s(t,e))return!1;var i=Math.min(e.x1,e.x2),n=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=n&&t.y>=r&&t.y<=o}},90205:t=>{t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0)&&!(t.righte.right||t.y>e.bottom)}},20370:(t,e,i)=>{var s=i(25227),n=i(94287),r=i(86875),o=i(87279);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},8786:t=>{t.exports=function(t,e,i,s,n,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||n{var s=i(61472),n=i(60689);t.exports=function(t,e){return!(t.left>e.right||t.righte.bottom||t.bottom{var s=i(25227);t.exports=function(t,e){return!(!t.contains(e.x1,e.y1)&&!t.contains(e.x2,e.y2))||(!!s(t.getLineA(),e)||(!!s(t.getLineB(),e)||!!s(t.getLineC(),e)))}},23589:(t,e,i)=>{var s=i(86875),n=i(18680),r=i(25227);t.exports=function(t,e){if(t.left>e.right||t.righte.bottom||t.bottom0||(c=n(e),(d=s(t,c,!0)).length>0)}},7563:(t,e,i)=>{t.exports={CircleToCircle:i(22184),CircleToRectangle:i(26535),GetCircleToCircle:i(71145),GetCircleToRectangle:i(62508),GetLineToCircle:i(26111),GetLineToLine:i(96537),GetLineToPoints:i(17647),GetLineToPolygon:i(68439),GetLineToRectangle:i(9569),GetRaysFromPointToPolygon:i(7449),GetRectangleIntersection:i(82931),GetRectangleToRectangle:i(1946),GetRectangleToTriangle:i(34211),GetTriangleToCircle:i(80511),GetTriangleToLine:i(31343),GetTriangleToTriangle:i(70534),LineToCircle:i(61472),LineToLine:i(25227),LineToRectangle:i(47910),PointToLine:i(34426),PointToLineSegment:i(81414),RectangleToRectangle:i(90205),RectangleToTriangle:i(20370),RectangleToValues:i(8786),TriangleToCircle:i(48411),TriangleToLine:i(86117),TriangleToTriangle:i(23589)}},50599:t=>{t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},58813:t=>{t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=[]);var s=Math.round(t.x1),n=Math.round(t.y1),r=Math.round(t.x2),o=Math.round(t.y2),a=Math.abs(r-s),h=Math.abs(o-n),l=s-h&&(c-=h,s+=l),p{t.exports=function(t,e,i){var s=e-(t.x1+t.x2)/2,n=i-(t.y1+t.y2)/2;return t.x1+=s,t.y1+=n,t.x2+=s,t.y2+=n,t}},26718:(t,e,i)=>{var s=i(88829);t.exports=function(t){return new s(t.x1,t.y1,t.x2,t.y2)}},88930:t=>{t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},90656:t=>{t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},30897:(t,e,i)=>{var s=i(16028);t.exports=function(t,e,i){void 0===i&&(i=e);var n=s(t),r=t.x2-t.x1,o=t.y2-t.y1;return e&&(t.x1=t.x1-r/n*e,t.y1=t.y1-o/n*e),i&&(t.x2=t.x2+r/n*i,t.y2=t.y2+o/n*i),t}},30684:(t,e,i)=>{var s=i(92951),n=i(21902),r=i(79967);t.exports=function(t,e,i,o,a){void 0===o&&(o=0),void 0===a&&(a=[]);var h,l,u=[],c=t.x1,d=t.y1,p=t.x2-c,f=t.y2-d,v=n(e,a),g=i-1;for(h=0;h0){var m=u[0],y=[m];for(h=1;h=o&&(y.push(x),m=x)}var T=u[u.length-1];return s(m,T){var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},11222:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.x1,r=t.y1,o=t.x2,a=t.y2,h=(o-n)*(o-n)+(a-r)*(a-r);if(0===h)return i;var l=((e.x-n)*(o-n)+(e.y-r)*(a-r))/h;return i.x=n+l*(o-n),i.y=r+l*(a-r),i}},7377:(t,e,i)=>{var s=i(83392),n=i(50599),r=i(79967);t.exports=function(t,e){void 0===e&&(e=new r);var i=n(t)-s.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},66464:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},8570:(t,e,i)=>{var s=i(16028),n=i(79967);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(e=s(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u{t.exports=function(t,e){var i=t.x1,s=t.y1,n=t.x2,r=t.y2,o=(n-i)*(n-i)+(r-s)*(r-s);if(0===o)return!1;var a=((s-e.y)*(n-i)-(i-e.x)*(r-s))/o;return Math.abs(a)*Math.sqrt(o)}},82996:t=>{t.exports=function(t){return Math.abs(t.y1-t.y2)}},16028:t=>{t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},88829:(t,e,i)=>{var s=i(56694),n=i(66464),r=i(8570),o=i(52394),a=i(74077),h=i(93736),l=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=o.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=s},getPoint:function(t,e){return n(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},73273:(t,e,i)=>{var s=i(83392),n=i(1071),r=i(50599);t.exports=function(t){var e=r(t)-s.TAU;return n(e,-Math.PI,Math.PI)}},96936:(t,e,i)=>{var s=i(83392),n=i(50599);t.exports=function(t){return Math.cos(n(t)-s.TAU)}},43581:(t,e,i)=>{var s=i(83392),n=i(50599);t.exports=function(t){return Math.sin(n(t)-s.TAU)}},13990:t=>{t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},1298:t=>{t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},74077:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},30473:(t,e,i)=>{var s=i(50599),n=i(73273);t.exports=function(t,e){return 2*n(e)-Math.PI-s(t)}},25968:(t,e,i)=>{var s=i(1809);t.exports=function(t,e){var i=(t.x1+t.x2)/2,n=(t.y1+t.y2)/2;return s(t,i,n,e)}},24296:(t,e,i)=>{var s=i(1809);t.exports=function(t,e,i){return s(t,e.x,e.y,i)}},1809:t=>{t.exports=function(t,e,i,s){var n=Math.cos(s),r=Math.sin(s),o=t.x1-e,a=t.y1-i;return t.x1=o*n-a*r+e,t.y1=o*r+a*n+i,o=t.x2-e,a=t.y2-i,t.x2=o*n-a*r+e,t.y2=o*r+a*n+i,t}},88171:t=>{t.exports=function(t,e,i,s,n){return t.x1=e,t.y1=i,t.x2=e+Math.cos(s)*n,t.y2=i+Math.sin(s)*n,t}},82797:t=>{t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},41067:t=>{t.exports=function(t){return Math.abs(t.x1-t.x2)}},28482:(t,e,i)=>{var s=i(88829);s.Angle=i(50599),s.BresenhamPoints=i(58813),s.CenterOn=i(88513),s.Clone=i(26718),s.CopyFrom=i(88930),s.Equals=i(90656),s.Extend=i(30897),s.GetEasedPoints=i(30684),s.GetMidPoint=i(20487),s.GetNearestPoint=i(11222),s.GetNormal=i(7377),s.GetPoint=i(66464),s.GetPoints=i(8570),s.GetShortestDistance=i(65269),s.Height=i(82996),s.Length=i(16028),s.NormalAngle=i(73273),s.NormalX=i(96936),s.NormalY=i(43581),s.Offset=i(13990),s.PerpSlope=i(1298),s.Random=i(74077),s.ReflectAngle=i(30473),s.Rotate=i(25968),s.RotateAroundPoint=i(24296),s.RotateAroundXY=i(1809),s.SetToAngle=i(88171),s.Slope=i(82797),s.Width=i(41067),t.exports=s},18693:(t,e,i)=>{var s=i(56694),n=i(74118),r=i(93736);function o(t,e,i,s){var n=t-i,r=e-s,o=n*n+r*r;return Math.sqrt(o)}var a=new s({initialize:function(t,e,i){this.vertex1=t,this.vertex2=e,this.vertex3=i,this.bounds=new n,this._inCenter=new r},getInCenter:function(t){void 0===t&&(t=!0);var e,i,s,n,r,a,h=this.vertex1,l=this.vertex2,u=this.vertex3;t?(e=h.x,i=h.y,s=l.x,n=l.y,r=u.x,a=u.y):(e=h.vx,i=h.vy,s=l.vx,n=l.vy,r=u.vx,a=u.vy);var c=o(r,a,s,n),d=o(e,i,r,a),p=o(s,n,e,i),f=c+d+p;return this._inCenter.set((e*c+s*d+r*p)/f,(i*c+n*d+a*p)/f)},contains:function(t,e,i){var s=this.vertex1,n=this.vertex2,r=this.vertex3,o=s.vx,a=s.vy,h=n.vx,l=n.vy,u=r.vx,c=r.vy;if(i){var d=i.a,p=i.b,f=i.c,v=i.d,g=i.e,m=i.f;o=s.vx*d+s.vy*f+g,a=s.vx*p+s.vy*v+m,h=n.vx*d+n.vy*f+g,l=n.vx*p+n.vy*v+m,u=r.vx*d+r.vy*f+g,c=r.vx*p+r.vy*v+m}var y=u-o,x=c-a,T=h-o,w=l-a,b=t-o,E=e-a,S=y*y+x*x,A=y*T+x*w,C=y*b+x*E,_=T*T+w*w,M=T*b+w*E,R=S*_-A*A,P=0===R?0:1/R,O=(_*C-A*M)*P,L=(S*M-A*C)*P;return O>=0&&L>=0&&O+L<1},isCounterClockwise:function(t){var e=this.vertex1,i=this.vertex2,s=this.vertex3,n=(i.vx-e.vx)*(s.vy-e.vy)-(i.vy-e.vy)*(s.vx-e.vx);return t<=0?n>=0:n<0},load:function(t,e,i,s,n){return i=this.vertex1.load(t,e,i,s,n),i=this.vertex2.load(t,e,i,s,n),i=this.vertex3.load(t,e,i,s,n)},transformCoordinatesLocal:function(t,e,i,s){return this.vertex1.transformCoordinatesLocal(t,e,i,s),this.vertex2.transformCoordinatesLocal(t,e,i,s),this.vertex3.transformCoordinatesLocal(t,e,i,s),this},updateBounds:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3,s=this.bounds;return s.x=Math.min(t.vx,e.vx,i.vx),s.y=Math.min(t.vy,e.vy,i.vy),s.width=Math.max(t.vx,e.vx,i.vx)-s.x,s.height=Math.max(t.vy,e.vy,i.vy)-s.y,this},isInView:function(t,e,i,s,n,r,o,a,h,l,u){this.update(s,n,r,o,a,h,l,u);var c=this.vertex1,d=this.vertex2,p=this.vertex3;if(c.ta<=0&&d.ta<=0&&p.ta<=0)return!1;if(e&&!this.isCounterClockwise(i))return!1;var f=this.bounds;f.x=Math.min(c.tx,d.tx,p.tx),f.y=Math.min(c.ty,d.ty,p.ty),f.width=Math.max(c.tx,d.tx,p.tx)-f.x,f.height=Math.max(c.ty,d.ty,p.ty)-f.y;var v=t.x+t.width,g=t.y+t.height;return!(f.width<=0||f.height<=0||t.width<=0||t.height<=0)&&!(f.rightv||f.y>g)},update:function(t,e,i,s,n,r,o,a){return this.vertex1.update(e,i,s,n,r,o,a,t),this.vertex2.update(e,i,s,n,r,o,a,t),this.vertex3.update(e,i,s,n,r,o,a,t),this},translate:function(t,e){void 0===e&&(e=0);var i=this.vertex1,s=this.vertex2,n=this.vertex3;return i.x+=t,i.y+=e,s.x+=t,s.y+=e,n.x+=t,n.y+=e,this},x:{get:function(){return this.getInCenter().x},set:function(t){var e=this.getInCenter();this.translate(t-e.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(t){var e=this.getInCenter();this.translate(0,t-e.y)}},alpha:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.alpha+e.alpha+i.alpha)/3},set:function(t){this.vertex1.alpha=t,this.vertex2.alpha=t,this.vertex3.alpha=t}},depth:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.vz+e.vz+i.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});t.exports=a},99425:(t,e,i)=>{var s=i(18693),n=i(72632),r=i(16650),o=i(70015),a=i(85769),h=new o,l=new o,u=new r;t.exports=function(t){var e=n(t,"mesh"),i=n(t,"texture",null),r=n(t,"frame"),o=n(t,"width",1),c=n(t,"height",o),d=n(t,"widthSegments",1),p=n(t,"heightSegments",d),f=n(t,"x",0),v=n(t,"y",0),g=n(t,"z",0),m=n(t,"rotateX",0),y=n(t,"rotateY",0),x=n(t,"rotateZ",0),T=n(t,"zIsUp",!0),w=n(t,"isOrtho",!!e&&e.dirtyCache[11]),b=n(t,"colors",[16777215]),E=n(t,"alphas",[1]),S=n(t,"tile",!1),A=n(t,"flipY",!1),C=n(t,"width",null),_={faces:[],verts:[]};if(h.set(f,v,g),l.set(m,y,x),u.fromRotationXYTranslation(l,h,T),!i&&e)i=e.texture;else if(e&&"string"==typeof i)i=e.scene.sys.textures.get(i);else if(!i)return _;var M=i.get(r);!C&&w&&i&&e&&(o=M.width/e.height,c=M.height/e.height);var R,P,O=o/2,L=c/2,F=Math.floor(d),D=Math.floor(p),k=F+1,I=D+1,B=o/F,N=c/D,Y=[],U=[],X=0,z=1,G=0,V=1;M&&(X=M.u0,z=M.u1,A?(G=M.v1,V=M.v0):(G=M.v0,V=M.v1));var W=z-X,H=V-G;for(P=0;P{var s=i(18693),n=i(16650),r=i(70015),o=i(85769),a=new r,h=new r,l=new n;t.exports=function(t,e,i,n,r,u,c,d,p,f){void 0===i&&(i=1),void 0===n&&(n=0),void 0===r&&(r=0),void 0===u&&(u=0),void 0===c&&(c=0),void 0===d&&(d=0),void 0===p&&(p=0),void 0===f&&(f=!0);var v={faces:[],verts:[]},g=t.materials;a.set(n,r,u),h.set(c,d,p),l.fromRotationXYTranslation(h,a,f);for(var m=0;m{var s=i(18693),n=i(85769);t.exports=function(t,e,i,r,o,a,h,l){if(void 0===r&&(r=!1),void 0===a&&(a=16777215),void 0===h&&(h=1),void 0===l&&(l=!1),t.length===e.length||r){var u,c,d,p,f,v,g,m,y,x,T,w={faces:[],vertices:[]},b=r?3:2,E=Array.isArray(a),S=Array.isArray(h);if(Array.isArray(i)&&i.length>0)for(u=0;u{var e=!0,i="untitled",s="",n="";function r(t){var e=t.indexOf("#");return e>-1?t.substring(0,e):t}function o(t){return 0===t.models.length&&t.models.push({faces:[],name:i,textureCoords:[],vertexNormals:[],vertices:[]}),s="",t.models[t.models.length-1]}function a(t,e){var n=t.length>=2?t[1]:i;e.models.push({faces:[],name:n,textureCoords:[],vertexNormals:[],vertices:[]}),s=""}function h(t){2===t.length&&(s=t[1])}function l(t,e){var i=t.length,s=i>=2?parseFloat(t[1]):0,n=i>=3?parseFloat(t[2]):0,r=i>=4?parseFloat(t[3]):0;o(e).vertices.push({x:s,y:n,z:r})}function u(t,i){var s=t.length,n=s>=2?parseFloat(t[1]):0,r=s>=3?parseFloat(t[2]):0,a=s>=4?parseFloat(t[3]):0;isNaN(n)&&(n=0),isNaN(r)&&(r=0),isNaN(a)&&(a=0),e&&(r=1-r),o(i).textureCoords.push({u:n,v:r,w:a})}function c(t,e){var i=t.length,s=i>=2?parseFloat(t[1]):0,n=i>=3?parseFloat(t[2]):0,r=i>=4?parseFloat(t[3]):0;o(e).vertexNormals.push({x:s,y:n,z:r})}function d(t,e){var i=t.length-1;if(!(i<3)){for(var r={group:s,material:n,vertices:[]},a=0;a3)){var u=0,c=0,d=0;u=parseInt(h[0],10),l>1&&""!==h[1]&&(c=parseInt(h[1],10)),l>2&&(d=parseInt(h[2],10)),0!==u&&(u<0&&(u=o(e).vertices.length+1+u),c-=1,u-=1,d-=1,r.vertices.push({textureCoordsIndex:c,vertexIndex:u,vertexNormalIndex:d}))}}o(e).faces.push(r)}}function p(t,e){t.length>=2&&e.materialLibraries.push(t[1])}function f(t){t.length>=2&&(n=t[1])}t.exports=function(t,i){void 0===i&&(i=!0),e=i;var o={materials:{},materialLibraries:[],models:[]};s="",n="";for(var v=t.split("\n"),g=0;g{var s=i(22946);t.exports=function(t){for(var e={},i=t.split("\n"),n="",r=0;r=2?Math.floor(255*a[2]):h,u=a.length>=3?Math.floor(255*a[3]):h;e[n]=s(h,l,u)}}}return e}},15313:t=>{t.exports=function(t,e,i,s){var n,r;if(void 0===i&&void 0===s){var o=t.getInCenter();n=o.x,r=o.y}var a=Math.cos(e),h=Math.sin(e),l=t.vertex1,u=t.vertex2,c=t.vertex3,d=l.x-n,p=l.y-r;l.set(d*a-p*h+n,d*h+p*a+r),d=u.x-n,p=u.y-r,u.set(d*a-p*h+n,d*h+p*a+r),d=c.x-n,p=c.y-r,c.set(d*a-p*h+n,d*h+p*a+r)}},85769:(t,e,i)=>{var s=i(56694),n=i(75512),r=i(70015),o=new s({Extends:r,initialize:function(t,e,i,s,n,o,a,h,l,u){void 0===o&&(o=16777215),void 0===a&&(a=1),void 0===h&&(h=0),void 0===l&&(l=0),void 0===u&&(u=0),r.call(this,t,e,i),this.vx=0,this.vy=0,this.vz=0,this.nx=h,this.ny=l,this.nz=u,this.u=s,this.v=n,this.color=o,this.alpha=a,this.tx=0,this.ty=0,this.ta=0},setUVs:function(t,e){return this.u=t,this.v=e,this},transformCoordinatesLocal:function(t,e,i,s){var n=this.x,r=this.y,o=this.z,a=t.val,h=n*a[0]+r*a[4]+o*a[8]+a[12],l=n*a[1]+r*a[5]+o*a[9]+a[13],u=n*a[2]+r*a[6]+o*a[10]+a[14],c=n*a[3]+r*a[7]+o*a[11]+a[15];this.vx=h/c*e,this.vy=-l/c*i,this.vz=s<=0?u/c:-u/c},resize:function(t,e,i,s,n,r){return this.x=t,this.y=e,this.vx=this.x*i,this.vy=-this.y*s,this.vz=0,n<.5?this.vx+=i*(.5-n):n>.5&&(this.vx-=i*(n-.5)),r<.5?this.vy+=s*(.5-r):r>.5&&(this.vy-=s*(r-.5)),this},update:function(t,e,i,s,n,r,o,a){var h=this.vx*t+this.vy*i+n,l=this.vx*e+this.vy*s+r;return o&&(h=Math.round(h),l=Math.round(l)),this.tx=h,this.ty=l,this.ta=this.alpha*a,this},load:function(t,e,i,s,r){return t[++i]=this.tx,t[++i]=this.ty,t[++i]=this.u,t[++i]=this.v,t[++i]=s,t[++i]=r,e[++i]=n.getTintAppendFloatAlpha(this.color,this.ta),i}});t.exports=o},14293:(t,e,i)=>{var s={Face:i(18693),GenerateGridVerts:i(99425),GenerateObjVerts:i(53267),GenerateVerts:i(67623),ParseObj:i(27291),ParseObjMaterial:i(76799),RotateFace:i(15313),Vertex:i(85769)};t.exports=s},77601:t=>{t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},38933:(t,e,i)=>{var s=i(79967);t.exports=function(t){return new s(t.x,t.y)}},47103:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y)}},13625:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},12536:t=>{t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},54205:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){if(void 0===e&&(e=new s),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var n=0;n{t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},82712:t=>{t.exports=function(t){return t.x*t.x+t.y*t.y}},20052:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){void 0===e&&(e=new s);for(var i=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,a=0;ai&&(i=h.x),h.xr&&(r=h.y),h.y{var s=i(79967);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=new s),n.x=t.x+(e.x-t.x)*i,n.y=t.y+(e.y-t.y)*i,n}},42397:t=>{t.exports=function(t){return t.setTo(t.y,t.x)}},59464:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.setTo(-t.x,-t.y)}},79967:(t,e,i)=>{var s=i(56694),n=i(52394),r=new s({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=n.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=r},53581:(t,e,i)=>{var s=i(79967),n=i(82712);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=(t.x*e.x+t.y*e.y)/n(e);return 0!==r&&(i.x=r*e.x,i.y=r*e.y),i}},50817:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.x*e.x+t.y*e.y;return 0!==n&&(i.x=n*e.x,i.y=n*e.y),i}},40525:(t,e,i)=>{var s=i(50083);t.exports=function(t,e){if(0!==t.x||0!==t.y){var i=s(t);t.x/=i,t.y/=i}return t.x*=e,t.y*=e,t}},63472:(t,e,i)=>{var s=i(79967);s.Ceil=i(77601),s.Clone=i(38933),s.CopyFrom=i(47103),s.Equals=i(13625),s.Floor=i(12536),s.GetCentroid=i(54205),s.GetMagnitude=i(50083),s.GetMagnitudeSq=i(82712),s.GetRectangleFromPoints=i(20052),s.Interpolate=i(77154),s.Invert=i(42397),s.Negative=i(59464),s.Project=i(53581),s.ProjectUnit=i(50817),s.SetMagnitude=i(40525),t.exports=s},19631:(t,e,i)=>{var s=i(8580);t.exports=function(t){return new s(t.points)}},45604:t=>{t.exports=function(t,e,i){for(var s=!1,n=-1,r=t.points.length-1;++n{var s=i(45604);t.exports=function(t,e){return s(t,e.x,e.y)}},11117:t=>{"use strict";function e(t,e,s){s=s||2;var r,o,a,h,c,d,f,v=e&&e.length,g=v?e[0]*s:t.length,m=i(t,0,g,s,!0),y=[];if(!m||m.next===m.prev)return y;if(v&&(m=function(t,e,s,n){var r,o,a,h=[];for(r=0,o=e.length;r80*s){r=a=t[0],o=h=t[1];for(var x=s;xa&&(a=c),d>h&&(h=d);f=0!==(f=Math.max(a-r,h-o))?32767/f:0}return n(m,y,s,r,o,f,0),y}function i(t,e,i,s,n){var r,o;if(n===C(t,e,i,s)>0)for(r=e;r=e;r-=s)o=E(r,t[r],t[r+1],o);return o&&m(o,o.next)&&(S(o),o=o.next),o}function s(t,e){if(!t)return t;e||(e=t);var i,s=t;do{if(i=!1,s.steiner||!m(s,s.next)&&0!==g(s.prev,s,s.next))s=s.next;else{if(S(s),(s=e=s.prev)===s.next)break;i=!0}}while(i||s!==e);return e}function n(t,e,i,l,u,c,p){if(t){!p&&c&&function(t,e,i,s){var n=t;do{0===n.z&&(n.z=d(n.x,n.y,e,i,s)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,i,s,n,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,s=i,a=0,e=0;e0||h>0&&s;)0!==a&&(0===h||!s||i.z<=s.z)?(n=i,i=i.nextZ,a--):(n=s,s=s.nextZ,h--),r?r.nextZ=n:t=n,n.prevZ=r,r=n;i=s}r.nextZ=null,l*=2}while(o>1)}(n)}(t,l,u,c);for(var f,v,g=t;t.prev!==t.next;)if(f=t.prev,v=t.next,c?o(t,l,u,c):r(t))e.push(f.i/i|0),e.push(t.i/i|0),e.push(v.i/i|0),S(t),t=v.next,g=v.next;else if((t=v)===g){p?1===p?n(t=a(s(t),e,i),e,i,l,u,c,2):2===p&&h(t,e,i,l,u,c):n(s(t),e,i,l,u,c,1);break}}}function r(t){var e=t.prev,i=t,s=t.next;if(g(e,i,s)>=0)return!1;for(var n=e.x,r=i.x,o=s.x,a=e.y,h=i.y,l=s.y,u=nr?n>o?n:o:r>o?r:o,p=a>h?a>l?a:l:h>l?h:l,v=s.next;v!==e;){if(v.x>=u&&v.x<=d&&v.y>=c&&v.y<=p&&f(n,a,r,h,o,l,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function o(t,e,i,s){var n=t.prev,r=t,o=t.next;if(g(n,r,o)>=0)return!1;for(var a=n.x,h=r.x,l=o.x,u=n.y,c=r.y,p=o.y,v=ah?a>l?a:l:h>l?h:l,x=u>c?u>p?u:p:c>p?c:p,T=d(v,m,e,i,s),w=d(y,x,e,i,s),b=t.prevZ,E=t.nextZ;b&&b.z>=T&&E&&E.z<=w;){if(b.x>=v&&b.x<=y&&b.y>=m&&b.y<=x&&b!==n&&b!==o&&f(a,u,h,c,l,p,b.x,b.y)&&g(b.prev,b,b.next)>=0)return!1;if(b=b.prevZ,E.x>=v&&E.x<=y&&E.y>=m&&E.y<=x&&E!==n&&E!==o&&f(a,u,h,c,l,p,E.x,E.y)&&g(E.prev,E,E.next)>=0)return!1;E=E.nextZ}for(;b&&b.z>=T;){if(b.x>=v&&b.x<=y&&b.y>=m&&b.y<=x&&b!==n&&b!==o&&f(a,u,h,c,l,p,b.x,b.y)&&g(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;E&&E.z<=w;){if(E.x>=v&&E.x<=y&&E.y>=m&&E.y<=x&&E!==n&&E!==o&&f(a,u,h,c,l,p,E.x,E.y)&&g(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function a(t,e,i){var n=t;do{var r=n.prev,o=n.next.next;!m(r,o)&&y(r,n,n.next,o)&&w(r,o)&&w(o,r)&&(e.push(r.i/i|0),e.push(n.i/i|0),e.push(o.i/i|0),S(n),S(n.next),n=t=o),n=n.next}while(n!==t);return s(n)}function h(t,e,i,r,o,a){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&v(h,l)){var u=b(h,l);return h=s(h,h.next),u=s(u,u.next),n(h,e,i,r,o,a,0),void n(u,e,i,r,o,a,0)}l=l.next}h=h.next}while(h!==t)}function l(t,e){return t.x-e.x}function u(t,e){var i=function(t,e){var i,s=e,n=t.x,r=t.y,o=-1/0;do{if(r<=s.y&&r>=s.next.y&&s.next.y!==s.y){var a=s.x+(r-s.y)*(s.next.x-s.x)/(s.next.y-s.y);if(a<=n&&a>o&&(o=a,i=s.x=s.x&&s.x>=u&&n!==s.x&&f(ri.x||s.x===i.x&&c(i,s)))&&(i=s,p=h)),s=s.next}while(s!==l);return i}(t,e);if(!i)return e;var n=b(i,t);return s(n,n.next),s(i,i.next)}function c(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function d(t,e,i,s,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-i)*n|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-s)*n|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{(e.x=(t-o)*(r-a)&&(t-o)*(s-a)>=(i-o)*(e-a)&&(i-o)*(r-a)>=(n-o)*(s-a)}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&y(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(w(t,e)&&w(e,t)&&function(t,e){var i=t,s=!1,n=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&n<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(s=!s),i=i.next}while(i!==t);return s}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||m(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function m(t,e){return t.x===e.x&&t.y===e.y}function y(t,e,i,s){var n=T(g(t,e,i)),r=T(g(t,e,s)),o=T(g(i,s,t)),a=T(g(i,s,e));return n!==r&&o!==a||(!(0!==n||!x(t,i,e))||(!(0!==r||!x(t,s,e))||(!(0!==o||!x(i,t,s))||!(0!==a||!x(i,e,s)))))}function x(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function T(t){return t>0?1:t<0?-1:0}function w(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function b(t,e){var i=new A(t.i,t.x,t.y),s=new A(e.i,e.x,e.y),n=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=n,n.prev=i,s.next=i,i.prev=s,r.next=s,s.prev=r,s}function E(t,e,i,s){var n=new A(t,e,i);return s?(n.next=s.next,n.prev=s,s.next.prev=n,s.next=n):(n.prev=n,n.next=n),n}function S(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function A(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function C(t,e,i,s){for(var n=0,r=e,o=i-s;r0&&(s+=t[n-1].length,i.holes.push(s))}return i},t.exports=e},14045:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){void 0===e&&(e=new s);for(var i,n=1/0,r=1/0,o=-n,a=-r,h=0;h{t.exports=function(t,e){void 0===e&&(e=[]);for(var i=0;i{var s=i(16028),n=i(88829),r=i(5159);t.exports=function(t,e,i,o){void 0===o&&(o=[]);var a=t.points,h=r(t);!e&&i>0&&(e=h/i);for(var l=0;lc+g)){var m=v.getPoint((u-c)/g);o.push(m);break}c+=g}return o}},5159:(t,e,i)=>{var s=i(16028),n=i(88829);t.exports=function(t){for(var e=t.points,i=0,r=0;r{var s=i(56694),n=i(45604),r=i(89294),o=i(52394),a=new s({initialize:function(t){this.type=o.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return n(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,s=0;s{t.exports=function(t){return t.points.reverse(),t}},95874:t=>{function e(t,e,i){var s=e.x,n=e.y,r=i.x-s,o=i.y-n;if(0!==r||0!==o){var a=((t.x-s)*r+(t.y-n)*o)/(r*r+o*o);a>1?(s=i.x,n=i.y):a>0&&(s+=r*a,n+=o*a)}return(r=t.x-s)*r+(o=t.y-n)*o}function i(t,s,n,r,o){for(var a,h=r,l=s+1;lh&&(a=l,h=u)}h>r&&(a-s>1&&i(t,s,a,r,o),o.push(t[a]),n-a>1&&i(t,a,n,r,o))}function s(t,e){var s=t.length-1,n=[t[0]];return i(t,0,s,e,n),n.push(t[s]),n}t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=!1);var n=t.points;if(n.length>2){var r=e*e;i||(n=function(t,e){for(var i,s,n,r,o,a=t[0],h=[a],l=1,u=t.length;le&&(h.push(i),a=i);return a!==i&&h.push(i),h}(n,r)),t.setTo(s(n,r))}return t}},18974:t=>{var e=function(t,e){return t[0]=e[0],t[1]=e[1],t};t.exports=function(t){var i,s=[],n=t.points;for(i=0;i0&&r.push(e([0,0],s[0])),i=0;i1&&r.push(e([0,0],s[s.length-1])),t.setTo(r)}},23490:t=>{t.exports=function(t,e,i){for(var s=t.points,n=0;n{var s=i(8580);s.Clone=i(19631),s.Contains=i(45604),s.ContainsPoint=i(87289),s.Earcut=i(11117),s.GetAABB=i(14045),s.GetNumberArray=i(98286),s.GetPoints=i(89294),s.Perimeter=i(5159),s.Reverse=i(32244),s.Simplify=i(95874),s.Smooth=i(18974),s.Translate=i(23490),t.exports=s},1653:t=>{t.exports=function(t){return t.width*t.height}},33943:t=>{t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t}},58662:t=>{t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t.width=Math.ceil(t.width),t.height=Math.ceil(t.height),t}},79993:t=>{t.exports=function(t,e,i){return t.x=e-t.width/2,t.y=i-t.height/2,t}},81572:(t,e,i)=>{var s=i(74118);t.exports=function(t){return new s(t.x,t.y,t.width,t.height)}},94287:t=>{t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i)}},28687:(t,e,i)=>{var s=i(94287);t.exports=function(t,e){return s(t,e.x,e.y)}},73222:t=>{t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&(e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom{t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},87279:t=>{t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},19989:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},92628:(t,e,i)=>{var s=i(6700);t.exports=function(t,e){var i=s(t);return i{var s=i(6700);t.exports=function(t,e){var i=s(t);return i>s(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},71356:t=>{t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},21687:t=>{t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},80222:(t,e,i)=>{var s=i(74118),n=i(83392);t.exports=function(t,e){if(void 0===e&&(e=new s),0===t.length)return e;for(var i,r,o,a=Number.MAX_VALUE,h=Number.MAX_VALUE,l=n.MIN_SAFE_INTEGER,u=n.MIN_SAFE_INTEGER,c=0;c{var s=i(74118);t.exports=function(t,e,i,n,r){return void 0===r&&(r=new s),r.setTo(Math.min(t,i),Math.min(e,n),Math.abs(t-i),Math.abs(e-n))}},6700:t=>{t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},35242:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.centerX,e.y=t.centerY,e}},47698:(t,e,i)=>{var s=i(85876),n=i(79967);t.exports=function(t,e,i){if(void 0===i&&(i=new n),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=s(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},54932:(t,e,i)=>{var s=i(47698),n=i(85876);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(e=n(t)/i);for(var o=0;o{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.width,e.y=t.height,e}},7782:(t,e,i)=>{var s=i(79993);t.exports=function(t,e,i){var n=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),s(t,n,r)}},66217:(t,e,i)=>{var s=i(74118),n=i(90205);t.exports=function(t,e,i){return void 0===i&&(i=new s),n(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},40053:(t,e,i)=>{var s=i(85876),n=i(79967);t.exports=function(t,e,i,r){if(void 0===r&&(r=[]),!e&&!i)return r;e?i=Math.round(s(t)/e):e=s(t)/i;for(var o=t.x,a=t.y,h=0,l=0;l=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},86673:t=>{t.exports=function(t,e){for(var i=t.x,s=t.right,n=t.y,r=t.bottom,o=0;o{t.exports=function(t,e){var i=Math.min(t.x,e.x),s=Math.max(t.right,e.right);t.x=i,t.width=s-i;var n=Math.min(t.y,e.y),r=Math.max(t.bottom,e.bottom);return t.y=n,t.height=r-n,t}},44755:t=>{t.exports=function(t,e,i){var s=Math.min(t.x,e),n=Math.max(t.right,e);t.x=s,t.width=n-s;var r=Math.min(t.y,i),o=Math.max(t.bottom,i);return t.y=r,t.height=o-r,t}},74466:t=>{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},55946:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},97474:t=>{t.exports=function(t,e){return t.xe.x&&t.ye.y}},85876:t=>{t.exports=function(t){return 2*(t.width+t.height)}},20243:(t,e,i)=>{var s=i(79967),n=i(75606);t.exports=function(t,e,i){void 0===i&&(i=new s),e=n(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r){var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},97691:(t,e,i)=>{var s=i(17489),n=i(73222),r=i(79967);t.exports=function(t,e,i){if(void 0===i&&(i=new r),n(t,e))switch(s(0,3)){case 0:i.x=t.x+Math.random()*(e.right-t.x),i.y=t.y+Math.random()*(e.top-t.y);break;case 1:i.x=e.x+Math.random()*(t.right-e.x),i.y=e.bottom+Math.random()*(t.bottom-e.bottom);break;case 2:i.x=t.x+Math.random()*(e.x-t.x),i.y=e.y+Math.random()*(t.bottom-e.y);break;case 3:i.x=e.right+Math.random()*(t.right-e.right),i.y=t.y+Math.random()*(e.bottom-t.y)}return i}},74118:(t,e,i)=>{var s=i(56694),n=i(94287),r=i(47698),o=i(54932),a=i(52394),h=i(88829),l=i(30001),u=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=a.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},51828:t=>{t.exports=function(t,e){return t.width===e.width&&t.height===e.height}},5691:t=>{t.exports=function(t,e,i){return void 0===i&&(i=e),t.width*=e,t.height*=i,t}},58795:(t,e,i)=>{var s=i(74118);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=Math.min(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-n,a=Math.max(t.bottom,e.bottom)-r;return i.setTo(n,r,o,a)}},66658:(t,e,i)=>{var s=i(74118);s.Area=i(1653),s.Ceil=i(33943),s.CeilAll=i(58662),s.CenterOn=i(79993),s.Clone=i(81572),s.Contains=i(94287),s.ContainsPoint=i(28687),s.ContainsRect=i(73222),s.CopyFrom=i(29538),s.Decompose=i(87279),s.Equals=i(19989),s.FitInside=i(92628),s.FitOutside=i(85028),s.Floor=i(71356),s.FloorAll=i(21687),s.FromPoints=i(80222),s.FromXY=i(75785),s.GetAspectRatio=i(6700),s.GetCenter=i(35242),s.GetPoint=i(47698),s.GetPoints=i(54932),s.GetSize=i(31591),s.Inflate=i(7782),s.Intersection=i(66217),s.MarchingAnts=i(40053),s.MergePoints=i(86673),s.MergeRect=i(14655),s.MergeXY=i(44755),s.Offset=i(74466),s.OffsetPoint=i(55946),s.Overlaps=i(97474),s.Perimeter=i(85876),s.PerimeterPoint=i(20243),s.Random=i(30001),s.RandomOutside=i(97691),s.SameDimensions=i(51828),s.Scale=i(5691),s.Union=i(58795),t.exports=s},19108:t=>{t.exports=function(t){var e=t.x1,i=t.y1,s=t.x2,n=t.y2,r=t.x3,o=t.y3;return Math.abs(((r-e)*(n-i)-(s-e)*(o-i))/2)}},41199:(t,e,i)=>{var s=i(66349);t.exports=function(t,e,i){var n=i*(Math.sqrt(3)/2);return new s(t,e,t+i/2,e+n,t-i/2,e+n)}},88730:(t,e,i)=>{var s=i(11117),n=i(66349);t.exports=function(t,e,i,r,o){void 0===e&&(e=null),void 0===i&&(i=1),void 0===r&&(r=1),void 0===o&&(o=[]);for(var a,h,l,u,c,d,p,f,v,g=s(t,e),m=0;m{var s=i(66349);t.exports=function(t,e,i,n){return void 0===n&&(n=i),new s(t,e,t,e-n,t+i,e)}},1882:(t,e,i)=>{var s=i(56595),n=i(9640);t.exports=function(t,e,i,r){void 0===r&&(r=s);var o=r(t),a=e-o.x,h=i-o.y;return n(t,a,h)}},56595:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},91835:(t,e,i)=>{var s=i(93736);function n(t,e,i,s){return t*s-e*i}t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x3,r=t.y3,o=t.x1-i,a=t.y1-r,h=t.x2-i,l=t.y2-r,u=2*n(o,a,h,l),c=n(a,o*o+a*a,l,h*h+l*l),d=n(o,o*o+a*a,h,h*h+l*l);return e.x=i-c/u,e.y=r+d/u,e}},97073:(t,e,i)=>{var s=i(26673);t.exports=function(t,e){void 0===e&&(e=new s);var i,n,r=t.x1,o=t.y1,a=t.x2,h=t.y2,l=t.x3,u=t.y3,c=a-r,d=h-o,p=l-r,f=u-o,v=c*(r+a)+d*(o+h),g=p*(r+l)+f*(o+u),m=2*(c*(u-h)-d*(l-a));if(Math.abs(m)<1e-6){var y=Math.min(r,a,l),x=Math.min(o,h,u);i=.5*(Math.max(r,a,l)-y),n=.5*(Math.max(o,h,u)-x),e.x=y+i,e.y=x+n,e.radius=Math.sqrt(i*i+n*n)}else e.x=(f*v-d*g)/m,e.y=(c*g-p*v)/m,i=e.x-r,n=e.y-o,e.radius=Math.sqrt(i*i+n*n);return e}},75974:(t,e,i)=>{var s=i(66349);t.exports=function(t){return new s(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},60689:t=>{t.exports=function(t,e,i){var s=t.x3-t.x1,n=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,l=s*s+n*n,u=s*r+n*o,c=s*a+n*h,d=r*r+o*o,p=r*a+o*h,f=l*d-u*u,v=0===f?0:1/f,g=(d*c-u*p)*v,m=(l*p-u*c)*v;return g>=0&&m>=0&&g+m<1}},86875:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=!1),void 0===s&&(s=[]);for(var n,r,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,p=t.y2-t.y1,f=u*u+c*c,v=u*d+c*p,g=d*d+p*p,m=f*g-v*v,y=0===m?0:1/m,x=t.x1,T=t.y1,w=0;w=0&&r>=0&&n+r<1&&(s.push({x:e[w].x,y:e[w].y}),i)));w++);return s}},51532:(t,e,i)=>{var s=i(60689);t.exports=function(t,e){return s(t,e.x,e.y)}},42538:t=>{t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},18680:t=>{t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},29977:t=>{t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2&&t.x3===e.x3&&t.y3===e.y3}},56088:(t,e,i)=>{var s=i(79967),n=i(16028);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();if(e<=0||e>=1)return i.x=r.x1,i.y=r.y1,i;var h=n(r),l=n(o),u=n(a),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},24402:(t,e,i)=>{var s=i(16028),n=i(79967);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=s(o),u=s(a),c=s(h),d=l+u+c;!e&&i>0&&(e=d/i);for(var p=0;pl+u?(v=(f-=l+u)/c,g.x=h.x1+(h.x2-h.x1)*v,g.y=h.y1+(h.y2-h.y1)*v):(v=(f-=l)/u,g.x=a.x1+(a.x2-a.x1)*v,g.y=a.y1+(a.y2-a.y1)*v),r.push(g)}return r}},83648:(t,e,i)=>{var s=i(79967);function n(t,e,i,s){var n=t-i,r=e-s,o=n*n+r*r;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,l=t.y3,u=n(h,l,o,a),c=n(i,r,h,l),d=n(o,a,i,r),p=u+c+d;return e.x=(i*u+o*c+h*d)/p,e.y=(r*u+a*c+l*d)/p,e}},9640:t=>{t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},95290:(t,e,i)=>{var s=i(16028);t.exports=function(t){var e=t.getLineA(),i=t.getLineB(),n=t.getLineC();return s(e)+s(i)+s(n)}},99761:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x2-t.x1,n=t.y2-t.y1,r=t.x3-t.x1,o=t.y3-t.y1,a=Math.random(),h=Math.random();return a+h>=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(n*a+o*h),e}},21934:(t,e,i)=>{var s=i(19211),n=i(83648);t.exports=function(t,e){var i=n(t);return s(t,i.x,i.y,e)}},68454:(t,e,i)=>{var s=i(19211);t.exports=function(t,e,i){return s(t,e.x,e.y,i)}},19211:t=>{t.exports=function(t,e,i,s){var n=Math.cos(s),r=Math.sin(s),o=t.x1-e,a=t.y1-i;return t.x1=o*n-a*r+e,t.y1=o*r+a*n+i,o=t.x2-e,a=t.y2-i,t.x2=o*n-a*r+e,t.y2=o*r+a*n+i,o=t.x3-e,a=t.y3-i,t.x3=o*n-a*r+e,t.y3=o*r+a*n+i,t}},66349:(t,e,i)=>{var s=i(56694),n=i(60689),r=i(56088),o=i(24402),a=i(52394),h=i(88829),l=i(99761),u=new s({initialize:function(t,e,i,s,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=0),this.type=a.TRIANGLE,this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.x3=n,this.y3=r},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,s,n,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.x3=n,this.y3=r,this},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.x3,this.y3,this.x1,this.y1),t},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=u},87619:(t,e,i)=>{var s=i(66349);s.Area=i(19108),s.BuildEquilateral=i(41199),s.BuildFromPolygon=i(88730),s.BuildRight=i(3635),s.CenterOn=i(1882),s.Centroid=i(56595),s.CircumCenter=i(91835),s.CircumCircle=i(97073),s.Clone=i(75974),s.Contains=i(60689),s.ContainsArray=i(86875),s.ContainsPoint=i(51532),s.CopyFrom=i(42538),s.Decompose=i(18680),s.Equals=i(29977),s.GetPoint=i(56088),s.GetPoints=i(24402),s.InCenter=i(83648),s.Perimeter=i(95290),s.Offset=i(9640),s.Random=i(99761),s.Rotate=i(21934),s.RotateAroundPoint=i(68454),s.RotateAroundXY=i(19211),t.exports=s},27395:t=>{t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}}},18104:t=>{t.exports=function(t,e){return function(i,s,n,r){var o=t.getPixelAlpha(s,n,r.texture.key,r.frame.name);return o&&o>=e}}},69898:(t,e,i)=>{var s=i(56694),n=i(72687),r=i(6659),o=i(33963),a=i(97081),h=i(71064),l=i(7905),u=i(40398),c=i(37579),d=i(69360),p=i(64462),f=new s({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new r,this.isOver=!0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new h(this):null,this.mouse=e.inputMouse?new l(this):null,this.touch=e.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var s=new u(this,i);s.smoothFactor=e.inputSmoothFactor,this.pointers.push(s)}this.mousePointer=e.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new d,this._tempMatrix2=new d,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(a.BOOT,this.boot,this)},boot:function(){var t=this.game,e=t.events;this.canvas=t.canvas,this.scaleManager=t.scale,this.events.emit(o.MANAGER_BOOT),e.on(a.PRE_RENDER,this.preRender,this),e.once(a.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(o.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(o.GAME_OUT,t)},preRender:function(){var t=this.game.loop.now,e=this.game.loop.delta,i=this.game.scene.getScenes(!0,!0);this.time=t,this.events.emit(o.MANAGER_UPDATE);for(var s=0;s10&&(t=10-this.pointersTotal);for(var i=0;i{var s=i(26673),n=i(65650),r=i(56694),o=i(72687),a=i(27395),h=i(18104),l=i(53996),u=i(95669),c=i(72313),d=i(33963),p=i(6659),f=i(72632),v=i(52394),g=i(63399),m=i(42911),y=i(91963),x=i(74118),T=i(94287),w=i(7599),b=i(66349),E=i(60689),S=new r({Extends:p,initialize:function(t){p.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.pluginEvents=new p,this.enabled=!0,this.displayList,this.cameras,g.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var e={cancelled:!1};this._eventContainer={stopPropagation:function(){e.cancelled=!0}},this._eventData=e,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,t.sys.events.once(w.BOOT,this.boot,this),t.sys.events.on(w.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(w.DESTROY,this.destroy,this),this.pluginEvents.emit(d.BOOT)},start:function(){var t=this.systems.events;t.on(w.TRANSITION_START,this.transitionIn,this),t.on(w.TRANSITION_OUT,this.transitionOut,this),t.on(w.TRANSITION_COMPLETE,this.transitionComplete,this),t.on(w.PRE_UPDATE,this.preUpdate,this),t.once(w.SHUTDOWN,this.shutdown,this),this.manager.events.on(d.GAME_OUT,this.onGameOut,this),this.manager.events.on(d.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(d.START)},onGameOver:function(t){this.isActive()&&this.emit(d.GAME_OVER,t.timeStamp,t)},onGameOut:function(t){this.isActive()&&this.emit(d.GAME_OUT,t.timeStamp,t)},preUpdate:function(){this.pluginEvents.emit(d.PRE_UPDATE);var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,s=e.length;if(0!==i||0!==s){for(var n=this._list,r=0;r-1&&(n.splice(a,1),this.clear(o,!0))}this._pendingRemoval.length=0,this._list=n.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.canInput()},updatePoll:function(t,e){if(!this.isActive())return!1;if(this.pluginEvents.emit(d.UPDATE,t,e),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var i,s=this.manager,n=s.pointers,r=s.pointersTotal;for(i=0;i0){if(this._pollTimer-=e,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var a=!1;for(i=0;i0&&(a=!0)}return a},update:function(t,e){if(!this.isActive())return!1;for(var i=e.length,s=!1,n=0;n0&&(s=!0)}return this._updatedThisFrame=!0,s},clear:function(t,e){void 0===e&&(e=!1),this.disable(t);var i=t.input;i&&(this.removeDebug(t),i.gameObject=void 0,i.target=void 0,i.hitArea=void 0,i.hitAreaCallback=void 0,i.callbackContext=void 0,t.input=null),e||this.queueForRemoval(t);var s=this._draggable.indexOf(t);return s>-1&&this._draggable.splice(s,1),t},disable:function(t){var e=t.input;e&&(e.enabled=!1,e.dragState=0);var i=this._temp,s=this._drag,n=this._over,r=this.manager,o=i.indexOf(t);o>-1&&i.splice(o,1);for(var a=0;a-1&&s[a].splice(o,1),(o=n[a].indexOf(t))>-1&&(n[a].splice(o,1),r.resetCursor(e));return this},enable:function(t,e,i,s){return void 0===s&&(s=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&s&&!t.input.dropZone&&(t.input.dropZone=s),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i0)return t.camera=s,n}return t.camera=e[0],[]},processDownEvents:function(t){var e=0,i=this._temp,s=this._eventData,n=this._eventContainer;s.cancelled=!1;for(var r=!1,o=0;o0&&l(t.x,t.y,t.downX,t.downY)>=n||s>0&&e>=t.downTime+s)&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;i1&&(this.sortGameObjects(i,t),this.topOnly&&i.splice(1)),this._drag[t.id]=i,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?(this.setDragState(t,3),this.processDragStartList(t)):(this.setDragState(t,2),0))},processDragMoveEvent:function(t){if(2===this.getDragState(t)&&this.processDragThresholdEvent(t,this.manager.game.loop.now),4!==this.getDragState(t))return 0;for(var e=this._tempZones,i=this._drag[t.id],s=0;s0?(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),e[0]?(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):a.target=null)}else!h&&e[0]&&(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h));if(o.parentContainer){var u=t.worldX-a.dragStartXGlobal,c=t.worldY-a.dragStartYGlobal,p=o.getParentRotation(),f=u*Math.cos(p)+c*Math.sin(p),v=c*Math.cos(p)-u*Math.sin(p);f*=1/o.parentContainer.scaleX,v*=1/o.parentContainer.scaleY,n=f+a.dragStartX,r=v+a.dragStartY}else n=t.worldX-a.dragX,r=t.worldY-a.dragY;o.emit(d.GAMEOBJECT_DRAG,t,n,r),this.emit(d.DRAG,t,o,n,r)}return i.length},processDragUpEvent:function(t){for(var e=this._drag[t.id],i=0;i0){var r=this.manager,o=this._eventData,a=this._eventContainer;o.cancelled=!1;for(var h=!1,l=0;l0){var n=this.manager,r=this._eventData,o=this._eventContainer;r.cancelled=!1;var a=!1;this.sortGameObjects(e,t);for(var h=0;h0){for(this.sortGameObjects(n,t),e=0;e0){for(this.sortGameObjects(r,t),e=0;e-1&&this._draggable.splice(n,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return h(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var s=!1,n=!1,r=!1,o=!1,h=!1,l=!0;if(m(e)){var u=e;e=f(u,"hitArea",null),i=f(u,"hitAreaCallback",null),s=f(u,"draggable",!1),n=f(u,"dropZone",!1),r=f(u,"cursor",!1),o=f(u,"useHandCursor",!1),h=f(u,"pixelPerfect",!1);var c=f(u,"alphaTolerance",1);h&&(e={},i=this.makePixelPerfect(c)),e&&i||(this.setHitAreaFromTexture(t),l=!1)}else"function"!=typeof e||i||(i=e,e={});for(var d=0;d{var s=i(10850),n={},r={register:function(t,e,i,s,r){n[t]={plugin:e,mapping:i,settingsKey:s,configKey:r}},getPlugin:function(t){return n[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,r=e.game.config;for(var o in n){var a=n[o].plugin,h=n[o].mapping,l=n[o].settingsKey,u=n[o].configKey;s(i,l,r[u])&&(t[h]=new a(t))}},remove:function(t){n.hasOwnProperty(t)&&delete n[t]}};t.exports=r},40398:(t,e,i)=>{var s=i(90447),n=i(56694),r=i(53996),o=i(88456),a=i(44521),h=i(93736),l=i(36580),u=new n({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new h,this.prevPosition=new h,this.midPoint=new h(-1,-1),this.velocity=new h,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===e,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(t){var e=t.getWorldPoint(this.x,this.y);return this.worldX=e.x,this.worldY=e.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t=this.position.x,e=this.position.y,i=this.midPoint.x,n=this.midPoint.y;if(t!==i||e!==n){var r=a(this.motionFactor,i,t),h=a(this.motionFactor,n,e);o(r,t,.1)&&(r=t),o(h,e,.1)&&(h=e),this.midPoint.set(r,h);var l=t-r,u=e-h;this.velocity.set(l,u),this.angle=s(r,h,t,e),this.distance=Math.sqrt(l*l+u*u)}},up:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),0===this.buttons&&(this.isDown=!1,this.upTime=t.timeStamp,this.wasTouch=!1)},down:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),l.macOS&&t.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=t.timeStamp),this.wasTouch=!1},move:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.locked&&(this.movementX=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.moveTime=t.timeStamp,this.wasTouch=!1},wheel:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=e,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(t,e){this.event=e,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.moveTime=e.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?s(this.downX,this.downY,this.x,this.y):s(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,s=this.prevPosition.y,n=this.position.x,r=this.position.y,o=0;o{t.exports={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8}},14874:t=>{t.exports="boot"},54168:t=>{t.exports="destroy"},526:t=>{t.exports="dragend"},81623:t=>{t.exports="dragenter"},94472:t=>{t.exports="drag"},9304:t=>{t.exports="dragleave"},34265:t=>{t.exports="dragover"},50151:t=>{t.exports="dragstart"},98134:t=>{t.exports="drop"},56773:t=>{t.exports="gameobjectdown"},45824:t=>{t.exports="dragend"},39578:t=>{t.exports="dragenter"},72072:t=>{t.exports="drag"},82569:t=>{t.exports="dragleave"},70833:t=>{t.exports="dragover"},81442:t=>{t.exports="dragstart"},32936:t=>{t.exports="drop"},99658:t=>{t.exports="gameobjectmove"},60515:t=>{t.exports="gameobjectout"},55254:t=>{t.exports="gameobjectover"},34782:t=>{t.exports="pointerdown"},41769:t=>{t.exports="pointermove"},65588:t=>{t.exports="pointerout"},61640:t=>{t.exports="pointerover"},49342:t=>{t.exports="pointerup"},82662:t=>{t.exports="wheel"},13058:t=>{t.exports="gameobjectup"},52426:t=>{t.exports="gameobjectwheel"},78072:t=>{t.exports="gameout"},1545:t=>{t.exports="gameover"},67137:t=>{t.exports="boot"},27678:t=>{t.exports="process"},22257:t=>{t.exports="update"},90379:t=>{t.exports="pointerlockchange"},88909:t=>{t.exports="pointerdown"},36548:t=>{t.exports="pointerdownoutside"},18483:t=>{t.exports="pointermove"},22355:t=>{t.exports="pointerout"},7997:t=>{t.exports="pointerover"},66318:t=>{t.exports="pointerup"},94812:t=>{t.exports="pointerupoutside"},37310:t=>{t.exports="wheel"},24196:t=>{t.exports="preupdate"},27053:t=>{t.exports="shutdown"},29413:t=>{t.exports="start"},25165:t=>{t.exports="update"},33963:(t,e,i)=>{t.exports={BOOT:i(14874),DESTROY:i(54168),DRAG_END:i(526),DRAG_ENTER:i(81623),DRAG:i(94472),DRAG_LEAVE:i(9304),DRAG_OVER:i(34265),DRAG_START:i(50151),DROP:i(98134),GAME_OUT:i(78072),GAME_OVER:i(1545),GAMEOBJECT_DOWN:i(56773),GAMEOBJECT_DRAG_END:i(45824),GAMEOBJECT_DRAG_ENTER:i(39578),GAMEOBJECT_DRAG:i(72072),GAMEOBJECT_DRAG_LEAVE:i(82569),GAMEOBJECT_DRAG_OVER:i(70833),GAMEOBJECT_DRAG_START:i(81442),GAMEOBJECT_DROP:i(32936),GAMEOBJECT_MOVE:i(99658),GAMEOBJECT_OUT:i(60515),GAMEOBJECT_OVER:i(55254),GAMEOBJECT_POINTER_DOWN:i(34782),GAMEOBJECT_POINTER_MOVE:i(41769),GAMEOBJECT_POINTER_OUT:i(65588),GAMEOBJECT_POINTER_OVER:i(61640),GAMEOBJECT_POINTER_UP:i(49342),GAMEOBJECT_POINTER_WHEEL:i(82662),GAMEOBJECT_UP:i(13058),GAMEOBJECT_WHEEL:i(52426),MANAGER_BOOT:i(67137),MANAGER_PROCESS:i(27678),MANAGER_UPDATE:i(22257),POINTER_DOWN:i(88909),POINTER_DOWN_OUTSIDE:i(36548),POINTER_MOVE:i(18483),POINTER_OUT:i(22355),POINTER_OVER:i(7997),POINTER_UP:i(66318),POINTER_UP_OUTSIDE:i(94812),POINTER_WHEEL:i(37310),POINTERLOCK_CHANGE:i(90379),PRE_UPDATE:i(24196),SHUTDOWN:i(27053),START:i(29413),UPDATE:i(25165)}},70848:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=.1},update:function(t){this.value=t},getValue:function(){return Math.abs(this.value){var s=i(56694),n=i(43200),r=new s({initialize:function(t,e){this.pad=t,this.events=t.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(t){this.value=t;var e=this.pad,i=this.index;t>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(n.BUTTON_DOWN,e,this,t),this.pad.emit(n.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(n.BUTTON_UP,e,this,t),this.pad.emit(n.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},75956:(t,e,i)=>{var s=i(70848),n=i(21274),r=i(56694),o=i(6659),a=i(93736),h=new r({Extends:o,initialize:function(t,e){o.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],r=0;r=2&&(this.leftStick.set(r[0].getValue(),r[1].getValue()),n>=4&&this.rightStick.set(r[2].getValue(),r[3].getValue()))}},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t{var s=i(56694),n=i(6659),r=i(43200),o=i(75956),a=i(10850),h=i(63399),l=i(33963),u=new s({Extends:n,initialize:function(t){n.call(this),this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,t.pluginEvents.once(l.BOOT,this.boot,this),t.pluginEvents.on(l.START,this.start,this)},boot:function(){var t=this.scene.sys.game,e=this.settings.input,i=t.config;this.enabled=a(e,"gamepad",i.inputGamepad)&&t.device.input.gamepads,this.target=a(e,"gamepad.target",i.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(l.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(l.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var t=this,e=this.target,i=function(e){!e.defaultPrevented&&t.isActive()&&(t.refreshPads(),t.queue.push(e))};this.onGamepadHandler=i,e.addEventListener("gamepadconnected",i,!1),e.addEventListener("gamepaddisconnected",i,!1),this.sceneInputPlugin.pluginEvents.on(l.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(l.UPDATE,this.update);for(var t=0;t{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},74982:t=>{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},43247:t=>{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},4898:(t,e,i)=>{t.exports={DUALSHOCK_4:i(74982),SNES_USB:i(33171),XBOX_360:i(43247)}},17344:t=>{t.exports="down"},36635:t=>{t.exports="up"},85724:t=>{t.exports="connected"},55832:t=>{t.exports="disconnected"},772:t=>{t.exports="down"},33608:t=>{t.exports="up"},43200:(t,e,i)=>{t.exports={BUTTON_DOWN:i(17344),BUTTON_UP:i(36635),CONNECTED:i(85724),DISCONNECTED:i(55832),GAMEPAD_BUTTON_DOWN:i(772),GAMEPAD_BUTTON_UP:i(33608)}},92636:(t,e,i)=>{t.exports={Axis:i(70848),Button:i(21274),Events:i(43200),Gamepad:i(75956),GamepadPlugin:i(1379),Configs:i(4898)}},20873:(t,e,i)=>{var s=i(72687),n=i(98611),r={CreatePixelPerfectHandler:i(18104),CreateInteractiveObject:i(27395),Events:i(33963),Gamepad:i(92636),InputManager:i(69898),InputPlugin:i(12499),InputPluginCache:i(63399),Keyboard:i(28388),Mouse:i(11343),Pointer:i(40398),Touch:i(77423)};r=n(!1,r,s),t.exports=r},71064:(t,e,i)=>{var s=i(66458),n=i(56694),r=i(97081),o=i(33963),a=i(11873),h=i(72283),l=new n({initialize:function(t){this.manager=t,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=h,this.onKeyUp=h,t.events.once(o.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.addCapture(t.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(r.POST_STEP,this.postUpdate,this)},startListeners:function(){var t=this;this.onKeyDown=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}},this.onKeyUp=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}};var e=this.target;e&&(e.addEventListener("keydown",this.onKeyDown,!1),e.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var t=this.target;t.removeEventListener("keydown",this.onKeyDown,!1),t.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},removeCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(r.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=l},89666:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(94030),o=i(97081),a=i(10850),h=i(33963),l=i(63399),u=i(50165),c=i(11873),d=i(95625),p=i(48044),f=i(7599),v=i(84314),g=new s({Extends:n,initialize:function(t){n.call(this),this.game=t.systems.game,this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.manager=t.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,t.pluginEvents.once(h.BOOT,this.boot,this),t.pluginEvents.on(h.START,this.start,this)},boot:function(){var t=this.settings.input;this.enabled=a(t,"keyboard",!0);var e=a(t,"keyboard.capture",null);e&&this.addCaptures(e),this.sceneInputPlugin.pluginEvents.once(h.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(h.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(h.SHUTDOWN,this.shutdown,this),this.game.events.on(o.BLUR,this.resetKeys,this),this.scene.sys.events.on(f.PAUSE,this.resetKeys,this),this.scene.sys.events.on(f.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(t){return this.manager.addCapture(t),this},removeCapture:function(t){return this.manager.removeCapture(t),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:c.UP,down:c.DOWN,left:c.LEFT,right:c.RIGHT,space:c.SPACE,shift:c.SHIFT})},addKeys:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var s={};if("string"==typeof t){t=t.split(",");for(var n=0;n-1?s[n]=t:s[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t}return"string"==typeof t&&(t=c[t.toUpperCase()]),s[t]||(s[t]=new u(this,t),e&&this.addCapture(t),s[t].setEmitOnRepeat(i)),s[t]},removeKey:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var s,n=this.keys;if(t instanceof u){var r=n.indexOf(t);r>-1&&(s=this.keys[r],this.keys[r]=void 0)}else"string"==typeof t&&(t=c[t.toUpperCase()]);return n[t]&&(s=n[t],n[t]=void 0),s&&(s.plugin=null,i&&this.removeCapture(s.keyCode),e&&s.destroy()),this},removeAllKeys:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);for(var i=this.keys,s=0;st._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,s=0;s{t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},95625:(t,e,i)=>{var s=i(56694),n=i(94030),r=i(72632),o=i(2544),a=i(88754),h=new s({initialize:function(t,e,i){if(void 0===i&&(i={}),e.length<2)return!1;this.manager=t,this.enabled=!0,this.keyCodes=[];for(var s=0;s{var s=i(60258);t.exports=function(t,e){if(e.matched)return!0;var i=!1,n=!1;if(t.keyCode===e.current)if(e.index>0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(n=!0,i=s(t,e))}else n=!0,i=s(t,e);return!n&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},88754:t=>{t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},5044:t=>{t.exports="keydown"},40813:t=>{t.exports="keyup"},89319:t=>{t.exports="keycombomatch"},43267:t=>{t.exports="down"},78595:t=>{t.exports="keydown-"},30056:t=>{t.exports="keyup-"},81939:t=>{t.exports="up"},94030:(t,e,i)=>{t.exports={ANY_KEY_DOWN:i(5044),ANY_KEY_UP:i(40813),COMBO_MATCH:i(89319),DOWN:i(43267),KEY_DOWN:i(78595),KEY_UP:i(30056),UP:i(81939)}},28388:(t,e,i)=>{t.exports={Events:i(94030),KeyboardManager:i(71064),KeyboardPlugin:i(89666),Key:i(50165),KeyCodes:i(11873),KeyCombo:i(95625),AdvanceKeyCombo:i(60258),ProcessKeyCombo:i(2544),ResetKeyCombo:i(88754),JustDown:i(42460),JustUp:i(53162),DownDuration:i(64964),UpDuration:i(70331)}},64964:t=>{t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeDown;return t.isDown&&i{t.exports=function(t){return!!t._justDown&&(t._justDown=!1,!0)}},53162:t=>{t.exports=function(t){return!!t._justUp&&(t._justUp=!1,!0)}},50165:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(94030),o=new s({Extends:n,initialize:function(t,e){n.call(this),this.plugin=t,this.keyCode=e,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(t){return this.emitOnRepeat=t,this},onDown:function(t){this.originalEvent=t,this.enabled&&(this.altKey=t.altKey,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.location=t.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(r.DOWN,this,t):(this.isDown=!0,this.isUp=!1,this.timeDown=t.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(r.DOWN,this,t)))},onUp:function(t){this.originalEvent=t,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=t.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(r.UP,this,t))},reset:function(){return this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});t.exports=o},11873:t=>{t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},48044:(t,e,i)=>{var s=i(11873),n={};for(var r in s)n[s[r]]=r;t.exports=n},70331:t=>{t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeUp;return t.isUp&&i{var s=i(56694),n=i(90185),r=i(33963),o=i(72283),a=new s({initialize:function(t){this.manager=t,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=o,this.onMouseDown=o,this.onMouseUp=o,this.onMouseDownWindow=o,this.onMouseUpWindow=o,this.onMouseOver=o,this.onMouseOut=o,this.onMouseWheel=o,this.pointerLockChange=o,this.isTop=!0,t.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.passive=t.inputMousePassive,this.preventDefaultDown=t.inputMousePreventDefaultDown,this.preventDefaultUp=t.inputMousePreventDefaultUp,this.preventDefaultMove=t.inputMousePreventDefaultMove,this.preventDefaultWheel=t.inputMousePreventDefaultWheel,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",(function(t){return t.preventDefault(),!1})),this},requestPointerLock:function(){if(n.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},releasePointerLock:function(){n.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this.target;if(t){var e=this,i=this.manager,s=i.canvas,r=window&&window.focus&&i.game.config.autoFocus;this.onMouseMove=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseMove(t),e.preventDefaultMove&&t.preventDefault())},this.onMouseDown=function(t){r&&window.focus(),!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseDown(t),e.preventDefaultDown&&t.target===s&&t.preventDefault())},this.onMouseDownWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onMouseDown(t)},this.onMouseUp=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseUp(t),e.preventDefaultUp&&t.target===s&&t.preventDefault())},this.onMouseUpWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onMouseUp(t)},this.onMouseOver=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOver(t)},this.onMouseOut=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOut(t)},this.onMouseWheel=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onMouseWheel(t),e.preventDefaultWheel&&t.target===s&&t.preventDefault()};var o={passive:!0};if(t.addEventListener("mousemove",this.onMouseMove),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("mouseover",this.onMouseOver,o),t.addEventListener("mouseout",this.onMouseOut,o),this.preventDefaultWheel?t.addEventListener("wheel",this.onMouseWheel,{passive:!1}):t.addEventListener("wheel",this.onMouseWheel,o),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,o),window.top.addEventListener("mouseup",this.onMouseUpWindow,o)}catch(t){window.addEventListener("mousedown",this.onMouseDownWindow,o),window.addEventListener("mouseup",this.onMouseUpWindow,o),this.isTop=!1}n.pointerLock&&(this.pointerLockChange=function(t){var s=e.target;e.locked=document.pointerLockElement===s||document.mozPointerLockElement===s||document.webkitPointerLockElement===s,i.onPointerLockChange(t)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&((t=this.isTop?window.top:window).removeEventListener("mousedown",this.onMouseDownWindow),t.removeEventListener("mouseup",this.onMouseUpWindow)),n.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=a},11343:(t,e,i)=>{t.exports={MouseManager:i(7905)}},37579:(t,e,i)=>{var s=i(56694),n=i(33963),r=i(72283),o=new s({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=r,this.onTouchStartWindow=r,this.onTouchMove=r,this.onTouchEnd=r,this.onTouchEndWindow=r,this.onTouchCancel=r,this.onTouchCancelWindow=r,this.isTop=!0,t.events.once(n.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputTouch,this.target=t.inputTouchEventTarget,this.capture=t.inputTouchCapture,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",(function(t){return t.preventDefault(),!1})),this},startListeners:function(){var t=this.target;if(t){var e=this,i=this.manager,s=i.canvas,n=window&&window.focus&&i.game.config.autoFocus;this.onTouchMove=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchMove(t),e.capture&&t.cancelable&&t.preventDefault())},this.onTouchStart=function(t){n&&window.focus(),!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchStart(t),e.capture&&t.cancelable&&t.target===s&&t.preventDefault())},this.onTouchStartWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onTouchStart(t)},this.onTouchEnd=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchEnd(t),e.capture&&t.cancelable&&t.target===s&&t.preventDefault())},this.onTouchEndWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onTouchEnd(t)},this.onTouchCancel=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchCancel(t),e.capture&&t.preventDefault())},this.onTouchCancelWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onTouchCancel(t)};var r=this.capture,o={passive:!0},a={passive:!1};if(t.addEventListener("touchstart",this.onTouchStart,r?a:o),t.addEventListener("touchmove",this.onTouchMove,r?a:o),t.addEventListener("touchend",this.onTouchEnd,r?a:o),t.addEventListener("touchcancel",this.onTouchCancel,r?a:o),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,a),window.top.addEventListener("touchend",this.onTouchEndWindow,a),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,a)}catch(t){window.addEventListener("touchstart",this.onTouchStartWindow,a),window.addEventListener("touchend",this.onTouchEndWindow,a),window.addEventListener("touchcancel",this.onTouchCancelWindow,a),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("touchstart",this.onTouchStart),t.removeEventListener("touchmove",this.onTouchMove),t.removeEventListener("touchend",this.onTouchEnd),t.removeEventListener("touchcancel",this.onTouchCancel),window&&((t=this.isTop?window.top:window).removeEventListener("touchstart",this.onTouchStartWindow),t.removeEventListener("touchend",this.onTouchEndWindow),t.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=o},77423:(t,e,i)=>{t.exports={TouchManager:i(37579)}},98035:(t,e,i)=>{var s=i(56694),n=i(12117),r=i(683),o=i(72632),a=i(30750),h=i(43531),l=i(88490),u=i(33868),c=new s({initialize:function(t,e){if(this.loader=t,this.cache=o(e,"cache",!1),this.type=o(e,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=o(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.key)throw new Error("Invalid File key: "+this.key);var s=o(e,"url");void 0===s?s=t.path+i+"."+o(e,"extension",""):"string"!=typeof s||s.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(s=t.path+s),this.url=s,this.src="",this.xhrSettings=u(o(e,"responseType",void 0)),o(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,o(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?n.FILE_POPULATED:n.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=o(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===n.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=n.FILE_LOADING,this.src=a(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&this.loader.localSchemes.some((function(e){return 0===t.responseURL.indexOf(e)}))&&0===e.target.status,s=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(s=!1),this.state=n.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,s)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(r.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=n.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=n.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=n.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(t){if(this.state!==n.FILE_PENDING_DESTROY){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(r.FILE_COMPLETE,e,i,t),this.loader.emit(r.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this),this.state=n.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var s=new FileReader;s.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+s.result.split(",")[1]},s.onerror=t.onerror,s.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},76846:t=>{var e={},i={install:function(t){for(var i in e)t[i]=e[i]},register:function(t,i){e[t]=i},destroy:function(){e={}}};t.exports=i},30750:t=>{t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},67285:(t,e,i)=>{var s=i(56694),n=i(12117),r=i(58403),o=i(6659),a=i(683),h=i(76846),l=i(72632),u=i(10850),c=i(91963),d=i(7599),p=i(33868),f=new s({Extends:o,initialize:function(t){o.call(this);var e=t.sys.game.config,i=t.sys.settings.loader;this.scene=t,this.systems=t.sys,this.cacheManager=t.sys.cache,this.textureManager=t.sys.textures,this.sceneManager=t.sys.game.scene,h.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(l(i,"baseURL",e.loaderBaseURL)),this.setPath(l(i,"path",e.loaderPath)),this.setPrefix(l(i,"prefix",e.loaderPrefix)),this.maxParallelDownloads=l(i,"maxParallelDownloads",e.loaderMaxParallelDownloads),this.xhr=p(l(i,"responseType",e.loaderResponseType),l(i,"async",e.loaderAsync),l(i,"user",e.loaderUser),l(i,"password",e.loaderPassword),l(i,"timeout",e.loaderTimeout),l(i,"withCredentials",e.loaderWithCredentials)),this.crossOrigin=l(i,"crossOrigin",e.loaderCrossOrigin),this.imageLoadType=l(i,"imageLoadType",e.loaderImageLoadType),this.localSchemes=l(i,"localScheme",e.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new r,this.inflight=new r,this.queue=new r,this._deleteQueue=new r,this.totalFailed=0,this.totalComplete=0,this.state=n.LOADER_IDLE,this.multiKeyIndex=0,t.sys.events.once(d.BOOT,this.boot,this),t.sys.events.on(d.START,this.pluginStart,this)},boot:function(){this.systems.events.once(d.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(d.SHUTDOWN,this.shutdown,this)},setBaseURL:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.baseURL=t,this},setPath:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.path=t,this},setPrefix:function(t){return void 0===t&&(t=""),this.prefix=t,this},setCORS:function(t){return this.crossOrigin=t,this},addFile:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e0},isLoading:function(){return this.state===n.LOADER_LOADING||this.state===n.LOADER_PROCESSING},isReady:function(){return this.state===n.LOADER_IDLE||this.state===n.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(a.START,this),0===this.list.size?this.loadComplete():(this.state=n.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(d.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(a.PROGRESS,this.progress)},update:function(){this.state===n.LOADER_LOADING&&this.list.size>0&&this.inflight.size{var s=i(98611),n=i(33868);t.exports=function(t,e){var i=void 0===t?n():s({},t);if(e)for(var r in e)void 0!==e[r]&&(i[r]=e[r]);return i}},45176:(t,e,i)=>{var s=i(56694),n=i(12117),r=i(683),o=new s({initialize:function(t,e,i,s){var r=[];s.forEach((function(t){t&&r.push(t)})),this.loader=t,this.type=e,this.key=i,this.multiKeyIndex=t.multiKeyIndex++,this.files=r,this.state=n.FILE_PENDING,this.complete=!1,this.pending=r.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var o=0;o{var s=i(43531);t.exports=function(t,e){var i=s(e,t.xhrSettings),n=new XMLHttpRequest;if(n.open("GET",t.src,i.async,i.user,i.password),n.responseType=t.xhrSettings.responseType,n.timeout=i.timeout,i.headers)for(var r in i.headers)n.setRequestHeader(r,i.headers[r]);return i.header&&i.headerValue&&n.setRequestHeader(i.header,i.headerValue),i.requestedWith&&n.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&n.overrideMimeType(i.overrideMimeType),i.withCredentials&&(n.withCredentials=!0),n.onload=t.onLoad.bind(t,n),n.onerror=t.onError.bind(t,n),n.onprogress=t.onProgress.bind(t),n.send(),n}},33868:t=>{t.exports=function(t,e,i,s,n,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===s&&(s=""),void 0===n&&(n=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:s,timeout:n,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},12117:t=>{t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20}},7398:t=>{t.exports="addfile"},52187:t=>{t.exports="complete"},36627:t=>{t.exports="filecomplete"},81925:t=>{t.exports="filecomplete-"},29774:t=>{t.exports="loaderror"},20943:t=>{t.exports="load"},74693:t=>{t.exports="fileprogress"},71176:t=>{t.exports="postprocess"},88984:t=>{t.exports="progress"},72753:t=>{t.exports="start"},683:(t,e,i)=>{t.exports={ADD:i(7398),COMPLETE:i(52187),FILE_COMPLETE:i(36627),FILE_KEY_COMPLETE:i(81925),FILE_LOAD_ERROR:i(29774),FILE_LOAD:i(20943),FILE_PROGRESS:i(74693),POST_PROCESS:i(71176),PROGRESS:i(88984),START:i(72753)}},46468:(t,e,i)=>{var s=i(56694),n=i(76846),r=i(70806),o=i(683),a=new s({Extends:r,initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.type="animationJSON"},onProcess:function(){this.loader.once(o.POST_PROCESS,this.onLoadComplete,this),r.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});n.register("animation",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(70806),l=i(45176),u=new s({Extends:l,initialize:function(t,e,i,s,n,u){var c,d;if(a(e)){var p=e;e=r(p,"key"),c=new o(t,{key:e,url:r(p,"textureURL"),extension:r(p,"textureExtension","png"),normalMap:r(p,"normalMap"),xhrSettings:r(p,"textureXhrSettings")}),d=new h(t,{key:e,url:r(p,"atlasURL"),extension:r(p,"atlasExtension","json"),xhrSettings:r(p,"atlasXhrSettings")})}else c=new o(t,e,i,n),d=new h(t,e,s,u);c.linkFile?l.call(this,t,"atlasjson",e,[c,d,c.linkFile]):l.call(this,t,"atlasjson",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),e.addToCache(),this.complete=!0}}});n.register("aseprite",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(70806),l=i(45176),u=new s({Extends:l,initialize:function(t,e,i,s,n,u){var c,d;if(a(e)){var p=e;e=r(p,"key"),c=new o(t,{key:e,url:r(p,"textureURL"),extension:r(p,"textureExtension","png"),normalMap:r(p,"normalMap"),xhrSettings:r(p,"textureXhrSettings")}),d=new h(t,{key:e,url:r(p,"atlasURL"),extension:r(p,"atlasExtension","json"),xhrSettings:r(p,"atlasXhrSettings")})}else c=new o(t,e,i,n),d=new h(t,e,s,u);c.linkFile?l.call(this,t,"atlasjson",e,[c,d,c.linkFile]):l.call(this,t,"atlasjson",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),this.complete=!0}}});n.register("atlas",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(45176),l=i(15297),u=new s({Extends:h,initialize:function(t,e,i,s,n,u){var c,d;if(a(e)){var p=e;e=r(p,"key"),c=new o(t,{key:e,url:r(p,"textureURL"),extension:r(p,"textureExtension","png"),normalMap:r(p,"normalMap"),xhrSettings:r(p,"textureXhrSettings")}),d=new l(t,{key:e,url:r(p,"atlasURL"),extension:r(p,"atlasExtension","xml"),xhrSettings:r(p,"atlasXhrSettings")})}else c=new o(t,e,i,n),d=new l(t,e,s,u);c.linkFile?h.call(this,t,"atlasxml",e,[c,d,c.linkFile]):h.call(this,t,"atlasxml",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(t.key,t.data,e.data,i),this.complete=!0}}});n.register("atlasXML",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(30929),l=i(42911),u=new s({Extends:r,initialize:function(t,e,i,s,n){if(l(e)){var o=e;e=a(o,"key"),s=a(o,"xhrSettings"),n=a(o,"context",n)}var h={type:"audio",cache:t.cacheManager.audio,extension:i.type,responseType:"arraybuffer",key:e,url:i.url,xhrSettings:s,config:{context:n}};r.call(this,t,h)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this;this.config.context.decodeAudioData(this.xhrLoader.response,(function(e){t.data=e,t.onProcessComplete()}),(function(e){console.error("Error decoding audio: "+t.key+" - ",e?e.message:null),t.onProcessError()})),this.config.context=null}});u.create=function(t,e,i,s,n){var r=t.systems.game,o=r.config.audio,c=r.device.audio;l(e)&&(i=a(e,"url",[]),s=a(e,"config",{}));var d=u.getAudioURL(r,i);return d?c.webAudio&&!o.disableWebAudio?new u(t,e,d,n,r.sound.context):new h(t,e,d,s):null},u.getAudioURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i{var s=i(67448),n=i(56694),r=i(76846),o=i(72632),a=i(42911),h=i(70806),l=i(45176),u=new n({Extends:l,initialize:function(t,e,i,n,r,u,c){if(a(e)){var d=e;e=o(d,"key"),i=o(d,"jsonURL"),n=o(d,"audioURL"),r=o(d,"audioConfig"),u=o(d,"audioXhrSettings"),c=o(d,"jsonXhrSettings")}var p;if(n){var f=s.create(t,e,n,r,u);f&&(p=new h(t,e,i,c),l.call(this,t,"audiosprite",e,[f,p]),this.config.resourceLoad=!1)}else p=new h(t,e,i,c),l.call(this,t,"audiosprite",e,[p]),this.config.resourceLoad=!0,this.config.audioConfig=r,this.config.audioXhrSettings=u},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,this.config.resourceLoad&&"json"===t.type&&t.data.hasOwnProperty("resources"))){var e=t.data.resources,i=o(this.config,"audioConfig"),n=o(this.config,"audioXhrSettings"),r=s.create(this.loader,t.key,e,i,n);r&&(this.addToMultiFile(r),this.loader.addFile(r))}},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache(),e.addToCache(),this.complete=!0}}});r.register("audioSprite",(function(t,e,i,s,n,r){var o,a=this.systems.game,h=a.config.audio,l=a.device.audio;if(h&&h.noAudio||!l.webAudio&&!l.audioData)return this;if(Array.isArray(t))for(var c=0;c{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n){var o="bin";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),s=a(l,"xhrSettings"),o=a(l,"extension",o),n=a(l,"dataType",n)}var u={type:"binary",cache:t.cacheManager.binary,extension:o,responseType:"arraybuffer",key:e,url:i,xhrSettings:s,config:{dataType:n}};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this.config.dataType;this.data=t?new t(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});o.register("binary",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(45176),l=i(31476),u=i(15297),c=new s({Extends:h,initialize:function(t,e,i,s,n,l){var c,d;if(a(e)){var p=e;e=r(p,"key"),c=new o(t,{key:e,url:r(p,"textureURL"),extension:r(p,"textureExtension","png"),normalMap:r(p,"normalMap"),xhrSettings:r(p,"textureXhrSettings")}),d=new u(t,{key:e,url:r(p,"fontDataURL"),extension:r(p,"fontDataExtension","xml"),xhrSettings:r(p,"fontDataXhrSettings")})}else c=new o(t,e,i,n),d=new u(t,e,s,l);c.linkFile?h.call(this,t,"bitmapfont",e,[c,d,c.linkFile]):h.call(this,t,"bitmapfont",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache();var i=t.cache.get(t.key),s=l(e.data,t.cache.getFrame(t.key),0,0,i);this.loader.cacheManager.bitmapFont.add(t.key,{data:s,texture:t.key,frame:null}),this.complete=!0}}});n.register("bitmapFont",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="css";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var l={type:"script",cache:!1,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});o.register("css",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(73152),n=i(40612),r=i(56694),o=i(76846),a=i(72632),h=i(42927),l=i(42911),u=i(70806),c=i(67409),d=i(30657),p=i(80802),f=i(45176),v=i(24904),g=new r({Extends:f,initialize:function(t,e,i,s){if(i.multiAtlasURL){var r=new u(t,{key:e,url:i.multiAtlasURL,xhrSettings:s,config:i});f.call(this,t,"texture",e,[r])}else{var o=i.textureURL.substr(i.textureURL.length-3);i.type||(i.type="ktx"===o.toLowerCase()?"KTX":"PVR");var a=new n(t,{key:e,url:i.textureURL,extension:o,xhrSettings:s,config:i});if(i.atlasURL){var h=new u(t,{key:e,url:i.atlasURL,xhrSettings:s,config:i});f.call(this,t,"texture",e,[a,h])}else f.call(this,t,"texture",e,[a])}this.config=i},onFileComplete:function(t){if(-1!==this.files.indexOf(t)){if(this.pending--,!this.config.multiAtlasURL)return;if("json"===t.type&&t.data.hasOwnProperty("textures")){var e=t.data.textures,i=this.config,s=this.loader,r=s.baseURL,o=s.path,h=s.prefix,l=a(i,"multiBaseURL",this.baseURL),u=a(i,"multiPath",this.path),c=a(i,"prefix",this.prefix),d=a(i,"textureXhrSettings");l&&s.setBaseURL(l),u&&s.setPath(u),c&&s.setPrefix(c);for(var p=0;p{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=i(31053),u=new s({Extends:r,initialize:function(t,e,i,s,n){var o="glsl";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),s=a(l,"shaderType","fragment"),n=a(l,"xhrSettings"),o=a(l,"extension",o)}else void 0===s&&(s="fragment");var u={type:"glsl",cache:t.cacheManager.shader,extension:o,responseType:"text",key:e,url:i,config:{shaderType:s},xhrSettings:n};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.split("\n"),e=this.extractBlock(t,0);if(e)for(;e;){var i=this.getShaderName(e.header),s=this.getShaderType(e.header),n=this.getShaderUniforms(e.header),r=e.shader;if(this.cache.has(i)){var o=this.cache.get(i);"fragment"===s?o.fragmentSrc=r:o.vertexSrc=r,o.uniforms||(o.uniforms=n)}else"fragment"===s?this.cache.add(i,new l(i,r,"",n)):this.cache.add(i,new l(i,"",r,n));e=this.extractBlock(t,e.offset)}else"fragment"===this.config.shaderType?this.cache.add(this.key,new l(this.key,this.data)):this.cache.add(this.key,new l(this.key,"",this.data))},getShaderName:function(t){for(var e=0;e{var s=i(56694),n=i(683),r=i(98035),o=i(72632),a=i(30750),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){if(h(e)){var n=e;e=o(n,"key"),s=o(n,"config",s)}var a={type:"audio",cache:t.cacheManager.audio,extension:i.type,key:e,url:i.url,config:s};r.call(this,t,a),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="html";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var l={type:"text",cache:t.cacheManager.html,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("html",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n,o){void 0===s&&(s=512),void 0===n&&(n=512);var l="html";if(h(e)){var u=e;e=a(u,"key"),i=a(u,"url"),o=a(u,"xhrSettings"),l=a(u,"extension",l),s=a(u,"width",s),n=a(u,"height",n)}var c={type:"html",cache:t.textureManager,extension:l,responseType:"text",key:e,url:i,xhrSettings:o,config:{width:s,height:n}};r.call(this,t,c)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this.config.width,e=this.config.height,i=[];i.push(''),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var s=[i.join("\n")],o=this;try{var a=new window.Blob(s,{type:"image/svg+xml;charset=utf-8"})}catch(t){return o.state=n.FILE_ERRORED,void o.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(o.data),o.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(o.data),o.onProcessError()},r.createObjectURL(this.data,a,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});o.register("htmlTexture",(function(t,e,i,s,n){if(Array.isArray(t))for(var r=0;r{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=i(30750),u=new s({Extends:r,initialize:function t(e,i,s,n,o){var l,u="png";if(h(i)){var c=i;i=a(c,"key"),s=a(c,"url"),l=a(c,"normalMap"),n=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"frameConfig")}Array.isArray(s)&&(l=s[1],s=s[0]);var d={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:s,xhrSettings:n,config:o};if(r.call(this,e,d),l){var p=new t(e,this.key,l,n,o);p.type="normalMap",this.setLink(p),e.addFile(p)}this.useImageElementLoad="HTMLImageElement"===e.imageLoadType,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){r.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(t.data),t.onProcessError()},r.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=n.FILE_PROCESSING,t===n.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){if(this.state=n.FILE_LOADING,this.src=l(this,this.loader.baseURL),0===this.src.indexOf("data:"))console.warn("Local data URIs are not supported: "+this.key);else{this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=n.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src}},addToCache:function(){var t=this.linkFile;t?t.state>=n.FILE_COMPLETE&&("normalMap"===this.type?this.cache.addImage(this.key,t.data,this.data):this.cache.addImage(this.key,this.data,t.data)):this.cache.addImage(this.key,this.data)}});o.register("image",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(10850),l=i(42911),u=new s({Extends:r,initialize:function(t,e,i,s,o){var u="json";if(l(e)){var c=e;e=a(c,"key"),i=a(c,"url"),s=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"dataKey",o)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:s,config:o};r.call(this,t,d),l(i)&&(this.data=o?h(i,o):i,this.state=n.FILE_POPULATED)},onProcess:function(){if(this.state!==n.FILE_POPULATED){this.state=n.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});o.register("json",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(70806),l=i(45176),u=new s({Extends:l,initialize:function(t,e,i,s,n,o,u){if(a(e)){var c=e;e=r(c,"key"),i=r(c,"url",!1)?r(c,"url"):r(c,"atlasURL"),o=r(c,"xhrSettings"),s=r(c,"path"),n=r(c,"baseURL"),u=r(c,"textureXhrSettings")}var d=new h(t,e,i,o);l.call(this,t,"multiatlas",e,[d]),this.config.path=s,this.config.baseURL=n,this.config.textureXhrSettings=u},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"json"===t.type&&t.data.hasOwnProperty("textures"))){var e=t.data.textures,i=this.config,s=this.loader,n=s.baseURL,a=s.path,h=s.prefix,l=r(i,"baseURL",this.baseURL),u=r(i,"path",this.path),c=r(i,"prefix",this.prefix),d=r(i,"textureXhrSettings");s.setBaseURL(l),s.setPath(u),s.setPrefix(c);for(var p=0;p{var s=i(56694),n=i(76846),r=i(72632),o=i(42911),a=i(45176),h=i(55188),l=new s({Extends:a,initialize:function(t,e,i,s){var n="js",l=[];if(o(e)){var u=e;e=r(u,"key"),i=r(u,"url"),s=r(u,"xhrSettings"),n=r(u,"extension",n)}Array.isArray(i)||(i=[i]);for(var c=0;c{var s=i(56694),n=i(76846),r=i(72632),o=i(42911),a=i(45176),h=i(27291),l=i(76799),u=i(86897),c=new s({Extends:a,initialize:function(t,e,i,s,n,h){var l,c,d=t.cacheManager.obj;if(o(e)){var p=e;e=r(p,"key"),l=new u(t,{key:e,type:"obj",cache:d,url:r(p,"url"),extension:r(p,"extension","obj"),xhrSettings:r(p,"xhrSettings"),config:{flipUV:r(p,"flipUV",n)}}),(s=r(p,"matURL"))&&(c=new u(t,{key:e,type:"mat",cache:d,url:s,extension:r(p,"matExtension","mat"),xhrSettings:r(p,"xhrSettings")}))}else l=new u(t,{key:e,url:i,type:"obj",cache:d,extension:"obj",xhrSettings:h,config:{flipUV:n}}),s&&(c=new u(t,{key:e,url:s,type:"mat",cache:d,extension:"mat",xhrSettings:h}));a.call(this,t,"obj",e,[l,c])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=h(t.data,t.config.flipUV);e&&(i.materials=l(e.data)),t.cache.add(t.key,i),this.complete=!0}}});n.register("obj",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(12117),r=i(76846),o=i(70806),a=new s({Extends:o,initialize:function(t,e,i,s,n){o.call(this,t,e,i,s,n),this.type="packfile"},onProcess:function(){if(this.state!==n.FILE_POPULATED&&(this.state=n.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var t={};t[this.config]=this.data,this.data=t}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});r.register("pack",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,o,l){var u="js";if(h(e)){var c=e;e=a(c,"key"),i=a(c,"url"),l=a(c,"xhrSettings"),u=a(c,"extension",u),s=a(c,"start"),o=a(c,"mapping")}var d={type:"plugin",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:l,config:{start:s,mapping:o}};r.call(this,t,d),"function"==typeof i&&(this.data=i,this.state=n.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=a(e,"start",!1),s=a(e,"mapping",null);if(this.state===n.FILE_POPULATED)t.install(this.key,this.data,i,s);else{this.state=n.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var r=t.install(this.key,window[this.key],i,s);(i||s)&&(this.loader.systems[s]=r,this.loader.scene[s]=r)}this.onProcessComplete()}});o.register("plugin",(function(t,e,i,s,n){if(Array.isArray(t))for(var r=0;r{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n){var o="svg";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),s=a(l,"svgConfig",{}),n=a(l,"xhrSettings"),o=a(l,"extension",o)}var u={type:"svg",cache:t.textureManager,extension:o,responseType:"text",key:e,url:i,xhrSettings:n,config:{width:a(s,"width"),height:a(s,"height"),scale:a(s,"scale")}};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this.xhrLoader.responseText,e=[t],i=this.config.width,s=this.config.height,o=this.config.scale;t:if(i&&s||o){var a=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("svg")[0],h=a.hasAttribute("viewBox"),l=parseFloat(a.getAttribute("width")),u=parseFloat(a.getAttribute("height"));if(!h&&l&&u)a.setAttribute("viewBox","0 0 "+l+" "+u);else if(h&&!l&&!u){var c=a.getAttribute("viewBox").split(/\s+|,/);l=c[2],u=c[3]}if(o){if(!l||!u)break t;i=l*o,s=u*o}a.setAttribute("width",i.toString()+"px"),a.setAttribute("height",s.toString()+"px"),e=[(new XMLSerializer).serializeToString(a)]}try{var d=new window.Blob(e,{type:"image/svg+xml;charset=utf-8"})}catch(t){return void this.onProcessError()}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var p=this,f=!1;this.data.onload=function(){f||r.revokeObjectURL(p.data),p.onProcessComplete()},this.data.onerror=function(){f?p.onProcessError():(f=!0,r.revokeObjectURL(p.data),p.data.src="data:image/svg+xml,"+encodeURIComponent(e.join("")))},r.createObjectURL(this.data,d,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});o.register("svg",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="js";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var l={type:"text",extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.concat("(function(){\nreturn new "+this.key+"();\n}).call(this);"),e=eval;this.loader.sceneManager.add(this.key,e(t)),this.complete=!0}});o.register("sceneFile",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,o,l){var u="js";if(h(e)){var c=e;e=a(c,"key"),i=a(c,"url"),l=a(c,"xhrSettings"),u=a(c,"extension",u),s=a(c,"systemKey"),o=a(c,"sceneKey")}var d={type:"scenePlugin",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:l,config:{systemKey:s,sceneKey:o}};r.call(this,t,d),"function"==typeof i&&(this.data=i,this.state=n.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=this.key,s=a(e,"systemKey",i),r=a(e,"sceneKey",i);this.state===n.FILE_POPULATED?t.installScenePlugin(s,this.data,r,this.loader.scene,!0):(this.state=n.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),t.installScenePlugin(s,window[this.key],r,this.loader.scene,!0)),this.onProcessComplete()}});o.register("scenePlugin",(function(t,e,i,s,n){if(Array.isArray(t))for(var r=0;r{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n){var o="js";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),s=a(l,"type","script"),n=a(l,"xhrSettings"),o=a(l,"extension",o)}else void 0===s&&(s="script");var u={type:s,cache:!1,extension:o,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});o.register("script",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(42927),o=new s({Extends:r,initialize:function(t,e,i,s,n){r.call(this,t,e,i,n,s),this.type="spritesheet"},addToCache:function(){this.cache.addSpriteSheet(this.key,this.data,this.config)}});n.register("spritesheet",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="text",o="txt",l=t.cacheManager.text;if(h(e)){var u=e;e=a(u,"key"),i=a(u,"url"),s=a(u,"xhrSettings"),o=a(u,"extension",o),n=a(u,"type",n),l=a(u,"cache",l)}var c={type:n,cache:l,extension:o,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,c)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("text",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=i(93560),u=new s({Extends:r,initialize:function(t,e,i,s){var n="csv";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var u={type:"tilemapCSV",cache:t.cacheManager.tilemap,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,u),this.tilemapFormat=l.CSV},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,t)}});o.register("tilemapCSV",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(76846),r=i(70806),o=i(93560),a=new s({Extends:r,initialize:function(t,e,i,s){r.call(this,t,e,i,s),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:o.WELTMEISTER,data:this.data};this.cache.add(this.key,t)}});n.register("tilemapImpact",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(76846),r=i(70806),o=i(93560),a=new s({Extends:r,initialize:function(t,e,i,s){r.call(this,t,e,i,s),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:o.TILED_JSON,data:this.data};this.cache.add(this.key,t)}});n.register("tilemapTiledJSON",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(45176),l=i(86897),u=new s({Extends:h,initialize:function(t,e,i,s,n,u){var c,d;if(a(e)){var p=e;e=r(p,"key"),c=new o(t,{key:e,url:r(p,"textureURL"),extension:r(p,"textureExtension","png"),normalMap:r(p,"normalMap"),xhrSettings:r(p,"textureXhrSettings")}),d=new l(t,{key:e,url:r(p,"atlasURL"),extension:r(p,"atlasExtension","txt"),xhrSettings:r(p,"atlasXhrSettings")})}else c=new o(t,e,i,n),d=new l(t,e,s,u);c.linkFile?h.call(this,t,"unityatlas",e,[c,d,c.linkFile]):h.call(this,t,"unityatlas",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(t.key,t.data,e.data,i),this.complete=!0}}});n.register("unityAtlas",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(30750),h=i(72632),l=i(42911),u=new s({Extends:r,initialize:function(t,e,i,s,n,o,a){void 0===s&&(s="loadeddata"),void 0===n&&(n=!1),void 0===o&&(o=!1),"loadeddata"!==s&&"canplay"!==s&&"canplaythrough"!==s&&(s="loadeddata");var h={type:"video",cache:t.cacheManager.video,extension:i.type,responseType:"blob",key:e,url:i.url,xhrSettings:a,config:{loadEvent:s,asBlob:n,noAudio:o}};this.onLoadCallback=this.onVideoLoadHandler.bind(this),this.onErrorCallback=this.onVideoErrorHandler.bind(this),r.call(this,t,h)},onProcess:function(){if(this.state=n.FILE_PROCESSING,this.config.asBlob){var t=this.createVideoElement();this.data=t;var e=this;this.data.onloadeddata=function(){e.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(e.data),e.onProcessError()},r.createObjectURL(t,this.xhrLoader.response,""),t.load()}else this.onProcessComplete()},createVideoElement:function(){var t=document.createElement("video");return t.controls=!1,t.crossOrigin=this.loader.crossOrigin,this.config.noAudio&&(t.muted=!0,t.defaultMuted=!0,t.setAttribute("autoplay","autoplay")),t.setAttribute("playsinline","playsinline"),t.setAttribute("preload","auto"),t},onVideoLoadHandler:function(t){var e=t.target;e.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),e.removeEventListener("error",this.onErrorCallback,!0),this.data=e,this.resetXHR(),this.loader.nextFile(this,!0)},onVideoErrorHandler:function(t){var e=t.target;e&&(e.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),e.removeEventListener("error",this.onErrorCallback,!0)),this.resetXHR(),this.loader.nextFile(this,!1)},load:function(){var t=this.config.loadEvent;if(this.config.asBlob)r.prototype.load.call(this);else{this.percentComplete=0;var e=this.createVideoElement();e.addEventListener(t,this.onLoadCallback,!0),e.addEventListener("error",this.onErrorCallback,!0),e.src=a(this,this.loader.baseURL),e.load()}}});u.create=function(t,e,i,s,n,r,o){var a=t.systems.game;l(e)&&(i=h(e,"url",[]),s=h(e,"loadEvent","loadeddata"),n=h(e,"asBlob",!1),r=h(e,"noAudio",!1),o=h(e,"xhrSettings"),e=h(e,"key"));var c=u.getVideoURL(a,i);if(c)return new u(t,e,c,s,n,r,o)},u.getVideoURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=i(89200),u=new s({Extends:r,initialize:function(t,e,i,s){var n="xml";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var l={type:"xml",cache:t.cacheManager.xml,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});o.register("xml",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{t.exports={AnimationJSONFile:i(46468),AsepriteFile:i(31648),AtlasJSONFile:i(73152),AtlasXMLFile:i(24616),AudioFile:i(67448),AudioSpriteFile:i(66109),BinaryFile:i(40612),BitmapFontFile:i(54565),CompressedTextureFile:i(47375),CSSFile:i(99898),GLSLFile:i(46568),HTML5AudioFile:i(30929),HTMLFile:i(77459),HTMLTextureFile:i(9755),ImageFile:i(42927),JSONFile:i(70806),MultiAtlasFile:i(80802),MultiScriptFile:i(39034),OBJFile:i(85527),PackFile:i(3616),PluginFile:i(12217),SceneFile:i(95171),ScenePluginFile:i(82458),ScriptFile:i(55188),SpriteSheetFile:i(33536),SVGFile:i(4474),TextFile:i(86897),TilemapCSVFile:i(58673),TilemapImpactFile:i(98896),TilemapJSONFile:i(50563),UnityAtlasFile:i(82857),VideoFile:i(22833),XMLFile:i(15297)}},95695:(t,e,i)=>{var s=i(12117),n=i(98611),r={Events:i(683),FileTypes:i(34034),File:i(98035),FileTypesManager:i(76846),GetURL:i(30750),LoaderPlugin:i(67285),MergeXHRSettings:i(43531),MultiFile:i(45176),XHRLoader:i(88490),XHRSettings:i(33868)};r=n(!1,r,s),t.exports=r},26042:t=>{t.exports=function(t){for(var e=0,i=0;i{var s=i(8034);t.exports=function(t,e){return s(t)/s(e)/s(t-e)}},17489:t=>{t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},14976:t=>{t.exports=function(t,e,i,s,n){var r=.5*(s-e),o=.5*(n-i),a=t*t;return(2*i-2*s+r+o)*(t*a)+(-3*i+3*s-2*r-o)*a+r*t+i}},89129:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.ceil(t*s)/s}},82897:t=>{t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},75606:(t,e,i)=>{var s=i(83392);t.exports=function(t){return t*s.DEG_TO_RAD}},767:t=>{t.exports=function(t,e){return Math.abs(t-e)}},9849:(t,e,i)=>{var s=i(82897),n=i(56694),r=i(16650),o=i(72283),a=new r,h=new n({initialize:function t(e,i,s,n){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=t.DefaultOrder),this._x=e,this._y=i,this._z=s,this._order=n,this.onChangeCallback=o},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,s){return void 0===s&&(s=this._order),this._x=t,this._y=e,this._z=i,this._order=s,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),a.fromQuat(t),this.setFromRotationMatrix(a,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var n=t.val,r=n[0],o=n[4],a=n[8],h=n[1],l=n[5],u=n[9],c=n[2],d=n[6],p=n[10],f=0,v=0,g=0,m=.99999;switch(e){case"XYZ":v=Math.asin(s(a,-1,1)),Math.abs(a){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},61616:t=>{t.exports=function(t,e){return Math.random()*(e-t)+t}},60679:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.floor(t*s)/s}},91806:(t,e,i)=>{var s=i(82897);t.exports=function(t,e,i){return(i-e)*(t=s(t,0,1))+e}},79366:t=>{t.exports=function(t,e){return t/e/1e3}},43776:t=>{t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},58442:t=>{t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},42798:t=>{t.exports=function(t,e,i){return(e-t)*i+t}},61072:t=>{t.exports=function(t,e,i){return void 0===i&&(i=0),t.clone().lerp(e,i)}},5341:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new s(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=s,this},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*n+o*a,d=h*n-r*a,p=e*u+i*c+s*d;return p?(p=1/p,t[0]=u*p,t[1]=(-l*i+s*h)*p,t[2]=(o*i-s*r)*p,t[3]=c*p,t[4]=(l*e-s*a)*p,t[5]=(-o*e+s*n)*p,t[6]=d*p,t[7]=(-h*e+i*a)*p,t[8]=(r*e-i*n)*p,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=s*h-i*l,t[2]=i*o-s*r,t[3]=o*a-n*l,t[4]=e*l-s*a,t[5]=s*n-e*o,t[6]=n*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*n,this},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*n+o*a)+s*(h*n-r*a)},multiply:function(t){var e=this.val,i=e[0],s=e[1],n=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],p=c[1],f=c[2],v=c[3],g=c[4],m=c[5],y=c[6],x=c[7],T=c[8];return e[0]=d*i+p*r+f*h,e[1]=d*s+p*o+f*l,e[2]=d*n+p*a+f*u,e[3]=v*i+g*r+m*h,e[4]=v*s+g*o+m*l,e[5]=v*n+g*a+m*u,e[6]=y*i+x*r+T*h,e[7]=y*s+x*o+T*l,e[8]=y*n+x*a+T*u,this},translate:function(t){var e=this.val,i=t.x,s=t.y;return e[6]=i*e[0]+s*e[3]+e[6],e[7]=i*e[1]+s*e[4]+e[7],e[8]=i*e[2]+s*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],s=e[1],n=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*s+h*o,e[2]=l*n+h*a,e[3]=l*r-h*i,e[4]=l*o-h*s,e[5]=l*a-h*n,this},scale:function(t){var e=this.val,i=t.x,s=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=s*e[3],e[4]=s*e[4],e[5]=s*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,s=t.z,n=t.w,r=e+e,o=i+i,a=s+s,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,p=s*a,f=n*r,v=n*o,g=n*a,m=this.val;return m[0]=1-(c+p),m[3]=l+g,m[6]=u-v,m[1]=l-g,m[4]=1-(h+p),m[7]=d+f,m[2]=u+v,m[5]=d-f,m[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,s=e[0],n=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],p=e[10],f=e[11],v=e[12],g=e[13],m=e[14],y=e[15],x=s*h-n*a,T=s*l-r*a,w=s*u-o*a,b=n*l-r*h,E=n*u-o*h,S=r*u-o*l,A=c*g-d*v,C=c*m-p*v,_=c*y-f*v,M=d*m-p*g,R=d*y-f*g,P=p*y-f*m,O=x*P-T*R+w*M+b*_-E*C+S*A;return O?(O=1/O,i[0]=(h*P-l*R+u*M)*O,i[1]=(l*_-a*P-u*C)*O,i[2]=(a*R-h*_+u*A)*O,i[3]=(r*R-n*P-o*M)*O,i[4]=(s*P-r*_+o*C)*O,i[5]=(n*_-s*R-o*A)*O,i[6]=(g*S-m*E+y*b)*O,i[7]=(m*w-v*S-y*T)*O,i[8]=(v*E-g*w+y*x)*O,this):null}});t.exports=s},16650:(t,e,i)=>{var s=i(56694),n=i(70015),r=1e-6,o=new s({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new o(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,s,n,r,o,a,h,l,u,c,d,p,f,v){var g=this.val;return g[0]=t,g[1]=e,g[2]=i,g[3]=s,g[4]=n,g[5]=r,g[6]=o,g[7]=a,g[8]=h,g[9]=l,g[10]=u,g[11]=c,g[12]=d,g[13]=p,g[14]=f,g[15]=v,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var s=a.fromQuat(i).val,n=e.x,r=e.y,o=e.z;return this.setValues(s[0]*n,s[1]*n,s[2]*n,0,s[4]*r,s[5]*r,s[6]*r,0,s[8]*o,s[9]*o,s[10]*o,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var s=this.val;return s[12]=t,s[13]=e,s[14]=i,this},scaling:function(t,e,i){this.zero();var s=this.val;return s[0]=t,s[5]=e,s[10]=i,s[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[3],n=t[6],r=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=n,t[11]=t[14],t[12]=s,t[13]=r,t[14]=o,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],p=t[12],f=t[13],v=t[14],g=t[15],m=e*o-i*r,y=e*a-s*r,x=e*h-n*r,T=i*a-s*o,w=i*h-n*o,b=s*h-n*a,E=l*f-u*p,S=l*v-c*p,A=l*g-d*p,C=u*v-c*f,_=u*g-d*f,M=c*g-d*v,R=m*M-y*_+x*C+T*A-w*S+b*E;return R?(R=1/R,this.setValues((o*M-a*_+h*C)*R,(s*_-i*M-n*C)*R,(f*b-v*w+g*T)*R,(c*w-u*b-d*T)*R,(a*A-r*M-h*S)*R,(e*M-s*A+n*S)*R,(v*x-p*b-g*y)*R,(l*b-c*x+d*y)*R,(r*_-o*A+h*E)*R,(i*A-e*_-n*E)*R,(p*w-f*x+g*m)*R,(u*x-l*w-d*m)*R,(o*S-r*C-a*E)*R,(e*C-i*S+s*E)*R,(f*y-p*T-v*m)*R,(l*T-u*y+c*m)*R)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],p=t[12],f=t[13],v=t[14],g=t[15];return this.setValues(o*(c*g-d*v)-u*(a*g-h*v)+f*(a*d-h*c),-(i*(c*g-d*v)-u*(s*g-n*v)+f*(s*d-n*c)),i*(a*g-h*v)-o*(s*g-n*v)+f*(s*h-n*a),-(i*(a*d-h*c)-o*(s*d-n*c)+u*(s*h-n*a)),-(r*(c*g-d*v)-l*(a*g-h*v)+p*(a*d-h*c)),e*(c*g-d*v)-l*(s*g-n*v)+p*(s*d-n*c),-(e*(a*g-h*v)-r*(s*g-n*v)+p*(s*h-n*a)),e*(a*d-h*c)-r*(s*d-n*c)+l*(s*h-n*a),r*(u*g-d*f)-l*(o*g-h*f)+p*(o*d-h*u),-(e*(u*g-d*f)-l*(i*g-n*f)+p*(i*d-n*u)),e*(o*g-h*f)-r*(i*g-n*f)+p*(i*h-n*o),-(e*(o*d-h*u)-r*(i*d-n*u)+l*(i*h-n*o)),-(r*(u*v-c*f)-l*(o*v-a*f)+p*(o*c-a*u)),e*(u*v-c*f)-l*(i*v-s*f)+p*(i*c-s*u),-(e*(o*v-a*f)-r*(i*v-s*f)+p*(i*a-s*o)),e*(o*c-a*u)-r*(i*c-s*u)+l*(i*a-s*o))},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],p=t[12],f=t[13],v=t[14],g=t[15];return(e*o-i*r)*(c*g-d*v)-(e*a-s*r)*(u*g-d*f)+(e*h-n*r)*(u*v-c*f)+(i*a-s*o)*(l*g-d*p)-(i*h-n*o)*(l*v-c*p)+(s*h-n*a)*(l*f-u*p)},multiply:function(t){var e=this.val,i=e[0],s=e[1],n=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],p=e[11],f=e[12],v=e[13],g=e[14],m=e[15],y=t.val,x=y[0],T=y[1],w=y[2],b=y[3];return e[0]=x*i+T*o+w*u+b*f,e[1]=x*s+T*a+w*c+b*v,e[2]=x*n+T*h+w*d+b*g,e[3]=x*r+T*l+w*p+b*m,x=y[4],T=y[5],w=y[6],b=y[7],e[4]=x*i+T*o+w*u+b*f,e[5]=x*s+T*a+w*c+b*v,e[6]=x*n+T*h+w*d+b*g,e[7]=x*r+T*l+w*p+b*m,x=y[8],T=y[9],w=y[10],b=y[11],e[8]=x*i+T*o+w*u+b*f,e[9]=x*s+T*a+w*c+b*v,e[10]=x*n+T*h+w*d+b*g,e[11]=x*r+T*l+w*p+b*m,x=y[12],T=y[13],w=y[14],b=y[15],e[12]=x*i+T*o+w*u+b*f,e[13]=x*s+T*a+w*c+b*v,e[14]=x*n+T*h+w*d+b*g,e[15]=x*r+T*l+w*p+b*m,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,s=e.val,n=i[0],r=i[4],o=i[8],a=i[12],h=i[1],l=i[5],u=i[9],c=i[13],d=i[2],p=i[6],f=i[10],v=i[14],g=i[3],m=i[7],y=i[11],x=i[15],T=s[0],w=s[4],b=s[8],E=s[12],S=s[1],A=s[5],C=s[9],_=s[13],M=s[2],R=s[6],P=s[10],O=s[14],L=s[3],F=s[7],D=s[11],k=s[15];return this.setValues(n*T+r*S+o*M+a*L,h*T+l*S+u*M+c*L,d*T+p*S+f*M+v*L,g*T+m*S+y*M+x*L,n*w+r*A+o*R+a*F,h*w+l*A+u*R+c*F,d*w+p*A+f*R+v*F,g*w+m*A+y*R+x*F,n*b+r*C+o*P+a*D,h*b+l*C+u*P+c*D,d*b+p*C+f*P+v*D,g*b+m*C+y*P+x*D,n*E+r*_+o*O+a*k,h*E+l*_+u*O+c*k,d*E+p*_+f*O+v*k,g*E+m*_+y*O+x*k)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var s=this.val;return s[12]=s[0]*t+s[4]*e+s[8]*i+s[12],s[13]=s[1]*t+s[5]*e+s[9]*i+s[13],s[14]=s[2]*t+s[6]*e+s[10]*i+s[14],s[15]=s[3]*t+s[7]*e+s[11]*i+s[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var s=this.val;return s[0]=s[0]*t,s[1]=s[1]*t,s[2]=s[2]*t,s[3]=s[3]*t,s[4]=s[4]*e,s[5]=s[5]*e,s[6]=s[6]*e,s[7]=s[7]*e,s[8]=s[8]*i,s[9]=s[9]*i,s[10]=s[10]*i,s[11]=s[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),s=Math.sin(e),n=1-i,r=t.x,o=t.y,a=t.z,h=n*r,l=n*o;return this.setValues(h*r+i,h*o-s*a,h*a+s*o,0,h*o+s*a,l*o+i,l*a-s*r,0,h*a-s*o,l*a+s*r,n*a*a+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,s=e.x,n=e.y,o=e.z,a=Math.sqrt(s*s+n*n+o*o);if(Math.abs(a){t.exports=function(t,e,i){return Math.min(t+e,i)}},37394:t=>{t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort((function(t,e){return t-e}));var i=Math.floor(e/2);return e%2==0?(t[i]+t[i-1])/2:t[i]}},17259:t=>{t.exports=function(t,e,i){return Math.max(t-e,i)}},61820:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=e+1);var n=(t-e)/(i-e);return n>1?void 0!==s?(n=(s-t)/(s-i))<0&&(n=0):n=1:n<0&&(n=0),n}},75003:(t,e,i)=>{var s=i(56694),n=i(5341),r=i(72283),o=i(70015),a=1e-6,h=new Int8Array([1,2,0]),l=new Float32Array([0,0,0]),u=new o(1,0,0),c=new o(0,1,0),d=new o,p=new n,f=new s({initialize:function(t,e,i,s){this.onChangeCallback=r,this.set(t,e,i,s)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,s,n){return void 0===n&&(n=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=s||0),n&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,n=t*t+e*e+i*i+s*s;return n>0&&(n=1/Math.sqrt(n),this._x=t*n,this._y=e*n,this._z=i*n,this._w=s*n),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,n=this.z,r=this.w;return this.set(i+e*(t.x-i),s+e*(t.y-s),n+e*(t.z-n),r+e*(t.w-r))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(d.copy(u).cross(t).length().999999?this.set(0,0,0,1):(d.copy(t).cross(e),this._x=d.x,this._y=d.y,this._z=d.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var s=p.val;return s[0]=e.x,s[3]=e.y,s[6]=e.z,s[1]=i.x,s[4]=i.y,s[7]=i.z,s[2]=-t.x,s[5]=-t.y,s[8]=-t.z,this.fromMat3(p).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,s=this.z,n=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.set(e*h+n*r+i*a-s*o,i*h+n*o+s*r-e*a,s*h+n*a+e*o-i*r,n*h-e*r-i*o-s*a)},slerp:function(t,e){var i=this.x,s=this.y,n=this.z,r=this.w,o=t.x,h=t.y,l=t.z,u=t.w,c=i*o+s*h+n*l+r*u;c<0&&(c=-c,o=-o,h=-h,l=-l,u=-u);var d=1-e,p=e;if(1-c>a){var f=Math.acos(c),v=Math.sin(f);d=Math.sin((1-e)*f)/v,p=Math.sin(e*f)/v}return this.set(d*i+p*o,d*s+p*h,d*n+p*l,d*r+p*u)},invert:function(){var t=this.x,e=this.y,i=this.z,s=this.w,n=t*t+e*e+i*i+s*s,r=n?1/n:0;return this.set(-t*r,-e*r,-i*r,s*r)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,n=this.w,r=Math.sin(t),o=Math.cos(t);return this.set(e*o+n*r,i*o+s*r,s*o-i*r,n*o-e*r)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,n=this.w,r=Math.sin(t),o=Math.cos(t);return this.set(e*o-s*r,i*o+n*r,s*o+e*r,n*o-i*r)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,n=this.w,r=Math.sin(t),o=Math.cos(t);return this.set(e*o+i*r,i*o-e*r,s*o+n*r,n*o-s*r)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,s=t.y/2,n=t.z/2,r=Math.cos(i),o=Math.cos(s),a=Math.cos(n),h=Math.sin(i),l=Math.sin(s),u=Math.sin(n);switch(t.order){case"XYZ":this.set(h*o*a+r*l*u,r*l*a-h*o*u,r*o*u+h*l*a,r*o*a-h*l*u,e);break;case"YXZ":this.set(h*o*a+r*l*u,r*l*a-h*o*u,r*o*u-h*l*a,r*o*a+h*l*u,e);break;case"ZXY":this.set(h*o*a-r*l*u,r*l*a+h*o*u,r*o*u+h*l*a,r*o*a-h*l*u,e);break;case"ZYX":this.set(h*o*a-r*l*u,r*l*a+h*o*u,r*o*u-h*l*a,r*o*a+h*l*u,e);break;case"YZX":this.set(h*o*a+r*l*u,r*l*a+h*o*u,r*o*u-h*l*a,r*o*a-h*l*u,e);break;case"XZY":this.set(h*o*a-r*l*u,r*l*a-h*o*u,r*o*u+h*l*a,r*o*a+h*l*u,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,s=i[0],n=i[4],r=i[8],o=i[1],a=i[5],h=i[9],l=i[2],u=i[6],c=i[10],d=s+a+c;return d>0?(e=.5/Math.sqrt(d+1),this.set((u-h)*e,(r-l)*e,(o-n)*e,.25/e)):s>a&&s>c?(e=2*Math.sqrt(1+s-a-c),this.set(.25*e,(n+o)/e,(r+l)/e,(u-h)/e)):a>c?(e=2*Math.sqrt(1+a-s-c),this.set((n+o)/e,.25*e,(h+u)/e,(r-l)/e)):(e=2*Math.sqrt(1+c-s-a),this.set((r+l)/e,(h+u)/e,.25*e,(o-n)/e)),this},fromMat3:function(t){var e,i=t.val,s=i[0]+i[4]+i[8];if(s>0)e=Math.sqrt(s+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var n=0;i[4]>i[0]&&(n=1),i[8]>i[3*n+n]&&(n=2);var r=h[n],o=h[r];e=Math.sqrt(i[3*n+n]-i[3*r+r]-i[3*o+o]+1),l[n]=.5*e,e=.5/e,l[r]=(i[3*r+n]+i[3*n+r])*e,l[o]=(i[3*o+n]+i[3*n+o])*e,this._x=l[0],this._y=l[1],this._z=l[2],this._w=(i[3*o+r]-i[3*r+o])*e}return this.onChangeCallback(this),this}});t.exports=f},23701:(t,e,i)=>{var s=i(83392);t.exports=function(t){return t*s.RAD_TO_DEG}},16906:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},52417:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,s=2*Math.random()-1,n=Math.sqrt(1-s*s)*e;return t.x=Math.cos(i)*n,t.y=Math.sin(i)*n,t.z=s*e,t}},17915:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},52257:t=>{t.exports=function(t,e){var i=t.x,s=t.y;return t.x=i*Math.cos(e)-s*Math.sin(e),t.y=i*Math.sin(e)+s*Math.cos(e),t}},2386:t=>{t.exports=function(t,e,i,s){var n=Math.cos(s),r=Math.sin(s),o=t.x-e,a=t.y-i;return t.x=o*n-a*r+e,t.y=o*r+a*n+i,t}},72395:t=>{t.exports=function(t,e,i,s,n){var r=s+Math.atan2(t.y-i,t.x-e);return t.x=e+n*Math.cos(r),t.y=i+n*Math.sin(r),t}},41061:t=>{t.exports=function(t,e,i,s,n){return t.x=e+n*Math.cos(s),t.y=i+n*Math.sin(s),t}},93709:(t,e,i)=>{var s=i(70015),n=i(16650),r=i(75003),o=new n,a=new r,h=new s;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},67233:t=>{t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},64333:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.round(t*s)/s}},59533:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=1),s*=Math.PI/t;for(var n=[],r=[],o=0;o{t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},87736:t=>{t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},55805:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n){void 0===n&&(n=new s);var r=0,o=0;return t>0&&t<=e*i&&(r=t>e-1?t-(o=Math.floor(t/e))*e:t),n.set(r,o)}},64462:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,o,a,h){void 0===h&&(h=new s);var l=Math.sin(r),u=Math.cos(r),c=u*o,d=l*o,p=-l*a,f=u*a,v=1/(c*f+p*-d);return h.x=f*v*t+-p*v*e+(n*p-i*f)*v,h.y=c*v*e+-d*v*t+(-n*c+i*d)*v,h}},93736:(t,e,i)=>{var s=i(56694),n=i(88456),r=new s({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new r(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return n(this.x,t.x,e)&&n(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this},transformMat3:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[3]*i+s[6],this.y=s[1]*e+s[4]*i+s[7],this},transformMat4:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[4]*i+s[12],this.y=s[1]*e+s[5]*i+s[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)},project:function(t){var e=this.dot(t)/t.dot(t);return this.copy(t).scale(e)}});r.ZERO=new r,r.RIGHT=new r(1,0),r.LEFT=new r(-1,0),r.UP=new r(0,-1),r.DOWN=new r(0,1),r.ONE=new r(1,1),t.exports=r},70015:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new s(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var i=t.x,s=t.y,n=t.z,r=e.x,o=e.y,a=e.z;return this.x=s*a-n*o,this.y=n*r-i*a,this.z=i*o-s*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return Math.sqrt(e*e+i*i+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return e*e+i*i+s*s},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,s=t*t+e*e+i*i;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,s=this.z,n=t.x,r=t.y,o=t.z;return this.x=i*o-s*r,this.y=s*n-e*o,this.z=e*r-i*n,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,n=this.z;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=n+e*(t.z-n),this},applyMatrix3:function(t){var e=this.x,i=this.y,s=this.z,n=t.val;return this.x=n[0]*e+n[3]*i+n[6]*s,this.y=n[1]*e+n[4]*i+n[7]*s,this.z=n[2]*e+n[5]*i+n[8]*s,this},applyMatrix4:function(t){var e=this.x,i=this.y,s=this.z,n=t.val,r=1/(n[3]*e+n[7]*i+n[11]*s+n[15]);return this.x=(n[0]*e+n[4]*i+n[8]*s+n[12])*r,this.y=(n[1]*e+n[5]*i+n[9]*s+n[13])*r,this.z=(n[2]*e+n[6]*i+n[10]*s+n[14])*r,this},transformMat3:function(t){var e=this.x,i=this.y,s=this.z,n=t.val;return this.x=e*n[0]+i*n[3]+s*n[6],this.y=e*n[1]+i*n[4]+s*n[7],this.z=e*n[2]+i*n[5]+s*n[8],this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,n=t.val;return this.x=n[0]*e+n[4]*i+n[8]*s+n[12],this.y=n[1]*e+n[5]*i+n[9]*s+n[13],this.z=n[2]*e+n[6]*i+n[10]*s+n[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,s=this.z,n=t.val,r=e*n[0]+i*n[4]+s*n[8]+n[12],o=e*n[1]+i*n[5]+s*n[9]+n[13],a=e*n[2]+i*n[6]+s*n[10]+n[14],h=e*n[3]+i*n[7]+s*n[11]+n[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,n=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*s-o*i,l=a*i+o*e-n*s,u=a*s+n*i-r*e,c=-n*e-r*i-o*s;return this.x=h*a+c*-n+l*-o-u*-r,this.y=l*a+c*-r+u*-n-h*-o,this.z=u*a+c*-o+h*-r-l*-n,this},project:function(t){var e=this.x,i=this.y,s=this.z,n=t.val,r=n[0],o=n[1],a=n[2],h=n[3],l=n[4],u=n[5],c=n[6],d=n[7],p=n[8],f=n[9],v=n[10],g=n[11],m=n[12],y=n[13],x=n[14],T=1/(e*h+i*d+s*g+n[15]);return this.x=(e*r+i*l+s*p+m)*T,this.y=(e*o+i*u+s*f+y)*T,this.z=(e*a+i*c+s*v+x)*T,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,s=t.y,n=t.z,r=t.w,o=this.x-i,a=r-this.y-1-s,h=this.z;return this.x=2*o/n-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});s.ZERO=new s,s.RIGHT=new s(1,0,0),s.LEFT=new s(-1,0,0),s.UP=new s(0,-1,0),s.DOWN=new s(0,1,0),s.FORWARD=new s(0,0,1),s.BACK=new s(0,0,-1),s.ONE=new s(1,1,1),t.exports=s},51729:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0)},clone:function(){return new s(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,s){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,n=t*t+e*e+i*i+s*s;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n,this.w=s*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,n=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=n+e*(t.z-n),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,n=t.w-this.w||0;return Math.sqrt(e*e+i*i+s*s+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,n=t.w-this.w||0;return e*e+i*i+s*s+n*n},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,n=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*s+r[12]*n,this.y=r[1]*e+r[5]*i+r[9]*s+r[13]*n,this.z=r[2]*e+r[6]*i+r[10]*s+r[14]*n,this.w=r[3]*e+r[7]*i+r[11]*s+r[15]*n,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,n=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*s-o*i,l=a*i+o*e-n*s,u=a*s+n*i-r*e,c=-n*e-r*i-o*s;return this.x=h*a+c*-n+l*-o-u*-r,this.y=l*a+c*-r+u*-n-h*-o,this.z=u*a+c*-o+h*-r-l*-n,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});s.prototype.sub=s.prototype.subtract,s.prototype.mul=s.prototype.multiply,s.prototype.div=s.prototype.divide,s.prototype.dist=s.prototype.distance,s.prototype.distSq=s.prototype.distanceSq,s.prototype.len=s.prototype.length,s.prototype.lenSq=s.prototype.lengthSq,t.exports=s},9557:t=>{t.exports=function(t,e,i){return Math.abs(t-e)<=i}},1071:t=>{t.exports=function(t,e,i){var s=i-e;return e+((t-e)%s+s)%s}},90447:t=>{t.exports=function(t,e,i,s){return Math.atan2(s-e,i-t)}},94240:t=>{t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},84066:t=>{t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},9678:t=>{t.exports=function(t,e,i,s){return Math.atan2(i-t,s-e)}},76861:(t,e,i)=>{var s=i(83392);t.exports=function(t){return t>Math.PI&&(t-=s.PI2),Math.abs(((t+s.TAU)%s.PI2-s.PI2)%s.PI2)}},37570:t=>{t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},87597:(t,e,i)=>{var s=i(61616);t.exports=function(){return s(-Math.PI,Math.PI)}},74493:(t,e,i)=>{var s=i(61616);t.exports=function(){return s(-180,180)}},19049:(t,e,i)=>{var s=i(37570);t.exports=function(t){return s(t+Math.PI)}},90612:(t,e,i)=>{var s=i(83392);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=s.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e{t.exports=function(t,e){var i=e-t;return 0===i?0:i-360*Math.floor((i- -180)/360)}},35786:(t,e,i)=>{var s=i(1071);t.exports=function(t){return s(t,-Math.PI,Math.PI)}},62138:(t,e,i)=>{var s=i(1071);t.exports=function(t){return s(t,-180,180)}},22153:(t,e,i)=>{t.exports={Between:i(90447),BetweenPoints:i(94240),BetweenPointsY:i(84066),BetweenY:i(9678),CounterClockwise:i(76861),Normalize:i(37570),Random:i(87597),RandomDegrees:i(74493),Reverse:i(19049),RotateTo:i(90612),ShortestBetween:i(93954),Wrap:i(35786),WrapDegrees:i(62138)}},83392:t=>{var e={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=e},53996:t=>{t.exports=function(t,e,i,s){var n=t-i,r=e-s;return Math.sqrt(n*n+r*r)}},92951:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return Math.sqrt(i*i+s*s)}},12161:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return i*i+s*s}},38057:t=>{t.exports=function(t,e,i,s){return Math.max(Math.abs(t-i),Math.abs(e-s))}},33297:t=>{t.exports=function(t,e,i,s,n){return void 0===n&&(n=2),Math.sqrt(Math.pow(i-t,n)+Math.pow(s-e,n))}},90366:t=>{t.exports=function(t,e,i,s){return Math.abs(t-i)+Math.abs(e-s)}},35032:t=>{t.exports=function(t,e,i,s){var n=t-i,r=e-s;return n*n+r*r}},10130:(t,e,i)=>{t.exports={Between:i(53996),BetweenPoints:i(92951),BetweenPointsSquared:i(12161),Chebyshev:i(38057),Power:i(33297),Snake:i(90366),Squared:i(35032)}},35060:(t,e,i)=>{var s=i(25265),n=i(57428),r=i(73214),o=i(71778),a=i(36468),h=i(88258),l=i(52910),u=i(67799),c=i(74083),d=i(92284),p=i(28035),f=i(8754);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:p.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:s.Out,Bounce:n.Out,Stepped:f,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":p.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":s.In,"Bounce.easeIn":n.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":p.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":s.Out,"Bounce.easeOut":n.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":p.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":s.InOut,"Bounce.easeInOut":n.InOut}},25860:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},45264:t=>{t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},36699:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},25265:(t,e,i)=>{t.exports={In:i(25860),Out:i(36699),InOut:i(45264)}},62191:t=>{t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},24799:t=>{t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},60819:t=>{t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},57428:(t,e,i)=>{t.exports={In:i(62191),Out:i(60819),InOut:i(24799)}},86855:t=>{t.exports=function(t){return 1-Math.sqrt(1-t*t)}},7280:t=>{t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},18058:t=>{t.exports=function(t){return Math.sqrt(1- --t*t)}},73214:(t,e,i)=>{t.exports={In:i(86855),Out:i(18058),InOut:i(7280)}},91532:t=>{t.exports=function(t){return t*t*t}},63180:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},16518:t=>{t.exports=function(t){return--t*t*t+1}},71778:(t,e,i)=>{t.exports={In:i(91532),Out:i(16518),InOut:i(63180)}},24729:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)}},50325:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*.5+1}},84074:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-s)*(2*Math.PI)/i)+1}},36468:(t,e,i)=>{t.exports={In:i(24729),Out:i(84074),InOut:i(50325)}},95638:t=>{t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},10357:t=>{t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},14894:t=>{t.exports=function(t){return 1-Math.pow(2,-10*t)}},88258:(t,e,i)=>{t.exports={In:i(95638),Out:i(14894),InOut:i(10357)}},33063:(t,e,i)=>{t.exports={Back:i(25265),Bounce:i(57428),Circular:i(73214),Cubic:i(71778),Elastic:i(36468),Expo:i(88258),Linear:i(52910),Quadratic:i(67799),Quartic:i(74083),Quintic:i(92284),Sine:i(28035),Stepped:i(8754)}},43927:t=>{t.exports=function(t){return t}},52910:(t,e,i)=>{t.exports=i(43927)},77471:t=>{t.exports=function(t){return t*t}},83863:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},44383:t=>{t.exports=function(t){return t*(2-t)}},67799:(t,e,i)=>{t.exports={In:i(77471),Out:i(44383),InOut:i(83863)}},48311:t=>{t.exports=function(t){return t*t*t*t}},55248:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},23135:t=>{t.exports=function(t){return 1- --t*t*t*t}},74083:(t,e,i)=>{t.exports={In:i(48311),Out:i(23135),InOut:i(55248)}},7313:t=>{t.exports=function(t){return t*t*t*t*t}},98759:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},26670:t=>{t.exports=function(t){return--t*t*t*t*t+1}},92284:(t,e,i)=>{t.exports={In:i(7313),Out:i(26670),InOut:i(98759)}},52929:t=>{t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},66333:t=>{t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},37255:t=>{t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},28035:(t,e,i)=>{t.exports={In:i(52929),Out:i(37255),InOut:i(66333)}},52770:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},8754:(t,e,i)=>{t.exports=i(52770)},17247:t=>{t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},88456:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},41935:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},54726:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t{t.exports={Ceil:i(17247),Equal:i(88456),Floor:i(61824),GreaterThan:i(41935),LessThan:i(54726)}},5923:(t,e,i)=>{var s=i(83392),n=i(98611),r={Angle:i(22153),Distance:i(10130),Easing:i(33063),Fuzzy:i(52778),Interpolation:i(48528),Pow2:i(73773),Snap:i(23679),RandomDataGenerator:i(81429),Average:i(26042),Bernstein:i(22824),Between:i(17489),CatmullRom:i(14976),CeilTo:i(89129),Clamp:i(82897),DegToRad:i(75606),Difference:i(767),Euler:i(9849),Factorial:i(8034),FloatBetween:i(61616),FloorTo:i(60679),FromPercent:i(91806),GetSpeed:i(79366),IsEven:i(43776),IsEvenStrict:i(58442),Linear:i(42798),LinearXY:i(61072),MaxAdd:i(69635),Median:i(37394),MinSub:i(17259),Percent:i(61820),RadToDeg:i(23701),RandomXY:i(16906),RandomXYZ:i(52417),RandomXYZW:i(17915),Rotate:i(52257),RotateAround:i(2386),RotateAroundDistance:i(72395),RotateTo:i(41061),RoundAwayFromZero:i(67233),RoundTo:i(64333),SinCosTableGenerator:i(59533),SmootherStep:i(87736),SmoothStep:i(5514),ToXY:i(55805),TransformXY:i(64462),Within:i(9557),Wrap:i(1071),Vector2:i(93736),Vector3:i(70015),Vector4:i(51729),Matrix3:i(5341),Matrix4:i(16650),Quaternion:i(75003),RotateVec3:i(93709)};r=n(!1,r,s),t.exports=r},63210:(t,e,i)=>{var s=i(22824);t.exports=function(t,e){for(var i=0,n=t.length-1,r=0;r<=n;r++)i+=Math.pow(1-e,n-r)*Math.pow(e,r)*t[r]*s(n,r);return i}},88332:(t,e,i)=>{var s=i(14976);t.exports=function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n);return t[0]===t[i]?(e<0&&(r=Math.floor(n=i*(1+e))),s(n-r,t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i])):e<0?t[0]-(s(-n,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(s(n-i,t[i],t[i],t[i-1],t[i-1])-t[i]):s(n-r,t[r?r-1:0],t[r],t[i{t.exports=function(t,e,i,s,n){return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,s)+function(t,e){return t*t*t*e}(t,n)}},47614:(t,e,i)=>{var s=i(42798);t.exports=function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n);return e<0?s(t[0],t[1],n):e>1?s(t[i],t[i-1],i-n):s(t[r],t[r+1>i?i:r+1],n-r)}},16252:t=>{t.exports=function(t,e,i,s){return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,s)}},44521:(t,e,i)=>{var s=i(5514);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},45507:(t,e,i)=>{var s=i(87736);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},48528:(t,e,i)=>{t.exports={Bezier:i(63210),CatmullRom:i(88332),CubicBezier:i(34631),Linear:i(47614),QuadraticBezier:i(16252),SmoothStep:i(44521),SmootherStep:i(45507)}},3504:t=>{t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<{t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},2018:t=>{t.exports=function(t){return t>0&&0==(t&t-1)}},73773:(t,e,i)=>{t.exports={GetNext:i(3504),IsSize:i(28621),IsValue:i(2018)}},81429:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),s=t[i];t[i]=t[e],t[e]=s}return t}});t.exports=s},82127:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),s?(i+t)/e:i+t)}},84314:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),s?(i+t)/e:i+t)}},88462:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),s?(i+t)/e:i+t)}},23679:(t,e,i)=>{t.exports={Ceil:i(82127),Floor:i(84314),To:i(88462)}},10654:(t,e,i)=>{i(92244);var s=i(86459),n=i(98611),r={Actions:i(83979),Animations:i(13517),BlendModes:i(95723),Cache:i(45820),Cameras:i(44143),Core:i(80293),Class:i(56694),Create:i(84106),Curves:i(73962),Data:i(1999),Display:i(24816),DOM:i(3590),Events:i(95146),Game:i(15213),GameObjects:i(48013),Geom:i(84068),Input:i(20873),Loader:i(95695),Math:i(5923),Physics:i(53954),Plugins:i(45615),Renderer:i(42069),Scale:i(86754),ScaleModes:i(27394),Scene:i(87157),Scenes:i(20436),Structs:i(20010),Textures:i(87499),Tilemaps:i(52678),Time:i(97121),Tweens:i(75193),Utils:i(22178)};r.Sound=i(56751),r=n(!1,r,s),t.exports=r,i.g.Phaser=r},62832:(t,e,i)=>{var s=i(56694),n=i(7864),r=i(1539),o=new s({Extends:r,Mixins:[n.Acceleration,n.Angular,n.Bounce,n.Debug,n.Drag,n.Enable,n.Friction,n.Gravity,n.Immovable,n.Mass,n.Pushable,n.Size,n.Velocity],initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.body=null}});t.exports=o},66150:(t,e,i)=>{var s=i(56694),n=i(75606),r=i(53996),o=i(35032),a=i(99523),h=i(72632),l=i(30657),u=i(2732),c=i(15147),d=i(91963),p=i(7599),f=i(93736),v=i(85233),g=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,t.sys.events.once(p.BOOT,this.boot,this),t.sys.events.on(p.START,this.start,this)},boot:function(){this.world=new v(this.scene,this.config),this.add=new a(this.world),this.systems.events.once(p.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new v(this.scene,this.config),this.add=new a(this.world));var t=this.systems.events;h(this.config,"customUpdate",!1)||t.on(p.UPDATE,this.world.update,this.world),t.on(p.POST_UPDATE,this.world.postUpdate,this.world),t.once(p.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(p.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(p.UPDATE,this.world.update,this.world)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return l(h(e,"arcade",{}),h(t,"arcade",{}))},overlap:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.world.collideObjects(t,e,i,s,n,!0)},collide:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.world.collideObjects(t,e,i,s,n,!1)},collideTiles:function(t,e,i,s,n){return this.world.collideTiles(t,e,i,s,n)},overlapTiles:function(t,e,i,s,n){return this.world.overlapTiles(t,e,i,s,n)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(t,e,i,s,n,r){void 0===s&&(s=60);var o=Math.atan2(i-t.y,e-t.x);return t.body.acceleration.setToPolar(o,s),void 0!==n&&void 0!==r&&t.body.maxVelocity.set(n,r),o},accelerateToObject:function(t,e,i,s,n){return this.accelerateTo(t,e.x,e.y,i,s,n)},closest:function(t,e){e||(e=this.world.bodies.entries);for(var i=Number.MAX_VALUE,s=null,n=t.x,r=t.y,a=e.length,h=0;hi&&(s=l,i=c)}}return s},moveTo:function(t,e,i,s,n){void 0===s&&(s=60),void 0===n&&(n=0);var o=Math.atan2(i-t.y,e-t.x);return n>0&&(s=r(t.x,t.y,e,i)/(n/1e3)),t.body.velocity.setToPolar(o,s),o},moveToObject:function(t,e,i,s){return this.moveTo(t,e.x,e.y,i,s)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new f),i.setToPolar(n(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new f),i.setToPolar(t,e)},overlapRect:function(t,e,i,s,n,r){return c(this.world,t,e,i,s,n,r)},overlapCirc:function(t,e,i,s,n){return u(this.world,t,e,i,s,n)},shutdown:function(){if(this.world){var t=this.systems.events;t.off(p.UPDATE,this.world.update,this.world),t.off(p.POST_UPDATE,this.world.postUpdate,this.world),t.off(p.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null}},destroy:function(){this.shutdown(),this.scene.sys.events.off(p.START,this.start,this),this.scene=null,this.systems=null}});d.register("ArcadePhysics",g,"arcadePhysics"),t.exports=g},25084:(t,e,i)=>{var s=i(56694),n=i(7864),r=i(13747),o=new s({Extends:r,Mixins:[n.Acceleration,n.Angular,n.Bounce,n.Debug,n.Drag,n.Enable,n.Friction,n.Gravity,n.Immovable,n.Mass,n.Pushable,n.Size,n.Velocity],initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.body=null}});t.exports=o},97602:(t,e,i)=>{var s=i(56694),n=i(47401),r=i(27037),o=i(23701),a=i(74118),h=i(94287),l=i(93736),u=new s({initialize:function(t,e){var i=64,s=64,r=void 0!==e;r&&e.displayWidth&&(i=e.displayWidth,s=e.displayHeight),r||(e={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=t,this.gameObject=r?e:void 0,this.isBody=!0,this.transform={x:e.x,y:e.y,rotation:e.angle,scaleX:e.scaleX,scaleY:e.scaleY,displayOriginX:e.displayOriginX,displayOriginY:e.displayOriginY},this.debugShowBody=t.defaults.debugShowBody,this.debugShowVelocity=t.defaults.debugShowVelocity,this.debugBodyColor=t.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new l,this.position=new l(e.x-e.scaleX*e.displayOriginX,e.y-e.scaleY*e.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=e.angle,this.preRotation=e.angle,this.width=i,this.height=s,this.sourceWidth=i,this.sourceHeight=s,e.frame&&(this.sourceWidth=e.frame.realWidth,this.sourceHeight=e.frame.realHeight),this.halfWidth=Math.abs(i/2),this.halfHeight=Math.abs(s/2),this.center=new l(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new l,this.newVelocity=new l,this.deltaMax=new l,this.acceleration=new l,this.allowDrag=!0,this.drag=new l,this.allowGravity=!0,this.gravity=new l,this.bounce=new l,this.worldBounce=null,this.customBoundsRectangle=t.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new l(1e4,1e4),this.maxSpeed=-1,this.friction=new l(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=n.FACING_NONE,this.immovable=!1,this.pushable=!0,this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.syncBounds=!1,this.physicsType=n.DYNAMIC_BODY,this._sx=e.scaleX,this._sy=e.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new a},updateBounds:function(){var t=this.gameObject,e=this.transform;if(t.parentContainer){var i=t.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);e.x=i.tx,e.y=i.ty,e.rotation=o(i.rotation),e.scaleX=i.scaleX,e.scaleY=i.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY}else e.x=t.x,e.y=t.y,e.rotation=t.angle,e.scaleX=t.scaleX,e.scaleY=t.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY;var s=!1;if(this.syncBounds){var n=t.getBounds(this._bounds);this.width=n.width,this.height=n.height,s=!0}else{var r=Math.abs(e.scaleX),a=Math.abs(e.scaleY);this._sx===r&&this._sy===a||(this.width=this.sourceWidth*r,this.height=this.sourceHeight*a,this._sx=r,this._sy=a,s=!0)}s&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var t=this.transform;this.position.x=t.x+t.scaleX*(this.offset.x-t.displayOriginX),this.position.y=t.y+t.scaleY*(this.offset.y-t.displayOriginY),this.updateCenter()},resetFlags:function(t){void 0===t&&(t=!1);var e=this.wasTouching,i=this.touching,s=this.blocked;t?(e.none=!0,e.up=!1,e.down=!1,e.left=!1,e.right=!1):(e.none=i.none,e.up=i.up,e.down=i.down,e.left=i.left,e.right=i.right),i.none=!0,i.up=!1,i.down=!1,i.left=!1,i.right=!1,s.none=!0,s.up=!1,s.down=!1,s.left=!1,s.right=!1,this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(t,e){t&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves&&(this.prev.x=this.position.x,this.prev.y=this.position.y,this.prevFrame.x=this.position.x,this.prevFrame.y=this.position.y),t&&this.update(e)},update:function(t){if(this.prev.x=this.position.x,this.prev.y=this.position.y,this.moves){this.world.updateMotion(this,t);var e=this.velocity.x,i=this.velocity.y;this.newVelocity.set(e*t,i*t),this.position.add(this.newVelocity),this.updateCenter(),this.angle=Math.atan2(i,e),this.speed=Math.sqrt(e*e+i*i),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds&&this.world.emit(r.WORLD_BOUNDS,this,this.blocked.up,this.blocked.down,this.blocked.left,this.blocked.right)}this._dx=this.position.x-this.prev.x,this._dy=this.position.y-this.prev.y},postUpdate:function(){var t=this.position.x-this.prevFrame.x,e=this.position.y-this.prevFrame.y,i=this.gameObject;if(this.moves){var s=this.deltaMax.x,r=this.deltaMax.y;0!==s&&0!==t&&(t<0&&t<-s?t=-s:t>0&&t>s&&(t=s)),0!==r&&0!==e&&(e<0&&e<-r?e=-r:e>0&&e>r&&(e=r)),i&&(i.x+=t,i.y+=e)}t<0?this.facing=n.FACING_LEFT:t>0&&(this.facing=n.FACING_RIGHT),e<0?this.facing=n.FACING_UP:e>0&&(this.facing=n.FACING_DOWN),this.allowRotation&&i&&(i.angle+=this.deltaZ()),this._tx=t,this._ty=e},setBoundsRectangle:function(t){return this.customBoundsRectangle=t||this.world.bounds,this},checkWorldBounds:function(){var t=this.position,e=this.customBoundsRectangle,i=this.world.checkCollision,s=this.worldBounce?-this.worldBounce.x:-this.bounce.x,n=this.worldBounce?-this.worldBounce.y:-this.bounce.y,r=!1;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=s,this.blocked.right=!0,r=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=n,this.blocked.down=!0,r=!0),r&&(this.blocked.none=!1,this.updateCenter()),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setGameObject:function(t,e){return void 0===e&&(e=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=t,t.body&&(t.body=this),this.setSize(),this.world.add(this),this.enable=e,this},setSize:function(t,e,i){void 0===i&&(i=!0);var s=this.gameObject;if(s&&(!t&&s.frame&&(t=s.frame.realWidth),!e&&s.frame&&(e=s.frame.realHeight)),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&s&&s.getCenter){var n=(s.width-t)/2,r=(s.height-e)/2;this.offset.set(n,r)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i&&(i.setPosition(t,e),this.rotation=i.angle,this.preRotation=i.angle);var s=this.position;i&&i.getTopLeft?i.getTopLeft(s):s.set(t,e),this.prev.copy(s),this.prevFrame.copy(s),i&&this.updateBounds(),this.updateCenter(),this.collideWorldBounds&&this.checkWorldBounds(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?this.radius>0&&t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:h(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,s=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor),this.isCircle?t.strokeCircle(i,s,this.width/2):(this.checkCollision.up&&t.lineBetween(e.x,e.y,e.x+this.width,e.y),this.checkCollision.right&&t.lineBetween(e.x+this.width,e.y,e.x+this.width,e.y+this.height),this.checkCollision.down&&t.lineBetween(e.x,e.y+this.height,e.x+this.width,e.y+this.height),this.checkCollision.left&&t.lineBetween(e.x,e.y,e.x,e.y+this.height))),this.debugShowVelocity&&(t.lineStyle(t.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,s,i+this.velocity.x/2,s+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t,e,i,s){void 0===t&&(t=!0),this.collideWorldBounds=t;var n=void 0!==e,r=void 0!==i;return(n||r)&&(this.worldBounce||(this.worldBounce=new l),n&&(this.worldBounce.x=e),r&&(this.worldBounce.y=i)),void 0!==s&&(this.onWorldBounds=s),this},setVelocity:function(t,e){return this.velocity.set(t,e),t=this.velocity.x,e=this.velocity.y,this.speed=Math.sqrt(t*t+e*e),this},setVelocityX:function(t){return this.setVelocity(t,this.velocity.y)},setVelocityY:function(t){return this.setVelocity(this.velocity.x,t)},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),this},setMaxVelocityX:function(t){return this.maxVelocity.x=t,this},setMaxVelocityY:function(t){return this.maxVelocity.y=t,this},setMaxSpeed:function(t){return this.maxSpeed=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setAllowDrag:function(t){return void 0===t&&(t=!0),this.allowDrag=t,this},setAllowGravity:function(t){return void 0===t&&(t=!0),this.allowGravity=t,this},setAllowRotation:function(t){return void 0===t&&(t=!0),this.allowRotation=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDamping:function(t){return this.useDamping=t,this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return void 0===t&&(t=!0),this.immovable=t,this},setEnable:function(t){return void 0===t&&(t=!0),this.enable=t,this},processX:function(t,e,i,s){this.x+=t,this.updateCenter(),null!==e&&(this.velocity.x=e);var n=this.blocked;i&&(n.left=!0),s&&(n.right=!0)},processY:function(t,e,i,s){this.y+=t,this.updateCenter(),null!==e&&(this.velocity.y=e);var n=this.blocked;i&&(n.up=!0),s&&(n.down=!0)},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},3909:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s,n,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=s,this.collideCallback=n,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=s},99523:(t,e,i)=>{var s=i(62832),n=i(25084),r=i(97602),o=i(56694),a=i(47401),h=i(10481),l=i(66634),u=i(46346),c=new o({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,s,n){return this.world.addCollider(t,e,i,s,n)},overlap:function(t,e,i,s,n){return this.world.addOverlap(t,e,i,s,n)},existing:function(t,e){var i=e?a.STATIC_BODY:a.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.world.enableBody(r,a.STATIC_BODY),r},image:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.world.enableBody(r,a.DYNAMIC_BODY),r},staticSprite:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,a.STATIC_BODY),r},sprite:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,a.DYNAMIC_BODY),r},staticGroup:function(t,e){return this.sys.updateList.add(new u(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},body:function(t,e,i,s){var n=new r(this.world);return n.position.set(t,e),i&&s&&n.setSize(i,s),this.world.add(n,a.DYNAMIC_BODY),n},staticBody:function(t,e,i,s){var n=new l(this.world);return n.position.set(t,e),i&&s&&n.setSize(i,s),this.world.add(n,a.STATIC_BODY),n},destroy:function(){this.world=null,this.scene=null,this.sys=null}});t.exports=c},75671:(t,e,i)=>{var s=i(47401);t.exports=function(t,e,i,n){var r=0,o=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?(r=t.right-e.x)>o&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?r=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.right=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.left=!0)):t._dxo&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?r=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.left=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=r,e.overlapX=r,r}},66185:(t,e,i)=>{var s=i(47401);t.exports=function(t,e,i,n){var r=0,o=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(r=t.bottom-e.y)>o&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?r=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.down=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.up=!0)):t._dyo&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?r=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.up=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=r,e.overlapY=r,r}},10481:(t,e,i)=>{var s=i(25084),n=i(56694),r=i(47401),o=i(72632),a=i(59192),h=i(42911),l=new n({Extends:a,initialize:function(t,e,i,n){if(i||n)if(h(i))n=i,i=null,n.internalCreateCallback=this.createCallbackHandler,n.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(i)&&h(i[0])){n=i[0];var l=this;i.forEach((function(t){t.internalCreateCallback=l.createCallbackHandler,t.internalRemoveCallback=l.removeCallbackHandler})),i=null}else n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=t,n.classType=o(n,"classType",s),this.physicsType=r.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:o(n,"collideWorldBounds",!1),setBoundsRectangle:o(n,"customBoundsRectangle",null),setAccelerationX:o(n,"accelerationX",0),setAccelerationY:o(n,"accelerationY",0),setAllowDrag:o(n,"allowDrag",!0),setAllowGravity:o(n,"allowGravity",!0),setAllowRotation:o(n,"allowRotation",!0),setDamping:o(n,"useDamping",!1),setBounceX:o(n,"bounceX",0),setBounceY:o(n,"bounceY",0),setDragX:o(n,"dragX",0),setDragY:o(n,"dragY",0),setEnable:o(n,"enable",!0),setGravityX:o(n,"gravityX",0),setGravityY:o(n,"gravityY",0),setFrictionX:o(n,"frictionX",0),setFrictionY:o(n,"frictionY",0),setMaxSpeed:o(n,"maxSpeed",-1),setMaxVelocityX:o(n,"maxVelocityX",1e4),setMaxVelocityY:o(n,"maxVelocityY",1e4),setVelocityX:o(n,"velocityX",0),setVelocityY:o(n,"velocityY",0),setAngularVelocity:o(n,"angularVelocity",0),setAngularAcceleration:o(n,"angularAcceleration",0),setAngularDrag:o(n,"angularDrag",0),setMass:o(n,"mass",1),setImmovable:o(n,"immovable",!1)},a.call(this,e,i,n),this.type="PhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,r.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var s=this.getChildren(),n=0;n{var e,i,s,n,r,o,a,h,l,u,c,d,p,f,v,g,m,y=function(){return u&&v&&i.blocked.right?(e.processX(-m,a,!1,!0),1):l&&g&&i.blocked.left?(e.processX(m,a,!0),1):p&&g&&e.blocked.right?(i.processX(-m,h,!1,!0),2):d&&v&&e.blocked.left?(i.processX(m,h,!0),2):0},x=function(t){if(s&&n)m*=.5,0===t||3===t?(e.processX(m,r),i.processX(-m,o)):(e.processX(-m,r),i.processX(m,o));else if(s&&!n)0===t||3===t?e.processX(m,a,!0):e.processX(-m,a,!1,!0);else if(!s&&n)0===t||3===t?i.processX(-m,h,!1,!0):i.processX(m,h,!0);else{var v=.5*m;0===t?f?(e.processX(m,0,!0),i.processX(0,null,!1,!0)):p?(e.processX(v,0,!0),i.processX(-v,0,!1,!0)):(e.processX(v,i.velocity.x,!0),i.processX(-v,null,!1,!0)):1===t?c?(e.processX(0,null,!1,!0),i.processX(m,0,!0)):u?(e.processX(-v,0,!1,!0),i.processX(v,0,!0)):(e.processX(-v,null,!1,!0),i.processX(v,e.velocity.x,!0)):2===t?f?(e.processX(-m,0,!1,!0),i.processX(0,null,!0)):d?(e.processX(-v,0,!1,!0),i.processX(v,0,!0)):(e.processX(-v,i.velocity.x,!1,!0),i.processX(v,null,!0)):3===t&&(c?(e.processX(0,null,!0),i.processX(-m,0,!1,!0)):l?(e.processX(v,0,!0),i.processX(-v,0,!1,!0)):(e.processX(v,i.velocity.y,!0),i.processX(-v,null,!1,!0)))}return!0};t.exports={BlockCheck:y,Check:function(){var t=e.velocity.x,s=i.velocity.x,n=Math.sqrt(s*s*i.mass/e.mass)*(s>0?1:-1),a=Math.sqrt(t*t*e.mass/i.mass)*(t>0?1:-1),h=.5*(n+a);return a-=h,r=h+(n-=h)*e.bounce.x,o=h+a*i.bounce.x,l&&g?x(0):d&&v?x(1):u&&v?x(2):!(!p||!g)&&x(3)},Set:function(t,r,o){i=r;var x=(e=t).velocity.x,T=i.velocity.x;return s=e.pushable,l=e._dx<0,u=e._dx>0,c=0===e._dx,v=Math.abs(e.right-i.x)<=Math.abs(i.right-e.x),a=T-x*e.bounce.x,n=i.pushable,d=i._dx<0,p=i._dx>0,f=0===i._dx,g=!v,h=x-T*i.bounce.x,m=Math.abs(o),y()},Run:x,RunImmovableBody1:function(t){1===t?i.velocity.x=0:v?i.processX(m,h,!0):i.processX(-m,h,!1,!0),e.moves&&(i.y+=(e.y-e.prev.y)*e.friction.y,i._dy=i.y-i.prev.y)},RunImmovableBody2:function(t){2===t?e.velocity.x=0:g?e.processX(m,a,!0):e.processX(-m,a,!1,!0),i.moves&&(e.y+=(i.y-i.prev.y)*i.friction.y,e._dy=e.y-e.prev.y)}}},67050:t=>{var e,i,s,n,r,o,a,h,l,u,c,d,p,f,v,g,m,y=function(){return u&&v&&i.blocked.down?(e.processY(-m,a,!1,!0),1):l&&g&&i.blocked.up?(e.processY(m,a,!0),1):p&&g&&e.blocked.down?(i.processY(-m,h,!1,!0),2):d&&v&&e.blocked.up?(i.processY(m,h,!0),2):0},x=function(t){if(s&&n)m*=.5,0===t||3===t?(e.processY(m,r),i.processY(-m,o)):(e.processY(-m,r),i.processY(m,o));else if(s&&!n)0===t||3===t?e.processY(m,a,!0):e.processY(-m,a,!1,!0);else if(!s&&n)0===t||3===t?i.processY(-m,h,!1,!0):i.processY(m,h,!0);else{var v=.5*m;0===t?f?(e.processY(m,0,!0),i.processY(0,null,!1,!0)):p?(e.processY(v,0,!0),i.processY(-v,0,!1,!0)):(e.processY(v,i.velocity.y,!0),i.processY(-v,null,!1,!0)):1===t?c?(e.processY(0,null,!1,!0),i.processY(m,0,!0)):u?(e.processY(-v,0,!1,!0),i.processY(v,0,!0)):(e.processY(-v,null,!1,!0),i.processY(v,e.velocity.y,!0)):2===t?f?(e.processY(-m,0,!1,!0),i.processY(0,null,!0)):d?(e.processY(-v,0,!1,!0),i.processY(v,0,!0)):(e.processY(-v,i.velocity.y,!1,!0),i.processY(v,null,!0)):3===t&&(c?(e.processY(0,null,!0),i.processY(-m,0,!1,!0)):l?(e.processY(v,0,!0),i.processY(-v,0,!1,!0)):(e.processY(v,i.velocity.y,!0),i.processY(-v,null,!1,!0)))}return!0};t.exports={BlockCheck:y,Check:function(){var t=e.velocity.y,s=i.velocity.y,n=Math.sqrt(s*s*i.mass/e.mass)*(s>0?1:-1),a=Math.sqrt(t*t*e.mass/i.mass)*(t>0?1:-1),h=.5*(n+a);return a-=h,r=h+(n-=h)*e.bounce.y,o=h+a*i.bounce.y,l&&g?x(0):d&&v?x(1):u&&v?x(2):!(!p||!g)&&x(3)},Set:function(t,r,o){i=r;var x=(e=t).velocity.y,T=i.velocity.y;return s=e.pushable,l=e._dy<0,u=e._dy>0,c=0===e._dy,v=Math.abs(e.bottom-i.y)<=Math.abs(i.bottom-e.y),a=T-x*e.bounce.y,n=i.pushable,d=i._dy<0,p=i._dy>0,f=0===i._dy,g=!v,h=x-T*i.bounce.y,m=Math.abs(o),y()},Run:x,RunImmovableBody1:function(t){1===t?i.velocity.y=0:v?i.processY(m,h,!0):i.processY(-m,h,!1,!0),e.moves&&(i.x+=(e.x-e.prev.x)*e.friction.x,i._dx=i.x-i.prev.x)},RunImmovableBody2:function(t){2===t?e.velocity.y=0:g?e.processY(m,a,!0):e.processY(-m,a,!1,!0),i.moves&&(e.x+=(i.x-i.prev.x)*i.friction.x,e._dx=e.x-e.prev.x)}}},61777:(t,e,i)=>{var s=i(75671),n=i(22916);t.exports=function(t,e,i,r,o){void 0===o&&(o=s(t,e,i,r));var a=t.immovable,h=e.immovable;if(i||0===o||a&&h||t.customSeparateX||e.customSeparateX)return 0!==o||t.embedded&&e.embedded;var l=n.Set(t,e,o);return a||h?(a?n.RunImmovableBody1(l):h&&n.RunImmovableBody2(l),!0):l>0||n.Check()}},25299:(t,e,i)=>{var s=i(66185),n=i(67050);t.exports=function(t,e,i,r,o){void 0===o&&(o=s(t,e,i,r));var a=t.immovable,h=e.immovable;if(i||0===o||a&&h||t.customSeparateY||e.customSeparateY)return 0!==o||t.embedded&&e.embedded;var l=n.Set(t,e,o);return a||h?(a?n.RunImmovableBody1(l):h&&n.RunImmovableBody2(l),!0):l>0||n.Check()}},66634:(t,e,i)=>{var s=i(65650),n=i(56694),r=i(47401),o=i(94287),a=i(93736),h=new n({initialize:function(t,e){var i=64,s=64,n=void 0!==e;n&&e.displayWidth&&(i=e.displayWidth,s=e.displayHeight),n||(e={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=t,this.gameObject=n?e:void 0,this.isBody=!0,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-i*e.originX,e.y-s*e.originY),this.width=i,this.height=s,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var s=this.gameObject;if(!t&&s.frame&&(t=s.frame.realWidth),!e&&s.frame&&(e=s.frame.realHeight),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&s.getCenter){var n=s.displayWidth/2,r=s.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(n-this.halfWidth,r-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.setPosition(t,e),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?s(this,t,e):o(this,t,e)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,s=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?t.strokeCircle(i,s,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},46346:(t,e,i)=>{var s=i(25084),n=i(56694),r=i(47401),o=i(72632),a=i(59192),h=i(42911),l=new n({Extends:a,initialize:function(t,e,i,n){i||n?h(i)?(n=i,i=null,n.internalCreateCallback=this.createCallbackHandler,n.internalRemoveCallback=this.removeCallbackHandler,n.createMultipleCallback=this.createMultipleCallbackHandler,n.classType=o(n,"classType",s)):Array.isArray(i)&&h(i[0])?(n=i,i=null,n.forEach((function(t){t.internalCreateCallback=this.createCallbackHandler,t.internalRemoveCallback=this.removeCallbackHandler,t.createMultipleCallback=this.createMultipleCallbackHandler,t.classType=o(t,"classType",s)}))):n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler}:n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:s},this.world=t,this.physicsType=r.STATIC_BODY,a.call(this,e,i,n),this.type="StaticPhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,r.STATIC_BODY)},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var t=this.children.entries,e=0;e{var s=i(94240),n=i(97602),r=i(82897),o=i(56694),a=i(3909),h=i(47401),l=i(53996),u=i(92951),c=i(6659),d=i(27037),p=i(88456),f=i(41935),v=i(54726),g=i(75671),m=i(66185),y=i(44662),x=i(10850),T=i(83392),w=i(74623),b=i(25163),E=i(74118),S=i(68687),A=i(27354),C=i(61777),_=i(25299),M=i(58403),R=i(66634),P=i(28808),O=i(69360),L=i(93736),F=i(1071),D=new o({Extends:c,initialize:function(t,e){c.call(this),this.scene=t,this.bodies=new M,this.staticBodies=new M,this.pendingDestroy=new M,this.colliders=new w,this.gravity=new L(x(e,"gravity.x",0),x(e,"gravity.y",0)),this.bounds=new E(x(e,"x",0),x(e,"y",0),x(e,"width",t.sys.scale.width),x(e,"height",t.sys.scale.height)),this.checkCollision={up:x(e,"checkCollision.up",!0),down:x(e,"checkCollision.down",!0),left:x(e,"checkCollision.left",!0),right:x(e,"checkCollision.right",!0)},this.fps=x(e,"fps",60),this.fixedStep=x(e,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=x(e,"timeScale",1),this.OVERLAP_BIAS=x(e,"overlapBias",4),this.TILE_BIAS=x(e,"tileBias",16),this.forceX=x(e,"forceX",!1),this.isPaused=x(e,"isPaused",!1),this._total=0,this.drawDebug=x(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:x(e,"debugShowBody",!0),debugShowStaticBody:x(e,"debugShowStaticBody",!0),debugShowVelocity:x(e,"debugShowVelocity",!0),bodyDebugColor:x(e,"debugBodyColor",16711935),staticBodyDebugColor:x(e,"debugStaticBodyColor",255),velocityDebugColor:x(e,"debugVelocityColor",65280)},this.maxEntries=x(e,"maxEntries",16),this.useTree=x(e,"useTree",!0),this.tree=new S(this.maxEntries),this.staticTree=new S(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new O,this._tempMatrix2=new O,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(t,e){void 0===e&&(e=h.DYNAMIC_BODY),Array.isArray(t)||(t=[t]);for(var i=0;i=r;for(this.fixedStep||(n=.001*e,a=!0,this._elapsed=0),i=0;i=r;)this._elapsed-=r,this.step(n)}},step:function(t){var e,i,s=this.bodies.entries,n=s.length;for(e=0;e0){var l=this.tree,u=this.staticTree;for(s=(i=a.entries).length,t=0;t-1&&t.velocity.length()>d&&(t.velocity.normalize().scale(d),c=d),t.speed=c},separate:function(t,e,i,s,n){var r,o,a=!1,h=!0;if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return a;if(i&&!1===i.call(s,t.gameObject,e.gameObject))return a;if(t.isCircle||e.isCircle){var l=this.separateCircle(t,e,n);l.result?(a=!0,h=!1):(r=l.x,o=l.y,h=!0)}if(h){var u=!1,c=!1,p=this.OVERLAP_BIAS;n?(u=C(t,e,n,p,r),c=_(t,e,n,p,o)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)S&&(f=l(y,x,S,E)-w):x>A&&(yS&&(f=l(y,x,S,A)-w)),f*=-1}else f=t.halfWidth+e.halfWidth-u(o,a);t.overlapR=f,e.overlapR=f;var C=s(o,a),_=(f+T.EPSILON)*Math.cos(C),M=(f+T.EPSILON)*Math.sin(C);console.log("overlap",f,"xy",_,M);var R={overlap:f,result:!1,x:_,y:M};if(i&&(!v||v&&0!==f))return R.result=!0,R;if(!v&&0===f||h&&c||t.customSeparateX||e.customSeparateX)return R.x=void 0,R.y=void 0,R;var P=!t.pushable&&!e.pushable;if(v){var O=o.x-a.x,L=o.y-a.y,F=Math.sqrt(Math.pow(O,2)+Math.pow(L,2)),D=(a.x-o.x)/F||0,k=(a.y-o.y)/F||0,I=2*(d.x*D+d.y*k-p.x*D-p.y*k)/(t.mass+e.mass);(h||c)&&(I*=2),console.log("circ vel",d,p,"p",I,"nxy",D,k),h||(d.x=d.x-I/t.mass*D,d.y=d.y-I/t.mass*k,d.multiply(t.bounce),console.log("body1",d,"y",t.y)),c||(p.x=p.x+I/e.mass*D,p.y=p.y+I/e.mass*k,p.multiply(e.bounce),console.log("body2",p,"y",e.y)),h||c||(_*=.5,M*=.5),h||(t.x-=_,t.y-=M,t.updateCenter(),console.log("body1 sep",t.y)),c||(e.x+=_,e.y+=M,e.updateCenter()),R.result=!0}else!h||t.pushable||P?(t.x-=_,t.y-=M,t.updateCenter()):(!c||e.pushable||P)&&(e.x+=_,e.y+=M,e.updateCenter()),R.x=void 0,R.y=void 0;return R},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?u(t.center,e.center)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.left||t.bottom<=e.top||t.left>=e.right||t.top>=e.bottom))},circleBodyIntersects:function(t,e){var i=r(t.center.x,e.left,e.right),s=r(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-s)*(t.center.y-s)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.collideObjects(t,e,i,s,n,!0)},collide:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.collideObjects(t,e,i,s,n,!1)},collideObjects:function(t,e,i,s,n,r){var o,a;!t.isParent||void 0!==t.physicsType&&void 0!==e&&t!==e||(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var h=Array.isArray(t),l=Array.isArray(e);if(this._total=0,h||l)if(!h&&l)for(o=0;o0},collideHandler:function(t,e,i,s,n,r){if(void 0===e&&t.isParent)return this.collideGroupVsGroup(t,t,i,s,n,r);if(!t||!e)return!1;if(t.body||t.isBody){if(e.body||e.isBody)return this.collideSpriteVsSprite(t,e,i,s,n,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,s,n,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,s,n,r)}else if(t.isParent){if(e.body||e.isBody)return this.collideSpriteVsGroup(e,t,i,s,n,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,s,n,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,s,n,r)}else if(t.isTilemap){if(e.body||e.isBody)return this.collideSpriteVsTilemapLayer(e,t,i,s,n,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,s,n,r)}},collideSpriteVsSprite:function(t,e,i,s,n,r){var o=t.isBody?t:t.body,a=e.isBody?e:e.body;return!(!o||!a)&&(this.separate(o,a,s,n,r)&&(i&&i.call(n,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,s,n,r){var o,a,l,u=t.isBody?t:t.body;if(0!==e.length&&u&&u.enable&&!u.checkCollision.none)if(this.useTree||e.physicsType===h.STATIC_BODY){var c=this.treeMinMax;c.minX=u.left,c.minY=u.top,c.maxX=u.right,c.maxY=u.bottom;var d=e.physicsType===h.DYNAMIC_BODY?this.tree.search(c):this.staticTree.search(c);for(a=d.length,o=0;oc.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=d,l+=d}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var p=r?null:this.tileFilterOptions,f=y(a,h,l,u,p,e.scene.cameras.main,e.layer);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,s,n,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,s,n,r,o){for(var a,h,l=t.isBody?t:t.body,u={left:0,right:0,top:0,bottom:0},c=!1,p=0;p{t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},29257:t=>{t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},62122:t=>{t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,e,i,s){return this.body.setCollideWorldBounds(t,e,i,s),this}}},99803:t=>{t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},87145:t=>{t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}}},96174:t=>{var e={enableBody:function(t,e,i,s,n){return t&&this.body.reset(e,i),s&&(this.body.gameObject.active=!0),n&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=e},51702:t=>{t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},25578:t=>{t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},72029:t=>{var e={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=e},34566:t=>{t.exports={setMass:function(t){return this.body.mass=t,this}}},2732:(t,e,i)=>{var s=i(15147),n=i(26673),r=i(22184),o=i(26535);t.exports=function(t,e,i,a,h,l){var u=s(t,e-a,i-a,2*a,2*a,h,l);if(0===u.length)return u;for(var c=new n(e,i,a),d=new n,p=[],f=0;f{t.exports=function(t,e,i,s,n,r,o){void 0===r&&(r=!0),void 0===o&&(o=!1);var a=[],h=[],l=t.treeMinMax;if(l.minX=e,l.minY=i,l.maxX=e+s,l.maxY=i+n,o&&(h=t.staticTree.search(l)),r&&t.useTree)a=t.tree.search(l);else if(r){var u=t.bodies,c={position:{x:e,y:i},left:e,top:i,right:e+s,bottom:i+n,isCircle:!1},d=t.intersects;u.iterate((function(t){d(t,c)&&a.push(t)}))}return h.concat(a)}},57527:t=>{var e={setPushable:function(t){return void 0===t&&(t=!0),this.body.pushable=t,this}};t.exports=e},77687:t=>{t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setBodySize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},66536:t=>{t.exports={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}}},7864:(t,e,i)=>{t.exports={Acceleration:i(5321),Angular:i(29257),Bounce:i(62122),Debug:i(99803),Drag:i(87145),Enable:i(96174),Friction:i(51702),Gravity:i(25578),Immovable:i(72029),Mass:i(34566),OverlapCirc:i(2732),OverlapRect:i(15147),Pushable:i(57527),Size:i(77687),Velocity:i(66536)}},47401:t=>{t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},22346:t=>{t.exports="collide"},95092:t=>{t.exports="overlap"},15775:t=>{t.exports="pause"},74142:t=>{t.exports="resume"},22825:t=>{t.exports="tilecollide"},10851:t=>{t.exports="tileoverlap"},7543:t=>{t.exports="worldbounds"},1487:t=>{t.exports="worldstep"},27037:(t,e,i)=>{t.exports={COLLIDE:i(22346),OVERLAP:i(95092),PAUSE:i(15775),RESUME:i(74142),TILE_COLLIDE:i(22825),TILE_OVERLAP:i(10851),WORLD_BOUNDS:i(7543),WORLD_STEP:i(1487)}},39977:(t,e,i)=>{var s=i(47401),n=i(98611),r={ArcadePhysics:i(66150),Body:i(97602),Collider:i(3909),Components:i(7864),Events:i(27037),Factory:i(99523),GetOverlapX:i(75671),GetOverlapY:i(66185),SeparateX:i(61777),SeparateY:i(25299),Group:i(10481),Image:i(62832),Sprite:i(25084),StaticBody:i(66634),StaticGroup:i(46346),Tilemap:i(8413),World:i(85233)};r=n(!1,r,s),t.exports=r},25163:t=>{t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},98209:t=>{t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):e>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,t.updateCenter(),0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},72792:t=>{t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):e>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,t.updateCenter(),0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},27354:(t,e,i)=>{var s=i(14405),n=i(52926),r=i(28808);t.exports=function(t,e,i,o,a,h,l){var u=o.left,c=o.top,d=o.right,p=o.bottom,f=i.faceLeft||i.faceRight,v=i.faceTop||i.faceBottom;if(l||(f=!0,v=!0),!f&&!v)return!1;var g=0,m=0,y=0,x=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX(){var s=i(98209);t.exports=function(t,e,i,n,r,o){var a=0,h=e.faceLeft,l=e.faceRight,u=e.collideLeft,c=e.collideRight;return o||(h=!0,l=!0,u=!0,c=!0),t.deltaX()<0&&c&&t.checkCollision.left?l&&t.x0&&u&&t.checkCollision.right&&h&&t.right>i&&(a=t.right-i)>r&&(a=0),0!==a&&(t.customSeparateX?t.overlapX=a:s(t,a)),a}},52926:(t,e,i)=>{var s=i(72792);t.exports=function(t,e,i,n,r,o){var a=0,h=e.faceTop,l=e.faceBottom,u=e.collideUp,c=e.collideDown;return o||(h=!0,l=!0,u=!0,c=!0),t.deltaY()<0&&c&&t.checkCollision.up?l&&t.y0&&u&&t.checkCollision.down&&h&&t.bottom>i&&(a=t.bottom-i)>r&&(a=0),0!==a&&(t.customSeparateY?t.overlapY=a:s(t,a)),a}},28808:t=>{t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},8413:(t,e,i)=>{var s={ProcessTileCallbacks:i(25163),ProcessTileSeparationX:i(98209),ProcessTileSeparationY:i(72792),SeparateTile:i(27354),TileCheckX:i(14405),TileCheckY:i(52926),TileIntersectsBody:i(28808)};t.exports=s},53954:(t,e,i)=>{t.exports={Arcade:i(39977),Matter:i(45949)}},63568:(t,e,i)=>{var s=i(56694),n=i(93736),r=new s({initialize:function(){this.boundsCenter=new n,this.centerDiff=new n},parseBody:function(t){if(!(t=t.hasOwnProperty("body")?t.body:t).hasOwnProperty("bounds")||!t.hasOwnProperty("centerOfMass"))return!1;var e=this.boundsCenter,i=this.centerDiff,s=t.bounds.max.x-t.bounds.min.x,n=t.bounds.max.y-t.bounds.min.y,r=s*t.centerOfMass.x,o=n*t.centerOfMass.y;return e.set(s/2,n/2),i.set(r-e.x,o-e.y),!0},getTopLeft:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e+s.x+r.x,i+s.y+r.y)}return!1},getTopCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e+r.x,i+s.y+r.y)}return!1},getTopRight:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e-(s.x-r.x),i+s.y+r.y)}return!1},getLeftCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e+s.x+r.x,i+r.y)}return!1},getCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.centerDiff;return new n(e+s.x,i+s.y)}return!1},getRightCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e-(s.x-r.x),i+r.y)}return!1},getBottomLeft:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e+s.x+r.x,i-(s.y-r.y))}return!1},getBottomCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e+r.x,i-(s.y-r.y))}return!1},getBottomRight:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e-(s.x-r.x),i-(s.y-r.y))}return!1}});t.exports=r},18171:(t,e,i)=>{var s=i(16929);s.Body=i(84125),s.Composite=i(11299),s.World=i(72005),s.Collision=i(63454),s.Detector=i(13657),s.Pairs=i(91327),s.Pair=i(70584),s.Query=i(13390),s.Resolver=i(44272),s.Constraint=i(52838),s.Common=i(68758),s.Engine=i(45775),s.Events=i(39073),s.Sleeping=i(22806),s.Plugin=i(84474),s.Bodies=i(68516),s.Composites=i(56643),s.Axes=i(50658),s.Bounds=i(84091),s.Svg=i(92765),s.Vector=i(10438),s.Vertices=i(39745),s.World.add=s.Composite.add,s.World.remove=s.Composite.remove,s.World.addComposite=s.Composite.addComposite,s.World.addBody=s.Composite.addBody,s.World.addConstraint=s.Composite.addConstraint,s.World.clear=s.Composite.clear,t.exports=s},72653:(t,e,i)=>{var s=i(68516),n=i(56694),r=i(56643),o=i(52838),a=i(92765),h=i(3860),l=i(7030),u=i(73658),c=i(84720),d=i(10998),p=i(72829),f=i(88596),v=i(39745),g=new n({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},rectangle:function(t,e,i,n,r){var o=s.rectangle(t,e,i,n,r);return this.world.add(o),o},trapezoid:function(t,e,i,n,r,o){var a=s.trapezoid(t,e,i,n,r,o);return this.world.add(a),a},circle:function(t,e,i,n,r){var o=s.circle(t,e,i,n,r);return this.world.add(o),o},polygon:function(t,e,i,n,r){var o=s.polygon(t,e,i,n,r);return this.world.add(o),o},fromVertices:function(t,e,i,n,r,o,a){"string"==typeof i&&(i=v.fromPath(i));var h=s.fromVertices(t,e,i,n,r,o,a);return this.world.add(h),h},fromPhysicsEditor:function(t,e,i,s,n){void 0===n&&(n=!0);var r=d.parseBody(t,e,i,s);return n&&!this.world.has(r)&&this.world.add(r),r},fromSVG:function(t,e,i,n,r,o){void 0===n&&(n=1),void 0===r&&(r={}),void 0===o&&(o=!0);for(var h=i.getElementsByTagName("path"),l=[],u=0;u{var s=i(74527),n=i(72632),r=i(93736);t.exports=function(t,e,i,o){void 0===i&&(i={}),void 0===o&&(o=!0);var a=e.x,h=e.y;if(e.body={temp:!0,position:{x:a,y:h}},[s.Bounce,s.Collision,s.Force,s.Friction,s.Gravity,s.Mass,s.Sensor,s.SetBody,s.Sleep,s.Static,s.Transform,s.Velocity].forEach((function(t){for(var i in t)(s=t[i]).get&&"function"==typeof s.get||s.set&&"function"==typeof s.set?Object.defineProperty(e,i,{get:t[i].get,set:t[i].set}):Object.defineProperty(e,i,{value:t[i]});var s})),e.world=t,e._tempVec2=new r(a,h),i.hasOwnProperty("type")&&"body"===i.type)e.setExistingBody(i,o);else{var l=n(i,"shape",null);l||(l="rectangle"),i.addToWorld=o,e.setBody(l,i)}return e}},7030:(t,e,i)=>{var s=i(56694),n=i(74527),r=i(89980),o=i(72632),a=i(1539),h=i(58210),l=i(93736),u=new s({Extends:a,Mixins:[n.Bounce,n.Collision,n.Force,n.Friction,n.Gravity,n.Mass,n.Sensor,n.SetBody,n.Sleep,n.Static,n.Transform,n.Velocity,h],initialize:function(t,e,i,s,n,a){r.call(this,t.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(s,n),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new l(e,i);var h=o(a,"shape",null);h?this.setBody(h,a):this.setRectangle(this.width,this.height,a),this.setPosition(e,i),this.initPipeline()}});t.exports=u},50583:(t,e,i)=>{var s=i(84093),n=i(50658),r=i(68516),o=i(84125),a=i(63568),h=i(84091),l=i(56694),u=i(63454),c=i(68758),d=i(11299),p=i(56643),f=i(52838),v=i(13657),g=i(53996),m=i(72653),y=i(72632),x=i(10850),T=i(1675),w=i(80391),b=i(16929),E=i(44097),S=i(30657),A=i(70584),C=i(91327),_=i(84474),M=i(91963),R=i(13390),P=i(44272),O=i(7599),L=i(92765),F=i(10438),D=i(39745),k=i(31468);c.setDecomp(i(81084));var I=new l({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=o,this.composite=d,this.collision=u,this.detector=v,this.pair=A,this.pairs=C,this.query=R,this.resolver=P,this.constraint=f,this.bodies=r,this.composites=p,this.axes=n,this.bounds=h,this.svg=L,this.vector=F,this.vertices=D,this.verts=D,this._tempVec2=F.create(),x(this.config,"plugins.collisionevents",!0)&&this.enableCollisionEventsPlugin(),x(this.config,"plugins.attractors",!1)&&this.enableAttractorPlugin(),x(this.config,"plugins.wrap",!1)&&this.enableWrapPlugin(),P._restingThresh=x(this.config,"restingThresh",4),P._restingThreshTangent=x(this.config,"restingThreshTangent",6),P._positionDampen=x(this.config,"positionDampen",.9),P._positionWarming=x(this.config,"positionWarming",.8),P._frictionNormalMultiplier=x(this.config,"frictionNormalMultiplier",5),t.sys.events.once(O.BOOT,this.boot,this),t.sys.events.on(O.START,this.start,this)},boot:function(){this.world=new k(this.scene,this.config),this.add=new m(this.world),this.bodyBounds=new a,this.systems.events.once(O.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new k(this.scene,this.config),this.add=new m(this.world));var t=this.systems.events;t.on(O.UPDATE,this.world.update,this.world),t.on(O.POST_UPDATE,this.world.postUpdate,this.world),t.once(O.SHUTDOWN,this.shutdown,this)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return S(y(e,"matter",{}),y(t,"matter",{}))},enableAttractorPlugin:function(){return _.register(T),_.use(b,T),this},enableWrapPlugin:function(){return _.register(E),_.use(b,E),this},enableCollisionEventsPlugin:function(){return _.register(w),_.use(b,w),this},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(t,e){this.world.step(t,e)},containsPoint:function(t,e,i){t=this.getMatterBodies(t);var s=F.create(e,i);return R.point(t,s).length>0},intersectPoint:function(t,e,i){i=this.getMatterBodies(i);var s=F.create(t,e),n=[];return R.point(i,s).forEach((function(t){-1===n.indexOf(t)&&n.push(t)})),n},intersectRect:function(t,e,i,s,n,r){void 0===n&&(n=!1),r=this.getMatterBodies(r);var o={min:{x:t,y:e},max:{x:t+i,y:e+s}},a=[];return R.region(r,o,n).forEach((function(t){-1===a.indexOf(t)&&a.push(t)})),a},intersectRay:function(t,e,i,s,n,r){void 0===n&&(n=1),r=this.getMatterBodies(r);for(var o=[],a=R.ray(r,F.create(t,e),F.create(i,s),n),h=0;h{var s=i(16569),n=i(56694),r=i(74527),o=i(89980),a=i(72632),h=i(58210),l=i(13747),u=i(93736),c=new n({Extends:l,Mixins:[r.Bounce,r.Collision,r.Force,r.Friction,r.Gravity,r.Mass,r.Sensor,r.SetBody,r.Sleep,r.Static,r.Transform,r.Velocity,h],initialize:function(t,e,i,n,r,h){o.call(this,t.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s(this),this.setTexture(n,r),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new u(e,i);var l=a(h,"shape",null);l?this.setBody(l,h):this.setRectangle(this.width,this.height,h),this.setPosition(e,i),this.initPipeline()}});t.exports=c},84720:(t,e,i)=>{var s=i(68516),n=i(84125),r=i(56694),o=i(74527),a=i(6659),h=i(72632),l=i(19256),u=i(39745),c=new r({Extends:a,Mixins:[o.Bounce,o.Collision,o.Friction,o.Gravity,o.Mass,o.Sensor,o.Sleep,o.Static],initialize:function(t,e,i){a.call(this),this.tile=e,this.world=t,e.physics.matterBody&&e.physics.matterBody.destroy(),e.physics.matterBody=this;var s=h(i,"body",null),n=h(i,"addToWorld",!0);if(s)this.setBody(s,n);else{var r=e.getCollisionGroup();h(r,"objects",[]).length>0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}},setFromTileRectangle:function(t){void 0===t&&(t={}),l(t,"isStatic")||(t.isStatic=!0),l(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,n=e.y+e.height/2,r=s.rectangle(i,n,e.width,e.height,t);return this.setBody(r,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),l(t,"isStatic")||(t.isStatic=!0),l(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,r=this.tile.getLeft(),o=this.tile.getTop(),a=this.tile.getCollisionGroup(),c=h(a,"objects",[]),d=[],p=0;p1&&(t.parts=d,this.setBody(n.create(t),t.addToWorld)),this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0,this.removeAllListeners()}});t.exports=c},10998:(t,e,i)=>{var s=i(68516),n=i(84125),r=i(68758),o=i(72632),a=i(39745),h={parseBody:function(t,e,i,s){void 0===s&&(s={});for(var a=o(i,"fixtures",[]),h=[],l=0;l{var s=i(68516),n=i(84125),r={parseBody:function(t,e,i,r){var o;void 0===r&&(r={});var a=i.vertices;if(1===a.length)r.vertices=a[0],o=n.create(r),s.flagCoincidentParts(o.parts);else{for(var h=[],l=0;l{var s=i(84091),n=i(56694),r=i(11299),o=i(52838),a=i(13657),h=i(35416),l=i(33963),u=i(30657),c=i(22806),d=i(93736),p=i(39745),f=new n({initialize:function(t,e,i){void 0===i&&(i={});this.scene=t,this.world=e,this.camera=null,this.pointer=null,this.active=!0,this.position=new d,this.body=null,this.part=null,this.constraint=o.create(u(i,{label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}})),this.world.on(h.BEFORE_UPDATE,this.update,this),t.sys.input.on(l.POINTER_DOWN,this.onDown,this),t.sys.input.on(l.POINTER_UP,this.onUp,this)},onDown:function(t){this.pointer||(this.pointer=t,this.camera=t.camera)},onUp:function(t){t===this.pointer&&(this.pointer=null)},getBody:function(t){var e=this.position,i=this.constraint;this.camera.getWorldPoint(t.x,t.y,e);for(var n=r.allBodies(this.world.localWorld),o=0;o1?1:0;n{var s=i(68516),n=i(84125),r=i(56694),o=i(68758),a=i(11299),h=i(45775),l=i(6659),u=i(35416),c=i(72632),d=i(10850),p=i(84125),f=i(39073),v=i(84720),g=i(72005),m=i(10438),y=new r({Extends:l,initialize:function(t,e){l.call(this),this.scene=t,this.engine=h.create(e),this.localWorld=this.engine.world;var i=d(e,"gravity",null);i?this.setGravity(i.x,i.y,i.scale):!1===i&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=d(e,"enabled",!0),this.correction=d(e,"correction",1),this.getDelta=d(e,"getDelta",this.update60Hz);var s=c(e,"runner",{}),n=c(s,"fps",!1),r=c(s,"fps",60),o=c(s,"delta",1e3/r),a=c(s,"deltaMin",1e3/r),u=c(s,"deltaMax",1e3/(.5*r));n||(r=1e3/o),this.runner={fps:r,correction:c(s,"correction",1),deltaSampleSize:c(s,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:c(s,"isFixed",!1),delta:o,deltaMin:a,deltaMax:u},this.autoUpdate=d(e,"autoUpdate",!0);var p=d(e,"debug",!1);if(this.drawDebug="object"==typeof p||p,this.debugGraphic,this.debugConfig={showAxes:c(p,"showAxes",!1),showAngleIndicator:c(p,"showAngleIndicator",!1),angleColor:c(p,"angleColor",15208787),showBroadphase:c(p,"showBroadphase",!1),broadphaseColor:c(p,"broadphaseColor",16757760),showBounds:c(p,"showBounds",!1),boundsColor:c(p,"boundsColor",16777215),showVelocity:c(p,"showVelocity",!1),velocityColor:c(p,"velocityColor",44783),showCollisions:c(p,"showCollisions",!1),collisionColor:c(p,"collisionColor",16094476),showSeparations:c(p,"showSeparations",!1),separationColor:c(p,"separationColor",16753920),showBody:c(p,"showBody",!0),showStaticBody:c(p,"showStaticBody",!0),showInternalEdges:c(p,"showInternalEdges",!1),renderFill:c(p,"renderFill",!1),renderLine:c(p,"renderLine",!0),fillColor:c(p,"fillColor",1075465),fillOpacity:c(p,"fillOpacity",1),lineColor:c(p,"lineColor",2678297),lineOpacity:c(p,"lineOpacity",1),lineThickness:c(p,"lineThickness",1),staticFillColor:c(p,"staticFillColor",857979),staticLineColor:c(p,"staticLineColor",1255396),showSleeping:c(p,"showSleeping",!1),staticBodySleepOpacity:c(p,"staticBodySleepOpacity",.7),sleepFillColor:c(p,"sleepFillColor",4605510),sleepLineColor:c(p,"sleepLineColor",10066585),showSensors:c(p,"showSensors",!0),sensorFillColor:c(p,"sensorFillColor",857979),sensorLineColor:c(p,"sensorLineColor",1255396),showPositions:c(p,"showPositions",!0),positionSize:c(p,"positionSize",4),positionColor:c(p,"positionColor",14697178),showJoint:c(p,"showJoint",!0),jointColor:c(p,"jointColor",14737474),jointLineOpacity:c(p,"jointLineOpacity",1),jointLineThickness:c(p,"jointLineThickness",2),pinSize:c(p,"pinSize",4),pinColor:c(p,"pinColor",4382944),springColor:c(p,"springColor",14697184),anchorColor:c(p,"anchorColor",15724527),anchorSize:c(p,"anchorSize",4),showConvexHulls:c(p,"showConvexHulls",!1),hullColor:c(p,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),c(e,"setBounds",!1)){var f=e.setBounds;if("boolean"==typeof f)this.setBounds();else{var v=c(f,"x",0),g=c(f,"y",0),m=c(f,"width",t.sys.scale.width),y=c(f,"height",t.sys.scale.height),x=c(f,"thickness",64),T=c(f,"left",!0),w=c(f,"right",!0),b=c(f,"top",!0),E=c(f,"bottom",!0);this.setBounds(v,g,m,y,x,T,w,b,E)}}},setCompositeRenderStyle:function(t){var e,i,s,n=t.bodies,r=t.constraints,o=t.composites;for(e=0;e0&&(i=n[0].bodyA,s=n[0].bodyB),t.emit(u.COLLISION_START,e,i,s)})),f.on(e,"collisionActive",(function(e){var i,s,n=e.pairs;n.length>0&&(i=n[0].bodyA,s=n[0].bodyB),t.emit(u.COLLISION_ACTIVE,e,i,s)})),f.on(e,"collisionEnd",(function(e){var i,s,n=e.pairs;n.length>0&&(i=n[0].bodyA,s=n[0].bodyB),t.emit(u.COLLISION_END,e,i,s)}))},setBounds:function(t,e,i,s,n,r,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===s&&(s=this.scene.sys.scale.height),void 0===n&&(n=64),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-n,e-n,n,s+2*n),this.updateWall(o,"right",t+i,e-n,n,s+2*n),this.updateWall(a,"top",t,e-n,i,n),this.updateWall(h,"bottom",t,e+s,i,n),this},updateWall:function(t,e,i,s,n,r){var o=this.walls[e];t?(o&&g.remove(this.localWorld,o),i+=n/2,s+=r/2,this.walls[e]=this.create(i,s,n,r,{isStatic:!0,friction:0,frictionStatic:0})):(o&&g.remove(this.localWorld,o),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setDepth(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=1),this.localWorld.gravity.x=t,this.localWorld.gravity.y=e,void 0!==i&&(this.localWorld.gravity.scale=i),this},create:function(t,e,i,n,r){var o=s.rectangle(t,e,i,n,r);return g.add(this.localWorld,o),o},add:function(t){return g.add(this.localWorld,t),this},remove:function(t,e){Array.isArray(t)||(t=[t]);for(var i=0;is.deltaMax?s.deltaMax:e)/s.delta,s.delta=e),0!==s.timeScalePrev&&(r*=n.timeScale/s.timeScalePrev),0===n.timeScale&&(r=0),s.timeScalePrev=n.timeScale,s.correction=r,s.frameCounter+=1,t-s.counterTimestamp>=1e3&&(s.fps=s.frameCounter*((t-s.counterTimestamp)/1e3),s.counterTimestamp=t,s.frameCounter=0),h.update(i,e,r)}},step:function(t,e){h.update(this.engine,t,e)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(t){var e=t.hasOwnProperty("body")?t.body:t;return null!==a.get(this.localWorld,e.id,e.type)},getAllBodies:function(){return a.allBodies(this.localWorld)},getAllConstraints:function(){return a.allConstraints(this.localWorld)},getAllComposites:function(){return a.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var t=this.debugConfig,e=this.engine,i=this.debugGraphic,s=a.allBodies(this.localWorld);this.debugGraphic.clear(),t.showBroadphase&&e.broadphase.controller&&this.renderGrid(e.broadphase,i,t.broadphaseColor,.5),t.showBounds&&this.renderBodyBounds(s,i,t.boundsColor,.5),(t.showBody||t.showStaticBody)&&this.renderBodies(s),t.showJoint&&this.renderJoints(),(t.showAxes||t.showAngleIndicator)&&this.renderBodyAxes(s,i,t.showAxes,t.angleColor,.5),t.showVelocity&&this.renderBodyVelocity(s,i,t.velocityColor,1,2),t.showSeparations&&this.renderSeparations(e.pairs.list,i,t.separationColor),t.showCollisions&&this.renderCollisions(e.pairs.list,i,t.collisionColor)}},renderGrid:function(t,e,i,s){e.lineStyle(1,i,s);for(var n=o.keys(t.buckets),r=0;r0){var l=h[0].vertex.x,u=h[0].vertex.y;2===h.length&&(l=(h[0].vertex.x+h[1].vertex.x)/2,u=(h[0].vertex.y+h[1].vertex.y)/2),a.bodyB===a.supports[0].body||a.bodyA.isStatic?e.lineBetween(l-8*a.normal.x,u-8*a.normal.y,l,u):e.lineBetween(l+8*a.normal.x,u+8*a.normal.y,l,u)}}return this},renderBodyBounds:function(t,e,i,s){e.lineStyle(1,i,s);for(var n=0;n1?1:0;h1?1:0;a1?1:0;a1&&this.renderConvexHull(v,e,p,y)}}},renderBody:function(t,e,i,s,n,r,o,a){void 0===s&&(s=null),void 0===n&&(n=null),void 0===r&&(r=1),void 0===o&&(o=null),void 0===a&&(a=null);for(var h=this.debugConfig,l=h.sensorFillColor,u=h.sensorLineColor,c=t.parts,d=c.length,p=d>1?1:0;p1){var n=t.vertices;e.lineStyle(s,i),e.beginPath(),e.moveTo(n[0].x,n[0].y);for(var r=1;r0&&(e.fillStyle(a),e.fillCircle(u.x,u.y,h),e.fillCircle(c.x,c.y,h)),this},resetCollisionIDs:function(){return n._nextCollidingGroupId=1,n._nextNonCollidingGroupId=-1,n._nextCategory=1,this},shutdown:function(){f.off(this.engine),this.removeAllListeners(),g.clear(this.localWorld,!1),h.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});t.exports=y},95349:t=>{t.exports={setBounce:function(t){return this.body.restitution=t,this}}},70679:t=>{var e={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var e=0;if(Array.isArray(t))for(var i=0;i{var s=i(84125),n={applyForce:function(t){return this._tempVec2.set(this.body.position.x,this.body.position.y),s.applyForce(this.body,this._tempVec2,t),this},applyForceFrom:function(t,e){return s.applyForce(this.body,t,e),this},thrust:function(t){var e=this.body.angle;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),s.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(t){var e=this.body.angle-Math.PI/2;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),s.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(t){var e=this.body.angle+Math.PI/2;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),s.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(t){var e=this.body.angle-Math.PI;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),s.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};t.exports=n},74015:t=>{var e={setFriction:function(t,e,i){return this.body.friction=t,void 0!==e&&(this.body.frictionAir=e),void 0!==i&&(this.body.frictionStatic=i),this},setFrictionAir:function(t){return this.body.frictionAir=t,this},setFrictionStatic:function(t){return this.body.frictionStatic=t,this}};t.exports=e},11535:t=>{t.exports={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}}},74497:(t,e,i)=>{var s=i(84125),n=i(93736),r={setMass:function(t){return s.setMass(this.body,t),this},setDensity:function(t){return s.setDensity(this.body,t),this},centerOfMass:{get:function(){return new n(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};t.exports=r},75529:t=>{t.exports={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}}},64024:(t,e,i)=>{var s=i(68516),n=i(84125),r=i(88456),o=i(72632),a=i(10998),h=i(72829),l=i(39745),u={setRectangle:function(t,e,i){return this.setBody({type:"rectangle",width:t,height:e},i)},setCircle:function(t,e){return this.setBody({type:"circle",radius:t},e)},setPolygon:function(t,e,i){return this.setBody({type:"polygon",sides:e,radius:t},i)},setTrapezoid:function(t,e,i,s){return this.setBody({type:"trapezoid",width:t,height:e,slope:i},s)},setExistingBody:function(t,e){void 0===e&&(e=!0),this.body&&this.world.remove(this.body,!0),this.body=t;for(var i=0;i{var s=i(35416),n=i(22806),r=i(39073),o={setToSleep:function(){return n.set(this.body,!0),this},setAwake:function(){return n.set(this.body,!1),this},setSleepThreshold:function(t){return void 0===t&&(t=60),this.body.sleepThreshold=t,this},setSleepEvents:function(t,e){return this.setSleepStartEvent(t),this.setSleepEndEvent(e),this},setSleepStartEvent:function(t){if(t){var e=this.world;r.on(this.body,"sleepStart",(function(t){e.emit(s.SLEEP_START,t,this)}))}else r.off(this.body,"sleepStart");return this},setSleepEndEvent:function(t){if(t){var e=this.world;r.on(this.body,"sleepEnd",(function(t){e.emit(s.SLEEP_END,t,this)}))}else r.off(this.body,"sleepEnd");return this}};t.exports=o},82884:(t,e,i)=>{var s=i(84125),n={setStatic:function(t){return s.setStatic(this.body,t),this},isStatic:function(){return this.body.isStatic}};t.exports=n},4753:(t,e,i)=>{var s=i(84125),n=i(83392),r=i(35786),o=i(62138),a={x:{get:function(){return this.body.position.x},set:function(t){this._tempVec2.set(t,this.y),s.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(t){this._tempVec2.set(this.x,t),s.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(t){var e=1/this._scaleX,i=1/this._scaleY;this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4,s.scale(this.body,e,i),s.scale(this.body,t,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(t){var e=1/this._scaleX,i=1/this._scaleY;this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4,s.scale(this.body,e,i),s.scale(this.body,this._scaleX,t)}},angle:{get:function(){return o(this.body.angle*n.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(t){this._rotation=r(t),s.setAngle(this.body,this._rotation)}},setPosition:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this._tempVec2.set(t,e),s.setPosition(this.body,this._tempVec2),this},setRotation:function(t){return void 0===t&&(t=0),this._rotation=r(t),s.setAngle(this.body,t),this},setFixedRotation:function(){return s.setInertia(this.body,1/0),this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,s.setAngle(this.body,this.rotation),this},setScale:function(t,e,i){void 0===t&&(t=1),void 0===e&&(e=t);var n=1/this._scaleX,r=1/this._scaleY;return this._scaleX=t,this._scaleY=e,s.scale(this.body,n,r,i),s.scale(this.body,t,e,i),this}};t.exports=a},37268:(t,e,i)=>{var s=i(84125),n={setAngularVelocity:function(t){return s.setAngularVelocity(this.body,t),this},setVelocityX:function(t){return this._tempVec2.set(t,this.body.velocity.y),s.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(t){return this._tempVec2.set(this.body.velocity.x,t),s.setVelocity(this.body,this._tempVec2),this},setVelocity:function(t,e){return this._tempVec2.set(t,e),s.setVelocity(this.body,this._tempVec2),this}};t.exports=n},74527:(t,e,i)=>{t.exports={Bounce:i(95349),Collision:i(70679),Force:i(77178),Friction:i(74015),Gravity:i(11535),Mass:i(74497),Sensor:i(75529),SetBody:i(64024),Sleep:i(25106),Static:i(82884),Transform:i(4753),Velocity:i(37268)}},63201:t=>{t.exports="afteradd"},30474:t=>{t.exports="afterremove"},44822:t=>{t.exports="afterupdate"},88820:t=>{t.exports="beforeadd"},94849:t=>{t.exports="beforeremove"},6391:t=>{t.exports="beforeupdate"},96738:t=>{t.exports="collisionactive"},7916:t=>{t.exports="collisionend"},59529:t=>{t.exports="collisionstart"},10219:t=>{t.exports="dragend"},183:t=>{t.exports="drag"},39143:t=>{t.exports="dragstart"},16483:t=>{t.exports="pause"},35806:t=>{t.exports="resume"},22106:t=>{t.exports="sleepend"},5803:t=>{t.exports="sleepstart"},35416:(t,e,i)=>{t.exports={AFTER_ADD:i(63201),AFTER_REMOVE:i(30474),AFTER_UPDATE:i(44822),BEFORE_ADD:i(88820),BEFORE_REMOVE:i(94849),BEFORE_UPDATE:i(6391),COLLISION_ACTIVE:i(96738),COLLISION_END:i(7916),COLLISION_START:i(59529),DRAG_END:i(10219),DRAG:i(183),DRAG_START:i(39143),PAUSE:i(16483),RESUME:i(35806),SLEEP_END:i(22106),SLEEP_START:i(5803)}},45949:(t,e,i)=>{t.exports={BodyBounds:i(63568),Components:i(74527),Events:i(35416),Factory:i(72653),MatterGameObject:i(3860),Image:i(7030),Matter:i(18171),MatterPhysics:i(50583),PolyDecomp:i(81084),Sprite:i(73658),TileBody:i(84720),PhysicsEditorParser:i(10998),PhysicsJSONParser:i(72829),PointerConstraint:i(88596),World:i(31468)}},84125:(t,e,i)=>{var s={};t.exports=s;var n=i(39745),r=i(10438),o=i(22806),a=i(68758),h=i(84091),l=i(50658);!function(){s._inertiaScale=4,s._nextCollidingGroupId=1,s._nextNonCollidingGroupId=-1,s._nextCategory=1,s.create=function(e){var i={id:a.nextId(),type:"body",label:"Body",parts:[],plugin:{},angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!e.hasOwnProperty("position")&&e.hasOwnProperty("vertices")?e.position=n.centre(e.vertices):e.hasOwnProperty("vertices")||(i.vertices=n.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var s=a.extend(i,e);return t(s,e),s.setOnCollideWith=function(t,e){return e?this.onCollideWith[t.id]=e:delete this.onCollideWith[t.id],this},s},s.nextGroup=function(t){return t?s._nextNonCollidingGroupId--:s._nextCollidingGroupId++},s.nextCategory=function(){return s._nextCategory=s._nextCategory<<1,s._nextCategory};var t=function(t,e){e=e||{},s.set(t,{bounds:t.bounds||h.create(t.vertices),positionPrev:t.positionPrev||r.clone(t.position),anglePrev:t.anglePrev||t.angle,vertices:t.vertices,parts:t.parts||[t],isStatic:t.isStatic,isSleeping:t.isSleeping,parent:t.parent||t});var i=t.bounds;if(n.rotate(t.vertices,t.angle,t.position),l.rotate(t.axes,t.angle),h.update(i,t.vertices,t.velocity),s.set(t,{axes:e.axes||t.axes,area:e.area||t.area,mass:e.mass||t.mass,inertia:e.inertia||t.inertia}),1===t.parts.length){var o=t.centerOfMass,a=t.centerOffset,u=i.max.x-i.min.x,c=i.max.y-i.min.y;o.x=-(i.min.x-t.position.x)/u,o.y=-(i.min.y-t.position.y)/c,a.x=u*o.x,a.y=c*o.y}};s.set=function(t,e,i){var n;for(n in"string"==typeof e&&(n=e,(e={})[n]=i),e)if(Object.prototype.hasOwnProperty.call(e,n))switch(i=e[n],n){case"isStatic":s.setStatic(t,i);break;case"isSleeping":o.set(t,i);break;case"mass":s.setMass(t,i);break;case"density":s.setDensity(t,i);break;case"inertia":s.setInertia(t,i);break;case"vertices":s.setVertices(t,i);break;case"position":s.setPosition(t,i);break;case"angle":s.setAngle(t,i);break;case"velocity":s.setVelocity(t,i);break;case"angularVelocity":s.setAngularVelocity(t,i);break;case"parts":s.setParts(t,i);break;case"centre":s.setCentre(t,i);break;default:t[n]=i}},s.setStatic=function(t,e){for(var i=0;i0&&r.rotateAbout(o.position,i,t.position,o.position)}},s.setVelocity=function(t,e){t.positionPrev.x=t.position.x-e.x,t.positionPrev.y=t.position.y-e.y,t.velocity.x=e.x,t.velocity.y=e.y,t.speed=r.magnitude(t.velocity)},s.setAngularVelocity=function(t,e){t.anglePrev=t.angle-e,t.angularVelocity=e,t.angularSpeed=Math.abs(t.angularVelocity)},s.translate=function(t,e){s.setPosition(t,r.add(t.position,e))},s.rotate=function(t,e,i){if(i){var n=Math.cos(e),r=Math.sin(e),o=t.position.x-i.x,a=t.position.y-i.y;s.setPosition(t,{x:i.x+(o*n-a*r),y:i.y+(o*r+a*n)}),s.setAngle(t,t.angle+e)}else s.setAngle(t,t.angle+e)},s.scale=function(t,e,i,r){var o=0,a=0;r=r||t.position;for(var u=0;u0&&(o+=c.area,a+=c.inertia),c.position.x=r.x+(c.position.x-r.x)*e,c.position.y=r.y+(c.position.y-r.y)*i,h.update(c.bounds,c.vertices,t.velocity)}t.parts.length>1&&(t.area=o,t.isStatic||(s.setMass(t,t.density*o),s.setInertia(t,a))),t.circleRadius&&(e===i?t.circleRadius*=e:t.circleRadius=null)},s.update=function(t,e,i,s){var o=Math.pow(e*i*t.timeScale,2),a=1-t.frictionAir*i*t.timeScale,u=t.position.x-t.positionPrev.x,c=t.position.y-t.positionPrev.y;t.velocity.x=u*a*s+t.force.x/t.mass*o,t.velocity.y=c*a*s+t.force.y/t.mass*o,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.position.x+=t.velocity.x,t.position.y+=t.velocity.y,t.angularVelocity=(t.angle-t.anglePrev)*a*s+t.torque/t.inertia*o,t.anglePrev=t.angle,t.angle+=t.angularVelocity,t.speed=r.magnitude(t.velocity),t.angularSpeed=Math.abs(t.angularVelocity);for(var d=0;d0&&(p.position.x+=t.velocity.x,p.position.y+=t.velocity.y),0!==t.angularVelocity&&(n.rotate(p.vertices,t.angularVelocity,t.position),l.rotate(p.axes,t.angularVelocity),d>0&&r.rotateAbout(p.position,t.angularVelocity,t.position,p.position)),h.update(p.bounds,p.vertices,t.velocity)}},s.applyForce=function(t,e,i){t.force.x+=i.x,t.force.y+=i.y;var s=e.x-t.position.x,n=e.y-t.position.y;t.torque+=s*i.y-n*i.x},s._totalProperties=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;i{var s={};t.exports=s;var n=i(39073),r=i(68758),o=i(84091),a=i(84125);s.create=function(t){return r.extend({id:r.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},cache:{allBodies:null,allConstraints:null,allComposites:null}},t)},s.setModified=function(t,e,i,r){if(n.trigger(t,"compositeModified",t),t.isModified=e,e&&t.cache&&(t.cache.allBodies=null,t.cache.allConstraints=null,t.cache.allComposites=null),i&&t.parent&&s.setModified(t.parent,e,i,r),r)for(var o=0;o{var s={};t.exports=s;var n=i(11299);s.create=n.create,s.add=n.add,s.remove=n.remove,s.clear=n.clear,s.addComposite=n.addComposite,s.addBody=n.addBody,s.addConstraint=n.addConstraint},63454:(t,e,i)=>{var s={};t.exports=s;var n,r,o,a=i(39745),h=i(70584);n=[],r={overlap:0,axis:null},o={overlap:0,axis:null},s.create=function(t,e){return{pair:null,collided:!1,bodyA:t,bodyB:e,parentA:t.parent,parentB:e.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[]}},s.collides=function(t,e,i){if(s._overlapAxes(r,t.vertices,e.vertices,t.axes),r.overlap<=0)return null;if(s._overlapAxes(o,e.vertices,t.vertices,e.axes),o.overlap<=0)return null;var n,l,u=i&&i.table[h.id(t,e)];u?n=u.collision:((n=s.create(t,e)).collided=!0,n.bodyA=t.idS?S=a:aA?A=a:an?n=o:o{var e={};t.exports=e,e.create=function(t){return{vertex:t,normalImpulse:0,tangentImpulse:0}}},13657:(t,e,i)=>{var s={};t.exports=s;var n=i(68758),r=i(63454);s.create=function(t){return n.extend({bodies:[],pairs:null},t)},s.setBodies=function(t,e){t.bodies=e.slice(0)},s.clear=function(t){t.bodies=[]},s.collisions=function(t){var e,i,n=[],o=t.pairs,a=t.bodies,h=a.length,l=s.canCollide,u=r.collides;for(a.sort(s._compareBoundsX),e=0;ep)break;if(!(f<_.min.y||v>_.max.y)&&(!g||!x.isStatic&&!x.isSleeping)&&l(c.collisionFilter,x.collisionFilter)){var T=x.parts.length;if(y&&1===T)(A=u(c,x,o))&&n.push(A);else for(var w=T>1?1:0,b=m>1?1:0;b_.max.x||d.max.x<_.min.x||d.max.y<_.min.y||d.min.y>_.max.y||(A=u(E,C,o))&&n.push(A)}}}}return n},s.canCollide=function(t,e){return t.group===e.group&&0!==t.group?t.group>0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)},s._compareBoundsX=function(t,e){return t.bounds.min.x-e.bounds.min.x}},70584:(t,e,i)=>{var s={};t.exports=s;var n=i(17319);s.create=function(t,e){var i=t.bodyA,n=t.bodyB,r={id:s.id(i,n),bodyA:i,bodyB:n,collision:t,contacts:[],activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:i.isSensor||n.isSensor,timeCreated:e,timeUpdated:e,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return s.update(r,t,e),r},s.update=function(t,e,i){var s=t.contacts,r=e.supports,o=t.activeContacts,a=e.parentA,h=e.parentB,l=a.vertices.length;t.isActive=!0,t.timeUpdated=i,t.collision=e,t.separation=e.depth,t.inverseMass=a.inverseMass+h.inverseMass,t.friction=a.frictionh.frictionStatic?a.frictionStatic:h.frictionStatic,t.restitution=a.restitution>h.restitution?a.restitution:h.restitution,t.slop=a.slop>h.slop?a.slop:h.slop,e.pair=t,o.length=0;for(var u=0;u{var s={};t.exports=s;var n=i(70584),r=i(68758);s.create=function(t){return r.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},s.update=function(t,e,i){var s,r,o,a,h=t.list,l=h.length,u=t.table,c=e.length,d=t.collisionStart,p=t.collisionEnd,f=t.collisionActive;for(d.length=0,p.length=0,f.length=0,a=0;a{var s={};t.exports=s;var n=i(10438),r=i(63454),o=i(84091),a=i(68516),h=i(39745);s.collides=function(t,e){for(var i=[],s=e.length,n=t.bounds,a=r.collides,h=o.overlaps,l=0;l{var s={};t.exports=s;var n=i(39745),r=i(84091);s._restingThresh=4,s._restingThreshTangent=6,s._positionDampen=.9,s._positionWarming=.8,s._frictionNormalMultiplier=5,s.preSolvePosition=function(t){var e,i,s,n=t.length;for(e=0;ez||-Y>z?(n=Y>0?Y:-Y,(i=p.friction*(Y>0?1:-1)*a)<-n?i=-n:i>n&&(i=n)):(i=Y,n=c);var G=P*T-O*x,V=L*T-F*x,W=A/(C+v.inverseInertia*G*G+g.inverseInertia*V*V),H=(1+p.restitution)*N*W;if(i*=W,N*N>h&&N<0)M.normalImpulse=0;else{var j=M.normalImpulse;M.normalImpulse+=H,M.normalImpulse=Math.min(M.normalImpulse,0),H=M.normalImpulse-j}if(Y*Y>u)M.tangentImpulse=0;else{var q=M.tangentImpulse;M.tangentImpulse+=i,M.tangentImpulse<-n&&(M.tangentImpulse=-n),M.tangentImpulse>n&&(M.tangentImpulse=n),i=M.tangentImpulse-q}var K=x*H+w*i,Z=T*H+b*i;v.isStatic||v.isSleeping||(v.positionPrev.x+=K*v.inverseMass,v.positionPrev.y+=Z*v.inverseMass,v.anglePrev+=(P*Z-O*K)*v.inverseInertia),g.isStatic||g.isSleeping||(g.positionPrev.x-=K*g.inverseMass,g.positionPrev.y-=Z*g.inverseMass,g.anglePrev-=(L*Z-F*K)*g.inverseInertia)}}}}},52838:(t,e,i)=>{var s={};t.exports=s;var n=i(39745),r=i(10438),o=i(22806),a=i(84091),h=i(50658),l=i(68758);s._warming=.4,s._torqueDampen=1,s._minLength=1e-6,s.create=function(t){var e=t;e.bodyA&&!e.pointA&&(e.pointA={x:0,y:0}),e.bodyB&&!e.pointB&&(e.pointB={x:0,y:0});var i=e.bodyA?r.add(e.bodyA.position,e.pointA):e.pointA,s=e.bodyB?r.add(e.bodyB.position,e.pointB):e.pointB,n=r.magnitude(r.sub(i,s));e.length=void 0!==e.length?e.length:n,e.id=e.id||l.nextId(),e.label=e.label||"Constraint",e.type="constraint",e.stiffness=e.stiffness||(e.length>0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=l.extend(o,e.render),e},s.preSolveAll=function(t){for(var e=0;e0&&(c.position.x+=l.x,c.position.y+=l.y),0!==l.angle&&(n.rotate(c.vertices,l.angle,i.position),h.rotate(c.axes,l.angle),u>0&&r.rotateAbout(c.position,l.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}l.angle*=s._warming,l.x*=s._warming,l.y*=s._warming}}},s.pointAWorld=function(t){return{x:(t.bodyA?t.bodyA.position.x:0)+(t.pointA?t.pointA.x:0),y:(t.bodyA?t.bodyA.position.y:0)+(t.pointA?t.pointA.y:0)}},s.pointBWorld=function(t){return{x:(t.bodyB?t.bodyB.position.x:0)+(t.pointB?t.pointB.x:0),y:(t.bodyB?t.bodyB.position.y:0)+(t.pointB?t.pointB.y:0)}}},68758:(t,e,i)=>{var s={};t.exports=s,function(){s._nextId=0,s._seed=0,s._nowStartTime=+new Date,s._warnedOnce={},s._decomp=null,s.extend=function(t,e){var i,n;"boolean"==typeof e?(i=2,n=e):(i=1,n=!0);for(var r=i;r0;e--){var i=Math.floor(s.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t},s.choose=function(t){return t[Math.floor(s.random()*t.length)]},s.isElement=function(t){return"undefined"!=typeof HTMLElement?t instanceof HTMLElement:!!(t&&t.nodeType&&t.nodeName)},s.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},s.isFunction=function(t){return"function"==typeof t},s.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},s.isString=function(t){return"[object String]"===toString.call(t)},s.clamp=function(t,e,i){return ti?i:t},s.sign=function(t){return t<0?-1:1},s.now=function(){if("undefined"!=typeof window&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return Date.now?Date.now():new Date-s._nowStartTime},s.random=function(e,i){return i=void 0!==i?i:1,(e=void 0!==e?e:0)+t()*(i-e)};var t=function(){return s._seed=(9301*s._seed+49297)%233280,s._seed/233280};s.colorToNumber=function(t){return 3==(t=t.replace("#","")).length&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),parseInt(t,16)},s.logLevel=1,s.log=function(){console&&s.logLevel>0&&s.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},s.info=function(){console&&s.logLevel>0&&s.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},s.warn=function(){console&&s.logLevel>0&&s.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},s.warnOnce=function(){var t=Array.prototype.slice.call(arguments).join(" ");s._warnedOnce[t]||(s.warn(t),s._warnedOnce[t]=!0)},s.deprecated=function(t,e,i){t[e]=s.chain((function(){s.warnOnce("🔅 deprecated 🔅",i)}),t[e])},s.nextId=function(){return s._nextId++},s.indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var i=0;i{var s={};t.exports=s;var n=i(22806),r=i(44272),o=i(13657),a=i(91327),h=i(39073),l=i(11299),u=i(52838),c=i(68758),d=i(84125);s.create=function(t){t=t||{};var e=c.extend({positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},gravity:{x:0,y:1,scale:.001},timing:{timestamp:0,timeScale:1,lastDelta:0,lastElapsed:0}},t);return e.world=t.world||l.create({label:"World"}),e.pairs=t.pairs||a.create(),e.detector=t.detector||o.create(),e.grid={buckets:[]},e.world.gravity=e.gravity,e.broadphase=e.grid,e.metrics={},e},s.update=function(t,e,i){var d=c.now();e=e||1e3/60,i=i||1;var p,f=t.world,v=t.detector,g=t.pairs,m=t.timing,y=m.timestamp;m.timestamp+=e*m.timeScale,m.lastDelta=e*m.timeScale;var x={timestamp:m.timestamp};h.trigger(t,"beforeUpdate",x);var T=l.allBodies(f),w=l.allConstraints(f);for(f.isModified&&o.setBodies(v,T),f.isModified&&l.setModified(f,!1,!1,!0),t.enableSleeping&&n.update(T,m.timeScale),s._bodiesApplyGravity(T,t.gravity),s._bodiesUpdate(T,e,m.timeScale,i,f.bounds),u.preSolveAll(T),p=0;p0&&h.trigger(t,"collisionStart",{pairs:g.collisionStart}),r.preSolvePosition(g.list),p=0;p0&&h.trigger(t,"collisionActive",{pairs:g.collisionActive}),g.collisionEnd.length>0&&h.trigger(t,"collisionEnd",{pairs:g.collisionEnd}),s._bodiesClearForces(T),h.trigger(t,"afterUpdate",x),t.timing.lastElapsed=c.now()-d,t},s.merge=function(t,e){if(c.extend(t,e),e.world){t.world=e.world,s.clear(t);for(var i=l.allBodies(t.world),r=0;r{var s={};t.exports=s;var n=i(68758);s.on=function(t,e,i){for(var s,n=e.split(" "),r=0;r0){i||(i={}),s=e.split(" ");for(var l=0;l{var s={};t.exports=s;var n=i(84474),r=i(68758);s.name="matter-js",s.version="0.18.0",s.uses=[],s.used=[],s.use=function(){n.use(s,Array.prototype.slice.call(arguments))},s.before=function(t,e){return t=t.replace(/^Matter./,""),r.chainPathBefore(s,t,e)},s.after=function(t,e){return t=t.replace(/^Matter./,""),r.chainPathAfter(s,t,e)}},84474:(t,e,i)=>{var s={};t.exports=s;var n=i(68758);s._registry={},s.register=function(t){if(s.isPlugin(t)||n.warn("Plugin.register:",s.toString(t),"does not implement all required fields."),t.name in s._registry){var e=s._registry[t.name],i=s.versionParse(t.version).number,r=s.versionParse(e.version).number;i>r?(n.warn("Plugin.register:",s.toString(e),"was upgraded to",s.toString(t)),s._registry[t.name]=t):i-1},s.isFor=function(t,e){var i=t.for&&s.dependencyParse(t.for);return!t.for||e.name===i.name&&s.versionSatisfies(e.version,i.range)},s.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i=s.dependencies(t),r=n.topologicalSort(i),o=[],a=0;a0&&!h.silent&&n.info(o.join(" "))}else n.warn("Plugin.use:",s.toString(t),"does not specify any dependencies to install.")},s.dependencies=function(t,e){var i=s.dependencyParse(t),r=i.name;if(!(r in(e=e||{}))){t=s.resolve(t)||t,e[r]=n.map(t.uses||[],(function(e){s.isPlugin(e)&&s.register(e);var r=s.dependencyParse(e),o=s.resolve(e);return o&&!s.versionSatisfies(o.version,r.range)?(n.warn("Plugin.dependencies:",s.toString(o),"does not satisfy",s.toString(r),"used by",s.toString(i)+"."),o._warned=!0,t._warned=!0):o||(n.warn("Plugin.dependencies:",s.toString(e),"used by",s.toString(i),"could not be resolved."),t._warned=!0),r.name}));for(var o=0;o=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;e.test(t)||n.warn("Plugin.versionParse:",t,"is not a valid version or range.");var i=e.exec(t),s=Number(i[4]),r=Number(i[5]),o=Number(i[6]);return{isRange:Boolean(i[1]||i[2]),version:i[3],range:t,operator:i[1]||i[2]||"",major:s,minor:r,patch:o,parts:[s,r,o],prerelease:i[7],number:1e8*s+1e4*r+o}},s.versionSatisfies=function(t,e){e=e||"*";var i=s.versionParse(e),n=s.versionParse(t);if(i.isRange){if("*"===i.operator||"*"===t)return!0;if(">"===i.operator)return n.number>i.number;if(">="===i.operator)return n.number>=i.number;if("~"===i.operator)return n.major===i.major&&n.minor===i.minor&&n.patch>=i.patch;if("^"===i.operator)return i.major>0?n.major===i.major&&n.number>=i.number:i.minor>0?n.minor===i.minor&&n.patch>=i.patch:n.patch===i.patch}return t===e||"*"===t}},22806:(t,e,i)=>{var s={};t.exports=s;var n=i(39073);s._motionWakeThreshold=.18,s._motionSleepThreshold=.08,s._minBias=.9,s.update=function(t,e){for(var i=e*e*e,n=0;n0&&r.motion=r.sleepThreshold&&s.set(r,!0)):r.sleepCounter>0&&(r.sleepCounter-=1)}else s.set(r,!1)}},s.afterCollisions=function(t,e){for(var i=e*e*e,n=0;ns._motionWakeThreshold*i&&s.set(l,!1)}}}},s.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||n.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&n.trigger(t,"sleepEnd"))}},68516:(t,e,i)=>{var s={};t.exports=s;var n=i(39745),r=i(68758),o=i(84125),a=i(84091),h=i(10438);s.rectangle=function(t,e,i,s,a){a=a||{};var h={label:"Rectangle Body",position:{x:t,y:e},vertices:n.fromPath("L 0 0 L "+i+" 0 L "+i+" "+s+" L 0 "+s)};if(a.chamfer){var l=a.chamfer;h.vertices=n.chamfer(h.vertices,l.radius,l.quality,l.qualityMin,l.qualityMax),delete a.chamfer}return o.create(r.extend({},h,a))},s.trapezoid=function(t,e,i,s,a,h){h=h||{};var l,u=i*(a*=.5),c=u+(1-2*a)*i,d=c+u;l=a<.5?"L 0 0 L "+u+" "+-s+" L "+c+" "+-s+" L "+d+" 0":"L 0 0 L "+c+" "+-s+" L "+d+" 0";var p={label:"Trapezoid Body",position:{x:t,y:e},vertices:n.fromPath(l)};if(h.chamfer){var f=h.chamfer;p.vertices=n.chamfer(p.vertices,f.radius,f.quality,f.qualityMin,f.qualityMax),delete h.chamfer}return o.create(r.extend({},p,h))},s.circle=function(t,e,i,n,o){n=n||{};var a={label:"Circle Body",circleRadius:i};o=o||25;var h=Math.ceil(Math.max(10,Math.min(o,i)));return h%2==1&&(h+=1),s.polygon(t,e,h,i,r.extend({},a,n))},s.polygon=function(t,e,i,a,h){if(h=h||{},i<3)return s.circle(t,e,a,h);for(var l=2*Math.PI/i,u="",c=.5*l,d=0;d0&&n.area(b)1?(p=o.create(r.extend({parts:f.slice(0)},a)),o.setPosition(p,{x:t,y:e}),p):f[0]},s.flagCoincidentParts=function(t,e){void 0===e&&(e=5);for(var i=0;i{var s={};t.exports=s;var n=i(11299),r=i(52838),o=i(68758),a=i(84125),h=i(68516),l=o.deprecated;s.stack=function(t,e,i,s,r,o,h){for(var l,u=n.create({label:"Stack"}),c=t,d=e,p=0,f=0;fv&&(v=y),a.translate(m,{x:.5*x,y:.5*y}),c=m.bounds.max.x+r,n.addBody(u,m),l=m,p+=1}else c+=r}d+=v+o,c=t}return u},s.chain=function(t,e,i,s,a,h){for(var l=t.bodies,u=1;u0)for(l=0;l0&&(d=p[l-1+(h-1)*e],n.addConstraint(t,r.create(o.extend({bodyA:d,bodyB:c},a)))),s&&ld||o<(l=d-l)||o>i-1-l))return 1===c&&a.translate(u,{x:(o+(i%2==1?1:-1))*p,y:0}),h(t+(u?o*p:0)+o*r,s,o,l,u,c)}))},s.newtonsCradle=function(t,e,i,s,o){for(var a=n.create({label:"Newtons Cradle"}),l=0;l{var s={};t.exports=s;var n=i(10438),r=i(68758);s.fromVertices=function(t){for(var e={},i=0;i{var e={};t.exports=e,e.create=function(t){var i={min:{x:0,y:0},max:{x:0,y:0}};return t&&e.update(i,t),i},e.update=function(t,e,i){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var s=0;st.max.x&&(t.max.x=n.x),n.xt.max.y&&(t.max.y=n.y),n.y0?t.max.x+=i.x:t.min.x+=i.x,i.y>0?t.max.y+=i.y:t.min.y+=i.y)},e.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},e.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},e.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},e.shift=function(t,e){var i=t.max.x-t.min.x,s=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+s}},92765:(t,e,i)=>{var s={};t.exports=s;i(84091);var n=i(68758);s.pathToVertices=function(t,e){"undefined"==typeof window||"SVGPathSeg"in window||n.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var i,r,o,a,h,l,u,c,d,p,f,v=[],g=0,m=0,y=0;e=e||15;var x=function(t,e,i){var s=i%2==1&&i>1;if(!d||t!=d.x||e!=d.y){d&&s?(p=d.x,f=d.y):(p=0,f=0);var n={x:p+t,y:f+e};!s&&d||(d=n),v.push(n),m=p+t,y=f+e}},T=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":m=t.x,y=t.y;break;case"H":m=t.x;break;case"V":y=t.y}x(m,y,t.pathSegType)}};for(s._svgPathToAbsolute(t),o=t.getTotalLength(),l=[],i=0;i{var e={};t.exports=e,e.create=function(t,e){return{x:t||0,y:e||0}},e.clone=function(t){return{x:t.x,y:t.y}},e.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},e.rotate=function(t,e,i){var s=Math.cos(e),n=Math.sin(e);i||(i={});var r=t.x*s-t.y*n;return i.y=t.x*n+t.y*s,i.x=r,i},e.rotateAbout=function(t,e,i,s){var n=Math.cos(e),r=Math.sin(e);s||(s={});var o=i.x+((t.x-i.x)*n-(t.y-i.y)*r);return s.y=i.y+((t.x-i.x)*r+(t.y-i.y)*n),s.x=o,s},e.normalise=function(t){var i=e.magnitude(t);return 0===i?{x:0,y:0}:{x:t.x/i,y:t.y/i}},e.dot=function(t,e){return t.x*e.x+t.y*e.y},e.cross=function(t,e){return t.x*e.y-t.y*e.x},e.cross3=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x)},e.add=function(t,e,i){return i||(i={}),i.x=t.x+e.x,i.y=t.y+e.y,i},e.sub=function(t,e,i){return i||(i={}),i.x=t.x-e.x,i.y=t.y-e.y,i},e.mult=function(t,e){return{x:t.x*e,y:t.y*e}},e.div=function(t,e){return{x:t.x/e,y:t.y/e}},e.perp=function(t,e){return{x:(e=!0===e?-1:1)*-t.y,y:e*t.x}},e.neg=function(t){return{x:-t.x,y:-t.y}},e.angle=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},e._temp=[e.create(),e.create(),e.create(),e.create(),e.create(),e.create()]},39745:(t,e,i)=>{var s={};t.exports=s;var n=i(10438),r=i(68758);s.create=function(t,e){for(var i=[],s=0;s0)return!1;o=i}return!0},s.scale=function(t,e,i,r){if(1===e&&1===i)return t;var o,a;r=r||s.centre(t);for(var h=0;h=0?h-1:t.length-1],u=t[h],c=t[(h+1)%t.length],d=e[h0&&(r|=2),3===r)return!1;return 0!==r||null},s.hull=function(t){var e,i,s=[],r=[];for((t=t.slice(0)).sort((function(t,e){var i=t.x-e.x;return 0!==i?i:t.y-e.y})),i=0;i=2&&n.cross3(r[r.length-2],r[r.length-1],e)<=0;)r.pop();r.push(e)}for(i=t.length-1;i>=0;i-=1){for(e=t[i];s.length>=2&&n.cross3(s[s.length-2],s[s.length-1],e)<=0;)s.pop();s.push(e)}return s.pop(),r.pop(),s.concat(r)}},1675:(t,e,i)=>{var s=i(18171),n={name:"matter-attractors",version:"0.1.7",for:"matter-js@^0.18.0",silent:!0,install:function(t){t.after("Body.create",(function(){n.Body.init(this)})),t.before("Engine.update",(function(t){n.Engine.update(t)}))},Body:{init:function(t){t.plugin.attractors=t.plugin.attractors||[]}},Engine:{update:function(t){for(var e=s.Composite.allBodies(t.world),i=0;i0)for(var o=0;o{t.exports={name:"matter-collision-events",version:"0.1.6",for:"matter-js@^0.18.0",silent:!0,install:function(t){t.after("Engine.create",(function(){t.Events.on(this,"collisionStart",(function(e){e.pairs.map((function(e){var i=e.bodyA,s=e.bodyB;i.gameObject&&i.gameObject.emit("collide",i,s,e),s.gameObject&&s.gameObject.emit("collide",s,i,e),t.Events.trigger(i,"onCollide",{pair:e}),t.Events.trigger(s,"onCollide",{pair:e}),i.onCollideCallback&&i.onCollideCallback(e),s.onCollideCallback&&s.onCollideCallback(e),i.onCollideWith[s.id]&&i.onCollideWith[s.id](s,e),s.onCollideWith[i.id]&&s.onCollideWith[i.id](i,e)}))})),t.Events.on(this,"collisionActive",(function(e){e.pairs.map((function(e){var i=e.bodyA,s=e.bodyB;i.gameObject&&i.gameObject.emit("collideActive",i,s,e),s.gameObject&&s.gameObject.emit("collideActive",s,i,e),t.Events.trigger(i,"onCollideActive",{pair:e}),t.Events.trigger(s,"onCollideActive",{pair:e}),i.onCollideActiveCallback&&i.onCollideActiveCallback(e),s.onCollideActiveCallback&&s.onCollideActiveCallback(e)}))})),t.Events.on(this,"collisionEnd",(function(e){e.pairs.map((function(e){var i=e.bodyA,s=e.bodyB;i.gameObject&&i.gameObject.emit("collideEnd",i,s,e),s.gameObject&&s.gameObject.emit("collideEnd",s,i,e),t.Events.trigger(i,"onCollideEnd",{pair:e}),t.Events.trigger(s,"onCollideEnd",{pair:e}),i.onCollideEndCallback&&i.onCollideEndCallback(e),s.onCollideEndCallback&&s.onCollideEndCallback(e)}))}))}))}}},44097:(t,e,i)=>{var s=i(18171),n={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.18.0",silent:!0,install:function(t){t.after("Engine.update",(function(){n.Engine.update(this)}))},Engine:{update:function(t){for(var e=t.world,i=s.Composite.allBodies(e),r=s.Composite.allComposites(e),o=0;oe.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?s=e.min.y-t.max.y:t.max.y{function e(t,e,i){i=i||0;var s,n,r,o,a,h,l,u=[0,0];return s=t[1][1]-t[0][1],n=t[0][0]-t[1][0],r=s*t[0][0]+n*t[0][1],o=e[1][1]-e[0][1],a=e[0][0]-e[1][0],h=o*e[0][0]+a*e[0][1],E(l=s*a-o*n,0,i)||(u[0]=(a*r-n*h)/l,u[1]=(s*h-o*r)/l),u}function i(t,e,i,s){var n=e[0]-t[0],r=e[1]-t[1],o=s[0]-i[0],a=s[1]-i[1];if(o*r-a*n==0)return!1;var h=(n*(i[1]-t[1])+r*(t[0]-i[0]))/(o*r-a*n),l=(o*(t[1]-i[1])+a*(i[0]-t[0]))/(a*n-o*r);return h>=0&&h<=1&&l>=0&&l<=1}function s(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function n(t,e,i){return s(t,e,i)>0}function r(t,e,i){return s(t,e,i)>=0}function o(t,e,i){return s(t,e,i)<0}function a(t,e,i){return s(t,e,i)<=0}t.exports={decomp:function(t){var e=T(t);return e.length>0?w(t,e):[t]},quickDecomp:function t(e,i,s,h,l,u,v){u=u||100,v=v||0,l=l||25,i=void 0!==i?i:[],s=s||[],h=h||[];var g=[0,0],m=[0,0],x=[0,0],T=0,w=0,E=0,S=0,A=0,C=0,_=0,M=[],R=[],P=e,O=e;if(O.length<3)return i;if(++v>u)return console.warn("quickDecomp: max level ("+u+") reached."),i;for(var L=0;LA&&(A+=e.length),S=Number.MAX_VALUE,A3&&s>=0;--s)u(d(t,s-1),d(t,s),d(t,s+1),e)&&(t.splice(s%t.length,1),i++);return i},removeDuplicatePoints:function(t,e){for(var i=t.length-1;i>=1;--i)for(var s=t[i],n=i-1;n>=0;--n)S(s,t[n],e)&&t.splice(i,1)},makeCCW:function(t){for(var e=0,i=t,s=1;si[e][0])&&(e=s);return!n(d(t,e-1),d(t,e),d(t,e+1))&&(function(t){for(var e=[],i=t.length,s=0;s!==i;s++)e.push(t.pop());for(s=0;s!==i;s++)t[s]=e[s]}(t),!0)}};var h=[],l=[];function u(t,e,i,n){if(n){var r=h,o=l;r[0]=e[0]-t[0],r[1]=e[1]-t[1],o[0]=i[0]-e[0],o[1]=i[1]-e[1];var a=r[0]*o[0]+r[1]*o[1],u=Math.sqrt(r[0]*r[0]+r[1]*r[1]),c=Math.sqrt(o[0]*o[0]+o[1]*o[1]);return Math.acos(a/(u*c)){var s=new(i(56694))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=s},18360:t=>{t.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},91963:t=>{var e={},i={},s={register:function(t,i,s,n){void 0===n&&(n=!1),e[t]={plugin:i,mapping:s,custom:n}},registerCustom:function(t,e,s,n){i[t]={plugin:e,mapping:s,data:n}},hasCore:function(t){return e.hasOwnProperty(t)},hasCustom:function(t){return i.hasOwnProperty(t)},getCore:function(t){return e[t]},getCustom:function(t){return i[t]},getCustomClass:function(t){return i.hasOwnProperty(t)?i[t].plugin:null},remove:function(t){e.hasOwnProperty(t)&&delete e[t]},removeCustom:function(t){i.hasOwnProperty(t)&&delete i[t]},destroyCorePlugins:function(){for(var t in e)e.hasOwnProperty(t)&&delete e[t]},destroyCustomPlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]}};t.exports=s},49274:(t,e,i)=>{var s=i(56694),n=i(97081),r=i(6659),o=i(76846),a=i(99325),h=i(61286),l=i(72632),u=i(91963),c=i(66458),d=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],t.isBooted?this.boot():t.events.once(n.BOOT,this.boot,this)},boot:function(){var t,e,i,s,r,o,a,h=this.game.config,u=h.installGlobalPlugins;for(u=u.concat(this._pendingGlobal),t=0;t{var s=i(88257),n=i(56694),r=i(7599),o=new n({Extends:s,initialize:function(t,e,i){s.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,t.sys.events.once(r.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=o},45615:(t,e,i)=>{t.exports={BasePlugin:i(88257),DefaultPlugins:i(18360),PluginCache:i(91963),PluginManager:i(49274),ScenePlugin:i(39283)}},37823:()=>{Array.prototype.forEach||(Array.prototype.forEach=function(t){"use strict";if(null==this)throw new TypeError;var e=Object(this),i=e.length>>>0;if("function"!=typeof t)throw new TypeError;for(var s=arguments.length>=2?arguments[1]:void 0,n=0;n{Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)})},22782:()=>{!function(){function t(t){t&&(t.setTargetAtTime||(t.setTargetAtTime=t.setTargetValueAtTime))}window.hasOwnProperty("webkitAudioContext")&&!window.hasOwnProperty("AudioContext")&&(window.AudioContext=webkitAudioContext,AudioContext.prototype.hasOwnProperty("createGain")||(AudioContext.prototype.createGain=AudioContext.prototype.createGainNode),AudioContext.prototype.hasOwnProperty("createDelay")||(AudioContext.prototype.createDelay=AudioContext.prototype.createDelayNode),AudioContext.prototype.hasOwnProperty("createScriptProcessor")||(AudioContext.prototype.createScriptProcessor=AudioContext.prototype.createJavaScriptNode),AudioContext.prototype.hasOwnProperty("createPeriodicWave")||(AudioContext.prototype.createPeriodicWave=AudioContext.prototype.createWaveTable),AudioContext.prototype.internal_createGain=AudioContext.prototype.createGain,AudioContext.prototype.createGain=function(){var e=this.internal_createGain();return t(e.gain),e},AudioContext.prototype.internal_createDelay=AudioContext.prototype.createDelay,AudioContext.prototype.createDelay=function(e){var i=e?this.internal_createDelay(e):this.internal_createDelay();return t(i.delayTime),i},AudioContext.prototype.internal_createBufferSource=AudioContext.prototype.createBufferSource,AudioContext.prototype.createBufferSource=function(){var e=this.internal_createBufferSource();return e.start?(e.internal_start=e.start,e.start=function(t,i,s){void 0!==s?e.internal_start(t||0,i,s):e.internal_start(t||0,i||0)}):e.start=function(t,e,i){e||i?this.noteGrainOn(t||0,e,i):this.noteOn(t||0)},e.stop?(e.internal_stop=e.stop,e.stop=function(t){e.internal_stop(t||0)}):e.stop=function(t){this.noteOff(t||0)},t(e.playbackRate),e},AudioContext.prototype.internal_createDynamicsCompressor=AudioContext.prototype.createDynamicsCompressor,AudioContext.prototype.createDynamicsCompressor=function(){var e=this.internal_createDynamicsCompressor();return t(e.threshold),t(e.knee),t(e.ratio),t(e.reduction),t(e.attack),t(e.release),e},AudioContext.prototype.internal_createBiquadFilter=AudioContext.prototype.createBiquadFilter,AudioContext.prototype.createBiquadFilter=function(){var e=this.internal_createBiquadFilter();return t(e.frequency),t(e.detune),t(e.Q),t(e.gain),e},AudioContext.prototype.hasOwnProperty("createOscillator")&&(AudioContext.prototype.internal_createOscillator=AudioContext.prototype.createOscillator,AudioContext.prototype.createOscillator=function(){var e=this.internal_createOscillator();return e.start?(e.internal_start=e.start,e.start=function(t){e.internal_start(t||0)}):e.start=function(t){this.noteOn(t||0)},e.stop?(e.internal_stop=e.stop,e.stop=function(t){e.internal_stop(t||0)}):e.stop=function(t){this.noteOff(t||0)},e.setPeriodicWave||(e.setPeriodicWave=e.setWaveTable),t(e.frequency),t(e.detune),e})),window.hasOwnProperty("webkitOfflineAudioContext")&&!window.hasOwnProperty("OfflineAudioContext")&&(window.OfflineAudioContext=webkitOfflineAudioContext)}()},58909:()=>{Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)})},52273:()=>{if("function"!=typeof window.Uint32Array&&"object"!=typeof window.Uint32Array){var t=function(t){var e=new Array;window[t]=function(t){if("number"==typeof t){Array.call(this,t),this.length=t;for(var e=0;e{window.console||(window.console={},window.console.log=window.console.assert=function(){},window.console.warn=window.console.assert=function(){})},92244:(t,e,i)=>{i(37823),i(60680),i(22782),i(77844),i(58909),i(52108),i(77359),i(52273)},52108:()=>{!function(){if("performance"in window==!1&&(window.performance={}),Date.now=Date.now||function(){return(new Date).getTime()},"now"in window.performance==!1){var t=Date.now();performance.timing&&performance.timing.navigationStart&&(t=performance.timing.navigationStart),window.performance.now=function(){return Date.now()-t}}}()},77359:()=>{for(var t=Date.now(),e=["ms","moz","webkit","o"],i=0;i{t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},27394:t=>{t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},91135:(t,e,i)=>{var s=i(89787),n=i(61840),r=i(56694),o=i(86459),a=i(6659),h=i(81044),l=i(32834),u=i(40444),c=i(38203),d=i(69360),p=new r({Extends:a,initialize:function(t){a.call(this);var e=t.config;this.config={clearBeforeRender:e.clearBeforeRender,backgroundColor:e.backgroundColor,antialias:e.antialias,roundPixels:e.roundPixels},this.game=t,this.type=o.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=t.canvas;var i={alpha:t.config.transparent,desynchronized:t.config.desynchronized,willReadFrequently:!1};this.gameContext=e.context?e.context:this.gameCanvas.getContext("2d",i),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=l(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new d,this._tempMatrix2=new d,this._tempMatrix3=new d,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(c.READY,this.boot,this)},boot:function(){var t=this.game,e=t.scale.baseSize;this.width=e.width,this.height=e.height,this.isBooted=!0,t.scale.on(u.RESIZE,this.onResize,this),this.resize(e.width,e.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e,this.emit(h.RESIZE,t,e)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,s=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&(t.clearRect(0,0,i,s),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,s))),t.save(),this.drawCount=0,this.emit(h.PRE_RENDER)},render:function(t,e,i){var n=e.length;this.emit(h.RENDER,t,i);var r=i.x,o=i.y,a=i.width,l=i.height,u=i.renderToTexture?i.context:t.sys.context;u.save(),this.game.scene.customViewports&&(u.beginPath(),u.rect(r,o,a,l),u.clip()),i.emit(s.PRE_RENDER,i),this.currentContext=u;var c=i.mask;c&&c.preRenderCanvas(this,null,i._maskCamera),i.transparent||(u.fillStyle=i.backgroundColor.rgba,u.fillRect(r,o,a,l)),u.globalAlpha=i.alpha,u.globalCompositeOperation="source-over",this.drawCount+=n,i.renderToTexture&&i.emit(s.PRE_RENDER,i),i.matrix.copyToContext(u);for(var d=0;d=0?m=-(m+c):m<0&&(m=Math.abs(m)-c)),t.flipY&&(y>=0?y=-(y+d):y<0&&(y=Math.abs(y)-d))}var T=1,w=1;t.flipX&&(p||(m+=-e.realWidth+2*v),T=-1),t.flipY&&(p||(y+=-e.realHeight+2*g),w=-1);var b=t.x,E=t.y;i.roundPixels&&(b=Math.floor(b),E=Math.floor(E)),a.applyITRS(b,E,t.rotation,t.scaleX*T,t.scaleY*w),o.copyFrom(i.matrix),s?(o.multiplyWithOffset(s,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),a.e=b,a.f=E):(a.e-=i.scrollX*t.scrollFactorX,a.f-=i.scrollY*t.scrollFactorY),o.multiply(a),i.roundPixels&&(o.e=Math.round(o.e),o.f=Math.round(o.f)),r.save(),o.setToContext(r),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=n,r.imageSmoothingEnabled=!e.source.scaleMode,t.mask&&t.mask.preRenderCanvas(this,t,i),c>0&&d>0&&r.drawImage(e.source.image,l,u,c,d,m,y,c/f,d/f),t.mask&&t.mask.postRenderCanvas(this,t,i),r.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});t.exports=p},6046:(t,e,i)=>{t.exports={CanvasRenderer:i(91135),GetBlendModes:i(32834),SetTransform:i(49584)}},32834:(t,e,i)=>{var s=i(95723),n=i(98581);t.exports=function(){var t=[],e=n.supportNewBlendModes,i="source-over";return t[s.NORMAL]=i,t[s.ADD]="lighter",t[s.MULTIPLY]=e?"multiply":i,t[s.SCREEN]=e?"screen":i,t[s.OVERLAY]=e?"overlay":i,t[s.DARKEN]=e?"darken":i,t[s.LIGHTEN]=e?"lighten":i,t[s.COLOR_DODGE]=e?"color-dodge":i,t[s.COLOR_BURN]=e?"color-burn":i,t[s.HARD_LIGHT]=e?"hard-light":i,t[s.SOFT_LIGHT]=e?"soft-light":i,t[s.DIFFERENCE]=e?"difference":i,t[s.EXCLUSION]=e?"exclusion":i,t[s.HUE]=e?"hue":i,t[s.SATURATION]=e?"saturation":i,t[s.COLOR]=e?"color":i,t[s.LUMINOSITY]=e?"luminosity":i,t[s.ERASE]="destination-out",t[s.SOURCE_IN]="source-in",t[s.SOURCE_OUT]="source-out",t[s.SOURCE_ATOP]="source-atop",t[s.DESTINATION_OVER]="destination-over",t[s.DESTINATION_IN]="destination-in",t[s.DESTINATION_OUT]="destination-out",t[s.DESTINATION_ATOP]="destination-atop",t[s.LIGHTER]="lighter",t[s.COPY]="copy",t[s.XOR]="xor",t}},49584:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n,r){var o=n.alpha*i.alpha;if(o<=0)return!1;var a=s(i,n,r).calc;return e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=o,e.save(),a.setToContext(e),e.imageSmoothingEnabled=i.frame?!i.frame.source.scaleMode:t.antialias,!0}},70936:t=>{t.exports="postrender"},99298:t=>{t.exports="prerender"},7743:t=>{t.exports="render"},99519:t=>{t.exports="resize"},81044:(t,e,i)=>{t.exports={POST_RENDER:i(70936),PRE_RENDER:i(99298),RENDER:i(7743),RESIZE:i(99519)}},42069:(t,e,i)=>{t.exports={Canvas:i(6046),Events:i(81044),Snapshot:i(95528),WebGL:i(55478)}},61840:(t,e,i)=>{var s=i(61068),n=i(27119),r=i(72632);t.exports=function(t,e){var i=r(e,"callback"),o=r(e,"type","image/png"),a=r(e,"encoder",.92),h=Math.abs(Math.round(r(e,"x",0))),l=Math.abs(Math.round(r(e,"y",0))),u=Math.floor(r(e,"width",t.width)),c=Math.floor(r(e,"height",t.height));if(r(e,"getPixel",!1)){var d=t.getContext("2d").getImageData(h,l,1,1).data;i.call(null,new n(d[0],d[1],d[2],d[3]))}else if(0!==h||0!==l||u!==t.width||c!==t.height){var p=s.createWebGL(this,u,c),f=p.getContext("2d");u>0&&c>0&&f.drawImage(t,h,l,u,c,0,0,u,c);var v=new Image;v.onerror=function(){i.call(null),s.remove(p)},v.onload=function(){i.call(null,v),s.remove(p)},v.src=p.toDataURL(o,a)}else{var g=new Image;g.onerror=function(){i.call(null)},g.onload=function(){i.call(null,g)},g.src=t.toDataURL(o,a)}}},1217:(t,e,i)=>{var s=i(61068),n=i(27119),r=i(72632);t.exports=function(t,e){var i=t,o=r(e,"callback"),a=r(e,"type","image/png"),h=r(e,"encoder",.92),l=Math.abs(Math.round(r(e,"x",0))),u=Math.abs(Math.round(r(e,"y",0))),c=r(e,"getPixel",!1),d=r(e,"isFramebuffer",!1),p=d?r(e,"bufferWidth",1):i.drawingBufferWidth,f=d?r(e,"bufferHeight",1):i.drawingBufferHeight;if(c){var v=new Uint8Array(4),g=d?u:f-u;i.readPixels(l,g,1,1,i.RGBA,i.UNSIGNED_BYTE,v),o.call(null,new n(v[0],v[1],v[2],v[3]))}else{var m=Math.floor(r(e,"width",p)),y=Math.floor(r(e,"height",f)),x=m*y*4,T=new Uint8Array(x);i.readPixels(l,f-u-y,m,y,i.RGBA,i.UNSIGNED_BYTE,T);for(var w=s.createWebGL(this,m,y),b=w.getContext("2d",{willReadFrequently:!0}),E=b.getImageData(0,0,m,y),S=E.data,A=0;A{t.exports={Canvas:i(61840),WebGL:i(1217)}},35217:(t,e,i)=>{var s=i(56694),n=i(65641),r=i(33885),o=i(77290),a=i(72632),h=i(37410),l=i(82127),u=i(5583),c=i(66901),d=i(71264),p=i(77310),f=i(10919),v=i(21213),g=i(51212),m=i(60848),y=new s({initialize:function(t){this.game=t.game,this.renderer=t,this.classes=new r([[n.UTILITY_PIPELINE,m],[n.MULTI_PIPELINE,p],[n.BITMAPMASK_PIPELINE,u],[n.SINGLE_PIPELINE,g],[n.ROPE_PIPELINE,v],[n.LIGHT_PIPELINE,c],[n.POINTLIGHT_PIPELINE,f],[n.MOBILE_PIPELINE,d]]),this.postPipelineClasses=new r,this.pipelines=new r,this.default=null,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.MOBILE_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderTargets=[],this.maxDimension=0,this.frameInc=32,this.targetIndex=0},boot:function(t,e,i){var s=this.renderer,r=this.renderTargets;this.frameInc=Math.floor(a(t,"frameInc",32));for(var l,u,c=s.width,d=s.height,p=Math.min(c,d),f=Math.ceil(p/this.frameInc),v=1;v=0;i--){var s=e[i];s.active&&s.preBatch(t)}}},postBatch:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;i=0;i--){var s=e[i];s.active&&s.preBatch(t)}}},postBatchCamera:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;ithis.maxDimension)return this.targetIndex=e.length-3,e[this.targetIndex];var i=3*(l(t,this.frameInc,0,!0)-1);return this.targetIndex=i,e[i]},getSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+1]},getAltSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+2]},destroy:function(){this.flush(),this.classes.clear(),this.postPipelineClasses.clear(),this.pipelines.clear(),this.renderer=null,this.game=null,this.classes=null,this.postPipelineClasses=null,this.pipelines=null,this.default=null,this.current=null,this.previous=null}});t.exports=y},37410:(t,e,i)=>{var s=i(56694),n=i(81044),r=new s({initialize:function(t,e,i,s,n,r,o){void 0===s&&(s=1),void 0===n&&(n=0),void 0===r&&(r=!0),void 0===o&&(o=!1),this.renderer=t,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=s,this.minFilter=n,this.autoClear=r,this.autoResize=!1,this.resize(e,i),o&&this.setAutoResize(!0)},setAutoResize:function(t){return t&&!this.autoResize?(this.renderer.on(n.RESIZE,this.resize,this),this.autoResize=!0):!t&&this.autoResize&&(this.renderer.off(n.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(t,e){var i=t*this.scale,s=e*this.scale;if(i!==this.width||s!==this.height){var n=this.renderer;n.deleteFramebuffer(this.framebuffer),n.deleteTexture(this.texture),t*=this.scale,e*=this.scale,(t=Math.round(t))<=0&&(t=1),(e=Math.round(e))<=0&&(e=1),this.texture=n.createTextureFromSource(null,t,e,this.minFilter,!0),this.framebuffer=n.createFramebuffer(t,e,this.texture,!0),this.width=t,this.height=e}return this},bind:function(t,e,i){if(void 0===t&&(t=!1),t&&this.renderer.flush(),e&&i&&this.resize(e,i),this.renderer.pushFramebuffer(this.framebuffer,!1,!1,!1),t&&this.adjustViewport(),this.autoClear){var s=this.renderer.gl;s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT)}},adjustViewport:function(){var t=this.renderer.gl;t.viewport(0,0,this.width,this.height),t.disable(t.SCISSOR_TEST)},clear:function(){var t=this.renderer,e=t.gl;t.pushFramebuffer(this.framebuffer),e.disable(e.SCISSOR_TEST),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),t.popFramebuffer(),t.resetScissor()},unbind:function(t){void 0===t&&(t=!1);var e=this.renderer;return t&&e.flush(),e.popFramebuffer()},destroy:function(){var t=this.renderer;t.deleteFramebuffer(this.framebuffer),t.deleteTexture(this.texture),t.off(n.RESIZE,this.resize,this),this.renderer=null,this.framebuffer=null,this.texture=null}});t.exports=r},75512:t=>{t.exports={getTintFromFloats:function(t,e,i,s){return((255&(255*s|0))<<24|(255&(255*t|0))<<16|(255&(255*e|0))<<8|255&(255*i|0))>>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},checkShaderMax:function(t,e){var i=Math.min(16,t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS));return e&&-1!==e?Math.min(i,e):i},parseFragmentShaderMaxTextures:function(t,e){if(!t)return"";for(var i="",s=0;s0&&(i+="\n\telse "),s{var s=i(56694),n=i(28699),r=i(6659),o=i(18970),a=i(72632),h=i(16650),l=i(81044),u=i(37410),c=i(75512),d=i(71305),p=new s({Extends:r,initialize:function(t){r.call(this);var e=t.game,i=e.renderer,s=i.gl;this.name=a(t,"name","WebGLPipeline"),this.game=e,this.renderer=i,this.manager,this.gl=s,this.view=e.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=a(t,"topology",s.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=a(t,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.isSpriteFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=t,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[]},boot:function(){var t,e=this.gl,i=this.config,s=this.renderer;this.isPostFX||(this.projectionMatrix=(new h).identity());var n=this.renderTargets,r=a(i,"renderTarget",!1);"boolean"==typeof r&&r&&(r=1);var c=s.width,d=s.height;if("number"==typeof r)for(t=0;tx&&(x=y[t].vertexSize);var T=a(i,"batchSize",s.config.batchSize);this.vertexCapacity=6*T;var w=new ArrayBuffer(this.vertexCapacity*x);this.vertexData=w,this.bytes=new Uint8Array(w),this.vertexViewF32=new Float32Array(w),this.vertexViewU32=new Uint32Array(w);var b=a(i,"vertices",null);for(b?(this.vertexViewF32.set(b),this.vertexBuffer=s.createVertexBuffer(w,e.STATIC_DRAW)):this.vertexBuffer=s.createVertexBuffer(w.byteLength,e.DYNAMIC_DRAW),this.setVertexBuffer(),t=y.length-1;t>=0;t--)y[t].rebind();this.hasBooted=!0,s.on(l.RESIZE,this.resize,this),s.on(l.PRE_RENDER,this.onPreRender,this),s.on(l.RENDER,this.onRender,this),s.on(l.POST_RENDER,this.onPostRender,this),this.emit(o.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(t,e,i){var s=this.renderer;t===this.currentShader&&s.currentProgram===this.currentShader.program||(this.flush(),this.setVertexBuffer(i)&&!e&&(e=!0),t.bind(e,!1),this.currentShader=t);return this},getShaderByName:function(t){for(var e=this.shaders,i=0;ithis.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(t,e){t===this.width&&e===this.height||this.flush(),this.width=t,this.height=e;for(var i=this.renderTargets,s=0;s=0;i--){var s=e[i].rebind();t&&s!==t||(this.currentShader=s)}return this.activeTextures.length=0,this.emit(o.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},setVertexBuffer:function(t){if(void 0===t&&(t=this.vertexBuffer),t!==this.activeBuffer){var e=this.gl;return this.gl.bindBuffer(e.ARRAY_BUFFER,t),this.activeBuffer=t,!0}return!1},preBatch:function(t){return this.currentRenderTarget&&this.currentRenderTarget.bind(),this.onPreBatch(t),this},postBatch:function(t){return this.onDraw(this.currentRenderTarget),this.onPostBatch(t),this},onDraw:function(){},unbind:function(){this.currentRenderTarget&&this.currentRenderTarget.unbind()},flush:function(t){if(void 0===t&&(t=!1),this.vertexCount>0){this.emit(o.BEFORE_FLUSH,this,t),this.onBeforeFlush(t);var e=this.gl,i=this.vertexCount,s=this.currentShader.vertexSize,n=this.topology;if(this.active){var r,a,h;this.setVertexBuffer(),i===this.vertexCapacity?e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.DYNAMIC_DRAW):e.bufferSubData(e.ARRAY_BUFFER,0,this.bytes.subarray(0,i*s));var l=this.batch,u=this.activeTextures;if(this.forceZero)for(u[0]||e.activeTexture(e.TEXTURE0),r=0;r{var s=i(66458),n=i(89787),r=i(56694),o=i(86459),a=i(6659),h=i(81044),l=i(28621),u=i(16650),c=i(72283),d=i(35217),p=i(37410),f=i(40444),v=i(38203),g=i(75512),m=i(1217),y=!1,x=new r({Extends:a,initialize:function(t){a.call(this);var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!1,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference,preserveDrawingBuffer:e.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,roundPixels:e.roundPixels,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=o.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=t.canvas,this.blendModes=[],this.contextLost=!1,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.maxTextures=0,this.textureIndexes,this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=c,this.contextRestoredHandler=c,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats,this.compression,this.drawingBufferHeight=0,this.blankTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.maskSource=null,this.maskTarget=null,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(t){var e,i=this.game,s=this.canvas,n=t.backgroundColor;if(!(e=i.config.context?i.config.context:s.getContext("webgl",t.contextCreation)||s.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=e;var r=this;this.contextLostHandler=function(t){r.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),t.preventDefault()},s.addEventListener("webglcontextlost",this.contextLostHandler,!1),i.context=e;for(var a=0;a<=27;a++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[e.ZERO,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_REVERSE_SUBTRACT},this.glFormats=[e.BYTE,e.SHORT,e.UNSIGNED_BYTE,e.UNSIGNED_SHORT,e.FLOAT],this.glFuncMap={mat2:{func:e.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:e.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:e.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:e.uniform1f,length:1},"1fv":{func:e.uniform1fv,length:1},"1i":{func:e.uniform1i,length:1},"1iv":{func:e.uniform1iv,length:1},"2f":{func:e.uniform2f,length:2},"2fv":{func:e.uniform2fv,length:1},"2i":{func:e.uniform2i,length:2},"2iv":{func:e.uniform2iv,length:1},"3f":{func:e.uniform3f,length:3},"3fv":{func:e.uniform3fv,length:1},"3i":{func:e.uniform3i,length:3},"3iv":{func:e.uniform3iv,length:1},"4f":{func:e.uniform4f,length:4},"4fv":{func:e.uniform4fv,length:1},"4i":{func:e.uniform4i,length:4},"4iv":{func:e.uniform4iv,length:1}};var h=e.getSupportedExtensions();t.maxTextures&&-1!==t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),this.supportedExtensions=h;var l="ANGLE_instanced_arrays";this.instancedArraysExtension=h.indexOf(l)>-1?e.getExtension(l):null;var c="OES_vertex_array_object";this.vaoExtension=h.indexOf(c)>-1?e.getExtension(c):null,e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(n.redGL,n.greenGL,n.blueGL,n.alphaGL),this.mipmapFilter=e[t.mipmapFilter],this.maxTextures=g.checkShaderMax(e,t.maxTextures),this.textureIndexes=[];for(var p=0;p0&&s>0;if(o&&a){var h=o[0],l=o[1],u=o[2],c=o[3];a=h!==t||l!==e||u!==i||c!==s}a&&(this.flush(),r.scissor(t,n-e-s,i,s))},resetScissor:function(){var t=this.gl;t.enable(t.SCISSOR_TEST);var e=this.currentScissor;if(e){var i=e[0],s=e[1],n=e[2],r=e[3];n>0&&r>0&&t.scissor(i,this.drawingBufferHeight-s-r,n,r)}},popScissor:function(){var t=this.scissorStack;t.pop();var e=t[t.length-1];e&&this.setScissor(e[0],e[1],e[2],e[3]),this.currentScissor=e},hasActiveStencilMask:function(){var t=this.currentMask.mask,e=this.currentCameraMask.mask;return t&&t.isStencil||e&&e.isStencil},resetViewport:function(){var t=this.gl;t.viewport(0,0,this.width,this.height),this.drawingBufferHeight=t.drawingBufferHeight},setBlendMode:function(t,e){void 0===e&&(e=!1);var i=this.gl,s=this.blendModes[t];return!!(e||t!==o.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(s.equation),s.func.length>2?i.blendFuncSeparate(s.func[0],s.func[1],s.func[2],s.func[3]):i.blendFunc(s.func[0],s.func[1]),this.currentBlendMode=t,!0)},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>17&&this.blendModes[t]&&this.blendModes.splice(t,1),this},pushFramebuffer:function(t,e,i){return t===this.currentFramebuffer?this:(this.fboStack.push(t),this.setFramebuffer(t,e,i))},setFramebuffer:function(t,e,i){if(void 0===e&&(e=!1),void 0===i&&(i=!0),t===this.currentFramebuffer)return this;var s=this.gl,n=this.width,r=this.height;return t&&t.renderTexture&&i?(n=t.renderTexture.width,r=t.renderTexture.height):this.flush(),s.bindFramebuffer(s.FRAMEBUFFER,t),i&&s.viewport(0,0,n,r),e&&(t?(this.drawingBufferHeight=r,this.pushScissor(0,0,n,r)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=t,this},popFramebuffer:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!0);var i=this.fboStack;i.pop();var s=i[i.length-1];return s||(s=null),this.setFramebuffer(s,t,e),s},setProgram:function(t){return t!==this.currentProgram&&(this.flush(),this.gl.useProgram(t),this.currentProgram=t,!0)},resetProgram:function(){return this.gl.useProgram(this.currentProgram),this},createTextureFromSource:function(t,e,i,s,n){void 0===n&&(n=!1);var r=this.gl,a=r.NEAREST,h=r.NEAREST,u=r.CLAMP_TO_EDGE;e=t?t.width:e,i=t?t.height:i;var c=l(e,i);return c&&!n&&(u=r.REPEAT),s===o.ScaleModes.LINEAR&&this.config.antialias&&(a=c?this.mipmapFilter:r.LINEAR,h=r.LINEAR),t&&t.compressed&&(a=r.LINEAR,h=r.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,h,u,u,r.RGBA,t):this.createTexture2D(0,a,h,u,u,r.RGBA,null,e,i)},createTexture2D:function(t,e,i,s,n,r,o,a,h,u,c,d){u=null==u||u,void 0===c&&(c=!1),void 0===d&&(d=!1);var p=this.gl,f=p.createTexture();p.activeTexture(p.TEXTURE0);var v=p.getParameter(p.TEXTURE_BINDING_2D);p.bindTexture(p.TEXTURE_2D,f),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,e),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,i),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,n),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,s),p.pixelStorei(p.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),d&&p.pixelStorei(p.UNPACK_FLIP_Y_WEBGL,!0);var g=!1;if(null==o)p.texImage2D(p.TEXTURE_2D,t,r,a,h,0,r,p.UNSIGNED_BYTE,null),g=l(a,h);else if(o.compressed){a=o.width,h=o.height,g=o.generateMipmap;for(var m=0;m0)&&this.pipelines.setMulti().drawFillRect(e,i,s,r,g.getTintFromFloats(o.blueGL,o.greenGL,o.redGL,1),o.alphaGL)},getCurrentStencilMask:function(){var t=null,e=this.maskStack,i=this.currentCameraMask;return e.length>0?t=e[e.length-1]:i.mask&&i.mask.isStencil&&(t=i),t},postRenderCamera:function(t){var e=t.flashEffect,i=t.fadeEffect;if(e.isRunning||i.isRunning||i.isComplete){var s=this.pipelines.setMulti();e.postRenderWebGL(s,g.getTintFromFloats),i.postRenderWebGL(s,g.getTintFromFloats)}t.dirty=!1,this.popScissor(),t.mask&&(this.currentCameraMask.mask=null,t.mask.postRenderWebGL(this,t._maskCamera)),this.pipelines.postBatchCamera(t),t.emit(n.POST_RENDER,t)},preRender:function(){if(!this.contextLost){var t=this.gl;if(t.bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender){var e=this.config.backgroundColor;t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)}t.enable(t.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(h.PRE_RENDER)}},render:function(t,e,i){if(!this.contextLost){var s=e.length;if(this.emit(h.RENDER,t,i),this.preRenderCamera(i),0===s)return this.setBlendMode(o.BlendModes.NORMAL),void this.postRenderCamera(i);this.currentType="";for(var n=this.currentMask,r=0;r0&&r>0){s.activeTexture(s.TEXTURE0);var o=s.getParameter(s.TEXTURE_BINDING_2D);s.bindTexture(s.TEXTURE_2D,e),i&&s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!0),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,t),e.width=n,e.height=r,o&&s.bindTexture(s.TEXTURE_2D,o)}return e},createVideoTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var s=this.gl,n=s.NEAREST,r=s.NEAREST,o=t.videoWidth,a=t.videoHeight,h=s.CLAMP_TO_EDGE,u=l(o,a);return!e&&u&&(h=s.REPEAT),this.config.antialias&&(n=u?this.mipmapFilter:s.LINEAR,r=s.LINEAR),this.createTexture2D(0,n,r,h,h,s.RGBA,t,o,a,!0,!0,i)},updateVideoTexture:function(t,e,i){void 0===i&&(i=!1);var s=this.gl,n=t.videoWidth,r=t.videoHeight;if(n>0&&r>0){s.activeTexture(s.TEXTURE0);var o=s.getParameter(s.TEXTURE_BINDING_2D);s.bindTexture(s.TEXTURE_2D,e),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,i),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,t),e.width=n,e.height=r,o&&s.bindTexture(s.TEXTURE_2D,o)}return e},setTextureFilter:function(t,e){var i=this.gl,s=[i.LINEAR,i.NEAREST][e];i.activeTexture(i.TEXTURE0);var n=i.getParameter(i.TEXTURE_BINDING_2D);return i.bindTexture(i.TEXTURE_2D,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,s),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,s),n&&i.bindTexture(i.TEXTURE_2D,n),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.maskTarget.destroy(),this.maskSource.destroy(),this.pipelines.destroy(),this.removeAllListeners(),this.fboStack=[],this.maskStack=[],this.extensions={},this.textureIndexes=[],this.gl=null,this.game=null,this.canvas=null,this.contextLost=!0,this.currentMask=null,this.currentCameraMask=null}});t.exports=x},71305:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(71402),o=new s({initialize:function(t,e,i,s,n){this.pipeline=t,this.name=e,this.renderer=t.renderer,this.gl=this.renderer.gl,this.fragSrc=s,this.vertSrc=i,this.program=this.renderer.createProgram(i,s),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(n),this.createUniforms()},createAttributes:function(t){var e=0,i=0,s=[];this.vertexComponentCount=0;for(var o=0;o=0?(e.enableVertexAttribArray(p),e.vertexAttribPointer(p,a,h,d,i,l),o.enabled=!0,o.location=p):-1!==p&&e.disableVertexAttribArray(p)}else u?e.vertexAttribPointer(c,a,h,d,i,l):!u&&c>-1&&(e.disableVertexAttribArray(c),o.location=-1)}return this},createUniforms:function(){var t,e,i,s=this.gl,n=this.program,r=this.uniforms,o=s.getProgramParameter(n,s.ACTIVE_UNIFORMS);for(t=0;t0&&(e=e.substr(0,h),r.hasOwnProperty(e)||null!==(i=s.getUniformLocation(n,e))&&(r[e]={name:e,location:i,value1:null,value2:null,value3:null,value4:null}))}}return this},hasUniform:function(t){return this.uniforms.hasOwnProperty(t)},resetUniform:function(t){var e=this.uniforms[t];return e&&(e.value1=null,e.value2=null,e.value3=null,e.value4=null),this},setUniform1:function(t,e,i,s){var n=this.uniforms[e];return n?((s||n.value1!==i)&&(n.value1=i,this.renderer.setProgram(this.program),t.call(this.gl,n.location,i),this.pipeline.currentShader=this),this):this},setUniform2:function(t,e,i,s,n){var r=this.uniforms[e];return r?((n||r.value1!==i||r.value2!==s)&&(r.value1=i,r.value2=s,this.renderer.setProgram(this.program),t.call(this.gl,r.location,i,s),this.pipeline.currentShader=this),this):this},setUniform3:function(t,e,i,s,n,r){var o=this.uniforms[e];return o?((r||o.value1!==i||o.value2!==s||o.value3!==n)&&(o.value1=i,o.value2=s,o.value3=n,this.renderer.setProgram(this.program),t.call(this.gl,o.location,i,s,n),this.pipeline.currentShader=this),this):this},setUniform4:function(t,e,i,s,n,r,o){var a=this.uniforms[e];return a?((o||a.value1!==i||a.value2!==s||a.value3!==n||a.value4!==r)&&(a.value1=i,a.value2=s,a.value3=n,a.value4=r,this.renderer.setProgram(this.program),t.call(this.gl,a.location,i,s,n,r),this.pipeline.currentShader=this),this):this},setBoolean:function(t,e){return this.setUniform1(this.gl.uniform1i,t,Number(e))},set1f:function(t,e){return this.setUniform1(this.gl.uniform1f,t,e)},set2f:function(t,e,i){return this.setUniform2(this.gl.uniform2f,t,e,i)},set3f:function(t,e,i,s){return this.setUniform3(this.gl.uniform3f,t,e,i,s)},set4f:function(t,e,i,s,n){return this.setUniform4(this.gl.uniform4f,t,e,i,s,n)},set1fv:function(t,e){return this.setUniform1(this.gl.uniform1fv,t,e,!0)},set2fv:function(t,e){return this.setUniform1(this.gl.uniform2fv,t,e,!0)},set3fv:function(t,e){return this.setUniform1(this.gl.uniform3fv,t,e,!0)},set4fv:function(t,e){return this.setUniform1(this.gl.uniform4fv,t,e,!0)},set1iv:function(t,e){return this.setUniform1(this.gl.uniform1iv,t,e,!0)},set2iv:function(t,e){return this.setUniform1(this.gl.uniform2iv,t,e,!0)},set3iv:function(t,e){return this.setUniform1(this.gl.uniform3iv,t,e,!0)},set4iv:function(t,e){return this.setUniform1(this.gl.uniform4iv,t,e,!0)},set1i:function(t,e){return this.setUniform1(this.gl.uniform1i,t,e)},set2i:function(t,e,i){return this.setUniform2(this.gl.uniform2i,t,e,i)},set3i:function(t,e,i,s){return this.setUniform3(this.gl.uniform3i,t,e,i,s)},set4i:function(t,e,i,s,n){return this.setUniform4(this.gl.uniform4i,t,e,i,s,n)},setMatrix2fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix2fv,t,e,i,!0)},setMatrix3fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix3fv,t,e,i,!0)},setMatrix4fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix4fv,t,e,i,!0)},createProgram:function(t,e){void 0===t&&(t=this.vertSrc),void 0===e&&(e=this.fragSrc);var i=this.gl;return this.program&&i.deleteProgram(this.program),this.vertSrc=t,this.fragSrc=e,this.program=this.renderer.createProgram(t,e),this.createUniforms(),this.rebind()},destroy:function(){this.gl.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null,this.attributes=null,this.uniforms=null}});t.exports=o},71402:t=>{t.exports={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}}},55478:(t,e,i)=>{var s=i(71402),n=i(98611),r={PipelineManager:i(35217),Pipelines:i(62253),RenderTarget:i(37410),Utils:i(75512),WebGLPipeline:i(44775),WebGLRenderer:i(11857),WebGLShader:i(71305)};r=n(!1,r,s),t.exports=r},5583:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(91679),o=i(89053),a=i(71402),h=i(44775),l=new s({Extends:h,initialize:function(t){t.fragShader=n(t,"fragShader",r),t.vertShader=n(t,"vertShader",o),t.batchSize=n(t,"batchSize",1),t.vertices=n(t,"vertices",[-1,1,-1,-7,7,1]),t.attributes=n(t,"attributes",[{name:"inPosition",size:2,type:a.FLOAT}]),h.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(t,e){h.prototype.resize.call(this,t,e),this.set2f("uResolution",t,e)},beginMask:function(t,e,i){this.renderer.beginBitmapMask(t,i)},endMask:function(t,e,i){var s=this.gl,n=this.renderer,r=t.bitmapMask;r&&s&&(n.drawBitmapMask(r,e,this),i&&this.set2f("uResolution",i.width,i.height),this.set1i("uInvertMaskAlpha",t.invertAlpha),s.drawArrays(this.topology,0,3),i&&this.set2f("uResolution",this.width,this.height),s.bindTexture(s.TEXTURE_2D,null))}});t.exports=l},66901:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(65045),o=i(77310),a=i(69360),h=i(93736),l=i(44775),u=new s({Extends:o,initialize:function(t){var e=n(t,"fragShader",r);t.fragShader=e.replace("%LIGHT_COUNT%",t.game.renderer.config.maxLights),o.call(this,t),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.defaultNormalMap,this.currentNormalMap,this.lightsActive=!0,this.tempVec2=new h,this._tempMatrix=new a,this._tempMatrix2=new a},boot:function(){l.prototype.boot.call(this);var t=this.gl,e=t.createTexture();t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([127,127,255,255])),this.defaultNormalMap={glTexture:e}},onRender:function(t,e){var i=t.sys.lights;if(this.lightsActive=!1,i&&i.active){var s,n=i.getLights(e),r=n.length;this.lightsActive=!0;var o=this.renderer.height,a=e.matrix,h=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",e.x,e.y,e.rotation,e.zoom),this.set3f("uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),this.set1i("uLightCount",r),s=0;s0&&this.flush();var e=this.inverseRotationMatrix;if(t){var i=-t,s=Math.cos(i),n=Math.sin(i);e[1]=n,e[3]=-n,e[0]=e[4]=s}else e[0]=e[4]=1,e[1]=e[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,e),this.currentNormalMapRotation=t}},setTexture2D:function(t,e){var i=this.renderer;void 0===t&&(t=i.whiteTexture);var s=this.getNormalMap(e);this.isNewNormalMap(t,s)&&(this.flush(),this.createBatch(t),this.addTextureToBatch(s),this.currentNormalMap=s);var n=0;e&&e.parentContainer?n=e.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2).rotationNormalized:e&&(n=e.rotation);return this.setNormalMapRotation(n),0},setGameObject:function(t,e){void 0===e&&(e=t.frame);var i=e.glTexture,s=this.getNormalMap(t);if(this.isNewNormalMap(i,s)&&(this.flush(),this.createBatch(i),this.addTextureToBatch(s),this.currentNormalMap=s),t.parentContainer){var n=t.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(n.rotationNormalized)}else this.setNormalMapRotation(t.rotation);return 0},isNewNormalMap:function(t,e){return this.currentTexture!==t||this.currentNormalMap!==e},getNormalMap:function(t){var e;return t?t.displayTexture?e=t.displayTexture.dataSource[t.displayFrame.sourceIndex]:t.texture?e=t.texture.dataSource[t.frame.sourceIndex]:t.tileset&&(e=Array.isArray(t.tileset)?t.tileset[0].image.dataSource[0]:t.tileset.image.dataSource[0]):e=this.defaultNormalMap,e||(e=this.defaultNormalMap),e.glTexture},batchSprite:function(t,e,i){this.lightsActive&&o.prototype.batchSprite.call(this,t,e,i)},batchTexture:function(t,e,i,s,n,r,a,h,l,u,c,d,p,f,v,g,m,y,x,T,w,b,E,S,A,C,_,M,R,P,O,L){this.lightsActive&&o.prototype.batchTexture.call(this,t,e,i,s,n,r,a,h,l,u,c,d,p,f,v,g,m,y,x,T,w,b,E,S,A,C,_,M,R,P,O,L)},batchTextureFrame:function(t,e,i,s,n,r,a){this.lightsActive&&o.prototype.batchTextureFrame.call(this,t,e,i,s,n,r,a)}});t.exports=u},71264:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(77310),o=i(85060),a=i(18166),h=i(71402),l=i(44775),u=new s({Extends:r,initialize:function(t){t.fragShader=n(t,"fragShader",o),t.vertShader=n(t,"vertShader",a),t.attributes=n(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:h.UNSIGNED_BYTE,normalized:!0}]),t.forceZero=!0,r.call(this,t)},boot:function(){l.prototype.boot.call(this),this.set1i("uMainSampler",0)}});t.exports=u},77310:(t,e,i)=>{var s=i(56694),n=i(11117),r=i(72632),o=i(53787),a=i(15968),h=i(69360),l=i(75512),u=i(71402),c=i(44775),d=new s({Extends:c,initialize:function(t){var e=t.game.renderer,i=r(t,"fragShader",o);t.fragShader=l.parseFragmentShaderMaxTextures(i,e.maxTextures),t.vertShader=r(t,"vertShader",a),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:u.UNSIGNED_BYTE,normalized:!0}]),c.call(this,t),this._tempMatrix1=new h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.calcMatrix=new h,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){c.prototype.boot.call(this),this.currentShader.set1iv("uMainSampler",this.renderer.textureIndexes)},batchSprite:function(t,e,i){this.manager.set(this,t);var s=this._tempMatrix1,n=this._tempMatrix2,r=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,u=o.v0,c=o.u1,d=o.v1,p=o.x,f=o.y,v=o.cutWidth,g=o.cutHeight,m=o.customPivot,y=t.displayOriginX,x=t.displayOriginY,T=-y+p,w=-x+f;if(t.isCropped){var b=t._crop;b.flipX===t.flipX&&b.flipY===t.flipY||o.updateCropUVs(b,t.flipX,t.flipY),h=b.u0,u=b.v0,c=b.u1,d=b.v1,v=b.width,g=b.height,T=-y+(p=b.x),w=-x+(f=b.y)}var E=1,S=1;t.flipX&&(m||(T+=-o.realWidth+2*y),E=-1),(t.flipY||o.source.isGLTexture&&!a.flipY)&&(m||(w+=-o.realHeight+2*x),S=-1);var A=t.x,C=t.y;e.roundPixels&&(A=Math.floor(A),C=Math.floor(C)),n.applyITRS(A,C,t.rotation,t.scaleX*E,t.scaleY*S),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),n.e=A,n.f=C):(n.e-=e.scrollX*t.scrollFactorX,n.f-=e.scrollY*t.scrollFactorY),s.multiply(n,r);var _=r.setQuad(T,w,T+v,w+g,!1),M=l.getTintAppendFloatAlpha,R=e.alpha,P=M(t.tintTopLeft,R*t._alphaTL),O=M(t.tintTopRight,R*t._alphaTR),L=M(t.tintBottomLeft,R*t._alphaBL),F=M(t.tintBottomRight,R*t._alphaBR);this.shouldFlush(6)&&this.flush();var D=this.setGameObject(t,o);this.manager.preBatch(t),this.batchQuad(t,_[0],_[1],_[2],_[3],_[4],_[5],_[6],_[7],h,u,c,d,P,O,L,F,t.tintFill,a,D),this.manager.postBatch(t)},batchTexture:function(t,e,i,s,n,r,o,a,h,l,u,c,d,p,f,v,g,m,y,x,T,w,b,E,S,A,C,_,M,R,P,O){this.manager.set(this,t);var L=this._tempMatrix1,F=this._tempMatrix2,D=this._tempMatrix3,k=m/i+C,I=y/s+_,B=(m+x)/i+C,N=(y+T)/s+_,Y=o,U=a,X=-v,z=-g;if(t.isCropped){var G=t._crop,V=G.width,W=G.height;Y=V,U=W,o=V,a=W;var H=m=G.x,j=y=G.y;c&&(H=x-G.x-V),d&&(j=T-G.y-W),k=H/i+C,I=j/s+_,B=(H+V)/i+C,N=(j+W)/s+_,X=-v+m,z=-g+y}c&&(Y*=-1,X+=o),(d^=!P&&e.isRenderTexture?1:0)&&(U*=-1,z+=a),M.roundPixels&&(n=Math.floor(n),r=Math.floor(r)),F.applyITRS(n,r,u,h,l),L.copyFrom(M.matrix),R?(L.multiplyWithOffset(R,-M.scrollX*p,-M.scrollY*f),F.e=n,F.f=r):(F.e-=M.scrollX*p,F.f-=M.scrollY*f),L.multiply(F,D);var q=D.setQuad(X,z,X+Y,z+U,!1);void 0===O&&(O=this.setTexture2D(e)),t&&this.manager.preBatch(t),this.batchQuad(t,q[0],q[1],q[2],q[3],q[4],q[5],q[6],q[7],k,I,B,N,w,b,E,S,A,e,O),t&&this.manager.postBatch(t)},batchTextureFrame:function(t,e,i,s,n,r,o){this.manager.set(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2;o?a.multiply(o,h):h=a;var u=h.setQuad(e,i,e+t.width,i+t.height,!1),c=this.setTexture2D(t.source.glTexture);s=l.getTintAppendFloatAlpha(s,n),this.batchQuad(null,u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],t.u0,t.v0,t.u1,t.v1,s,s,s,s,0,t.glTexture,c)},batchFillRect:function(t,e,i,s,n,r){this.renderer.pipelines.set(this);var o=this.calcMatrix;r&&r.multiply(n,o);var a=o.setQuad(t,e,t+i,e+s,!1),h=this.fillTint;this.batchQuad(null,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],0,0,1,1,h.TL,h.TR,h.BL,h.BR,2)},batchFillTriangle:function(t,e,i,s,n,r,o,a){this.renderer.pipelines.set(this);var h=this.calcMatrix;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,s),d=h.getY(i,s),p=h.getX(n,r),f=h.getY(n,r),v=this.fillTint;this.batchTri(null,l,u,c,d,p,f,0,0,1,1,v.TL,v.TR,v.BL,2)},batchStrokeTriangle:function(t,e,i,s,n,r,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=s,l[1].width=o,l[2].x=n,l[2].y=r,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.pipelines.set(this);var s=this.calcMatrix;i&&i.multiply(e,s);for(var r,o,a=t.length,h=this.polygonCache,l=this.fillTint.TL,u=this.fillTint.TR,c=this.fillTint.BL,d=0;d0&&U[4]?this.batchQuad(null,F,D,R,P,U[0],U[1],U[2],U[3],0,0,1,1,I,B,N,Y,2):(X[0]=F,X[1]=D,X[2]=R,X[3]=P,X[4]=1),h&&X[4]?this.batchQuad(null,_,M,O,L,X[0],X[1],X[2],X[3],0,0,1,1,I,B,N,Y,2):(U[0]=_,U[1]=M,U[2]=O,U[3]=L,U[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,c.prototype.destroy.call(this),this}});t.exports=d},10919:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(83327),o=i(54677),a=i(44775),h=new s({Extends:a,initialize:function(t){t.vertShader=n(t,"vertShader",o),t.fragShader=n(t,"fragShader",r),t.attributes=n(t,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),a.call(this,t)},onRender:function(t,e){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",e.zoom)},batchPointLight:function(t,e,i,s,n,r,o,a,h,l,u,c){var d=t.color,p=t.intensity,f=t.radius,v=t.attenuation,g=d.r*p,m=d.g*p,y=d.b*p,x=e.alpha*t.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(i,s,u,c,f,v,g,m,y,x),this.batchLightVert(n,r,u,c,f,v,g,m,y,x),this.batchLightVert(o,a,u,c,f,v,g,m,y,x),this.batchLightVert(i,s,u,c,f,v,g,m,y,x),this.batchLightVert(o,a,u,c,f,v,g,m,y,x),this.batchLightVert(h,l,u,c,f,v,g,m,y,x),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(t,e,i,s,n,r,o,a,h,l){var u=this.vertexViewF32,c=this.vertexCount*this.currentShader.vertexComponentCount-1;u[++c]=t,u[++c]=e,u[++c]=i,u[++c]=s,u[++c]=n,u[++c]=r,u[++c]=o,u[++c]=a,u[++c]=h,u[++c]=l,this.vertexCount++}});t.exports=h},80486:(t,e,i)=>{var s=i(56694),n=i(65246),r=i(72632),o=i(12569),a=i(99365),h=i(44775),l=new s({Extends:h,initialize:function(t){t.renderTarget=r(t,"renderTarget",1),t.fragShader=r(t,"fragShader",o),t.vertShader=r(t,"vertShader",a),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.batchSize=1,t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],h.call(this,t),this.isPostFX=!0,this.gameObject,this.colorMatrix=new n,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){h.prototype.boot.call(this);var t=this.manager.UTILITY_PIPELINE;this.fullFrame1=t.fullFrame1,this.fullFrame2=t.fullFrame2,this.halfFrame1=t.halfFrame1,this.halfFrame2=t.halfFrame2,this.set1i("uMainSampler",0)},onDraw:function(t){this.bindAndDraw(t)},copyFrame:function(t,e,i,s,n){this.manager.copyFrame(t,e,i,s,n)},copyToGame:function(t){this.manager.copyToGame(t)},drawFrame:function(t,e,i){this.manager.drawFrame(t,e,i,this.colorMatrix)},blendFrames:function(t,e,i,s,n){this.manager.blendFrames(t,e,i,s,n)},blendFramesAdditive:function(t,e,i,s,n){this.manager.blendFramesAdditive(t,e,i,s,n)},clearFrame:function(t,e){this.manager.clearFrame(t,e)},blitFrame:function(t,e,i,s,n,r){this.manager.blitFrame(t,e,i,s,n,r)},copyFrameRect:function(t,e,i,s,n,r,o,a){this.manager.copyFrameRect(t,e,i,s,n,r,o,a)},bindAndDraw:function(t,e,i,s,n){void 0===i&&(i=!0),void 0===s&&(s=!0);var r=this.gl,o=this.renderer;this.bind(n),this.set1i("uMainSampler",0),e?(r.viewport(0,0,e.width,e.height),r.bindFramebuffer(r.FRAMEBUFFER,e.framebuffer),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.texture,0),i&&(s?r.clearColor(0,0,0,0):r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT))):(o.popFramebuffer(!1,!1,!1),o.currentFramebuffer||r.viewport(0,0,o.width,o.height)),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,t.texture),r.bufferData(r.ARRAY_BUFFER,this.vertexData,r.STATIC_DRAW),r.drawArrays(r.TRIANGLES,0,6),e&&(r.bindTexture(r.TEXTURE_2D,null),r.bindFramebuffer(r.FRAMEBUFFER,null))}});t.exports=l},21213:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(77310),o=new s({Extends:r,initialize:function(t){t.topology=5,t.batchSize=n(t,"batchSize",256),r.call(this,t)}});t.exports=o},51212:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(77310),o=i(85060),a=i(18166),h=i(44775),l=new s({Extends:r,initialize:function(t){t.fragShader=n(t,"fragShader",o),t.vertShader=n(t,"vertShader",a),t.forceZero=!0,r.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0)}});t.exports=l},38964:(t,e,i)=>{var s=i(95723),n=i(79993),r=i(56694),o=i(72632),a=i(77310),h=i(12569),l=i(74118),u=i(37410),c=i(85060),d=i(18166),p=i(44775),f=new r({Extends:a,initialize:function(t){var e=o(t,"fragShader",h),i=o(t,"vertShader",d),s=o(t,"drawShader",h),n=[{name:"DrawSprite",fragShader:c,vertShader:d},{name:"CopySprite",fragShader:e,vertShader:i},{name:"DrawGame",fragShader:s,vertShader:d}],r=o(t,"shaders",[]);t.shaders=n.concat(r),t.vertShader||(t.vertShader=i),t.batchSize=1,a.call(this,t),this.isSpriteFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new l,this.targetBounds=new l,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){p.prototype.boot.call(this);var t=this.shaders,e=this.renderer;this.drawSpriteShader=t[0],this.copyShader=t[1],this.gameShader=t[2],this.fsTarget=new u(e,e.width,e.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var i=new ArrayBuffer(168);this.quadVertexData=i,this.quadVertexViewF32=new Float32Array(i),this.quadVertexBuffer=e.createVertexBuffer(i,this.gl.STATIC_DRAW),this.onResize(e.width,e.height),this.currentShader=this.copyShader},onResize:function(t,e){var i=this.quadVertexViewF32;i[1]=e,i[22]=e,i[14]=t,i[28]=t,i[35]=t,i[36]=e},batchQuad:function(t,e,i,s,r,o,a,h,l,u,c,d,p,f,v,g,m,y,x){var T=Math.min(e,s,o,h),w=Math.min(i,r,a,l),b=Math.max(e,s,o,h)-T,E=Math.max(i,r,a,l)-w,S=this.spriteBounds.setTo(T,w,b,E),A=t?t.fxPadding:0,C=b+2*A,_=E+2*A,M=Math.abs(Math.max(C,_)),R=this.manager.getRenderTarget(M),P=this.targetBounds.setTo(0,0,R.width,R.height);n(P,S.centerX,S.centerY),this.tempSprite=t;var O=this.gl,L=this.renderer;this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.flipProjectionMatrix(!0),t&&(this.onDrawSprite(t,R),t.onFX(this));var F=this.fsTarget;return this.flush(),O.viewport(0,0,L.width,L.height),O.bindFramebuffer(O.FRAMEBUFFER,F.framebuffer),O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,F.texture,0),O.clearColor(0,0,0,0),O.clear(O.COLOR_BUFFER_BIT),this.setTexture2D(x),this.batchVert(e,i,u,c,0,y,f),this.batchVert(s,r,u,p,0,y,g),this.batchVert(o,a,d,p,0,y,m),this.batchVert(e,i,u,c,0,y,f),this.batchVert(o,a,d,p,0,y,m),this.batchVert(h,l,d,c,0,y,v),this.flush(),this.flipProjectionMatrix(!1),O.activeTexture(O.TEXTURE0),O.bindTexture(O.TEXTURE_2D,R.texture),O.copyTexSubImage2D(O.TEXTURE_2D,0,0,0,P.x,P.y,P.width,P.height),O.bindFramebuffer(O.FRAMEBUFFER,null),O.bindTexture(O.TEXTURE_2D,null),this.onBatch(t),this.currentShader=this.copyShader,this.onDraw(R,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(t,e,i,n,r,o){void 0===i&&(i=!0),void 0===n&&(n=!0),void 0===r&&(r=!1),void 0===o&&(o=this.copyShader);var a=this.gl,h=this.tempSprite;this.currentShader=o;var l=this.setVertexBuffer(this.quadVertexBuffer);if(o.bind(l,!1),this.set1i("uMainSampler",0),h.onFXCopy(this),this.onCopySprite(t,e,h),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,t.texture),t.height>e.height)a.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e);else{var u=e.height-t.height;a.viewport(0,u,t.width,t.height),this.resetUVs()}if(a.bindFramebuffer(a.FRAMEBUFFER,e.framebuffer),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,e.texture,0),i&&(a.clearColor(0,0,0,Number(!n)),a.clear(a.COLOR_BUFFER_BIT)),r){var c=this.renderer.currentBlendMode;this.renderer.setBlendMode(s.ERASE)}a.bufferData(a.ARRAY_BUFFER,this.quadVertexData,a.STATIC_DRAW),a.drawArrays(a.TRIANGLES,0,6),r&&this.renderer.setBlendMode(c),a.bindFramebuffer(a.FRAMEBUFFER,null)},blendFrames:function(t,e,i,s,n){this.manager.blendFrames(t,e,i,s,n)},blendFramesAdditive:function(t,e,i,s,n){this.manager.blendFramesAdditive(t,e,i,s,n)},drawToGame:function(t){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(t)},copyToGame:function(t){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(t)},bindAndDraw:function(t){var e=this.gl,i=this.renderer;this.set1i("uMainSampler",0),i.popFramebuffer(!1,!1,!1),i.currentFramebuffer||e.viewport(0,0,i.width,i.height),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(t.texture);var s=this._tempMatrix1.loadIdentity(),n=this.targetBounds.x,r=this.targetBounds.y,o=n+t.width,a=r+t.height,h=s.getX(n,r),l=s.getX(n,a),u=s.getX(o,a),c=s.getX(o,r),d=s.getY(n,r),p=s.getY(n,a),f=s.getY(o,a),v=s.getY(o,r);this.batchVert(h,d,0,0,0,0,16777215),this.batchVert(l,p,0,1,0,0,16777215),this.batchVert(u,f,1,1,0,0,16777215),this.batchVert(h,d,0,0,0,0,16777215),this.batchVert(u,f,1,1,0,0,16777215),this.batchVert(c,v,1,0,0,0,16777215),this.flush(),this.tempSprite=null},onDraw:function(t){this.drawToGame(t)},setUVs:function(t,e,i,s,n,r,o,a){var h=this.quadVertexViewF32;h[2]=t,h[3]=e,h[9]=i,h[10]=s,h[16]=n,h[17]=r,h[23]=t,h[24]=e,h[30]=n,h[31]=r,h[37]=o,h[38]=a},setTargetUVs:function(t,e){var i=e.height/t.height;i=i>.5?.5-(i-.5):.5-i+.5,this.setUVs(0,i,0,1+i,1,1+i,1,i)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)},destroy:function(){return this.gl.deleteBuffer(this.quadVertexBuffer),this.drawSpriteShader=null,this.copyShader=null,this.gameShader=null,this.quadVertexData=null,this.quadVertexBuffer=null,this.quadVertexViewF32=null,this.fsTarget=null,this.tempSprite=null,a.prototype.destroy.call(this),this}});t.exports=f},60848:(t,e,i)=>{var s=i(2529),n=i(95723),r=i(56694),o=i(65246),a=i(37486),h=i(79060),l=i(72632),u=i(98921),c=i(99365),d=i(44775),p=new r({Extends:d,initialize:function(t){t.renderTarget=l(t,"renderTarget",[{scale:1},{scale:1},{scale:.5},{scale:.5}]),t.vertShader=l(t,"vertShader",c),t.shaders=l(t,"shaders",[{name:"Copy",fragShader:h},{name:"AddBlend",fragShader:s},{name:"LinearBlend",fragShader:u},{name:"ColorMatrix",fragShader:a}]),t.attributes=l(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],t.batchSize=1,d.call(this,t),this.colorMatrix=new o,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){d.prototype.boot.call(this);var t=this.shaders,e=this.renderTargets;this.copyShader=t[0],this.addShader=t[1],this.linearShader=t[2],this.colorMatrixShader=t[3],this.fullFrame1=e[0],this.fullFrame2=e[1],this.halfFrame1=e[2],this.halfFrame2=e[3]},copyFrame:function(t,e,i,s,n){void 0===i&&(i=1),void 0===s&&(s=!0),void 0===n&&(n=!0);var r=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,t.texture),e?(r.viewport(0,0,e.width,e.height),r.bindFramebuffer(r.FRAMEBUFFER,e.framebuffer),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.texture,0)):r.viewport(0,0,t.width,t.height),s&&(n?r.clearColor(0,0,0,0):r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT)),r.bufferData(r.ARRAY_BUFFER,this.vertexData,r.STATIC_DRAW),r.drawArrays(r.TRIANGLES,0,6),r.bindFramebuffer(r.FRAMEBUFFER,null),r.bindTexture(r.TEXTURE_2D,null)},blitFrame:function(t,e,i,s,r,o,a){void 0===i&&(i=1),void 0===s&&(s=!0),void 0===r&&(r=!0),void 0===o&&(o=!1),void 0===a&&(a=!1);var h=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,t.texture),t.height>e.height)h.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e);else{var l=e.height-t.height;h.viewport(0,l,t.width,t.height)}if(h.bindFramebuffer(h.FRAMEBUFFER,e.framebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,e.texture,0),s&&(r?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),o){var u=this.renderer.currentBlendMode;this.renderer.setBlendMode(n.ERASE)}a&&this.flipY(),h.bufferData(h.ARRAY_BUFFER,this.vertexData,h.STATIC_DRAW),h.drawArrays(h.TRIANGLES,0,6),o&&this.renderer.setBlendMode(u),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(t,e,i,s,n,r,o,a){void 0===o&&(o=!0),void 0===a&&(a=!0);var h=this.gl;h.bindFramebuffer(h.FRAMEBUFFER,t.framebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,t.texture,0),o&&(a?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,e.texture),h.copyTexSubImage2D(h.TEXTURE_2D,0,0,0,i,s,n,r),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null)},copyToGame:function(t){var e=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,t.texture),e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.STATIC_DRAW),e.drawArrays(e.TRIANGLES,0,6)},drawFrame:function(t,e,i,s){void 0===i&&(i=!0),void 0===s&&(s=this.colorMatrix);var n=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",s.getData()),this.set1f("uAlpha",s.alpha),n.activeTexture(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,t.texture),e?(n.viewport(0,0,e.width,e.height),n.bindFramebuffer(n.FRAMEBUFFER,e.framebuffer),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e.texture,0)):n.viewport(0,0,t.width,t.height),i?n.clearColor(0,0,0,0):n.clearColor(0,0,0,1),n.clear(n.COLOR_BUFFER_BIT),n.bufferData(n.ARRAY_BUFFER,this.vertexData,n.STATIC_DRAW),n.drawArrays(n.TRIANGLES,0,6),n.bindFramebuffer(n.FRAMEBUFFER,null),n.bindTexture(n.TEXTURE_2D,null)},blendFrames:function(t,e,i,s,n,r){void 0===s&&(s=1),void 0===n&&(n=!0),void 0===r&&(r=this.linearShader);var o=this.gl;this.setShader(r),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",s),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,t.texture),o.activeTexture(o.TEXTURE1),o.bindTexture(o.TEXTURE_2D,e.texture),i?(o.bindFramebuffer(o.FRAMEBUFFER,i.framebuffer),o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,i.texture,0),o.viewport(0,0,i.width,i.height)):o.viewport(0,0,t.width,t.height),n?o.clearColor(0,0,0,0):o.clearColor(0,0,0,1),o.clear(o.COLOR_BUFFER_BIT),o.bufferData(o.ARRAY_BUFFER,this.vertexData,o.STATIC_DRAW),o.drawArrays(o.TRIANGLES,0,6),o.bindFramebuffer(o.FRAMEBUFFER,null),o.bindTexture(o.TEXTURE_2D,null)},blendFramesAdditive:function(t,e,i,s,n){this.blendFrames(t,e,i,s,n,this.addShader)},clearFrame:function(t,e){void 0===e&&(e=!0);var i=this.gl;i.viewport(0,0,t.width,t.height),i.bindFramebuffer(i.FRAMEBUFFER,t.framebuffer),e?i.clearColor(0,0,0,0):i.clearColor(0,0,0,1),i.clear(i.COLOR_BUFFER_BIT);var s=this.renderer.currentFramebuffer;i.bindFramebuffer(i.FRAMEBUFFER,s)},setUVs:function(t,e,i,s,n,r,o,a){var h=this.vertexViewF32;h[2]=t,h[3]=e,h[6]=i,h[7]=s,h[10]=n,h[11]=r,h[14]=t,h[15]=e,h[18]=n,h[19]=r,h[22]=o,h[23]=a},setTargetUVs:function(t,e){var i=e.height/t.height;i=i>.5?.5-(i-.5):.5-i+.5,this.setUVs(0,i,0,1+i,1,1+i,1,i)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});t.exports=p},65641:t=>{t.exports={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline",MOBILE_PIPELINE:"MobilePipeline"}},68726:t=>{t.exports="pipelineafterflush"},67186:t=>{t.exports="pipelinebeforeflush"},22709:t=>{t.exports="pipelinebind"},74469:t=>{t.exports="pipelineboot"},93953:t=>{t.exports="pipelinedestroy"},51687:t=>{t.exports="pipelinerebind"},25034:t=>{t.exports="pipelineresize"},18970:(t,e,i)=>{t.exports={AFTER_FLUSH:i(68726),BEFORE_FLUSH:i(67186),BIND:i(22709),BOOT:i(74469),DESTROY:i(93953),REBIND:i(51687),RESIZE:i(25034)}},62253:(t,e,i)=>{var s=i(65641),n=i(98611),r={BitmapMaskPipeline:i(5583),Events:i(18970),LightPipeline:i(66901),MobilePipeline:i(71264),MultiPipeline:i(77310),PointLightPipeline:i(10919),PostFXPipeline:i(80486),RopePipeline:i(21213),SinglePipeline:i(51212),SpriteFXPipeline:i(38964),UtilityPipeline:i(60848)};r=n(!1,r,s),t.exports=r},2529:t=>{t.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = frame1 + frame2 * uStrength;","}",""].join("\n")},91679:t=>{t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;",""," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);",""," if (!uInvertMaskAlpha)"," {"," mainColor *= maskColor.a;"," }"," else"," {"," mainColor *= (1.0 - maskColor.a);"," }",""," gl_FragColor = mainColor;","}",""].join("\n")},89053:t=>{t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join("\n")},37486:t=>{t.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);",""," if (uAlpha == 0.0)"," {"," gl_FragColor = c;",""," return;"," }",""," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }",""," vec4 result;",""," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];",""," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);",""," rgb *= result.a;",""," gl_FragColor = vec4(rgb, result.a);","}",""].join("\n")},79060:t=>{t.exports=["#define SHADER_NAME PHASER_COPY_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uBrightness;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}",""].join("\n")},65045:t=>{t.exports=["#define SHADER_NAME PHASER_LIGHT_FS","","precision mediump float;","","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","","const int kMaxLights = %LIGHT_COUNT%;","","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","uniform int uLightCount;","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);",""," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;",""," for (int index = 0; index < kMaxLights; ++index)"," {"," if (index < uLightCount)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }"," }",""," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);",""," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}",""].join("\n")},98921:t=>{t.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}",""].join("\n")},53787:t=>{t.exports=["#define SHADER_NAME PHASER_MULTI_FS","","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","","uniform sampler2D uMainSampler[%count%];","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec4 texture;",""," %forloop%",""," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},15968:t=>{t.exports=["#define SHADER_NAME PHASER_MULTI_VS","","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join("\n")},83327:t=>{t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform float uCameraZoom;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);",""," float distToSurf = length(center - gl_FragCoord.xy);",""," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);",""," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);",""," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;",""," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}",""].join("\n")},54677:t=>{t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);",""," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}",""].join("\n")},12569:t=>{t.exports=["#define SHADER_NAME PHASER_POSTFX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}",""].join("\n")},99365:t=>{t.exports=["#define SHADER_NAME PHASER_QUAD_VS","","precision mediump float;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","","varying vec2 outFragCoord;","varying vec2 outTexCoord;","","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;",""," gl_Position = vec4(inPosition, 0, 1);","}",""].join("\n")},85060:t=>{t.exports=["#define SHADER_NAME PHASER_SINGLE_FS","","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},18166:t=>{t.exports=["#define SHADER_NAME PHASER_SINGLE_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join("\n")},756:(t,e,i)=>{var s=i(55301),n=i(56694),r=i(6659),o=i(40444),a=i(97081),h=i(74181),l=i(2893),u=i(9229),c=i(72283),d=i(74118),p=i(90881),f=i(84314),v=i(93736),g=i(47751),m=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.canvas,this.canvasBounds=new d,this.parent=null,this.parentIsWindow=!1,this.parentSize=new p,this.gameSize=new p,this.baseSize=new p,this.displaySize=new p,this.scaleMode=s.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new v(1,1),this.autoRound=!1,this.autoCenter=s.CENTER.NO_CENTER,this.orientation=s.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.domlisteners={orientationChange:c,windowResize:c,fullScreenChange:c,fullScreenError:c}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(a.BOOT,this.boot,this)},boot:function(){var t=this.game;this.canvas=t.canvas,this.fullscreen=t.device.fullscreen,this.scaleMode!==s.SCALE_MODE.RESIZE&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===s.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),t.events.on(a.PRE_STEP,this.step,this),t.events.once(a.READY,this.refresh,this),t.events.once(a.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e=t.width,i=t.height,n=t.scaleMode,r=t.zoom,o=t.autoRound;if("string"==typeof e){var a=this.parentSize.width;0===a&&(a=window.innerWidth);var h=parseInt(e,10)/100;e=Math.floor(a*h)}if("string"==typeof i){var l=this.parentSize.height;0===l&&(l=window.innerHeight);var c=parseInt(i,10)/100;i=Math.floor(l*c)}this.scaleMode=n,this.autoRound=o,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,o&&(e=Math.floor(e),i=Math.floor(i)),this.gameSize.setSize(e,i),r===s.ZOOM.MAX_ZOOM&&(r=this.getMaxZoom()),this.zoom=r,1!==r&&(this._resetZoom=!0),this.baseSize.setSize(e,i),o&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),t.minWidth>0&&this.displaySize.setMin(t.minWidth*r,t.minHeight*r),t.maxWidth>0&&this.displaySize.setMax(t.maxWidth*r,t.maxHeight*r),this.displaySize.setSize(e,i),this.orientation=u(e,i)},getParent:function(t){var e=t.parent;if(null!==e){if(this.parent=l(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==s.SCALE_MODE.NONE){var i=this.parent.getBoundingClientRect();(this.parentIsWindow||0===i.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",i=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==i.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(t.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var t=this.parentSize,e=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(e.height=h(!0));var i=e.width,s=e.height;if(t.width!==i||t.height!==s)return t.setSize(i,s),!0;if(this.canvas){var n=this.canvasBounds,r=this.canvas.getBoundingClientRect();if(r.x!==n.x||r.y!==n.y)return!0}return!1},lockOrientation:function(t){var e=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!e&&e.call(screen,t)},setParentSize:function(t,e){return this.parentSize.setSize(t,e),this.refresh()},setGameSize:function(t,e){var i=this.autoRound;i&&(t=Math.floor(t),e=Math.floor(e));var s=this.width,n=this.height;return this.gameSize.resize(t,e),this.baseSize.resize(t,e),i&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(t/e),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(s,n)},resize:function(t,e){var i=this.zoom,s=this.autoRound;s&&(t=Math.floor(t),e=Math.floor(e));var n=this.width,r=this.height;this.gameSize.resize(t,e),this.baseSize.resize(t,e),s&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t*i,e*i),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var o=this.canvas.style,a=t*i,h=e*i;return s&&(a=Math.floor(a),h=Math.floor(h)),a===t&&h===e||(o.width=a+"px",o.height=h+"px"),this.refresh(n,r)},setZoom:function(t){return this.zoom=t,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var i=this.game.domContainer;if(i){this.baseSize.setCSS(i);var s=this.canvas.style,n=i.style;n.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",n.marginLeft=s.marginLeft,n.marginTop=s.marginTop}return this.emit(o.RESIZE,this.gameSize,this.baseSize,this.displaySize,t,e),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var t=u(this.width,this.height);t!==this.orientation&&(this.orientation=t,this.emit(o.ORIENTATION_CHANGE,t))}},updateScale:function(){var t,e,i=this.canvas.style,n=this.gameSize.width,r=this.gameSize.height,o=this.zoom,a=this.autoRound;this.scaleMode===s.SCALE_MODE.NONE?(this.displaySize.setSize(n*o,r*o),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),this._resetZoom&&(i.width=t+"px",i.height=e+"px",this._resetZoom=!1)):this.scaleMode===s.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=f(this.parentSize.width,this.gameSize.width,0,!0),e=f(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t=this.autoCenter;if(t!==s.CENTER.NO_CENTER){var e=this.canvas,i=e.style,n=e.getBoundingClientRect(),r=n.width,o=n.height,a=Math.floor((this.parentSize.width-r)/2),h=Math.floor((this.parentSize.height-o)/2);t===s.CENTER.CENTER_HORIZONTALLY?h=0:t===s.CENTER.CENTER_VERTICALLY&&(a=0),i.marginLeft=a+"px",i.marginTop=h+"px"}},updateBounds:function(){var t=this.canvasBounds,e=this.canvas.getBoundingClientRect();t.x=e.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),t.y=e.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),t.width=e.width,t.height=e.height},transformX:function(t){return(t-this.canvasBounds.left)*this.displayScale.x},transformY:function(t){return(t-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(t){void 0===t&&(t={navigationUI:"hide"});var e=this.fullscreen;if(e.available){if(!e.active){var i=this.getFullscreenTarget();e.keyboard?i[e.request](Element.ALLOW_KEYBOARD_INPUT):i[e.request](t)}}else this.emit(o.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(o.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(o.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var t=document.createElement("div");t.style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0}this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas));return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var t=this.fullscreenTarget;if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(this.canvas,t),e.removeChild(t)}}},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(o.FULLSCREEN_UNSUPPORTED),!1;t.active&&document[t.cancel](),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(o.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var t=this,e=this.domlisteners;if(e.orientationChange=function(){t.updateBounds(),t._checkOrientation=!0,t.dirty=!0},e.windowResize=function(){t.updateBounds(),t.dirty=!0},window.addEventListener("orientationchange",e.orientationChange,!1),window.addEventListener("resize",e.windowResize,!1),this.fullscreen.available){e.fullScreenChange=function(e){return t.onFullScreenChange(e)},e.fullScreenError=function(e){return t.onFullScreenError(e)};["webkit","moz",""].forEach((function(t){document.addEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",e.fullScreenError,!1)})),document.addEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.addEventListener("MSFullscreenError",e.fullScreenError,!1)}},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():this.stopFullscreen()},onFullScreenError:function(){this.removeFullscreenTarget()},getViewPort:function(t,e){t instanceof g||(e=t,t=void 0),void 0===e&&(e=new d);var i,s,n=this.baseSize,r=this.parentSize,o=this.canvasBounds,a=this.displayScale,h=o.x>=0?0:-o.x*a.x,l=o.y>=0?0:-o.y*a.y;return i=r.width>=o.width?n.width:n.width-(o.width-r.width)*a.x,s=r.height>=o.height?n.height:n.height-(o.height-r.height)*a.y,e.setTo(h,l,i,s),t&&(e.width/=t.zoomX,e.height/=t.zoomY,e.centerX=t.centerX+t.scrollX,e.centerY=t.centerY+t.scrollY),e},step:function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var t=this.domlisteners;window.removeEventListener("orientationchange",t.orientationChange,!1),window.removeEventListener("resize",t.windowResize,!1);["webkit","moz",""].forEach((function(e){document.removeEventListener(e+"fullscreenchange",t.fullScreenChange,!1),document.removeEventListener(e+"fullscreenerror",t.fullScreenError,!1)})),document.removeEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",t.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===s.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===s.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=m},35098:t=>{t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},53539:t=>{t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},12637:t=>{t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},10217:t=>{t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},55301:(t,e,i)=>{var s={CENTER:i(35098),ORIENTATION:i(53539),SCALE_MODE:i(12637),ZOOM:i(10217)};t.exports=s},82085:t=>{t.exports="enterfullscreen"},11826:t=>{t.exports="fullscreenfailed"},56691:t=>{t.exports="fullscreenunsupported"},34739:t=>{t.exports="leavefullscreen"},26681:t=>{t.exports="orientationchange"},11428:t=>{t.exports="resize"},40444:(t,e,i)=>{t.exports={ENTER_FULLSCREEN:i(82085),FULLSCREEN_FAILED:i(11826),FULLSCREEN_UNSUPPORTED:i(56691),LEAVE_FULLSCREEN:i(34739),ORIENTATION_CHANGE:i(26681),RESIZE:i(11428)}},86754:(t,e,i)=>{var s=i(98611),n=i(55301),r={Center:i(35098),Events:i(40444),Orientation:i(53539),ScaleManager:i(756),ScaleModes:i(12637),Zoom:i(10217)};r=s(!1,r,n.CENTER),r=s(!1,r,n.ORIENTATION),r=s(!1,r,n.SCALE_MODE),r=s(!1,r,n.ZOOM),t.exports=r},47736:(t,e,i)=>{var s=i(72632),n=i(40587);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=s(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(n(e+"Physics")),i)for(var o in i)o=n(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},91088:(t,e,i)=>{var s=i(72632);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=s(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},90415:t=>{t.exports={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},87157:(t,e,i)=>{var s=i(56694),n=i(63946),r=new s({initialize:function(t){this.sys=new n(this,t),this.game,this.anims,this.cache,this.registry,this.sound,this.textures,this.events,this.cameras,this.add,this.make,this.scene,this.children,this.lights,this.data,this.input,this.load,this.time,this.tweens,this.physics,this.matter,this.scale,this.plugins,this.renderer},update:function(){}});t.exports=r},13553:(t,e,i)=>{var s=i(56694),n=i(92980),r=i(7599),o=i(97081),a=i(10850),h=i(683),l=i(72283),u=i(87157),c=i(63946),d=new s({initialize:function(t,e){if(this.game=t,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,e){Array.isArray(e)||(e=[e]);for(var i=0;i-1&&(delete this.keys[s],this.scenes.splice(i,1),this._start.indexOf(s)>-1&&(i=this._start.indexOf(s),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,s=i.settings;i.sceneUpdate=l,t.init&&(t.init.call(t,s.data),s.status=n.INIT,s.isTransition&&i.events.emit(r.TRANSITION_INIT,s.transitionFrom,s.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),s.status=n.LOADING,e.once(h.COMPLETE,this.loadComplete,this),e.start()):this.create(t)},loadComplete:function(t){this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(t.scene)},payloadComplete:function(t){this.bootScene(t.scene)},update:function(t,e){this.processQueue(),this.isProcessing=!0;for(var i=this.scenes.length-1;i>=0;i--){var s=this.scenes[i].sys;s.settings.status>n.START&&s.settings.status<=n.RUNNING&&s.step(t,e),s.scenePlugin._target&&s.scenePlugin.step(t,e)}},render:function(t){for(var e=0;e=n.LOADING&&i.settings.status=n.START&&o<=n.CREATING)return this;if(o>=n.RUNNING&&o<=n.SLEEPING)r.shutdown(),r.sceneUpdate=l,r.start(e);else if(r.sceneUpdate=l,r.start(e),r.load&&(s=r.load),s&&r.settings.hasOwnProperty("pack")&&(s.reset(),s.addPack({payload:r.settings.pack})))return r.settings.status=n.LOADING,s.once(h.COMPLETE,this.payloadComplete,this),s.start(),this;return this.bootScene(i),this},stop:function(t,e){var i=this.getScene(t);if(i&&!i.sys.isTransitioning()&&i.sys.settings.status!==n.SHUTDOWN){var s=i.sys.load;s.off(h.COMPLETE,this.loadComplete,this),s.off(h.COMPLETE,this.payloadComplete,this),i.sys.shutdown(e)}return this},switch:function(t,e){var i=this.getScene(t),s=this.getScene(e);return i&&s&&i!==s&&(this.sleep(t),this.isSleeping(e)?this.wake(e):this.start(e)),this},getAt:function(t){return this.scenes[t]},getIndex:function(t){var e=this.getScene(t);return this.scenes.indexOf(e)},bringToTop:function(t){if(this.isProcessing)this._queue.push({op:"bringToTop",keyA:t,keyB:null});else{var e=this.getIndex(t);if(-1!==e&&e0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,s=this.getScene(t),n=this.getAt(i);this.scenes[e]=n,this.scenes[i]=s}}return this},moveUp:function(t){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(ei),0,n)}}return this},moveBelow:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:t,keyB:e});else{var i=this.getIndex(t),s=this.getIndex(e);if(-1!==i&&-1!==s&&s>i){var n=this.getAt(s);this.scenes.splice(s,1),0===i?this.scenes.unshift(n):this.scenes.splice(i-(s{var s=i(82897),n=i(56694),r=i(7599),o=i(72632),a=i(91963),h=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.pluginStart,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=o(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var s=o(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=s,this._willSleep=o(t,"sleep",!1),this._willRemove=o(t,"remove",!1);var n=o(t,"onUpdate",null);n&&(this._onUpdate=n,this._onUpdateScope=o(t,"onUpdateScope",this.scene));var a=o(t,"allowInput",!1);this.settings.transitionAllowInput=a;var h=i.sys.settings;h.isTransition=!0,h.transitionFrom=this.scene,h.transitionDuration=s,h.transitionAllowInput=a,o(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):o(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake(o(t,"data")):this.manager.start(e,o(t,"data"));var l=o(t,"onStart",null),u=o(t,"onStartScope",this.scene);return l&&l.call(u,this.scene,i,s),this.systems.events.emit(r.TRANSITION_OUT,i,s),!0},checkValidTransition:function(t){return!(!t||t.sys.isActive()||t.sys.isTransitioning()||t===this.scene||this.systems.isTransitioning())},step:function(t,e){this._elapsed+=e,this.transitionProgress=s(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;t.events.emit(r.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(t,e,i,s){return this.manager.add(t,e,i,s)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var s=this.manager.getScene(e);return s&&s.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getStatus:function(t){var e=this.manager.getScene(t);if(e)return e.sys.getStatus()},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(r.SHUTDOWN,this.shutdown,this),t.off(r.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});a.register("ScenePlugin",h,"scenePlugin"),t.exports=h},36765:(t,e,i)=>{var s=i(92980),n=i(10850),r=i(30657),o=i(90415),a={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:s.PENDING,key:n(t,"key",""),active:n(t,"active",!1),visible:n(t,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:n(t,"pack",!1),cameras:n(t,"cameras",null),map:n(t,"map",r(o,n(t,"mapAdd",{}))),physics:n(t,"physics",{}),loader:n(t,"loader",{}),plugins:n(t,"plugins",!1),input:n(t,"input",{})}}};t.exports=a},63946:(t,e,i)=>{var s=i(56694),n=i(92980),r=i(18360),o=i(7599),a=i(47736),h=i(91088),l=i(72283),u=i(36765),c=new s({initialize:function(t,e){this.scene=t,this.game,this.renderer,this.config=e,this.settings=u.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.scale,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList,this.sceneUpdate=l},init:function(t){this.settings.status=n.INIT,this.sceneUpdate=l,this.game=t,this.renderer=t.renderer,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.addToScene(this,r.Global,[r.CoreScene,h(this),a(this)]),this.events.emit(o.BOOT,this),this.settings.isBooted=!0},step:function(t,e){var i=this.events;i.emit(o.PRE_UPDATE,t,e),i.emit(o.UPDATE,t,e),this.sceneUpdate.call(this.scene,t,e),i.emit(o.POST_UPDATE,t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.events.emit(o.PRE_RENDER,t),this.cameras.render(t,e),this.events.emit(o.RENDER,t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(t){var e=this.settings,i=this.getStatus();return i!==n.CREATING&&i!==n.RUNNING?console.warn("Cannot pause non-running Scene",e.key):this.settings.active&&(e.status=n.PAUSED,e.active=!1,this.events.emit(o.PAUSE,this,t)),this},resume:function(t){var e=this.events,i=this.settings;return this.settings.active||(i.status=n.RUNNING,i.active=!0,e.emit(o.RESUME,this,t)),this},sleep:function(t){var e=this.settings,i=this.getStatus();return i!==n.CREATING&&i!==n.RUNNING?console.warn("Cannot sleep non-running Scene",e.key):(e.status=n.SLEEPING,e.active=!1,e.visible=!1,this.events.emit(o.SLEEP,this,t)),this},wake:function(t){var e=this.events,i=this.settings;return i.status=n.RUNNING,i.active=!0,i.visible=!0,e.emit(o.WAKE,this,t),i.isTransition&&e.emit(o.TRANSITION_WAKE,i.transitionFrom,i.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var t=this.settings.status;return t>n.PENDING&&t<=n.RUNNING},isSleeping:function(){return this.settings.status===n.SLEEPING},isActive:function(){return this.settings.status===n.RUNNING},isPaused:function(){return this.settings.status===n.PAUSED},isTransitioning:function(){return this.settings.isTransition||null!==this.scenePlugin._target},isTransitionOut:function(){return null!==this.scenePlugin._target&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){var e=this.events,i=this.settings;t&&(i.data=t),i.status=n.START,i.active=!0,i.visible=!0,e.emit(o.START,this),e.emit(o.READY,this,t)},shutdown:function(t){var e=this.events,i=this.settings;e.off(o.TRANSITION_INIT),e.off(o.TRANSITION_START),e.off(o.TRANSITION_COMPLETE),e.off(o.TRANSITION_OUT),i.status=n.SHUTDOWN,i.active=!1,i.visible=!1,e.emit(o.SHUTDOWN,this,t)},destroy:function(){var t=this.events,e=this.settings;e.status=n.DESTROYED,e.active=!1,e.visible=!1,t.emit(o.DESTROY,this),t.removeAllListeners();for(var i=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],s=0;s{t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},31803:t=>{t.exports="addedtoscene"},94817:t=>{t.exports="boot"},28977:t=>{t.exports="create"},91959:t=>{t.exports="destroy"},363:t=>{t.exports="pause"},15643:t=>{t.exports="postupdate"},17058:t=>{t.exports="prerender"},77125:t=>{t.exports="preupdate"},76018:t=>{t.exports="ready"},28620:t=>{t.exports="removedfromscene"},41538:t=>{t.exports="render"},34268:t=>{t.exports="resume"},2342:t=>{t.exports="shutdown"},96541:t=>{t.exports="sleep"},74244:t=>{t.exports="start"},17046:t=>{t.exports="transitioncomplete"},13637:t=>{t.exports="transitioninit"},14733:t=>{t.exports="transitionout"},33899:t=>{t.exports="transitionstart"},52418:t=>{t.exports="transitionwake"},31735:t=>{t.exports="update"},8470:t=>{t.exports="wake"},7599:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(31803),BOOT:i(94817),CREATE:i(28977),DESTROY:i(91959),PAUSE:i(363),POST_UPDATE:i(15643),PRE_RENDER:i(17058),PRE_UPDATE:i(77125),READY:i(76018),REMOVED_FROM_SCENE:i(28620),RENDER:i(41538),RESUME:i(34268),SHUTDOWN:i(2342),SLEEP:i(96541),START:i(74244),TRANSITION_COMPLETE:i(17046),TRANSITION_INIT:i(13637),TRANSITION_OUT:i(14733),TRANSITION_START:i(33899),TRANSITION_WAKE:i(52418),UPDATE:i(31735),WAKE:i(8470)}},20436:(t,e,i)=>{var s=i(92980),n=i(98611),r={Events:i(7599),GetPhysicsPlugins:i(47736),GetScenePlugins:i(91088),SceneManager:i(13553),ScenePlugin:i(64051),Settings:i(36765),Systems:i(63946)};r=n(!1,r,s),t.exports=r},25798:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(76038),o=i(98611),a=i(72283),h=new s({Extends:n,initialize:function(t,e,i){n.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=o(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),!1):(t=o(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=o(!0,this.markers[t.name],t),!0):(console.warn("Audio Marker: "+t.name+" missing in Sound: "+this.key),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return console.warn("Marker: "+t+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=o(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop,this.pan=this.currentConfig.pan},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:a,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e},destroy:function(){this.pendingRemove||(this.emit(r.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});t.exports=h},12486:(t,e,i)=>{var s=i(56694),n=i(32742),r=i(6659),o=i(76038),a=i(97081),h=i(72283),l=i(71608),u=i(51463),c=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.jsonCache=t.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,t.events.on(a.BLUR,this.onGameBlur,this),t.events.on(a.FOCUS,this.onGameFocus,this),t.events.on(a.PRE_STEP,this.update,this),t.events.once(a.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var s in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(s)){var r=n(e),o=i.spritemap[s];r.loop=!!o.hasOwnProperty("loop")&&o.loop,i.addMarker({name:s,start:o.start,duration:o.end-o.start,config:r})}return i},get:function(t){return u(this.sounds,"key",t)},getAll:function(t){return t?l(this.sounds,"key",t):l(this.sounds)},getAllPlaying:function(){return l(this.sounds,"isPlaying",!0)},play:function(t,e){var i=this.add(t);return i.once(o.COMPLETE,i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var s=this.addAudioSprite(t);return s.once(o.COMPLETE,s.destroy,s),s.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeAll:function(){this.sounds.forEach((function(t){t.destroy()})),this.sounds.length=0},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var s=this.sounds[i];s.key===t&&(s.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound((function(t){t.pause()})),this.emit(o.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound((function(t){t.resume()})),this.emit(o.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound((function(t){t.stop()})),this.emit(o.STOP_ALL,this)},stopByKey:function(t){var e=0;return this.getAll(t).forEach((function(t){t.stop()&&e++})),e},unlock:h,onBlur:h,onFocus:h,onGameBlur:function(){this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.pauseOnBlur&&this.onFocus()},update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(o.UNLOCKED,this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach((function(i){i.update(t,e)}))},destroy:function(){this.game.events.off(a.BLUR,this.onGameBlur,this),this.game.events.off(a.FOCUS,this.onGameFocus,this),this.game.events.off(a.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach((function(s,n){s&&!s.pendingRemove&&t.call(e||i,s,n,i.sounds)}))},setRate:function(t){return this.rate=t,this},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound((function(t){t.calculateRate()})),this.emit(o.GLOBAL_RATE,this,t)}},setDetune:function(t){return this.detune=t,this},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound((function(t){t.calculateRate()})),this.emit(o.GLOBAL_DETUNE,this,t)}}});t.exports=c},84191:(t,e,i)=>{var s=i(27622),n=i(17546),r=i(55491),o={create:function(t){var e=t.config.audio,i=t.device.audio;return e.noAudio||!i.webAudio&&!i.audioData?new n(t):i.webAudio&&!e.disableWebAudio?new r(t):new s(t)}};t.exports=o},77578:t=>{t.exports="complete"},19679:t=>{t.exports="decodedall"},56951:t=>{t.exports="decoded"},16436:t=>{t.exports="destroy"},55154:t=>{t.exports="detune"},57818:t=>{t.exports="detune"},57890:t=>{t.exports="mute"},83022:t=>{t.exports="rate"},99170:t=>{t.exports="volume"},64289:t=>{t.exports="looped"},67214:t=>{t.exports="loop"},53128:t=>{t.exports="mute"},73078:t=>{t.exports="pan"},76763:t=>{t.exports="pauseall"},88426:t=>{t.exports="pause"},13765:t=>{t.exports="play"},80291:t=>{t.exports="rate"},11124:t=>{t.exports="resumeall"},55382:t=>{t.exports="resume"},71157:t=>{t.exports="seek"},31776:t=>{t.exports="stopall"},39450:t=>{t.exports="stop"},21939:t=>{t.exports="unlocked"},33019:t=>{t.exports="volume"},76038:(t,e,i)=>{t.exports={COMPLETE:i(77578),DECODED:i(56951),DECODED_ALL:i(19679),DESTROY:i(16436),DETUNE:i(55154),GLOBAL_DETUNE:i(57818),GLOBAL_MUTE:i(57890),GLOBAL_RATE:i(83022),GLOBAL_VOLUME:i(99170),LOOP:i(67214),LOOPED:i(64289),MUTE:i(53128),PAN:i(73078),PAUSE_ALL:i(76763),PAUSE:i(88426),PLAY:i(13765),RATE:i(80291),RESUME_ALL:i(11124),RESUME:i(55382),SEEK:i(71157),STOP_ALL:i(31776),STOP:i(39450),UNLOCKED:i(21939),VOLUME:i(33019)}},34350:(t,e,i)=>{var s=i(25798),n=i(56694),r=i(76038),o=i(82897),a=new n({Extends:s,initialize:function(t,e,i){if(void 0===i&&(i={}),this.tags=t.game.cache.audio.get(e),!this.tags)throw new Error('No cached audio asset with key "'+e);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,s.call(this,t,e,i)},play:function(t,e){return!this.manager.isLocked(this,"play",[t,e])&&(!!s.prototype.play.call(this,t,e)&&(!!this.pickAndPlayAudioTag()&&(this.emit(r.PLAY,this),!0)))},pause:function(){return!this.manager.isLocked(this,"pause")&&(!(this.startTime>0)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(r.PAUSE,this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!s.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit(r.RESUME,this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!s.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(r.STOP,this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=i-this.manager.loopEndOffset?(this.audio.currentTime=e+Math.max(0,s-i),s=this.audio.currentTime):s=i)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(r.COMPLETE,this);this.previousTime=s}},destroy:function(){s.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=o(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){s.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.updateMute(),this.emit(r.MUTE,this,t))}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.updateVolume(),this.emit(r.VOLUME,this,t))}},setVolume:function(t){return this.volume=t,this},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,r.RATE,t)||(this.calculateRate(),this.emit(r.RATE,this,t))}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,r.DETUNE,t)||(this.calculateRate(),this.emit(r.DETUNE,this,t))}},setDetune:function(t){return this.detune=t,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit(r.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit(r.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this},pan:{get:function(){return this.currentConfig.pan},set:function(t){this.currentConfig.pan=t,this.emit(r.PAN,this,t)}},setPan:function(t){return this.pan=t,this}});t.exports=a},27622:(t,e,i)=>{var s=i(12486),n=i(56694),r=i(76038),o=i(34350),a=new n({Extends:s,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,s.call(this,t)},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},unlock:function(){this.locked=!1;var t=this;if(this.game.cache.audio.entries.each((function(e,i){for(var s=0;s{t.exports={SoundManagerCreator:i(84191),Events:i(76038),BaseSound:i(25798),BaseSoundManager:i(12486),WebAudioSound:i(96008),WebAudioSoundManager:i(55491),HTML5AudioSound:i(34350),HTML5AudioSoundManager:i(27622),NoAudioSound:i(38662),NoAudioSoundManager:i(17546)}},38662:(t,e,i)=>{var s=i(25798),n=i(56694),r=i(6659),o=i(98611),a=i(72283),h=function(){return!1},l=function(){return null},u=function(){return this},c=new n({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.pan=0,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:h,updateMarker:h,removeMarker:l,play:h,pause:h,resume:h,stop:h,setMute:u,setVolume:u,setRate:u,setDetune:u,setSeek:u,setLoop:u,setPan:u,applyConfig:l,resetConfig:l,update:a,calculateRate:l,destroy:function(){s.prototype.destroy.call(this)}});t.exports=c},17546:(t,e,i)=>{var s=i(12486),n=i(56694),r=i(6659),o=i(38662),a=i(72283),h=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},get:function(t){return s.prototype.get.call(this,t)},getAll:function(t){return s.prototype.getAll.call(this,t)},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return s.prototype.remove.call(this,t)},removeAll:function(){return s.prototype.removeAll.call(this)},removeByKey:function(t){return s.prototype.removeByKey.call(this,t)},stopByKey:function(t){return s.prototype.stopByKey.call(this,t)},onBlur:a,onFocus:a,onGameBlur:a,onGameFocus:a,pauseAll:a,resumeAll:a,stopAll:a,update:a,setRate:a,setDetune:a,setMute:a,setVolume:a,unlock:a,forEachActiveSound:function(t,e){s.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){s.prototype.destroy.call(this)}});t.exports=h},96008:(t,e,i)=>{var s=i(25798),n=i(56694),r=i(76038),o=new n({Extends:s,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('Audio key "'+e+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.pannerNode=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),t.context.createStereoPanner?(this.pannerNode=t.context.createStereoPanner(),this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(t.destination)):this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,s.call(this,t,e,i)},play:function(t,e){return!!s.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime{var s=i(82329),n=i(12486),r=i(56694),o=i(76038),a=i(97081),h=i(96008),l=new r({Extends:n,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),n.call(this,t),this.locked&&t.isBooted?this.unlock():t.events.once(a.BOOT,this.unlock,this)},createAudioContext:function(t){var e=t.config.audio;return e.context?(e.context.resume(),e.context):window.hasOwnProperty("AudioContext")?new AudioContext:window.hasOwnProperty("webkitAudioContext")?new window.webkitAudioContext:void 0},setAudioContext:function(t){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=t,this.masterMuteNode=t.createGain(),this.masterVolumeNode=t.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(t.destination),this.destination=this.masterMuteNode,this},add:function(t,e){var i=new h(this,t,e);return this.sounds.push(i),i},decodeAudio:function(t,e){var i;i=Array.isArray(t)?t:[{key:t,data:e}];for(var n=this.game.cache.audio,r=i.length,a=0;a{var s=i(59959),n=i(56694),r=i(72283),o=i(17922),a=new n({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=r,this.removeCallback=r,this._sortKey=""},add:function(t,e){return e?s.Add(this.list,t):s.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?s.AddAt(this.list,t,e):s.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),o(this.list,e),this):this},getByName:function(t){return s.GetFirst(this.list,"name",t)},getRandom:function(t,e){return s.GetRandom(this.list,t,e)},getFirst:function(t,e,i,n){return s.GetFirst(this.list,t,e,i,n)},getAll:function(t,e,i,n){return s.GetAll(this.list,t,e,i,n)},count:function(t,e){return s.CountAllMatching(this.list,t,e)},swap:function(t,e){s.Swap(this.list,t,e)},moveTo:function(t,e){return s.MoveTo(this.list,t,e)},moveAbove:function(t,e){return s.MoveAbove(this.list,t,e)},moveBelow:function(t,e){return s.MoveBelow(this.list,t,e)},remove:function(t,e){return e?s.Remove(this.list,t):s.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?s.RemoveAt(this.list,t):s.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?s.RemoveBetween(this.list,t,e):s.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return s.BringToTop(this.list,t)},sendToBack:function(t){return s.SendToBack(this.list,t)},moveUp:function(t){return s.MoveUp(this.list,t),t},moveDown:function(t){return s.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return s.Shuffle(this.list),this},replace:function(t,e){return s.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,n){return s.SetAll(this.list,t,e,i,n),this},each:function(t,e){for(var i=[null],s=2;s0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=a},33885:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e{var s=i(56694),n=i(6659),r=i(36716),o=new s({Extends:n,initialize:function(){n.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(t){return this._active.indexOf(t)>-1},isPending:function(t){return this._toProcess>0&&this._pending.indexOf(t)>-1},isDestroying:function(t){return this._destroy.indexOf(t)>-1},add:function(t){return this.checkQueue&&this.isActive()&&!this.isDestroying()||this.isPending()||(this._pending.push(t),this._toProcess++),t},remove:function(t){if(this.isPending(t)){var e=this._pending,i=e.indexOf(t);-1!==i&&e.splice(i,1)}else this.isActive(t)&&(this._destroy.push(t),this._toProcess++);return t},removeAll:function(){for(var t=this._active,e=this._destroy,i=t.length;i--;)e.push(t[i]),this._toProcess++;return this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,s=this._active;for(t=0;t{var s=i(53466);function n(t){if(!(this instanceof n))return new n(t,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function r(t,e,i){if(!i)return e.indexOf(t);for(var s=0;s=t.minX&&e.maxY>=t.minY}function v(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,e,i,n,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=n||(o=e+Math.ceil((i-e)/n/2)*n,s(t,o,e,i,r),a.push(e,o,o,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],s=this.toBBox;if(!f(t,e))return i;for(var n,r,o,a,h=[];e;){for(n=0,r=e.children.length;n=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},_split:function(t,e){var i=t[e],s=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,s);var r=this._chooseSplitIndex(i,n,s),a=v(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=v([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var s,n,r,o,h,l,u,d,p,f,v,g,m,y;for(l=u=1/0,s=e;s<=i-e;s++)n=a(t,0,s,this.toBBox),r=a(t,s,i,this.toBBox),p=n,f=r,v=void 0,g=void 0,m=void 0,y=void 0,v=Math.max(p.minX,f.minX),g=Math.max(p.minY,f.minY),m=Math.min(p.maxX,f.maxX),y=Math.min(p.maxY,f.maxY),o=Math.max(0,m-v)*Math.max(0,y-g),h=c(n)+c(r),o=e;n--)r=t.children[n],h(u,t.leaf?o(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var s=i;s>=0;s--)h(e[s],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=n},58403:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){if(this.entries=[],Array.isArray(t))for(var e=0;e-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new s;return t.entries.forEach((function(t){e.set(t)})),this.entries.forEach((function(t){e.set(t)})),e},intersect:function(t){var e=new s;return this.entries.forEach((function(i){t.contains(i)&&e.set(i)})),e},difference:function(t){var e=new s;return this.entries.forEach((function(i){t.contains(i)||e.set(i)})),e},size:{get:function(){return this.entries.length},set:function(t){return t{var s=i(82897),n=i(56694),r=i(84314),o=i(93736),a=new n({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=null),this._width=t,this._height=e,this._parent=s,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=s(t,0,this.maxWidth),this.minHeight=s(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=s(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=s(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=s(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=s(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var s=this.snapTo,n=0===e?1:t/e;return i&&this.aspectRatio>n||!i&&this.aspectRatio0&&(t=(e=r(e,s.y))*this.aspectRatio)):(i&&this.aspectRation)&&(t=(e=r(e,s.y))*this.aspectRatio,s.x>0&&(e=(t=r(t,s.x))*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(t){t&&t.style&&(t.style.width=this._width+"px",t.style.height=this._height+"px")},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});a.NONE=0,a.WIDTH_CONTROLS_HEIGHT=1,a.HEIGHT_CONTROLS_WIDTH=2,a.FIT=3,a.ENVELOP=4,t.exports=a},94160:t=>{t.exports="add"},95393:t=>{t.exports="remove"},36716:(t,e,i)=>{t.exports={PROCESS_QUEUE_ADD:i(94160),PROCESS_QUEUE_REMOVE:i(95393)}},20010:(t,e,i)=>{t.exports={Events:i(36716),List:i(71207),Map:i(33885),ProcessQueue:i(74623),RTree:i(68687),Set:i(58403),Size:i(90881)}},17487:(t,e,i)=>{var s=i(56694),n=i(82897),r=i(27119),o=i(86459),a=i(28621),h=i(31673),l=new s({Extends:h,initialize:function(t,e,i,s,n){h.call(this,t,e,i,s,n),this.add("__BASE",0,0,0,s,n),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=s,this.height=n,this.imageData=this.context.getImageData(0,0,s,n),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===o.WEBGL&&this.refresh(),this},draw:function(t,e,i){return this.context.drawImage(i,t,e),this.update()},drawFrame:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0);var n=this.manager.getFrame(t,e);if(n){var r=n.canvasData,o=n.cutWidth,a=n.cutHeight,h=n.source.resolution;return this.context.drawImage(n.source.image,r.x,r.y,o,a,i,s,o/h,a/h),this.update()}return this},setPixel:function(t,e,i,s,n,r){if(void 0===r&&(r=255),t=Math.abs(Math.floor(t)),e=Math.abs(Math.floor(e)),this.getIndex(t,e)>-1){var o=this.context.getImageData(t,e,1,1);o.data[0]=i,o.data[1]=s,o.data[2]=n,o.data[3]=r,this.context.putImageData(o,t,e)}return this},putData:function(t,e,i,s,n,r,o){return void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=t.width),void 0===o&&(o=t.height),this.context.putImageData(t,e,i,s,n,r,o),this},getData:function(t,e,i,s){return t=n(Math.floor(t),0,this.width-1),e=n(Math.floor(e),0,this.height-1),i=n(i,1,this.width-t),s=n(s,1,this.height-e),this.context.getImageData(t,e,i,s)},getPixel:function(t,e,i){i||(i=new r);var s=this.getIndex(t,e);if(s>-1){var n=this.data,o=n[s+0],a=n[s+1],h=n[s+2],l=n[s+3];i.setTo(o,a,h,l)}return i},getPixels:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===s&&(s=i),t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e));for(var o=n(t,0,this.width),a=n(t+i,0,this.width),h=n(e,0,this.height),l=n(e+s,0,this.height),u=new r,c=[],d=h;d{var s=i(95723),n=i(51052),r=i(61068),o=i(56694),a=i(86459),h=i(82047),l=i(72632),u=i(65641),c=i(37410),d=i(31673),p=i(75512),f=new o({Extends:d,initialize:function(t,e,i,s){void 0===i&&(i=256),void 0===s&&(s=256),this.type="DynamicTexture";var o=t.game.renderer,h=o&&o.type===a.CANVAS,l=h?r.create2D(this,i,s):[this];d.call(this,t,e,l,i,s),this.add("__BASE",0,0,0,i,s),this.renderer=o,this.isDrawing=!1,this.canvas=h?l:null,this.context=h?l.getContext("2d"):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new n(0,0,i,s).setScene(t.game.scene.systemScene,!1),this.renderTarget=h?null:new c(o,i,s,1,0,!1),this.pipeline=h?null:o.pipelines.get(u.SINGLE_PIPELINE),this.setSize(i,s)},setSize:function(t,e){void 0===e&&(e=t);var i=this.get(),s=i.source;if(t!==this.width||e!==this.height){this.canvas&&(this.canvas.width=t,this.canvas.height=e);var n=this.renderTarget;n&&(n.resize(t,e),i.glTexture=n.texture,s.isRenderTexture=!0,s.isGLTexture=!0,s.glTexture=n.texture,s.glTexture.flipY=!0),this.camera.setSize(t,e),s.width=t,s.height=e,i.setSize(t,e),this.width=t,this.height=e}else{var r=this.getSourceImage();i.cutX+t>r.width&&(t=r.width-i.cutX),i.cutY+e>r.height&&(e=r.height-i.cutY),i.setSize(t,e,i.cutX,i.cutY)}return this},setIsSpriteTexture:function(t){return this.isSpriteTexture=t,this},fill:function(t,e,i,s,n,r){var o=this.camera,a=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=this.width),void 0===r&&(r=this.height);var h=t>>16&255,l=t>>8&255,u=255&t,c=this.renderTarget;if(o.preRender(),c){c.bind(!0);var d=this.pipeline.manager.set(this.pipeline),f=a.width/c.width,v=a.height/c.height;d.drawFillRect(i*f,s*v,n*f,r*v,p.getTintFromFloats(u/255,l/255,h/255,1),e),c.unbind(!0)}else{var g=this.context;a.setContext(g),g.globalCompositeOperation="source-over",g.fillStyle="rgba("+h+","+l+","+u+","+e+")",g.fillRect(i,s,n,r),a.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var t=this.context,e=this.renderTarget;e?e.clear():t&&(t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,this.width,this.height),t.restore()),this.dirty=!1}return this},stamp:function(t,e,i,s,n){void 0===i&&(i=0),void 0===s&&(s=0);var r=l(n,"alpha",1),o=l(n,"tint",16777215),a=l(n,"angle",0),h=l(n,"rotation",0),u=l(n,"scale",1),c=l(n,"scaleX",u),d=l(n,"scaleY",u),p=l(n,"originX",.5),f=l(n,"originY",.5),v=l(n,"blendMode",0),g=l(n,"erase",!1),m=this.manager.resetStamp(r,o);return m.setAngle(0),0!==a?m.setAngle(a):0!==h&&m.setRotation(h),m.setScale(c,d),m.setTexture(t,e),m.setOrigin(p,f),m.setBlendMode(v),g&&(this._eraseMode=!0),this.draw(m,i,s),g&&(this._eraseMode=!1),this},erase:function(t,e,i){return this._eraseMode=!0,this.draw(t,e,i),this._eraseMode=!1,this},draw:function(t,e,i,s,n){return this.beginDraw(),this.batchDraw(t,e,i,s,n),this.endDraw(),this},drawFrame:function(t,e,i,s,n,r){return this.beginDraw(),this.batchDrawFrame(t,e,i,s,n,r),this.endDraw(),this},repeat:function(t,e,i,s,n,r,o,a,l){if(void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=this.width),void 0===r&&(r=this.height),void 0===o&&(o=1),void 0===a&&(a=16777215),void 0===l&&(l=!1),!(e=t instanceof h?t:this.manager.getFrame(t,e)))return this;var u=this.manager.resetStamp(o,a);u.setFrame(e),u.setOrigin(0);var c=e.width,d=e.height;n=Math.floor(n),r=Math.floor(r);var p=Math.ceil(n/c),f=Math.ceil(r/d),v=p*c-n,g=f*d-r;v>0&&(v=c-v),g>0&&(g=d-g),i<0&&(p+=Math.ceil(Math.abs(i)/c)),s<0&&(f+=Math.ceil(Math.abs(s)/d));var m=i,y=s,x=!1,T=this.manager.stampCrop.setTo(0,0,c,d);l||this.beginDraw();for(var w=0;w0&&b===p-1&&(x=!0,T.width=v),g>0&&w===f-1&&(x=!0,T.height=g),x&&u.setCrop(T),this.batchGameObject(u,m,y),u.isCropped=!1,T.setTo(0,0,c,d)),m+=c;m=i,y+=d}return l||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var t=this.camera,e=this.renderer,i=this.renderTarget;t.preRender(),i?e.beginCapture(i.width,i.height):e.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(t,e,i,s,n){return Array.isArray(t)||(t=[t]),this.batchList(t,e,i,s,n),this},batchDrawFrame:function(t,e,i,s,n,r){void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=1),void 0===r&&(r=16777215);var o=this.manager.getFrame(t,e);return o&&(this.renderTarget?this.pipeline.batchTextureFrame(o,i,s,r,n,this.camera.matrix,null):this.batchTextureFrame(o,i,s,n,r)),this},endDraw:function(t){if(void 0===t&&(t=this._eraseMode),this.isDrawing){var e=this.renderer,i=this.renderTarget;if(i){var s=e.endCapture();e.pipelines.setUtility().blitFrame(s,i,1,!1,!1,t,this.isSpriteTexture),e.resetScissor(),e.resetViewport()}else e.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(t,e,i,s,n){var r=t.length;if(0!==r)for(var o=0;o0&&a.height>0&&o.drawImage(h,a.x,a.y,a.width,a.height,e,i,a.width,a.height),o.restore()}},snapshotArea:function(t,e,i,s,n,r,o){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,n,!1,t,e,i,s,r,o):this.renderer.snapshotCanvas(this.canvas,n,!1,t,e,i,s,r,o),this},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.width,this.height,t,e,i)},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i,"pixel")},renderWebGL:function(t,e,i,s){var n=this.manager.resetStamp();n.setTexture(this),n.setOrigin(0),n.renderWebGL(t,n,i,s)},renderCanvas:function(){},preDestroy:function(){r.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.stamp.destroy(),this.canvas=null,this.context=null,this.renderer=null,this.scene=null}});t.exports=f},82047:(t,e,i)=>{var s=i(56694),n=i(82897),r=i(98611),o=new s({initialize:function(t,e,i,s,n,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(r,o,s,n)},setSize:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0),this.cutX=i,this.cutY=s,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var n=this.data,r=n.cut;r.x=i,r.y=s,r.w=t,r.h=e,r.r=i+t,r.b=s+e,n.sourceSize.w=t,n.sourceSize.h=e,n.spriteSourceSize.w=t,n.spriteSourceSize.h=e,n.radius=.5*Math.sqrt(t*t+e*e);var o=n.drawImage;return o.x=i,o.y=s,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,s,n,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=s,a.w=n,a.h=r,a.r=i+n,a.b=s+r,this.x=i,this.y=s,this.width=n,this.height=r,this.halfWidth=.5*n,this.halfHeight=.5*r,this.centerX=Math.floor(n/2),this.centerY=Math.floor(r/2),this.updateUVs()},setCropUVs:function(t,e,i,s,r,o,a){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,p=this.realHeight,f=h+(e=n(e,0,d)),v=l+(i=n(i,0,p)),g=s=n(s,0,d-e),m=r=n(r,0,p-i),y=this.data;if(y.trim){var x=y.spriteSourceSize,T=e+(s=n(s,0,u-e)),w=i+(r=n(r,0,c-i));if(!(x.rT||x.y>w)){var b=Math.max(x.x,e),E=Math.max(x.y,i),S=Math.min(x.r,T)-b,A=Math.min(x.b,w)-E;g=S,m=A,f=o?h+(u-(b-x.x)-S):h+(b-x.x),v=a?l+(c-(E-x.y)-A):l+(E-x.y),e=b,i=E,s=S,r=A}else f=0,v=0,g=0,m=0}else o&&(f=h+(u-e-s)),a&&(v=l+(c-i-r));var C=this.source.width,_=this.source.height;return t.u0=Math.max(0,f/C),t.v0=Math.max(0,v/_),t.u1=Math.min(1,(f+g)/C),t.v1=Math.min(1,(v+m)/_),t.x=e,t.y=i,t.cx=f,t.cy=v,t.cw=g,t.ch=m,t.width=s,t.height=r,t.flipX=o,t.flipY=a,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,s,n,r){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=s,this.u1=n,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,s=this.cutHeight,n=this.data.drawImage;n.width=i,n.height=s;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=e/o,this.u1=(t+i)/r,this.v1=(e+s)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new o(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=r(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=o},31673:(t,e,i)=>{var s=i(56694),n=i(82047),r=i(32547),o='Texture "%s" has no frame "%s"',a=new s({initialize:function(t,e,i,s,n){Array.isArray(i)||(i=[i]),this.manager=t,this.key=e,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var o=0;o{var s=i(61068),n=i(17487),r=i(56694),o=i(27119),a=i(86459),h=i(845),l=i(6659),u=i(38203),c=i(82047),d=i(97081),p=i(52780),f=i(10850),v=i(1539),g=i(42911),m=i(69150),y=i(74118),x=i(31673),T=new r({Extends:l,initialize:function(t){l.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=s.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new y,this.silentWarnings=!1,t.events.once(d.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(u.LOAD,this.updatePending,this),this.on(u.ERROR,this.updatePending,this);var t=this.game.config;this.addBase64("__DEFAULT",t.defaultImage),this.addBase64("__MISSING",t.missingImage),this.addBase64("__WHITE",t.whiteImage),this.game.events.once(d.DESTROY,this.destroy,this)},updatePending:function(){this._pending--,0===this._pending&&(this.off(u.LOAD),this.off(u.ERROR),this.emit(u.READY),this.stamp=new v(this.game.scene.systemScene).setOrigin(0))},checkKey:function(t){return!this.exists(t)||(this.silentWarnings||console.error("Texture key already in use: "+t),!1)},remove:function(t){if("string"==typeof t){if(!this.exists(t))return this.silentWarnings||console.warn("No texture found matching key: "+t),this;t=this.get(t)}return this.list.hasOwnProperty(t.key)&&(t.destroy(),this.emit(u.REMOVE,t.key),this.emit(u.REMOVE_KEY+t.key)),this},removeKey:function(t){return this.list.hasOwnProperty(t)&&delete this.list[t],this},addBase64:function(t,e){if(this.checkKey(t)){var i=this,s=new Image;s.onerror=function(){i.emit(u.ERROR,t)},s.onload=function(){var e=i.create(t,s);m.Image(e,0),i.emit(u.ADD,t,e),i.emit(u.ADD_KEY+t,e),i.emit(u.LOAD,t,e)},s.src=e}return this},getBase64:function(t,e,i,n){void 0===i&&(i="image/png"),void 0===n&&(n=.92);var r="",o=this.getFrame(t,e);if(o&&(o.source.isRenderTexture||o.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(o){var a=o.canvasData,h=s.create2D(this,a.width,a.height),l=h.getContext("2d");a.width>0&&a.height>0&&l.drawImage(o.source.image,a.x,a.y,a.width,a.height,0,0,a.width,a.height),r=h.toDataURL(i,n),s.remove(h)}return r},addImage:function(t,e,i){var s=null;return this.checkKey(t)&&(s=this.create(t,e),m.Image(s,0),i&&s.setDataSource(i),this.emit(u.ADD,t,s),this.emit(u.ADD_KEY+t,s)),s},addGLTexture:function(t,e,i,s){var n=null;return this.checkKey(t)&&(void 0===i&&(i=e.width),void 0===s&&(s=e.height),(n=this.create(t,e,i,s)).add("__BASE",0,0,0,i,s),this.emit(u.ADD,t,n),this.emit(u.ADD_KEY+t,n)),n},addCompressedTexture:function(t,e,i){var s=null;if(this.checkKey(t)){if((s=this.create(t,e)).add("__BASE",0,0,0,e.width,e.height),i)if(Array.isArray(i))for(var n=0;n=r.x&&t=r.y&&e=r.x&&t=r.y&&e{var s=i(61068),n=i(56694),r=i(28621),o=i(27394),a=new n({initialize:function(t,e,i,s,n){void 0===n&&(n=!1);var a=t.manager.game;this.renderer=a.renderer,this.texture=t,this.source=e,this.image=e.compressed?null:e,this.compressionAlgorithm=e.compressed?e.format:null,this.resolution=1,this.width=i||e.naturalWidth||e.videoWidth||e.width||0,this.height=s||e.naturalHeight||e.videoHeight||e.height||0,this.scaleMode=o.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&e instanceof HTMLVideoElement,this.isRenderTexture="RenderTexture"===e.type||"DynamicTexture"===e.type,this.isGLTexture=window.hasOwnProperty("WebGLTexture")&&e instanceof WebGLTexture,this.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.flipY=n,this.init(a)},init:function(t){var e=this.renderer;if(e){var i=this.source;if(e.gl){var s=this.image,n=this.flipY,r=this.width,o=this.height,a=this.scaleMode;this.isCanvas?this.glTexture=e.createCanvasTexture(s,!1,n):this.isVideo?this.glTexture=e.createVideoTexture(s,!1,n):this.isRenderTexture?this.glTexture=e.createTextureFromSource(null,r,o,a):this.isGLTexture?this.glTexture=i:this.compressionAlgorithm?this.glTexture=e.createTextureFromSource(i):this.glTexture=e.createTextureFromSource(s,r,o,a)}else this.isRenderTexture&&(this.image=i.canvas)}t.config.antialias||this.setFilter(1)},setFilter:function(t){this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,t),this.scaleMode=t},setFlipY:function(t){return void 0===t&&(t=!0),this.flipY=t,this},update:function(){var t=this.renderer,e=this.image,i=this.flipY,s=t.gl;s&&this.isCanvas?this.glTexture=t.updateCanvasTexture(e,this.glTexture,i):s&&this.isVideo&&(this.glTexture=t.updateVideoTexture(e,this.glTexture,i))},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture,!0),this.isCanvas&&s.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});t.exports=a},65154:t=>{t.exports={LINEAR:0,NEAREST:1}},49644:t=>{t.exports="addtexture"},29569:t=>{t.exports="addtexture-"},60079:t=>{t.exports="onerror"},72665:t=>{t.exports="onload"},93006:t=>{t.exports="ready"},69018:t=>{t.exports="removetexture"},85549:t=>{t.exports="removetexture-"},38203:(t,e,i)=>{t.exports={ADD:i(49644),ADD_KEY:i(29569),ERROR:i(60079),LOAD:i(72665),READY:i(93006),REMOVE:i(69018),REMOVE_KEY:i(85549)}},87499:(t,e,i)=>{var s=i(98611),n=i(65154),r={CanvasTexture:i(17487),DynamicTexture:i(845),Events:i(38203),FilterMode:n,Frame:i(82047),Parsers:i(69150),Texture:i(31673),TextureManager:i(6237),TextureSource:i(32547)};r=s(!1,r,n),t.exports=r},35082:t=>{t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var n,r=i.getElementsByTagName("SubTexture"),o=0;o{t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},21560:t=>{t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},64423:(t,e,i)=>{var s=i(32742);t.exports=function(t,e,i){if(i.frames||i.textures){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var r,o=Array.isArray(i.textures)?i.textures[e].frames:i.frames,a=0;a{var s=i(32742);t.exports=function(t,e,i){if(i.frames){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);var r,o=i.frames;for(var a in o)if(o.hasOwnProperty(a)){var h=o[a];if(r=t.add(a,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h)){h.trimmed&&r.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(r.rotated=!0,r.updateUVsInverted());var l=h.anchor||h.pivot;l&&(r.customPivot=!0,r.pivotX=l.x,r.pivotY=l.y),r.customData=s(h)}else console.warn("Invalid atlas json, frame already exists: "+a)}for(var u in i)"frames"!==u&&(Array.isArray(i[u])?t.customData[u]=i[u].slice(0):t.customData[u]=i[u]);return t}console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object")}},67409:t=>{t.exports=function(t){var e,i=[171,75,84,88,32,49,49,187,13,10,26,10],s=new Uint8Array(t,0,12);for(e=0;e>1),v=Math.max(1,v>>1),p+=g}return{mipmaps:d,width:h,height:l,internalFormat:a,compressed:!0,generateMipmap:!1}}console.warn("KTXParser - Only compressed formats supported")}},24904:t=>{function e(t,e,i,s,n,r,o){return void 0===o&&(o=16),Math.floor((t+i)/n)*Math.floor((e+s)/r)*o}function i(t,e){return(t=Math.max(t,16))*(e=Math.max(e,8))/4}function s(t,e){return(t=Math.max(t,8))*(e=Math.max(e,8))/2}function n(t,i){return e(t,i,3,3,4,4,8)}function r(t,i){return e(t,i,3,3,4,4)}var o={0:{sizeFunc:i,glFormat:35841},1:{sizeFunc:i,glFormat:35843},2:{sizeFunc:s,glFormat:35840},3:{sizeFunc:s,glFormat:35842},6:{sizeFunc:n,glFormat:36196},7:{sizeFunc:n,glFormat:33776},8:{sizeFunc:r,glFormat:33777},9:{sizeFunc:r,glFormat:33778},11:{sizeFunc:r,glFormat:33779},22:{sizeFunc:n,glFormat:37492},23:{sizeFunc:r,glFormat:37496},24:{sizeFunc:n,glFormat:37494},25:{sizeFunc:n,glFormat:37488},26:{sizeFunc:r,glFormat:37490},27:{sizeFunc:r,glFormat:37808},28:{sizeFunc:function(t,i){return e(t,i,4,3,5,4)},glFormat:37809},29:{sizeFunc:function(t,i){return e(t,i,4,4,5,5)},glFormat:37810},30:{sizeFunc:function(t,i){return e(t,i,5,4,6,5)},glFormat:37811},31:{sizeFunc:function(t,i){return e(t,i,5,5,6,6)},glFormat:37812},32:{sizeFunc:function(t,i){return e(t,i,7,4,8,5)},glFormat:37813},33:{sizeFunc:function(t,i){return e(t,i,7,5,8,6)},glFormat:37814},34:{sizeFunc:function(t,i){return e(t,i,7,7,8,8)},glFormat:37815},35:{sizeFunc:function(t,i){return e(t,i,9,4,10,5)},glFormat:37816},36:{sizeFunc:function(t,i){return e(t,i,9,5,10,6)},glFormat:37817},37:{sizeFunc:function(t,i){return e(t,i,9,7,10,8)},glFormat:37818},38:{sizeFunc:function(t,i){return e(t,i,9,9,10,10)},glFormat:37819},39:{sizeFunc:function(t,i){return e(t,i,11,9,12,10)},glFormat:37820},40:{sizeFunc:function(t,i){return e(t,i,11,11,12,12)},glFormat:37821}};t.exports=function(t){for(var e=new Uint32Array(t,0,13),i=e[2],s=o[i].glFormat,n=o[i].sizeFunc,r=e[11],a=e[7],h=e[6],l=52+e[12],u=new Uint8Array(t,l),c=new Array(r),d=0,p=a,f=h,v=0;v>1),f=Math.max(1,f>>1),d+=g}return{mipmaps:c,width:a,height:h,internalFormat:s,compressed:!0,generateMipmap:!1}}},6143:(t,e,i)=>{var s=i(72632);t.exports=function(t,e,i,n,r,o,a){var h=s(a,"frameWidth",null),l=s(a,"frameHeight",h);if(null===h)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var u=t.source[e];t.add("__BASE",e,0,0,u.width,u.height);var c=s(a,"startFrame",0),d=s(a,"endFrame",-1),p=s(a,"margin",0),f=s(a,"spacing",0),v=Math.floor((r-p+f)/(h+f))*Math.floor((o-p+f)/(l+f));0===v&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",t.key),(c>v||c<-v)&&(c=0),c<0&&(c=v+c),(-1===d||d>v||dr&&(y=b-r),E>o&&(x=E-o),w>=c&&w<=d&&(t.add(T,e,i+g,n+m,h-y,l-x),T++),(g+=h+f)+h>r&&(g=p,m+=l+f)}return t}},20030:(t,e,i)=>{var s=i(72632);t.exports=function(t,e,i){var n=s(i,"frameWidth",null),r=s(i,"frameHeight",n);if(!n)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o=t.source[0];t.add("__BASE",0,0,0,o.width,o.height);var a,h=s(i,"startFrame",0),l=s(i,"endFrame",-1),u=s(i,"margin",0),c=s(i,"spacing",0),d=e.cutX,p=e.cutY,f=e.cutWidth,v=e.cutHeight,g=e.realWidth,m=e.realHeight,y=Math.floor((g-u+c)/(n+c)),x=Math.floor((m-u+c)/(r+c)),T=y*x,w=e.x,b=n-w,E=n-(g-f-w),S=e.y,A=r-S,C=r-(m-v-S);(h>T||h<-T)&&(h=0),h<0&&(h=T+h),-1!==l&&(T=h+(l+1));for(var _=u,M=u,R=0,P=e.sourceIndex,O=0;O{var e=0,i=function(t,i,s,n){var r=e-n.y-n.height;t.add(s,i,n.x,r,n.width,n.height)};t.exports=function(t,s,n){var r=t.source[s];t.add("__BASE",s,0,0,r.width,r.height),e=r.height;for(var o=n.split("\n"),a=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",l="",u={x:0,y:0,width:0,height:0},c=0;c{t.exports={AtlasXML:i(35082),Canvas:i(83332),Image:i(21560),JSONArray:i(64423),JSONHash:i(17264),KTXParser:i(67409),PVRParser:i(24904),SpriteSheet:i(6143),SpriteSheetFromAtlas:i(20030),UnityYAML:i(89187)}},93560:t=>{t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},97042:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s,n,r,o){(void 0===i||i<=0)&&(i=32),(void 0===s||s<=0)&&(s=32),void 0===n&&(n=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|s,this.imageMargin=0|n,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&t{var s=new(i(56694))({initialize:function(t){if(this.gids=[],void 0!==t)for(var e=0;e{var s=i(93560),n=i(16586),r=i(90715),o=i(89797);t.exports=function(t,e,i,a,h,l,u,c){void 0===i&&(i=32),void 0===a&&(a=32),void 0===h&&(h=10),void 0===l&&(l=10),void 0===c&&(c=!1);var d=null;if(Array.isArray(u))d=r(void 0!==e?e:"map",s.ARRAY_2D,u,i,a,c);else if(void 0!==e){var p=t.cache.tilemap.get(e);p?d=r(e,p.format,p.data,i,a,c):console.warn("No map data found for key "+e)}return null===d&&(d=new n({tileWidth:i,tileHeight:a,width:h,height:l})),new o(t,d)}},29633:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(12920),o=i(28699),a=i(66658),h=new s({Mixins:[n.Alpha,n.Flip,n.Visible],initialize:function(t,e,i,s,n,r,o,a){this.layer=t,this.index=e,this.x=i,this.y=s,this.width=n,this.height=r,this.right,this.bottom,this.baseWidth=void 0!==o?o:n,this.baseHeight=void 0!==a?a:r,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,this.collisionCallbackContext=this,this.tint=16777215,this.physics={}},containsPoint:function(t,e){return!(tthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=o(t.properties),this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldXY(this.x,this.y,void 0,t).x:this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldXY(this.x,this.y,void 0,t).y:this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new a),e.x=this.getLeft(t),e.y=this.getTop(t),e.width=this.getRight(t)-e.x,e.height=this.getBottom(t)-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},intersects:function(t,e,i,s){return!(i<=this.pixelX||s<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,s,n){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===s&&(s=t),void 0===n&&(n=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=s,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=s,n)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,s){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==s&&(this.baseHeight=s),this.updatePixelXY(),this},updatePixelXY:function(){var t=this.layer.orientation;if(t===r.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(t===r.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(t===r.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(t===r.HEXAGONAL){var e=this.layer.hexSideLength,i=(this.baseHeight-e)/2+e;this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*i}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||void 0!==this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=h},89797:(t,e,i)=>{var s=i(56694),n=i(75606),r=i(93560),o=i(72632),a=i(94990),h=i(46422),l=i(12920),u=i(52257),c=i(72677),d=i(13747),p=i(29633),f=i(5047),v=i(87177),g=i(47975),m=new s({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.renderOrder=e.renderOrder,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0,this.hexSideLength=e.hexSideLength;var i=this.orientation;this._convert={WorldToTileXY:f.GetWorldToTileXYFunction(i),WorldToTileX:f.GetWorldToTileXFunction(i),WorldToTileY:f.GetWorldToTileYFunction(i),TileToWorldXY:f.GetTileToWorldXYFunction(i),TileToWorldX:f.GetTileToWorldXFunction(i),TileToWorldY:f.GetTileToWorldYFunction(i),GetTileCorners:f.GetTileCornersFunction(i)}},setRenderOrder:function(t){var e=["right-down","left-down","right-up","left-up"];return"number"==typeof t&&(t=e[t]),e.indexOf(t)>-1&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,s,n,o,a){if(void 0===t)return null;if(null==e&&(e=t),!this.scene.sys.textures.exists(e))return console.warn("Invalid Tileset Image: "+e),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===r.TILED_JSON)return console.warn("No data found for Tileset: "+t),null;var u=this.tilesets[l];return u?(u.setTileSize(i,s),u.setSpacing(n,o),u.setImage(h),u):(void 0===i&&(i=this.tileWidth),void 0===s&&(s=this.tileHeight),void 0===n&&(n=0),void 0===o&&(o=0),void 0===a&&(a=0),(u=new g(t,a,i,s,n,o)).setImage(h),this.tilesets.push(u),u)},copy:function(t,e,i,s,n,r,o,a){return null!==(a=this.getLayer(a))?(f.Copy(t,e,i,s,n,r,o,a),this):null},createBlankLayer:function(t,e,i,s,n,r,o,h){if(void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=this.width),void 0===r&&(r=this.height),void 0===o&&(o=this.tileWidth),void 0===h&&(h=this.tileHeight),null!==this.getLayerIndex(t))return console.warn("Invalid Tilemap Layer ID: "+t),null;for(var l,u=new a({name:t,tileWidth:o,tileHeight:h,width:n,height:r,orientation:this.orientation}),c=0;c-1&&this.putTileAt(e,r.x,r.y,i,r.tilemapLayer)}return s},removeTileAt:function(t,e,i,s,n){return void 0===i&&(i=!0),void 0===s&&(s=!0),null===(n=this.getLayer(n))?null:f.RemoveTileAt(t,e,i,s,n)},removeTileAtWorldXY:function(t,e,i,s,n,r){return void 0===i&&(i=!0),void 0===s&&(s=!0),null===(r=this.getLayer(r))?null:f.RemoveTileAtWorldXY(t,e,i,s,n,r)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(this.orientation===l.ORTHOGONAL&&f.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,s=0;s{var s=i(99325),n=i(15043);s.register("tilemap",(function(t){var e=void 0!==t?t:{};return n(this.scene,e.key,e.tileWidth,e.tileHeight,e.width,e.height,e.data,e.insertNull)}))},37940:(t,e,i)=>{var s=i(61286),n=i(15043);s.register("tilemap",(function(t,e,i,s,r,o,a){return null===t&&(t=void 0),null===e&&(e=void 0),null===i&&(i=void 0),null===s&&(s=void 0),null===r&&(r=void 0),n(this.scene,t,e,i,s,r,o,a)}))},87177:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),o=i(5047),a=i(96193),h=i(93736),l=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.ComputedSize,n.Depth,n.Flip,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.Transform,n.Visible,n.ScrollFactor,a],initialize:function(t,e,i,s,n,a){r.call(this,t,"TilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],this.layer.tilemapLayer=this,this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=o.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new h,this.setTilesets(s),this.setAlpha(this.layer.alpha),this.setPosition(n,a),this.setOrigin(0,0),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.initPipeline()},setTilesets:function(t){var e=[],i=[],s=this.tilemap;Array.isArray(t)||(t=[t]);for(var n=0;n=0&&t<4&&(this._renderOrder=t),this},calculateFacesAt:function(t,e){return o.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,s){return o.CalculateFacesWithin(t,e,i,s,this.layer),this},createFromTiles:function(t,e,i,s,n){return o.CreateFromTiles(t,e,i,s,n,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,s,n,r,a){return o.Copy(t,e,i,s,n,r,a,this.layer),this},fill:function(t,e,i,s,n,r){return o.Fill(t,e,i,s,n,r,this.layer),this},filterTiles:function(t,e,i,s,n,r,a){return o.FilterTiles(t,e,i,s,n,r,a,this.layer)},findByIndex:function(t,e,i){return o.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,s,n,r,a){return o.FindTile(t,e,i,s,n,r,a,this.layer)},forEachTile:function(t,e,i,s,n,r,a){return o.ForEachTile(t,e,i,s,n,r,a,this.layer),this},setTint:function(t,e,i,s,n,r){void 0===t&&(t=16777215);return this.forEachTile((function(e){e.tint=t}),this,e,i,s,n,r)},getTileAt:function(t,e,i){return o.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,s){return o.GetTileAtWorldXY(t,e,i,s,this.layer)},getIsoTileAtWorldXY:function(t,e,i,s,n){void 0===i&&(i=!0);var r=this.tempVec;return o.IsometricWorldToTileXY(t,e,!0,r,n,this.layer,i),this.getTileAt(r.x,r.y,s)},getTilesWithin:function(t,e,i,s,n){return o.GetTilesWithin(t,e,i,s,n,this.layer)},getTilesWithinShape:function(t,e,i){return o.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,s,n,r){return o.GetTilesWithinWorldXY(t,e,i,s,n,r,this.layer)},hasTileAt:function(t,e){return o.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return o.HasTileAtWorldXY(t,e,i,this.layer)},putTileAt:function(t,e,i,s){return o.PutTileAt(t,e,i,s,this.layer)},putTileAtWorldXY:function(t,e,i,s,n){return o.PutTileAtWorldXY(t,e,i,s,n,this.layer)},putTilesAt:function(t,e,i,s){return o.PutTilesAt(t,e,i,s,this.layer),this},randomize:function(t,e,i,s,n){return o.Randomize(t,e,i,s,n,this.layer),this},removeTileAt:function(t,e,i,s){return o.RemoveTileAt(t,e,i,s,this.layer)},removeTileAtWorldXY:function(t,e,i,s,n){return o.RemoveTileAtWorldXY(t,e,i,s,n,this.layer)},renderDebug:function(t,e){return o.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,s,n,r){return o.ReplaceByIndex(t,e,i,s,n,r,this.layer),this},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this},setCollision:function(t,e,i,s){return o.SetCollision(t,e,i,this.layer,s),this},setCollisionBetween:function(t,e,i,s){return o.SetCollisionBetween(t,e,i,s,this.layer),this},setCollisionByProperty:function(t,e,i){return o.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return o.SetCollisionByExclusion(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return o.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileIndexCallback:function(t,e,i){return o.SetTileIndexCallback(t,e,i,this.layer),this},setTileLocationCallback:function(t,e,i,s,n,r){return o.SetTileLocationCallback(t,e,i,s,n,r,this.layer),this},shuffle:function(t,e,i,s){return o.Shuffle(t,e,i,s,this.layer),this},swapByIndex:function(t,e,i,s,n,r){return o.SwapByIndex(t,e,i,s,n,r,this.layer),this},tileToWorldX:function(t,e){return this.tilemap.tileToWorldX(t,e,this)},tileToWorldY:function(t,e){return this.tilemap.tileToWorldY(t,e,this)},tileToWorldXY:function(t,e,i,s){return this.tilemap.tileToWorldXY(t,e,i,s,this)},getTileCorners:function(t,e,i){return this.tilemap.getTileCorners(t,e,i,this)},weightedRandomize:function(t,e,i,s,n){return o.WeightedRandomize(e,i,s,n,t,this.layer),this},worldToTileX:function(t,e,i){return this.tilemap.worldToTileX(t,e,i,this)},worldToTileY:function(t,e,i){return this.tilemap.worldToTileY(t,e,i,this)},worldToTileXY:function(t,e,i,s,n){return this.tilemap.worldToTileXY(t,e,i,s,n,this)},destroy:function(t){void 0===t&&(t=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),t&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],r.prototype.destroy.call(this))}});t.exports=l},17394:(t,e,i)=>{var s=i(69360),n=new s,r=new s,o=new s;t.exports=function(t,e,i,s){var a=e.cull(i),h=a.length,l=i.alpha*e.alpha;if(!(0===h||l<=0)){var u=n,c=r,d=o;c.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),u.copyFrom(i.matrix);var p=t.currentContext,f=e.gidMap;p.save(),s?(u.multiplyWithOffset(s,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),c.e=e.x,c.f=e.y,u.multiply(c,d),d.copyToContext(p)):(c.e-=i.scrollX*e.scrollFactorX,c.f-=i.scrollY*e.scrollFactorY,c.copyToContext(p)),(!t.antialias||e.scaleX>1||e.scaleY>1)&&(p.imageSmoothingEnabled=!1);for(var v=0;v{var s=i(72283),n=s,r=s;n=i(51395),r=i(17394),t.exports={renderWebGL:n,renderCanvas:r}},51395:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i){var n=e.cull(i),r=n.length,o=i.alpha*e.alpha;if(!(0===r||o<=0)){var a=e.gidMap,h=t.pipelines.set(e.pipeline,e),l=s.getTintAppendFloatAlpha,u=e.scrollFactorX,c=e.scrollFactorY,d=e.x,p=e.y,f=e.scaleX,v=e.scaleY;t.pipelines.preBatch(e);for(var g=0;g{var s=i(56694),n=i(93736),r=new s({initialize:function(t,e,i,s,r,o,a,h,l){(void 0===i||i<=0)&&(i=32),(void 0===s||s<=0)&&(s=32),void 0===r&&(r=0),void 0===o&&(o=0),void 0===a&&(a={}),void 0===h&&(h={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=s,this.tileMargin=r,this.tileSpacing=o,this.tileProperties=a,this.tileData=h,this.tileOffset=new n,void 0!==l&&this.tileOffset.set(l.x,l.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t{var s=i(15494);t.exports=function(t,e,i){var n=s(t,e,!0,i),r=s(t,e-1,!0,i),o=s(t,e+1,!0,i),a=s(t-1,e,!0,i),h=s(t+1,e,!0,i),l=n&&n.collides;return l&&(n.faceTop=!0,n.faceBottom=!0,n.faceLeft=!0,n.faceRight=!0),r&&r.collides&&(l&&(n.faceTop=!1),r.faceBottom=!l),o&&o.collides&&(l&&(n.faceBottom=!1),o.faceTop=!l),a&&a.collides&&(l&&(n.faceLeft=!1),a.faceRight=!l),h&&h.collides&&(l&&(n.faceRight=!1),h.faceLeft=!l),n&&!n.collides&&n.resetFaces(),n}},60386:(t,e,i)=>{var s=i(15494),n=i(50811);t.exports=function(t,e,i,r,o){for(var a=null,h=null,l=null,u=null,c=n(t,e,i,r,null,o),d=0;d{var s=new(i(93736));t.exports=function(t,e,i,n){var r=i.tilemapLayer,o=r.cullPaddingX,a=r.cullPaddingY,h=r.tilemap.tileToWorldXY(t,e,s,n,r);return h.x>n.worldView.x+r.scaleX*i.tileWidth*(-o-.5)&&h.xn.worldView.y+r.scaleY*i.tileHeight*(-a-1)&&h.y{var s=i(60386),n=i(50811),r=i(62839),o=i(29633);t.exports=function(t,e,i,a,h,l,u,c){void 0===u&&(u=!0);var d=n(t,e,i,a,null,c),p=[];d.forEach((function(t){var e=new o(t.layer,t.index,t.x,t.y,t.width,t.height,t.baseWidth,t.baseHeight);e.copy(t),p.push(e)}));for(var f=h-t,v=l-e,g=0;g{var s=i(50811),n=i(51202);t.exports=function(t,e,i,r,o,a){i||(i={}),Array.isArray(t)||(t=[t]);var h=a.tilemapLayer;r||(r=h.scene),o||(o=r.cameras.main);var l,u=s(0,0,a.width,a.height,null,a),c=[];for(l=0;l{var s=i(74118),n=i(82127),r=i(84314),o=new s;t.exports=function(t,e){var i=t.tilemapLayer.tilemap,s=t.tilemapLayer,a=Math.floor(i.tileWidth*s.scaleX),h=Math.floor(i.tileHeight*s.scaleY),l=r(e.worldView.x-s.x,a,0,!0)-s.cullPaddingX,u=n(e.worldView.right-s.x,a,0,!0)+s.cullPaddingX,c=r(e.worldView.y-s.y,h,0,!0)-s.cullPaddingY,d=n(e.worldView.bottom-s.y,h,0,!0)+s.cullPaddingY;return o.setTo(l,c,u-l,d-c)}},381:(t,e,i)=>{var s=i(71586),n=i(6987);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var o=t.tilemapLayer,a=s(t,e);return(o.skipCull||1!==o.scrollFactorX||1!==o.scrollFactorY)&&(a.left=0,a.right=t.width,a.top=0,a.bottom=t.height),n(t,a,r,i),i}},97734:(t,e,i)=>{var s=i(50811),n=i(60386),r=i(68234);t.exports=function(t,e,i,o,a,h,l){for(var u=-1!==l.collideIndexes.indexOf(t),c=s(e,i,o,a,null,l),d=0;d{var s=i(50811);t.exports=function(t,e,i,n,r,o,a,h){return s(i,n,r,o,a,h).filter(t,e)}},37982:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=0),void 0===i&&(i=!1);var n,r,o,a=0;if(i){for(r=s.height-1;r>=0;r--)for(n=s.width-1;n>=0;n--)if((o=s.data[r][n])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;r{var s=i(50811);t.exports=function(t,e,i,n,r,o,a,h){return s(i,n,r,o,a,h).find(t,e)||null}},80916:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,n,r,o,a,h){s(i,n,r,o,a,h).forEach(t,e)}},31493:(t,e,i)=>{var s=i(12920),n=i(381),r=i(37524),o=i(20887),a=i(72283),h=i(19242);t.exports=function(t){return t===s.ORTHOGONAL?n:t===s.HEXAGONAL?r:t===s.STAGGERED?h:t===s.ISOMETRIC?o:a}},15494:(t,e,i)=>{var s=i(62839);t.exports=function(t,e,i,n){if(void 0===i&&(i=!1),s(t,e,n)){var r=n.data[e][t]||null;return r?-1===r.index?i?r:null:r:null}return null}},24640:(t,e,i)=>{var s=i(15494),n=new(i(93736));t.exports=function(t,e,i,r,o){return o.tilemapLayer.worldToTileXY(t,e,!0,n,r),s(n.x,n.y,i,o)}},48495:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n){var r=n.baseTileWidth,o=n.baseTileHeight,a=n.tilemapLayer,h=0,l=0;a&&(i||(i=a.scene.cameras.main),h=a.x+i.scrollX*(1-a.scrollFactorX),l=a.y+i.scrollY*(1-a.scrollFactorY),r*=a.scaleX,o*=a.scaleY);var u=h+t*r,c=l+e*o;return[new s(u,c),new s(u+r,c),new s(u+r,c+o),new s(u,c+o)]}},7160:(t,e,i)=>{var s=i(12920),n=i(63634),r=i(72283),o=i(48495);t.exports=function(t){return t===s.ORTHOGONAL?o:t===s.ISOMETRIC?r:t===s.HEXAGONAL?n:(s.STAGGERED,r)}},16884:(t,e,i)=>{var s=i(12920),n=i(72283),r=i(44150);t.exports=function(t){return t===s.ORTHOGONAL?r:n}},68182:(t,e,i)=>{var s=i(12920),n=i(21715),r=i(21808),o=i(72283),a=i(33388),h=i(46836);t.exports=function(t){return t===s.ORTHOGONAL?h:t===s.ISOMETRIC?r:t===s.HEXAGONAL?n:t===s.STAGGERED?a:o}},3752:(t,e,i)=>{var s=i(12920),n=i(72283),r=i(84132),o=i(42477);t.exports=function(t){return t===s.ORTHOGONAL?o:t===s.STAGGERED?r:n}},50811:(t,e,i)=>{var s=i(72632);t.exports=function(t,e,i,n,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=o.width),void 0===n&&(n=o.height),r||(r={});var a=s(r,"isNotEmpty",!1),h=s(r,"isColliding",!1),l=s(r,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(n+=e,e=0),t+i>o.width&&(i=Math.max(o.width-t,0)),e+n>o.height&&(n=Math.max(o.height-e,0));for(var u=[],c=e;c{var s=i(84068),n=i(50811),r=i(7563),o=i(72283),a=i(93736),h=function(t,e){return r.RectangleToTriangle(e,t)},l=new a,u=new a,c=new a;t.exports=function(t,e,i,a){if(void 0===t)return[];var d=o;t instanceof s.Circle?d=r.CircleToRectangle:t instanceof s.Rectangle?d=r.RectangleToRectangle:t instanceof s.Triangle?d=h:t instanceof s.Line&&(d=r.LineToRectangle),a.tilemapLayer.worldToTileXY(t.left,t.top,!0,u,i);var p=u.x,f=u.y;a.tilemapLayer.worldToTileXY(t.right,t.bottom,!1,c,i);var v=Math.ceil(c.x),g=Math.ceil(c.y),m=Math.max(v-p,1),y=Math.max(g-f,1),x=n(p,f,m,y,e,a),T=a.tileWidth,w=a.tileHeight;a.tilemapLayer&&(T*=a.tilemapLayer.scaleX,w*=a.tilemapLayer.scaleY);for(var b=[],E=new s.Rectangle(0,0,T,w),S=0;S{var s=i(50811),n=i(93736),r=new n,o=new n;t.exports=function(t,e,i,n,a,h,l){var u=l.tilemapLayer.tilemap._convert.WorldToTileXY;u(t,e,!0,r,h,l);var c=r.x,d=r.y;u(t+i,e+n,!1,o,h,l);var p=Math.ceil(o.x),f=Math.ceil(o.y);return s(c,d,p-c,f-d,a,l)}},29296:(t,e,i)=>{var s=i(12920),n=i(10618),r=i(806);t.exports=function(t){return t===s.ORTHOGONAL?r:n}},32688:(t,e,i)=>{var s=i(12920),n=i(11516),r=i(18750),o=i(72283),a=i(90562),h=i(45676);t.exports=function(t){return t===s.ORTHOGONAL?h:t===s.ISOMETRIC?r:t===s.HEXAGONAL?n:t===s.STAGGERED?a:o}},74326:(t,e,i)=>{var s=i(12920),n=i(10618),r=i(3689),o=i(70520);t.exports=function(t){return t===s.ORTHOGONAL?o:t===s.STAGGERED?r:n}},46598:(t,e,i)=>{var s=i(62839);t.exports=function(t,e,i){if(s(t,e,i)){var n=i.data[e][t];return null!==n&&n.index>-1}return!1}},28654:(t,e,i)=>{var s=i(46598),n=new(i(93736));t.exports=function(t,e,i,r){r.tilemapLayer.worldToTileXY(t,e,!0,n,i);var o=n.x,a=n.y;return s(o,a,r)}},6358:(t,e,i)=>{var s=i(82127),n=i(84314);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,r=t.tilemapLayer,o=Math.floor(i.tileWidth*r.scaleX),a=Math.floor(i.tileHeight*r.scaleY),h=t.hexSideLength,l=(a-h)/2+h;return{left:n(e.worldView.x-r.x,o,0,!0)-r.cullPaddingX,right:s(e.worldView.right-r.x,o,0,!0)+r.cullPaddingX,top:n(e.worldView.y-r.y,l,0,!0)-r.cullPaddingY,bottom:s(e.worldView.bottom-r.y,l,0,!0)+r.cullPaddingY}}},37524:(t,e,i)=>{var s=i(6358),n=i(6987);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var o=t.tilemapLayer;if(!o.skipCull&&1===o.scrollFactorX&&1===o.scrollFactorY){var a=s(t,e);n(t,a,r,i)}return i}},63634:(t,e,i)=>{var s=i(21715),n=i(93736),r=new n;t.exports=function(t,e,i,o){var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(a*=l.scaleX,h*=l.scaleY);for(var u=s(t,e,r,i,o),c=[],d=.5773502691896257*a,p=h/2,f=0;f<6;f++){var v=2*Math.PI*(.5-f)/6;c.push(new n(u.x+d*Math.cos(v),u.y+p*Math.sin(v)))}return c}},21715:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){i||(i=new s);var o=r.baseTileWidth,a=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(n||(n=h.scene.cameras.main),l=h.x+n.scrollX*(1-h.scrollFactorX),u=h.y+n.scrollY*(1-h.scrollFactorY),o*=h.scaleX,a*=h.scaleY);var c=a/2,d=l+o*t+o,p=u+1.5*e*c+c;return e%2==0&&(d-=o/2),i.set(d,p)}},11516:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,o){n||(n=new s);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(r||(r=l.scene.cameras.main),t-=l.x+r.scrollX*(1-l.scrollFactorX),e-=l.y+r.scrollY*(1-l.scrollFactorY),a*=l.scaleX,h*=l.scaleY);var u=.5773502691896257,c=h/2,d=(t-a/2)/(u*a),p=(e-c)/c,f=u*d+-.3333333333333333*p,v=0*d+.6666666666666666*p,g=-f-v,m=Math.round(f),y=Math.round(v),x=Math.round(g),T=Math.abs(m-f),w=Math.abs(y-v),b=Math.abs(x-g);T>w&&T>b?m=-y-x:w>b&&(y=-m-x);var E=y,S=E%2==0?y/2+m:y/2+m-.5;return n.set(S,E)}},62839:t=>{t.exports=function(t,e,i){return t>=0&&t=0&&e{var s=i(13125);t.exports=function(t,e,i,n){void 0===i&&(i=[]),void 0===n&&(n=0),i.length=0;var r,o,a,h=t.tilemapLayer,l=t.data,u=t.width,c=t.height,d=u,p=c;if(!h.skipCull)if(0===n){for(o=0;o=0;r--)if(s(r,o,t,e)){if(!(a=l[o][r])||-1===a.index||!a.visible||0===a.alpha)continue;i.push(a)}}else if(2===n){for(o=p;o>=0;o--)for(r=0;l[o]&&r=0;o--)for(r=d;l[o]&&r>=0;r--)if(s(r,o,t,e)){if(!(a=l[o][r])||-1===a.index||!a.visible||0===a.alpha)continue;i.push(a)}return h.tilesDrawn=i.length,h.tilesTotal=u*c,i}},21808:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){i||(i=new s);var o=r.baseTileWidth,a=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(n||(n=h.scene.cameras.main),l=h.x+n.scrollX*(1-h.scrollFactorX),o*=h.scaleX,u=h.y+n.scrollY*(1-h.scrollFactorY),a*=h.scaleY);var c=l+o/2*(t-e),d=u+(t+e)*(a/2);return i.set(c,d)}},18750:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,o,a){n||(n=new s);var h=o.baseTileWidth,l=o.baseTileHeight,u=o.tilemapLayer;u&&(r||(r=u.scene.cameras.main),e-=u.y+r.scrollY*(1-u.scrollFactorY),l*=u.scaleY,t-=u.x+r.scrollX*(1-u.scrollFactorX),h*=u.scaleX);var c=h/2,d=l/2;a||(e-=l);var p=.5*((t-=c)/c+e/d),f=.5*(-t/c+e/d);return i&&(p=Math.floor(p),f=Math.floor(f)),n.set(p,f)}},29003:(t,e,i)=>{var s=i(29633),n=i(62839),r=i(92839),o=i(68234),a=i(14556);t.exports=function(t,e,i,h,l){if(void 0===h&&(h=!0),!n(e,i,l))return null;var u,c=l.data[i][e],d=c&&c.collides;t instanceof s?(null===l.data[i][e]&&(l.data[i][e]=new s(l,t.index,e,i,l.tileWidth,l.tileHeight)),l.data[i][e].copy(t)):(u=t,null===l.data[i][e]?l.data[i][e]=new s(l,u,e,i,l.tileWidth,l.tileHeight):l.data[i][e].index=u);var p=l.data[i][e],f=-1!==l.collideIndexes.indexOf(p.index),v=a(l.tilemapLayer.tilemap)[u=t instanceof s?t.index:t][2],g=l.tilemapLayer.tileset[v];return p.width=g.tileWidth,p.height=g.tileHeight,o(p,f),h&&d!==p.collides&&r(e,i,l),p}},48565:(t,e,i)=>{var s=i(29003),n=new(i(93736));t.exports=function(t,e,i,r,o,a){return a.tilemapLayer.worldToTileXY(e,i,!0,n,o,a),s(t,n.x,n.y,r,a)}},56547:(t,e,i)=>{var s=i(60386),n=i(29003);t.exports=function(t,e,i,r,o){if(void 0===r&&(r=!0),!Array.isArray(t))return null;Array.isArray(t[0])||(t=[t]);for(var a=t.length,h=t[0].length,l=0;l{var s=i(50811),n=i(72861);t.exports=function(t,e,i,r,o,a){var h,l=s(t,e,i,r,{},a);if(!o)for(o=[],h=0;h{var s=i(29633),n=i(62839),r=i(92839);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!0),void 0===o&&(o=!0),!n(t,e,a))return null;var h=a.data[e][t];return h?(a.data[e][t]=i?null:new s(a,-1,t,e,a.tileWidth,a.tileHeight),o&&h&&h.collides&&r(t,e,a),h):null}},17384:(t,e,i)=>{var s=i(929),n=new(i(93736));t.exports=function(t,e,i,r,o,a){return a.tilemapLayer.worldToTileXY(t,e,!0,n,o,a),s(n.x,n.y,i,r,a)}},93763:(t,e,i)=>{var s=i(50811),n=i(95509),r=new n(105,210,231,150),o=new n(243,134,48,200),a=new n(40,39,37,150);t.exports=function(t,e,i){void 0===e&&(e={});var n=void 0!==e.tileColor?e.tileColor:r,h=void 0!==e.collidingTileColor?e.collidingTileColor:o,l=void 0!==e.faceColor?e.faceColor:a,u=s(0,0,i.width,i.height,null,i);t.translateCanvas(i.tilemapLayer.x,i.tilemapLayer.y),t.scaleCanvas(i.tilemapLayer.scaleX,i.tilemapLayer.scaleY);for(var c=0;c{var s=i(50811);t.exports=function(t,e,i,n,r,o,a){for(var h=s(i,n,r,o,null,a),l=0;l{t.exports=function(t,e,i,s){var n,r,o,a=t.data,h=t.width,l=t.height,u=t.tilemapLayer,c=Math.max(0,e.left),d=Math.min(h,e.right),p=Math.max(0,e.top),f=Math.min(l,e.bottom);if(0===i)for(r=p;r=c;n--)(o=a[r][n])&&-1!==o.index&&o.visible&&0!==o.alpha&&s.push(o);else if(2===i)for(r=f;r>=p;r--)for(n=c;a[r]&&n=p;r--)for(n=d;a[r]&&n>=c;n--)(o=a[r][n])&&-1!==o.index&&o.visible&&0!==o.alpha&&s.push(o);return u.tilesDrawn=s.length,u.tilesTotal=h*l,s}},51710:(t,e,i)=>{var s=i(68234),n=i(60386),r=i(91181);t.exports=function(t,e,i,o,a){void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===a&&(a=!0),Array.isArray(t)||(t=[t]);for(var h=0;h{var s=i(68234),n=i(60386),r=i(91181);t.exports=function(t,e,i,o,a,h){if(void 0===i&&(i=!0),void 0===o&&(o=!0),void 0===h&&(h=!0),!(t>e)){for(var l=t;l<=e;l++)r(l,i,a);if(h)for(var u=0;u=t&&d.index<=e&&s(d,i)}o&&n(0,0,a.width,a.height,a)}}},33158:(t,e,i)=>{var s=i(68234),n=i(60386),r=i(91181);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a{var s=i(68234),n=i(60386),r=i(19256);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0);for(var a=0;a{var s=i(68234),n=i(60386);t.exports=function(t,e,i){void 0===t&&(t=!0),void 0===e&&(e=!0);for(var r=0;r0&&s(a,t)}}e&&n(0,0,i.width,i.height,i)}},91181:t=>{t.exports=function(t,e,i){var s=i.collideIndexes.indexOf(t);e&&-1===s?i.collideIndexes.push(t):e||-1===s||i.collideIndexes.splice(s,1)}},68234:t=>{t.exports=function(t,e){e?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)}},11628:t=>{t.exports=function(t,e,i,s){if("number"==typeof t)s.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var n=0,r=t.length;n{var s=i(50811);t.exports=function(t,e,i,n,r,o,a){for(var h=s(t,e,i,n,null,a),l=0;l{var s=i(50811),n=i(18592);t.exports=function(t,e,i,r,o){var a=s(t,e,i,r,null,o),h=a.map((function(t){return t.index}));n(h);for(var l=0;l{var s=i(82127),n=i(84314);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,r=t.tilemapLayer,o=Math.floor(i.tileWidth*r.scaleX),a=Math.floor(i.tileHeight*r.scaleY);return{left:n(e.worldView.x-r.x,o,0,!0)-r.cullPaddingX,right:s(e.worldView.right-r.x,o,0,!0)+r.cullPaddingX,top:n(e.worldView.y-r.y,a/2,0,!0)-r.cullPaddingY,bottom:s(e.worldView.bottom-r.y,a/2,0,!0)+r.cullPaddingY}}},19242:(t,e,i)=>{var s=i(53945),n=i(6987);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var o=t.tilemapLayer;if(!o.skipCull&&1===o.scrollFactorX&&1===o.scrollFactorY){var a=s(t,e);n(t,a,r,i)}return i}},33388:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){i||(i=new s);var o=r.baseTileWidth,a=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(n||(n=h.scene.cameras.main),l=h.x+n.scrollX*(1-h.scrollFactorX),o*=h.scaleX,u=h.y+n.scrollY*(1-h.scrollFactorY),a*=h.scaleY);var c=l+t*o+e%2*(o/2),d=u+e*(a/2);return i.set(c,d)}},84132:t=>{t.exports=function(t,e,i){var s=i.baseTileHeight,n=i.tilemapLayer,r=0;return n&&(void 0===e&&(e=n.scene.cameras.main),r=n.y+e.scrollY*(1-n.scrollFactorY),s*=n.scaleY),r+t*(s/2)+s}},90562:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,o){n||(n=new s);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(r||(r=l.scene.cameras.main),e-=l.y+r.scrollY*(1-l.scrollFactorY),h*=l.scaleY,t-=l.x+r.scrollX*(1-l.scrollFactorX),a*=l.scaleX);var u=i?Math.floor(e/(h/2)):e/(h/2),c=i?Math.floor((t+u%2*.5*a)/a):(t+u%2*.5*a)/a;return n.set(c,u)}},3689:t=>{t.exports=function(t,e,i,s){var n=s.baseTileHeight,r=s.tilemapLayer;return r&&(i||(i=r.scene.cameras.main),t-=r.y+i.scrollY*(1-r.scrollFactorY),n*=r.scaleY),e?Math.floor(t/(n/2)):t/(n/2)}},55217:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,n,r,o,a){for(var h=s(i,n,r,o,null,a),l=0;l{t.exports=function(t,e,i){var s=i.baseTileWidth,n=i.tilemapLayer,r=0;return n&&(e||(e=n.scene.cameras.main),r=n.x+e.scrollX*(1-n.scrollFactorX),s*=n.scaleX),r+t*s}},46836:(t,e,i)=>{var s=i(44150),n=i(42477),r=i(93736);t.exports=function(t,e,i,o,a){return i||(i=new r(0,0)),i.x=s(t,o,a),i.y=n(e,o,a),i}},42477:t=>{t.exports=function(t,e,i){var s=i.baseTileHeight,n=i.tilemapLayer,r=0;return n&&(e||(e=n.scene.cameras.main),r=n.y+e.scrollY*(1-n.scrollFactorY),s*=n.scaleY),r+t*s}},39677:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,n,r,o){if(r){var a,h=s(t,e,i,n,null,o),l=0;for(a=0;a{var s=i(45676),n=new(i(93736));t.exports=function(t,e,i,r){return s(t,0,e,n,i,r),n.x}},45676:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,o){void 0===i&&(i=!0),n||(n=new s);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(r||(r=l.scene.cameras.main),t-=l.x+r.scrollX*(1-l.scrollFactorX),e-=l.y+r.scrollY*(1-l.scrollFactorY),a*=l.scaleX,h*=l.scaleY);var u=t/a,c=e/h;return i&&(u=Math.floor(u),c=Math.floor(c)),n.set(u,c)}},70520:(t,e,i)=>{var s=i(45676),n=new(i(93736));t.exports=function(t,e,i,r){return s(0,t,e,n,i,r),n.y}},5047:(t,e,i)=>{t.exports={CalculateFacesAt:i(92839),CalculateFacesWithin:i(60386),CheckIsoBounds:i(13125),Copy:i(17347),CreateFromTiles:i(93604),CullBounds:i(71586),CullTiles:i(381),Fill:i(97734),FilterTiles:i(63555),FindByIndex:i(37982),FindTile:i(48297),ForEachTile:i(80916),GetCullTilesFunction:i(31493),GetTileAt:i(15494),GetTileAtWorldXY:i(24640),GetTileCorners:i(48495),GetTileCornersFunction:i(7160),GetTilesWithin:i(50811),GetTilesWithinShape:i(31674),GetTilesWithinWorldXY:i(44662),GetTileToWorldXFunction:i(16884),GetTileToWorldXYFunction:i(68182),GetTileToWorldYFunction:i(3752),GetWorldToTileXFunction:i(29296),GetWorldToTileXYFunction:i(32688),GetWorldToTileYFunction:i(74326),HasTileAt:i(46598),HasTileAtWorldXY:i(28654),HexagonalCullBounds:i(6358),HexagonalCullTiles:i(37524),HexagonalGetTileCorners:i(63634),HexagonalTileToWorldXY:i(21715),HexagonalWorldToTileXY:i(11516),IsInLayerBounds:i(62839),IsometricCullTiles:i(20887),IsometricTileToWorldXY:i(21808),IsometricWorldToTileXY:i(18750),PutTileAt:i(29003),PutTileAtWorldXY:i(48565),PutTilesAt:i(56547),Randomize:i(91180),RemoveTileAt:i(929),RemoveTileAtWorldXY:i(17384),RenderDebug:i(93763),ReplaceByIndex:i(51202),RunCull:i(6987),SetCollision:i(51710),SetCollisionBetween:i(15216),SetCollisionByExclusion:i(33158),SetCollisionByProperty:i(4180),SetCollisionFromCollisionGroup:i(18625),SetLayerCollisionIndex:i(91181),SetTileCollision:i(68234),SetTileIndexCallback:i(11628),SetTileLocationCallback:i(72732),Shuffle:i(34397),StaggeredCullBounds:i(53945),StaggeredCullTiles:i(19242),StaggeredTileToWorldXY:i(33388),StaggeredTileToWorldY:i(84132),StaggeredWorldToTileXY:i(90562),StaggeredWorldToTileY:i(3689),SwapByIndex:i(55217),TileToWorldX:i(44150),TileToWorldXY:i(46836),TileToWorldY:i(42477),WeightedRandomize:i(39677),WorldToTileX:i(806),WorldToTileXY:i(45676),WorldToTileY:i(70520)}},12920:t=>{t.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},84758:(t,e,i)=>{var s={ORIENTATION:i(12920)};t.exports=s},52678:(t,e,i)=>{var s=i(98611),n=i(84758),r={Components:i(5047),Parsers:i(34124),Formats:i(93560),ImageCollection:i(97042),ParseToTilemap:i(15043),Tile:i(29633),Tilemap:i(89797),TilemapCreator:i(4843),TilemapFactory:i(37940),Tileset:i(47975),TilemapLayer:i(87177),Orientation:i(12920),LayerData:i(94990),MapData:i(16586),ObjectLayer:i(15256)};r=s(!1,r,n.ORIENTATION),t.exports=r},94990:(t,e,i)=>{var s=i(56694),n=i(12920),r=i(72632),o=new s({initialize:function(t){void 0===t&&(t={}),this.name=r(t,"name","layer"),this.x=r(t,"x",0),this.y=r(t,"y",0),this.width=r(t,"width",0),this.height=r(t,"height",0),this.tileWidth=r(t,"tileWidth",0),this.tileHeight=r(t,"tileHeight",0),this.baseTileWidth=r(t,"baseTileWidth",this.tileWidth),this.baseTileHeight=r(t,"baseTileHeight",this.tileHeight),this.orientation=r(t,"orientation",n.ORTHOGONAL),this.widthInPixels=r(t,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=r(t,"heightInPixels",this.height*this.baseTileHeight),this.alpha=r(t,"alpha",1),this.visible=r(t,"visible",!0),this.properties=r(t,"properties",[]),this.indexes=r(t,"indexes",[]),this.collideIndexes=r(t,"collideIndexes",[]),this.callbacks=r(t,"callbacks",[]),this.bodies=r(t,"bodies",[]),this.data=r(t,"data",[]),this.tilemapLayer=r(t,"tilemapLayer",null),this.hexSideLength=r(t,"hexSideLength",0)}});t.exports=o},16586:(t,e,i)=>{var s=i(56694),n=i(12920),r=i(72632),o=new s({initialize:function(t){void 0===t&&(t={}),this.name=r(t,"name","map"),this.width=r(t,"width",0),this.height=r(t,"height",0),this.infinite=r(t,"infinite",!1),this.tileWidth=r(t,"tileWidth",0),this.tileHeight=r(t,"tileHeight",0),this.widthInPixels=r(t,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=r(t,"heightInPixels",this.height*this.tileHeight),this.format=r(t,"format",null),this.orientation=r(t,"orientation",n.ORTHOGONAL),this.renderOrder=r(t,"renderOrder","right-down"),this.version=r(t,"version","1"),this.properties=r(t,"properties",{}),this.layers=r(t,"layers",[]),this.images=r(t,"images",[]),this.objects=r(t,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=r(t,"collision",{}),this.tilesets=r(t,"tilesets",[]),this.imageCollections=r(t,"imageCollections",[]),this.tiles=r(t,"tiles",[]),this.hexSideLength=r(t,"hexSideLength",0),this.staggerAxis=r(t,"staggerAxis","y"),this.staggerIndex=r(t,"staggerIndex","odd")}});t.exports=o},15256:(t,e,i)=>{var s=i(56694),n=i(72632),r=new s({initialize:function(t){void 0===t&&(t={}),this.name=n(t,"name","object layer"),this.opacity=n(t,"opacity",1),this.properties=n(t,"properties",{}),this.propertyTypes=n(t,"propertytypes",{}),this.type=n(t,"type","objectgroup"),this.visible=n(t,"visible",!0),this.objects=n(t,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});t.exports=r},21394:(t,e,i)=>{var s=i(12920);t.exports=function(t){return"isometric"===(t=t.toLowerCase())?s.ISOMETRIC:"staggered"===t?s.STAGGERED:"hexagonal"===t?s.HEXAGONAL:s.ORTHOGONAL}},90715:(t,e,i)=>{var s=i(93560),n=i(84346),r=i(96097),o=i(2378),a=i(44909);t.exports=function(t,e,i,h,l,u){var c;switch(e){case s.ARRAY_2D:c=n(t,i,h,l,u);break;case s.CSV:c=r(t,i,h,l,u);break;case s.TILED_JSON:c=o(t,i,u);break;case s.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},84346:(t,e,i)=>{var s=i(93560),n=i(94990),r=i(16586),o=i(29633);t.exports=function(t,e,i,a,h){for(var l=new n({tileWidth:i,tileHeight:a}),u=new r({name:t,tileWidth:i,tileHeight:a,format:s.ARRAY_2D,layers:[l]}),c=[],d=e.length,p=0,f=0;f{var s=i(93560),n=i(84346);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map((function(t){return t.split(",")})),h=n(t,a,i,r,o);return h.format=s.CSV,h}},30951:(t,e,i)=>{var s=i(94990),n=i(29633);t.exports=function(t,e){for(var i=[],r=0;r-1?new n(a,p,c,u,o.tilesize,o.tilesize):e?null:new n(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},47488:(t,e,i)=>{var s=i(47975);t.exports=function(t){for(var e=[],i=[],n=0;n{var s=i(93560),n=i(16586),r=i(30951),o=i(47488);t.exports=function(t,e,i){if(0===e.layer.length)return console.warn("No layers found in the Weltmeister map: "+t),null;for(var a=0,h=0,l=0;la&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new n({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:s.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},24507:(t,e,i)=>{t.exports={ParseTileLayers:i(30951),ParseTilesets:i(47488),ParseWeltmeister:i(44909)}},34124:(t,e,i)=>{t.exports={FromOrientationString:i(21394),Parse:i(90715),Parse2DArray:i(84346),ParseCSV:i(96097),Impact:i(24507),Tiled:i(50044)}},48646:(t,e,i)=>{var s=i(98611);t.exports=function(t){for(var e,i,n,r,o,a=0;a{t.exports=function(t){for(var e=window.atob(t),i=e.length,s=new Array(i/4),n=0;n>>0;return s}},14556:(t,e,i)=>{var s=i(47975);t.exports=function(t){var e,i,n=[];for(e=0;e{var s=i(72632);t.exports=function(t,e,i){if(!e)return{i:0,layers:t.layers,name:"",opacity:1,visible:!0,x:0,y:0};var n=e.x+s(e,"startx",0)*t.tilewidth+s(e,"offsetx",0),r=e.y+s(e,"starty",0)*t.tileheight+s(e,"offsety",0);return{i:0,layers:e.layers,name:i.name+e.name+"/",opacity:i.opacity*e.opacity,visible:i.visible&&e.visible,x:i.x+n,y:i.y+r}}},8847:t=>{var e=2147483648,i=1073741824,s=536870912;t.exports=function(t){var n=Boolean(t&e),r=Boolean(t&i),o=Boolean(t&s);t&=536870911;var a=0,h=!1;return n&&r&&o?(a=Math.PI/2,h=!0):n&&r&&!o?(a=Math.PI,h=!1):n&&!r&&o?(a=Math.PI/2,h=!1):!n||r||o?!n&&r&&o?(a=3*Math.PI/2,h=!1):n||!r||o?n||r||!o?n||r||o||(a=0,h=!1):(a=3*Math.PI/2,h=!0):(a=Math.PI,h=!0):(a=0,h=!0),{gid:t,flippedHorizontal:n,flippedVertical:r,flippedAntiDiagonal:o,rotation:a,flipped:h}}},78339:(t,e,i)=>{var s=i(72632),n=i(92044);t.exports=function(t){for(var e=[],i=[],r=n(t);r.i0;)if(r.i>=r.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=i.pop()}else{var o=r.layers[r.i];if(r.i++,"imagelayer"===o.type){var a=s(o,"offsetx",0)+s(o,"startx",0),h=s(o,"offsety",0)+s(o,"starty",0);e.push({name:r.name+o.name,image:o.image,x:r.x+a+o.x,y:r.y+h+o.y,alpha:r.opacity*o.opacity,visible:r.visible&&o.visible,properties:s(o,"properties",{})})}else if("group"===o.type){var l=n(t,o,r);i.push(r),r=l}}return e}},2378:(t,e,i)=>{var s=i(48646),n=i(14556),r=i(12920),o=i(28699),a=i(93560),h=i(21394),l=i(16586),u=i(78339),c=i(61136),d=i(95925),p=i(93392);t.exports=function(t,e,i){var f=o(e),v=new l({width:f.width,height:f.height,name:t,tileWidth:f.tilewidth,tileHeight:f.tileheight,orientation:h(f.orientation),format:a.TILED_JSON,version:f.version,properties:f.properties,renderOrder:f.renderorder,infinite:f.infinite});v.orientation===r.HEXAGONAL&&(v.hexSideLength=f.hexsidelength,v.staggerAxis=f.staggeraxis,v.staggerIndex=f.staggerindex),v.layers=d(f,i),v.images=u(f);var g=p(f);return v.tilesets=g.tilesets,v.imageCollections=g.imageCollections,v.objects=c(f),v.tiles=n(v),s(v),v}},4281:(t,e,i)=>{var s=i(28820),n=i(8847),r=function(t){return{x:t.x,y:t.y}},o=["id","name","type","rotation","properties","visible","x","y","width","height"];t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var a=s(t,o);if(a.x+=e,a.y+=i,t.gid){var h=n(t.gid);a.gid=h.gid,a.flippedHorizontal=h.flippedHorizontal,a.flippedVertical=h.flippedVertical,a.flippedAntiDiagonal=h.flippedAntiDiagonal}else t.polyline?a.polyline=t.polyline.map(r):t.polygon?a.polygon=t.polygon.map(r):t.ellipse?a.ellipse=t.ellipse:t.text?a.text=t.text:t.point?a.point=!0:a.rectangle=!0;return a}},61136:(t,e,i)=>{var s=i(72632),n=i(4281),r=i(15256),o=i(92044);t.exports=function(t){for(var e=[],i=[],a=o(t);a.i0;)if(a.i>=a.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}a=i.pop()}else{var h=a.layers[a.i];if(a.i++,h.opacity*=a.opacity,h.visible=a.visible&&h.visible,"objectgroup"===h.type){h.name=a.name+h.name;for(var l=a.x+s(h,"startx",0)+s(h,"offsetx",0),u=a.y+s(h,"starty",0)+s(h,"offsety",0),c=[],d=0;d{var s=i(43908),n=i(12920),r=i(92044),o=i(21394),a=i(72632),h=i(94990),l=i(8847),u=i(29633);t.exports=function(t,e){for(var i=a(t,"infinite",!1),c=[],d=[],p=r(t);p.i0;)if(p.i>=p.layers.length){if(d.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}p=d.pop()}else{var f=p.layers[p.i];if(p.i++,"tilelayer"===f.type)if(f.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+f.name+"'");else{if(f.encoding&&"base64"===f.encoding){if(f.chunks)for(var v=0;v0?((y=new u(g,m.gid,L,F,t.tilewidth,t.tileheight)).rotation=m.rotation,y.flipX=m.flipped,T[F][L]=y):(x=e?null:new u(g,-1,L,F,t.tilewidth,t.tileheight),T[F][L]=x),++w===C.width&&(R++,w=0)}}else{(g=new h({name:p.name+f.name,x:p.x+a(f,"offsetx",0)+f.x,y:p.y+a(f,"offsety",0)+f.y,width:f.width,height:f.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:p.opacity*f.opacity,visible:p.visible&&f.visible,properties:a(f,"properties",[]),orientation:o(t.orientation)})).orientation===n.HEXAGONAL&&(g.hexSideLength=t.hexsidelength);for(var D=[],k=0,I=f.data.length;k0?((y=new u(g,m.gid,w,T.length,t.tilewidth,t.tileheight)).rotation=m.rotation,y.flipX=m.flipped,D.push(y)):(x=e?null:new u(g,-1,w,T.length,t.tilewidth,t.tileheight),D.push(x)),++w===f.width&&(T.push(D),w=0,D=[])}g.data=T,c.push(g)}else if("group"===f.type){var B=r(t,f,p);d.push(p),p=B}}return c}},93392:(t,e,i)=>{var s=i(47975),n=i(97042),r=i(4281),o=i(39642);t.exports=function(t){for(var e,i=[],a=[],h=null,l=0;l1){var d=void 0,p=void 0;if(Array.isArray(u.tiles)){d=d||{},p=p||{};for(var f=0;f{t.exports=function(t,e){for(var i=0;i0){var r,o,a,h={},l={};if(Array.isArray(s.edgecolors))for(r=0;r{t.exports={AssignTileProperties:i(48646),Base64Decode:i(43908),BuildTilesetIndex:i(14556),CreateGroupLayer:i(92044),ParseGID:i(8847),ParseImageLayers:i(78339),ParseJSONTiled:i(2378),ParseObject:i(4281),ParseObjectLayers:i(61136),ParseTileLayers:i(95925),ParseTilesets:i(93392)}},73779:(t,e,i)=>{var s=i(56694),n=i(91963),r=i(7599),o=i(57911),a=i(66458),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.now=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(r.PRE_UPDATE,this.preUpdate,this),t.on(r.UPDATE,this.update,this),t.once(r.SHUTDOWN,this.shutdown,this)},addEvent:function(t){var e;return t instanceof o?(e=t,this.removeEvent(e),e.elapsed=e.startAt,e.hasDispatched=!1,e.repeatCount=-1===e.repeat||e.loop?999999999999:e.repeat):e=new o(t),this._pendingInsertion.push(e),e},delayedCall:function(t,e,i,s){return this.addEvent({delay:t,callback:e,args:i,callbackScope:s})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e-1&&this._active.splice(n,1),s.destroy()}for(i=0;i=s.delay)){var n=s.elapsed-s.delay;if(s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),s.repeatCount>0){if(s.repeatCount--,n>=s.delay)for(;n>=s.delay&&s.repeatCount>0;)s.callback&&s.callback.apply(s.callbackScope,s.args),n-=s.delay,s.repeatCount--;s.elapsed=n,s.hasDispatched=!1}else s.hasDispatched&&this._pendingRemoval.push(s)}}}},shutdown:function(){var t;for(t=0;t{var s=i(56694),n=i(72632),r=new s({initialize:function(t){this.delay=0,this.repeat=0,this.repeatCount=0,this.loop=!1,this.callback,this.callbackScope,this.args,this.timeScale=1,this.startAt=0,this.elapsed=0,this.paused=!1,this.hasDispatched=!1,this.reset(t)},reset:function(t){if(this.delay=n(t,"delay",0),this.repeat=n(t,"repeat",0),this.loop=n(t,"loop",!1),this.callback=n(t,"callback",void 0),this.callbackScope=n(t,"callbackScope",this.callback),this.args=n(t,"args",[]),this.timeScale=n(t,"timeScale",1),this.startAt=n(t,"startAt",0),this.paused=n(t,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=-1===this.repeat||this.loop?999999999999:this.repeat,0===this.delay&&(this.repeat>0||this.loop))throw new Error("TimerEvent infinite loop created via zero delay");return this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return.001*this.getRemaining()},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return.001*this.getOverallRemaining()},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},97121:(t,e,i)=>{t.exports={Clock:i(73779),TimerEvent:i(57911)}},64532:(t,e,i)=>{var s=i(66458),n=i(56694),r=i(5454),o=i(68710),a=i(91963),h=i(7599),l=i(91944),u=i(39366),c=i(68061),d=i(45641),p=i(56034),f=new n({initialize:function(t){this.scene=t,this.events=t.sys.events,this.timeScale=1,this.paused=!1,this.processing=!1,this.tweens=[],this.time=0,this.startTime=0,this.nextTime=0,this.prevTime=0,this.maxLag=500,this.lagSkip=33,this.gap=1e3/240,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.events.once(h.DESTROY,this.destroy,this)},start:function(){this.timeScale=1,this.paused=!1,this.startTime=Date.now(),this.prevTime=this.startTime,this.nextTime=this.gap,this.events.on(h.UPDATE,this.update,this),this.events.once(h.SHUTDOWN,this.shutdown,this)},create:function(t){Array.isArray(t)||(t=[t]);for(var e=[],i=0;i-1},existing:function(t){return this.has(t)||this.tweens.push(t.reset()),this},addCounter:function(t){var e=o(this,t);return this.tweens.push(e.reset()),e},stagger:function(t,e){return l(t,e)},setLagSmooth:function(t,e){return void 0===t&&(t=1/1e-8),void 0===e&&(e=0),this.maxLag=t,this.lagSkip=Math.min(e,this.maxLag),this},setFps:function(t){return void 0===t&&(t=240),this.gap=1e3/t,this.nextTime=1e3*this.time+this.gap,this},getDelta:function(t){var e=Date.now()-this.prevTime;e>this.maxLag&&(this.startTime+=e-this.lagSkip),this.prevTime+=e;var i=this.prevTime-this.startTime,s=i-this.nextTime,n=i-1e3*this.time;return s>0||t?(i/=1e3,this.time=i,this.nextTime+=s+(s>=this.gap?4:this.gap-s)):n=0,n},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(t){void 0===t&&(t=!1);var e=this.getDelta(t);if(!(e<=0)){var i,s;this.processing=!0;var n=[],r=this.tweens;for(i=0;i0){for(i=0;i-1&&(s.isPendingRemove()||s.isDestroyed())&&(r.splice(a,1),s.destroy())}n.length=0}this.processing=!1}},remove:function(t){return this.processing?t.setPendingRemoveState():(s(this.tweens,t),t.setRemovedState()),this},reset:function(t){return this.existing(t),t.seek(),t.setActiveState(),this},makeActive:function(t){return this.existing(t),t.setActiveState(),this},each:function(t,e){var i,s=[null];for(i=1;i{t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},21902:(t,e,i)=>{var s=i(35060),n=i(40587);t.exports=function(t,e){var i=s.Power0;if("string"==typeof t)if(s.hasOwnProperty(t))i=s[t];else{var r="";if(t.indexOf(".")){var o=(r=t.substring(t.indexOf(".")+1)).toLowerCase();"in"===o?r="easeIn":"out"===o?r="easeOut":"inout"===o&&(r="easeInOut")}t=n(t.substring(0,t.indexOf(".")+1)+r),s.hasOwnProperty(t)&&(i=s[t])}else"function"==typeof t&&(i=t);if(!e)return i;var a=e.slice(0);return a.unshift(0),function(t){return a[0]=t,i.apply(this,a)}}},4840:(t,e,i)=>{var s=i(63210),n=i(88332),r={bezier:s,catmull:n,catmullrom:n,linear:i(47614)};t.exports=function(t){if(null===t)return null;var e=r.linear;return"string"==typeof t?r.hasOwnProperty(t)&&(e=r[t]):"function"==typeof t&&(e=t),e}},28348:t=>{t.exports=function(t,e,i){var s;t.hasOwnProperty(e)?s="function"===typeof t[e]?function(i,s,n,r,o,a){return t[e](i,s,n,r,o,a)}:function(){return t[e]}:s="function"==typeof i?i:function(){return i};return s}},92407:(t,e,i)=>{var s=i(53709);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substring(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===s.indexOf(e)&&"_"!==e.substring(0,1)&&i.push({key:e,value:t[e]});return i}},65868:(t,e,i)=>{var s=i(10850);t.exports=function(t){var e=s(t,"targets",null);return null===e||("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e])),e}},9744:(t,e,i)=>{var s=i(17489),n=i(61616);function r(t){return!!t.getActive&&"function"==typeof t.getActive}function o(t){return!!t.getStart&&"function"==typeof t.getStart}function a(t){return!!t.getEnd&&"function"==typeof t.getEnd}var h=function(t,e){var i,l,u=function(t,e,i){return i},c=function(t,e,i){return i},d=null,p=typeof e;if("number"===p)u=function(){return e};else if(Array.isArray(e))c=function(){return e[0]},u=function(){return e[e.length-1]};else if("string"===p){var f=e.toLowerCase(),v="random"===f.substring(0,6),g="int"===f.substring(0,3);if(v||g){var m=f.indexOf("("),y=f.indexOf(")"),x=f.indexOf(",");if(!(m&&y&&x))throw new Error("invalid random() format");var T=parseFloat(f.substring(m+1,x)),w=parseFloat(f.substring(x+1,y));u=v?function(){return n(T,w)}:function(){return s(T,w)}}else{f=f[0];var b=parseFloat(e.substr(2));switch(f){case"+":u=function(t,e,i){return i+b};break;case"-":u=function(t,e,i){return i-b};break;case"*":u=function(t,e,i){return i*b};break;case"/":u=function(t,e,i){return i/b};break;default:u=function(){return parseFloat(e)}}}}else if("function"===p)u=e;else if("object"===p)if(o(l=e)||a(l)||r(l))r(e)&&(d=e.getActive),a(e)&&(u=e.getEnd),o(e)&&(c=e.getStart);else if(e.hasOwnProperty("value"))i=h(t,e.value);else{var E=e.hasOwnProperty("to"),S=e.hasOwnProperty("from"),A=e.hasOwnProperty("start");if(E&&(S||A)){if(i=h(t,e.to),A){var C=h(t,e.start);i.getActive=C.getEnd}if(S){var _=h(t,e.from);i.getStart=_.getEnd}}}return i||(i={getActive:d,getEnd:u,getStart:c}),i};t.exports=h},68710:(t,e,i)=>{var s=i(502),n=i(99730),r=i(20494),o=i(63130),a=i(21902),h=i(28348),l=i(10850),u=i(9744),c=i(72066),d=i(39366);t.exports=function(t,e,i){if(e instanceof d)return e.parent=t,e;i=void 0===i?n:c(n,i);var p=l(e,"from",0),f=l(e,"to",1),v=[{value:p}],g=l(e,"delay",i.delay),m=l(e,"easeParams",i.easeParams),y=l(e,"ease",i.ease),x=u("value",f),T=new d(t,v),w=T.add(0,"value",x.getEnd,x.getStart,x.getActive,a(l(e,"ease",y),l(e,"easeParams",m)),h(e,"delay",g),l(e,"duration",i.duration),o(e,"yoyo",i.yoyo),l(e,"hold",i.hold),l(e,"repeat",i.repeat),l(e,"repeatDelay",i.repeatDelay),!1,!1);w.start=p,w.current=p,T.completeDelay=r(e,"completeDelay",0),T.loop=Math.round(r(e,"loop",0)),T.loopDelay=Math.round(r(e,"loopDelay",0)),T.paused=o(e,"paused",!1),T.persist=o(e,"persist",!1),T.callbackScope=l(e,"callbackScope",T);for(var b=s.TYPES,E=0;E{var s=i(21902),n=i(10850),r=i(83392);t.exports=function(t,e){var i;void 0===e&&(e={});var o=n(e,"start",0),a=n(e,"ease",null),h=n(e,"grid",null),l=n(e,"from",0),u="first"===l,c="center"===l,d="last"===l,p="number"==typeof l,f=Array.isArray(t),v=f?parseFloat(t[0]):parseFloat(t),g=f?parseFloat(t[1]):0,m=Math.max(v,g);if(f&&(o+=v),h){var y=h[0],x=h[1],T=0,w=0,b=0,E=0,S=[];d?(T=y-1,w=x-1):p?(T=l%y,w=Math.floor(l/y)):c&&(T=(y-1)/2,w=(x-1)/2);for(var A=r.MIN_SAFE_INTEGER,C=0;CA&&(A=M),S[C][_]=M}}}var R=a?s(a):null;return i=h?function(t,e,i,s){var n,r=0,a=s%y,h=Math.floor(s/y);if(a>=0&&a=0&&h{var s=i(502),n=i(99730),r=i(20494),o=i(63130),a=i(21902),h=i(4840),l=i(28348),u=i(92407),c=i(65868),d=i(10850),p=i(9744),f=i(72066),v=i(39366);t.exports=function(t,e,i){if(e instanceof v)return e.parent=t,e;i=void 0===i?n:f(n,i);var g=c(e);!g&&i.targets&&(g=i.targets);for(var m=u(e),y=d(e,"delay",i.delay),x=d(e,"duration",i.duration),T=d(e,"easeParams",i.easeParams),w=d(e,"ease",i.ease),b=d(e,"hold",i.hold),E=d(e,"repeat",i.repeat),S=d(e,"repeatDelay",i.repeatDelay),A=o(e,"yoyo",i.yoyo),C=o(e,"flipX",i.flipX),_=o(e,"flipY",i.flipY),M=d(e,"interpolation",i.interpolation),R=function(t,e,i,s){if("texture"===i){var n=s,r=void 0;Array.isArray(s)?(n=s[0],r=s[1]):s.hasOwnProperty("value")?(n=s.value,Array.isArray(s.value)?(n=s.value[0],r=s.value[1]):"string"==typeof s.value&&(n=s.value)):"string"==typeof s&&(n=s),t.addFrame(e,n,r,l(s,"delay",y),d(s,"duration",x),d(s,"hold",b),d(s,"repeat",E),d(s,"repeatDelay",S),o(s,"flipX",C),o(s,"flipY",_))}else{var u=p(i,s),c=h(d(s,"interpolation",M));t.add(e,i,u.getEnd,u.getStart,u.getActive,a(d(s,"ease",w),d(s,"easeParams",T)),l(s,"delay",y),d(s,"duration",x),o(s,"yoyo",A),d(s,"hold",b),d(s,"repeat",E),d(s,"repeatDelay",S),o(s,"flipX",C),o(s,"flipY",_),c,c?s:null)}},P=new v(t,g),O=0;O{var s=i(502),n=i(20494),r=i(63130),o=i(65868),a=i(10850),h=i(68061),l=i(45641);t.exports=function(t,e){if(e instanceof l)return e.parent=t,e;var i,u=new l(t);u.startDelay=a(e,"delay",0),u.completeDelay=n(e,"completeDelay",0),u.loop=Math.round(n(e,"loop",a(e,"repeat",0))),u.loopDelay=Math.round(n(e,"loopDelay",a(e,"repeatDelay",0))),u.paused=r(e,"paused",!1),u.persist=r(e,"persist",!0),u.callbackScope=a(e,"callbackScope",u);var c=s.TYPES;for(i=0;i{t.exports={GetBoolean:i(63130),GetEaseFunction:i(21902),GetInterpolationFunction:i(4840),GetNewValue:i(28348),GetProps:i(92407),GetTargets:i(65868),GetValueOp:i(9744),NumberTweenBuilder:i(68710),StaggerBuilder:i(91944),TweenBuilder:i(68061)}},5570:t=>{t.exports="active"},6383:t=>{t.exports="complete"},72582:t=>{t.exports="loop"},90281:t=>{t.exports="pause"},80803:t=>{t.exports="repeat"},13640:t=>{t.exports="resume"},10472:t=>{t.exports="start"},5379:t=>{t.exports="stop"},43449:t=>{t.exports="update"},61541:t=>{t.exports="yoyo"},54272:(t,e,i)=>{t.exports={TWEEN_ACTIVE:i(5570),TWEEN_COMPLETE:i(6383),TWEEN_LOOP:i(72582),TWEEN_PAUSE:i(90281),TWEEN_RESUME:i(13640),TWEEN_REPEAT:i(80803),TWEEN_START:i(10472),TWEEN_STOP:i(5379),TWEEN_UPDATE:i(43449),TWEEN_YOYO:i(61541)}},75193:(t,e,i)=>{var s={States:i(55303),Builders:i(79619),Events:i(54272),TweenManager:i(64532),Tween:i(39366),TweenData:i(15718),TweenFrameData:i(96490),BaseTween:i(502),TweenChain:i(45641)};t.exports=s},502:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(54272),o=i(55303),a=new s({Extends:n,initialize:function(t){n.call(this),this.parent=t,this.data=[],this.totalData=0,this.startDelay=0,this.hasStarted=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=o.PENDING,this.paused=!1,this.callbacks={onActive:null,onComplete:null,onLoop:null,onPause:null,onRepeat:null,onResume:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope,this.persist=!1},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return!this.paused&&this.isActive()},isPaused:function(){return this.paused},pause:function(){return this.paused||(this.paused=!0,this.dispatchEvent(r.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(r.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(r.TWEEN_COMPLETE,"onComplete")},complete:function(t){return void 0===t&&(t=0),t?(this.setCompleteDelayState(),this.countdown=t):this.onCompleteHandler(),this},completeAfterLoop:function(t){return void 0===t&&(t=0),this.loopCounter>t&&(this.loopCounter=t),this},remove:function(){return this.parent.remove(this),this},stop:function(){return this.isRemoved()||this.isPendingRemove()||this.isDestroyed()||(this.dispatchEvent(r.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(t){this.countdown-=t,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(r.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(t){return this.countdown-=t,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(r.TWEEN_START,"onStart"),t=0),t},updateCompleteDelay:function(t){this.countdown-=t,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(t,e,i){return void 0===i&&(i=[]),this.callbacks.hasOwnProperty(t)&&(this.callbacks[t]={func:e,params:i}),this},setPendingState:function(){this.state=o.PENDING},setActiveState:function(){this.state=o.ACTIVE},setLoopDelayState:function(){this.state=o.LOOP_DELAY},setCompleteDelayState:function(){this.state=o.COMPLETE_DELAY},setStartDelayState:function(){this.state=o.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=o.PENDING_REMOVE},setRemovedState:function(){this.state=o.REMOVED},setFinishedState:function(){this.state=o.FINISHED},setDestroyedState:function(){this.state=o.DESTROYED},isPending:function(){return this.state===o.PENDING},isActive:function(){return this.state===o.ACTIVE},isLoopDelayed:function(){return this.state===o.LOOP_DELAY},isCompleteDelayed:function(){return this.state===o.COMPLETE_DELAY},isStartDelayed:function(){return this.state===o.START_DELAY},isPendingRemove:function(){return this.state===o.PENDING_REMOVE},isRemoved:function(){return this.state===o.REMOVED},isFinished:function(){return this.state===o.FINISHED},isDestroyed:function(){return this.state===o.DESTROYED},destroy:function(){this.data&&this.data.forEach((function(t){t.destroy()})),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});a.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],t.exports=a},65521:(t,e,i)=>{var s=i(56694),n=i(54272),r=i(55303),o=new s({initialize:function(t,e,i,s,n,r,o,a,h,l){this.tween=t,this.targetIndex=e,this.duration=s,this.totalDuration=0,this.delay=0,this.getDelay=i,this.yoyo=n,this.hold=r,this.repeat=o,this.repeatDelay=a,this.repeatCounter=0,this.flipX=h,this.flipY=l,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(t){void 0===t&&(t=this.current),this.tween.targets[this.targetIndex][this.key]=t},setCreatedState:function(){this.state=r.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=r.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=r.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=r.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=r.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=r.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=r.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=r.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===r.CREATED},isDelayed:function(){return this.state===r.DELAY},isPendingRender:function(){return this.state===r.PENDING_RENDER},isPlayingForward:function(){return this.state===r.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===r.PLAYING_BACKWARD},isHolding:function(){return this.state===r.HOLD_DELAY},isRepeating:function(){return this.state===r.REPEAT_DELAY},isComplete:function(){return this.state===r.COMPLETE},setStateFromEnd:function(t){this.yoyo?this.onRepeat(t,!0,!0):this.repeatCounter>0?this.onRepeat(t,!0,!1):this.setCompleteState()},setStateFromStart:function(t){this.repeatCounter>0?this.onRepeat(t,!1):this.setCompleteState()},reset:function(){var t=this.tween,e=t.totalTargets,i=this.targetIndex,s=t.targets[i],n=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(s,n,0,i,e,t),this.repeatCounter=-1===this.repeat?r.MAX:this.repeat,this.setPendingRenderState();var o=this.duration+this.hold;this.yoyo&&(o+=this.duration);var a=o+this.repeatDelay;this.totalDuration=this.delay+o,-1===this.repeat?(this.totalDuration+=a*r.MAX,t.isInfinite=!0):this.repeat>0&&(this.totalDuration+=a*this.repeat),this.totalDuration>t.duration&&(t.duration=this.totalDuration),this.delay0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(t,e,i){var s=this.tween,r=s.totalTargets,o=this.targetIndex,a=s.targets[o],h=this.key,l="texture"!==h;if(this.elapsed=t,this.progress=t/this.duration,this.flipX&&a.toggleFlipX(),this.flipY&&a.toggleFlipY(),l&&(e||i)&&(this.start=this.getStartValue(a,h,this.start,o,r,s)),i)return this.setPlayingBackwardState(),void this.dispatchEvent(n.TWEEN_YOYO,"onYoyo");this.repeatCounter--,l&&(this.end=this.getEndValue(a,h,this.start,o,r,s)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-t,l&&(this.current=this.start,a[h]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(n.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});t.exports=o},99730:t=>{t.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1,persist:!1,interpolation:null}},53709:t=>{t.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","interpolation","loop","loopDelay","onActive","onActiveParams","onComplete","onCompleteParams","onLoop","onLoopParams","onPause","onPauseParams","onRepeat","onRepeatParams","onResume","onResumeParams","onStart","onStartParams","onStop","onStopParams","onUpdate","onUpdateParams","onYoyo","onYoyoParams","paused","persist","props","repeat","repeatDelay","targets","yoyo"]},39366:(t,e,i)=>{var s=i(502),n=i(56694),r=i(54272),o=i(99325),a=i(61286),h=i(83392),l=i(55303),u=i(15718),c=i(96490),d=new n({Extends:s,initialize:function(t,e){s.call(this,t),this.targets=e,this.totalTargets=e.length,this.isSeeking=!1,this.isInfinite=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0},add:function(t,e,i,s,n,r,o,a,h,l,c,d,p,f,v,g){var m=new u(this,t,e,i,s,n,r,o,a,h,l,c,d,p,f,v,g);return this.totalData=this.data.push(m),m},addFrame:function(t,e,i,s,n,r,o,a,h,l){var u=new c(this,t,e,i,s,n,r,o,a,h,l);return this.totalData=this.data.push(u),u},getValue:function(t){void 0===t&&(t=0);var e=null;return this.data&&(e=this.data[t].current),e},hasTarget:function(t){return this.targets&&-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){if(void 0===i&&(i=!1),"texture"!==t)for(var s=0;s0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(r.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,s.prototype.onCompleteHandler.call(this)},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed Tween",this),this):((this.isPendingRemove()||this.isFinished())&&this.seek(),this.paused=!1,this.setActiveState(),this)},seek:function(t,e,i){if(void 0===t&&(t=0),void 0===e&&(e=16.6),void 0===i&&(i=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;i||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive");var s=this.paused;if(this.paused=!1,t>0){for(var n=Math.floor(t/e),o=t-n*e,a=0;a0&&this.update(o)}return this.paused=s,this.isSeeking=!1,this},initTweenData:function(t){void 0===t&&(t=!1),this.duration=0,this.startDelay=h.MAX_SAFE_INTEGER;for(var e=this.data,i=0;i0?s+n+(s+o)*r:s+n},reset:function(t){return void 0===t&&(t=!1),this.elapsed=0,this.totalElapsed=0,this.progress=0,this.totalProgress=0,this.loopCounter=this.loop,-1===this.loop&&(this.isInfinite=!0,this.loopCounter=l.MAX),t||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive")),this},update:function(t){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(t*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(t),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(t),!1;this.hasStarted||(this.startDelay-=t,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(r.TWEEN_START,"onStart"),t=0));var e=!1;if(this.isActive())for(var i=this.data,s=0;s{var s=i(66458),n=i(502),r=i(56694),o=i(54272),a=i(99325),h=i(61286),l=i(55303),u=new r({Extends:n,initialize:function(t){n.call(this,t),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=-1===this.loop?l.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this.dispatchEvent(o.TWEEN_ACTIVE,"onActive"),this},add:function(t){var e=this.parent.create(t);Array.isArray(e)||(e=[e]);for(var i=this.data,s=0;s0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(o.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed TweenChain",this),this):((this.isPendingRemove()||this.isPending())&&this.resetTweens(),this.paused=!1,this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this)},resetTweens:function(){for(var t=this.data,e=this.totalData,i=0;i{var s=i(65521),n=i(82897),r=i(56694),o=i(54272),a=new r({Extends:s,initialize:function(t,e,i,n,r,o,a,h,l,u,c,d,p,f,v,g,m){s.call(this,t,e,h,l,u,c,d,p,f,v),this.key=i,this.getActiveValue=o,this.getEndValue=n,this.getStartValue=r,this.ease=a,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=g,this.interpolationData=m},reset:function(t){s.prototype.reset.call(this);var e=this.tween.targets[this.targetIndex],i=this.key;t&&(e[i]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(e[i]=this.getActiveValue(e,i,0))},update:function(t){var e=this.tween,i=e.totalTargets,s=this.targetIndex,r=e.targets[s],a=this.key;if(!r)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=t,this.elapsed<=0&&(this.elapsed=0,t=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(o.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(r,a,r[a],s,i,e),this.end=this.getEndValue(r,a,this.start,s,i,e),this.current=this.start,r[a]=this.start,this.setPlayingForwardState(),!0;var h=this.isPlayingForward(),l=this.isPlayingBackward();if(h||l){var u=this.elapsed,c=this.duration,d=0,p=!1;(u+=t)>=c?(d=u-c,u=c,p=!0):u<0&&(u=0);var f=n(u/c,0,1);if(this.elapsed=u,this.progress=f,this.previous=this.current,p)h?(this.current=this.end,r[a]=this.end,this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(d)):(this.current=this.start,r[a]=this.start,this.setStateFromStart(d));else{h||(f=1-f);var v=this.ease(f);this.interpolation?this.current=this.interpolation(this.interpolationData,v):this.current=this.start+(this.end-this.start)*v,r[a]=this.current}this.dispatchEvent(o.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(t,e){var i=this.tween;if(!i.isSeeking){var s=i.targets[this.targetIndex],n=this.key,r=this.current,o=this.previous;i.emit(t,i,n,s,r,o);var a=i.callbacks[e];a&&a.func.apply(i.callbackScope,[i,s,n,r,o].concat(a.params))}},destroy:function(){s.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});t.exports=a},96490:(t,e,i)=>{var s=i(65521),n=i(82897),r=i(56694),o=i(54272),a=new r({Extends:s,initialize:function(t,e,i,n,r,o,a,h,l,u,c){s.call(this,t,e,r,o,!1,a,h,l,u,c),this.key="texture",this.startTexture=null,this.endTexture=i,this.startFrame=null,this.endFrame=n,this.yoyo=0!==h},reset:function(t){s.prototype.reset.call(this);var e=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=e.texture.key,this.startFrame=e.frame.name),t&&e.setTexture(this.startTexture,this.startFrame)},update:function(t){var e=this.tween,i=this.targetIndex,s=e.targets[i];if(!s)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=t,this.elapsed<=0&&(this.elapsed=0,t=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(o.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&s.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var r=this.isPlayingForward(),a=this.isPlayingBackward();if(r||a){var h=this.elapsed,l=this.duration,u=0,c=!1;(h+=t)>=l?(u=h-l,h=l,c=!0):h<0&&(h=0);var d=n(h/l,0,1);this.elapsed=h,this.progress=d,c&&(r?(s.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(u)):(s.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(u))),this.dispatchEvent(o.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(t,e){var i=this.tween;if(!i.isSeeking){var s=i.targets[this.targetIndex],n=this.key;i.emit(t,i,n,s);var r=i.callbacks[e];r&&r.func.apply(i.callbackScope,[i,s,n].concat(r.params))}},destroy:function(){s.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});t.exports=a},55303:t=>{t.exports={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999}},56694:t=>{function e(t,e,i){var s=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&s.value&&"object"==typeof s.value&&(s=s.value),!(!s||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(s))&&(void 0===s.enumerable&&(s.enumerable=!0),void 0===s.configurable&&(s.configurable=!0),s)}function i(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,s,n,o){for(var a in s)if(s.hasOwnProperty(a)){var h=e(s,a,n);if(!1!==h){if(i((o||t).prototype,a)){if(r.ignoreFinals)continue;throw new Error("cannot override final property '"+a+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,a,h)}else t.prototype[a]=s[a]}}function n(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i{t.exports=function(){}},10618:t=>{t.exports=function(){return null}},78991:t=>{t.exports=function(t,e,i,s,n){if(void 0===n&&(n=t),i>0){var r=i-t.length;if(r<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),s&&s.call(n,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a{t.exports=function(t,e,i,s,n,r){if(void 0===i&&(i=0),void 0===r&&(r=t),s>0){var o=s-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),n&&n.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;s>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var l=e[h];t.splice(i,0,l),n&&n.call(r,l)}return e}},58742:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i{var s=i(45838);t.exports=function(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);var o=0;if(s(t,n,r))for(var a=n;a{t.exports=function(t,e,i){var s,n=[null];for(s=3;s{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r)){var o,a=[null];for(o=5;o{t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var s,n,r=1;if(i){if(te.length&&(r=e.length),i?(s=e[r-1][i],(n=e[r][i])-t<=t-s?e[r]:e[r-1]):(s=e[r-1],(n=e[r])-t<=t-s?n:s)}},5454:t=>{var e=function(t,i){void 0===i&&(i=[]);for(var s=0;s{var s=i(45838);t.exports=function(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);var o=[];if(s(t,n,r))for(var a=n;a{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r))for(var o=n;o{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var s=e+Math.floor(Math.random()*i);return void 0===t[s]?null:t[s]}},24218:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),n=t.indexOf(i);if(s<0||n<0)throw new Error("Supplied items must be elements of the same array");return s>n||(t.splice(s,1),n===t.length-1?t.push(e):t.splice(n,0,e)),t}},58258:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),n=t.indexOf(i);if(s<0||n<0)throw new Error("Supplied items must be elements of the same array");return s{t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var s=t[i-1],n=t.indexOf(s);t[i]=s,t[n]=e}return t}},68396:t=>{t.exports=function(t,e,i){var s=t.indexOf(e);if(-1===s||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return s!==i&&(t.splice(s,1),t.splice(i,0,e)),e}},27555:t=>{t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i{t.exports=function(t,e,i,s){var n,r=[],o=!1;if((i||s)&&(o=!0,i||(i=""),s||(s="")),e=e;n--)o?r.push(i+n.toString()+s):r.push(n);else for(n=t;n<=e;n++)o?r.push(i+n.toString()+s):r.push(n);return r}},89955:(t,e,i)=>{var s=i(67233);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var n=[],r=Math.max(s((e-t)/(i||1)),0),o=0;o{function e(t,e,i){var s=t[e];t[e]=t[i],t[i]=s}function i(t,e){return te?1:0}var s=function(t,n,r,o,a){for(void 0===r&&(r=0),void 0===o&&(o=t.length-1),void 0===a&&(a=i);o>r;){if(o-r>600){var h=o-r+1,l=n-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),p=Math.max(r,Math.floor(n-l*c/h+d)),f=Math.min(o,Math.floor(n+(h-l)*c/h+d));s(t,n,p,f,a)}var v=t[n],g=r,m=o;for(e(t,r,n),a(t[o],v)>0&&e(t,r,o);g0;)m--}0===a(t[r],v)?e(t,r,m):e(t,++m,o),m<=n&&(r=m+1),n<=m&&(o=m-1)}};t.exports=s},75757:(t,e,i)=>{var s=i(10850),n=i(18592),r=function(t,e,i){for(var s=[],n=0;n{var s=i(72677);t.exports=function(t,e,i,n){var r;if(void 0===n&&(n=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(s(t,r),i&&i.call(n,e),e):null;for(var o=e.length-1,a=[];o>=0;){var h=e[o];-1!==(r=t.indexOf(h))&&(s(t,r),a.push(h),i&&i.call(n,h)),o--}return a}},8324:(t,e,i)=>{var s=i(72677);t.exports=function(t,e,i,n){if(void 0===n&&(n=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var r=s(t,e);return i&&i.call(n,r),r}},47427:(t,e,i)=>{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),s(t,e,i)){var o=i-e,a=t.splice(e,o);if(n)for(var h=0;h{var s=i(72677);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var n=e+Math.floor(Math.random()*i);return s(t,n)}},80402:t=>{t.exports=function(t,e,i){var s=t.indexOf(e),n=t.indexOf(i);return-1!==s&&-1===n&&(t[s]=i,!0)}},77640:t=>{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e,i,s){var n=t.length;if(e<0||e>n||e>=i||i>n){if(s)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},27847:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},6034:(t,e,i)=>{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r))for(var o=n;o{t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[i],t[i]=s}return t}},28834:t=>{t.exports=function(t){var e=/\D/g;return t.sort((function(t,i){return parseInt(t.replace(e,""),10)-parseInt(i.replace(e,""),10)})),t}},72677:t=>{t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,s=t[e],n=e;n{var s=i(77290);function n(t,e){return String(t).localeCompare(e)}function r(t,e,i,s){var n,r,o,a,h,l=t.length,u=0,c=2*i;for(n=0;nl&&(r=l),o>l&&(o=l),a=n,h=r;;)if(a{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),n=t.indexOf(i);if(s<0||n<0)throw new Error("Supplied items must be elements of the same array");return t[s]=i,t[n]=e,t}},59959:(t,e,i)=>{t.exports={Matrix:i(13515),Add:i(78991),AddAt:i(48522),BringToTop:i(58742),CountAllMatching:i(30164),Each:i(36337),EachInRange:i(46208),FindClosestInSorted:i(2406),Flatten:i(5454),GetAll:i(71608),GetFirst:i(51463),GetRandom:i(72861),MoveDown:i(51172),MoveTo:i(68396),MoveUp:i(27555),MoveAbove:i(24218),MoveBelow:i(58258),NumberArray:i(13401),NumberArrayStep:i(89955),QuickSelect:i(53466),Range:i(75757),Remove:i(66458),RemoveAt:i(8324),RemoveBetween:i(47427),RemoveRandomElement:i(50147),Replace:i(80402),RotateLeft:i(77640),RotateRight:i(38487),SafeRange:i(45838),SendToBack:i(27847),SetAll:i(6034),Shuffle:i(18592),SortByDigits:i(28834),SpliceOne:i(72677),StableSort:i(17922),Swap:i(96928)}},97494:t=>{t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i{var s=i(76400),n=i(97494);t.exports=function(t){var e="";if(!n(t))return e;for(var i=0;i{t.exports=function(t){return t.reverse()}},51995:t=>{t.exports=function(t){for(var e=0;e{var s=i(63515);t.exports=function(t){return s(t,180)}},42549:(t,e,i)=>{var s=i(63515);t.exports=function(t){return s(t,90)}},63515:(t,e,i)=>{var s=i(97494),n=i(78581);t.exports=function(t,e){if(void 0===e&&(e=90),!s(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=n(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=n(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i{var s=i(63515);t.exports=function(t){return s(t,-90)}},27365:(t,e,i)=>{var s=i(77640),n=i(38487);t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?s(t,Math.abs(i)):n(t,i)),0!==e)for(var r=0;r{t.exports=function(t){for(var e=t.length,i=t[0].length,s=new Array(i),n=0;n-1;r--)s[n][r]=t[r][n]}return s}},13515:(t,e,i)=>{t.exports={CheckMatrix:i(97494),MatrixToString:i(68428),ReverseColumns:i(59521),ReverseRows:i(51995),Rotate180:i(89011),RotateLeft:i(42549),RotateMatrix:i(63515),RotateRight:i(14305),Translate:i(27365),TransposeMatrix:i(78581)}},40581:t=>{var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";t.exports=function(t,i){for(var s=new Uint8Array(t),n=s.length,r=i?"data:"+i+";base64,":"",o=0;o>2],r+=e[(3&s[o])<<4|s[o+1]>>4],r+=e[(15&s[o+1])<<2|s[o+2]>>6],r+=e[63&s[o+2]];return n%3==2?r=r.substring(0,r.length-1)+"=":n%3==1&&(r=r.substring(0,r.length-2)+"=="),r}},82329:t=>{for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(256),s=0;s>4,u[h++]=(15&s)<<4|n>>2,u[h++]=(3&n)<<6|63&r;return l}},78417:(t,e,i)=>{t.exports={ArrayBufferToBase64:i(40581),Base64ToArrayBuffer:i(82329)}},22178:(t,e,i)=>{t.exports={Array:i(59959),Base64:i(78417),Objects:i(64615),String:i(50379),NOOP:i(72283),NULL:i(10618)}},32742:t=>{t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},28699:t=>{var e=function(t){var i,s,n;if("object"!=typeof t||null===t)return t;for(n in i=Array.isArray(t)?[]:{},t)s=t[n],i[n]=e(s);return i};t.exports=e},98611:(t,e,i)=>{var s=i(42911),n=function(){var t,e,i,r,o,a,h=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},l=2),u===l&&(h=this,--l);l{var s=i(5923),n=i(10850);t.exports=function(t,e,i){var r=n(t,e,null);if(null===r)return i;if(Array.isArray(r))return s.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return s.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return s.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},72632:t=>{t.exports=function(t,e,i){var s=typeof t;return t&&"number"!==s&&"string"!==s&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},94324:(t,e,i)=>{var s=i(10850),n=i(82897);t.exports=function(t,e,i,r,o){void 0===o&&(o=i);var a=s(t,e,o);return n(a,i,r)}},10850:t=>{t.exports=function(t,e,i,s){if(!t&&!s||"number"==typeof t)return i;if(t&&t.hasOwnProperty(e))return t[e];if(s&&s.hasOwnProperty(e))return s[e];if(-1!==e.indexOf(".")){for(var n=e.split("."),r=t,o=s,a=i,h=i,l=!0,u=!0,c=0;c{t.exports=function(t,e){for(var i=0;i{t.exports=function(t,e){for(var i=0;i{t.exports=function(t,e){return t.hasOwnProperty(e)}},42911:t=>{t.exports=function(t){if(!t||"object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},30657:(t,e,i)=>{var s=i(32742);t.exports=function(t,e){var i=s(t);for(var n in e)i.hasOwnProperty(n)||(i[n]=e[n]);return i}},72066:(t,e,i)=>{var s=i(32742);t.exports=function(t,e){var i=s(t);for(var n in e)i.hasOwnProperty(n)&&(i[n]=e[n]);return i}},28820:(t,e,i)=>{var s=i(19256);t.exports=function(t,e){for(var i={},n=0;n{t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))return t[e]=i,!0;if(-1!==e.indexOf(".")){for(var s=e.split("."),n=t,r=t,o=0;o{t.exports={Clone:i(32742),DeepCopy:i(28699),Extend:i(98611),GetAdvancedValue:i(20494),GetFastValue:i(72632),GetMinMaxValue:i(94324),GetValue:i(10850),HasAll:i(87701),HasAny:i(53523),HasValue:i(19256),IsPlainObject:i(42911),Merge:i(30657),MergeRight:i(72066),Pick:i(28820),SetValue:i(22440)}},69429:t=>{t.exports=function(t,e){return t.replace(/%([0-9]+)/g,(function(t,i){return e[Number(i)-1]}))}},76400:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===s&&(s=3);var n=0;if(e+1>=(t=t.toString()).length)switch(s){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((n=e-t.length)/2);t=new Array(n-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},76872:t=>{t.exports=function(t,e){return 0===e?t.slice(1):t.slice(0,e-1)+t.slice(e)}},8051:t=>{t.exports=function(t){return t.split("").reverse().join("")}},76583:t=>{t.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}},40587:t=>{t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},50379:(t,e,i)=>{t.exports={Format:i(69429),Pad:i(76400),RemoveAt:i(76872),Reverse:i(8051),UppercaseFirst:i(40587),UUID:i(76583)}}},e={};function i(s){var n=e[s];if(void 0!==n)return n.exports;var r=e[s]={exports:{}};return t[s](r,r.exports,i),r.exports}return i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i(10654)})())); \ No newline at end of file diff --git a/dist/phaser.js b/dist/phaser.js index 41caadbc96..44b28139b0 100644 --- a/dist/phaser.js +++ b/dist/phaser.js @@ -360,7 +360,7 @@ if (true) { /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -409,7 +409,7 @@ module.exports = AlignTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -451,7 +451,7 @@ module.exports = Angle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -491,7 +491,7 @@ module.exports = Call; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -550,7 +550,7 @@ module.exports = GetFirst; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -609,7 +609,7 @@ module.exports = GetLast; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -729,7 +729,7 @@ module.exports = GridAlign; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -771,7 +771,7 @@ module.exports = IncAlpha; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -813,7 +813,7 @@ module.exports = IncX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -861,7 +861,7 @@ module.exports = IncXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -903,7 +903,7 @@ module.exports = IncY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -957,7 +957,7 @@ module.exports = PlaceOnCircle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1010,7 +1010,7 @@ module.exports = PlaceOnEllipse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1055,7 +1055,7 @@ module.exports = PlaceOnLine; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1114,7 +1114,7 @@ module.exports = PlaceOnRectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1176,7 +1176,7 @@ module.exports = PlaceOnTriangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1221,7 +1221,7 @@ module.exports = PlayAnimation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1289,7 +1289,7 @@ module.exports = PropertyValueInc; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1357,7 +1357,7 @@ module.exports = PropertyValueSet; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1398,7 +1398,7 @@ module.exports = RandomCircle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1439,7 +1439,7 @@ module.exports = RandomEllipse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1480,7 +1480,7 @@ module.exports = RandomLine; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1519,7 +1519,7 @@ module.exports = RandomRectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1560,7 +1560,7 @@ module.exports = RandomTriangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1602,7 +1602,7 @@ module.exports = Rotate; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1649,7 +1649,7 @@ module.exports = RotateAround; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1699,7 +1699,7 @@ module.exports = RotateAroundDistance; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1741,7 +1741,7 @@ module.exports = ScaleX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1789,7 +1789,7 @@ module.exports = ScaleXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1831,7 +1831,7 @@ module.exports = ScaleY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1873,7 +1873,7 @@ module.exports = SetAlpha; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1914,7 +1914,7 @@ module.exports = SetBlendMode; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1956,7 +1956,7 @@ module.exports = SetDepth; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -1996,7 +1996,7 @@ module.exports = SetHitArea; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2050,7 +2050,7 @@ module.exports = SetOrigin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2092,7 +2092,7 @@ module.exports = SetRotation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2140,7 +2140,7 @@ module.exports = SetScale; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2182,7 +2182,7 @@ module.exports = SetScaleX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2224,7 +2224,7 @@ module.exports = SetScaleY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2272,7 +2272,7 @@ module.exports = SetScrollFactor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2314,7 +2314,7 @@ module.exports = SetScrollFactorX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2356,7 +2356,7 @@ module.exports = SetScrollFactorY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2396,7 +2396,7 @@ module.exports = SetTint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2435,7 +2435,7 @@ module.exports = SetVisible; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2477,7 +2477,7 @@ module.exports = SetX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2525,7 +2525,7 @@ module.exports = SetXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2567,7 +2567,7 @@ module.exports = SetY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2693,7 +2693,7 @@ module.exports = ShiftPosition; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2727,7 +2727,7 @@ module.exports = Shuffle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2786,7 +2786,7 @@ module.exports = SmoothStep; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2845,7 +2845,7 @@ module.exports = SmootherStep; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2923,7 +2923,7 @@ module.exports = Spread; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -2961,7 +2961,7 @@ module.exports = ToggleVisible; /** * @author Richard Davey * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3012,7 +3012,7 @@ module.exports = WrapInRectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -3086,7 +3086,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4016,7 +4016,7 @@ module.exports = Animation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4204,7 +4204,7 @@ module.exports = AnimationFrame; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -4216,8 +4216,9 @@ var Events = __webpack_require__(16938); var GameEvents = __webpack_require__(97081); var GetFastValue = __webpack_require__(72632); var GetValue = __webpack_require__(10850); -var Pad = __webpack_require__(76400); +var MATH_CONST = __webpack_require__(83392); var NumberArray = __webpack_require__(13401); +var Pad = __webpack_require__(76400); /** * @classdesc @@ -4646,7 +4647,7 @@ var AnimationManager = new Class({ if (frame) { - var frameDuration = GetFastValue(frame, 'duration', Number.MAX_SAFE_INTEGER); + var frameDuration = GetFastValue(frame, 'duration', MATH_CONST.MAX_SAFE_INTEGER); animFrames.push({ key: key, frame: frameKey, duration: frameDuration }); totalDuration += frameDuration; } @@ -4994,6 +4995,46 @@ var AnimationManager = new Class({ return this.anims.get(key); }, + /** + * Returns an array of all Animation keys that are using the given + * Texture. Only Animations that have at least one AnimationFrame + * entry using this texture will be included in the result. + * + * @method Phaser.Animations.AnimationManager#getAnimsFromTexture + * @since 3.60.0 + * + * @param {(string|Phaser.Textures.Texture|Phaser.Textures.Frame)} key - The unique string-based key of the Texture, or a Texture, or Frame instance. + * + * @return {string[]} An array of Animation keys that feature the given Texture. + */ + getAnimsFromTexture: function (key) + { + var texture = this.textureManager.get(key); + + var match = texture.key; + var anims = this.anims.getArray(); + + var out = []; + + for (var i = 0; i < anims.length; i++) + { + var anim = anims[i]; + var frames = anim.frames; + + for (var c = 0; c < frames.length; c++) + { + if (frames[c].textureKey === match) + { + out.push(anim.key); + + break; + } + } + } + + return out; + }, + /** * Pause all animations. * @@ -5220,7 +5261,7 @@ module.exports = AnimationManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7210,7 +7251,7 @@ module.exports = AnimationState; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7239,7 +7280,7 @@ module.exports = 'add'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7287,7 +7328,7 @@ module.exports = 'animationcomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7339,7 +7380,7 @@ module.exports = 'animationcomplete-'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7384,7 +7425,7 @@ module.exports = 'animationrepeat'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7427,7 +7468,7 @@ module.exports = 'animationrestart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7471,7 +7512,7 @@ module.exports = 'animationstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7515,7 +7556,7 @@ module.exports = 'animationstop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7563,7 +7604,7 @@ module.exports = 'animationupdate'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7589,7 +7630,7 @@ module.exports = 'pauseall'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7615,7 +7656,7 @@ module.exports = 'remove'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7640,7 +7681,7 @@ module.exports = 'resumeall'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7672,7 +7713,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7698,7 +7739,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -7885,7 +7926,7 @@ module.exports = BaseCache; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8120,7 +8161,7 @@ module.exports = CacheManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8147,7 +8188,7 @@ module.exports = 'add'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8174,7 +8215,7 @@ module.exports = 'remove'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8197,7 +8238,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -8221,7 +8262,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -10237,7 +10278,7 @@ module.exports = BaseCamera; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11056,7 +11097,7 @@ module.exports = Camera; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -11832,7 +11873,7 @@ module.exports = CameraManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12221,7 +12262,7 @@ module.exports = Fade; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -12584,7 +12625,7 @@ module.exports = Flash; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13344,7 +13385,7 @@ module.exports = RotateTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13664,7 +13705,7 @@ module.exports = Shake; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13958,7 +13999,7 @@ module.exports = Zoom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -13985,7 +14026,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14010,7 +14051,7 @@ module.exports = 'cameradestroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14038,7 +14079,7 @@ module.exports = 'camerafadeincomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14070,7 +14111,7 @@ module.exports = 'camerafadeinstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14098,7 +14139,7 @@ module.exports = 'camerafadeoutcomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14130,7 +14171,7 @@ module.exports = 'camerafadeoutstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14156,7 +14197,7 @@ module.exports = 'cameraflashcomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14186,7 +14227,7 @@ module.exports = 'cameraflashstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14216,7 +14257,7 @@ module.exports = 'followupdate'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14242,7 +14283,7 @@ module.exports = 'camerapancomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14271,7 +14312,7 @@ module.exports = 'camerapanstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14299,7 +14340,7 @@ module.exports = 'postrender'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14327,7 +14368,7 @@ module.exports = 'prerender'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14353,7 +14394,7 @@ module.exports = 'camerarotatecomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14381,7 +14422,7 @@ module.exports = 'camerarotatestart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14407,7 +14448,7 @@ module.exports = 'camerashakecomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14435,7 +14476,7 @@ module.exports = 'camerashakestart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14461,7 +14502,7 @@ module.exports = 'camerazoomcomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14489,7 +14530,7 @@ module.exports = 'camerazoomstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14528,7 +14569,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14554,7 +14595,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -14886,7 +14927,7 @@ module.exports = FixedKeyControl; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15394,7 +15435,7 @@ module.exports = SmoothedKeyControl; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15417,7 +15458,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15444,7 +15485,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -15464,7 +15505,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.60.0-beta.17', + VERSION: '3.60.0-beta.18', BlendModes: __webpack_require__(95723), @@ -15589,7 +15630,7 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16219,7 +16260,7 @@ module.exports = Config; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16348,7 +16389,7 @@ module.exports = CreateRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16479,7 +16520,7 @@ module.exports = DebugHeader; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -16664,13 +16705,15 @@ var Game = new Class({ this.cache = new CacheManager(this); /** - * An instance of the Data Manager + * An instance of the Data Manager. This is a global manager, available from any Scene + * and allows you to share and exchange your own game-level data or events without having + * to use an internal event system. * * @name Phaser.Game#registry * @type {Phaser.Data.DataManager} * @since 3.0.0 */ - this.registry = new DataManager(this); + this.registry = new DataManager(this, new EventEmitter()); /** * An instance of the Input Manager. @@ -17221,7 +17264,7 @@ module.exports = Game; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18100,7 +18143,7 @@ module.exports = TimeStep; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18192,7 +18235,7 @@ module.exports = VisibilityHandler; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18217,7 +18260,7 @@ module.exports = 'blur'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18241,7 +18284,7 @@ module.exports = 'boot'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18266,7 +18309,7 @@ module.exports = 'contextlost'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18291,7 +18334,7 @@ module.exports = 'destroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18315,7 +18358,7 @@ module.exports = 'focus'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18343,7 +18386,7 @@ module.exports = 'hidden'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18366,7 +18409,7 @@ module.exports = 'pause'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18394,7 +18437,7 @@ module.exports = 'postrender'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18421,7 +18464,7 @@ module.exports = 'poststep'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18448,7 +18491,7 @@ module.exports = 'prerender'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18475,7 +18518,7 @@ module.exports = 'prestep'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18499,7 +18542,7 @@ module.exports = 'ready'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18522,7 +18565,7 @@ module.exports = 'resume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18549,7 +18592,7 @@ module.exports = 'step'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18575,7 +18618,7 @@ module.exports = 'visible'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18611,7 +18654,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18638,7 +18681,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18761,7 +18804,7 @@ module.exports = GenerateTexture; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18784,7 +18827,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18823,7 +18866,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18862,7 +18905,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18901,7 +18944,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18940,7 +18983,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -18979,7 +19022,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19005,7 +19048,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19233,7 +19276,7 @@ module.exports = CubicBezierCurve; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -19851,7 +19894,7 @@ module.exports = Curve; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -20476,7 +20519,7 @@ module.exports = EllipseCurve; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -20783,7 +20826,7 @@ module.exports = LineCurve; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21001,7 +21044,7 @@ module.exports = QuadraticBezier; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21227,7 +21270,7 @@ module.exports = SplineCurve; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21255,7 +21298,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -21395,7 +21438,7 @@ module.exports = MoveTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -22314,7 +22357,7 @@ module.exports = Path; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23031,7 +23074,7 @@ module.exports = DataManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23159,7 +23202,7 @@ module.exports = DataManagerPlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23193,7 +23236,7 @@ module.exports = 'changedata'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23225,7 +23268,7 @@ module.exports = 'changedata-'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23248,7 +23291,7 @@ module.exports = 'destroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23278,7 +23321,7 @@ module.exports = 'removedata'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23308,7 +23351,7 @@ module.exports = 'setdata'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23334,7 +23377,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23358,7 +23401,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23485,7 +23528,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23539,11 +23582,16 @@ function init () { var ua = navigator.userAgent; - if ((/Edge\/\d+/).test(ua)) + if ((/Edg\/\d+/).test(ua)) { Browser.edge = true; Browser.es2019 = true; } + else if ((/OPR/).test(ua)) + { + Browser.opera = true; + Browser.es2019 = true; + } else if ((/Chrome\/(\d+)/).test(ua) && !OS.windowsPhone) { Browser.chrome = true; @@ -23565,11 +23613,6 @@ function init () Browser.ie = true; Browser.ieVersion = parseInt(RegExp.$1, 10); } - else if ((/Opera/).test(ua)) - { - Browser.opera = true; - Browser.es2019 = true; - } else if ((/Version\/(\d+\.\d+) Safari/).test(ua) && !OS.windowsPhone) { Browser.safari = true; @@ -23603,7 +23646,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23722,7 +23765,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -23922,7 +23965,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24032,7 +24075,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24113,7 +24156,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24306,7 +24349,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24407,7 +24450,7 @@ module.exports = init(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -24455,7 +24498,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25106,7 +25149,7 @@ module.exports = ColorMatrix; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25327,7 +25370,7 @@ module.exports = RGB; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25462,7 +25505,7 @@ module.exports = ALIGN_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25507,7 +25550,7 @@ module.exports = BottomCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25552,7 +25595,7 @@ module.exports = BottomLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25597,7 +25640,7 @@ module.exports = BottomRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25640,7 +25683,7 @@ module.exports = Center; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25685,7 +25728,7 @@ module.exports = LeftCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25739,7 +25782,7 @@ module.exports = QuickSet; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25784,7 +25827,7 @@ module.exports = RightCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25829,7 +25872,7 @@ module.exports = TopCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25874,7 +25917,7 @@ module.exports = TopLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25919,7 +25962,7 @@ module.exports = TopRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25950,7 +25993,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -25981,7 +26024,7 @@ module.exports = Align; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26026,7 +26069,7 @@ module.exports = BottomCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26071,7 +26114,7 @@ module.exports = BottomLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26116,7 +26159,7 @@ module.exports = BottomRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26161,7 +26204,7 @@ module.exports = LeftBottom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26206,7 +26249,7 @@ module.exports = LeftCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26251,7 +26294,7 @@ module.exports = LeftTop; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26304,7 +26347,7 @@ module.exports = QuickSet; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26349,7 +26392,7 @@ module.exports = RightBottom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26394,7 +26437,7 @@ module.exports = RightCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26439,7 +26482,7 @@ module.exports = RightTop; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26484,7 +26527,7 @@ module.exports = TopCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26529,7 +26572,7 @@ module.exports = TopLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26574,7 +26617,7 @@ module.exports = TopRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26608,7 +26651,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26646,7 +26689,7 @@ module.exports = CenterOn; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26675,7 +26718,7 @@ module.exports = GetBottom; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26720,7 +26763,7 @@ module.exports = GetBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26749,7 +26792,7 @@ module.exports = GetCenterX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26778,7 +26821,7 @@ module.exports = GetCenterY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26807,7 +26850,7 @@ module.exports = GetLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26838,7 +26881,7 @@ module.exports = GetOffsetX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26869,7 +26912,7 @@ module.exports = GetOffsetY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26898,7 +26941,7 @@ module.exports = GetRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26927,7 +26970,7 @@ module.exports = GetTop; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26961,7 +27004,7 @@ module.exports = SetBottom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -26997,7 +27040,7 @@ module.exports = SetCenterX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27033,7 +27076,7 @@ module.exports = SetCenterY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27067,7 +27110,7 @@ module.exports = SetLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27101,7 +27144,7 @@ module.exports = SetRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27135,7 +27178,7 @@ module.exports = SetTop; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27172,7 +27215,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27236,7 +27279,7 @@ module.exports = CanvasInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27498,7 +27541,7 @@ module.exports = CanvasPool(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27631,7 +27674,7 @@ module.exports = Smoothing(); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27667,7 +27710,7 @@ module.exports = TouchAction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27715,7 +27758,7 @@ module.exports = UserSelect; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -27741,7 +27784,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28605,7 +28648,7 @@ module.exports = Color; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28703,7 +28746,7 @@ module.exports = ColorSpectrum; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28744,7 +28787,7 @@ module.exports = ColorToRGBA; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28775,7 +28818,7 @@ module.exports = ComponentToHex; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28806,7 +28849,7 @@ module.exports = GetColor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28838,7 +28881,7 @@ module.exports = GetColor32; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28889,7 +28932,7 @@ module.exports = HSLToColor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -28931,7 +28974,7 @@ module.exports = HSVColorWheel; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29013,7 +29056,7 @@ module.exports = HSVToRGB; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29067,7 +29110,7 @@ module.exports = HexStringToColor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29124,7 +29167,7 @@ module.exports = HueToComponent; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29158,7 +29201,7 @@ module.exports = IntegerToColor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29207,7 +29250,7 @@ module.exports = IntegerToRGB; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29316,7 +29359,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29347,7 +29390,7 @@ module.exports = ObjectToColor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29394,7 +29437,7 @@ module.exports = RGBStringToColor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29475,7 +29518,7 @@ module.exports = RGBToHSV; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29520,7 +29563,7 @@ module.exports = RGBToString; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29557,7 +29600,7 @@ module.exports = RandomRGB; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29614,7 +29657,7 @@ module.exports = ValueToColor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29650,7 +29693,7 @@ module.exports = Color; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29679,7 +29722,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -29922,7 +29965,7 @@ module.exports = BitmapMask; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30243,7 +30286,7 @@ module.exports = GeometryMask; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30266,7 +30309,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30393,7 +30436,7 @@ module.exports = BaseShader; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30452,7 +30495,7 @@ module.exports = AddToDOM; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30497,7 +30540,7 @@ module.exports = CreateDOMContainer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30561,7 +30604,7 @@ module.exports = DOMContentLoaded; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30621,7 +30664,7 @@ module.exports = GetInnerHeight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30687,7 +30730,7 @@ module.exports = GetScreenOrientation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30739,7 +30782,7 @@ module.exports = GetTarget; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30797,7 +30840,7 @@ module.exports = ParseXML; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -30827,7 +30870,7 @@ module.exports = RemoveFromDOM; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31017,7 +31060,7 @@ module.exports = RequestAnimationFrame; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31048,7 +31091,7 @@ module.exports = Dom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31233,7 +31276,7 @@ module.exports = EventEmitter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31251,7 +31294,7 @@ module.exports = { EventEmitter: __webpack_require__(78491) }; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31380,7 +31423,7 @@ module.exports = BuildGameObject; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31478,7 +31521,7 @@ module.exports = BuildGameObjectAnimation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -31755,7 +31798,7 @@ module.exports = DisplayList; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32487,7 +32530,7 @@ var GameObject = new Class({ * every game frame. This method is passed two parameters: `delta` and `time`. * * If you wish to run your own logic within `preUpdate` then you should always call - * `preUpdate.super(delta, time)` within it, or it may fail to process required operations, + * `super.preUpdate(delta, time)` within it, or it may fail to process required operations, * such as Sprite animations. * * @method Phaser.GameObjects.GameObject#addToUpdateList @@ -32663,7 +32706,7 @@ module.exports = GameObject; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -32867,7 +32910,7 @@ module.exports = GameObjectCreator; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33101,7 +33144,7 @@ module.exports = GameObjectFactory; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33173,7 +33216,7 @@ module.exports = GetCalcMatrix; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33478,7 +33521,7 @@ module.exports = UpdateList; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -33538,7 +33581,7 @@ module.exports = BatchChar; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34063,7 +34106,7 @@ module.exports = GetBitmapTextSize; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34118,7 +34161,7 @@ module.exports = ParseFromAtlas; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34251,7 +34294,7 @@ module.exports = ParseRetroFont; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34413,7 +34456,7 @@ module.exports = ParseXMLBitmapFont; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34440,7 +34483,7 @@ module.exports = RetroFont; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34557,7 +34600,7 @@ module.exports = RETRO_FONT_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -34792,7 +34835,7 @@ module.exports = DynamicBitmapText; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -35007,7 +35050,7 @@ module.exports = DynamicBitmapTextCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -35059,7 +35102,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -35129,7 +35172,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -35162,7 +35205,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -35451,7 +35494,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -36664,7 +36707,7 @@ module.exports = BitmapText; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -36852,7 +36895,7 @@ module.exports = BitmapTextCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -36906,7 +36949,7 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -36971,7 +37014,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37004,7 +37047,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37144,7 +37187,7 @@ module.exports = BitmapTextWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37444,7 +37487,7 @@ module.exports = Blitter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37582,7 +37625,7 @@ module.exports = BlitterCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37633,7 +37676,7 @@ GameObjectCreator.register('blitter', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37650,14 +37693,14 @@ var GameObjectFactory = __webpack_require__(61286); * * @param {number} x - The x position of the Game Object. * @param {number} y - The y position of the Game Object. - * @param {string} key - The key of the Texture the Blitter object will use. + * @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param {(string|number)} [frame] - The default Frame children of the Blitter will use. * * @return {Phaser.GameObjects.Blitter} The Game Object that was created. */ -GameObjectFactory.register('blitter', function (x, y, key, frame) +GameObjectFactory.register('blitter', function (x, y, texture, frame) { - return this.displayList.add(new Blitter(this.scene, x, y, key, frame)); + return this.displayList.add(new Blitter(this.scene, x, y, texture, frame)); }); // When registering a factory function 'this' refers to the GameObjectFactory context. @@ -37676,7 +37719,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37709,7 +37752,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -37828,7 +37871,7 @@ module.exports = BlitterWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -38270,7 +38313,7 @@ module.exports = Bob; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -38566,7 +38609,7 @@ module.exports = Alpha; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -38677,7 +38720,7 @@ module.exports = AlphaSingle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -38802,7 +38845,7 @@ module.exports = BlendMode; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -38952,7 +38995,7 @@ module.exports = ComputedSize; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39078,7 +39121,7 @@ module.exports = Crop; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39176,7 +39219,7 @@ module.exports = Depth; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39279,7 +39322,7 @@ module.exports = FX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39444,7 +39487,7 @@ module.exports = Flip; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39804,7 +39847,7 @@ module.exports = GetBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39966,7 +40009,7 @@ module.exports = Mask; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -39998,9 +40041,11 @@ var Origin = { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. * * @name Phaser.GameObjects.Components.Origin#originX * @type {number} + * @readonly * @default 0.5 * @since 3.0.0 */ @@ -40011,9 +40056,11 @@ var Origin = { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. * * @name Phaser.GameObjects.Components.Origin#originY * @type {number} + * @readonly * @default 0.5 * @since 3.0.0 */ @@ -40170,7 +40217,7 @@ module.exports = Origin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -40600,7 +40647,7 @@ module.exports = PathFollower; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -41028,7 +41075,7 @@ module.exports = Pipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -41136,7 +41183,7 @@ module.exports = ScrollFactor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -41332,7 +41379,7 @@ module.exports = Size; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -41476,7 +41523,7 @@ module.exports = Texture; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -41698,7 +41745,7 @@ module.exports = TextureCrop; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -41936,7 +41983,7 @@ module.exports = Tint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -41998,7 +42045,7 @@ module.exports = ToJSON; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -42384,7 +42431,7 @@ var Transform = { * @method Phaser.GameObjects.Components.Transform#setScale * @since 3.0.0 * - * @param {number} x - The horizontal scale of this Game Object. + * @param {number} [x=1] - The horizontal scale of this Game Object. * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value. * * @return {this} This Game Object instance. @@ -42621,7 +42668,7 @@ module.exports = Transform; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -43541,12 +43588,14 @@ var TransformMatrix = new Class({ * @param {number} xw - The xw value. * @param {number} yh - The yh value. * @param {boolean} roundPixels - Pass the results via Math.round? + * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array. * - * @return {number} The calculated y value. + * @return {Float32Array} The quad Float32Array. */ - setQuad: function (x, y, xw, yh, roundPixels) + setQuad: function (x, y, xw, yh, roundPixels, quad) { - var quad = this.quad; + if (quad === undefined) { quad = this.quad; } + var matrix = this.matrix; var a = matrix[0]; @@ -43705,7 +43754,7 @@ module.exports = TransformMatrix; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -43795,7 +43844,7 @@ module.exports = Visible; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -43839,7 +43888,7 @@ module.exports = { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45307,7 +45356,7 @@ module.exports = Container; /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45416,7 +45465,7 @@ module.exports = ContainerCanvasRenderer; /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45467,7 +45516,7 @@ GameObjectCreator.register('container', function (config, addToScene) /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45502,7 +45551,7 @@ GameObjectFactory.register('container', function (x, y, children) /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45536,7 +45585,7 @@ module.exports = { /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45688,7 +45737,7 @@ module.exports = ContainerWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -45731,7 +45780,7 @@ module.exports = [ /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -46730,7 +46779,7 @@ module.exports = DOMElement; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -46858,7 +46907,7 @@ module.exports = DOMElementCSSRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -46948,7 +46997,7 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -46981,7 +47030,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47009,7 +47058,7 @@ module.exports = 'addedtoscene'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47037,7 +47086,7 @@ module.exports = 'destroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47065,7 +47114,7 @@ module.exports = 'removedfromscene'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47099,7 +47148,7 @@ module.exports = 'complete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47130,7 +47179,7 @@ module.exports = 'created'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47158,7 +47207,7 @@ module.exports = 'error'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47192,7 +47241,7 @@ module.exports = 'loop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47222,7 +47271,7 @@ module.exports = 'play'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47249,7 +47298,7 @@ module.exports = 'seeked'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47277,7 +47326,7 @@ module.exports = 'seeking'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47305,7 +47354,7 @@ module.exports = 'stop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47333,7 +47382,7 @@ module.exports = 'timeout'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47361,7 +47410,7 @@ module.exports = 'unlocked'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47395,7 +47444,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47515,7 +47564,7 @@ module.exports = Extern; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47557,7 +47606,7 @@ GameObjectFactory.register('extern', function () /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47590,7 +47639,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47631,7 +47680,7 @@ module.exports = ExternWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47667,7 +47716,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -47808,9 +47857,11 @@ var Graphics = new Class({ /** * The default fill color for shapes rendered by this Graphics object. + * Set this value with `setDefaultStyles()`. * * @name Phaser.GameObjects.Graphics#defaultFillColor * @type {number} + * @readonly * @default -1 * @since 3.0.0 */ @@ -47818,9 +47869,11 @@ var Graphics = new Class({ /** * The default fill alpha for shapes rendered by this Graphics object. + * Set this value with `setDefaultStyles()`. * * @name Phaser.GameObjects.Graphics#defaultFillAlpha * @type {number} + * @readonly * @default 1 * @since 3.0.0 */ @@ -47828,9 +47881,11 @@ var Graphics = new Class({ /** * The default stroke width for shapes rendered by this Graphics object. + * Set this value with `setDefaultStyles()`. * * @name Phaser.GameObjects.Graphics#defaultStrokeWidth * @type {number} + * @readonly * @default 1 * @since 3.0.0 */ @@ -47838,9 +47893,11 @@ var Graphics = new Class({ /** * The default stroke color for shapes rendered by this Graphics object. + * Set this value with `setDefaultStyles()`. * * @name Phaser.GameObjects.Graphics#defaultStrokeColor * @type {number} + * @readonly * @default -1 * @since 3.0.0 */ @@ -47848,9 +47905,11 @@ var Graphics = new Class({ /** * The default stroke alpha for shapes rendered by this Graphics object. + * Set this value with `setDefaultStyles()`. * * @name Phaser.GameObjects.Graphics#defaultStrokeAlpha * @type {number} + * @readonly * @default 1 * @since 3.0.0 */ @@ -48319,7 +48378,7 @@ var Graphics = new Class({ * @param {number} y - The y coordinate of the top-left of the rectangle. * @param {number} width - The width of the rectangle. * @param {number} height - The height of the rectangle. - * @param {(Phaser.Types.GameObjects.Graphics.RoundedRectRadius|number)} [radius=20] - The corner radius; It can also be an object to specify different radii for corners. + * @param {(Phaser.Types.GameObjects.Graphics.RoundedRectRadius|number)} [radius=20] - The corner radius; It can also be an object to specify different radius for corners. * * @return {this} This Game Object. */ @@ -48340,16 +48399,62 @@ var Graphics = new Class({ br = GetFastValue(radius, 'br', 20); } + var convexTL = (tl >= 0); + var convexTR = (tr >= 0); + var convexBL = (bl >= 0); + var convexBR = (br >= 0); + + tl = Math.abs(tl); + tr = Math.abs(tr); + bl = Math.abs(bl); + br = Math.abs(br); + this.beginPath(); this.moveTo(x + tl, y); this.lineTo(x + width - tr, y); - this.arc(x + width - tr, y + tr, tr, -MATH_CONST.TAU, 0); + + if (convexTR) + { + this.arc(x + width - tr, y + tr, tr, -MATH_CONST.TAU, 0); + } + else + { + this.arc(x + width, y, tr, Math.PI, MATH_CONST.TAU, true); + } + this.lineTo(x + width, y + height - br); - this.arc(x + width - br, y + height - br, br, 0, MATH_CONST.TAU); + + if (convexBR) + { + this.arc(x + width - br, y + height - br, br, 0, MATH_CONST.TAU); + } + else + { + this.arc(x + width, y + height, br, -MATH_CONST.TAU, Math.PI, true); + } + this.lineTo(x + bl, y + height); - this.arc(x + bl, y + height - bl, bl, MATH_CONST.TAU, Math.PI); + + if (convexBL) + { + this.arc(x + bl, y + height - bl, bl, MATH_CONST.TAU, Math.PI); + } + else + { + this.arc(x, y + height, bl, 0, -MATH_CONST.TAU, true); + } + this.lineTo(x, y + tl); - this.arc(x + tl, y + tl, tl, -Math.PI, -MATH_CONST.TAU); + + if (convexTL) + { + this.arc(x + tl, y + tl, tl, -Math.PI, -MATH_CONST.TAU); + } + else + { + this.arc(x, y, tl, MATH_CONST.TAU, 0, true); + } + this.fillPath(); return this; @@ -48388,25 +48493,66 @@ var Graphics = new Class({ br = GetFastValue(radius, 'br', 20); } - tl = Math.min(tl, maxRadius); - tr = Math.min(tr, maxRadius); - bl = Math.min(bl, maxRadius); - br = Math.min(br, maxRadius); + var convexTL = (tl >= 0); + var convexTR = (tr >= 0); + var convexBL = (bl >= 0); + var convexBR = (br >= 0); + + tl = Math.min(Math.abs(tl), maxRadius); + tr = Math.min(Math.abs(tr), maxRadius); + bl = Math.min(Math.abs(bl), maxRadius); + br = Math.min(Math.abs(br), maxRadius); this.beginPath(); this.moveTo(x + tl, y); this.lineTo(x + width - tr, y); this.moveTo(x + width - tr, y); - this.arc(x + width - tr, y + tr, tr, -MATH_CONST.TAU, 0); + + if (convexTR) + { + this.arc(x + width - tr, y + tr, tr, -MATH_CONST.TAU, 0); + } + else + { + this.arc(x + width, y, tr, Math.PI, MATH_CONST.TAU, true); + } + this.lineTo(x + width, y + height - br); this.moveTo(x + width, y + height - br); - this.arc(x + width - br, y + height - br, br, 0, MATH_CONST.TAU); + + if (convexBR) + { + this.arc(x + width - br, y + height - br, br, 0, MATH_CONST.TAU); + } + else + { + this.arc(x + width, y + height, br, -MATH_CONST.TAU, Math.PI, true); + } + this.lineTo(x + bl, y + height); this.moveTo(x + bl, y + height); - this.arc(x + bl, y + height - bl, bl, MATH_CONST.TAU, Math.PI); + + if (convexBL) + { + this.arc(x + bl, y + height - bl, bl, MATH_CONST.TAU, Math.PI); + } + else + { + this.arc(x, y + height, bl, 0, -MATH_CONST.TAU, true); + } + this.lineTo(x, y + tl); this.moveTo(x, y + tl); - this.arc(x + tl, y + tl, tl, -Math.PI, -MATH_CONST.TAU); + + if (convexTL) + { + this.arc(x + tl, y + tl, tl, -Math.PI, -MATH_CONST.TAU); + } + else + { + this.arc(x, y, tl, MATH_CONST.TAU, 0, true); + } + this.strokePath(); return this; @@ -49151,7 +49297,7 @@ module.exports = Graphics; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49399,7 +49545,7 @@ module.exports = GraphicsCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49448,7 +49594,7 @@ GameObjectCreator.register('graphics', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49488,7 +49634,7 @@ GameObjectFactory.register('graphics', function (config) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49524,7 +49670,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -49880,7 +50026,7 @@ module.exports = GraphicsWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -50006,9 +50152,10 @@ var Group = new Class({ * The class to create new group members from. * * @name Phaser.GameObjects.Group#classType - * @type {Phaser.Types.GameObjects.Group.GroupClassTypeConstructor} + * @type {function} * @since 3.0.0 * @default Phaser.GameObjects.Sprite + * @see Phaser.Types.GameObjects.Group.GroupClassTypeConstructor */ this.classType = GetFastValue(config, 'classType', Sprite); @@ -51632,7 +51779,7 @@ module.exports = Group; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51666,7 +51813,7 @@ GameObjectCreator.register('group', function (config) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51699,7 +51846,7 @@ GameObjectFactory.register('group', function (children, config) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51803,7 +51950,7 @@ module.exports = Image; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51838,7 +51985,7 @@ module.exports = ImageCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51889,7 +52036,7 @@ GameObjectCreator.register('image', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51911,9 +52058,9 @@ var GameObjectFactory = __webpack_require__(61286); * * @return {Phaser.GameObjects.Image} The Game Object that was created. */ -GameObjectFactory.register('image', function (x, y, key, frame) +GameObjectFactory.register('image', function (x, y, texture, frame) { - return this.displayList.add(new Image(this.scene, x, y, key, frame)); + return this.displayList.add(new Image(this.scene, x, y, texture, frame)); }); // When registering a factory function 'this' refers to the GameObjectFactory context. @@ -51932,7 +52079,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -51965,7 +52112,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -52000,7 +52147,7 @@ module.exports = ImageWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -52077,7 +52224,7 @@ var GameObjects = { Group: __webpack_require__(62598), Image: __webpack_require__(20927), Layer: __webpack_require__(17676), - Particles: __webpack_require__(30439), + Particles: __webpack_require__(81212), PathFollower: __webpack_require__(19626), RenderTexture: __webpack_require__(29599), Rope: __webpack_require__(31982), @@ -52110,7 +52257,7 @@ var GameObjects = { Group: __webpack_require__(61295), Image: __webpack_require__(83556), Layer: __webpack_require__(56378), - Particles: __webpack_require__(38842), + Particles: __webpack_require__(765), RenderTexture: __webpack_require__(85692), Rope: __webpack_require__(96027), Sprite: __webpack_require__(89219), @@ -52156,7 +52303,7 @@ module.exports = GameObjects; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53149,7 +53296,7 @@ module.exports = Layer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53235,7 +53382,7 @@ module.exports = LayerCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53283,7 +53430,7 @@ GameObjectCreator.register('layer', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53315,7 +53462,7 @@ GameObjectFactory.register('layer', function (children) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53348,7 +53495,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53472,7 +53619,7 @@ module.exports = LayerWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -53756,7 +53903,7 @@ module.exports = Light; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -54118,7 +54265,7 @@ module.exports = LightsManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -54237,7 +54384,7 @@ module.exports = LightsPlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55381,7 +55528,7 @@ module.exports = Mesh; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55410,7 +55557,7 @@ module.exports = MeshCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55467,7 +55614,7 @@ GameObjectCreator.register('mesh', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55513,7 +55660,7 @@ if (true) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55546,7 +55693,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55667,7 +55814,7 @@ module.exports = MeshWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -55685,7 +55832,7 @@ var Vertex = __webpack_require__(85769); * parameters to this class. * * This is extremely useful for UI and button like elements, where you need - * them to expand to accomodate the content without distorting the texture. + * them to expand to accommodate the content without distorting the texture. * * The texture you provide for this Game Object should be based on the * following layout structure: @@ -56556,7 +56703,7 @@ module.exports = NineSlice; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56612,7 +56759,7 @@ GameObjectCreator.register('nineslice', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56626,7 +56773,7 @@ var GameObjectFactory = __webpack_require__(61286); * parameters to this class. * * This is extremely useful for UI and button like elements, where you need - * them to expand to accomodate the content without distorting the texture. + * them to expand to accommodate the content without distorting the texture. * * The texture you provide for this Game Object should be based on the * following layout structure: @@ -56722,7 +56869,7 @@ if (true) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56755,7 +56902,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -56850,6 +56997,216 @@ var NineSliceWebGLRenderer = function (renderer, src, camera, parentMatrix) module.exports = NineSliceWebGLRenderer; +/***/ }), + +/***/ 19737: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(56694); +var EmitterOp = __webpack_require__(93025); +var GetColor = __webpack_require__(22946); +var GetEaseFunction = __webpack_require__(21902); +var GetInterpolationFunction = __webpack_require__(4840); +var IntegerToRGB = __webpack_require__(15978); + +/** + * @classdesc + * This class is responsible for taking control over the color property + * in the Particle class and managing its emission and updating functions. + * + * See the `ParticleEmitter` class for more details on emitter op configuration. + * + * @class EmitterColorOp + * @memberof Phaser.GameObjects.Particles + * @constructor + * @since 3.60.0 + * + * @param {string} key - The name of the property. + */ +var EmitterColorOp = new Class({ + + Extends: EmitterOp, + + initialize: + + function EmitterColorOp (key) + { + EmitterOp.call(this, key, null, false); + + this.active = false; + + this.easeName = 'Linear'; + + /** + * An array containing the red color values. + * + * Populated during the `setMethods` method. + * + * @name Phaser.GameObjects.Particles.EmitterColorOp#r + * @type {number[]} + * @since 3.60.0 + */ + this.r = []; + + /** + * An array containing the green color values. + * + * Populated during the `setMethods` method. + * + * @name Phaser.GameObjects.Particles.EmitterColorOp#g + * @type {number[]} + * @since 3.60.0 + */ + this.g = []; + + /** + * An array containing the blue color values. + * + * Populated during the `setMethods` method. + * + * @name Phaser.GameObjects.Particles.EmitterColorOp#b + * @type {number[]} + * @since 3.60.0 + */ + this.b = []; + }, + + /** + * Checks the type of `EmitterOp.propertyValue` to determine which + * method is required in order to return values from this op function. + * + * @method Phaser.GameObjects.Particles.EmitterColorOp#getMethod + * @since 3.60.0 + * + * @return {number} A number between 0 and 9 which should be passed to `setMethods`. + */ + getMethod: function () + { + return (this.propertyValue === null) ? 0 : 9; + }, + + /** + * Sets the EmitterColorOp method values, if in use. + * + * @method Phaser.GameObjects.Particles.EmitterColorOp#setMethods + * @since 3.60.0 + * + * @return {this} This Emitter Op object. + */ + setMethods: function () + { + var value = this.propertyValue; + var current = value; + + var onEmit = this.defaultEmit; + var onUpdate = this.defaultUpdate; + + if (this.method === 9) + { + this.start = value[0]; + this.ease = GetEaseFunction('Linear'); + this.interpolation = GetInterpolationFunction('linear'); + + onEmit = this.easedValueEmit; + onUpdate = this.easeValueUpdate; + current = value[0]; + + this.active = true; + + // Populate the r,g,b arrays + for (var i = 0; i < value.length; i++) + { + // in hex format 0xff0000 + var color = IntegerToRGB(value[i]); + + this.r.push(color.r); + this.g.push(color.g); + this.b.push(color.b); + } + } + + this.onEmit = onEmit; + this.onUpdate = onUpdate; + this.current = current; + + return this; + }, + + /** + * Sets the Ease function to use for Color interpolation. + * + * @method Phaser.GameObjects.Particles.EmitterColorOp#setEase + * @since 3.60.0 + * + * @param {string} ease - The string-based name of the Ease function to use. + */ + setEase: function (value) + { + this.easeName = value; + + this.ease = GetEaseFunction(value); + }, + + /** + * An `onEmit` callback for an eased property. + * + * It prepares the particle for easing by {@link Phaser.GameObjects.Particles.EmitterColorOp#easeValueUpdate}. + * + * @method Phaser.GameObjects.Particles.EmitterColorOp#easedValueEmit + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. + * @param {string} key - The name of the property. + * + * @return {number} {@link Phaser.GameObjects.Particles.EmitterColorOp#start}, as the new value of the property. + */ + easedValueEmit: function () + { + this.current = this.start; + + return this.start; + }, + + /** + * An `onUpdate` callback that returns an eased value between the + * {@link Phaser.GameObjects.Particles.EmitterColorOp#start} and {@link Phaser.GameObjects.Particles.EmitterColorOp#end} + * range. + * + * @method Phaser.GameObjects.Particles.EmitterColorOp#easeValueUpdate + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. + * @param {string} key - The name of the property. + * @param {number} t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death). + * + * @return {number} The new value of the property. + */ + easeValueUpdate: function (particle, key, t) + { + var v = this.ease(t); + + var r = this.interpolation(this.r, v); + var g = this.interpolation(this.g, v); + var b = this.interpolation(this.b, v); + + var current = GetColor(r, g, b); + + this.current = current; + + return current; + } + +}); + +module.exports = EmitterColorOp; + + /***/ }), /***/ 93025: @@ -56857,42 +57214,47 @@ module.exports = NineSliceWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var Between = __webpack_require__(17489); +var Clamp = __webpack_require__(82897); var Class = __webpack_require__(56694); var FloatBetween = __webpack_require__(61616); var GetEaseFunction = __webpack_require__(21902); var GetFastValue = __webpack_require__(72632); +var GetInterpolationFunction = __webpack_require__(4840); +var SnapTo = __webpack_require__(88462); var Wrap = __webpack_require__(1071); /** * @classdesc - * A Particle Emitter property. + * This class is responsible for taking control over a single property + * in the Particle class and managing its emission and updating functions. * - * Facilitates changing Particle properties as they are emitted and throughout their lifetime. + * Particles properties such as `x`, `y`, `scaleX`, `lifespan` and others all use + * EmitterOp instances to manage them, as they can be given in a variety of + * formats: from simple values, to functions, to dynamic callbacks. + * + * See the `ParticleEmitter` class for more details on emitter op configuration. * * @class EmitterOp * @memberof Phaser.GameObjects.Particles * @constructor * @since 3.0.0 * - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Settings for the Particle Emitter that owns this property. * @param {string} key - The name of the property. - * @param {number} defaultValue - The default value of the property. + * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} defaultValue - The default value of the property. * @param {boolean} [emitOnly=false] - Whether the property can only be modified when a Particle is emitted. */ var EmitterOp = new Class({ initialize: - function EmitterOp (config, key, defaultValue, emitOnly) + function EmitterOp (key, defaultValue, emitOnly) { - if (emitOnly === undefined) - { - emitOnly = false; - } + if (emitOnly === undefined) { emitOnly = false; } /** * The name of this property. @@ -56904,10 +57266,13 @@ var EmitterOp = new Class({ this.propertyKey = key; /** - * The value of this property. + * The current value of this property. + * + * This can be a simple value, an array, a function or an onEmit + * configuration object. * * @name Phaser.GameObjects.Particles.EmitterOp#propertyValue - * @type {number} + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} * @since 3.0.0 */ this.propertyValue = defaultValue; @@ -56915,8 +57280,11 @@ var EmitterOp = new Class({ /** * The default value of this property. * + * This can be a simple value, an array, a function or an onEmit + * configuration object. + * * @name Phaser.GameObjects.Particles.EmitterOp#defaultValue - * @type {number} + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} * @since 3.0.0 */ this.defaultValue = defaultValue; @@ -56942,16 +57310,49 @@ var EmitterOp = new Class({ */ this.counter = 0; + /** + * When the step counter reaches it's maximum, should it then + * yoyo back to the start again, or flip over to it? + * + * @name Phaser.GameObjects.Particles.EmitterOp#yoyo + * @type {boolean} + * @default false + * @since 3.60.0 + */ + this.yoyo = false; + + /** + * The counter direction. 0 for up and 1 for down. + * + * @name Phaser.GameObjects.Particles.EmitterOp#direction + * @type {number} + * @default 0 + * @since 3.60.0 + */ + this.direction = 0; + /** * The start value for this property to ease between. * + * If an interpolation this holds a reference to the number data array. + * * @name Phaser.GameObjects.Particles.EmitterOp#start - * @type {number} + * @type {number|number[]} * @default 0 * @since 3.0.0 */ this.start = 0; + /** + * The most recently calculated value. Updated every time an + * emission or update method is called. Treat as read-only. + * + * @name Phaser.GameObjects.Particles.EmitterOp#current + * @type {number} + * @since 3.60.0 + */ + this.current = 0; + /** * The end value for this property to ease between. * @@ -56963,13 +57364,22 @@ var EmitterOp = new Class({ this.end = 0; /** - * The easing function to use for updating this property. + * The easing function to use for updating this property, if any. * * @name Phaser.GameObjects.Particles.EmitterOp#ease * @type {?function} * @since 3.0.0 */ - this.ease; + this.ease = null; + + /** + * The interpolation function to use for updating this property, if any. + * + * @name Phaser.GameObjects.Particles.EmitterOp#interpolation + * @type {?function} + * @since 3.60.0 + */ + this.interpolation = null; /** * Whether this property can only be modified when a Particle is emitted. @@ -57004,7 +57414,48 @@ var EmitterOp = new Class({ */ this.onUpdate = this.defaultUpdate; - this.loadConfig(config); + /** + * Set to `false` to disable this EmitterOp. + * + * @name Phaser.GameObjects.Particles.EmitterOp#active + * @type {boolean} + * @since 3.60.0 + */ + this.active = true; + + /** + * The onEmit method type of this EmitterOp. + * + * Set as part of `setMethod` and cached here to avoid + * re-setting when only the value changes. + * + * @name Phaser.GameObjects.Particles.EmitterOp#method + * @type {number} + * @since 3.60.0 + */ + this.method = 0; + + /** + * The callback to run for Particles when they are emitted from the Particle Emitter. + * This is set during `setMethods` and used by `proxyEmit`. + * + * @name Phaser.GameObjects.Particles.EmitterOp#_onEmit + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitCallback} + * @private + * @since 3.60.0 + */ + this._onEmit; + + /** + * The callback to run for Particles when they are updated. + * This is set during `setMethods` and used by `proxyUpdate`. + * + * @name Phaser.GameObjects.Particles.EmitterOp#_onUpdate + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateCallback} + * @private + * @since 3.60.0 + */ + this._onUpdate; }, /** @@ -57036,6 +57487,8 @@ var EmitterOp = new Class({ this.defaultValue ); + this.method = this.getMethod(); + this.setMethods(); if (this.emitOnly) @@ -57055,7 +57508,7 @@ var EmitterOp = new Class({ */ toJSON: function () { - return this.propertyValue; + return JSON.stringify(this.propertyValue); }, /** @@ -57064,177 +57517,243 @@ var EmitterOp = new Class({ * @method Phaser.GameObjects.Particles.EmitterOp#onChange * @since 3.0.0 * - * @param {number} value - The value of the property. + * @param {number} value - The new numeric value of this property. * * @return {this} This Emitter Op object. */ onChange: function (value) { - this.propertyValue = value; + var current; - return this.setMethods(); + switch (this.method) + { + // Number + // Custom Callback (onEmit only) + // Custom onEmit and/or onUpdate callbacks + case 1: + case 3: + case 8: + current = value; + break; + + // Random Array + case 2: + if (this.propertyValue.indexOf(value) >= 0) + { + current = value; + } + break; + + // Stepped start/end + case 4: + var step = (this.end - this.start) / this.steps; + current = SnapTo(value, step); + this.counter = current; + break; + + // Eased start/end + // min/max (random float or int) + // Random object (random integer) + case 5: + case 6: + case 7: + current = Clamp(value, this.start, this.end); + break; + + // Interpolation + case 9: + current = this.start[0]; + break; + } + + this.current = current; + + return this; }, /** - * Update the {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} and - * {@link Phaser.GameObjects.Particles.EmitterOp#onUpdate} callbacks based on the type of the current - * {@link Phaser.GameObjects.Particles.EmitterOp#propertyValue}. + * Checks the type of `EmitterOp.propertyValue` to determine which + * method is required in order to return values from this op function. * - * @method Phaser.GameObjects.Particles.EmitterOp#setMethods - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.EmitterOp#getMethod + * @since 3.60.0 * - * @return {this} This Emitter Op object. + * @return {number} A number between 0 and 9 which should be passed to `setMethods`. */ - setMethods: function () + getMethod: function () { var value = this.propertyValue; - var t = typeof value; - - // Reset them in case they're not changed below - this.onEmit = this.defaultEmit; - this.onUpdate = this.defaultUpdate; - // `moveToX` and `moveToY` are null by default if (value === null) { - return; + return 0; } + var t = typeof value; + if (t === 'number') { - // Explicit static value: - // x: 400 - - this.onEmit = this.staticValueEmit; - this.onUpdate = this.staticValueUpdate; // How? + // Number + return 1; } else if (Array.isArray(value)) { - // Picks a random element from the array: - // x: [ 100, 200, 300, 400 ] - - this.onEmit = this.randomStaticValueEmit; + // Random Array + return 2; } else if (t === 'function') { - // The same as setting just the onUpdate function and no onEmit (unless this op is an emitOnly one) - // Custom callback, must return a value: - - /* - x: function (particle, key, t, value) - { - return value + 50; - } - */ - - if (this.emitOnly) + // Custom Callback + return 3; + } + else if (t === 'object') + { + if (this.hasBoth(value, 'start', 'end')) { - this.onEmit = value; + if (this.has(value, 'steps')) + { + // Stepped start/end + return 4; + } + else + { + // Eased start/end + return 5; + } } - else + else if (this.hasBoth(value, 'min', 'max')) { - this.onUpdate = value; + // min/max + return 6; } - } - else if (t === 'object' && this.hasBoth(value, 'start', 'end')) - { - this.start = value.start; - this.end = value.end; - - // x: { start: 100, end: 400, random: true } (random optional) = eases between start and end - - var isRandom = this.has(value, 'random'); - - if (isRandom) + else if (this.has(value, 'random')) { - this.onEmit = this.randomRangedValueEmit; + // Random object + return 7; } - - if (this.has(value, 'steps')) + else if (this.hasEither(value, 'onEmit', 'onUpdate')) { - // A stepped (per emit) range - - // x: { start: 100, end: 400, steps: 64 } - - // Increments a value stored in the emitter - - this.steps = value.steps; - this.counter = this.start; - - this.onEmit = this.steppedEmit; + // Custom onEmit onUpdate + return 8; } - else + else if (this.has(value, 'interpolation')) { - // An eased range (defaults to Linear if not specified) - - // x: { start: 100, end: 400, [ ease: 'Linear' ] } + // Interpolation + return 9; + } + } - var easeType = this.has(value, 'ease') ? value.ease : 'Linear'; + return 0; + }, - this.ease = GetEaseFunction(easeType, value.easeParams); + /** + * Update the {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} and + * {@link Phaser.GameObjects.Particles.EmitterOp#onUpdate} callbacks based on the method returned + * from `getMethod`. The method is stored in the `EmitterOp.method` property + * and is a number between 0 and 9 inclusively. + * + * @method Phaser.GameObjects.Particles.EmitterOp#setMethods + * @since 3.0.0 + * + * @return {this} This Emitter Op object. + */ + setMethods: function () + { + var value = this.propertyValue; + var current = value; - if (!isRandom) - { - this.onEmit = this.easedValueEmit; - } + var onEmit = this.defaultEmit; + var onUpdate = this.defaultUpdate; - this.onUpdate = this.easeValueUpdate; - } - } - else if (t === 'object' && this.hasBoth(value, 'min', 'max')) + switch (this.method) { - // { min: 100, max: 400 } = pick a random number between min and max + // Number + case 1: + onEmit = this.staticValueEmit; + break; - this.start = value.min; - this.end = value.max; - this.onEmit = this.randomRangedValueEmit; - } - else if (t === 'object' && this.has(value, 'random')) - { - // { random: [ 100, 400 ] } = pick a random number between the two elements of the array + // Random Array + case 2: + onEmit = this.randomStaticValueEmit; + current = value[0]; + break; - var rnd = value.random; + // Custom Callback (onEmit only) + case 3: + this._onEmit = value; + onEmit = this.proxyEmit; + break; - if (Array.isArray(rnd)) - { - this.start = rnd[0]; - this.end = rnd[1]; - } + // Stepped start/end + case 4: + this.start = value.start; + this.end = value.end; + this.steps = value.steps; + this.counter = this.start; + this.yoyo = this.has(value, 'yoyo') ? value.yoyo : false; + this.direction = 0; + onEmit = this.steppedEmit; + current = this.start; + break; - this.onEmit = this.randomRangedValueEmit; - } - else if (t === 'object' && this.hasEither(value, 'onEmit', 'onUpdate')) - { - // Custom onEmit and onUpdate callbacks + // Eased start/end + case 5: + this.start = value.start; + this.end = value.end; + var easeType = this.has(value, 'ease') ? value.ease : 'Linear'; + this.ease = GetEaseFunction(easeType, value.easeParams); + onEmit = (this.has(value, 'random') && value.random) ? this.randomRangedValueEmit : this.easedValueEmit; + onUpdate = this.easeValueUpdate; + current = this.start; + break; - /* - x: { - // Called at the start of the particles life, when it is being created - onEmit: function (particle, key, t, value) - { - return value; - }, + // min/max (random float or int) + case 6: + this.start = value.min; + this.end = value.max; + onEmit = (this.has(value, 'int') && value.int) ? this.randomRangedIntEmit : this.randomRangedValueEmit; + current = this.start; + break; + + // Random object (random integer) + case 7: + var rnd = value.random; - // Called during the particles life on each update - onUpdate: function (particle, key, t, value) + if (Array.isArray(rnd)) { - return value; + this.start = rnd[0]; + this.end = rnd[1]; } - } - */ - if (this.has(value, 'onEmit')) - { - this.onEmit = value.onEmit; - } + onEmit = this.randomRangedIntEmit; + current = this.start; + break; - if (this.has(value, 'onUpdate')) - { - this.onUpdate = value.onUpdate; - } + // Custom onEmit and/or onUpdate callbacks + case 8: + this._onEmit = (this.has(value, 'onEmit')) ? value.onEmit : this.defaultEmit; + this._onUpdate = (this.has(value, 'onUpdate')) ? value.onUpdate : this.defaultUpdate; + onEmit = this.proxyEmit; + onUpdate = this.proxyUpdate; + break; + + // Interpolation + case 9: + this.start = value.values; + var easeTypeI = this.has(value, 'ease') ? value.ease : 'Linear'; + this.ease = GetEaseFunction(easeTypeI, value.easeParams); + this.interpolation = GetInterpolationFunction(value.interpolation); + onEmit = this.easedValueEmit; + onUpdate = this.easeValueUpdate; + current = this.start[0]; + break; } + this.onEmit = onEmit; + this.onUpdate = onUpdate; + this.current = current; + return this; }, @@ -57313,7 +57832,7 @@ var EmitterOp = new Class({ * * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. * @param {string} key - The name of the property. - * @param {number} t - The T value (between 0 and 1) + * @param {number} t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death). * @param {number} value - The current value of the property. * * @return {number} The new value of the property. @@ -57323,6 +57842,53 @@ var EmitterOp = new Class({ return value; }, + /** + * The returned value sets what the property will be at the START of the particles life, on emit. + * + * This method is only used when you have provided a custom emit callback. + * + * @method Phaser.GameObjects.Particles.EmitterOp#proxyEmit + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. + * @param {string} key - The name of the property. + * @param {number} [value] - The current value of the property. + * + * @return {number} The new value of the property. + */ + proxyEmit: function (particle, key, value) + { + var result = this._onEmit(particle, key, value); + + this.current = result; + + return result; + }, + + /** + * The returned value updates the property for the duration of the particles life. + * + * This method is only used when you have provided a custom update callback. + * + * @method Phaser.GameObjects.Particles.EmitterOp#proxyUpdate + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. + * @param {string} key - The name of the property. + * @param {number} t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death). + * @param {number} value - The current value of the property. + * + * @return {number} The new value of the property. + */ + proxyUpdate: function (particle, key, t, value) + { + var result = this._onUpdate(particle, key, t, value); + + this.current = result; + + return result; + }, + /** * An `onEmit` callback that returns the current value of the property. * @@ -57333,7 +57899,7 @@ var EmitterOp = new Class({ */ staticValueEmit: function () { - return this.propertyValue; + return this.current; }, /** @@ -57346,7 +57912,7 @@ var EmitterOp = new Class({ */ staticValueUpdate: function () { - return this.propertyValue; + return this.current; }, /** @@ -57361,7 +57927,9 @@ var EmitterOp = new Class({ { var randomIndex = Math.floor(Math.random() * this.propertyValue.length); - return this.propertyValue[randomIndex]; + this.current = this.propertyValue[randomIndex]; + + return this.current; }, /** @@ -57383,8 +57951,38 @@ var EmitterOp = new Class({ if (particle && particle.data[key]) { particle.data[key].min = value; + particle.data[key].max = this.end; } + this.current = value; + + return value; + }, + + /** + * An `onEmit` callback that returns a value between the {@link Phaser.GameObjects.Particles.EmitterOp#start} and + * {@link Phaser.GameObjects.Particles.EmitterOp#end} range. + * + * @method Phaser.GameObjects.Particles.EmitterOp#randomRangedIntEmit + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. + * @param {string} key - The key of the property. + * + * @return {number} The new value of the property. + */ + randomRangedIntEmit: function (particle, key) + { + var value = Between(this.start, this.end); + + if (particle && particle.data[key]) + { + particle.data[key].min = value; + particle.data[key].max = this.end; + } + + this.current = value; + return value; }, @@ -57402,9 +58000,51 @@ var EmitterOp = new Class({ { var current = this.counter; - var next = this.counter + (this.end - this.start) / this.steps; + var next = current; + + var step = (this.end - this.start) / this.steps; + + if (this.yoyo) + { + var over; + + if (this.direction === 0) + { + // Add step to the current value + next += step; + + if (next >= this.end) + { + over = next - this.end; + + next = this.end - over; - this.counter = Wrap(next, this.start, this.end); + this.direction = 1; + } + } + else + { + // Down + next -= step; + + if (next <= this.start) + { + over = this.start - next; + + next = this.start + over; + + this.direction = 0; + } + } + + this.counter = next; + } + else + { + this.counter = Wrap(next + step, this.start, this.end); + } + + this.current = current; return current; }, @@ -57432,6 +58072,8 @@ var EmitterOp = new Class({ data.max = this.end; } + this.current = this.start; + return this.start; }, @@ -57445,7 +58087,7 @@ var EmitterOp = new Class({ * * @param {Phaser.GameObjects.Particles.Particle} particle - The particle. * @param {string} key - The name of the property. - * @param {number} t - The T value (between 0 and 1) + * @param {number} t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death). * * @return {number} The new value of the property. */ @@ -57453,7 +58095,40 @@ var EmitterOp = new Class({ { var data = particle.data[key]; - return (data.max - data.min) * this.ease(t) + data.min; + var current; + var v = this.ease(t); + + if (this.interpolation) + { + current = this.interpolation(this.start, v); + } + else + { + current = (data.max - data.min) * v + data.min; + } + + this.current = current; + + return current; + }, + + /** + * Destroys this EmitterOp instance and all of its references. + * + * Called automatically when the ParticleEmitter that owns this + * EmitterOp is destroyed. + * + * @method Phaser.GameObjects.Particles.EmitterOp#destroy + * @since 3.60.0 + */ + destroy: function () + { + this.propertyValue = null; + this.defaultValue = null; + this.ease = null; + this.interpolation = null; + this._onEmit = null; + this._onUpdate = null; } }); @@ -57467,22 +58142,26 @@ module.exports = EmitterOp; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Class = __webpack_require__(56694); var GetFastValue = __webpack_require__(72632); +var ParticleProcessor = __webpack_require__(30891); /** * @classdesc - * The GravityWell action applies a force on the particle to draw it towards, or repel it from, a single point. + * The Gravity Well Particle Processor applies a force on the particles to draw + * them towards, or repel them from, a single point. * - * The force applied is inversely proportional to the square of the distance from the particle to the point, in accordance with Newton's law of gravity. + * The force applied is inversely proportional to the square of the distance + * from the particle to the point, in accordance with Newton's law of gravity. * * This simulates the effect of gravity over large distances (as between planets, for example). * * @class GravityWell + * @extends Phaser.GameObjects.Particles.ParticleProcessor * @memberof Phaser.GameObjects.Particles * @constructor * @since 3.0.0 @@ -57495,6 +58174,8 @@ var GetFastValue = __webpack_require__(72632); */ var GravityWell = new Class({ + Extends: ParticleProcessor, + initialize: function GravityWell (x, y, power, epsilon, gravity) @@ -57518,33 +58199,7 @@ var GravityWell = new Class({ if (gravity === undefined) { gravity = 50; } } - /** - * The x coordinate of the Gravity Well, in world space. - * - * @name Phaser.GameObjects.Particles.GravityWell#x - * @type {number} - * @since 3.0.0 - */ - this.x = x; - - /** - * The y coordinate of the Gravity Well, in world space. - * - * @name Phaser.GameObjects.Particles.GravityWell#y - * @type {number} - * @since 3.0.0 - */ - this.y = y; - - /** - * The active state of the Gravity Well. An inactive Gravity Well will not influence any particles. - * - * @name Phaser.GameObjects.Particles.GravityWell#active - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.active = true; + ParticleProcessor.call(this, x, y, true); /** * Internal gravity value. @@ -57687,17 +58342,23 @@ module.exports = GravityWell; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var AnimationState = __webpack_require__(16569); var Class = __webpack_require__(56694); var DegToRad = __webpack_require__(75606); +var Rectangle = __webpack_require__(74118); +var RotateAround = __webpack_require__(2386); +var Vector2 = __webpack_require__(93736); /** * @classdesc - * A Particle is a simple Game Object controlled by a Particle Emitter and Manager, and rendered by the Manager. - * It uses its own lightweight physics system, and can interact only with its Emitter's bounds and zones. + * A Particle is a simple object owned and controlled by a Particle Emitter. + * + * It encapsulates all of the properties required to move and update according + * to the Emitters operations. * * @class Particle * @memberof Phaser.GameObjects.Particles @@ -57715,7 +58376,7 @@ var Particle = new Class({ /** * The Emitter to which this Particle belongs. * - * A Particle can only belong to a single Emitter and is created, updated and destroyed via it. + * A Particle can only belong to a single Emitter and is created, updated and destroyed by it. * * @name Phaser.GameObjects.Particles.Particle#emitter * @type {Phaser.GameObjects.Particles.ParticleEmitter} @@ -57724,7 +58385,17 @@ var Particle = new Class({ this.emitter = emitter; /** - * The texture frame used to render this Particle. + * The texture used by this Particle when it renders. + * + * @name Phaser.GameObjects.Particles.Particle#texture + * @type {Phaser.Textures.Texture} + * @default null + * @since 3.60.0 + */ + this.texture = null; + + /** + * The texture frame used by this Particle when it renders. * * @name Phaser.GameObjects.Particles.Particle#frame * @type {Phaser.Textures.Frame} @@ -57931,12 +58602,91 @@ var Particle = new Class({ * @since 3.0.0 */ this.data = { - tint: { min: 0xffffff, max: 0xffffff, current: 0xffffff }, + tint: { min: 0xffffff, max: 0xffffff }, alpha: { min: 1, max: 1 }, rotate: { min: 0, max: 0 }, scaleX: { min: 1, max: 1 }, - scaleY: { min: 1, max: 1 } + scaleY: { min: 1, max: 1 }, + x: { min: 0, max: 0 }, + y: { min: 0, max: 0 }, + accelerationX: { min: 0, max: 0 }, + accelerationY: { min: 0, max: 0 }, + maxVelocityX: { min: 0, max: 0 }, + maxVelocityY: { min: 0, max: 0 }, + moveToX: { min: 0, max: 0 }, + moveToY: { min: 0, max: 0 }, + bounce: { min: 0, max: 0 } }; + + /** + * Interal private value. + * + * @name Phaser.GameObjects.Particles.Particle#isCropped + * @type {boolean} + * @private + * @readonly + * @since 3.60.0 + */ + this.isCropped = false; + + /** + * A reference to the Scene to which this Game Object belongs. + * + * Game Objects can only belong to one Scene. + * + * You should consider this property as being read-only. You cannot move a + * Game Object to another Scene by simply changing it. + * + * @name Phaser.GameObjects.Particles.Particle#scene + * @type {Phaser.Scene} + * @since 3.60.0 + */ + this.scene = emitter.scene; + + /** + * The Animation State component of this Particle. + * + * This component provides features to apply animations to this Particle. + * It is responsible for playing, loading, queuing animations for later playback, + * mixing between animations and setting the current animation frame to this Particle. + * + * @name Phaser.GameObjects.Particles.Particle#anims + * @type {Phaser.Animations.AnimationState} + * @since 3.60.0 + */ + this.anims = new AnimationState(this); + + /** + * A rectangle that holds the bounds of this Particle after a call to + * the `Particle.getBounds` method has been made. + * + * @name Phaser.GameObjects.Particles.Particle#bounds + * @type {Phaser.Geom.Rectangle} + * @since 3.60.0 + */ + this.bounds = new Rectangle(); + }, + + /** + * The Event Emitter proxy. + * + * Passes on all parameters to the `ParticleEmitter` to emit directly. + * + * @method Phaser.GameObjects.Particles.Particle#emit + * @since 3.60.0 + * + * @param {(string|Symbol)} event - The event name. + * @param {any} [a1] - Optional argument 1. + * @param {any} [a2] - Optional argument 2. + * @param {any} [a3] - Optional argument 3. + * @param {any} [a4] - Optional argument 4. + * @param {any} [a5] - Optional argument 5. + * + * @return {boolean} `true` if the event had listeners, else `false`. + */ + emit: function (event, a1, a2, a3, a4, a5) + { + return this.emitter.emit(event, a1, a2, a3, a4, a5); }, /** @@ -57953,15 +58703,35 @@ var Particle = new Class({ }, /** - * Resets the position of this particle back to zero. + * Kills this particle. This sets the `lifeCurrent` value to 0, which forces + * the Particle to be removed the next time its parent Emitter runs an update. * - * @method Phaser.GameObjects.Particles.Particle#resetPosition - * @since 3.16.0 + * @method Phaser.GameObjects.Particles.Particle#kill + * @since 3.60.0 */ - resetPosition: function () + kill: function () { - this.x = 0; - this.y = 0; + this.lifeCurrent = 0; + }, + + /** + * Sets the position of this particle to the given x/y coordinates. + * + * If the parameters are left undefined, it resets the particle back to 0x0. + * + * @method Phaser.GameObjects.Particles.Particle#setPosition + * @since 3.60.0 + * + * @param {number} [x=0] - The x coordinate to set this Particle to. + * @param {number} [y=0] - The y coordinate to set this Particle to. + */ + setPosition: function (x, y) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + + this.x = x; + this.y = y; }, /** @@ -57970,34 +58740,44 @@ var Particle = new Class({ * @method Phaser.GameObjects.Particles.Particle#fire * @since 3.0.0 * - * @param {number} x - The x coordinate to launch this Particle from. - * @param {number} y - The y coordinate to launch this Particle from. + * @param {number} [x] - The x coordinate to launch this Particle from. + * @param {number} [y] - The y coordinate to launch this Particle from. + * + * @return {boolean} `true` if the Particle is alive, or `false` if it was spawned inside a DeathZone. */ fire: function (x, y) { var emitter = this.emitter; + var ops = emitter.ops; - this.frame = emitter.getFrame(); + var anim = emitter.getAnim(); - if (!this.frame) + if (anim) { - throw new Error('Particle has no texture frame'); + this.anims.play(anim); + } + else + { + this.frame = emitter.getFrame(); + this.texture = this.frame.texture; } - if (emitter.emitZone) + if (!this.frame) { - // Updates particle.x and particle.y during this call - emitter.emitZone.getPoint(this); + throw new Error('Particle has no texture frame'); } + // Updates particle.x and particle.y during this call + emitter.getEmitZone(this); + if (x === undefined) { - this.x += emitter.x.onEmit(this, 'x'); + this.x += ops.x.onEmit(this, 'x'); } - else if (emitter.x.steps > 0) + else if (ops.x.steps > 0) { // EmitterOp is stepped but x was forced (follower?) so use it - this.x += x + emitter.x.onEmit(this, 'x'); + this.x += x + ops.x.onEmit(this, 'x'); } else { @@ -58006,36 +58786,53 @@ var Particle = new Class({ if (y === undefined) { - this.y += emitter.y.onEmit(this, 'y'); + this.y += ops.y.onEmit(this, 'y'); } - else if (emitter.y.steps > 0) + else if (ops.y.steps > 0) { // EmitterOp is stepped but y was forced (follower?) so use it - this.y += y + emitter.y.onEmit(this, 'y'); + this.y += y + ops.y.onEmit(this, 'y'); } else { this.y += y; } - this.life = emitter.lifespan.onEmit(this, 'lifespan'); + this.life = ops.lifespan.onEmit(this, 'lifespan'); this.lifeCurrent = this.life; this.lifeT = 0; - var sx = emitter.speedX.onEmit(this, 'speedX'); - var sy = (emitter.speedY) ? emitter.speedY.onEmit(this, 'speedY') : sx; + this.delayCurrent = ops.delay.onEmit(this, 'delay'); + + this.scaleX = ops.scaleX.onEmit(this, 'scaleX'); + this.scaleY = (ops.scaleY.active) ? ops.scaleY.onEmit(this, 'scaleY') : this.scaleX; + + this.angle = ops.rotate.onEmit(this, 'rotate'); + + this.rotation = DegToRad(this.angle); + + // Check we didn't spawn in the middle of a DeathZone + if (this.delayCurrent === 0 && emitter.getDeathZone(this)) + { + this.lifeCurrent = 0; + + return false; + } + + var sx = ops.speedX.onEmit(this, 'speedX'); + var sy = (ops.speedY.active) ? ops.speedY.onEmit(this, 'speedY') : sx; if (emitter.radial) { - var rad = DegToRad(emitter.angle.onEmit(this, 'angle')); + var rad = DegToRad(ops.angle.onEmit(this, 'angle')); this.velocityX = Math.cos(rad) * Math.abs(sx); this.velocityY = Math.sin(rad) * Math.abs(sy); } else if (emitter.moveTo) { - var mx = emitter.moveToX.onEmit(this, 'moveToX'); - var my = (emitter.moveToY) ? emitter.moveToY.onEmit(this, 'moveToY') : mx; + var mx = ops.moveToX.onEmit(this, 'moveToX'); + var my = ops.moveToY.onEmit(this, 'moveToY'); var lifeS = this.life / 1000; this.velocityX = (mx - this.x) / lifeS; @@ -58049,26 +58846,27 @@ var Particle = new Class({ if (emitter.acceleration) { - this.accelerationX = emitter.accelerationX.onEmit(this, 'accelerationX'); - this.accelerationY = emitter.accelerationY.onEmit(this, 'accelerationY'); + this.accelerationX = ops.accelerationX.onEmit(this, 'accelerationX'); + this.accelerationY = ops.accelerationY.onEmit(this, 'accelerationY'); } - this.maxVelocityX = emitter.maxVelocityX.onEmit(this, 'maxVelocityX'); - this.maxVelocityY = emitter.maxVelocityY.onEmit(this, 'maxVelocityY'); - - this.delayCurrent = emitter.delay.onEmit(this, 'delay'); + this.maxVelocityX = ops.maxVelocityX.onEmit(this, 'maxVelocityX'); + this.maxVelocityY = ops.maxVelocityY.onEmit(this, 'maxVelocityY'); - this.scaleX = emitter.scaleX.onEmit(this, 'scaleX'); - this.scaleY = emitter.scaleY.onEmit(this, 'scaleY'); - - this.angle = emitter.rotate.onEmit(this, 'rotate'); - this.rotation = DegToRad(this.angle); + this.bounce = ops.bounce.onEmit(this, 'bounce'); - this.bounce = emitter.bounce.onEmit(this, 'bounce'); + this.alpha = ops.alpha.onEmit(this, 'alpha'); - this.alpha = emitter.alpha.onEmit(this, 'alpha'); + if (ops.color.active) + { + this.tint = ops.color.onEmit(this, 'tint'); + } + else + { + this.tint = ops.tint.onEmit(this, 'tint'); + } - this.tint = emitter.tint.onEmit(this, 'tint'); + return true; }, /** @@ -58080,18 +58878,21 @@ var Particle = new Class({ * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Emitter that is updating this Particle. * @param {number} delta - The delta time in ms. * @param {number} step - The delta value divided by 1000. - * @param {array} processors - Particle processors (gravity wells). + * @param {Phaser.GameObjects.Particles.ParticleProcessor[]} processors - An array of all active Particle Processors. + * @param {number} t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death). */ - computeVelocity: function (emitter, delta, step, processors) + computeVelocity: function (emitter, delta, step, processors, t) { + var ops = emitter.ops; + var vx = this.velocityX; var vy = this.velocityY; - var ax = this.accelerationX; - var ay = this.accelerationY; + var ax = ops.accelerationX.onUpdate(this, 'accelerationX', t, this.accelerationX); + var ay = ops.accelerationY.onUpdate(this, 'accelerationY', t, this.accelerationY); - var mx = this.maxVelocityX; - var my = this.maxVelocityY; + var mx = ops.maxVelocityX.onUpdate(this, 'maxVelocityX', t, this.maxVelocityX); + var my = ops.maxVelocityY.onUpdate(this, 'maxVelocityY', t, this.maxVelocityY); vx += (emitter.gravityX * step); vy += (emitter.gravityY * step); @@ -58130,7 +58931,7 @@ var Particle = new Class({ // Apply any additional processors for (var i = 0; i < processors.length; i++) { - processors[i].update(this, delta, step); + processors[i].update(this, delta, step, t); } }, @@ -58182,12 +58983,18 @@ var Particle = new Class({ * * @param {number} delta - The delta time in ms. * @param {number} step - The delta value divided by 1000. - * @param {array} processors - An optional array of update processors. + * @param {Phaser.GameObjects.Particles.ParticleProcessor[]} processors - An array of all active Particle Processors. * * @return {boolean} Returns `true` if this Particle has now expired and should be removed, otherwise `false` if still active. */ update: function (delta, step, processors) { + if (this.lifeCurrent === 0) + { + // Particle is dead via `Particle.kill` method. + return true; + } + if (this.delayCurrent > 0) { this.delayCurrent -= delta; @@ -58195,24 +59002,54 @@ var Particle = new Class({ return false; } + this.anims.update(0, delta); + var emitter = this.emitter; + var ops = emitter.ops; // How far along in life is this particle? (t = 0 to 1) var t = 1 - (this.lifeCurrent / this.life); this.lifeT = t; - this.computeVelocity(emitter, delta, step, processors); + this.x = ops.x.onUpdate(this, 'x', t, this.x); + this.y = ops.y.onUpdate(this, 'y', t, this.y); + + if (emitter.moveTo) + { + var mx = ops.moveToX.onUpdate(this, 'moveToX', t, emitter.moveToX); + var my = ops.moveToY.onUpdate(this, 'moveToY', t, emitter.moveToY); + var lifeS = this.lifeCurrent / 1000; + + this.velocityX = (mx - this.x) / lifeS; + this.velocityY = (my - this.y) / lifeS; + } + + this.computeVelocity(emitter, delta, step, processors, t); this.x += this.velocityX * step; this.y += this.velocityY * step; if (emitter.bounds) { + this.bounce = ops.bounce.onUpdate(this, 'bounce', t, this.bounce); + this.checkBounds(emitter); } - if (emitter.deathZone && emitter.deathZone.willKill(this)) + this.scaleX = ops.scaleX.onUpdate(this, 'scaleX', t, this.scaleX); + this.scaleY = this.scaleX; + + if (ops.scaleY.active) + { + this.scaleY = ops.scaleY.onUpdate(this, 'scaleY', t, this.scaleY); + } + + this.angle = ops.rotate.onUpdate(this, 'rotate', t, this.angle); + + this.rotation = DegToRad(this.angle); + + if (emitter.getDeathZone(this)) { this.lifeCurrent = 0; @@ -58220,19 +59057,102 @@ var Particle = new Class({ return true; } - this.scaleX = emitter.scaleX.onUpdate(this, 'scaleX', t, this.scaleX); - this.scaleY = emitter.scaleY.onUpdate(this, 'scaleY', t, this.scaleY); - - this.angle = emitter.rotate.onUpdate(this, 'rotate', t, this.angle); - this.rotation = DegToRad(this.angle); + this.alpha = ops.alpha.onUpdate(this, 'alpha', t, this.alpha); - this.alpha = emitter.alpha.onUpdate(this, 'alpha', t, this.alpha); - - this.tint = emitter.tint.onUpdate(this, 'tint', t, this.tint); + if (ops.color.active) + { + this.tint = ops.color.onUpdate(this, 'color', t, this.tint); + } + else + { + this.tint = ops.tint.onUpdate(this, 'tint', t, this.tint); + } this.lifeCurrent -= delta; return (this.lifeCurrent <= 0); + }, + + /** + * This is a NOOP method and does nothing when called. + * + * @method Phaser.GameObjects.Particles.Particle#setSizeToFrame + * @since 3.60.0 + */ + setSizeToFrame: function () + { + // NOOP + }, + + /** + * Gets the bounds of this particle as a Geometry Rectangle, factoring in any + * transforms of the parent emitter and anything else above it in the display list. + * + * Once calculated the bounds can be accessed via the `Particle.bounds` property. + * + * @method Phaser.GameObjects.Particles.Particle#getBounds + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Components.TransformMatrix} [matrix] - Optional transform matrix to apply to this particle. + * + * @return {Phaser.Geom.Rectangle} A Rectangle containing the transformed bounds of this particle. + */ + getBounds: function (matrix) + { + if (matrix === undefined) { matrix = this.emitter.getWorldTransformMatrix(); } + + var sx = Math.abs(matrix.scaleX) * this.scaleX; + var sy = Math.abs(matrix.scaleY) * this.scaleY; + + var x = this.x; + var y = this.y; + var rotation = this.rotation; + var width = (this.frame.width * sx) / 2; + var height = (this.frame.height * sy) / 2; + + var bounds = this.bounds; + + var topLeft = new Vector2(x - width, y - height); + var topRight = new Vector2(x + width, y - height); + var bottomLeft = new Vector2(x - width, y + height); + var bottomRight = new Vector2(x + width, y + height); + + if (rotation !== 0) + { + RotateAround(topLeft, x, y, rotation); + RotateAround(topRight, x, y, rotation); + RotateAround(bottomLeft, x, y, rotation); + RotateAround(bottomRight, x, y, rotation); + } + + matrix.transformPoint(topLeft.x, topLeft.y, topLeft); + matrix.transformPoint(topRight.x, topRight.y, topRight); + matrix.transformPoint(bottomLeft.x, bottomLeft.y, bottomLeft); + matrix.transformPoint(bottomRight.x, bottomRight.y, bottomRight); + + bounds.x = Math.min(topLeft.x, topRight.x, bottomLeft.x, bottomRight.x); + bounds.y = Math.min(topLeft.y, topRight.y, bottomLeft.y, bottomRight.y); + bounds.width = Math.max(topLeft.x, topRight.x, bottomLeft.x, bottomRight.x) - bounds.x; + bounds.height = Math.max(topLeft.y, topRight.y, bottomLeft.y, bottomRight.y) - bounds.y; + + return bounds; + }, + + /** + * Destroys this Particle. + * + * @method Phaser.GameObjects.Particles.Particle#destroy + * @since 3.60.0 + */ + destroy: function () + { + this.anims.destroy(); + + this.anims = null; + this.emitter = null; + this.texture = null; + this.frame = null; + this.scene = null; } }); @@ -58247,201 +59167,379 @@ module.exports = Particle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(95723); +var Add = __webpack_require__(78991); var Class = __webpack_require__(56694); var Components = __webpack_require__(64937); +var ComponentsToJSON = __webpack_require__(48129); +var CopyFrom = __webpack_require__(29538); var DeathZone = __webpack_require__(69361); var EdgeZone = __webpack_require__(54213); +var EmitterColorOp = __webpack_require__(19737); var EmitterOp = __webpack_require__(93025); +var Events = __webpack_require__(40629); +var GameObject = __webpack_require__(89980); var GetFastValue = __webpack_require__(72632); var GetRandom = __webpack_require__(72861); +var GravityWell = __webpack_require__(87811); var HasAny = __webpack_require__(53523); var HasValue = __webpack_require__(19256); +var Inflate = __webpack_require__(7782); +var List = __webpack_require__(71207); +var MergeRect = __webpack_require__(14655); var Particle = __webpack_require__(14909); var RandomZone = __webpack_require__(68433); var Rectangle = __webpack_require__(74118); +var RectangleToRectangle = __webpack_require__(90205); +var Remove = __webpack_require__(66458); +var Render = __webpack_require__(69116); var StableSort = __webpack_require__(17922); +var TransformMatrix = __webpack_require__(69360); var Vector2 = __webpack_require__(93736); var Wrap = __webpack_require__(1071); +/** + * Names of simple configuration properties. + * + * @ignore + */ +var configFastMap = [ + 'active', + 'advance', + 'blendMode', + 'collideBottom', + 'collideLeft', + 'collideRight', + 'collideTop', + 'colorEase', + 'deathCallback', + 'deathCallbackScope', + 'duration', + 'emitCallback', + 'emitCallbackScope', + 'follow', + 'frequency', + 'gravityX', + 'gravityY', + 'maxAliveParticles', + 'maxParticles', + 'name', + 'emitting', + 'particleBringToTop', + 'particleClass', + 'radial', + 'sortCallback', + 'sortOrderAsc', + 'sortProperty', + 'stopAfter', + 'tintFill', + 'timeScale', + 'trackVisible', + 'visible' +]; + +/** + * Names of complex configuration properties. + * + * @ignore + */ +var configOpMap = [ + 'accelerationX', + 'accelerationY', + 'alpha', + 'angle', + 'bounce', + 'color', + 'delay', + 'lifespan', + 'maxVelocityX', + 'maxVelocityY', + 'moveToX', + 'moveToY', + 'quantity', + 'rotate', + 'scaleX', + 'scaleY', + 'speedX', + 'speedY', + 'tint', + 'x', + 'y' +]; + /** * @classdesc - * A particle emitter represents a single particle stream. - * It controls a pool of {@link Phaser.GameObjects.Particles.Particle Particles} and is controlled by a {@link Phaser.GameObjects.Particles.ParticleEmitterManager Particle Emitter Manager}. + * A Particle Emitter is a special kind of Game Object that controls a pool of {@link Phaser.GameObjects.Particles.Particle Particles}. + * + * Particle Emitters are created via a configuration object. The properties of this object + * can be specified in a variety of formats, given you plenty of scope over the values they + * return, leading to complex visual effects. Here are the different forms of configuration + * value you can give: + * + * ## An explicit static value: + * + * ```js + * x: 400 + * ``` + * + * The x value will always be 400 when the particle is spawned. + * + * ## A random value: + * + * ```js + * x: [ 100, 200, 300, 400 ] + * ``` + * + * The x value will be one of the 4 elements in the given array, picked at random on emission. + * + * ## A custom callback: + * + * ```js + * x: (particle, key, t, value) => { + * return value + 50; + * } + * ``` + * + * The x value is the result of calling this function. This is only used when the + * particle is emitted, so it provides it's initial starting value. It is not used + * when the particle is updated (see the onUpdate callback for that) + * + * ## A start / end object: + * + * This allows you to control the change in value between the given start and + * end parameters over the course of the particles lifetime: + * + * ```js + * scale: { start: 0, end: 1 } + * ``` + * + * The particle scale will start at 0 when emitted and ease to a scale of 1 + * over the course of its lifetime. You can also specify the ease function + * used for this change (the default is Linear): + * + * ```js + * scale: { start: 0, end: 1, ease: 'bounce.out' } + * ``` + * + * ## A start / end random object: + * + * The start and end object can have an optional `random` parameter. + * This forces it to pick a random value between the two values and use + * this as the starting value, then easing to the 'end' parameter over + * its lifetime. + * + * ```js + * scale: { start: 4, end: 0.5, random: true } + * ``` + * + * The particle will start with a random scale between 0.5 and 4 and then + * scale to the end value over its lifetime. You can combine the above + * with the `ease` parameter as well to control the value easing. + * + * ## An interpolation object: + * + * You can provide an array of values which will be used for interpolation + * during the particles lifetime. You can also define the interpolation + * function to be used. There are three provided: `linear` (the default), + * `bezier` and `catmull`, or you can provide your own function. + * + * ```js + * x: { values: [ 50, 500, 200, 800 ], interpolation: 'catmull' } + * ``` + * + * The particle scale will interpolate from 50 when emitted to 800 via the other + * points over the course of its lifetime. You can also specify an ease function + * used to control the rate of change through the values (the default is Linear): + * + * ```js + * x: { values: [ 50, 500, 200, 800 ], interpolation: 'catmull', ease: 'bounce.out } + * ``` + * + * ## A stepped emitter object: + * + * The `steps` parameter allows you to control the placement of sequential + * particles across the start-end range: + * + * ```js + * x: { steps: 32, start: 0, end: 576 } + * ``` + * + * Here we have a range of 576 (start to end). This is divided into 32 steps. + * + * The first particle will emit at the x position of 0. The next will emit + * at the next 'step' along, which would be 18. The following particle will emit + * at the next step, which is 36, and so on. Because the range of 576 has been + * divided by 32, creating 18 pixels steps. When a particle reaches the 'end' + * value the next one will start from the beginning again. + * + * ## A stepped emitter object with yoyo: + * + * You can add the optional `yoyo` property to a stepped object: + * + * ```js + * x: { steps: 32, start: 0, end: 576, yoyo: true } + * ``` + * + * As with the stepped emitter, particles are emitted in sequence, from 'start' + * to 'end' in step sized jumps. Normally, when a stepped emitter reaches the + * end it snaps around to the start value again. However, if you provide the 'yoyo' + * parameter then when it reaches the end it will reverse direction and start + * emitting back down to 'start' again. Depending on the effect you require this + * can often look better. + * + * ## A min / max object: + * + * This allows you to pick a random float value between the min and max properties: + * + * ```js + * x: { min: 100, max: 700 } + * ``` + * + * The x value will be a random float between min and max. + * + * You can force it select an integer by setting the 'int' flag: + * + * ```js + * x: { min: 100, max: 700, int: true } + * ``` + * + * Or, you could use the 'random' array approach (see below) + * + * ## A random object: + * + * This allows you to pick a random integer value between the first and second array elements: + * + * ```js + * x: { random: [ 100, 700 ] } + * ``` + * + * The x value will be a random integer between 100 and 700 as it takes the first + * element in the 'random' array as the 'min' value and the 2nd element as the 'max' value. + * + * ## Custom onEmit and onUpdate callbacks: + * + * If the above won't give you the effect you're after, you can provide your own + * callbacks that will be used when the particle is both emitted and updated: + * + * ```js + * x: { + * onEmit: (particle, key, t, value) => { + * return value; + * }, + * onUpdate: (particle, key, t, value) => { + * return value; + * } + * } + * ``` + * + * You can provide either one or both functions. The `onEmit` is called at the + * start of the particles life and defines the value of the property on birth. + * + * The `onUpdate` function is called every time the Particle Emitter updates + * until the particle dies. Both must return a value. + * + * The properties are: + * + * particle - A reference to the Particle instance. + * key - The string based key of the property, i.e. 'x' or 'lifespan'. + * t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death). + * value - The current property value. At a minimum you should return this. + * + * By using the above configuration options you have an unlimited about of + * control over how your particles behave. * * @class ParticleEmitter + * @extends Phaser.GameObjects.GameObject * @memberof Phaser.GameObjects.Particles * @constructor - * @since 3.0.0 + * @since 3.60.0 * + * @extends Phaser.GameObjects.Components.AlphaSingle * @extends Phaser.GameObjects.Components.BlendMode + * @extends Phaser.GameObjects.Components.Depth + * @extends Phaser.GameObjects.Components.FX * @extends Phaser.GameObjects.Components.Mask + * @extends Phaser.GameObjects.Components.Pipeline * @extends Phaser.GameObjects.Components.ScrollFactor + * @extends Phaser.GameObjects.Components.Texture + * @extends Phaser.GameObjects.Components.Transform * @extends Phaser.GameObjects.Components.Visible * - * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} manager - The Emitter Manager this Emitter belongs to. * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Settings for this emitter. */ var ParticleEmitter = new Class({ + Extends: GameObject, + Mixins: [ + Components.AlphaSingle, Components.BlendMode, + Components.Depth, + Components.FX, Components.Mask, + Components.Pipeline, Components.ScrollFactor, - Components.Visible + Components.Texture, + Components.Transform, + Components.Visible, + Render ], initialize: - function ParticleEmitter (manager, config) + function ParticleEmitter (scene, x, y, texture, config) { - /** - * The Emitter Manager this Emitter belongs to. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#manager - * @type {Phaser.GameObjects.Particles.ParticleEmitterManager} - * @since 3.0.0 - */ - this.manager = manager; - - /** - * The texture assigned to particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#texture - * @type {Phaser.Textures.Texture} - * @since 3.0.0 - */ - this.texture = manager.texture; - - /** - * The texture frames assigned to particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#frames - * @type {Phaser.Textures.Frame[]} - * @since 3.0.0 - */ - this.frames = [ manager.defaultFrame ]; - - /** - * The default texture frame assigned to particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#defaultFrame - * @type {Phaser.Textures.Frame} - * @since 3.0.0 - */ - this.defaultFrame = manager.defaultFrame; - - /** - * Names of simple configuration properties. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#configFastMap - * @type {object} - * @since 3.0.0 - */ - this.configFastMap = [ - 'active', - 'blendMode', - 'collideBottom', - 'collideLeft', - 'collideRight', - 'collideTop', - 'deathCallback', - 'deathCallbackScope', - 'emitCallback', - 'emitCallbackScope', - 'follow', - 'frequency', - 'gravityX', - 'gravityY', - 'maxParticles', - 'maxAliveParticles', - 'name', - 'on', - 'particleBringToTop', - 'particleClass', - 'radial', - 'timeScale', - 'trackVisible', - 'visible' - ]; - - /** - * Names of complex configuration properties. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#configOpMap - * @type {object} - * @since 3.0.0 - */ - this.configOpMap = [ - 'accelerationX', - 'accelerationY', - 'angle', - 'alpha', - 'bounce', - 'delay', - 'lifespan', - 'maxVelocityX', - 'maxVelocityY', - 'moveToX', - 'moveToY', - 'quantity', - 'rotate', - 'scaleX', - 'scaleY', - 'speedX', - 'speedY', - 'tint', - 'x', - 'y' - ]; - - /** - * The name of this Particle Emitter. - * - * Empty by default and never populated by Phaser, this is left for developers to use. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#name - * @type {string} - * @default '' - * @since 3.0.0 - */ - this.name = ''; + GameObject.call(this, scene, 'ParticleEmitter'); /** * The Particle Class which will be emitted by this Emitter. * * @name Phaser.GameObjects.Particles.ParticleEmitter#particleClass - * @type {Phaser.Types.GameObjects.Particles.ParticleClassConstructor} + * @type {function} * @default Phaser.GameObjects.Particles.Particle * @since 3.0.0 + * @see Phaser.Types.GameObjects.Particles.ParticleClassConstructor */ this.particleClass = Particle; /** - * The x-coordinate of the particle origin (where particles will be emitted). + * An internal object holding all of the EmitterOp instances. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#x - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setPosition - */ - this.x = new EmitterOp(config, 'x', 0, true); - - /** - * The y-coordinate of the particle origin (where particles will be emitted). + * These are populated as part of the Emitter configuration parsing. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#y - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setPosition + * You typically do not access them directly, but instead use the + * provided getters and setters on this class, such as `ParticleEmitter.speedX` etc. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#ops + * @type {Phaser.Types.GameObjects.Particles.ParticleEmitterOps} + * @since 3.60.0 */ - this.y = new EmitterOp(config, 'y', 0, true); + this.ops = { + accelerationX: new EmitterOp('accelerationX', 0), + accelerationY: new EmitterOp('accelerationY', 0), + alpha: new EmitterOp('alpha', 1), + angle: new EmitterOp('angle', { min: 0, max: 360 }, true), + bounce: new EmitterOp('bounce', 0), + color: new EmitterColorOp('color'), + delay: new EmitterOp('delay', 0, true), + lifespan: new EmitterOp('lifespan', 1000, true), + maxVelocityX: new EmitterOp('maxVelocityX', 10000), + maxVelocityY: new EmitterOp('maxVelocityY', 10000), + moveToX: new EmitterOp('moveToX', 0), + moveToY: new EmitterOp('moveToY', 0), + quantity: new EmitterOp('quantity', 1, true), + rotate: new EmitterOp('rotate', 0), + scaleX: new EmitterOp('scaleX', 1), + scaleY: new EmitterOp('scaleY', 1), + speedX: new EmitterOp('speedX', 0, true), + speedY: new EmitterOp('speedY', 0, true), + tint: new EmitterOp('tint', 0xffffff), + x: new EmitterOp('x', 0), + y: new EmitterOp('y', 0) + }; /** * A radial emitter will emit particles in all directions between angle min and max, @@ -58488,68 +59586,6 @@ var ParticleEmitter = new Class({ */ this.acceleration = false; - /** - * Horizontal acceleration applied to emitted particles, in pixels per second squared. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#accelerationX - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - */ - this.accelerationX = new EmitterOp(config, 'accelerationX', 0, true); - - /** - * Vertical acceleration applied to emitted particles, in pixels per second squared. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#accelerationY - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - */ - this.accelerationY = new EmitterOp(config, 'accelerationY', 0, true); - - /** - * The maximum horizontal velocity of emitted particles, in pixels per second squared. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityX - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 10000 - * @since 3.0.0 - */ - this.maxVelocityX = new EmitterOp(config, 'maxVelocityX', 10000, true); - - /** - * The maximum vertical velocity of emitted particles, in pixels per second squared. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityY - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 10000 - * @since 3.0.0 - */ - this.maxVelocityY = new EmitterOp(config, 'maxVelocityY', 10000, true); - - /** - * The initial horizontal speed of emitted particles, in pixels per second. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#speedX - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setSpeedX - */ - this.speedX = new EmitterOp(config, 'speedX', 0, true); - - /** - * The initial vertical speed of emitted particles, in pixels per second. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#speedY - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setSpeedY - */ - this.speedY = new EmitterOp(config, 'speedY', 0, true); - /** * Whether moveToX and moveToY are set. Set automatically during configuration. * @@ -58563,113 +59599,6 @@ var ParticleEmitter = new Class({ */ this.moveTo = false; - /** - * The x-coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#moveToX - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - */ - this.moveToX = new EmitterOp(config, 'moveToX', null, true); - - /** - * The y-coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#moveToY - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - */ - this.moveToY = new EmitterOp(config, 'moveToY', null, true); - - /** - * Whether particles will rebound when they meet the emitter bounds. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#bounce - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - */ - this.bounce = new EmitterOp(config, 'bounce', 0, true); - - /** - * The horizontal scale of emitted particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#scaleX - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 1 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setScale - * @see Phaser.GameObjects.Particles.ParticleEmitter#setScaleX - */ - this.scaleX = new EmitterOp(config, 'scaleX', 1); - - /** - * The vertical scale of emitted particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#scaleY - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 1 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setScale - * @see Phaser.GameObjects.Particles.ParticleEmitter#setScaleY - */ - this.scaleY = new EmitterOp(config, 'scaleY', 1); - - /** - * Color tint applied to emitted particles. Value must not include the alpha channel. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#tint - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0xffffff - * @since 3.0.0 - */ - this.tint = new EmitterOp(config, 'tint', 0xffffff); - - /** - * The alpha (transparency) of emitted particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#alpha - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 1 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setAlpha - */ - this.alpha = new EmitterOp(config, 'alpha', 1); - - /** - * The lifespan of emitted particles, in ms. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#lifespan - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 1000 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setLifespan - */ - this.lifespan = new EmitterOp(config, 'lifespan', 1000, true); - - /** - * The angle of the initial velocity of emitted particles, in degrees. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#angle - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default { min: 0, max: 360 } - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setAngle - */ - this.angle = new EmitterOp(config, 'angle', { min: 0, max: 360 }, true); - - /** - * The rotation of emitted particles, in degrees. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#rotate - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 0 - * @since 3.0.0 - */ - this.rotate = new EmitterOp(config, 'rotate', 0); - /** * A function to call when a particle is emitted. * @@ -58711,7 +59640,10 @@ var ParticleEmitter = new Class({ this.deathCallbackScope = null; /** - * Set to hard limit the amount of particle objects this emitter is allowed to create. + * Set to hard limit the amount of particle objects this emitter is allowed to create + * in total. This is the number of `Particle` instances it can create, not the number + * of 'alive' particles. + * * 0 means unlimited. * * @name Phaser.GameObjects.Particles.ParticleEmitter#maxParticles @@ -58722,7 +59654,7 @@ var ParticleEmitter = new Class({ this.maxParticles = 0; /** - * The maximum number of alive (and rendering) particles this emitter will update. + * The maximum number of alive and rendering particles this emitter will update. * When this limit is reached, a particle needs to die before another can be emitted. * * 0 means no limits. @@ -58735,26 +59667,48 @@ var ParticleEmitter = new Class({ this.maxAliveParticles = 0; /** - * How many particles are emitted each time particles are emitted (one explosion or one flow cycle). + * If set, either via the Emitter config, or by directly setting this property, + * the Particle Emitter will stop emitting particles once this total has been + * reached. It will then enter a 'stopped' state, firing the `STOP` + * event. Note that entering a stopped state doesn't mean all the particles + * have finished, just that it's not emitting any further ones. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#quantity - * @type {Phaser.GameObjects.Particles.EmitterOp} - * @default 1 - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrequency - * @see Phaser.GameObjects.Particles.ParticleEmitter#setQuantity + * To know when the final particle expires, listen for the COMPLETE event. + * + * Use this if you wish to launch an exact number of particles and then stop + * your emitter afterwards. + * + * The counter is reset each time the `ParticleEmitter.start` method is called. + * + * 0 means the emitter will not stop based on total emitted particles. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#stopAfter + * @type {number} + * @default 0 + * @since 3.60.0 */ - this.quantity = new EmitterOp(config, 'quantity', 1, true); + this.stopAfter = 0; /** - * How many ms to wait after emission before the particles start updating. + * The number of milliseconds this emitter will emit particles for when in flow mode, + * before it stops emission. A value of 0 (the default) means there is no duration. + * + * When the duration expires the `STOP` event is emitted. Note that entering a + * stopped state doesn't mean all the particles have finished, just that it's + * not emitting any further ones. + * + * To know when the final particle expires, listen for the COMPLETE event. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#delay - * @type {Phaser.GameObjects.Particles.EmitterOp} + * The counter is reset each time the `ParticleEmitter.start` method is called. + * + * 0 means the emitter will not stop based on duration. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#duration + * @type {number} * @default 0 - * @since 3.0.0 + * @since 3.60.0 */ - this.delay = new EmitterOp(config, 'delay', 0, true); + this.duration = 0; /** * For a flow emitter, the time interval (>= 0) between particle flow cycles in ms. @@ -58773,20 +59727,25 @@ var ParticleEmitter = new Class({ /** * Controls if the emitter is currently emitting a particle flow (when frequency >= 0). + * * Already alive particles will continue to update until they expire. + * * Controlled by {@link Phaser.GameObjects.Particles.ParticleEmitter#start} and {@link Phaser.GameObjects.Particles.ParticleEmitter#stop}. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#on + * @name Phaser.GameObjects.Particles.ParticleEmitter#emitting * @type {boolean} * @default true * @since 3.0.0 */ - this.on = true; + this.emitting = true; /** * Newly emitted particles are added to the top of the particle list, i.e. rendered above those already alive. + * * Set to false to send them to the back. * + * Also see the `sortOrder` property for more complex particle sorting. + * * @name Phaser.GameObjects.Particles.ParticleEmitter#particleBringToTop * @type {boolean} * @default true @@ -58805,29 +59764,64 @@ var ParticleEmitter = new Class({ this.timeScale = 1; /** - * An object describing a shape to emit particles from. + * An array containing Particle Emission Zones. These can be either EdgeZones or RandomZones. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#emitZone - * @type {?Phaser.GameObjects.Particles.Zones.EdgeZone|Phaser.GameObjects.Particles.Zones.RandomZone} - * @default null - * @since 3.0.0 + * Particles are emitted from a randomly selected zone from this array. + * + * Prior to Phaser v3.60 an Emitter could only have one single Emission Zone. + * In 3.60 they can now have an array of Emission Zones. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#emitZones + * @type {Phaser.GameObjects.Particles.Zones.EdgeZone[]|Phaser.GameObjects.Particles.Zones.RandomZone[]} + * @since 3.60.0 * @see Phaser.GameObjects.Particles.ParticleEmitter#setEmitZone */ - this.emitZone = null; + this.emitZones = []; /** - * An object describing a shape that deactivates particles when they interact with it. + * An array containing Particle Death Zone objects. A particle is immediately killed as soon as its x/y coordinates + * intersect with any of the configured Death Zones. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#deathZone - * @type {?Phaser.GameObjects.Particles.Zones.DeathZone} - * @default null - * @since 3.0.0 + * Prior to Phaser v3.60 an Emitter could only have one single Death Zone. + * In 3.60 they can now have an array of Death Zones. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#deathZones + * @type {Phaser.GameObjects.Particles.Zones.DeathZone[]} + * @since 3.60.0 * @see Phaser.GameObjects.Particles.ParticleEmitter#setDeathZone */ - this.deathZone = null; + this.deathZones = []; + + /** + * An optional Rectangle object that is used during rendering to cull Particles from + * display. For example, if your particles are limited to only move within a 300x300 + * sized area from their origin, then you can set this Rectangle to those dimensions. + * + * The renderer will check to see if the `viewBounds` Rectangle intersects with the + * Camera bounds during the render step and if not it will skip rendering the Emitter + * entirely. + * + * This allows you to create many emitters in a Scene without the cost of + * rendering if the contents aren't visible. + * + * Note that the Emitter will not perform any checks to see if the Particles themselves + * are outside of these bounds, or not. It will simply check the bounds against the + * camera. Use the `getBounds` method with the `advance` parameter to help define + * the location and placement of the view bounds. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#viewBounds + * @type {?Phaser.Geom.Rectangle} + * @default null + * @since 3.60.0 + * @see Phaser.GameObjects.Particles.ParticleEmitter#setViewBounds + */ + this.viewBounds = null; /** - * A rectangular boundary constraining particle movement. + * A rectangular boundary constraining particle movement. Use the Emitter properties `collideLeft`, + * `collideRight`, `collideTop` and `collideBottom` to control if a particle will rebound off + * the sides of this boundary, or not. This happens when the particles x/y coordinate hits + * the boundary. * * @name Phaser.GameObjects.Particles.ParticleEmitter#bounds * @type {?Phaser.Geom.Rectangle} @@ -58877,40 +59871,6 @@ var ParticleEmitter = new Class({ */ this.collideBottom = true; - /** - * Whether this emitter updates itself and its particles. - * - * Controlled by {@link Phaser.GameObjects.Particles.ParticleEmitter#pause} - * and {@link Phaser.GameObjects.Particles.ParticleEmitter#resume}. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#active - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.active = true; - - /** - * Set this to false to hide any active particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#visible - * @type {boolean} - * @default true - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setVisible - */ - this.visible = true; - - /** - * The blend mode of this emitter's particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitter#blendMode - * @type {number} - * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setBlendMode - */ - this.blendMode = BlendModes.NORMAL; - /** * A Game Object whose position is used as the particle origin. * @@ -58946,15 +59906,13 @@ var ParticleEmitter = new Class({ this.trackVisible = false; /** - * The current texture frame, as an index of {@link Phaser.GameObjects.Particles.ParticleEmitter#frames}. + * The texture frames assigned to particles. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#currentFrame - * @type {number} - * @default 0 + * @name Phaser.GameObjects.Particles.ParticleEmitter#frames + * @type {Phaser.Textures.Frame[]} * @since 3.0.0 - * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrame */ - this.currentFrame = 0; + this.frames = []; /** * Whether texture {@link Phaser.GameObjects.Particles.ParticleEmitter#frames} are selected at random. @@ -58979,7 +59937,38 @@ var ParticleEmitter = new Class({ this.frameQuantity = 1; /** - * Inactive particles. + * The animations assigned to particles. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#anims + * @type {string[]} + * @since 3.60.0 + */ + this.anims = []; + + /** + * Whether animations {@link Phaser.GameObjects.Particles.ParticleEmitter#anims} are selected at random. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#randomAnim + * @type {boolean} + * @default true + * @since 3.60.0 + * @see Phaser.GameObjects.Particles.ParticleEmitter#setAnim + */ + this.randomAnim = true; + + /** + * The number of consecutive particles that receive a single animation (per frame cycle). + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#animQuantity + * @type {number} + * @default 1 + * @since 3.60.0 + * @see Phaser.GameObjects.Particles.ParticleEmitter#setAnim + */ + this.animQuantity = 1; + + /** + * An array containing all currently inactive Particle instances. * * @name Phaser.GameObjects.Particles.ParticleEmitter#dead * @type {Phaser.GameObjects.Particles.Particle[]} @@ -58989,7 +59978,7 @@ var ParticleEmitter = new Class({ this.dead = []; /** - * Active particles + * An array containing all currently live and rendering Particle instances. * * @name Phaser.GameObjects.Particles.ParticleEmitter#alive * @type {Phaser.GameObjects.Particles.Particle[]} @@ -58999,85 +59988,210 @@ var ParticleEmitter = new Class({ this.alive = []; /** - * The time until the next flow cycle. + * Internal array that holds counter data: + * + * 0 - flowCounter - The time until next flow cycle. + * 1 - frameCounter - Counts up to {@link Phaser.GameObjects.Particles.ParticleEmitter#frameQuantity}. + * 2 - animCounter - Counts up to animQuantity. + * 3 - elapsed - The time remaining until the `duration` limit is reached. + * 4 - stopCounter - The number of particles remaining until `stopAfter` limit is reached. + * 5 - completeFlag - Has the COMPLETE event been emitted? + * 6 - zoneIndex - The emit zone index counter. + * 7 - zoneTotal - The emit zone total counter. + * 8 - currentFrame - The current texture frame, as an index of {@link Phaser.GameObjects.Particles.ParticleEmitter#frames}. + * 9 - currentAnim - The current animation, as an index of {@link Phaser.GameObjects.Particles.ParticleEmitter#anims}. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#_counter + * @name Phaser.GameObjects.Particles.ParticleEmitter#counters + * @type {Float32Array} + * @private + * @since 3.60.0 + */ + this.counters = new Float32Array(10); + + /** + * Cached amount of frames in the `ParticleEmitter.frames` array. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#_frameLength * @type {number} * @private * @default 0 * @since 3.0.0 */ - this._counter = 0; + this._frameLength = 0; /** - * Counts up to {@link Phaser.GameObjects.Particles.ParticleEmitter#frameQuantity}. + * Cached amount of animations in the `ParticleEmitter.anims` array. * - * @name Phaser.GameObjects.Particles.ParticleEmitter#_frameCounter + * @name Phaser.GameObjects.Particles.ParticleEmitter#_animLength * @type {number} * @private * @default 0 - * @since 3.0.0 + * @since 3.60.0 + */ + this._animLength = 0; + + /** + * An internal property used to tell when the emitter is in fast-forwarc mode. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#skipping + * @type {boolean} + * @default true + * @since 3.60.0 + */ + this.skipping = false; + + /** + * An internal Transform Matrix used to cache this emitters world matrix. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#worldMatrix + * @type {Phaser.GameObjects.Components.TransformMatrix} + * @since 3.60.0 + */ + this.worldMatrix = new TransformMatrix(); + + /** + * Optionally sort the particles before they render based on this + * property. The property must exist on the `Particle` class, such + * as `y`, `lifeT`, `scaleX`, etc. + * + * When set this overrides the `particleBringToTop` setting. + * + * To reset this and disable sorting, so this property to an empty string. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#sortProperty + * @type {string} + * @since 3.60.0 + */ + this.sortProperty = ''; + + /** + * When `sortProperty` is defined this controls the sorting order, + * either ascending or descending. Toggle to control the visual effect. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#sortOrderAsc + * @type {boolean} + * @since 3.60.0 + */ + this.sortOrderAsc = true; + + /** + * The callback used to sort the particles. Only used if `sortProperty` + * has been set. Set this via the `setSortCallback` method. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#sortCallback + * @type {?Phaser.Types.GameObjects.Particles.ParticleSortCallback} + * @since 3.60.0 + */ + this.sortCallback = this.depthSortCallback; + + /** + * A list of Particle Processors being managed by this Emitter. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#processors + * @type {Phaser.Structs.List.} + * @since 3.60.0 + */ + this.processors = new List(this); + + /** + * The tint fill mode used by the Particles in this Emitter. + * + * `false` = An additive tint (the default), where vertices colors are blended with the texture. + * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#tintFill + * @type {boolean} + * @default false + * @since 3.60.0 */ - this._frameCounter = 0; + this.tintFill = false; + + this.initPipeline(); + + this.setPosition(x, y); + this.setTexture(texture); if (config) { - this.fromJSON(config); + this.setConfig(config); } }, + // Overrides Game Object method + addedToScene: function () + { + this.scene.sys.updateList.add(this); + }, + + // Overrides Game Object method + removedFromScene: function () + { + this.scene.sys.updateList.remove(this); + }, + + /** + * Gets all active Particle Processors. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#getProcessors + * @since 3.60.0 + * + * @return {Phaser.GameObjects.Particles.ParticleProcessor[]} - An array of active Particle Processors. + */ + getProcessors: function () + { + return this.processors.getAll('active', true); + }, + /** * Merges configuration settings into the emitter's current settings. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#fromJSON - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#setConfig + * @since 3.60.0 * * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Settings for this emitter. * * @return {this} This Particle Emitter. */ - fromJSON: function (config) + setConfig: function (config) { if (!config) { return this; } - // Only update properties from their current state if they exist in the given config - var i = 0; var key = ''; - for (i = 0; i < this.configFastMap.length; i++) + var ops = this.ops; + + for (i = 0; i < configOpMap.length; i++) { - key = this.configFastMap[i]; + key = configOpMap[i]; - if (HasValue(config, key)) - { - this[key] = GetFastValue(config, key); - } + ops[key].loadConfig(config); } - for (i = 0; i < this.configOpMap.length; i++) + for (i = 0; i < configFastMap.length; i++) { - key = this.configOpMap[i]; + key = configFastMap[i]; + // Only update properties from their current state if they exist in the given config if (HasValue(config, key)) { - this[key].loadConfig(config); + this[key] = GetFastValue(config, key); } } - this.acceleration = (this.accelerationX.propertyValue !== 0 || this.accelerationY.propertyValue !== 0); + this.acceleration = (this.accelerationX !== 0 || this.accelerationY !== 0); - this.moveTo = (this.moveToX.propertyValue !== null && this.moveToY.propertyValue !== null); + this.moveTo = (this.moveToX !== 0 && this.moveToY !== 0); // Special 'speed' override if (HasValue(config, 'speed')) { - this.speedX.loadConfig(config, 'speed'); - this.speedY = null; + ops.speedX.loadConfig(config, 'speed'); + ops.speedY.active = false; } // If you specify speedX, speedY or moveTo then it changes the emitter from radial to a point emitter @@ -59090,8 +60204,8 @@ var ParticleEmitter = new Class({ if (HasValue(config, 'scale')) { - this.scaleX.loadConfig(config, 'scale'); - this.scaleY.loadConfig(config, 'scale'); + ops.scaleX.loadConfig(config, 'scale'); + ops.scaleY.active = false; } if (HasValue(config, 'callbackScope')) @@ -59104,12 +60218,12 @@ var ParticleEmitter = new Class({ if (HasValue(config, 'emitZone')) { - this.setEmitZone(config.emitZone); + this.addEmitZone(config.emitZone); } if (HasValue(config, 'deathZone')) { - this.setDeathZone(config.deathZone); + this.addDeathZone(config.deathZone); } if (HasValue(config, 'bounds')) @@ -59122,9 +60236,18 @@ var ParticleEmitter = new Class({ this.followOffset.setFromObject(GetFastValue(config, 'followOffset', 0)); } + if (HasValue(config, 'texture')) + { + this.setTexture(config.texture); + } + if (HasValue(config, 'frame')) { - this.setFrame(config.frame); + this.setEmitterFrame(config.frame); + } + else if (HasValue(config, 'anim')) + { + this.setAnim(config.anim); } if (HasValue(config, 'reserve')) @@ -59132,6 +60255,18 @@ var ParticleEmitter = new Class({ this.reserve(config.reserve); } + if (HasValue(config, 'advance')) + { + this.fastForward(config.advance); + } + + this.resetCounters(this.frequency, this.emitting); + + if (this.emitting) + { + this.emit(Events.START, this); + } + return this; }, @@ -59141,51 +60276,76 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#toJSON * @since 3.0.0 * - * @param {object} [output] - An object to copy output into. - * - * @return {object} - The output object. + * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. */ - toJSON: function (output) + toJSON: function () { - if (output === undefined) { output = {}; } + var output = ComponentsToJSON(this); var i = 0; var key = ''; - for (i = 0; i < this.configFastMap.length; i++) + for (i = 0; i < configFastMap.length; i++) { - key = this.configFastMap[i]; + key = configFastMap[i]; output[key] = this[key]; } - for (i = 0; i < this.configOpMap.length; i++) + var ops = this.ops; + + for (i = 0; i < configOpMap.length; i++) { - key = this.configOpMap[i]; + key = configOpMap[i]; - if (this[key]) + if (ops[key]) { - output[key] = this[key].toJSON(); + output[key] = ops[key].toJSON(); } } // special handlers - if (!this.speedY) + if (!ops.speedY.active) { delete output.speedX; - output.speed = this.speedX.toJSON(); + output.speed = ops.speedX.toJSON(); } if (this.scaleX === this.scaleY) { delete output.scaleX; delete output.scaleY; - output.scale = this.scaleX.toJSON(); + output.scale = ops.scaleX.toJSON(); } return output; }, + /** + * Resets the internal counter trackers. + * + * You shouldn't ever need to call this directly. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#resetCounters + * @since 3.60.0 + * + * @param {number} frequency - The frequency counter. + * @param {boolean} on - Set the complete flag. + */ + resetCounters: function (frequency, on) + { + var counters = this.counters; + + counters.fill(0); + + counters[0] = frequency; + + if (on) + { + counters[5] = 1; + } + }, + /** * Continuously moves the particle origin to follow a Game Object's position. * @@ -59239,40 +60399,43 @@ var ParticleEmitter = new Class({ */ getFrame: function () { - if (this.frames.length === 1) + var frames = this.frames; + var current; + + if (frames.length === 1) { - return this.defaultFrame; + current = frames[0]; } else if (this.randomFrame) { - return GetRandom(this.frames); + current = GetRandom(frames); } else { - var frame = this.frames[this.currentFrame]; + current = frames[this.currentFrame]; - this._frameCounter++; + this.frameCounter++; - if (this._frameCounter === this.frameQuantity) + if (this.frameCounter >= this.frameQuantity) { - this._frameCounter = 0; + this.frameCounter = 0; this.currentFrame = Wrap(this.currentFrame + 1, 0, this._frameLength); } - - return frame; } - }, - // frame: 0 - // frame: 'red' - // frame: [ 0, 1, 2, 3 ] - // frame: [ 'red', 'green', 'blue', 'pink', 'white' ] - // frame: { frames: [ 'red', 'green', 'blue', 'pink', 'white' ], [cycle: bool], [quantity: int] } + return this.texture.get(current); + }, /** - * Sets a pattern for assigning texture frames to emitted particles. + * Sets a pattern for assigning texture frames to emitted particles. The `frames` configuration can be any of: + * + * frame: 0 + * frame: 'red' + * frame: [ 0, 1, 2, 3 ] + * frame: [ 'red', 'green', 'blue', 'pink', 'white' ] + * frame: { frames: [ 'red', 'green', 'blue', 'pink', 'white' ], [cycle: bool], [quantity: int] } * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setFrame + * @method Phaser.GameObjects.Particles.ParticleEmitter#setEmitterFrame * @since 3.0.0 * * @param {(array|string|number|Phaser.Types.GameObjects.Particles.ParticleEmitterFrameConfig)} frames - One or more texture frames, or a configuration object. @@ -59281,21 +60444,27 @@ var ParticleEmitter = new Class({ * * @return {this} This Particle Emitter. */ - setFrame: function (frames, pickRandom, quantity) + setEmitterFrame: function (frames, pickRandom, quantity) { if (pickRandom === undefined) { pickRandom = true; } if (quantity === undefined) { quantity = 1; } this.randomFrame = pickRandom; this.frameQuantity = quantity; + this.currentFrame = 0; - this._frameCounter = 0; var t = typeof (frames); - if (Array.isArray(frames) || t === 'string' || t === 'number') + this.frames.length = 0; + + if (Array.isArray(frames)) + { + this.frames = this.frames.concat(frames); + } + else if (t === 'string' || t === 'number') { - this.manager.setEmitterFrames(frames, this); + this.frames.push(frames); } else if (t === 'object') { @@ -59305,7 +60474,7 @@ var ParticleEmitter = new Class({ if (frames) { - this.manager.setEmitterFrames(frames, this); + this.frames = this.frames.concat(frames); } var isCycle = GetFastValue(frameConfig, 'cycle', false); @@ -59327,40 +60496,127 @@ var ParticleEmitter = new Class({ }, /** - * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle movement on or off. + * Chooses an animation from {@link Phaser.GameObjects.Particles.ParticleEmitter#anims}, if populated. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setRadial - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#getAnim + * @since 3.60.0 * - * @param {boolean} [value=true] - Radial mode (true) or point mode (true). + * @return {string} The animation to play, or `null` if there aren't any. + */ + getAnim: function () + { + var anims = this.anims; + + if (anims.length === 0) + { + return null; + } + else if (anims.length === 1) + { + return anims[0]; + } + else if (this.randomAnim) + { + return GetRandom(anims); + } + else + { + var anim = anims[this.currentAnim]; + + this.animCounter++; + + if (this.animCounter >= this.animQuantity) + { + this.animCounter = 0; + this.currentAnim = Wrap(this.currentAnim + 1, 0, this._animLength); + } + + return anim; + } + }, + + /** + * Sets a pattern for assigning animations to emitted particles. The `anims` configuration can be any of: + * + * anim: 'red' + * anim: [ 'red', 'green', 'blue', 'pink', 'white' ] + * anim: { anims: [ 'red', 'green', 'blue', 'pink', 'white' ], [cycle: bool], [quantity: int] } + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setAnim + * @since 3.60.0 + * + * @param {(array|string|Phaser.Types.GameObjects.Particles.ParticleEmitterFrameConfig)} anims - One or more animations, or a configuration object. + * @param {boolean} [pickRandom=true] - Whether animations should be assigned at random from `anims`. + * @param {number} [quantity=1] - The number of consecutive particles that will receive each animation. * * @return {this} This Particle Emitter. */ - setRadial: function (value) + setAnim: function (anims, pickRandom, quantity) { - if (value === undefined) { value = true; } + if (pickRandom === undefined) { pickRandom = true; } + if (quantity === undefined) { quantity = 1; } - this.radial = value; + this.randomAnim = pickRandom; + this.animQuantity = quantity; + + this.currentAnim = 0; + + var t = typeof (anims); + + this.anims.length = 0; + + if (Array.isArray(anims)) + { + this.anims = this.anims.concat(anims); + } + else if (t === 'string') + { + this.anims.push(anims); + } + else if (t === 'object') + { + var animConfig = anims; + + anims = GetFastValue(animConfig, 'anims', null); + + if (anims) + { + this.anims = this.anims.concat(anims); + } + + var isCycle = GetFastValue(animConfig, 'cycle', false); + + this.randomAnim = (isCycle) ? false : true; + + this.animQuantity = GetFastValue(animConfig, 'quantity', quantity); + } + + this._animLength = this.anims.length; + + if (this._animLength === 1) + { + this.animQuantity = 1; + this.randomAnim = false; + } return this; }, /** - * Sets the position of the emitter's particle origin. - * New particles will be emitted here. + * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle movement on or off. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setPosition + * @method Phaser.GameObjects.Particles.ParticleEmitter#setRadial * @since 3.0.0 * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} x - The x-coordinate of the particle origin. - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} y - The y-coordinate of the particle origin. + * @param {boolean} [value=true] - Radial mode (true) or point mode (true). * * @return {this} This Particle Emitter. */ - setPosition: function (x, y) + setRadial: function (value) { - this.x.onChange(x); - this.y.onChange(y); + if (value === undefined) { value = true; } + + this.radial = value; return this; }, @@ -59370,8 +60626,10 @@ var ParticleEmitter = new Class({ * * To remove the boundary, set {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds} to null. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setBounds - * @since 3.0.0 + * Particles will rebound off the edges of the boundary. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setParticleBounds + * @since 3.60.0 * * @param {(number|Phaser.Types.GameObjects.Particles.ParticleEmitterBounds|Phaser.Types.GameObjects.Particles.ParticleEmitterBoundsAlt)} x - The x-coordinate of the left edge of the boundary, or an object representing a rectangle. * @param {number} y - The y-coordinate of the top edge of the boundary. @@ -59380,7 +60638,7 @@ var ParticleEmitter = new Class({ * * @return {this} This Particle Emitter. */ - setBounds: function (x, y, width, height) + setParticleBounds: function (x, y, width, height) { if (typeof x === 'object') { @@ -59405,409 +60663,583 @@ var ParticleEmitter = new Class({ }, /** - * Sets the initial horizontal speed of emitted particles. - * Changes the emitter to point mode. + * Sets the initial radial speed of emitted particles. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setSpeedX - * @since 3.0.0 + * Changes the emitter to radial mode. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setParticleSpeed + * @since 3.60.0 * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second. + * @param {number} x - The horizontal scale of the emitted Particles. + * @param {number} [y=x] - The vertical scale of emitted Particles. If not set it will use the `x` value. * * @return {this} This Particle Emitter. */ - setSpeedX: function (value) + setParticleSpeed: function (x, y) { - this.speedX.onChange(value); + if (y === undefined) { y = x; } + + this.ops.speedX.onChange(x); + + if (x === y) + { + this.ops.speedY.active = false; + } + else + { + this.ops.speedY.onChange(y); + } // If you specify speedX and Y then it changes the emitter from radial to a point emitter - this.radial = false; + this.radial = true; return this; }, /** - * Sets the initial vertical speed of emitted particles. - * Changes the emitter to point mode. + * Sets the vertical and horizontal scale of the emitted particles. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setSpeedY - * @since 3.0.0 + * You can also set the scale of the entire emitter via `setScale`. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setParticleScale + * @since 3.60.0 * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second. + * @param {number} [x=1] - The horizontal scale of the emitted Particles. + * @param {number} [y=x] - The vertical scale of emitted Particles. If not set it will use the `x` value. * * @return {this} This Particle Emitter. */ - setSpeedY: function (value) + setParticleScale: function (x, y) { - if (this.speedY) - { - this.speedY.onChange(value); + if (x === undefined) { x = 1; } + if (y === undefined) { y = x; } - // If you specify speedX and Y then it changes the emitter from radial to a point emitter - this.radial = false; - } + this.ops.scaleX.onChange(x); + this.ops.scaleY.onChange(y); return this; }, /** - * Sets the initial radial speed of emitted particles. - * Changes the emitter to radial mode. + * Sets the gravity applied to emitted particles. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setSpeed - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#setParticleGravity + * @since 3.60.0 * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second. + * @param {number} x - Horizontal acceleration due to gravity, in pixels per second squared. Set to zero for no gravity. + * @param {number} y - Vertical acceleration due to gravity, in pixels per second squared. Set to zero for no gravity. * * @return {this} This Particle Emitter. */ - setSpeed: function (value) + setParticleGravity: function (x, y) { - this.speedX.onChange(value); - this.speedY = null; - - // If you specify speedX and Y then it changes the emitter from radial to a point emitter - this.radial = true; + this.gravityX = x; + this.gravityY = y; return this; }, /** - * Sets the horizontal scale of emitted particles. + * Sets the opacity (alpha) of emitted particles. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setScaleX - * @since 3.0.0 + * You can also set the alpha of the entire emitter via `setAlpha`. * - * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1. + * @method Phaser.GameObjects.Particles.ParticleEmitter#setParticleAlpha + * @since 3.60.0 + * + * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 (transparent) and 1 (opaque). * * @return {this} This Particle Emitter. */ - setScaleX: function (value) + setParticleAlpha: function (value) { - this.scaleX.onChange(value); + this.ops.alpha.onChange(value); return this; }, /** - * Sets the vertical scale of emitted particles. + * Sets the color tint of emitted particles. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setScaleY - * @since 3.0.0 + * This is a WebGL only feature. * - * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1. + * @method Phaser.GameObjects.Particles.ParticleEmitter#setParticleTint + * @since 3.60.0 + * @webglOnly + * + * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 and 0xffffff. * * @return {this} This Particle Emitter. */ - setScaleY: function (value) + setParticleTint: function (value) { - this.scaleY.onChange(value); + this.ops.tint.onChange(value); return this; }, /** - * Sets the scale of emitted particles. This updates both the scaleX and scaleY values. + * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setScale + * The value is given in degrees using Phaser's right-handed coordinate system. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setEmitterAngle * @since 3.0.0 * - * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1. + * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The angle of the initial velocity of emitted particles, in degrees. * * @return {this} This Particle Emitter. */ - setScale: function (value) + setEmitterAngle: function (value) { - this.scaleX.onChange(value); - this.scaleY.onChange(value); + this.ops.angle.onChange(value); return this; }, /** - * Sets the horizontal gravity applied to emitted particles. + * Sets the lifespan of newly emitted particles in milliseconds. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setGravityX - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#setParticleLifespan + * @since 3.60.0 * - * @param {number} value - Acceleration due to gravity, in pixels per second squared. + * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The lifespan of a particle, in ms. * * @return {this} This Particle Emitter. */ - setGravityX: function (value) + setParticleLifespan: function (value) { - this.gravityX = value; + this.lifespan.onChange(value); return this; }, /** - * Sets the vertical gravity applied to emitted particles. + * Sets the number of particles released at each flow cycle or explosion. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setGravityY + * @method Phaser.GameObjects.Particles.ParticleEmitter#setQuantity * @since 3.0.0 * - * @param {number} value - Acceleration due to gravity, in pixels per second squared. + * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} quantity - The number of particles to release at each flow cycle or explosion. * * @return {this} This Particle Emitter. */ - setGravityY: function (value) + setQuantity: function (quantity) { - this.gravityY = value; + this.quantity = quantity; return this; }, /** - * Sets the gravity applied to emitted particles. + * Sets the emitter's {@link Phaser.GameObjects.Particles.ParticleEmitter#frequency} + * and {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setGravity + * @method Phaser.GameObjects.Particles.ParticleEmitter#setFrequency * @since 3.0.0 * - * @param {number} x - Horizontal acceleration due to gravity, in pixels per second squared. - * @param {number} y - Vertical acceleration due to gravity, in pixels per second squared. + * @param {number} frequency - The time interval (>= 0) of each flow cycle, in ms; or -1 to put the emitter in explosion mode. + * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} [quantity] - The number of particles to release at each flow cycle or explosion. * * @return {this} This Particle Emitter. */ - setGravity: function (x, y) + setFrequency: function (frequency, quantity) { - this.gravityX = x; - this.gravityY = y; + this.frequency = frequency; + + this.flowCounter = (frequency > 0) ? frequency : 0; + + if (quantity) + { + this.quantity = quantity; + } return this; }, /** - * Sets the opacity of emitted particles. + * Adds a new Particle Death Zone to this Emitter. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setAlpha - * @since 3.0.0 + * A particle is immediately killed as soon as its x/y coordinates intersect + * with any of the configured Death Zones. * - * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 (transparent) and 1 (opaque). + * The `source` can be a Geometry Shape, such as a Circle, Rectangle or Triangle. + * Any valid object from the `Phaser.Geometry` namespace is allowed, as long as + * it supports a `contains` function. You can set the `type` to be either `onEnter` + * or `onLeave`. * - * @return {this} This Particle Emitter. + * A single Death Zone instance can only exist once within this Emitter, but can belong + * to multiple Emitters. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#addDeathZone + * @since 3.60.0 + * + * @param {Phaser.Types.GameObjects.Particles.DeathZoneObject|Phaser.Types.GameObjects.Particles.DeathZoneObject[]} config - A Death Zone configuration object, a Death Zone instance, a valid Geometry object or an array of them. + * + * @return {Phaser.GameObjects.Particles.Zones.DeathZone} The Death Zone that was added to this Emitter. */ - setAlpha: function (value) + addDeathZone: function (config) { - this.alpha.onChange(value); + if (!Array.isArray(config)) + { + config = [ config ]; + } - return this; + var zone; + + for (var i = 0; i < config.length; i++) + { + zone = config[i]; + + if (zone instanceof DeathZone) + { + Add(this.deathZones, zone); + } + else if (typeof zone.contains === 'function') + { + zone = new DeathZone(zone, true); + + Add(this.deathZones, zone); + } + else + { + var type = GetFastValue(zone, 'type', 'onEnter'); + var source = GetFastValue(zone, 'source', null); + + if (source && typeof source.contains === 'function') + { + var killOnEnter = (type === 'onEnter') ? true : false; + + zone = new DeathZone(source, killOnEnter); + + Add(this.deathZones, zone); + } + } + } + + return zone; }, /** - * Sets the color tint of emitted particles. + * Removes the given Particle Death Zone from this Emitter. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setTint - * @since 3.22.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#removeDeathZone + * @since 3.60.0 * - * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 and 0xffffff. + * @param {Phaser.GameObjects.Particles.Zones.DeathZone} zone - The Death Zone that should be removed from this Emitter. * * @return {this} This Particle Emitter. */ - setTint: function (value) + removeDeathZone: function (zone) { - this.tint.onChange(value); + Remove(this.deathZones, zone); return this; }, /** - * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream. + * Adds a new Particle Emission Zone to this Emitter. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setEmitterAngle - * @since 3.0.0 + * An {@link Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig EdgeZone} places particles on its edges. + * Its {@link Phaser.Types.GameObjects.Particles.EdgeZoneSource source} can be a Curve, Path, Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; + * or any object with a suitable {@link Phaser.Types.GameObjects.Particles.EdgeZoneSourceCallback getPoints} method. * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The angle of the initial velocity of emitted particles. + * A {@link Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig RandomZone} places the particles randomly within its interior. + * Its {@link RandomZoneSource source} can be a Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable {@link Phaser.Types.GameObjects.Particles.RandomZoneSourceCallback getRandomPoint} method. * - * @return {this} This Particle Emitter. + * An Emission Zone can only exist once within this Emitter. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#addEmitZone + * @since 3.60.0 + * + * @param {Phaser.Types.GameObjects.Particles.EmitZoneObject|Phaser.Types.GameObjects.Particles.EmitZoneObject[]} zone - An Emission Zone configuration object, a RandomZone or EdgeZone instance, or an array of them. + * + * @return {Phaser.GameObjects.Particles.Zones.EdgeZone|Phaser.GameObjects.Particles.Zones.RandomZone} The Emission Zone that was added to this Emitter. */ - setEmitterAngle: function (value) + addEmitZone: function (config) { - this.angle.onChange(value); + if (!Array.isArray(config)) + { + config = [ config ]; + } - return this; + var zone; + + for (var i = 0; i < config.length; i++) + { + zone = config[i]; + + if (zone instanceof RandomZone || zone instanceof EdgeZone) + { + Add(this.emitZones, zone); + } + else + { + // Where source = Geom like Circle, or a Path or Curve + // emitZone: { type: 'random', source: X } + // emitZone: { type: 'edge', source: X, quantity: 32, [stepRate=0], [yoyo=false], [seamless=true], [total=1] } + + var type = GetFastValue(zone, 'type', 'random'); + var source = GetFastValue(zone, 'source', null); + + if (type === 'random') + { + zone = new RandomZone(source); + } + else if (type === 'edge') + { + var quantity = GetFastValue(zone, 'quantity', 1); + var stepRate = GetFastValue(zone, 'stepRate', 0); + var yoyo = GetFastValue(zone, 'yoyo', false); + var seamless = GetFastValue(zone, 'seamless', true); + var total = GetFastValue(zone, 'total', -1); + + zone = new EdgeZone(source, quantity, stepRate, yoyo, seamless, total); + } + + if (zone) + { + Add(this.emitZones, zone); + } + } + } + + return zone; }, /** - * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream. + * Removes the given Particle Emission Zone from this Emitter. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setAngle - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#removeEmitZone + * @since 3.60.0 * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The angle of the initial velocity of emitted particles. + * @param {Phaser.GameObjects.Particles.Zones.EdgeZone|Phaser.GameObjects.Particles.Zones.RandomZone} zone - The Emission Zone that should be removed from this Emitter. * * @return {this} This Particle Emitter. */ - setAngle: function (value) + removeEmitZone: function (zone) { - this.angle.onChange(value); + Remove(this.emitZones, zone); + + this.zoneIndex = 0; return this; }, /** - * Sets the lifespan of newly emitted particles. + * Takes the given particle and sets its x/y coordinates to match the next available + * emission zone, if any have been configured. This method is called automatically + * as part of the `Particle.fire` process. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setLifespan - * @since 3.0.0 + * The Emit Zones are iterated in sequence. Once a zone has had a particle emitted + * from it, then the next zone is used and so on, in a loop. * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The particle lifespan, in ms. + * @method Phaser.GameObjects.Particles.ParticleEmitter#getEmitZone + * @since 3.60.0 * - * @return {this} This Particle Emitter. + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle to set the emission zone for. */ - setLifespan: function (value) + getEmitZone: function (particle) { - this.lifespan.onChange(value); + var zones = this.emitZones; + var len = zones.length; - return this; + if (len === 0) + { + return; + } + else + { + var zone = zones[this.zoneIndex]; + + zone.getPoint(particle); + + if (zone.total > -1) + { + this.zoneTotal++; + + if (this.zoneTotal >= zone.total) + { + this.zoneTotal = 0; + + this.zoneIndex = Wrap(this.zoneIndex + 1, 0, len); + } + } + } }, /** - * Sets the number of particles released at each flow cycle or explosion. + * Takes the given particle and checks to see if any of the configured Death Zones + * will kill it and returns the result. This method is called automatically as part + * of the `Particle.update` process. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setQuantity - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#getDeathZone + * @fires Phaser.GameObjects.Particles.Events#DEATH_ZONE + * @since 3.60.0 * - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} quantity - The number of particles to release at each flow cycle or explosion. + * @param {Phaser.GameObjects.Particles.Particle} particle - The particle to test against the Death Zones. * - * @return {this} This Particle Emitter. + * @return {boolean} `true` if the particle should be killed, otherwise `false`. */ - setQuantity: function (quantity) + getDeathZone: function (particle) { - this.quantity.onChange(quantity); + var zones = this.deathZones; - return this; + for (var i = 0; i < zones.length; i++) + { + var bounds = particle.getBounds(this.worldMatrix); + + if (zones[i].willKill(bounds.centerX, bounds.centerY)) + { + this.emit(Events.DEATH_ZONE, this, particle, zones[i]); + + return true; + } + } + + return false; }, /** - * Sets the emitter's {@link Phaser.GameObjects.Particles.ParticleEmitter#frequency} - * and {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}. + * Changes the currently active Emission Zone. The zones should have already + * been added to this Emitter either via the emitter config, or the + * `addEmitZone` method. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setFrequency + * Call this method by passing either a numeric zone index value, or + * the zone instance itself. + * + * Prior to v3.60 an Emitter could only have a single Emit Zone and this + * method was how you set it. From 3.60 and up it now performs a different + * function and swaps between all available active zones. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setEmitZone * @since 3.0.0 * - * @param {number} frequency - The time interval (>= 0) of each flow cycle, in ms; or -1 to put the emitter in explosion mode. - * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} [quantity] - The number of particles to release at each flow cycle or explosion. + * @param {number|Phaser.GameObjects.Particles.Zones.EdgeZone|Phaser.GameObjects.Particles.Zones.RandomZone} zone - The Emit Zone to set as the active zone. * * @return {this} This Particle Emitter. */ - setFrequency: function (frequency, quantity) + setEmitZone: function (zone) { - this.frequency = frequency; + var index; - this._counter = 0; + if (isFinite(zone)) + { + index = zone; + } + else + { + index = this.emitZones.indexOf(zone); + } - if (quantity) + if (index >= 0) { - this.quantity.onChange(quantity); + this.zoneIndex = index; } return this; }, /** - * Sets or removes the {@link Phaser.GameObjects.Particles.ParticleEmitter#emitZone}. - * - * An {@link Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig EdgeZone} places particles on its edges. Its {@link Phaser.Types.GameObjects.Particles.EdgeZoneSource source} can be a Curve, Path, Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable {@link Phaser.Types.GameObjects.Particles.EdgeZoneSourceCallback getPoints} method. + * Adds a Particle Processor, such as a Gravity Well, to this Emitter. * - * A {@link Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig RandomZone} places randomly within its interior. Its {@link RandomZoneSource source} can be a Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable {@link Phaser.Types.GameObjects.Particles.RandomZoneSourceCallback getRandomPoint} method. + * It will start processing particles from the next update as long as its `active` + * property is set. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setEmitZone - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#addParticleProcessor + * @since 3.60.0 * - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig} [zoneConfig] - An object describing the zone, or `undefined` to remove any current emit zone. + * @param {Phaser.GameObjects.Particles.ParticleProcessor} processor - The Particle Processor to add to this Emitter Manager. * - * @return {this} This Particle Emitter. + * @return {Phaser.GameObjects.Particles.ParticleProcessor} The Particle Processor that was added to this Emitter Manager. */ - setEmitZone: function (zoneConfig) + addParticleProcessor: function (processor) { - if (zoneConfig === undefined) + if (!this.processors.exists(processor)) { - this.emitZone = null; - } - else - { - // Where source = Geom like Circle, or a Path or Curve - // emitZone: { type: 'random', source: X } - // emitZone: { type: 'edge', source: X, quantity: 32, [stepRate=0], [yoyo=false], [seamless=true] } - - var type = GetFastValue(zoneConfig, 'type', 'random'); - var source = GetFastValue(zoneConfig, 'source', null); - - switch (type) + if (processor.emitter) { - case 'random': - - this.emitZone = new RandomZone(source); - - break; - - case 'edge': - - var quantity = GetFastValue(zoneConfig, 'quantity', 1); - var stepRate = GetFastValue(zoneConfig, 'stepRate', 0); - var yoyo = GetFastValue(zoneConfig, 'yoyo', false); - var seamless = GetFastValue(zoneConfig, 'seamless', true); + processor.emitter.removeParticleProcessor(processor); + } - this.emitZone = new EdgeZone(source, quantity, stepRate, yoyo, seamless); + this.processors.add(processor); - break; - } + processor.emitter = this; } - return this; + return processor; }, /** - * Sets or removes the {@link Phaser.GameObjects.Particles.ParticleEmitter#deathZone}. + * Removes a Particle Processor from this Emitter. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#setDeathZone - * @since 3.0.0 + * The Processor must belong to this Emitter to be removed. * - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterDeathZoneConfig} [zoneConfig] - An object describing the zone, or `undefined` to remove any current death zone. + * It is not destroyed when removed, allowing you to move it to another Emitter Manager, + * so if you no longer require it you should call its `destroy` method directly. * - * @return {this} This Particle Emitter. + * @method Phaser.GameObjects.Particles.ParticleEmitter#removeParticleProcessor + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.ParticleProcessor} processor - The Particle Processor to remove from this Emitter Manager. + * + * @return {?Phaser.GameObjects.Particles.ParticleProcessor} The Particle Processor that was removed, or null if it could not be found. */ - setDeathZone: function (zoneConfig) + removeParticleProcessor: function (processor) { - if (zoneConfig === undefined) - { - this.deathZone = null; - } - else + if (this.processors.exists(processor)) { - // Where source = Geom like Circle or Rect that supports a 'contains' function - // deathZone: { type: 'onEnter', source: X } - // deathZone: { type: 'onLeave', source: X } - - var type = GetFastValue(zoneConfig, 'type', 'onEnter'); - var source = GetFastValue(zoneConfig, 'source', null); - - if (source && typeof source.contains === 'function') - { - var killOnEnter = (type === 'onEnter') ? true : false; + this.processors.remove(processor, true); - this.deathZone = new DeathZone(source, killOnEnter); - } + processor.emitter = null; } - return this; + return processor; + }, + + /** + * Creates a new Gravity Well, adds it to this Emitter and returns a reference to it. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#createGravityWell + * @since 3.60.0 + * + * @param {Phaser.Types.GameObjects.Particles.GravityWellConfig} config - Configuration settings for the Gravity Well to create. + * + * @return {Phaser.GameObjects.Particles.GravityWell} The Gravity Well that was created. + */ + createGravityWell: function (config) + { + return this.addParticleProcessor(new GravityWell(config)); }, /** * Creates inactive particles and adds them to this emitter's pool. * + * If `ParticleEmitter.maxParticles` is set it will limit the + * value passed to this method to make sure it's not exceeded. + * * @method Phaser.GameObjects.Particles.ParticleEmitter#reserve * @since 3.0.0 * - * @param {number} particleCount - The number of particles to create. + * @param {number} count - The number of particles to create. * * @return {this} This Particle Emitter. */ - reserve: function (particleCount) + reserve: function (count) { var dead = this.dead; - for (var i = 0; i < particleCount; i++) + if (this.maxParticles > 0) + { + var total = this.getParticleCount(); + + if (total + count > this.maxParticles) + { + count = this.maxParticles - (total + count); + } + } + + for (var i = 0; i < count; i++) { dead.push(new this.particleClass(this)); } @@ -59938,7 +61370,9 @@ var ParticleEmitter = new Class({ }, /** - * Deactivates every particle in this emitter. + * Deactivates every particle in this emitter immediately. + * + * This particles are killed but do not emit an event or callback. * * @method Phaser.GameObjects.Particles.ParticleEmitter#killAll * @since 3.0.0 @@ -59959,13 +61393,14 @@ var ParticleEmitter = new Class({ }, /** - * Calls a function for each active particle in this emitter. + * Calls a function for each active particle in this emitter. The function is + * sent two parameters: a reference to the Particle instance and to this Emitter. * * @method Phaser.GameObjects.Particles.ParticleEmitter#forEachAlive * @since 3.0.0 * * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function. - * @param {*} context - The function's calling context. + * @param {*} context - The functions calling context. * * @return {this} This Particle Emitter. */ @@ -59974,10 +61409,10 @@ var ParticleEmitter = new Class({ var alive = this.alive; var length = alive.length; - for (var index = 0; index < length; ++index) + for (var i = 0; i < length; i++) { // Sends the Particle and the Emitter - callback.call(context, alive[index], this); + callback.call(context, alive[i], this); } return this; @@ -59990,7 +61425,7 @@ var ParticleEmitter = new Class({ * @since 3.0.0 * * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function. - * @param {*} context - The function's calling context. + * @param {*} context - The functions calling context. * * @return {this} This Particle Emitter. */ @@ -59999,10 +61434,9 @@ var ParticleEmitter = new Class({ var dead = this.dead; var length = dead.length; - for (var index = 0; index < length; ++index) + for (var i = 0; i < length; i++) { - // Sends the Particle and the Emitter - callback.call(context, dead[index], this); + callback.call(context, dead[i], this); } return this; @@ -60016,31 +61450,74 @@ var ParticleEmitter = new Class({ * If this emitter is in explode mode (frequency = -1), nothing will happen. * Use {@link Phaser.GameObjects.Particles.ParticleEmitter#explode} or {@link Phaser.GameObjects.Particles.ParticleEmitter#flow} instead. * + * Calling this method will emit the `START` event. + * * @method Phaser.GameObjects.Particles.ParticleEmitter#start + * @fires Phaser.GameObjects.Particles.Events#START * @since 3.0.0 * + * @param {number} [advance=0] - Advance this number of ms in time through the emitter. + * @param {number} [duration=0] - Limit this emitter to only emit particles for the given number of ms. Setting this parameter will override any duration already set in the Emitter configuration object. + * * @return {this} This Particle Emitter. */ - start: function () + start: function (advance, duration) { - this.on = true; + if (advance === undefined) { advance = 0; } + + if (!this.emitting) + { + if (advance > 0) + { + this.fastForward(advance); + } + + this.emitting = true; - this._counter = 0; + this.resetCounters(this.frequency, true); + + if (duration !== undefined) + { + this.duration = Math.abs(duration); + } + + this.emit(Events.START, this); + } return this; }, /** - * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#on off} the emitter. + * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#emitting off} the emitter and + * stops it from emitting further particles. Currently alive particles will remain + * active until they naturally expire unless you set the `kill` parameter to `true`. + * + * Calling this method will emit the `STOP` event. When the final particle has + * expired the `COMPLETE` event will be emitted. * * @method Phaser.GameObjects.Particles.ParticleEmitter#stop + * @fires Phaser.GameObjects.Particles.Events#STOP * @since 3.11.0 * + * @param {boolean} [kill=false] - Kill all particles immediately (true), or leave them to die after their lifespan expires? (false, the default) + * * @return {this} This Particle Emitter. */ - stop: function () + stop: function (kill) { - this.on = false; + if (kill === undefined) { kill = false; } + + if (this.emitting) + { + this.emitting = false; + + if (kill) + { + this.killAll(); + } + + this.emit(Events.STOP, this); + } return this; }, @@ -60076,16 +61553,72 @@ var ParticleEmitter = new Class({ }, /** - * Removes the emitter from its manager and the scene. + * Set the property by which active particles are sorted prior to be rendered. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#remove - * @since 3.22.0 + * It allows you to control the rendering order of the particles. + * + * This can be any valid property of the `Particle` class, such as `y`, `alpha` + * or `lifeT`. + * + * The 'alive' particles array is sorted in place each game frame. Setting a + * sort property will override the `particleBringToTop` setting. + * + * If you wish to use your own sorting function, see `setSortCallback` instead. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setSortProperty + * @since 3.60.0 + * + * @param {string} [property] - The property on the `Particle` class to sort by. + * @param {boolean} [ascending=true] - Should the particles be sorted in ascending or descending order? * * @return {this} This Particle Emitter. */ - remove: function () + setSortProperty: function (property, ascending) + { + if (property === undefined) { property = ''; } + if (ascending === undefined) { ascending = this.true; } + + this.sortProperty = property; + this.sortOrderAsc = ascending; + this.sortCallback = this.depthSortCallback; + + return this; + }, + + /** + * Sets a callback to be used to sort the particles before rendering each frame. + * + * This allows you to define your own logic and behavior in the callback. + * + * The callback will be sent two parameters: the two Particles being compared, + * and must adhere to the criteria of the `compareFn` in `Array.sort`: + * + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description + * + * Call this method with no parameters to reset the sort callback. + * + * Setting your own callback will override both the `particleBringToTop` and + * `sortProperty` settings of this Emitter. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#setSortCallback + * @since 3.60.0 + * + * @param {Phaser.Types.GameObjects.Particles.ParticleSortCallback} [callback] - The callback to invoke when the particles are sorted. Leave undefined to reset to the default. + * + * @return {this} This Particle Emitter. + */ + setSortCallback: function (callback) { - this.manager.removeEmitter(this); + if (this.sortProperty !== '') + { + callback = this.depthSortCallback; + } + else + { + callback = null; + } + + this.sortCallback = callback; return this; }, @@ -60100,31 +61633,64 @@ var ParticleEmitter = new Class({ */ depthSort: function () { - StableSort(this.alive, this.depthSortCallback); + StableSort(this.alive, this.sortCallback.bind(this)); return this; }, + /** + * Calculates the difference of two particles, for sorting them by depth. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#depthSortCallback + * @since 3.0.0 + * + * @param {object} a - The first particle. + * @param {object} b - The second particle. + * + * @return {number} The difference of a and b's y coordinates. + */ + depthSortCallback: function (a, b) + { + var key = this.sortProperty; + + if (this.sortOrderAsc) + { + return a[key] - b[key]; + } + else + { + return b[key] - a[key]; + } + }, + /** * Puts the emitter in flow mode (frequency >= 0) and starts (or restarts) a particle flow. * * To resume a flow at the current frequency and quantity, use {@link Phaser.GameObjects.Particles.ParticleEmitter#start} instead. * * @method Phaser.GameObjects.Particles.ParticleEmitter#flow + * @fires Phaser.GameObjects.Particles.Events#START * @since 3.0.0 * * @param {number} frequency - The time interval (>= 0) of each flow cycle, in ms. * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} [count=1] - The number of particles to emit at each flow cycle. + * @param {number} [stopAfter] - Stop this emitter from firing any more particles once this value is reached. Set to zero for unlimited. Setting this parameter will override any `stopAfter` value already set in the Emitter configuration object. * * @return {this} This Particle Emitter. */ - flow: function (frequency, count) + flow: function (frequency, count, stopAfter) { if (count === undefined) { count = 1; } + this.emitting = false; + this.frequency = frequency; + this.quantity = count; - this.quantity.onChange(count); + if (stopAfter !== undefined) + { + this.stopAfter = stopAfter; + } return this.start(); }, @@ -60133,6 +61699,7 @@ var ParticleEmitter = new Class({ * Puts the emitter in explode mode (frequency = -1), stopping any current particle flow, and emits several particles all at once. * * @method Phaser.GameObjects.Particles.ParticleEmitter#explode + * @fires Phaser.GameObjects.Particles.Events#EXPLODE * @since 3.0.0 * * @param {number} [count=this.quantity] - The number of Particles to emit. @@ -60145,11 +61712,18 @@ var ParticleEmitter = new Class({ { this.frequency = -1; - return this.emitParticle(count, x, y); + this.resetCounters(-1, true); + + var particle = this.emitParticle(count, x, y); + + this.emit(Events.EXPLODE, this, particle); + + return particle; }, /** - * Emits particles at a given position (or the emitter's current position). + * Emits particles at the given position. If no position is given, it will + * emit from this Emitters current location. * * @method Phaser.GameObjects.Particles.ParticleEmitter#emitParticleAt * @since 3.0.0 @@ -60166,7 +61740,7 @@ var ParticleEmitter = new Class({ }, /** - * Emits particles at a given position (or the emitter's current position). + * Emits particles at a given position (or the emitters current position). * * @method Phaser.GameObjects.Particles.ParticleEmitter#emitParticle * @since 3.0.0 @@ -60188,10 +61762,11 @@ var ParticleEmitter = new Class({ if (count === undefined) { - count = this.quantity.onEmit(); + count = this.ops.quantity.onEmit(); } var dead = this.dead; + var stopAfter = this.stopAfter; var followX = (this.follow) ? this.follow.x + this.followOffset.x : x; var followY = (this.follow) ? this.follow.y + this.followOffset.y : y; @@ -60205,20 +61780,35 @@ var ParticleEmitter = new Class({ particle = new this.particleClass(this); } - particle.fire(followX, followY); - - if (this.particleBringToTop) + if (particle.fire(followX, followY)) { - this.alive.push(particle); + if (this.particleBringToTop) + { + this.alive.push(particle); + } + else + { + this.alive.unshift(particle); + } + + if (this.emitCallback) + { + this.emitCallback.call(this.emitCallbackScope, particle, this); + } } else { - this.alive.unshift(particle); + this.dead.push(particle); } - if (this.emitCallback) + if (stopAfter > 0) { - this.emitCallback.call(this.emitCallbackScope, particle, this); + this.stopCounter++; + + if (this.stopCounter >= stopAfter) + { + break; + } } if (this.atLimit()) @@ -60230,10 +61820,52 @@ var ParticleEmitter = new Class({ return particle; }, + /** + * Fast forwards this Particle Emitter and all of its particles. + * + * Works by running the Emitter `preUpdate` handler in a loop until the `time` + * has been reached at `delta` steps per loop. + * + * All callbacks and emitter related events that would normally be fired + * will still be invoked. + * + * You can make an emitter 'fast forward' via the emitter config using the + * `advance` property. Set this value to the number of ms you wish the + * emitter to be fast-forwarded by. Or, call this method post-creation. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#fastForward + * @since 3.60.0 + * + * @param {number} time - The number of ms to advance the Particle Emitter by. + * @param {number} [delta] - The amount of delta to use for each step. Defaults to 1000 / 60. + * + * @return {this} This Particle Emitter. + */ + fastForward: function (time, delta) + { + if (delta === undefined) { delta = 1000 / 60; } + + var total = 0; + + this.skipping = true; + + while (total < Math.abs(time)) + { + this.preUpdate(0, delta); + + total += delta; + } + + this.skipping = false; + + return this; + }, + /** * Updates this emitter and its particles. * * @method Phaser.GameObjects.Particles.ParticleEmitter#preUpdate + * @fires Phaser.GameObjects.Particles.Events#COMPLETE * @since 3.0.0 * * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. @@ -60251,8 +61883,13 @@ var ParticleEmitter = new Class({ this.visible = this.follow.visible; } + if (this.deathZones.length > 0) + { + this.worldMatrix = this.getWorldTransformMatrix(); + } + // Any particle processors? - var processors = this.manager.getProcessors(); + var processors = this.getProcessors(); var particles = this.alive; var dead = this.dead; @@ -60296,12 +61933,19 @@ var ParticleEmitter = new Class({ deathCallback.call(deathCallbackScope, entry.particle); } - entry.particle.resetPosition(); + entry.particle.setPosition(); } } - if (!this.on) + if (!this.emitting && !this.skipping) { + if (this.completeFlag === 1 && particles.length === 0) + { + this.completeFlag = 0; + + this.emit(Events.COMPLETE, this); + } + return; } @@ -60311,558 +61955,1090 @@ var ParticleEmitter = new Class({ } else if (this.frequency > 0) { - this._counter -= delta; + this.flowCounter -= delta; - while (this._counter <= 0) + while (this.flowCounter <= 0) { + // Emits the 'quantity' number of particles this.emitParticle(); - // counter = frequency - remained from previous delta - this._counter += this.frequency; + // counter = frequency - remainder from previous delta + this.flowCounter += this.frequency; + } + } + + // Duration or stopAfter set? + if (!this.skipping) + { + if (this.duration > 0) + { + // elapsed + this.elapsed += delta; + + if (this.elapsed >= this.duration) + { + this.stop(); + } + } + + if (this.stopAfter > 0 && this.stopCounter >= this.stopAfter) + { + this.stop(); } } }, /** - * Calculates the difference of two particles, for sorting them by depth. + * Takes either a Rectangle Geometry object or an Arcade Physics Body and tests + * to see if it intersects with any currently alive Particle in this Emitter. * - * @method Phaser.GameObjects.Particles.ParticleEmitter#depthSortCallback - * @since 3.0.0 + * Overlapping particles are returned in an array, where you can perform further + * processing on them. If nothing overlaps then the array will be empty. * - * @param {object} a - The first particle. - * @param {object} b - The second particle. + * @method Phaser.GameObjects.Particles.ParticleEmitter#overlap + * @since 3.60.0 * - * @return {number} The difference of a and b's y coordinates. + * @param {(Phaser.Geom.Rectangle|Phaser.Physics.Arcade.Body)} target - A Rectangle or Arcade Physics Body to check for intersection against all alive particles. + * + * @return {Phaser.GameObjects.Particles.Particle[]} An array of Particles that overlap with the given target. */ - depthSortCallback: function (a, b) + overlap: function (target) { - return a.y - b.y; - } + var matrix = this.getWorldTransformMatrix(); -}); + var alive = this.alive; + var length = alive.length; -module.exports = ParticleEmitter; + var output = []; + for (var i = 0; i < length; i++) + { + var particle = alive[i]; -/***/ }), + if (RectangleToRectangle(target, particle.getBounds(matrix))) + { + output.push(particle); + } + } -/***/ 84622: -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + return output; + }, -/** - * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ + /** + * Returns a bounds Rectangle calculated from the bounds of all currently + * _active_ Particles in this Emitter. If this Emitter has only just been + * created and not yet rendered, then calling this method will return a Rectangle + * with a max safe integer for dimensions. Use the `advance` parameter to + * avoid this. + * + * Typically it takes a few seconds for a flow Emitter to 'warm up'. You can + * use the `advance` and `delta` parameters to force the Emitter to + * 'fast forward' in time to try and allow the bounds to be more accurate, + * as it will calculate the bounds based on the particle bounds across all + * timesteps, giving a better result. + * + * You can also use the `padding` parameter to increase the size of the + * bounds. Emitters with a lot of randomness in terms of direction or lifespan + * can often return a bounds smaller than their possible maximum. By using + * the `padding` (and `advance` if needed) you can help limit this. + * + * @method Phaser.GameObjects.Particles.ParticleEmitter#getBounds + * @since 3.60.0 + * + * @param {number} [padding] - The amount of padding, in pixels, to add to the bounds Rectangle. + * @param {number} [advance] - The number of ms to advance the Particle Emitter by. Defaults to 0, i.e. not used. + * @param {number} [delta] - The amount of delta to use for each step. Defaults to 1000 / 60. + * @param {Phaser.Geom.Rectangle} [output] - The Rectangle to store the results in. If not given a new one will be created. + * + * @return {Phaser.Geom.Rectangle} A Rectangle containing the calculated bounds of this Emitter. + */ + getBounds: function (padding, advance, delta, output) + { + if (padding === undefined) { padding = 0; } + if (advance === undefined) { advance = 0; } + if (delta === undefined) { delta = 1000 / 60; } + if (output === undefined) { output = new Rectangle(); } -var Class = __webpack_require__(56694); -var Components = __webpack_require__(64937); -var GameObject = __webpack_require__(89980); -var GravityWell = __webpack_require__(87811); -var List = __webpack_require__(71207); -var ParticleEmitter = __webpack_require__(9216); -var Render = __webpack_require__(72745); + var matrix = this.getWorldTransformMatrix(); -/** - * @classdesc - * A Particle Emitter Manager creates and controls {@link Phaser.GameObjects.Particles.ParticleEmitter Particle Emitters} and {@link Phaser.GameObjects.Particles.GravityWell Gravity Wells}. - * - * @class ParticleEmitterManager - * @extends Phaser.GameObjects.GameObject - * @memberof Phaser.GameObjects.Particles - * @constructor - * @since 3.0.0 - * - * @extends Phaser.GameObjects.Components.Depth - * @extends Phaser.GameObjects.Components.Mask - * @extends Phaser.GameObjects.Components.Pipeline - * @extends Phaser.GameObjects.Components.Transform - * @extends Phaser.GameObjects.Components.Visible - * - * @param {Phaser.Scene} scene - The Scene to which this Emitter Manager belongs. - * @param {string} texture - The key of the Texture this Emitter Manager will use to render particles, as stored in the Texture Manager. - * @param {(string|number)} [frame] - An optional frame from the Texture this Emitter Manager will use to render particles. - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterConfig[]} [emitters] - Configuration settings for one or more emitters to create. - */ -var ParticleEmitterManager = new Class({ + var i; + var bounds; + var alive = this.alive; + var setFirst = false; - Extends: GameObject, + output.setTo(0, 0, 0, 0); - Mixins: [ - Components.Depth, - Components.Mask, - Components.Pipeline, - Components.Transform, - Components.Visible, - Render - ], + if (advance > 0) + { + var total = 0; - initialize: + this.skipping = true; - // frame is optional and can contain the emitters array or object if skipped - function ParticleEmitterManager (scene, texture, frame, emitters) - { - GameObject.call(this, scene, 'ParticleEmitterManager'); + while (total < Math.abs(advance)) + { + this.preUpdate(0, delta); - /** - * The blend mode applied to all emitters and particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitterManager#blendMode - * @type {number} - * @default -1 - * @private - * @since 3.0.0 - */ - this.blendMode = -1; + for (i = 0; i < alive.length; i++) + { + bounds = alive[i].getBounds(matrix); - /** - * The time scale applied to all emitters and particles, affecting flow rate, lifespan, and movement. - * Values larger than 1 are faster than normal. - * This is multiplied with any timeScale set on each individual emitter. - * - * @name Phaser.GameObjects.Particles.ParticleEmitterManager#timeScale - * @type {number} - * @default 1 - * @since 3.0.0 - */ - this.timeScale = 1; + if (!setFirst) + { + setFirst = true; - /** - * The texture used to render this Emitter Manager's particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitterManager#texture - * @type {Phaser.Textures.Texture} - * @default null - * @since 3.0.0 - */ - this.texture = null; + CopyFrom(bounds, output); + } + else + { + MergeRect(output, bounds); + } + } - /** - * The texture frame used to render this Emitter Manager's particles. - * - * @name Phaser.GameObjects.Particles.ParticleEmitterManager#frame - * @type {Phaser.Textures.Frame} - * @default null - * @since 3.0.0 - */ - this.frame = null; + total += delta; + } - /** - * Names of this Emitter Manager's texture frames. - * - * @name Phaser.GameObjects.Particles.ParticleEmitterManager#frameNames - * @type {string[]} - * @since 3.0.0 - */ - this.frameNames = []; + this.skipping = false; + } + else + { + for (i = 0; i < alive.length; i++) + { + bounds = alive[i].getBounds(matrix); + + if (!setFirst) + { + setFirst = true; + + CopyFrom(bounds, output); + } + else + { + MergeRect(output, bounds); + } + } + } - // frame is optional and can contain the emitters array or object if skipped - if (frame !== null && (typeof frame === 'object' || Array.isArray(frame))) + if (padding > 0) { - emitters = frame; - frame = null; + Inflate(output, padding, padding); } - this.setTexture(texture, frame); + return output; + }, - this.initPipeline(); + /** + * The x coordinate the particles are emitted from. + * + * This is relative to the Emitters x coordinate and that of any parent. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleX + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + particleX: { - /** - * A list of Emitters being managed by this Emitter Manager. - * - * @name Phaser.GameObjects.Particles.ParticleEmitterManager#emitters - * @type {Phaser.Structs.List.} - * @since 3.0.0 - */ - this.emitters = new List(this); + get: function () + { + return this.ops.x.current; + }, - /** - * A list of Gravity Wells being managed by this Emitter Manager. - * - * @name Phaser.GameObjects.Particles.ParticleEmitterManager#wells - * @type {Phaser.Structs.List.} - * @since 3.0.0 - */ - this.wells = new List(this); + set: function (value) + { + this.ops.x.onChange(value); + } + + }, + + /** + * The y coordinate the particles are emitted from. + * + * This is relative to the Emitters x coordinate and that of any parent. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleY + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + particleY: { - if (emitters) + get: function () { - // An array of emitter configs? - if (!Array.isArray(emitters)) - { - emitters = [ emitters ]; - } + return this.ops.y.current; + }, - for (var i = 0; i < emitters.length; i++) - { - this.createEmitter(emitters[i]); - } + set: function (value) + { + this.ops.y.onChange(value); } - }, - // Overrides Game Object method - addedToScene: function () - { - this.scene.sys.updateList.add(this); }, - // Overrides Game Object method - removedFromScene: function () - { - this.scene.sys.updateList.remove(this); + /** + * The horizontal acceleration applied to emitted particles, in pixels per second squared. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#accelerationX + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + accelerationX: { + + get: function () + { + return this.ops.accelerationX.current; + }, + + set: function (value) + { + this.ops.accelerationX.onChange(value); + } + }, /** - * Sets the texture and frame this Emitter Manager will use to render with. + * The vertical acceleration applied to emitted particles, in pixels per second squared. * - * Textures are referenced by their string-based keys, as stored in the Texture Manager. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setTexture - * @since 3.0.0 + * @name Phaser.GameObjects.Particles.ParticleEmitter#accelerationY + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + accelerationY: { + + get: function () + { + return this.ops.accelerationY.current; + }, + + set: function (value) + { + this.ops.accelerationY.onChange(value); + } + + }, + + /** + * The maximum horizontal velocity emitted particles can reach, in pixels per second squared. * - * @param {string} key - The key of the texture to be used, as stored in the Texture Manager. - * @param {(string|number)} [frame] - The name or index of the frame within the Texture. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @return {this} This Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityX + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + * @default 10000 */ - setTexture: function (key, frame) - { - this.texture = this.scene.sys.textures.get(key); + maxVelocityX: { + + get: function () + { + return this.ops.maxVelocityX.current; + }, + + set: function (value) + { + this.ops.maxVelocityX.onChange(value); + } - return this.setFrame(frame); }, /** - * Sets the frame this Emitter Manager will use to render with. + * The maximum vertical velocity emitted particles can reach, in pixels per second squared. * - * The Frame has to belong to the current Texture being used. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * It can be either a string or an index. + * @name Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityY + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + * @default 10000 + */ + maxVelocityY: { + + get: function () + { + return this.ops.maxVelocityY.current; + }, + + set: function (value) + { + this.ops.maxVelocityY.onChange(value); + } + + }, + + /** + * The initial speed of emitted particles, in pixels per second. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setFrame - * @since 3.0.0 + * If using this as a getter it will return the `speedX` value. * - * @param {(string|number)} [frame] - The name or index of the frame within the Texture. + * If using it as a setter it will update both `speedX` and `speedY` to the + * given value. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @return {this} This Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#speed + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 */ - setFrame: function (frame) - { - this.frame = this.texture.get(frame); - - var frames = this.texture.getFramesFromTextureSource(this.frame.sourceIndex); + speed: { - var names = []; + get: function () + { + return this.ops.speedX.current; + }, - frames.forEach(function (sourceFrame) + set: function (value) { - names.push(sourceFrame.name); - }); + this.ops.speedX.onChange(value); + this.ops.speedY.onChange(value); + } - this.frameNames = names; + }, - this.defaultFrame = this.frame; + /** + * The initial horizontal speed of emitted particles, in pixels per second. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#speedX + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + speedX: { + + get: function () + { + return this.ops.speedX.current; + }, + + set: function (value) + { + this.ops.speedX.onChange(value); + } - return this; }, /** - * Assigns texture frames to an emitter. + * The initial vertical speed of emitted particles, in pixels per second. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setEmitterFrames - * @since 3.0.0 + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#speedY + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + speedY: { + + get: function () + { + return this.ops.speedY.current; + }, + + set: function (value) + { + this.ops.speedY.onChange(value); + } + + }, + + /** + * The x coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true. * - * @param {(Phaser.Textures.Frame|Phaser.Textures.Frame[])} frames - The texture frames. - * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The particle emitter to modify. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @return {this} This Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#moveToX + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 */ - setEmitterFrames: function (frames, emitter) - { - if (!Array.isArray(frames)) + moveToX: { + + get: function () + { + return this.ops.moveToX.current; + }, + + set: function (value) { - frames = [ frames ]; + this.ops.moveToX.onChange(value); } - var out = emitter.frames; + }, - out.length = 0; + /** + * The y coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#moveToY + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + moveToY: { - for (var i = 0; i < frames.length; i++) + get: function () { - var frame = frames[i]; + return this.ops.moveToY.current; + }, - if (this.frameNames.indexOf(frame) !== -1) - { - out.push(this.texture.get(frame)); - } - else - { - console.warn('Texture "%s" has no frame "%s"', this.texture.key, frame); - } + set: function (value) + { + this.ops.moveToY.onChange(value); } - if (out.length > 0) + }, + + /** + * The amount of velocity particles will use when rebounding off the + * emitter bounds, if set. A value of 0 means no bounce. A value of 1 + * means a full rebound. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#bounce + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + bounce: { + + get: function () + { + return this.ops.bounce.current; + }, + + set: function (value) { - emitter.defaultFrame = out[0]; + this.ops.bounce.onChange(value); } - else + + }, + + /** + * The horizontal scale of emitted particles. + * + * This is relative to the Emitters scale and that of any parent. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleScaleX + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + particleScaleX: { + + get: function () { - console.warn('No texture frames were set'); + return this.ops.scaleX.current; + }, - emitter.defaultFrame = this.defaultFrame; + set: function (value) + { + this.ops.scaleX.onChange(value); } - return this; }, /** - * Adds an existing Particle Emitter to this Emitter Manager. + * The vertical scale of emitted particles. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#addEmitter - * @since 3.0.0 + * This is relative to the Emitters scale and that of any parent. * - * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Particle Emitter to add to this Emitter Manager. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} The Particle Emitter that was added to this Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleScaleY + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 */ - addEmitter: function (emitter) - { - return this.emitters.add(emitter); + particleScaleY: { + + get: function () + { + return this.ops.scaleY.current; + }, + + set: function (value) + { + this.ops.scaleY.onChange(value); + } + }, /** - * Creates a new Particle Emitter object, adds it to this Emitter Manager and returns a reference to it. + * A color tint value that is applied to the texture of the emitted + * particle. The value should be given in hex format, i.e. 0xff0000 + * for a red tint, and should not include the alpha channel. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#createEmitter - * @since 3.0.0 + * Tints are additive, meaning a tint value of white (0xffffff) will + * effectively reset the tint to nothing. + * + * Modify the `ParticleEmitter.tintFill` property to change between + * an additive and replacement tint mode. * - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Configuration settings for the Particle Emitter to create. + * When you define the color via the Emitter config you should give + * it as an array of color values. The Particle will then interpolate + * through these colors over the course of its lifespan. Setting this + * will override any `tint` value that may also be given. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} The Particle Emitter that was created. + * This is a WebGL only feature. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleColor + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 */ - createEmitter: function (config) - { - return this.addEmitter(new ParticleEmitter(this, config)); + particleColor: { + + get: function () + { + return this.ops.color.current; + }, + + set: function (value) + { + this.ops.color.onChange(value); + } + }, /** - * Removes a Particle Emitter from this Emitter Manager, if the Emitter belongs to this Manager. + * Controls the easing function used when you have created an + * Emitter that uses the `color` property to interpolate the + * tint of Particles over their lifetime. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#removeEmitter - * @since 3.22.0 + * Setting this has no effect if you haven't also applied a + * `particleColor` to this Emitter. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#colorEase + * @type {string} + * @since 3.60.0 + */ + colorEase: { + + get: function () + { + return this.ops.color.easeName; + }, + + set: function (value) + { + this.ops.color.setEase(value); + } + + }, + + /** + * A color tint value that is applied to the texture of the emitted + * particle. The value should be given in hex format, i.e. 0xff0000 + * for a red tint, and should not include the alpha channel. + * + * Tints are additive, meaning a tint value of white (0xffffff) will + * effectively reset the tint to nothing. + * + * Modify the `ParticleEmitter.tintFill` property to change between + * an additive and replacement tint mode. * - * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter + * The `tint` value will be overriden if a `color` array is provided. * - * @return {?Phaser.GameObjects.Particles.ParticleEmitter} The Particle Emitter if it was removed or null if it was not. + * This is a WebGL only feature. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleTint + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 */ - removeEmitter: function (emitter) - { - return this.emitters.remove(emitter, true); + particleTint: { + + get: function () + { + return this.ops.tint.current; + }, + + set: function (value) + { + this.ops.tint.onChange(value); + } + }, /** - * Adds an existing Gravity Well object to this Emitter Manager. + * The alpha value of the emitted particles. This is a value + * between 0 and 1. Particles with alpha zero are invisible + * and are therefore not rendered, but are still processed + * by the Emitter. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#addGravityWell - * @since 3.0.0 + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleAlpha + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + particleAlpha: { + + get: function () + { + return this.ops.alpha.current; + }, + + set: function (value) + { + this.ops.alpha.onChange(value); + } + + }, + + /** + * The lifespan of the emitted particles. This value is given + * in milliseconds and defaults to 1000ms (1 second). When a + * particle reaches this amount it is killed. * - * @param {Phaser.GameObjects.Particles.GravityWell} well - The Gravity Well to add to this Emitter Manager. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @return {Phaser.GameObjects.Particles.GravityWell} The Gravity Well that was added to this Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#lifespan + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 */ - addGravityWell: function (well) - { - return this.wells.add(well); + lifespan: { + + get: function () + { + return this.ops.lifespan.current; + }, + + set: function (value) + { + this.ops.lifespan.onChange(value); + } + }, /** - * Creates a new Gravity Well, adds it to this Emitter Manager and returns a reference to it. + * The angle at which the particles are emitted. The values are + * given in degrees. This allows you to control the direction + * of the emitter. If you wish instead to change the rotation + * of the particles themselves, see the `particleRotate` property. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#createGravityWell - * @since 3.0.0 + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @param {Phaser.Types.GameObjects.Particles.GravityWellConfig} config - Configuration settings for the Gravity Well to create. + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleAngle + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + particleAngle: { + + get: function () + { + return this.ops.angle.current; + }, + + set: function (value) + { + this.ops.angle.onChange(value); + } + + }, + + /** + * The rotation (or angle) of each particle when it is emitted. + * The value is given in degrees and uses a right-handed + * coordinate system, where 0 degrees points to the right, 90 degrees + * points down and -90 degrees points up. * - * @return {Phaser.GameObjects.Particles.GravityWell} The Gravity Well that was created. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#particleRotate + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 */ - createGravityWell: function (config) - { - return this.addGravityWell(new GravityWell(config)); + particleRotate: { + + get: function () + { + return this.ops.rotate.current; + }, + + set: function (value) + { + this.ops.rotate.onChange(value); + } + }, /** - * Emits particles from each active emitter. + * The number of particles that are emitted each time an emission + * occurs, i.e. from one 'explosion' or each frame in a 'flow' cycle. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#emitParticle - * @since 3.0.0 + * The default is 1. * - * @param {number} [count] - The number of particles to release from each emitter. The default is the emitter's own {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}. - * @param {number} [x] - The x-coordinate to to emit particles from. The default is the x-coordinate of the emitter's current location. - * @param {number} [y] - The y-coordinate to to emit particles from. The default is the y-coordinate of the emitter's current location. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @return {this} This Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#quantity + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrequency + * @see Phaser.GameObjects.Particles.ParticleEmitter#setQuantity + * @since 3.60.0 */ - emitParticle: function (count, x, y) - { - var emitters = this.emitters.list; + quantity: { - for (var i = 0; i < emitters.length; i++) + get: function () { - var emitter = emitters[i]; + return this.ops.quantity.current; + }, - if (emitter.active) - { - emitter.emitParticle(count, x, y); - } + set: function (value) + { + this.ops.quantity.onChange(value); } - return this; }, /** - * Emits particles from each active emitter. + * The number of milliseconds to wait after emission before + * the particles start updating. This allows you to emit particles + * that appear 'static' or still on-screen and then, after this value, + * begin to move. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#emitParticleAt - * @since 3.0.0 + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. * - * @param {number} [x] - The x-coordinate to to emit particles from. The default is the x-coordinate of the emitter's current location. - * @param {number} [y] - The y-coordinate to to emit particles from. The default is the y-coordinate of the emitter's current location. - * @param {number} [count] - The number of particles to release from each emitter. The default is the emitter's own {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}. + * @name Phaser.GameObjects.Particles.ParticleEmitter#delay + * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} + * @since 3.60.0 + */ + delay: { + + get: function () + { + return this.ops.delay.current; + }, + + set: function (value) + { + this.ops.delay.onChange(value); + } + + }, + + /** + * The internal flow counter. + * + * Treat this property as read-only. * - * @return {this} This Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#flowCounter + * @type {number} + * @since 3.60.0 */ - emitParticleAt: function (x, y, count) - { - return this.emitParticle(count, x, y); + flowCounter: { + + get: function () + { + return this.counters[0]; + }, + + set: function (value) + { + this.counters[0] = value; + } + + }, + + /** + * The internal frame counter. + * + * Treat this property as read-only. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#frameCounter + * @type {number} + * @since 3.60.0 + */ + frameCounter: { + + get: function () + { + return this.counters[1]; + }, + + set: function (value) + { + this.counters[1] = value; + } + }, /** - * Pauses this Emitter Manager. + * The internal animation counter. * - * This has the effect of pausing all emitters, and all particles of those emitters, currently under its control. + * Treat this property as read-only. * - * The particles will still render, but they will not have any of their logic updated. + * @name Phaser.GameObjects.Particles.ParticleEmitter#animCounter + * @type {number} + * @since 3.60.0 + */ + animCounter: { + + get: function () + { + return this.counters[2]; + }, + + set: function (value) + { + this.counters[2] = value; + } + + }, + + /** + * The internal elasped counter. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#pause - * @since 3.0.0 + * Treat this property as read-only. * - * @return {this} This Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#elapsed + * @type {number} + * @since 3.60.0 */ - pause: function () - { - this.active = false; + elapsed: { + + get: function () + { + return this.counters[3]; + }, + + set: function (value) + { + this.counters[3] = value; + } - return this; }, /** - * Resumes this Emitter Manager, should it have been previously paused. + * The internal stop counter. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#resume - * @since 3.0.0 + * Treat this property as read-only. * - * @return {this} This Emitter Manager. + * @name Phaser.GameObjects.Particles.ParticleEmitter#stopCounter + * @type {number} + * @since 3.60.0 */ - resume: function () - { - this.active = true; + stopCounter: { + + get: function () + { + return this.counters[4]; + }, + + set: function (value) + { + this.counters[4] = value; + } - return this; }, /** - * Gets all active particle processors (gravity wells). + * The internal complete flag. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#getProcessors - * @since 3.0.0 + * Treat this property as read-only. * - * @return {Phaser.GameObjects.Particles.GravityWell[]} - The active gravity wells. + * @name Phaser.GameObjects.Particles.ParticleEmitter#completeFlag + * @type {boolean} + * @since 3.60.0 */ - getProcessors: function () - { - return this.wells.getAll('active', true); + completeFlag: { + + get: function () + { + return this.counters[5]; + }, + + set: function (value) + { + this.counters[5] = value; + } + }, /** - * Updates all active emitters. + * The internal zone index. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#preUpdate - * @since 3.0.0 + * Treat this property as read-only. * - * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. - * @param {number} delta - The delta time, in ms, elapsed since the last frame. + * @name Phaser.GameObjects.Particles.ParticleEmitter#zoneIndex + * @type {number} + * @since 3.60.0 */ - preUpdate: function (time, delta) - { - // Scale the delta - delta *= this.timeScale; + zoneIndex: { - var emitters = this.emitters.list; + get: function () + { + return this.counters[6]; + }, - for (var i = 0; i < emitters.length; i++) + set: function (value) { - var emitter = emitters[i]; + this.counters[6] = value; + } - if (emitter.active) - { - emitter.preUpdate(time, delta); - } + }, + + /** + * The internal zone total. + * + * Treat this property as read-only. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#zoneTotal + * @type {number} + * @since 3.60.0 + */ + zoneTotal: { + + get: function () + { + return this.counters[7]; + }, + + set: function (value) + { + this.counters[7] = value; } + }, /** - * A NOOP method so you can pass an EmitterManager to a Container. - * Calling this method will do nothing. It is intentionally empty. + * The current frame index. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setAlpha - * @private - * @since 3.10.0 + * Treat this property as read-only. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#currentFrame + * @type {number} + * @since 3.60.0 */ - setAlpha: function () - { + currentFrame: { + + get: function () + { + return this.counters[8]; + }, + + set: function (value) + { + this.counters[8] = value; + } + }, /** - * A NOOP method so you can pass an EmitterManager to a Container. - * Calling this method will do nothing. It is intentionally empty. + * The current animation index. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setScrollFactor - * @private - * @since 3.10.0 + * Treat this property as read-only. + * + * @name Phaser.GameObjects.Particles.ParticleEmitter#currentAnim + * @type {number} + * @since 3.60.0 */ - setScrollFactor: function () - { + currentAnim: { + + get: function () + { + return this.counters[9]; + }, + + set: function (value) + { + this.counters[9] = value; + } + }, /** - * A NOOP method so you can pass an EmitterManager to a Container. - * Calling this method will do nothing. It is intentionally empty. + * Destroys this Particle Emitter and all Particles it owns. * - * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setBlendMode - * @private - * @since 3.15.0 + * @method Phaser.GameObjects.Particles.ParticleEmitter#preDestroy + * @since 3.60.0 */ - setBlendMode: function () + preDestroy: function () { + this.texture = null; + this.frames = null; + this.anims = null; + this.emitCallback = null; + this.emitCallbackScope = null; + this.deathCallback = null; + this.deathCallbackScope = null; + this.emitZones = null; + this.deathZones = null; + this.bounds = null; + this.follow = null; + this.counters = null; + + var i; + + var ops = this.ops; + + for (i = 0; i < configOpMap.length; i++) + { + var key = configOpMap[i]; + + ops[key].destroy(); + } + + for (i = 0; i < this.alive.length; i++) + { + this.alive[i].destroy(); + } + + for (i = 0; i < this.dead.length; i++) + { + this.dead[i].destroy(); + } + + this.ops = null; + this.alive = []; + this.dead = []; + this.worldMatrix.destroy(); } }); -module.exports = ParticleEmitterManager; +module.exports = ParticleEmitter; /***/ }), -/***/ 66545: +/***/ 10456: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var RectangleToRectangle = __webpack_require__(90205); var TransformMatrix = __webpack_require__(69360); var tempMatrix1 = new TransformMatrix(); @@ -60875,26 +63051,18 @@ var tempMatrix4 = new TransformMatrix(); * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera. * This method should not be called directly. It is a utility function of the Render module. * - * @method Phaser.GameObjects.Particles.EmitterManager#renderCanvas - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.Emitter#renderCanvas + * @since 3.60.0 * @private * * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. - * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - The Game Object being rendered in this call. + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Game Object being rendered in this call. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var ParticleManagerCanvasRenderer = function (renderer, emitterManager, camera, parentMatrix) +var ParticleEmitterCanvasRenderer = function (renderer, emitter, camera, parentMatrix) { - var emitters = emitterManager.emitters.list; - var emittersLength = emitters.length; - - if (emittersLength === 0) - { - return; - } - - var camMatrix = tempMatrix1.copyFrom(camera.matrix); + var camMatrix = tempMatrix1; var calcMatrix = tempMatrix2; var particleMatrix = tempMatrix3; var managerMatrix = tempMatrix4; @@ -60903,199 +63071,214 @@ var ParticleManagerCanvasRenderer = function (renderer, emitterManager, camera, { managerMatrix.loadIdentity(); managerMatrix.multiply(parentMatrix); - managerMatrix.translate(emitterManager.x, emitterManager.y); - managerMatrix.rotate(emitterManager.rotation); - managerMatrix.scale(emitterManager.scaleX, emitterManager.scaleY); + managerMatrix.translate(emitter.x, emitter.y); + managerMatrix.rotate(emitter.rotation); + managerMatrix.scale(emitter.scaleX, emitter.scaleY); } else { - managerMatrix.applyITRS(emitterManager.x, emitterManager.y, emitterManager.rotation, emitterManager.scaleX, emitterManager.scaleY); + managerMatrix.applyITRS(emitter.x, emitter.y, emitter.rotation, emitter.scaleX, emitter.scaleY); } var ctx = renderer.currentContext; var roundPixels = camera.roundPixels; + var camerAlpha = camera.alpha; + var emitterAlpha = emitter.alpha; + + var particles = emitter.alive; + var particleCount = particles.length; + var viewBounds = emitter.viewBounds; - for (var e = 0; e < emittersLength; e++) + if (!emitter.visible || particleCount === 0 || (viewBounds && !RectangleToRectangle(viewBounds, camera.worldView))) { - var emitter = emitters[e]; - var particles = emitter.alive; - var particleCount = particles.length; + return; + } - if (!emitter.visible || particleCount === 0) - { - continue; - } + if (emitter.sortCallback) + { + emitter.depthSort(); + } - camera.addToRenderList(emitter); + camera.addToRenderList(emitter); - var scrollFactorX = emitter.scrollFactorX; - var scrollFactorY = emitter.scrollFactorY; + var scrollFactorX = emitter.scrollFactorX; + var scrollFactorY = emitter.scrollFactorY; - ctx.save(); + ctx.save(); - ctx.globalCompositeOperation = renderer.blendModes[emitter.blendMode]; + ctx.globalCompositeOperation = renderer.blendModes[emitter.blendMode]; - for (var i = 0; i < particleCount; i++) - { - var particle = particles[i]; + for (var i = 0; i < particleCount; i++) + { + var particle = particles[i]; - var alpha = particle.alpha * camera.alpha; + var alpha = particle.alpha * emitterAlpha * camerAlpha; - if (alpha <= 0) - { - continue; - } + if (alpha <= 0 || particle.scaleX === 0 || particle.scaleY === 0) + { + continue; + } - particleMatrix.applyITRS(particle.x, particle.y, particle.rotation, particle.scaleX, particle.scaleY); + particleMatrix.applyITRS(particle.x, particle.y, particle.rotation, particle.scaleX, particle.scaleY); - camMatrix.copyFrom(camera.matrix); + camMatrix.copyFrom(camera.matrix); - camMatrix.multiplyWithOffset(managerMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY); + camMatrix.multiplyWithOffset(managerMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY); - // Undo the camera scroll - particleMatrix.e = particle.x; - particleMatrix.f = particle.y; + // Undo the camera scroll + particleMatrix.e = particle.x; + particleMatrix.f = particle.y; - // Multiply by the particle matrix, store result in calcMatrix - camMatrix.multiply(particleMatrix, calcMatrix); + // Multiply by the particle matrix, store result in calcMatrix + camMatrix.multiply(particleMatrix, calcMatrix); - var frame = particle.frame; - var cd = frame.canvasData; + var frame = particle.frame; + var cd = frame.canvasData; - if (cd.width > 0 && cd.height > 0) - { - var x = -(frame.halfWidth); - var y = -(frame.halfHeight); + if (cd.width > 0 && cd.height > 0) + { + var x = -(frame.halfWidth); + var y = -(frame.halfHeight); - ctx.globalAlpha = alpha; + ctx.globalAlpha = alpha; - ctx.save(); + ctx.save(); - calcMatrix.setToContext(ctx); + calcMatrix.setToContext(ctx); - if (roundPixels) - { - x = Math.round(x); - y = Math.round(y); - } + if (roundPixels) + { + x = Math.round(x); + y = Math.round(y); + } - ctx.imageSmoothingEnabled = !frame.source.scaleMode; + ctx.imageSmoothingEnabled = !frame.source.scaleMode; - ctx.drawImage(frame.source.image, cd.x, cd.y, cd.width, cd.height, x, y, cd.width, cd.height); + ctx.drawImage(frame.source.image, cd.x, cd.y, cd.width, cd.height, x, y, cd.width, cd.height); - ctx.restore(); - } + ctx.restore(); } - - ctx.restore(); } + + ctx.restore(); }; -module.exports = ParticleManagerCanvasRenderer; +module.exports = ParticleEmitterCanvasRenderer; /***/ }), -/***/ 38842: +/***/ 765: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var BuildGameObject = __webpack_require__(88933); var GameObjectCreator = __webpack_require__(99325); var GetAdvancedValue = __webpack_require__(20494); var GetFastValue = __webpack_require__(72632); -var ParticleEmitterManager = __webpack_require__(84622); +var ParticleEmitter = __webpack_require__(9216); /** - * Creates a new Particle Emitter Manager Game Object and returns it. + * Creates a new Particle Emitter Game Object and returns it. + * + * Prior to Phaser v3.60 this function would create a `ParticleEmitterManager`. These were removed + * in v3.60 and replaced with creating a `ParticleEmitter` instance directly. Please see the + * updated function parameters and class documentation for more details. * * Note: This method will only be available if the Particles Game Object has been built into Phaser. * * @method Phaser.GameObjects.GameObjectCreator#particles * @since 3.0.0 * - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterManagerConfig} config - The configuration object this Game Object will use to create itself. + * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCreatorConfig} config - The configuration object this Game Object will use to create itself. * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} The Game Object that was created. + * @return {Phaser.GameObjects.Particles.ParticleEmitter} The Game Object that was created. */ GameObjectCreator.register('particles', function (config, addToScene) { if (config === undefined) { config = {}; } var key = GetAdvancedValue(config, 'key', null); - var frame = GetAdvancedValue(config, 'frame', null); - var emitters = GetFastValue(config, 'emitters', null); + var emitterConfig = GetFastValue(config, 'config', null); - // frame is optional and can contain the emitters array or object if skipped - var manager = new ParticleEmitterManager(this.scene, key, frame, emitters); + var emitter = new ParticleEmitter(this.scene, 0, 0, key); if (addToScene !== undefined) { config.add = addToScene; } - var add = GetFastValue(config, 'add', false); + BuildGameObject(this.scene, emitter, config); - if (add) + if (emitterConfig) { - this.displayList.add(manager); - } - else - { - this.updateList.add(manager); + emitter.setConfig(emitterConfig); } - return manager; + return emitter; }); /***/ }), -/***/ 30439: +/***/ 81212: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GameObjectFactory = __webpack_require__(61286); -var ParticleEmitterManager = __webpack_require__(84622); +var ParticleEmitter = __webpack_require__(9216); /** - * Creates a new Particle Emitter Manager Game Object and adds it to the Scene. + * Creates a new Particle Emitter Game Object and adds it to the Scene. + * + * If you wish to configure the Emitter after creating it, use the `ParticleEmitter.setConfig` method. + * + * Prior to Phaser v3.60 this function would create a `ParticleEmitterManager`. These were removed + * in v3.60 and replaced with creating a `ParticleEmitter` instance directly. Please see the + * updated function parameters and class documentation for more details. * * Note: This method will only be available if the Particles Game Object has been built into Phaser. * * @method Phaser.GameObjects.GameObjectFactory#particles - * @since 3.0.0 + * @since 3.60.0 * - * @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param {(string|number|object)} [frame] - An optional frame from the Texture this Game Object is rendering with. - * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterConfig[]} [emitters] - Configuration settings for one or more emitters to create. + * @param {number} [x] - The horizontal position of this Game Object in the world. + * @param {number} [y] - The vertical position of this Game Object in the world. + * @param {(string|Phaser.Textures.Texture)} [texture] - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} [config] - Configuration settings for the Particle Emitter. * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} The Game Object that was created. + * @return {Phaser.GameObjects.Particles.ParticleEmitter} The Game Object that was created. */ -GameObjectFactory.register('particles', function (key, frame, emitters) +GameObjectFactory.register('particles', function (x, y, texture, config) { - return this.displayList.add(new ParticleEmitterManager(this.scene, key, frame, emitters)); + if (x !== undefined && typeof x === 'string') + { + console.warn('ParticleEmitterManager was removed in Phaser 3.60. See documentation for details'); + } + + return this.displayList.add(new ParticleEmitter(this.scene, x, y, texture, config)); }); /***/ }), -/***/ 72745: +/***/ 69116: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61105,12 +63288,12 @@ var renderCanvas = NOOP; if (true) { - renderWebGL = __webpack_require__(58971); + renderWebGL = __webpack_require__(10275); } if (true) { - renderCanvas = __webpack_require__(66545); + renderCanvas = __webpack_require__(10456); } module.exports = { @@ -61123,15 +63306,16 @@ module.exports = { /***/ }), -/***/ 58971: +/***/ 10275: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var RectangleToRectangle = __webpack_require__(90205); var TransformMatrix = __webpack_require__(69360); var Utils = __webpack_require__(75512); @@ -61145,26 +63329,18 @@ var tempMatrix4 = new TransformMatrix(); * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera. * This method should not be called directly. It is a utility function of the Render module. * - * @method Phaser.GameObjects.Particles.EmitterManager#renderWebGL - * @since 3.0.0 + * @method Phaser.GameObjects.Particles.Emitter#renderWebGL + * @since 3.60.0 * @private * * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer. - * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - The Game Object being rendered in this call. + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Game Object being rendered in this call. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested */ -var ParticleManagerWebGLRenderer = function (renderer, emitterManager, camera, parentMatrix) +var ParticleEmitterWebGLRenderer = function (renderer, emitter, camera, parentMatrix) { - var emitters = emitterManager.emitters.list; - var emittersLength = emitters.length; - - if (emittersLength === 0) - { - return; - } - - var pipeline = renderer.pipelines.set(emitterManager.pipeline); + var pipeline = renderer.pipelines.set(emitter.pipeline); var camMatrix = tempMatrix1; var calcMatrix = tempMatrix2; @@ -61175,108 +63351,394 @@ var ParticleManagerWebGLRenderer = function (renderer, emitterManager, camera, p { managerMatrix.loadIdentity(); managerMatrix.multiply(parentMatrix); - managerMatrix.translate(emitterManager.x, emitterManager.y); - managerMatrix.rotate(emitterManager.rotation); - managerMatrix.scale(emitterManager.scaleX, emitterManager.scaleY); + managerMatrix.translate(emitter.x, emitter.y); + managerMatrix.rotate(emitter.rotation); + managerMatrix.scale(emitter.scaleX, emitter.scaleY); } else { - managerMatrix.applyITRS(emitterManager.x, emitterManager.y, emitterManager.rotation, emitterManager.scaleX, emitterManager.scaleY); + managerMatrix.applyITRS(emitter.x, emitter.y, emitter.rotation, emitter.scaleX, emitter.scaleY); } var roundPixels = camera.roundPixels; - var texture = emitterManager.defaultFrame.glTexture; var getTint = Utils.getTintAppendFloatAlpha; + var camerAlpha = camera.alpha; + var emitterAlpha = emitter.alpha; + var texture = emitter.texture.glTexture; + + renderer.pipelines.preBatch(emitter); - var textureUnit = pipeline.setGameObject(emitterManager, emitterManager.defaultFrame); + var particles = emitter.alive; + var particleCount = particles.length; + var viewBounds = emitter.viewBounds; - renderer.pipelines.preBatch(emitterManager); + if (!emitter.visible || particleCount === 0 || (viewBounds && !RectangleToRectangle(viewBounds, camera.worldView))) + { + return; + } - for (var e = 0; e < emittersLength; e++) + if (emitter.sortCallback) { - var emitter = emitters[e]; - var particles = emitter.alive; - var particleCount = particles.length; + emitter.depthSort(); + } + + var textureUnit = pipeline.setGameObject(emitter, emitter.frame); + + camera.addToRenderList(emitter); + + var scrollFactorX = emitter.scrollFactorX; + var scrollFactorY = emitter.scrollFactorY; + + renderer.setBlendMode(emitter.blendMode); + + if (emitter.mask) + { + emitter.mask.preRenderWebGL(renderer, emitter, camera); + + renderer.pipelines.set(emitter.pipeline); + } + + var tintEffect = emitter.tintFill; + + for (var i = 0; i < particleCount; i++) + { + var particle = particles[i]; + + var alpha = particle.alpha * emitterAlpha * camerAlpha; - if (!emitter.visible || particleCount === 0) + if (alpha <= 0 || particle.scaleX === 0 || particle.scaleY === 0) { continue; } - camera.addToRenderList(emitter); + particleMatrix.applyITRS(particle.x, particle.y, particle.rotation, particle.scaleX, particle.scaleY); - var scrollFactorX = emitter.scrollFactorX; - var scrollFactorY = emitter.scrollFactorY; + camMatrix.copyFrom(camera.matrix); - renderer.setBlendMode(emitter.blendMode); + camMatrix.multiplyWithOffset(managerMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY); - if (emitter.mask) - { - emitter.mask.preRenderWebGL(renderer, emitter, camera); + // Undo the camera scroll + particleMatrix.e = particle.x; + particleMatrix.f = particle.y; - renderer.pipelines.set(emitterManager.pipeline); - } + // Multiply by the particle matrix, store result in calcMatrix + camMatrix.multiply(particleMatrix, calcMatrix); - var tintEffect = 0; + var frame = particle.frame; - for (var i = 0; i < particleCount; i++) - { - var particle = particles[i]; + var x = -frame.halfWidth; + var y = -frame.halfHeight; - var alpha = particle.alpha * camera.alpha; + var quad = calcMatrix.setQuad(x, y, x + frame.width, y + frame.height, roundPixels); - if (alpha <= 0) - { - continue; - } + var tint = getTint(particle.tint, alpha); - particleMatrix.applyITRS(particle.x, particle.y, particle.rotation, particle.scaleX, particle.scaleY); + pipeline.batchQuad(emitter, quad[0], quad[1], quad[2], quad[3], quad[4], quad[5], quad[6], quad[7], frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, tintEffect, texture, textureUnit); + } - camMatrix.copyFrom(camera.matrix); + if (emitter.mask) + { + emitter.mask.postRenderWebGL(renderer, camera); + } - camMatrix.multiplyWithOffset(managerMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY); + renderer.pipelines.postBatch(emitter); +}; - // Undo the camera scroll - particleMatrix.e = particle.x; - particleMatrix.f = particle.y; +module.exports = ParticleEmitterWebGLRenderer; - // Multiply by the particle matrix, store result in calcMatrix - camMatrix.multiply(particleMatrix, calcMatrix); - var frame = particle.frame; +/***/ }), - var x = -frame.halfWidth; - var y = -frame.halfHeight; - var xw = x + frame.width; - var yh = y + frame.height; +/***/ 30891: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - var tx0 = calcMatrix.getXRound(x, y, roundPixels); - var ty0 = calcMatrix.getYRound(x, y, roundPixels); +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ - var tx1 = calcMatrix.getXRound(x, yh, roundPixels); - var ty1 = calcMatrix.getYRound(x, yh, roundPixels); +var Class = __webpack_require__(56694); - var tx2 = calcMatrix.getXRound(xw, yh, roundPixels); - var ty2 = calcMatrix.getYRound(xw, yh, roundPixels); +/** + * @classdesc + * This class provides the structured required for all Particle Processors. + * + * You should extend it and add the functionality required for your processor, + * including tidying up any resources this may create in the `destroy` method. + * + * See the GravityWell for an example of a processor. + * + * @class ParticleProcessor + * @memberof Phaser.GameObjects.Particles + * @constructor + * @since 3.60.0 + * + * @param {number} [x=0] - The x coordinate of the Particle Processor, in world space. + * @param {number} [y=0] - The y coordinate of the Particle Processor, in world space. + * @param {boolean} [active=true] - The active state of this Particle Processor. + */ +var ParticleProcessor = new Class({ - var tx3 = calcMatrix.getXRound(xw, y, roundPixels); - var ty3 = calcMatrix.getYRound(xw, y, roundPixels); + initialize: - var tint = getTint(particle.tint, alpha); + function ParticleProcessor (x, y, active) + { + if (x === undefined) { x = 0; } + if (y === undefined) { y = 0; } + if (active === undefined) { active = true; } - pipeline.batchQuad(emitter, tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, tintEffect, texture, textureUnit); - } + /** + * A reference to the Particle Emitter that owns this Processor. + * This is set automatically when the Processor is added to an Emitter + * and nulled when removed or destroyed. + * + * @name Phaser.GameObjects.Particles.ParticleProcessor#manager + * @type {Phaser.GameObjects.Particles.ParticleEmitter} + * @since 3.60.0 + */ + this.emitter; - if (emitter.mask) - { - emitter.mask.postRenderWebGL(renderer, camera); - } + /** + * The x coordinate of the Particle Processor, in world space. + * + * @name Phaser.GameObjects.Particles.ParticleProcessor#x + * @type {number} + * @since 3.60.0 + */ + this.x = x; + + /** + * The y coordinate of the Particle Processor, in world space. + * + * @name Phaser.GameObjects.Particles.ParticleProcessor#y + * @type {number} + * @since 3.60.0 + */ + this.y = y; + + /** + * The active state of the Particle Processor. + * + * An inactive Particle Processor will be skipped for processing by + * its parent Emitter. + * + * @name Phaser.GameObjects.Particles.ParticleProcessor#active + * @type {boolean} + * @since 3.60.0 + */ + this.active = active; + }, + + /** + * The Particle Processor update method should be overriden by your own + * method and handle the processing of the particles, typically modifying + * their velocityX/Y values based on the criteria of this processor. + * + * @method Phaser.GameObjects.Particles.ParticleProcessor#update + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.Particle} particle - The Particle to update. + * @param {number} delta - The delta time in ms. + * @param {number} step - The delta value divided by 1000. + * @param {number} t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death). + */ + update: function () + { + }, + + /** + * Destroys this Particle Processor by removing all external references. + * + * This is called automatically when the owning Particle Emitter is destroyed. + * + * @method Phaser.GameObjects.Particles.ParticleProcessor#destroy + * @since 3.60.0 + */ + destroy: function () + { + this.emitter = null; } - renderer.pipelines.postBatch(emitterManager); -}; +}); + +module.exports = ParticleProcessor; + + +/***/ }), + +/***/ 76100: +/***/ ((module) => { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Particle Emitter Complete Event. + * + * This event is dispatched when the final particle, emitted from a Particle Emitter that + * has been stopped, dies. Upon receipt of this event you know that no particles are + * still rendering at this point in time. + * + * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('complete', listener)`. + * + * @event Phaser.GameObjects.Particles.Events#COMPLETE + * @type {string} + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - A reference to the Particle Emitter that just completed. + */ +module.exports = 'complete'; + + +/***/ }), + +/***/ 26677: +/***/ ((module) => { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Particle Emitter Death Zone Event. + * + * This event is dispatched when a Death Zone kills a Particle instance. + * + * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('deathzone', listener)`. + * + * If you wish to know when the final particle is killed, see the `COMPLETE` event. + * + * @event Phaser.GameObjects.Particles.Events#DEATH_ZONE + * @type {string} + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - A reference to the Particle Emitter that owns the Particle and Death Zone. + * @param {Phaser.GameObjects.Particles.Particle} particle - The Particle that has been killed. + * @param {Phaser.GameObjects.Particles.Zones.DeathZone} zone - The Death Zone that killed the particle. + */ +module.exports = 'deathzone'; + + +/***/ }), + +/***/ 62736: +/***/ ((module) => { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Particle Emitter Explode Event. + * + * This event is dispatched when a Particle Emitter explodes a set of particles. + * + * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('explode', listener)`. + * + * @event Phaser.GameObjects.Particles.Events#EXPLODE + * @type {string} + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - A reference to the Particle Emitter that just completed. + * @param {Phaser.GameObjects.Particles.Particle} particle - The most recently emitted Particle. + */ +module.exports = 'explode'; + + +/***/ }), + +/***/ 56490: +/***/ ((module) => { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Particle Emitter Start Event. + * + * This event is dispatched when a Particle Emitter starts emission of particles. + * + * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('start', listener)`. + * + * @event Phaser.GameObjects.Particles.Events#START + * @type {string} + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - A reference to the Particle Emitter that just completed. + */ +module.exports = 'start'; + + +/***/ }), -module.exports = ParticleManagerWebGLRenderer; +/***/ 85715: +/***/ ((module) => { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Particle Emitter Stop Event. + * + * This event is dispatched when a Particle Emitter is stopped. This can happen either + * when you directly call the `ParticleEmitter.stop` method, or if the emitter has + * been configured to stop after a set time via the `duration` property, or after a + * set number of particles via the `stopAfter` property. + * + * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('stop', listener)`. + * + * Note that just because the emitter has stopped, that doesn't mean there aren't still + * particles alive and rendering. It just means the emitter has stopped emitting particles. + * + * If you wish to know when the final particle is killed, see the `COMPLETE` event. + * + * @event Phaser.GameObjects.Particles.Events#STOP + * @type {string} + * @since 3.60.0 + * + * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - A reference to the Particle Emitter that just completed. + */ +module.exports = 'stop'; + + +/***/ }), + +/***/ 40629: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +/** + * @author Richard Davey + * @copyright 2013-2023 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.GameObjects.Particles.Events + */ + +module.exports = { + + COMPLETE: __webpack_require__(76100), + DEATH_ZONE: __webpack_require__(26677), + EXPLODE: __webpack_require__(62736), + START: __webpack_require__(56490), + STOP: __webpack_require__(85715) + +}; /***/ }), @@ -61286,7 +63748,7 @@ module.exports = ParticleManagerWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61296,11 +63758,13 @@ module.exports = ParticleManagerWebGLRenderer; module.exports = { + EmitterColorOp: __webpack_require__(19737), EmitterOp: __webpack_require__(93025), + Events: __webpack_require__(40629), GravityWell: __webpack_require__(87811), Particle: __webpack_require__(14909), ParticleEmitter: __webpack_require__(9216), - ParticleEmitterManager: __webpack_require__(84622), + ParticleProcessor: __webpack_require__(30891), Zones: __webpack_require__(25962) }; @@ -61313,7 +63777,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61369,13 +63833,14 @@ var DeathZone = new Class({ * @method Phaser.GameObjects.Particles.Zones.DeathZone#willKill * @since 3.0.0 * - * @param {Phaser.GameObjects.Particles.Particle} particle - The Particle to be checked against this zone. + * @param {number} x - The x coordinate of the Particle to be checked against this zone. + * @param {number} y - The y coordinate of the Particle to be checked against this zone. * * @return {boolean} Return `true` if the Particle is to be killed, otherwise return `false`. */ - willKill: function (particle) + willKill: function (x, y) { - var withinZone = this.source.contains(particle.x, particle.y); + var withinZone = this.source.contains(x, y); return (withinZone && this.killOnEnter || !withinZone && !this.killOnEnter); } @@ -61392,7 +63857,7 @@ module.exports = DeathZone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61412,15 +63877,17 @@ var Class = __webpack_require__(56694); * @param {number} stepRate - The distance between each particle. When set, `quantity` is implied and should be set to 0. * @param {boolean} [yoyo=false] - Whether particles are placed from start to end and then end to start. * @param {boolean} [seamless=true] - Whether one endpoint will be removed if it's identical to the other. + * @param {number} [total=-1] - The total number of particles this zone will emit before passing over to the next emission zone in the Emitter. -1 means it will never pass over and you must use `setEmitZone` to change it. */ var EdgeZone = new Class({ initialize: - function EdgeZone (source, quantity, stepRate, yoyo, seamless) + function EdgeZone (source, quantity, stepRate, yoyo, seamless, total) { if (yoyo === undefined) { yoyo = false; } if (seamless === undefined) { seamless = true; } + if (total === undefined) { total = -1; } /** * An object instance with a `getPoints(quantity, stepRate)` method returning an array of points. @@ -61511,6 +63978,24 @@ var EdgeZone = new Class({ */ this._direction = 0; + /** + * The total number of particles this zone will emit before the Emitter + * transfers control over to the next zone in its emission zone list. + * + * By default this is -1, meaning it will never pass over from this + * zone to another one. You can call the `ParticleEmitter.setEmitZone` + * method to change it, or set this value to something else via the + * config, or directly at runtime. + * + * A value of 1 would mean the zones rotate in order, but it can + * be set to any integer value. + * + * @name Phaser.GameObjects.Particles.Zones.EdgeZone#total + * @type {number} + * @since 3.60.0 + */ + this.total = total; + this.updateSource(); }, @@ -61637,7 +64122,7 @@ module.exports = EdgeZone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61679,6 +64164,24 @@ var RandomZone = new Class({ * @since 3.0.0 */ this._tempVec = new Vector2(); + + /** + * The total number of particles this zone will emit before the Emitter + * transfers control over to the next zone in its emission zone list. + * + * By default this is -1, meaning it will never pass over from this + * zone to another one. You can call the `ParticleEmitter.setEmitZone` + * method to change it, or set this value to something else via the + * config, or directly at runtime. + * + * A value of 1 would mean the zones rotate in order, but it can + * be set to any integer value. + * + * @name Phaser.GameObjects.Particles.Zones.RandomZone#total + * @type {number} + * @since 3.60.0 + */ + this.total = -1; }, /** @@ -61711,7 +64214,7 @@ module.exports = RandomZone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61735,7 +64238,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61818,7 +64321,7 @@ module.exports = PathFollower; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -61867,7 +64370,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -62072,7 +64575,7 @@ module.exports = PointLight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -62123,7 +64626,7 @@ GameObjectCreator.register('pointlight', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -62184,7 +64687,7 @@ GameObjectFactory.register('pointlight', function (x, y, color, radius, intensit /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -62212,7 +64715,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -62281,7 +64784,7 @@ module.exports = PointLightWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63114,7 +65617,7 @@ module.exports = RenderTexture; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63178,7 +65681,7 @@ GameObjectCreator.register('renderTexture', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -63226,7 +65729,7 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64354,7 +66857,7 @@ module.exports = Rope; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64383,7 +66886,7 @@ module.exports = RopeCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64439,7 +66942,7 @@ GameObjectCreator.register('rope', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64482,7 +66985,7 @@ if (true) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64515,7 +67018,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -64632,7 +67135,7 @@ module.exports = RopeWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -65865,7 +68368,7 @@ module.exports = Shader; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -65894,7 +68397,7 @@ module.exports = ShaderCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -65948,7 +68451,7 @@ GameObjectCreator.register('shader', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -65990,7 +68493,7 @@ if (true) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66023,7 +68526,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66086,7 +68589,7 @@ module.exports = ShaderWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66149,7 +68652,7 @@ module.exports = FillPathWebGL; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66187,7 +68690,7 @@ module.exports = FillStyleCanvas; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66226,7 +68729,7 @@ module.exports = LineStyleCanvas; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66652,7 +69155,7 @@ module.exports = Shape; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -66726,7 +69229,7 @@ module.exports = StrokePathWebGL; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67136,7 +69639,7 @@ module.exports = Arc; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67214,7 +69717,7 @@ module.exports = ArcCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67288,7 +69791,7 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67321,7 +69824,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67383,7 +69886,7 @@ module.exports = ArcWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67566,7 +70069,7 @@ module.exports = Curve; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67656,7 +70159,7 @@ module.exports = CurveCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67707,7 +70210,7 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67740,7 +70243,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67802,7 +70305,7 @@ module.exports = CurveWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -67993,7 +70496,7 @@ module.exports = Ellipse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68080,7 +70583,7 @@ module.exports = EllipseCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68133,7 +70636,7 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor, /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68166,7 +70669,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68228,7 +70731,7 @@ module.exports = EllipseWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68508,7 +71011,7 @@ module.exports = Grid; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68699,7 +71202,7 @@ module.exports = GridCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68755,7 +71258,7 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68788,7 +71291,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -68990,7 +71493,7 @@ module.exports = GridWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69206,7 +71709,7 @@ module.exports = IsoBox; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69309,7 +71812,7 @@ module.exports = IsoBoxCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69361,7 +71864,7 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69394,7 +71897,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69531,7 +72034,7 @@ module.exports = IsoBoxWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69778,7 +72281,7 @@ module.exports = IsoTriangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69894,7 +72397,7 @@ module.exports = IsoTriangleCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69948,7 +72451,7 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -69981,7 +72484,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70138,7 +72641,7 @@ module.exports = IsoTriangleWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70306,7 +72809,7 @@ module.exports = Line; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70365,7 +72868,7 @@ module.exports = LineCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70417,7 +72920,7 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor, /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70450,7 +72953,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70528,7 +73031,7 @@ module.exports = LineWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70704,7 +73207,7 @@ module.exports = Polygon; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70794,7 +73297,7 @@ module.exports = PolygonCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70848,7 +73351,7 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70881,7 +73384,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -70943,7 +73446,7 @@ module.exports = PolygonWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71092,7 +73595,7 @@ module.exports = Rectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71168,7 +73671,7 @@ module.exports = RectangleCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71214,7 +73717,7 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71247,7 +73750,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71321,7 +73824,7 @@ module.exports = RectangleWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71610,7 +74113,7 @@ module.exports = Star; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71697,7 +74200,7 @@ module.exports = StarCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71750,7 +74253,7 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71783,7 +74286,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71845,7 +74348,7 @@ module.exports = StarWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -71989,7 +74492,7 @@ module.exports = Triangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72066,7 +74569,7 @@ module.exports = TriangleCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72118,7 +74621,7 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72151,7 +74654,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72236,7 +74739,7 @@ module.exports = TriangleWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72718,7 +75221,7 @@ module.exports = Sprite; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72753,7 +75256,7 @@ module.exports = SpriteCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72807,7 +75310,7 @@ GameObjectCreator.register('sprite', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72829,13 +75332,9 @@ var Sprite = __webpack_require__(13747); * * @return {Phaser.GameObjects.Sprite} The Game Object that was created. */ -GameObjectFactory.register('sprite', function (x, y, key, frame) +GameObjectFactory.register('sprite', function (x, y, texture, frame) { - var sprite = new Sprite(this.scene, x, y, key, frame); - - this.displayList.add(sprite); - - return sprite; + return this.displayList.add(new Sprite(this.scene, x, y, texture, frame)); }); // When registering a factory function 'this' refers to the GameObjectFactory context. @@ -72854,7 +75353,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72887,7 +75386,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -72922,7 +75421,7 @@ module.exports = SpriteWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -73005,7 +75504,7 @@ module.exports = GetTextSize; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -73024,7 +75523,7 @@ var CanvasPool = __webpack_require__(61068); var MeasureText = function (textStyle) { var canvas = CanvasPool.create(this); - var context = canvas.getContext('2d'); + var context = canvas.getContext('2d', { willReadFrequently: true }); textStyle.syncFont(canvas, context); @@ -73069,6 +75568,7 @@ var MeasureText = function (textStyle) }; var imagedata = context.getImageData(0, 0, width, height); + if (!imagedata) { output.ascent = baseline; @@ -73155,7 +75655,7 @@ module.exports = MeasureText; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -74616,7 +77116,7 @@ module.exports = Text; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -74656,7 +77156,7 @@ module.exports = TextCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -74744,7 +77244,7 @@ GameObjectCreator.register('text', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -74810,7 +77310,7 @@ GameObjectFactory.register('text', function (x, y, text, style) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -74843,7 +77343,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -75950,7 +78450,7 @@ module.exports = TextStyle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -76022,7 +78522,7 @@ module.exports = TextWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -76676,7 +79176,7 @@ module.exports = TileSprite; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -76713,7 +79213,7 @@ module.exports = TileSpriteCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -76766,7 +79266,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -76790,9 +79290,9 @@ var GameObjectFactory = __webpack_require__(61286); * * @return {Phaser.GameObjects.TileSprite} The Game Object that was created. */ -GameObjectFactory.register('tileSprite', function (x, y, width, height, key, frame) +GameObjectFactory.register('tileSprite', function (x, y, width, height, texture, frame) { - return this.displayList.add(new TileSprite(this.scene, x, y, width, height, key, frame)); + return this.displayList.add(new TileSprite(this.scene, x, y, width, height, texture, frame)); }); // When registering a factory function 'this' refers to the GameObjectFactory context. @@ -76811,7 +79311,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -76844,7 +79344,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -76920,7 +79420,7 @@ module.exports = TileSpriteWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -78837,7 +81337,7 @@ module.exports = Video; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -78875,7 +81375,7 @@ module.exports = VideoCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -78925,7 +81425,7 @@ GameObjectCreator.register('video', function (config, addToScene) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -78959,7 +81459,7 @@ GameObjectFactory.register('video', function (x, y, key) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -78992,7 +81492,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79030,7 +81530,7 @@ module.exports = VideoWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79352,7 +81852,7 @@ module.exports = Zone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79392,7 +81892,7 @@ GameObjectCreator.register('zone', function (config) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79435,7 +81935,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79464,7 +81964,7 @@ module.exports = Area; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79840,7 +82340,7 @@ module.exports = Circle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79869,7 +82369,7 @@ module.exports = Circumference; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79909,7 +82409,7 @@ module.exports = CircumferencePoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79940,7 +82440,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -79982,7 +82482,7 @@ module.exports = Contains; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80014,7 +82514,7 @@ module.exports = ContainsPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80051,7 +82551,7 @@ module.exports = ContainsRect; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80084,7 +82584,7 @@ module.exports = CopyFrom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80119,7 +82619,7 @@ module.exports = Equals; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80160,7 +82660,7 @@ module.exports = GetBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80204,7 +82704,7 @@ module.exports = GetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80257,7 +82757,7 @@ module.exports = GetPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80293,7 +82793,7 @@ module.exports = Offset; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80328,7 +82828,7 @@ module.exports = OffsetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80373,7 +82873,7 @@ module.exports = Random; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80405,7 +82905,7 @@ module.exports = Circle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80486,7 +82986,7 @@ module.exports = GEOM_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80521,7 +83021,7 @@ module.exports = Area; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80554,7 +83054,7 @@ module.exports = Circumference; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80597,7 +83097,7 @@ module.exports = CircumferencePoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80628,7 +83128,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80671,7 +83171,7 @@ module.exports = Contains; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80703,7 +83203,7 @@ module.exports = ContainsPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80740,7 +83240,7 @@ module.exports = ContainsRect; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -80773,7 +83273,7 @@ module.exports = CopyFrom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81156,7 +83656,7 @@ module.exports = Ellipse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81192,7 +83692,7 @@ module.exports = Equals; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81233,7 +83733,7 @@ module.exports = GetBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81277,7 +83777,7 @@ module.exports = GetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81332,7 +83832,7 @@ module.exports = GetPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81368,7 +83868,7 @@ module.exports = Offset; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81403,7 +83903,7 @@ module.exports = OffsetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81445,7 +83945,7 @@ module.exports = Random; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81477,7 +83977,7 @@ module.exports = Ellipse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81515,7 +84015,7 @@ module.exports = Geom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81547,7 +84047,7 @@ module.exports = CircleToCircle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81603,7 +84103,7 @@ module.exports = CircleToRectangle; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81698,7 +84198,7 @@ module.exports = GetCircleToCircle; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81749,7 +84249,7 @@ module.exports = GetCircleToRectangle; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81841,7 +84341,7 @@ module.exports = GetLineToCircle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -81886,13 +84386,15 @@ var GetLineToLine = function (line1, line2, isRay, out) var denom = (dx1 * dy2 - dy1 * dx2); + // Add co-linear check + // Make sure there is not a division by zero - this also indicates that the lines are parallel. // If numA and numB were both equal to zero the lines would be on top of each other (coincidental). // This check is not done because it is not necessary for this implementation (the parallel check accounts for this). if (denom === 0) { - return false; + return null; } var t; @@ -81948,7 +84450,7 @@ module.exports = GetLineToLine; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82028,7 +84530,7 @@ module.exports = GetLineToPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82102,7 +84604,7 @@ module.exports = GetLineToPolygon; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82162,7 +84664,7 @@ module.exports = GetLineToRectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82265,7 +84767,7 @@ module.exports = GetRaysFromPointToPolygon; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82316,7 +84818,7 @@ module.exports = GetRectangleIntersection; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82368,7 +84870,7 @@ module.exports = GetRectangleToRectangle; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82417,7 +84919,7 @@ module.exports = GetRectangleToTriangle; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82467,7 +84969,7 @@ module.exports = GetTriangleToCircle; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82527,7 +85029,7 @@ module.exports = GetTriangleToLine; /** * @author Florian Vazelle * @author Geoffrey Glaive - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82576,7 +85078,7 @@ module.exports = GetTriangleToTriangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82661,12 +85163,12 @@ module.exports = LineToCircle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ // This is based off an explanation and expanded math presented by Paul Bourke: -// See http:'local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/ +// See http://paulbourke.net/geometry/pointlineplane/ /** * Checks if two Lines intersect. If the Lines are identical, they will be treated as parallel and thus non-intersecting. @@ -82682,7 +85184,6 @@ module.exports = LineToCircle; */ var LineToLine = function (line1, line2, out) { - var x1 = line1.x1; var y1 = line1.y1; var x2 = line1.x2; @@ -82693,39 +85194,46 @@ var LineToLine = function (line1, line2, out) var x4 = line2.x2; var y4 = line2.y2; - var numA = (x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3); - var numB = (x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3); - var deNom = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1); + // Check that none of the lines are length zero + if ((x1 === x2 && y1 === y2) || (x3 === x4 && y3 === y4)) + { + return false; + } + + var denom = ((y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1)); // Make sure there is not a division by zero - this also indicates that the lines are parallel. // If numA and numB were both equal to zero the lines would be on top of each other (coincidental). // This check is not done because it is not necessary for this implementation (the parallel check accounts for this). - if (deNom === 0) + if (denom === 0) { + // Lines are parallel return false; } // Calculate the intermediate fractional point that the lines potentially intersect. - var uA = numA / deNom; - var uB = numB / deNom; + var ua = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denom; + var ub = ((x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3)) / denom; // The fractional point will be between 0 and 1 inclusive if the lines intersect. // If the fractional calculation is larger than 1 or smaller than 0 the lines would need to be longer to intersect. - if (uA >= 0 && uA <= 1 && uB >= 0 && uB <= 1) + if (ua < 0 || ua > 1 || ub < 0 || ub > 1) + { + return false; + } + else { if (out) { - out.x = x1 + (uA * (x2 - x1)); - out.y = y1 + (uA * (y2 - y1)); + out.x = x1 + ua * (x2 - x1); + out.y = y1 + ua * (y2 - y1); } return true; } - - return false; }; module.exports = LineToLine; @@ -82738,7 +85246,7 @@ module.exports = LineToLine; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82841,7 +85349,7 @@ module.exports = LineToRectangle; /** * @author Richard Davey * @author Florian Mertens - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82911,7 +85419,7 @@ module.exports = PointToLine; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82953,7 +85461,7 @@ module.exports = PointToLineSegment; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -82992,7 +85500,7 @@ module.exports = RectangleToRectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83086,7 +85594,7 @@ module.exports = RectangleToTriangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83127,7 +85635,7 @@ module.exports = RectangleToValues; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83193,7 +85701,7 @@ module.exports = TriangleToCircle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83249,7 +85757,7 @@ module.exports = TriangleToLine; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83340,7 +85848,7 @@ module.exports = TriangleToTriangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83388,7 +85896,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83417,7 +85925,7 @@ module.exports = Angle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83492,7 +86000,7 @@ module.exports = BresenhamPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83533,7 +86041,7 @@ module.exports = CenterOn; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83564,7 +86072,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83596,7 +86104,7 @@ module.exports = CopyFrom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83631,7 +86139,7 @@ module.exports = Equals; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83690,7 +86198,7 @@ module.exports = Extend; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83811,7 +86319,7 @@ module.exports = GetEasedPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83851,7 +86359,7 @@ module.exports = GetMidPoint; /** * @author Richard Davey * @author Florian Mertens - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83906,7 +86414,7 @@ module.exports = GetNearestPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83951,7 +86459,7 @@ module.exports = GetNormal; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -83991,7 +86499,7 @@ module.exports = GetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84058,7 +86566,7 @@ module.exports = GetPoints; /** * @author Richard Davey * @author Florian Mertens - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84068,12 +86576,10 @@ module.exports = GetPoints; * @function Phaser.Geom.Line.GetShortestDistance * @since 3.16.0 * - * @generic {Phaser.Geom.Point} O - [out,$return] - * * @param {Phaser.Geom.Line} line - The line to get the distance from. - * @param {(Phaser.Geom.Point|object)} point - The point to get the shortest distance to. + * @param {Phaser.Types.Math.Vector2Like} point - The point to get the shortest distance to. * - * @return {number} The shortest distance from the line to the point. + * @return {(boolean|number)} The shortest distance from the line to the point, or `false`. */ var GetShortestDistance = function (line, point) { @@ -84105,7 +86611,7 @@ module.exports = GetShortestDistance; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84134,7 +86640,7 @@ module.exports = Height; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84163,7 +86669,7 @@ module.exports = Length; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84501,7 +87007,7 @@ module.exports = Line; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84536,7 +87042,7 @@ module.exports = NormalAngle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84568,7 +87074,7 @@ module.exports = NormalX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84601,7 +87107,7 @@ module.exports = NormalY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84640,7 +87146,7 @@ module.exports = Offset; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84669,7 +87175,7 @@ module.exports = PerpSlope; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84710,7 +87216,7 @@ module.exports = Random; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84745,7 +87251,7 @@ module.exports = ReflectAngle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84782,7 +87288,7 @@ module.exports = Rotate; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84817,7 +87323,7 @@ module.exports = RotateAroundPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84866,7 +87372,7 @@ module.exports = RotateAroundXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84907,7 +87413,7 @@ module.exports = SetToAngle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84936,7 +87442,7 @@ module.exports = Slope; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -84965,7 +87471,7 @@ module.exports = Width; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -85011,7 +87517,7 @@ module.exports = Line; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -85603,7 +88109,7 @@ module.exports = Face; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -85846,7 +88352,7 @@ module.exports = GenerateGridVerts; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -85991,7 +88497,7 @@ module.exports = GenerateObjVerts; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -86053,16 +88559,18 @@ var Vertex = __webpack_require__(85769); * @param {number[]} [normals] - Optional vertex normals array. If you don't have one, pass `null` or an empty array. * @param {number|number[]} [colors=0xffffff] - An array of colors, one per vertex, or a single color value applied to all vertices. * @param {number|number[]} [alphas=1] - An array of alpha values, one per vertex, or a single alpha value applied to all vertices. + * @param {boolean} [flipUV=false] - Flip the UV coordinates? * * @return {Phaser.Types.Geom.Mesh.GenerateVertsResult} The parsed Face and Vertex objects. */ -var GenerateVerts = function (vertices, uvs, indicies, containsZ, normals, colors, alphas) +var GenerateVerts = function (vertices, uvs, indicies, containsZ, normals, colors, alphas, flipUV) { if (containsZ === undefined) { containsZ = false; } if (colors === undefined) { colors = 0xffffff; } if (alphas === undefined) { alphas = 1; } + if (flipUV === undefined) { flipUV = false; } - if (vertices.length !== uvs.length) + if (vertices.length !== uvs.length && !containsZ) { console.warn('GenerateVerts: vertices and uvs count not equal'); return; @@ -86109,6 +88617,11 @@ var GenerateVerts = function (vertices, uvs, indicies, containsZ, normals, color u = uvs[index2]; v = uvs[index2 + 1]; + if (flipUV) + { + v = 1 - v; + } + color = (isColorArray) ? colors[index1] : colors; alpha = (isAlphaArray) ? alphas[index1] : alphas; @@ -86183,7 +88696,7 @@ module.exports = GenerateVerts; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -86500,7 +89013,7 @@ module.exports = ParseObj; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -86579,7 +89092,7 @@ module.exports = ParseObjMaterial; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -86645,7 +89158,7 @@ module.exports = RotateFace; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -86988,7 +89501,7 @@ module.exports = Vertex; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87019,7 +89532,7 @@ module.exports = Mesh; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87050,7 +89563,7 @@ module.exports = Ceil; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87081,7 +89594,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87113,7 +89626,7 @@ module.exports = CopyFrom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87143,7 +89656,7 @@ module.exports = Equals; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87174,7 +89687,7 @@ module.exports = Floor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87239,7 +89752,7 @@ module.exports = GetCentroid; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87268,7 +89781,7 @@ module.exports = GetMagnitude; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87297,7 +89810,7 @@ module.exports = GetMagnitudeSq; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87368,7 +89881,7 @@ module.exports = GetRectangleFromPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87410,7 +89923,7 @@ module.exports = Interpolate; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87441,7 +89954,7 @@ module.exports = Invert; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87477,7 +89990,7 @@ module.exports = Negative; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87571,7 +90084,7 @@ module.exports = Point; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87619,7 +90132,7 @@ module.exports = Project; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87665,7 +90178,7 @@ module.exports = ProjectUnit; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87710,7 +90223,7 @@ module.exports = SetMagnitude; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87742,7 +90255,7 @@ module.exports = Point; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87773,7 +90286,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87823,7 +90336,7 @@ module.exports = Contains; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -87856,7 +90369,7 @@ module.exports = ContainsPoint; "use strict"; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88622,7 +91135,7 @@ module.exports = earcut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88679,7 +91192,7 @@ module.exports = GetAABB; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88723,7 +91236,7 @@ module.exports = GetNumberArray; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88801,7 +91314,7 @@ module.exports = GetPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -88850,7 +91363,7 @@ module.exports = Perimeter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89085,7 +91598,7 @@ module.exports = Polygon; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89325,7 +91838,7 @@ module.exports = Simplify; /** * @author Richard Davey * @author Igor Ognichenko - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89401,7 +91914,7 @@ module.exports = Smooth; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89442,7 +91955,7 @@ module.exports = Translate; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89471,7 +91984,7 @@ module.exports = Polygon; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89500,7 +92013,7 @@ module.exports = Area; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89534,7 +92047,7 @@ module.exports = Ceil; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89570,12 +92083,10 @@ module.exports = CeilAll; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -// Centers this Rectangle so that the center coordinates match the given x and y values. - /** * Moves the top-left corner of a Rectangle so that its center is at the given coordinates. * @@ -89608,7 +92119,7 @@ module.exports = CenterOn; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89639,7 +92150,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89675,7 +92186,7 @@ module.exports = Contains; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89707,7 +92218,7 @@ module.exports = ContainsPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89748,7 +92259,7 @@ module.exports = ContainsRect; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89780,7 +92291,7 @@ module.exports = CopyFrom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89818,7 +92329,7 @@ module.exports = Decompose; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89853,7 +92364,7 @@ module.exports = Equals; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89907,7 +92418,7 @@ module.exports = FitInside; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89961,7 +92472,7 @@ module.exports = FitOutside; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -89995,7 +92506,7 @@ module.exports = Floor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90031,24 +92542,26 @@ module.exports = FloorAll; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Rectangle = __webpack_require__(74118); var MATH_CONST = __webpack_require__(83392); -// points is an array of Point-like objects, -// either 2 dimensional arrays, or objects with public x/y properties: -// var points = [ -// [100, 200], -// [200, 400], -// { x: 30, y: 60 } -// ] - /** * Constructs new Rectangle or repositions and resizes an existing Rectangle so that all of the given points are on or within its bounds. * + * The `points` parameter is an array of Point-like objects: + * + * ```js + * const points = [ + * [100, 200], + * [200, 400], + * { x: 30, y: 60 } + * ] + * ``` + * * @function Phaser.Geom.Rectangle.FromPoints * @since 3.0.0 * @@ -90118,7 +92631,7 @@ module.exports = FromPoints; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90162,7 +92675,7 @@ module.exports = FromXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90191,7 +92704,7 @@ module.exports = GetAspectRatio; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90230,7 +92743,7 @@ module.exports = GetCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90312,16 +92825,13 @@ module.exports = GetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var GetPoint = __webpack_require__(47698); var Perimeter = __webpack_require__(85876); -// Return an array of points from the perimeter of the rectangle -// each spaced out based on the quantity or step required - /** * Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required. * @@ -90367,13 +92877,12 @@ module.exports = GetPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Point = __webpack_require__(79967); - /** * Returns the size of the Rectangle, expressed as a Point object. * With the value of the `width` as the `x` property and the `height` as the `y` property. @@ -90408,13 +92917,12 @@ module.exports = GetSize; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var CenterOn = __webpack_require__(79993); - /** * Increases the size of a Rectangle by a specified amount. * @@ -90451,7 +92959,7 @@ module.exports = Inflate; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90503,14 +93011,13 @@ module.exports = Intersection; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var Perimeter = __webpack_require__(85876); var Point = __webpack_require__(79967); - /** * Returns an array of points from the perimeter of the Rectangle, where each point is spaced out based * on either the `step` value, or the `quantity`. @@ -90623,7 +93130,7 @@ module.exports = MarchingAnts; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90673,13 +93180,10 @@ module.exports = MergePoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -// Merges source rectangle into target rectangle and returns target -// Neither rect should have negative widths or heights - /** * Merges the source rectangle into the target rectangle and returns the target. * Neither rectangle should have a negative width or height. @@ -90721,7 +93225,7 @@ module.exports = MergeRect; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90766,7 +93270,7 @@ module.exports = MergeXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90802,7 +93306,7 @@ module.exports = Offset; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90837,7 +93341,7 @@ module.exports = OffsetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90872,7 +93376,7 @@ module.exports = Overlaps; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90901,7 +93405,7 @@ module.exports = Perimeter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90959,7 +93463,7 @@ module.exports = PerimeterPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -90998,7 +93502,7 @@ module.exports = Random; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91070,7 +93574,7 @@ module.exports = RandomOutside; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91582,7 +94086,7 @@ module.exports = Rectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91612,12 +94116,10 @@ module.exports = SameDimensions; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -// Scales the width and height of this Rectangle by the given amounts. - /** * Scales the width and height of this Rectangle by the given amounts. * @@ -91652,7 +94154,7 @@ module.exports = Scale; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91695,7 +94197,7 @@ module.exports = Union; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91750,7 +94252,7 @@ module.exports = Rectangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91790,7 +94292,7 @@ module.exports = Area; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91835,7 +94337,7 @@ module.exports = BuildEquilateral; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91912,7 +94414,7 @@ module.exports = BuildFromPolygon; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -91962,7 +94464,7 @@ module.exports = BuildRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92016,7 +94518,7 @@ module.exports = CenterOn; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92061,7 +94563,7 @@ module.exports = Centroid; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92138,7 +94640,7 @@ module.exports = CircumCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92222,7 +94724,7 @@ module.exports = CircumCircle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92253,7 +94755,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92307,7 +94809,7 @@ module.exports = Contains; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92395,7 +94897,7 @@ module.exports = ContainsArray; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92427,7 +94929,7 @@ module.exports = ContainsPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92459,7 +94961,7 @@ module.exports = CopyFrom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92495,7 +94997,7 @@ module.exports = Decompose; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92532,7 +95034,7 @@ module.exports = Equals; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92620,7 +95122,7 @@ module.exports = GetPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92714,7 +95216,7 @@ module.exports = GetPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92780,7 +95282,7 @@ module.exports = InCenter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92822,7 +95324,7 @@ module.exports = Offset; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92858,7 +95360,7 @@ module.exports = Perimeter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92915,7 +95417,7 @@ module.exports = Random; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92952,7 +95454,7 @@ module.exports = Rotate; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -92987,7 +95489,7 @@ module.exports = RotateAroundPoint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93042,7 +95544,7 @@ module.exports = RotateAroundXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93490,7 +95992,7 @@ module.exports = Triangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93531,7 +96033,7 @@ module.exports = Triangle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93602,7 +96104,7 @@ module.exports = CreateInteractiveObject; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -93639,7 +96141,7 @@ module.exports = CreatePixelPerfectHandler; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -94750,7 +97252,7 @@ module.exports = InputManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -97264,7 +99766,7 @@ var InputPlugin = new Class({ debug.setRotation(rotation); debug.setScale(scaleX, scaleY); - debug.setPosition(x + offsetx, y + offsety); + debug.setPosition(x + offsetx * scaleX, y + offsety * scaleY); debug.setScrollFactor(gameObject.scrollFactorX, gameObject.scrollFactorY); debug.setDepth(gameObject.depth); }; @@ -98012,7 +100514,7 @@ module.exports = InputPlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -98121,7 +100623,7 @@ module.exports = InputPluginCache; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99453,7 +101955,7 @@ module.exports = Pointer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99552,7 +102054,7 @@ module.exports = INPUT_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99575,7 +102077,7 @@ module.exports = 'boot'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99598,7 +102100,7 @@ module.exports = 'destroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99628,7 +102130,7 @@ module.exports = 'dragend'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99661,7 +102163,7 @@ module.exports = 'dragenter'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99695,7 +102197,7 @@ module.exports = 'drag'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99728,7 +102230,7 @@ module.exports = 'dragleave'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99764,7 +102266,7 @@ module.exports = 'dragover'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99796,7 +102298,7 @@ module.exports = 'dragstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99827,7 +102329,7 @@ module.exports = 'drop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99870,7 +102372,7 @@ module.exports = 'gameobjectdown'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99903,7 +102405,7 @@ module.exports = 'dragend'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99935,7 +102437,7 @@ module.exports = 'dragenter'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -99968,7 +102470,7 @@ module.exports = 'drag'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100000,7 +102502,7 @@ module.exports = 'dragleave'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100035,7 +102537,7 @@ module.exports = 'dragover'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100071,7 +102573,7 @@ module.exports = 'dragstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100103,7 +102605,7 @@ module.exports = 'drop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100146,7 +102648,7 @@ module.exports = 'gameobjectmove'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100192,7 +102694,7 @@ module.exports = 'gameobjectout'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100235,7 +102737,7 @@ module.exports = 'gameobjectover'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100278,7 +102780,7 @@ module.exports = 'pointerdown'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100321,7 +102823,7 @@ module.exports = 'pointermove'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100365,7 +102867,7 @@ module.exports = 'pointerout'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100408,7 +102910,7 @@ module.exports = 'pointerover'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100451,7 +102953,7 @@ module.exports = 'pointerup'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100495,7 +102997,7 @@ module.exports = 'wheel'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100538,7 +103040,7 @@ module.exports = 'gameobjectup'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100584,7 +103086,7 @@ module.exports = 'gameobjectwheel'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100613,7 +103115,7 @@ module.exports = 'gameout'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100642,7 +103144,7 @@ module.exports = 'gameover'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100665,7 +103167,7 @@ module.exports = 'boot'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100692,7 +103194,7 @@ module.exports = 'process'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100715,7 +103217,7 @@ module.exports = 'update'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100741,7 +103243,7 @@ module.exports = 'pointerlockchange'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100778,7 +103280,7 @@ module.exports = 'pointerdown'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100814,7 +103316,7 @@ module.exports = 'pointerdownoutside'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100851,7 +103353,7 @@ module.exports = 'pointermove'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100891,7 +103393,7 @@ module.exports = 'pointerout'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100928,7 +103430,7 @@ module.exports = 'pointerover'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -100965,7 +103467,7 @@ module.exports = 'pointerup'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101001,7 +103503,7 @@ module.exports = 'pointerupoutside'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101041,7 +103543,7 @@ module.exports = 'wheel'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101065,7 +103567,7 @@ module.exports = 'preupdate'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101088,7 +103590,7 @@ module.exports = 'shutdown'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101112,7 +103614,7 @@ module.exports = 'start'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101139,7 +103641,7 @@ module.exports = 'update'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101206,7 +103708,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101332,7 +103834,7 @@ module.exports = Axis; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -101479,7 +103981,7 @@ module.exports = Button; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -102253,7 +104755,7 @@ module.exports = Gamepad; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -102900,7 +105402,7 @@ module.exports = GamepadPlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103044,7 +105546,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103288,7 +105790,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103521,7 +106023,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103545,7 +106047,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103576,7 +106078,7 @@ module.exports = 'down'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103607,7 +106109,7 @@ module.exports = 'up'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103640,7 +106142,7 @@ module.exports = 'connected'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103668,7 +106170,7 @@ module.exports = 'disconnected'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103702,7 +106204,7 @@ module.exports = 'down'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103736,7 +106238,7 @@ module.exports = 'up'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103763,7 +106265,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103790,7 +106292,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -103830,7 +106332,7 @@ module.exports = Input; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -104275,7 +106777,7 @@ module.exports = KeyboardManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105238,7 +107740,7 @@ module.exports = KeyboardPlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105281,7 +107783,7 @@ module.exports = AdvanceKeyCombo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105575,7 +108077,7 @@ module.exports = KeyCombo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105657,7 +108159,7 @@ module.exports = ProcessKeyCombo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105693,7 +108195,7 @@ module.exports = ResetKeyCombo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105731,7 +108233,7 @@ module.exports = 'keydown'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105762,7 +108264,7 @@ module.exports = 'keyup'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105798,7 +108300,7 @@ module.exports = 'keycombomatch'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105834,7 +108336,7 @@ module.exports = 'down'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105875,7 +108377,7 @@ module.exports = 'keydown-'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105909,7 +108411,7 @@ module.exports = 'keyup-'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105945,7 +108447,7 @@ module.exports = 'up'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -105973,7 +108475,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -106012,7 +108514,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -106047,7 +108549,7 @@ module.exports = DownDuration; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -106090,7 +108592,7 @@ module.exports = JustDown; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -106133,7 +108635,7 @@ module.exports = JustUp; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -106536,7 +109038,7 @@ module.exports = Key; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -107443,7 +109945,7 @@ module.exports = KeyCodes; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -107466,7 +109968,7 @@ module.exports = KeyMap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -107501,7 +110003,7 @@ module.exports = UpDuration; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -108068,7 +110570,7 @@ module.exports = MouseManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -108092,7 +110594,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -108500,7 +111002,7 @@ module.exports = TouchManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -108524,7 +111026,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -109093,7 +111595,7 @@ module.exports = File; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -109163,7 +111665,7 @@ module.exports = FileTypesManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -109205,7 +111707,7 @@ module.exports = GetURL; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -110318,7 +112820,7 @@ module.exports = LoaderPlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -110367,7 +112869,7 @@ module.exports = MergeXHRSettings; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -110674,7 +113176,7 @@ module.exports = MultiFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -110756,7 +113258,7 @@ module.exports = XHRLoader; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -110827,7 +113329,7 @@ module.exports = XHRSettings; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -110989,7 +113491,7 @@ module.exports = FILE_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111021,7 +113523,7 @@ module.exports = 'addfile'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111051,7 +113553,7 @@ module.exports = 'complete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111084,7 +113586,7 @@ module.exports = 'filecomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111142,7 +113644,7 @@ module.exports = 'filecomplete-'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111169,7 +113671,7 @@ module.exports = 'loaderror'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111197,7 +113699,7 @@ module.exports = 'load'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111226,7 +113728,7 @@ module.exports = 'fileprogress'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111257,7 +113759,7 @@ module.exports = 'postprocess'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111284,7 +113786,7 @@ module.exports = 'progress'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111313,7 +113815,7 @@ module.exports = 'start'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111344,7 +113846,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111546,7 +114048,7 @@ module.exports = AnimationJSONFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -111817,7 +114319,7 @@ module.exports = AsepriteFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -112074,7 +114576,7 @@ module.exports = AtlasJSONFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -112316,7 +114818,7 @@ module.exports = AtlasXMLFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -112591,7 +115093,7 @@ module.exports = AudioFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -112882,7 +115384,7 @@ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audio /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -113065,7 +115567,7 @@ module.exports = BinaryFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -113312,7 +115814,7 @@ module.exports = BitmapFontFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -114041,7 +116543,7 @@ module.exports = CompressedTextureFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -114451,7 +116953,7 @@ module.exports = GLSLFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -114655,7 +117157,7 @@ module.exports = HTML5AudioFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -114831,7 +117333,7 @@ module.exports = HTMLFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -115088,7 +117590,7 @@ module.exports = HTMLTextureFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -115446,7 +117948,7 @@ module.exports = ImageFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -115686,7 +118188,7 @@ module.exports = JSONFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116015,7 +118517,7 @@ module.exports = MultiAtlasFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116233,7 +118735,7 @@ module.exports = MultiScriptFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116488,7 +118990,7 @@ module.exports = OBJFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116716,7 +119218,7 @@ module.exports = PackFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -116929,7 +119431,7 @@ module.exports = PluginFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117267,7 +119769,7 @@ module.exports = SVGFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117488,7 +119990,7 @@ module.exports = SceneFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117695,7 +120197,7 @@ module.exports = ScenePluginFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -117884,7 +120386,7 @@ module.exports = ScriptFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118074,7 +120576,7 @@ module.exports = SpriteSheetFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118254,7 +120756,7 @@ module.exports = TextFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118448,7 +120950,7 @@ module.exports = TilemapCSVFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118603,7 +121105,7 @@ module.exports = TilemapImpactFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118758,7 +121260,7 @@ module.exports = TilemapJSONFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -118999,7 +121501,7 @@ module.exports = UnityAtlasFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119395,7 +121897,7 @@ module.exports = VideoFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119579,7 +122081,7 @@ module.exports = XMLFile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119633,7 +122135,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119674,7 +122176,7 @@ module.exports = Loader; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119710,7 +122212,7 @@ module.exports = Average; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119742,7 +122244,7 @@ module.exports = Bernstein; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119772,7 +122274,7 @@ module.exports = Between; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119810,7 +122312,7 @@ module.exports = CatmullRom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119848,7 +122350,7 @@ module.exports = CeilTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119879,7 +122381,7 @@ module.exports = Clamp; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119910,7 +122412,7 @@ module.exports = DegToRad; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -119940,7 +122442,7 @@ module.exports = Difference; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120224,7 +122726,7 @@ module.exports = Euler; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120265,7 +122767,7 @@ module.exports = Factorial; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120295,7 +122797,7 @@ module.exports = FloatBetween; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120333,7 +122835,7 @@ module.exports = FloorTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120368,7 +122870,7 @@ module.exports = FromPercent; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120402,7 +122904,7 @@ module.exports = GetSpeed; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120434,7 +122936,7 @@ module.exports = IsEven; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120464,7 +122966,7 @@ module.exports = IsEvenStrict; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -120530,7 +123032,7 @@ module.exports = LinearXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -121124,7 +123626,7 @@ module.exports = Matrix3; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122918,7 +125420,7 @@ module.exports = Matrix4; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -122991,7 +125493,7 @@ module.exports = Median; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123022,7 +125524,7 @@ module.exports = MinSub; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -123082,7 +125584,7 @@ module.exports = Percent; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124132,7 +126634,7 @@ module.exports = Quaternion; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124163,7 +126665,7 @@ module.exports = RadToDeg; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124204,7 +126706,7 @@ module.exports = RandomXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124244,7 +126746,7 @@ module.exports = RandomXYZ; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124281,7 +126783,7 @@ module.exports = RandomXYZW; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124317,7 +126819,7 @@ module.exports = Rotate; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124362,7 +126864,7 @@ module.exports = RotateAround; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124404,7 +126906,7 @@ module.exports = RotateAroundDistance; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124442,7 +126944,7 @@ module.exports = RotateTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124491,7 +126993,7 @@ module.exports = RotateVec3; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124521,7 +127023,7 @@ module.exports = RoundAwayFromZero; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124574,7 +127076,7 @@ module.exports = RoundTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124628,7 +127130,7 @@ module.exports = SinCosTableGenerator; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124676,7 +127178,7 @@ module.exports = SmoothStep; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124716,7 +127218,7 @@ module.exports = SmootherStep; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124773,7 +127275,7 @@ module.exports = ToXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -124829,7 +127331,7 @@ module.exports = TransformXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -125623,7 +128125,7 @@ module.exports = Vector2; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -126670,7 +129172,7 @@ module.exports = Vector3; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127212,7 +129714,7 @@ module.exports = Vector4; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127243,7 +129745,7 @@ module.exports = Within; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127276,7 +129778,7 @@ module.exports = Wrap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127308,7 +129810,7 @@ module.exports = Between; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127340,7 +129842,7 @@ module.exports = BetweenPoints; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127373,7 +129875,7 @@ module.exports = BetweenPointsY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127408,7 +129910,7 @@ module.exports = BetweenY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127454,7 +129956,7 @@ module.exports = CounterClockwise; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127493,7 +129995,7 @@ module.exports = Normalize; /** * @author Richard Davey * @author @samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127523,7 +130025,7 @@ module.exports = Random; /** * @author Richard Davey * @author @samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127552,7 +130054,7 @@ module.exports = RandomDegrees; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127583,7 +130085,7 @@ module.exports = Reverse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127651,7 +130153,7 @@ module.exports = RotateTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127699,7 +130201,7 @@ module.exports = ShortestBetween; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127732,7 +130234,7 @@ module.exports = Wrap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127765,7 +130267,7 @@ module.exports = WrapDegrees; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127799,7 +130301,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127892,7 +130394,7 @@ module.exports = MATH_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127927,7 +130429,7 @@ module.exports = DistanceBetween; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127960,7 +130462,7 @@ module.exports = DistanceBetweenPoints; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -127993,7 +130495,7 @@ module.exports = DistanceBetweenPointsSquared; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128028,7 +130530,7 @@ module.exports = ChebyshevDistance; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128063,7 +130565,7 @@ module.exports = DistancePower; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128098,7 +130600,7 @@ module.exports = SnakeDistance; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128133,7 +130635,7 @@ module.exports = DistanceSquared; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128161,7 +130663,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128243,7 +130745,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128275,7 +130777,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128316,7 +130818,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128348,7 +130850,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128372,7 +130874,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128418,7 +130920,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128483,7 +130985,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128527,7 +131029,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128551,7 +131053,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128580,7 +131082,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128616,7 +131118,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128645,7 +131147,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128669,7 +131171,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128698,7 +131200,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128734,7 +131236,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128763,7 +131265,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128787,7 +131289,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128843,7 +131345,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128906,7 +131408,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128962,7 +131464,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -128986,7 +131488,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129015,7 +131517,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129051,7 +131553,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129080,7 +131582,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129104,7 +131606,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129137,7 +131639,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129166,7 +131668,7 @@ module.exports = Linear; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129180,7 +131682,7 @@ module.exports = __webpack_require__(43927); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129209,7 +131711,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129245,7 +131747,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129274,7 +131776,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129298,7 +131800,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129327,7 +131829,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129363,7 +131865,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129392,7 +131894,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129416,7 +131918,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129445,7 +131947,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129481,7 +131983,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129510,7 +132012,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129534,7 +132036,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129574,7 +132076,7 @@ module.exports = In; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129614,7 +132116,7 @@ module.exports = InOut; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129654,7 +132156,7 @@ module.exports = Out; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129678,7 +132180,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129721,7 +132223,7 @@ module.exports = Stepped; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129739,7 +132241,7 @@ module.exports = __webpack_require__(52770); /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129771,7 +132273,7 @@ module.exports = Ceil; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129806,7 +132308,7 @@ module.exports = Equal; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129838,7 +132340,7 @@ module.exports = Floor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129873,7 +132375,7 @@ module.exports = GreaterThan; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129908,7 +132410,7 @@ module.exports = LessThan; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -129934,7 +132436,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130027,7 +132529,7 @@ module.exports = PhaserMath; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130067,7 +132569,7 @@ module.exports = BezierInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130125,7 +132627,7 @@ module.exports = CatmullRomInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130196,7 +132698,7 @@ module.exports = CubicBezierInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130244,7 +132746,7 @@ module.exports = LinearInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130304,7 +132806,7 @@ module.exports = QuadraticBezierInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130338,7 +132840,7 @@ module.exports = SmoothStepInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130372,7 +132874,7 @@ module.exports = SmootherStepInterpolation; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130400,7 +132902,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130431,7 +132933,7 @@ module.exports = GetPowerOfTwo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130462,7 +132964,7 @@ module.exports = IsSizePowerOfTwo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130491,7 +132993,7 @@ module.exports = IsValuePowerOfTwo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -130515,7 +133017,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131026,7 +133528,7 @@ module.exports = RandomDataGenerator; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131071,7 +133573,7 @@ module.exports = SnapCeil; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131116,7 +133618,7 @@ module.exports = SnapFloor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131160,7 +133662,7 @@ module.exports = SnapTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131184,7 +133686,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131276,7 +133778,7 @@ __webpack_require__.g.Phaser = Phaser; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -131379,7 +133881,7 @@ module.exports = ArcadeImage; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132106,7 +134608,7 @@ module.exports = ArcadePhysics; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -132211,7 +134713,7 @@ module.exports = ArcadeSprite; /** * @author Richard Davey * @author Benjamin D. Richards - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -134841,7 +137343,7 @@ module.exports = Body; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135025,7 +137527,7 @@ module.exports = Collider; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135365,7 +137867,7 @@ module.exports = Factory; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135474,7 +137976,7 @@ module.exports = GetOverlapX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135583,7 +138085,7 @@ module.exports = GetOverlapY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -135686,9 +138188,10 @@ var PhysicsGroup = new Class({ * This should be either `Phaser.Physics.Arcade.Image`, `Phaser.Physics.Arcade.Sprite`, or a class extending one of those. * * @name Phaser.Physics.Arcade.Group#classType - * @type {Phaser.Types.GameObjects.Group.GroupClassTypeConstructor} + * @type {function} * @default ArcadeSprite * @since 3.0.0 + * @see Phaser.Types.GameObjects.Group.GroupClassTypeConstructor */ config.classType = GetFastValue(config, 'classType', ArcadeSprite); @@ -135882,7 +138385,7 @@ module.exports = PhysicsGroup; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136300,7 +138803,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136718,7 +139221,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136739,12 +139242,13 @@ var ProcessX = __webpack_require__(22916); * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate. * @param {boolean} overlapOnly - If `true`, the bodies will only have their overlap data set and no separation will take place. * @param {number} bias - A value to add to the delta value during overlap checking. Used to prevent sprite tunneling. + * @param {number} [overlap] - If given then this value will be used as the overlap and no check will be run. * * @return {boolean} `true` if the two bodies overlap vertically, otherwise `false`. */ -var SeparateX = function (body1, body2, overlapOnly, bias) +var SeparateX = function (body1, body2, overlapOnly, bias, overlap) { - var overlap = GetOverlapX(body1, body2, overlapOnly, bias); + if (overlap === undefined) { overlap = GetOverlapX(body1, body2, overlapOnly, bias); } var body1Immovable = body1.immovable; var body2Immovable = body2.immovable; @@ -136790,7 +139294,7 @@ module.exports = SeparateX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -136811,12 +139315,13 @@ var ProcessY = __webpack_require__(67050); * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate. * @param {boolean} overlapOnly - If `true`, the bodies will only have their overlap data set and no separation will take place. * @param {number} bias - A value to add to the delta value during overlap checking. Used to prevent sprite tunneling. + * @param {number} [overlap] - If given then this value will be used as the overlap and no check will be run. * * @return {boolean} `true` if the two bodies overlap vertically, otherwise `false`. */ -var SeparateY = function (body1, body2, overlapOnly, bias) +var SeparateY = function (body1, body2, overlapOnly, bias, overlap) { - var overlap = GetOverlapY(body1, body2, overlapOnly, bias); + if (overlap === undefined) { overlap = GetOverlapY(body1, body2, overlapOnly, bias); } var body1Immovable = body1.immovable; var body2Immovable = body2.immovable; @@ -136862,7 +139367,7 @@ module.exports = SeparateY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -137912,7 +140417,7 @@ module.exports = StaticBody; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138112,7 +140617,7 @@ module.exports = StaticPhysicsGroup; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -138123,6 +140628,7 @@ var Class = __webpack_require__(56694); var Collider = __webpack_require__(3909); var CONST = __webpack_require__(47401); var DistanceBetween = __webpack_require__(53996); +var DistanceBetweenPoints = __webpack_require__(92951); var EventEmitter = __webpack_require__(6659); var Events = __webpack_require__(27037); var FuzzyEqual = __webpack_require__(88456); @@ -139448,7 +141954,7 @@ var World = new Class({ body.velocity.set(velocityX, velocityY); - if (maxSpeed > -1 && speed > maxSpeed) + if (maxSpeed > -1 && body.velocity.length() > maxSpeed) { body.velocity.normalize().scale(maxSpeed); speed = maxSpeed; @@ -139475,6 +141981,12 @@ var World = new Class({ */ separate: function (body1, body2, processCallback, callbackContext, overlapOnly) { + var overlapX; + var overlapY; + + var result = false; + var runSeparation = true; + if ( !body1.enable || !body2.enable || @@ -139482,80 +141994,71 @@ var World = new Class({ body2.checkCollision.none || !this.intersects(body1, body2)) { - return false; + return result; } // They overlap. Is there a custom process callback? If it returns true then we can carry on, otherwise we should abort. if (processCallback && processCallback.call(callbackContext, body1.gameObject, body2.gameObject) === false) { - return false; - } - - // Circle vs. Circle quick bail out - if (body1.isCircle && body2.isCircle) - { - return this.separateCircle(body1, body2, overlapOnly); + return result; } - // We define the behavior of bodies in a collision circle and rectangle - // If a collision occurs in the corner points of the rectangle, the body behave like circles - - // Either body1 or body2 is a circle - if (body1.isCircle !== body2.isCircle) + // Circle vs. Circle, or Circle vs. Rect + if (body1.isCircle || body2.isCircle) { - var bodyRect = (body1.isCircle) ? body2 : body1; - var bodyCircle = (body1.isCircle) ? body1 : body2; + var circleResults = this.separateCircle(body1, body2, overlapOnly); - var rect = { - x: bodyRect.x, - y: bodyRect.y, - right: bodyRect.right, - bottom: bodyRect.bottom - }; - - var circle = bodyCircle.center; - - if (circle.y < rect.y || circle.y > rect.bottom) + if (circleResults.result) { - if (circle.x < rect.x || circle.x > rect.right) - { - return this.separateCircle(body1, body2, overlapOnly); - } + // We got a satisfactory result from the separateCircle method + result = true; + runSeparation = false; + } + else + { + // Further processing required + overlapX = circleResults.x; + overlapY = circleResults.y; + runSeparation = true; } } - var resultX = false; - var resultY = false; - - // Do we separate on x first or y first or both? - if (overlapOnly) + if (runSeparation) { - // No separation but we need to calculate overlapX, overlapY, etc. - resultX = SeparateX(body1, body2, overlapOnly, this.OVERLAP_BIAS); - resultY = SeparateY(body1, body2, overlapOnly, this.OVERLAP_BIAS); - } - else if (this.forceX || Math.abs(this.gravity.y + body1.gravity.y) < Math.abs(this.gravity.x + body1.gravity.x)) - { - resultX = SeparateX(body1, body2, overlapOnly, this.OVERLAP_BIAS); + var resultX = false; + var resultY = false; + var bias = this.OVERLAP_BIAS; - // Are they still intersecting? Let's do the other axis then - if (this.intersects(body1, body2)) + // Do we separate on x first or y first or both? + if (overlapOnly) { - resultY = SeparateY(body1, body2, overlapOnly, this.OVERLAP_BIAS); + // No separation but we need to calculate overlapX, overlapY, etc. + resultX = SeparateX(body1, body2, overlapOnly, bias, overlapX); + resultY = SeparateY(body1, body2, overlapOnly, bias, overlapY); } - } - else - { - resultY = SeparateY(body1, body2, overlapOnly, this.OVERLAP_BIAS); + else if (this.forceX || Math.abs(this.gravity.y + body1.gravity.y) < Math.abs(this.gravity.x + body1.gravity.x)) + { + resultX = SeparateX(body1, body2, overlapOnly, bias, overlapX); - // Are they still intersecting? Let's do the other axis then - if (this.intersects(body1, body2)) + // Are they still intersecting? Let's do the other axis then + if (this.intersects(body1, body2)) + { + resultY = SeparateY(body1, body2, overlapOnly, bias, overlapY); + } + } + else { - resultX = SeparateX(body1, body2, overlapOnly, this.OVERLAP_BIAS); + resultY = SeparateY(body1, body2, overlapOnly, bias, overlapY); + + // Are they still intersecting? Let's do the other axis then + if (this.intersects(body1, body2)) + { + resultX = SeparateX(body1, body2, overlapOnly, bias, overlapX); + } } - } - var result = (resultX || resultY); + result = (resultX || resultY); + } if (result) { @@ -139586,140 +142089,209 @@ var World = new Class({ * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to be separated. * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to be separated. * @param {boolean} [overlapOnly] - If this a collide or overlap check? - * @param {number} [bias] - A small value added to the calculations. * * @return {boolean} True if separation occurred, otherwise false. */ - separateCircle: function (body1, body2, overlapOnly, bias) + separateCircle: function (body1, body2, overlapOnly) { - // Set the bounding box overlap values into the bodies themselves (hence we don't use the return values here) - GetOverlapX(body1, body2, false, bias); - GetOverlapY(body1, body2, false, bias); + // Set the AABB overlap, blocked and touching values into the bodies (we don't use the return values here) + GetOverlapX(body1, body2, false, 0); + GetOverlapY(body1, body2, false, 0); + + var body1IsCircle = body1.isCircle; + var body2IsCircle = body2.isCircle; + var body1Center = body1.center; + var body2Center = body2.center; + var body1Immovable = body1.immovable; + var body2Immovable = body2.immovable; + var body1Velocity = body1.velocity; + var body2Velocity = body2.velocity; var overlap = 0; + var twoCircles = true; - if (body1.isCircle !== body2.isCircle) + if (body1IsCircle !== body2IsCircle) { - var rect = { - x: (body2.isCircle) ? body1.position.x : body2.position.x, - y: (body2.isCircle) ? body1.position.y : body2.position.y, - right: (body2.isCircle) ? body1.right : body2.right, - bottom: (body2.isCircle) ? body1.bottom : body2.bottom - }; + twoCircles = false; - var circle = { - x: (body1.isCircle) ? body1.center.x : body2.center.x, - y: (body1.isCircle) ? body1.center.y : body2.center.y, - radius: (body1.isCircle) ? body1.halfWidth : body2.halfWidth - }; + var circleX = body1Center.x; + var circleY = body1Center.y; + var circleRadius = body1.halfWidth; + + var rectX = body2.position.x; + var rectY = body2.position.y; + var rectRight = body2.right; + var rectBottom = body2.bottom; + + if (body2IsCircle) + { + circleX = body2Center.x; + circleY = body2Center.y; + circleRadius = body2.halfWidth; + + rectX = body1.position.x; + rectY = body1.position.y; + rectRight = body1.right; + rectBottom = body1.bottom; + } - if (circle.y < rect.y) + if (circleY < rectY) { - if (circle.x < rect.x) + if (circleX < rectX) { - overlap = DistanceBetween(circle.x, circle.y, rect.x, rect.y) - circle.radius; + overlap = DistanceBetween(circleX, circleY, rectX, rectY) - circleRadius; } - else if (circle.x > rect.right) + else if (circleX > rectRight) { - overlap = DistanceBetween(circle.x, circle.y, rect.right, rect.y) - circle.radius; + overlap = DistanceBetween(circleX, circleY, rectRight, rectY) - circleRadius; } } - else if (circle.y > rect.bottom) + else if (circleY > rectBottom) { - if (circle.x < rect.x) + if (circleX < rectX) { - overlap = DistanceBetween(circle.x, circle.y, rect.x, rect.bottom) - circle.radius; + overlap = DistanceBetween(circleX, circleY, rectX, rectBottom) - circleRadius; } - else if (circle.x > rect.right) + else if (circleX > rectRight) { - overlap = DistanceBetween(circle.x, circle.y, rect.right, rect.bottom) - circle.radius; + overlap = DistanceBetween(circleX, circleY, rectRight, rectBottom) - circleRadius; } } + // If a collision occurs in the corner points of the rectangle + // then the bodies behave like circles overlap *= -1; } else { - overlap = (body1.halfWidth + body2.halfWidth) - DistanceBetween(body1.center.x, body1.center.y, body2.center.x, body2.center.y); + overlap = (body1.halfWidth + body2.halfWidth) - DistanceBetweenPoints(body1Center, body2Center); } body1.overlapR = overlap; body2.overlapR = overlap; - // Can't separate two immovable bodies, or a body with its own custom separation logic - if (overlapOnly || overlap === 0 || (body1.immovable && body2.immovable) || body1.customSeparateX || body2.customSeparateX) - { - if (overlap !== 0 && (body1.onOverlap || body2.onOverlap)) - { - this.emit(Events.OVERLAP, body1.gameObject, body2.gameObject, body1, body2); - } + var angle = AngleBetweenPoints(body1Center, body2Center); + var overlapX = (overlap + MATH_CONST.EPSILON) * Math.cos(angle); + var overlapY = (overlap + MATH_CONST.EPSILON) * Math.sin(angle); - // return true if there was some overlap, otherwise false - return (overlap !== 0); - } + console.log('overlap', overlap, 'xy', overlapX, overlapY); - var dx = body1.center.x - body2.center.x; - var dy = body1.center.y - body2.center.y; - var d = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)); - var nx = ((body2.center.x - body1.center.x) / d) || 0; - var ny = ((body2.center.y - body1.center.y) / d) || 0; - var p = 2 * (body1.velocity.x * nx + body1.velocity.y * ny - body2.velocity.x * nx - body2.velocity.y * ny) / (body1.mass + body2.mass); + var results = { overlap: overlap, result: false, x: overlapX, y: overlapY }; - if (body1.immovable || body2.immovable) + // We know the AABBs already intersect before we enter this method + if (overlapOnly && (!twoCircles || (twoCircles && overlap !== 0))) { - p *= 2; - } + // Now we know the rect vs circle overlaps, or two circles do + results.result = true; - if (!body1.immovable) - { - body1.velocity.x = (body1.velocity.x - p / body1.mass * nx); - body1.velocity.y = (body1.velocity.y - p / body1.mass * ny); + return results; } - if (!body2.immovable) + // Can't separate (in this method): + // Two immovable bodies + // A body with its own custom separation logic + // A circle vs. a rect with a face-on collision + if ((!twoCircles && overlap === 0) || (body1Immovable && body2Immovable) || body1.customSeparateX || body2.customSeparateX) { - body2.velocity.x = (body2.velocity.x + p / body2.mass * nx); - body2.velocity.y = (body2.velocity.y + p / body2.mass * ny); - } + // Let SeparateX / SeparateY handle this + results.x = undefined; + results.y = undefined; - if (!body1.immovable && !body2.immovable) - { - overlap /= 2; + return results; } - // Note: This is inadequate for circle-rectangle separation + // If we get this far we either have circle vs. circle + // or circle vs. rect with corner collision - var angle = AngleBetweenPoints(body1.center, body2.center); - var overlapX = (overlap + MATH_CONST.EPSILON) * Math.cos(angle); - var overlapY = (overlap + MATH_CONST.EPSILON) * Math.sin(angle); + var deadlock = (!body1.pushable && !body2.pushable); - if (!body1.immovable) + if (twoCircles) { - body1.x -= overlapX; - body1.y -= overlapY; + var dx = body1Center.x - body2Center.x; + var dy = body1Center.y - body2Center.y; + var d = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)); + var nx = ((body2Center.x - body1Center.x) / d) || 0; + var ny = ((body2Center.y - body1Center.y) / d) || 0; + var p = 2 * (body1Velocity.x * nx + body1Velocity.y * ny - body2Velocity.x * nx - body2Velocity.y * ny) / (body1.mass + body2.mass); - body1.updateCenter(); - } + if (body1Immovable || body2Immovable) + { + p *= 2; + } - if (!body2.immovable) - { - body2.x += overlapX; - body2.y += overlapY; + console.log('circ vel', body1Velocity, body2Velocity, 'p', p, 'nxy', nx, ny); - body2.updateCenter(); - } + if (!body1Immovable) + { + body1Velocity.x = (body1Velocity.x - p / body1.mass * nx); + body1Velocity.y = (body1Velocity.y - p / body1.mass * ny); + body1Velocity.multiply(body1.bounce); + + console.log('body1', body1Velocity, 'y', body1.y); + } + + if (!body2Immovable) + { + body2Velocity.x = (body2Velocity.x + p / body2.mass * nx); + body2Velocity.y = (body2Velocity.y + p / body2.mass * ny); + body2Velocity.multiply(body2.bounce); + + console.log('body2', body2Velocity, 'y', body2.y); + } + + if (!body1Immovable && !body2Immovable) + { + overlapX *= 0.5; + overlapY *= 0.5; + } + + if (!body1Immovable) + { + body1.x -= overlapX; + body1.y -= overlapY; + + body1.updateCenter(); + + console.log('body1 sep', body1.y); + } + + if (!body2Immovable) + { + body2.x += overlapX; + body2.y += overlapY; - body1.velocity.x *= body1.bounce.x; - body1.velocity.y *= body1.bounce.y; - body2.velocity.x *= body2.bounce.x; - body2.velocity.y *= body2.bounce.y; + body2.updateCenter(); + } - if (body1.onCollide || body2.onCollide) + results.result = true; + } + else { - this.emit(Events.COLLIDE, body1.gameObject, body2.gameObject, body1, body2); + // Circle vs. Rect + // We'll only move the circle (if we can) and let + // the runSeparation handle the rectangle + + if (!body1Immovable || body1.pushable || deadlock) + { + body1.x -= overlapX; + body1.y -= overlapY; + + body1.updateCenter(); + } + else if (!body2Immovable || body2.pushable || deadlock) + { + body2.x += overlapX; + body2.y += overlapY; + + body2.updateCenter(); + } + + // Let SeparateX / SeparateY handle this further + results.x = undefined; + results.y = undefined; } - return true; + return results; }, /** @@ -139744,10 +142316,10 @@ var World = new Class({ { // Rect vs. Rect return !( - body1.right <= body2.position.x || - body1.bottom <= body2.position.y || - body1.position.x >= body2.right || - body1.position.y >= body2.bottom + body1.right <= body2.left || + body1.bottom <= body2.top || + body1.left >= body2.right || + body1.top >= body2.bottom ); } else if (body1.isCircle) @@ -139755,7 +142327,7 @@ var World = new Class({ if (body2.isCircle) { // Circle vs. Circle - return DistanceBetween(body1.center.x, body1.center.y, body2.center.x, body2.center.y) <= (body1.halfWidth + body2.halfWidth); + return DistanceBetweenPoints(body1.center, body2.center) <= (body1.halfWidth + body2.halfWidth); } else { @@ -140313,8 +142885,8 @@ var World = new Class({ return false; } - var x = body.position.x; - var y = body.position.y; + var x = body.x; + var y = body.y; var w = body.width; var h = body.height; @@ -140572,7 +143144,7 @@ module.exports = World; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140648,7 +143220,7 @@ module.exports = Acceleration; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140731,7 +143303,7 @@ module.exports = Angular; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140832,7 +143404,7 @@ module.exports = Bounce; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -140960,7 +143532,7 @@ module.exports = Debug; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141094,7 +143666,7 @@ module.exports = Drag; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141108,15 +143680,16 @@ var Enable = { /** * Enables this Game Object's Body. + * If you reset the Body you must also pass `x` and `y`. * * @method Phaser.Physics.Arcade.Components.Enable#enableBody * @since 3.0.0 * - * @param {boolean} reset - Also reset the Body and place it at (x, y). - * @param {number} x - The horizontal position to place the Game Object and Body. - * @param {number} y - The horizontal position to place the Game Object and Body. - * @param {boolean} enableGameObject - Also activate this Game Object. - * @param {boolean} showGameObject - Also show this Game Object. + * @param {boolean} [reset] - Also reset the Body and place the Game Object at (x, y). + * @param {number} [x] - The horizontal position to place the Game Object, if `reset` is true. + * @param {number} [y] - The horizontal position to place the Game Object, if `reset` is true. + * @param {boolean} [enableGameObject] - Also set this Game Object's `active` to true. + * @param {boolean} [showGameObject] - Also set this Game Object's `visible` to true. * * @return {this} This Game Object. * @@ -141155,8 +143728,8 @@ var Enable = { * @method Phaser.Physics.Arcade.Components.Enable#disableBody * @since 3.0.0 * - * @param {boolean} [disableGameObject=false] - Also deactivate this Game Object. - * @param {boolean} [hideGameObject=false] - Also hide this Game Object. + * @param {boolean} [disableGameObject=false] - Also set this Game Object's `active` to false. + * @param {boolean} [hideGameObject=false] - Also set this Game Object's `visible` to false. * * @return {this} This Game Object. * @@ -141219,7 +143792,7 @@ module.exports = Enable; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141308,7 +143881,7 @@ module.exports = Friction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141387,7 +143960,7 @@ module.exports = Gravity; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141434,7 +144007,7 @@ module.exports = Immovable; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141630,7 +144203,7 @@ module.exports = OverlapRect; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141679,7 +144252,7 @@ module.exports = Pushable; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141783,7 +144356,7 @@ module.exports = Size; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141883,7 +144456,7 @@ module.exports = Velocity; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -141919,7 +144492,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142049,7 +144622,7 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142084,7 +144657,7 @@ module.exports = 'collide'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142119,7 +144692,7 @@ module.exports = 'overlap'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142144,7 +144717,7 @@ module.exports = 'pause'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142169,7 +144742,7 @@ module.exports = 'resume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142203,7 +144776,7 @@ module.exports = 'tilecollide'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142237,7 +144810,7 @@ module.exports = 'tileoverlap'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142271,7 +144844,7 @@ module.exports = 'worldbounds'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142301,7 +144874,7 @@ module.exports = 'worldstep'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142330,7 +144903,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142376,7 +144949,7 @@ module.exports = Arcade; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142418,7 +144991,7 @@ module.exports = ProcessTileCallbacks; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142467,7 +145040,7 @@ module.exports = ProcessTileSeparationX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142516,7 +145089,7 @@ module.exports = ProcessTileSeparationY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142637,7 +145210,7 @@ module.exports = SeparateTile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142728,7 +145301,7 @@ module.exports = TileCheckX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142819,7 +145392,7 @@ module.exports = TileCheckY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142856,7 +145429,7 @@ module.exports = TileIntersectsBody; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142886,7 +145459,7 @@ module.exports = Tilemap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -142913,7 +145486,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143320,7 +145893,7 @@ module.exports = BodyBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -143377,7 +145950,7 @@ module.exports = Matter; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144308,7 +146881,7 @@ module.exports = Factory; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144435,7 +147008,7 @@ module.exports = MatterGameObject; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -144582,7 +147155,7 @@ module.exports = MatterImage; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146045,7 +148618,7 @@ module.exports = MatterPhysics; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146198,7 +148771,7 @@ module.exports = MatterSprite; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146521,7 +149094,7 @@ module.exports = MatterTileBody; * @author Joachim Grill * @author Richard Davey * @copyright 2018 CodeAndWeb GmbH - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146662,7 +149235,7 @@ module.exports = PhysicsEditorParser; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -146780,7 +149353,7 @@ module.exports = PhysicsJSONParser; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -147169,7 +149742,7 @@ module.exports = PointerConstraint; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149390,7 +151963,7 @@ module.exports = World; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149431,7 +152004,7 @@ module.exports = Bounce; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149618,7 +152191,7 @@ module.exports = Collision; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149775,7 +152348,7 @@ module.exports = Force; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149866,7 +152439,7 @@ module.exports = Friction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149907,7 +152480,7 @@ module.exports = Gravity; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -149990,7 +152563,7 @@ module.exports = Mass; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150045,7 +152618,7 @@ module.exports = Sensor; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150336,7 +152909,7 @@ module.exports = SetBody; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150495,7 +153068,7 @@ module.exports = Sleep; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150551,7 +153124,7 @@ module.exports = Static; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150867,7 +153440,7 @@ module.exports = Transform; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -150969,7 +153542,7 @@ module.exports = Velocity; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151002,7 +153575,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151038,7 +153611,7 @@ module.exports = 'afteradd'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151074,7 +153647,7 @@ module.exports = 'afterremove'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151109,7 +153682,7 @@ module.exports = 'afterupdate'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151145,7 +153718,7 @@ module.exports = 'beforeadd'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151181,7 +153754,7 @@ module.exports = 'beforeremove'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151216,7 +153789,7 @@ module.exports = 'beforeupdate'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151255,7 +153828,7 @@ module.exports = 'collisionactive'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151294,7 +153867,7 @@ module.exports = 'collisionend'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151333,7 +153906,7 @@ module.exports = 'collisionstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151362,7 +153935,7 @@ module.exports = 'dragend'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151391,7 +153964,7 @@ module.exports = 'drag'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151421,7 +153994,7 @@ module.exports = 'dragstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151446,7 +154019,7 @@ module.exports = 'pause'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151471,7 +154044,7 @@ module.exports = 'resume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151506,7 +154079,7 @@ module.exports = 'sleepend'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151541,7 +154114,7 @@ module.exports = 'sleepstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -151578,7 +154151,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -160662,7 +163235,7 @@ function points_eq(a,b,precision){ /** * @author Richard Davey -* @copyright 2022 Photon Storm Ltd. +* @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ @@ -160793,7 +163366,7 @@ module.exports = BasePlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -160896,7 +163469,7 @@ module.exports = DefaultPlugins; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -161106,7 +163679,7 @@ module.exports = PluginCache; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162014,7 +164587,7 @@ module.exports = PluginManager; /** * @author Richard Davey -* @copyright 2022 Photon Storm Ltd. +* @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ @@ -162157,7 +164730,7 @@ module.exports = ScenePlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162183,7 +164756,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162523,7 +165096,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -162579,7 +165152,7 @@ module.exports = ScaleModes; /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163446,7 +166019,7 @@ module.exports = CanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163470,7 +166043,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163535,7 +166108,7 @@ module.exports = GetBlendModes; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163604,7 +166177,7 @@ module.exports = SetTransform; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163628,7 +166201,7 @@ module.exports = 'postrender'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163653,7 +166226,7 @@ module.exports = 'prerender'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163681,7 +166254,7 @@ module.exports = 'render'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163708,7 +166281,7 @@ module.exports = 'resize'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163733,7 +166306,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163762,7 +166335,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163859,7 +166432,7 @@ module.exports = CanvasSnapshot; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163918,7 +166491,7 @@ var WebGLSnapshot = function (sourceContext, config) gl.readPixels(x, bufferHeight - y - height, width, height, gl.RGBA, gl.UNSIGNED_BYTE, pixels); var canvas = CanvasPool.createWebGL(this, width, height); - var ctx = canvas.getContext('2d'); + var ctx = canvas.getContext('2d', { willReadFrequently: true }); var imageData = ctx.getImageData(0, 0, width, height); @@ -163971,7 +166544,7 @@ module.exports = WebGLSnapshot; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -163994,7 +166567,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -165342,7 +167915,7 @@ module.exports = PipelineManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -165715,7 +168288,7 @@ module.exports = RenderTarget; * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @author Matthew Groves <@doormat> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -165893,7 +168466,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -168483,7 +171056,7 @@ module.exports = WebGLPipeline; /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -171374,7 +173947,7 @@ module.exports = WebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -172565,7 +175138,7 @@ module.exports = WebGLShader; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -172646,7 +175219,7 @@ module.exports = WEBGL_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -172686,7 +175259,7 @@ module.exports = WebGL; /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -172837,7 +175410,7 @@ module.exports = BitmapMaskPipeline; /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173411,7 +175984,7 @@ module.exports = LightPipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -173531,7 +176104,7 @@ module.exports = MobilePipeline; /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174525,7 +177098,7 @@ module.exports = MultiPipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -174707,7 +177280,7 @@ module.exports = PointLightPipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175198,7 +177771,7 @@ module.exports = PostFXPipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175266,7 +177839,7 @@ module.exports = RopePipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -175344,7 +177917,7 @@ module.exports = SinglePipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176180,7 +178753,7 @@ module.exports = SpriteFXPipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -176977,7 +179550,7 @@ module.exports = UtilityPipeline; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177095,7 +179668,7 @@ module.exports = PIPELINE_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177121,7 +179694,7 @@ module.exports = 'pipelineafterflush'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177147,7 +179720,7 @@ module.exports = 'pipelinebeforeflush'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177172,7 +179745,7 @@ module.exports = 'pipelinebind'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177196,7 +179769,7 @@ module.exports = 'pipelineboot'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177220,7 +179793,7 @@ module.exports = 'pipelinedestroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177245,7 +179818,7 @@ module.exports = 'pipelinerebind'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177272,7 +179845,7 @@ module.exports = 'pipelineresize'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177300,7 +179873,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -177897,7 +180470,7 @@ module.exports = [ /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -179670,7 +182243,7 @@ module.exports = ScaleManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -179757,7 +182330,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -179811,7 +182384,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -179910,7 +182483,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -179985,7 +182558,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180008,7 +182581,7 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180029,7 +182602,7 @@ module.exports = 'enterfullscreen'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180050,7 +182623,7 @@ module.exports = 'fullscreenfailed'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180071,7 +182644,7 @@ module.exports = 'fullscreenunsupported'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180093,7 +182666,7 @@ module.exports = 'leavefullscreen'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180118,7 +182691,7 @@ module.exports = 'orientationchange'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180150,7 +182723,7 @@ module.exports = 'resize'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180177,7 +182750,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180234,7 +182807,7 @@ module.exports = Scale; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180297,7 +182870,7 @@ module.exports = GetPhysicsPlugins; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180345,7 +182918,7 @@ module.exports = GetScenePlugins; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180408,7 +182981,7 @@ module.exports = InjectionMap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -180728,7 +183301,7 @@ module.exports = Scene; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -181029,8 +183602,6 @@ var SceneManager = new Class({ // Clear the pending lists this._start.length = 0; this._pending.length = 0; - - return; } for (i = 0; i < this._queue.length; i++) @@ -181303,6 +183874,11 @@ var SceneManager = new Class({ { sys.step(time, delta); } + + if (sys.scenePlugin._target) + { + sys.scenePlugin.step(time, delta); + } } }, @@ -182484,7 +185060,7 @@ module.exports = SceneManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -182834,8 +185410,6 @@ var ScenePlugin = new Class({ this.systems.events.emit(Events.TRANSITION_OUT, target, duration); - this.systems.events.on(Events.UPDATE, this.step, this); - return true; }, @@ -182902,9 +185476,6 @@ var ScenePlugin = new Class({ var targetSys = this._target.sys; var targetSettings = this._target.sys.settings; - // Stop the step - this.systems.events.off(Events.UPDATE, this.step, this); - // Notify target scene targetSys.events.emit(Events.TRANSITION_COMPLETE, this.scene); @@ -183576,7 +186147,6 @@ var ScenePlugin = new Class({ var eventEmitter = this.systems.events; eventEmitter.off(Events.SHUTDOWN, this.shutdown, this); - eventEmitter.off(Events.POST_UPDATE, this.step, this); eventEmitter.off(Events.TRANSITION_OUT); }, @@ -183615,7 +186185,7 @@ module.exports = ScenePlugin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -183712,7 +186282,7 @@ module.exports = Settings; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -184532,7 +187102,7 @@ module.exports = Systems; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -184656,7 +187226,7 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -184684,7 +187254,7 @@ module.exports = 'addedtoscene'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -184711,7 +187281,7 @@ module.exports = 'boot'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -184742,7 +187312,7 @@ module.exports = 'create'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -184771,7 +187341,7 @@ module.exports = 'destroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -184800,7 +187370,7 @@ module.exports = 'pause'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -184880,7 +187450,7 @@ module.exports = 'prerender'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -184920,7 +187490,7 @@ module.exports = 'preupdate'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -184950,7 +187520,7 @@ module.exports = 'ready'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -184978,7 +187548,7 @@ module.exports = 'removedfromscene'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185018,7 +187588,7 @@ module.exports = 'render'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185047,7 +187617,7 @@ module.exports = 'resume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185079,7 +187649,7 @@ module.exports = 'shutdown'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185108,7 +187678,7 @@ module.exports = 'sleep'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185135,7 +187705,7 @@ module.exports = 'start'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185173,7 +187743,7 @@ module.exports = 'transitioncomplete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185212,7 +187782,7 @@ module.exports = 'transitioninit'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185248,7 +187818,7 @@ module.exports = 'transitionout'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185290,7 +187860,7 @@ module.exports = 'transitionstart'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185327,7 +187897,7 @@ module.exports = 'transitionwake'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185367,7 +187937,7 @@ module.exports = 'update'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185396,7 +187966,7 @@ module.exports = 'wake'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185439,7 +188009,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185476,7 +188046,7 @@ module.exports = Scene; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -185978,7 +188548,7 @@ module.exports = BaseSound; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186728,7 +189298,7 @@ module.exports = BaseSoundManager; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186780,7 +189350,7 @@ module.exports = SoundManagerCreator; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186813,7 +189383,7 @@ module.exports = 'complete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186847,7 +189417,7 @@ module.exports = 'decodedall'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186879,7 +189449,7 @@ module.exports = 'decoded'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186913,7 +189483,7 @@ module.exports = 'destroy'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186948,7 +189518,7 @@ module.exports = 'detune'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -186978,7 +189548,7 @@ module.exports = 'detune'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187007,7 +189577,7 @@ module.exports = 'mute'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187037,7 +189607,7 @@ module.exports = 'rate'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187066,7 +189636,7 @@ module.exports = 'volume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187102,7 +189672,7 @@ module.exports = 'looped'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187138,7 +189708,7 @@ module.exports = 'loop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187173,7 +189743,7 @@ module.exports = 'mute'; /** * @author pi-kei - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187208,7 +189778,7 @@ module.exports = 'pan'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187237,7 +189807,7 @@ module.exports = 'pauseall'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187271,7 +189841,7 @@ module.exports = 'pause'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187304,7 +189874,7 @@ module.exports = 'play'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187339,7 +189909,7 @@ module.exports = 'rate'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187368,7 +189938,7 @@ module.exports = 'resumeall'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187403,7 +189973,7 @@ module.exports = 'resume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187438,7 +190008,7 @@ module.exports = 'seek'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187467,7 +190037,7 @@ module.exports = 'stopall'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187501,7 +190071,7 @@ module.exports = 'stop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187530,7 +190100,7 @@ module.exports = 'unlocked'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187565,7 +190135,7 @@ module.exports = 'volume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -187611,7 +190181,7 @@ module.exports = { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -188577,7 +191147,7 @@ module.exports = HTML5AudioSound; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -189047,7 +191617,7 @@ module.exports = HTML5AudioSoundManager; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -189084,7 +191654,7 @@ module.exports = { /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -189583,7 +192153,7 @@ module.exports = NoAudioSound; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -189950,7 +192520,7 @@ module.exports = NoAudioSoundManager; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -190940,7 +193510,7 @@ module.exports = WebAudioSound; /** * @author Richard Davey * @author Pavle Goloskokovic (http://prunegames.com) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -191434,7 +194004,7 @@ module.exports = WebAudioSoundManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192282,7 +194852,7 @@ module.exports = List; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -192658,7 +195228,7 @@ module.exports = Map; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193043,7 +195613,7 @@ module.exports = ProcessQueue; /** * @author Vladimir Agafonkin * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -193655,7 +196225,7 @@ module.exports = rbush; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194110,7 +196680,7 @@ module.exports = Set; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194889,7 +197459,7 @@ module.exports = Size; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194918,7 +197488,7 @@ module.exports = 'add'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194947,7 +197517,7 @@ module.exports = 'remove'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194970,7 +197540,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -194998,7 +197568,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195634,7 +198204,7 @@ module.exports = CanvasTexture; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -195804,7 +198374,7 @@ var DynamicTexture = new Class({ * An internal Camera that can be used to move around this Dynamic Texture. * * Control it just like you would any Scene Camera. The difference is that it only impacts - * the placement of Game Objects that you then draw to this texture. + * the placement of **Game Objects** (not textures) that you then draw to this texture. * * You can scroll, zoom and rotate this Camera. * @@ -197190,7 +199760,7 @@ module.exports = DynamicTexture; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -198048,7 +200618,7 @@ module.exports = Frame; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -198580,7 +201150,7 @@ module.exports = Texture; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200144,7 +202714,7 @@ module.exports = TextureManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200508,7 +203078,7 @@ module.exports = TextureSource; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200553,7 +203123,7 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200581,7 +203151,7 @@ module.exports = 'addtexture'; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200608,7 +203178,7 @@ module.exports = 'addtexture-'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200636,7 +203206,7 @@ module.exports = 'onerror'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200667,7 +203237,7 @@ module.exports = 'onload'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200692,7 +203262,7 @@ module.exports = 'ready'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200722,7 +203292,7 @@ module.exports = 'removetexture'; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200750,7 +203320,7 @@ module.exports = 'removetexture-'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200778,7 +203348,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200833,7 +203403,7 @@ module.exports = Textures; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200915,7 +203485,7 @@ module.exports = AtlasXML; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200951,7 +203521,7 @@ module.exports = Canvas; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -200987,7 +203557,7 @@ module.exports = Image; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201104,7 +203674,7 @@ module.exports = JSONArray; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201626,7 +204196,7 @@ module.exports = PVRParser; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201758,7 +204328,7 @@ module.exports = SpriteSheet; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -201950,7 +204520,7 @@ module.exports = SpriteSheetFromAtlas; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -202121,7 +204691,7 @@ TextureImporter: /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -202152,7 +204722,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -202208,7 +204778,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -202615,7 +205185,7 @@ module.exports = ObjectHelper; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -202702,7 +205272,7 @@ module.exports = ParseToTilemap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -203636,7 +206206,7 @@ module.exports = Tile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -204506,7 +207076,7 @@ var Tilemap = new Class({ * @since 3.0.0 * * @param {(number|array)} indexes - The tile index, or array of indexes, to create Sprites from. - * @param {(number|array)} replacements - The tile index, or array of indexes, to change a converted + * @param {?(number|array)} replacements - The tile index, or array of indexes, to change a converted * tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a * one-to-one mapping with the indexes array. * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e. scene.make.sprite). @@ -206291,7 +208861,7 @@ module.exports = Tilemap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -206336,7 +208906,7 @@ GameObjectCreator.register('tilemap', function (config) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -206403,7 +208973,7 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -206846,7 +209416,7 @@ var TilemapLayer = new Class({ * @since 3.50.0 * * @param {(number|array)} indexes - The tile index, or array of indexes, to create Sprites from. - * @param {(number|array)} replacements - The tile index, or array of indexes, to change a converted + * @param {?(number|array)} replacements - The tile index, or array of indexes, to change a converted * tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a * one-to-one mapping with the indexes array. * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} [spriteConfig] - The config object to pass into the Sprite creator (i.e. @@ -207868,7 +210438,7 @@ module.exports = TilemapLayer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208012,7 +210582,7 @@ module.exports = TilemapLayerCanvasRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208045,7 +210615,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208162,7 +210732,7 @@ module.exports = TilemapLayerWebGLRenderer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208583,7 +211153,7 @@ module.exports = Tileset; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208678,7 +211248,7 @@ module.exports = CalculateFacesAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208744,7 +211314,7 @@ module.exports = CalculateFacesWithin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208791,7 +211361,7 @@ module.exports = CheckIsoBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208887,7 +211457,7 @@ module.exports = Copy; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -208904,7 +211474,7 @@ var ReplaceByIndex = __webpack_require__(51202); * @since 3.0.0 * * @param {(number|number[])} indexes - The tile index, or array of indexes, to create Sprites from. - * @param {(number|number[])} replacements - The tile index, or array of indexes, to change a converted tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a one-to-one mapping with the indexes array. + * @param {?(number|number[])} replacements - The tile index, or array of indexes, to change a converted tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a one-to-one mapping with the indexes array. * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e. scene.make.sprite). * @param {Phaser.Scene} scene - The Scene to create the Sprites within. * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to use when determining the world XY @@ -208975,7 +211545,7 @@ module.exports = CreateFromTiles; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209032,7 +211602,7 @@ module.exports = CullBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209088,7 +211658,7 @@ module.exports = CullTiles; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209142,7 +211712,7 @@ module.exports = Fill; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209186,7 +211756,7 @@ module.exports = FilterTiles; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209273,7 +211843,7 @@ module.exports = FindByIndex; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209325,7 +211895,7 @@ module.exports = FindTile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209372,7 +211942,7 @@ module.exports = ForEachTile; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209427,7 +211997,7 @@ module.exports = GetCullTilesFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209483,7 +212053,7 @@ module.exports = GetTileAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209523,7 +212093,7 @@ module.exports = GetTileAtWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209588,7 +212158,7 @@ module.exports = GetTileCorners; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209641,7 +212211,7 @@ module.exports = GetTileCornersFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209681,7 +212251,7 @@ module.exports = GetTileToWorldXFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209736,7 +212306,7 @@ module.exports = GetTileToWorldXYFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209781,7 +212351,7 @@ module.exports = GetTileToWorldYFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -209884,7 +212454,7 @@ module.exports = GetTilesWithin; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210000,7 +212570,7 @@ module.exports = GetTilesWithinShape; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210055,7 +212625,7 @@ module.exports = GetTilesWithinWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210097,7 +212667,7 @@ module.exports = GetWorldToTileXFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210152,7 +212722,7 @@ module.exports = GetWorldToTileXYFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210197,7 +212767,7 @@ module.exports = GetWorldToTileYFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210240,7 +212810,7 @@ module.exports = HasTileAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210283,7 +212853,7 @@ module.exports = HasTileAtWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210340,7 +212910,7 @@ module.exports = HexagonalCullBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210392,7 +212962,7 @@ module.exports = HexagonalCullTiles; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210457,7 +213027,7 @@ module.exports = HexagonalGetTileCorners; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210528,7 +213098,7 @@ module.exports = HexagonalTileToWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210628,7 +213198,7 @@ module.exports = HexagonalWorldToTileXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210659,7 +213229,7 @@ module.exports = IsInLayerBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210808,7 +213378,7 @@ module.exports = IsometricCullTiles; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210870,7 +213440,7 @@ module.exports = IsometricTileToWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -210953,7 +213523,7 @@ module.exports = IsometricWorldToTileXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211052,7 +213622,7 @@ module.exports = PutTileAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211096,7 +213666,7 @@ module.exports = PutTileAtWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211164,7 +213734,7 @@ module.exports = PutTilesAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211223,7 +213793,7 @@ module.exports = Randomize; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211286,7 +213856,7 @@ module.exports = RemoveTileAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211328,7 +213898,7 @@ module.exports = RemoveTileAtWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211553,7 +214123,7 @@ for (var q = 0; q <= 9; q++) /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211598,7 +214168,7 @@ module.exports = ReplaceByIndex; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211725,7 +214295,7 @@ module.exports = RunCull; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211797,7 +214367,7 @@ module.exports = SetCollision; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211874,7 +214444,7 @@ module.exports = SetCollisionBetween; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -211936,7 +214506,7 @@ module.exports = SetCollisionByExclusion; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212012,7 +214582,7 @@ module.exports = SetCollisionByProperty; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212072,7 +214642,7 @@ module.exports = SetCollisionFromCollisionGroup; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212111,7 +214681,7 @@ module.exports = SetLayerCollisionIndex; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212147,7 +214717,7 @@ module.exports = SetTileCollision; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212194,7 +214764,7 @@ module.exports = SetTileIndexCallback; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212236,7 +214806,7 @@ module.exports = SetTileLocationCallback; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212282,7 +214852,7 @@ module.exports = Shuffle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212336,7 +214906,7 @@ module.exports = StaggeredCullBounds; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212388,7 +214958,7 @@ module.exports = StaggeredCullTiles; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212450,7 +215020,7 @@ module.exports = StaggeredTileToWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212495,7 +215065,7 @@ module.exports = StaggeredTileToWorldY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212561,7 +215131,7 @@ module.exports = StaggeredWorldToTileXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212609,7 +215179,7 @@ module.exports = StaggeredWorldToTileY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212661,7 +215231,7 @@ module.exports = SwapByIndex; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212706,7 +215276,7 @@ module.exports = TileToWorldX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212750,7 +215320,7 @@ module.exports = TileToWorldXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212795,7 +215365,7 @@ module.exports = TileToWorldY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212879,7 +215449,7 @@ module.exports = WeightedRandomize; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212919,7 +215489,7 @@ module.exports = WorldToTileX; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -212986,7 +215556,7 @@ module.exports = WorldToTileXY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213026,7 +215596,7 @@ module.exports = WorldToTileY; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213117,7 +215687,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213191,7 +215761,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213211,7 +215781,7 @@ module.exports = CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213261,7 +215831,7 @@ module.exports = Tilemaps; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213502,7 +216072,7 @@ module.exports = LayerData; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213770,7 +216340,7 @@ module.exports = MapData; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213899,7 +216469,7 @@ module.exports = ObjectLayer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -213947,7 +216517,7 @@ module.exports = FromOrientationString; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214018,7 +216588,7 @@ module.exports = Parse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214111,7 +216681,7 @@ module.exports = Parse2DArray; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214160,7 +216730,7 @@ module.exports = ParseCSV; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214247,7 +216817,7 @@ module.exports = ParseTileLayers; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214299,7 +216869,7 @@ module.exports = ParseTilesets; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214367,7 +216937,7 @@ module.exports = ParseWeltmeister; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214391,7 +216961,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214419,7 +216989,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214493,7 +217063,7 @@ module.exports = AssignTileProperties; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214537,7 +217107,7 @@ module.exports = Base64Decode; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214632,7 +217202,7 @@ module.exports = BuildTilesetIndex; /** * @author Seth Berrier - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214693,7 +217263,7 @@ module.exports = CreateGroupLayer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214784,7 +217354,7 @@ module.exports = ParseGID; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214873,7 +217443,7 @@ module.exports = ParseImageLayers; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -214959,7 +217529,7 @@ module.exports = ParseJSONTiled; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -215040,7 +217610,7 @@ module.exports = ParseObject; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -215140,7 +217710,7 @@ module.exports = ParseObjectLayers; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -215411,7 +217981,7 @@ module.exports = ParseTileLayers; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -215607,7 +218177,7 @@ module.exports = ParseTilesets; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -215749,7 +218319,7 @@ module.exports = ParseWangsets; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -215781,7 +218351,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -216258,7 +218828,7 @@ module.exports = Clock; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -216629,7 +219199,7 @@ module.exports = TimerEvent; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -216652,7 +219222,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -217779,7 +220349,7 @@ module.exports = TweenManager; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -217821,7 +220391,7 @@ module.exports = GetBoolean; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -217929,7 +220499,7 @@ module.exports = GetEaseFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -217997,7 +220567,7 @@ module.exports = GetInterpolationFunction; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -218062,7 +220632,7 @@ module.exports = GetNewValue; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -218124,7 +220694,7 @@ module.exports = GetProps; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -218174,7 +220744,7 @@ module.exports = GetTargets; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -218505,7 +221075,7 @@ module.exports = GetValueOp; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -218633,7 +221203,7 @@ module.exports = NumberTweenBuilder; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -218880,7 +221450,7 @@ module.exports = StaggerBuilder; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219085,7 +221655,7 @@ module.exports = TweenBuilder; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219184,7 +221754,7 @@ module.exports = TweenChainBuilder; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219215,7 +221785,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219261,7 +221831,7 @@ module.exports = 'active'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219304,7 +221874,7 @@ module.exports = 'complete'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219350,7 +221920,7 @@ module.exports = 'loop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219389,7 +221959,7 @@ module.exports = 'pause'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219438,7 +222008,7 @@ module.exports = 'repeat'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219477,7 +222047,7 @@ module.exports = 'resume'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219519,7 +222089,7 @@ module.exports = 'start'; /** * @author samme - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219557,7 +222127,7 @@ module.exports = 'stop'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219602,7 +222172,7 @@ module.exports = 'update'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219652,7 +222222,7 @@ module.exports = 'yoyo'; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219683,7 +222253,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -219717,7 +222287,7 @@ module.exports = Tweens; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -220614,7 +223184,7 @@ module.exports = BaseTween; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -221288,7 +223858,7 @@ module.exports = BaseTweenData; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -221337,7 +223907,7 @@ module.exports = TWEEN_DEFAULTS; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -221410,7 +223980,7 @@ module.exports = [ /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -221699,13 +224269,13 @@ var Tween = new Class({ { if (startToCurrent === undefined) { startToCurrent = false; } - if (key !== 'texture' && (this.isPlayingForward() || this.isPlayingBackward())) + if (key !== 'texture') { for (var i = 0; i < this.totalData; i++) { var tweenData = this.data[i]; - if (tweenData.key === key) + if (tweenData.key === key && (tweenData.isPlayingForward() || tweenData.isPlayingBackward())) { tweenData.end = value; @@ -222262,7 +224832,7 @@ module.exports = Tween; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -222827,7 +225397,7 @@ module.exports = TweenChain; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -223249,7 +225819,7 @@ module.exports = TweenData; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -223572,7 +226142,7 @@ module.exports = TweenFrameData; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -223798,7 +226368,7 @@ module.exports = TWEEN_CONST; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224055,7 +226625,7 @@ module.exports = Class; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224083,7 +226653,7 @@ module.exports = NOOP; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224113,7 +226683,7 @@ module.exports = NULL; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224231,7 +226801,7 @@ module.exports = Add; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224354,7 +226924,7 @@ module.exports = AddAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224393,7 +226963,7 @@ module.exports = BringToTop; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224446,7 +227016,7 @@ module.exports = CountAllMatching; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224493,7 +227063,7 @@ module.exports = Each; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224550,7 +227120,7 @@ module.exports = EachInRange; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224635,7 +227205,7 @@ module.exports = FindClosestInSorted; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224679,7 +227249,7 @@ module.exports = Flatten; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224742,7 +227312,7 @@ module.exports = GetAll; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224802,7 +227372,7 @@ module.exports = GetFirst; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224838,7 +227408,7 @@ module.exports = GetRandom; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224903,7 +227473,7 @@ module.exports = MoveAbove; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -224968,7 +227538,7 @@ module.exports = MoveBelow; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225011,7 +227581,7 @@ module.exports = MoveDown; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225059,7 +227629,7 @@ module.exports = MoveTo; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225102,7 +227672,7 @@ module.exports = MoveUp; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225196,7 +227766,7 @@ module.exports = NumberArray; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225274,7 +227844,7 @@ module.exports = NumberArrayStep; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225397,7 +227967,7 @@ module.exports = QuickSelect; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225536,7 +228106,7 @@ module.exports = Range; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225626,7 +228196,7 @@ module.exports = Remove; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225678,7 +228248,7 @@ module.exports = RemoveAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225742,7 +228312,7 @@ module.exports = RemoveBetween; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225781,7 +228351,7 @@ module.exports = RemoveRandomElement; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225826,7 +228396,7 @@ module.exports = Replace; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225867,7 +228437,7 @@ module.exports = RotateLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225908,7 +228478,7 @@ module.exports = RotateRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225957,7 +228527,7 @@ module.exports = SafeRange; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -225996,7 +228566,7 @@ module.exports = SendToBack; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226052,7 +228622,7 @@ module.exports = SetAll; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226094,7 +228664,7 @@ module.exports = Shuffle; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226133,7 +228703,7 @@ module.exports = SortByDigits; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226181,7 +228751,7 @@ module.exports = SpliceOne; /** * @author Richard Davey * @author Angry Bytes (and contributors) - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226370,7 +228940,7 @@ module.exports = StableSort; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226419,7 +228989,7 @@ module.exports = Swap; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226477,7 +229047,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226540,7 +229110,7 @@ module.exports = CheckMatrix; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226636,7 +229206,7 @@ module.exports = MatrixToString; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226682,7 +229252,7 @@ module.exports = ReverseColumns; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226733,7 +229303,7 @@ module.exports = ReverseRows; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226781,7 +229351,7 @@ module.exports = Rotate180; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226829,7 +229399,7 @@ module.exports = RotateLeft; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226916,7 +229486,7 @@ module.exports = RotateMatrix; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -226964,7 +229534,7 @@ module.exports = RotateRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227054,7 +229624,7 @@ module.exports = TranslateMatrix; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227117,7 +229687,7 @@ module.exports = TransposeMatrix; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227149,7 +229719,7 @@ module.exports = { /** * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227208,7 +229778,7 @@ module.exports = ArrayBufferToBase64; /** * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer) * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227283,7 +229853,7 @@ module.exports = Base64ToArrayBuffer; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227306,7 +229876,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227333,7 +229903,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227376,7 +229946,7 @@ module.exports = Clone; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227426,7 +229996,7 @@ module.exports = DeepCopy; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227528,7 +230098,7 @@ module.exports = Extend; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227616,7 +230186,7 @@ module.exports = GetAdvancedValue; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227660,7 +230230,7 @@ module.exports = GetFastValue; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227700,7 +230270,7 @@ module.exports = GetMinMaxValue; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227819,7 +230389,7 @@ module.exports = GetValue; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227857,7 +230427,7 @@ module.exports = HasAll; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227895,7 +230465,7 @@ module.exports = HasAny; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227925,7 +230495,7 @@ module.exports = HasValue; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -227982,7 +230552,7 @@ module.exports = IsPlainObject; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228028,7 +230598,7 @@ module.exports = Merge; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228072,7 +230642,7 @@ module.exports = MergeRight; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228117,7 +230687,7 @@ module.exports = Pick; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228201,7 +230771,7 @@ module.exports = SetValue; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228237,7 +230807,7 @@ module.exports = { /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228273,7 +230843,7 @@ module.exports = Format; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228350,7 +230920,7 @@ module.exports = Pad; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228387,7 +230957,7 @@ module.exports = RemoveAt; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228417,7 +230987,7 @@ module.exports = Reverse; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228453,7 +231023,7 @@ module.exports = UUID; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ @@ -228491,7 +231061,7 @@ module.exports = UppercaseFirst; /** * @author Richard Davey - * @copyright 2022 Photon Storm Ltd. + * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ diff --git a/dist/phaser.min.js b/dist/phaser.min.js index 14626a042c..94957a650e 100644 --- a/dist/phaser.min.js +++ b/dist/phaser.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Phaser",[],e):"object"==typeof exports?exports.Phaser=e():t.Phaser=e()}(this,(()=>(()=>{var t={6659:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function s(){}function n(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function r(t,e,s,r,o){if("function"!=typeof s)throw new TypeError("The listener must be a function");var a=new n(s,r||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 s:delete t._events[e]}function a(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(i=!1)),a.prototype.eventNames=function(){var t,s,n=[];if(0===this._eventsCount)return n;for(s in t=this._events)e.call(t,s)&&n.push(i?s.slice(1):s);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},a.prototype.listeners=function(t){var e=i?i+t:t,s=this._events[e];if(!s)return[];if(s.fn)return[s.fn];for(var n=0,r=s.length,o=new Array(r);n{var s=i(82590);t.exports=function(t,e,i,n){for(var r=t[0],o=1;o{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"angle",e,i,n,r)}},22015:t=>{t.exports=function(t,e,i){for(var s=0;s{t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=i;s{t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=i;s{var s=i(40327),n=i(84093),r=i(72632),o=i(72283),a=new(i(71030))({sys:{queueDepthSort:o,events:{once:o}}},0,0,1,1).setOrigin(0,0);t.exports=function(t,e){void 0===e&&(e={});var i=e.hasOwnProperty("width"),o=e.hasOwnProperty("height"),h=r(e,"width",-1),l=r(e,"height",-1),u=r(e,"cellWidth",1),c=r(e,"cellHeight",u),d=r(e,"position",n.TOP_LEFT),p=r(e,"x",0),f=r(e,"y",0),v=0,g=0,m=h*u,y=l*c;a.setPosition(p,f),a.setSize(u,c);for(var x=0;x{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"alpha",e,i,n,r)}},3877:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"x",e,i,n,r)}},71020:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"x",e,n,o,a),s(t,"y",i,r,o,a)}},28970:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"y",e,i,n,r)}},82249:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=6.28);for(var n=i,r=(s-i)/t.length,o=e.x,a=e.y,h=e.radius,l=0;l{t.exports=function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=6.28);for(var n=i,r=(s-i)/t.length,o=e.width/2,a=e.height/2,h=0;h{var s=i(8570);t.exports=function(t,e){for(var i=s(e,t.length),n=0;n{var s=i(40053),n=i(77640),r=i(38487);t.exports=function(t,e,i){void 0===i&&(i=0);var o=s(e,!1,t.length);i>0?n(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a{var s=i(58813);t.exports=function(t,e,i){var n=s({x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},i),r=s({x1:e.x2,y1:e.y2,x2:e.x3,y2:e.y3},i),o=s({x1:e.x3,y1:e.y3,x2:e.x1,y2:e.y1},i);n.pop(),r.pop(),o.pop();for(var a=(n=n.concat(r,o)).length/t.length,h=0,l=0;l{t.exports=function(t,e,i){for(var s=0;s{t.exports=function(t,e,i,s,n,r){var o;void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=1);var a=0,h=t.length;if(1===r)for(o=n;o=0;o--)t[o][e]+=i+a*s,a++;return t}},23646:t=>{t.exports=function(t,e,i,s,n,r){var o;void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=1);var a=0,h=t.length;if(1===r)for(o=n;o=0;o--)t[o][e]=i+a*s,a++;return t}},4392:(t,e,i)=>{var s=i(30977);t.exports=function(t,e){for(var i=0;i{var s=i(72006);t.exports=function(t,e){for(var i=0;i{var s=i(74077);t.exports=function(t,e){for(var i=0;i{var s=i(30001);t.exports=function(t,e){for(var i=0;i{var s=i(99761);t.exports=function(t,e){for(var i=0;i{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"rotation",e,i,n,r)}},87299:(t,e,i)=>{var s=i(72395),n=i(53996);t.exports=function(t,e,i){for(var r=e.x,o=e.y,a=0;a{var s=i(72395);t.exports=function(t,e,i,n){var r=e.x,o=e.y;if(0===n)return t;for(var a=0;a{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"scaleX",e,i,n,r)}},51449:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"scaleX",e,n,o,a),s(t,"scaleY",i,r,o,a)}},64895:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"scaleY",e,i,n,r)}},30329:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"alpha",e,i,n,r)}},43954:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n){return s(t,"blendMode",e,0,i,n)}},70688:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"depth",e,i,n,r)}},8314:t=>{t.exports=function(t,e,i){for(var s=0;s{var s=i(23646);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"originX",e,n,o,a),s(t,"originY",i,r,o,a),t.forEach((function(t){t.updateDisplayOrigin()})),t}},38767:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"rotation",e,i,n,r)}},18584:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"scaleX",e,n,o,a),s(t,"scaleY",i,r,o,a)}},17381:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scaleX",e,i,n,r)}},74370:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scaleY",e,i,n,r)}},27773:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"scrollFactorX",e,n,o,a),s(t,"scrollFactorY",i,r,o,a)}},75257:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scrollFactorX",e,i,n,r)}},54512:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scrollFactorY",e,i,n,r)}},69423:t=>{t.exports=function(t,e,i,s,n){for(var r=0;r{var s=i(23646);t.exports=function(t,e,i,n){return s(t,"visible",e,0,i,n)}},94833:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"x",e,i,n,r)}},14284:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"x",e,n,o,a),s(t,"y",i,r,o,a)}},96574:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"y",e,i,n,r)}},74086:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){var o,a;void 0===n&&(n=0),void 0===r&&(r=new s);var h=t.length;if(1===h)o=t[0].x,a=t[0].y,t[0].x=e,t[0].y=i;else{var l=1,u=0;0===n&&(u=h-1,l=h-2),o=t[u].x,a=t[u].y,t[u].x=e,t[u].y=i;for(var c=0;c=h||-1===l)){var d=t[l],p=d.x,f=d.y;d.x=o,d.y=a,o=p,a=f,0===n?l--:l++}}return r.x=o,r.y=a,r}},86347:(t,e,i)=>{var s=i(18592);t.exports=function(t){return s(t)}},1558:(t,e,i)=>{var s=i(5514);t.exports=function(t,e,i,n,r){void 0===r&&(r=!1);var o,a=Math.abs(n-i)/t.length;if(r)for(o=0;o{var s=i(87736);t.exports=function(t,e,i,n,r){void 0===r&&(r=!1);var o,a=Math.abs(n-i)/t.length;if(r)for(o=0;o{t.exports=function(t,e,i,s,n){if(void 0===n&&(n=!1),0===t.length)return t;if(1===t.length)return n?t[0][e]+=(s+i)/2:t[0][e]=(s+i)/2,t;var r,o=Math.abs(s-i)/(t.length-1);if(n)for(r=0;r{t.exports=function(t){for(var e=0;e{var s=i(1071);t.exports=function(t,e,i){void 0===i&&(i=0);for(var n=0;n{t.exports={AlignTo:i(62270),Angle:i(61148),Call:i(22015),GetFirst:i(31060),GetLast:i(52367),GridAlign:i(12673),IncAlpha:i(691),IncX:i(3877),IncXY:i(71020),IncY:i(28970),PlaceOnCircle:i(82249),PlaceOnEllipse:i(30285),PlaceOnLine:i(61557),PlaceOnRectangle:i(63549),PlaceOnTriangle:i(51629),PlayAnimation:i(1045),PropertyValueInc:i(6124),PropertyValueSet:i(23646),RandomCircle:i(4392),RandomEllipse:i(94985),RandomLine:i(63305),RandomRectangle:i(90739),RandomTriangle:i(91417),Rotate:i(26182),RotateAround:i(87299),RotateAroundDistance:i(92194),ScaleX:i(30363),ScaleXY:i(51449),ScaleY:i(64895),SetAlpha:i(30329),SetBlendMode:i(43954),SetDepth:i(70688),SetHitArea:i(8314),SetOrigin:i(12894),SetRotation:i(38767),SetScale:i(18584),SetScaleX:i(17381),SetScaleY:i(74370),SetScrollFactor:i(27773),SetScrollFactorX:i(75257),SetScrollFactorY:i(54512),SetTint:i(69423),SetVisible:i(58291),SetX:i(94833),SetXY:i(14284),SetY:i(96574),ShiftPosition:i(74086),Shuffle:i(86347),SmootherStep:i(9938),SmoothStep:i(1558),Spread:i(71060),ToggleVisible:i(11207),WrapInRectangle:i(24404)}},85463:(t,e,i)=>{var s=i(82897),n=i(56694),r=i(16938),o=i(2406),a=i(71519),h=i(10850),l=i(28834),u=new n({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,h(i,"frames",[]),h(i,"defaultTextureKey",null),h(i,"sortFrames",!0)),this.frameRate=h(i,"frameRate",null),this.duration=h(i,"duration",null),this.msPerFrame,this.skipMissedFrames=h(i,"skipMissedFrames",!0),this.delay=h(i,"delay",0),this.repeat=h(i,"repeat",0),this.repeatDelay=h(i,"repeatDelay",0),this.yoyo=h(i,"yoyo",!1),this.showBeforeDelay=h(i,"showBeforeDelay",!1),this.showOnStart=h(i,"showOnStart",!1),this.hideOnComplete=h(i,"hideOnComplete",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(r.PAUSE_ALL,this.pause,this),this.manager.on(r.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(t,e,i,s){null===i&&null===s?(t.frameRate=24,t.duration=24/e*1e3):i&&null===s?(t.duration=i,t.frameRate=e/(i/1e3)):(t.frameRate=s,t.duration=e/s*1e3),t.msPerFrame=1e3/t.frameRate},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i=this.getFrames(this.manager.textureManager,e);if(i.length>0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var s=this.frames.slice(0,t),n=this.frames.slice(t);this.frames=s.concat(i,n)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t0){r.isLast=!0,r.nextFrame=c[0],c[0].prevFrame=r;var y=1/(c.length-1);for(o=0;o0?t.inReverse&&t.forward?t.forward=!1:this.repeatAnimation(t):t.complete():this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e||(e=!1),t.inReverse===!e&&t.repeatCounter>0)return(0===t.repeatDelay||t.pendingRepeat)&&(t.forward=e),void this.repeatAnimation(t);if(t.inReverse===e||0!==t.repeatCounter){t.forward=e;var i=e?t.currentFrame.nextFrame:t.currentFrame.prevFrame;this.updateAndGetNextTick(t,i)}else t.complete()},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.yoyo?this.handleYoyoFrame(t,!0):t.repeatCounter>0?(t.inReverse&&!t.forward||(t.forward=!0),this.repeatAnimation(t)):t.complete():this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.setCurrentFrame(e),this.getNextTick(t)},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop){if(0===t._pendingStopValue)return t.stop();t._pendingStopValue--}t.repeatDelay>0&&!t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t.repeatDelay):(t.repeatCounter--,t.forward?t.setCurrentFrame(t.currentFrame.nextFrame):t.setCurrentFrame(t.currentFrame.prevFrame),t.isPlaying&&(this.getNextTick(t),t.handleRepeat()))},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showBeforeDelay:this.showBeforeDelay,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach((function(e){t.frames.push(e.toJSON())})),t},updateFrameSequence:function(){for(var t,e=this.frames.length,i=1/(e-1),s=0;s1?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):e>1&&(t.prevFrame=this.frames[s-1],t.nextFrame=this.frames[s+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(r.PAUSE_ALL,this.pause,this),this.manager.off(r.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var t=0;t{var s=new(i(56694))({initialize:function(t,e,i,s,n){void 0===n&&(n=!1),this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=s,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=n},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});t.exports=s},90249:(t,e,i)=>{var s=i(85463),n=i(56694),r=i(33885),o=i(6659),a=i(16938),h=i(97081),l=i(72632),u=i(10850),c=i(76400),d=i(13401),p=new n({Extends:o,initialize:function(t){o.call(this),this.game=t,this.textureManager=null,this.globalTimeScale=1,this.anims=new r,this.mixes=new r,this.paused=!1,this.name="AnimationManager",t.events.once(h.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(h.DESTROY,this.destroy,this)},addMix:function(t,e,i){var s=this.anims,n=this.mixes,r="string"==typeof t?t:t.key,o="string"==typeof e?e:e.key;if(s.has(r)&&s.has(o)){var a=n.get(r);a||(a={}),a[o]=i,n.set(r,a)}return this},removeMix:function(t,e){var i=this.mixes,s="string"==typeof t?t:t.key,n=i.get(s);if(n)if(e){var r="string"==typeof e?e:e.key;n.hasOwnProperty(r)&&delete n[r]}else e||i.delete(s);return this},getMix:function(t,e){var i=this.mixes,s="string"==typeof t?t:t.key,n="string"==typeof e?e:e.key,r=i.get(s);return r&&r.hasOwnProperty(n)?r[n]:0},add:function(t,e){return this.anims.has(t)?(console.warn("Animation key exists: "+t),this):(e.key=t,this.anims.set(t,e),this.emit(a.ADD_ANIMATION,t,e),this)},exists:function(t){return this.anims.has(t)},createFromAseprite:function(t,e,i){var s=[],n=this.game.cache.json.get(t);if(!n)return s;var r=this,o=u(n,"meta",null),a=u(n,"frames",null);o&&a&&u(o,"frameTags",[]).forEach((function(n){var o=[],h=l(n,"name",null),u=l(n,"from",0),c=l(n,"to",0),d=l(n,"direction","forward");if(h&&(!e||e&&e.indexOf(h)>-1)){for(var p=0,f=u;f<=c;f++){var v=f.toString(),g=a[v];if(g){var m=l(g,"duration",Number.MAX_SAFE_INTEGER);o.push({key:t,frame:v,duration:m}),p+=m}}var y=p/o.length;o.forEach((function(t){t.duration-=y})),"reverse"===d&&(o=o.reverse());var x,T={key:h,frames:o,duration:p,yoyo:"pingpong"===d};i?i.anims&&(x=i.anims.create(T)):x=r.create(T),x&&s.push(x)}}));return s},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))||(i=new s(this,e,t),this.anims.set(e,i),this.emit(a.ADD_ANIMATION,e,i))),i},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var s=0;s{var s=i(56694),n=i(33885),r=i(72632),o=i(16938),a=i(85463),h=new s({initialize:function(t){this.parent=t,this.animationManager=t.scene.sys.anims,this.animationManager.on(o.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.showBeforeDelay=!1,this.showOnStart=!1,this.hideOnComplete=!1,this.forward=!0,this.inReverse=!1,this.accumulator=0,this.nextTick=0,this.delayCounter=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},chain:function(t){var e=this.parent;if(void 0===t)return this.nextAnimsQueue.length=0,this.nextAnim=null,e;Array.isArray(t)||(t=[t]);for(var i=0;is.getTotalFrames()&&(h=0);var l=s.frames[h];0!==h||this.forward||(l=s.getLastFrame()),this.currentFrame=l}else console.warn("Missing animation: "+i);return this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.setCurrentFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.setCurrentFrame(t),this.parent},playAfterDelay:function(t,e){if(this.isPlaying){var i=this.nextAnim,s=this.nextAnimsQueue;i&&s.unshift(i),this.nextAnim=t,this._pendingStop=1,this._pendingStopValue=e}else this.delayCounter=e,this.play(t,!0);return this.parent},playAfterRepeat:function(t,e){if(void 0===e&&(e=1),this.isPlaying){var i=this.nextAnim,s=this.nextAnimsQueue;i&&s.unshift(i),-1!==this.repeatCounter&&e>this.repeatCounter&&(e=this.repeatCounter),this.nextAnim=t,this._pendingStop=2,this._pendingStopValue=e}else this.play(t);return this.parent},play:function(t,e){void 0===e&&(e=!1);var i=this.currentAnim,s=this.parent,n="string"==typeof t?t:t.key;if(e&&this.isPlaying&&i.key===n)return s;if(i&&this.isPlaying){var r=this.animationManager.getMix(i.key,t);if(r>0)return this.playAfterDelay(t,r)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t)},playReverse:function(t,e){void 0===e&&(e=!1);var i="string"==typeof t?t:t.key;return e&&this.isPlaying&&this.currentAnim.key===i?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t))},startAnimation:function(t){this.load(t);var e=this.currentAnim,i=this.parent;return e?(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat,e.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,0===this.delayCounter?this.handleStart():this.showBeforeDelay&&this.setCurrentFrame(this.currentFrame),i):i},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(o.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(o.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(o.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(o.ANIMATION_COMPLETE,o.ANIMATION_COMPLETE_KEY)},emitEvents:function(t,e){var i=this.currentAnim;if(i){var s=this.currentFrame,n=this.parent,r=s.textureFrame;n.emit(t,i,s,n,r),e&&n.emit(e+i.key,i,s,n,r)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var t=this.currentFrame;if(!t)return 0;var e=t.progress;return this.inReverse&&(e*=-1),e},setProgress:function(t){return this.forward||(t=1-t),this.setCurrentFrame(this.currentAnim.getFrameByProgress(t)),this.parent},setRepeat:function(t){return this.repeatCounter=-1===t?Number.MAX_VALUE:t,this.parent},globalRemove:function(t,e){void 0===e&&(e=this.currentAnim),this.isPlaying&&e.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var i=this.currentAnim,s=this.parent;return i?(e&&(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat),i.getFirstTick(this),this.emitEvents(o.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!t,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(i.frames[0]),this.parent):s},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(t)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(t)}return this.parent},stopAfterDelay:function(t){return this._pendingStop=1,this._pendingStopValue=t,this.parent},stopAfterRepeat:function(t){return void 0===t&&(t=1),-1!==this.repeatCounter&&t>this.repeatCounter&&(t=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=t,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(t,e){var i=this.currentAnim;if(this.isPlaying&&i&&!i.paused){if(this.accumulator+=e*this.timeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.stop();if(this.hasStarted){if(this.accumulator>=this.nextTick&&(this.forward?i.nextFrame(this):i.previousFrame(this),this.isPlaying&&0===this._pendingStop&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var s=0;do{this.forward?i.nextFrame(this):i.previousFrame(this),s++}while(this.isPlaying&&this.accumulator>this.nextTick&&s<60)}}else this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart())}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),t.setAlpha&&(e.alpha=t.alpha),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(o.ANIMATION_UPDATE),3===this._pendingStop&&this._pendingStopValue===t&&this.stop()),e},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(t){return this.anims?this.anims.get(t):null},exists:function(t){return!!this.anims&&this.anims.has(t)},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))||(i=new a(this,e,t),this.anims||(this.anims=new n),this.anims.set(e,i))),i},createFromAseprite:function(t,e){return this.animationManager.createFromAseprite(t,e,this.parent)},generateFrameNames:function(t,e){return this.animationManager.generateFrameNames(t,e)},generateFrameNumbers:function(t,e){return this.animationManager.generateFrameNumbers(t,e)},remove:function(t){var e=this.get(t);return e&&(this.currentAnim===e&&this.stop(),this.anims.delete(t)),e},destroy:function(){this.animationManager.off(o.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});t.exports=h},44509:t=>{t.exports="add"},84563:t=>{t.exports="animationcomplete"},61586:t=>{t.exports="animationcomplete-"},72175:t=>{t.exports="animationrepeat"},568:t=>{t.exports="animationrestart"},37690:t=>{t.exports="animationstart"},58525:t=>{t.exports="animationstop"},5243:t=>{t.exports="animationupdate"},10598:t=>{t.exports="pauseall"},4860:t=>{t.exports="remove"},31865:t=>{t.exports="resumeall"},16938:(t,e,i)=>{t.exports={ADD_ANIMATION:i(44509),ANIMATION_COMPLETE:i(84563),ANIMATION_COMPLETE_KEY:i(61586),ANIMATION_REPEAT:i(72175),ANIMATION_RESTART:i(568),ANIMATION_START:i(37690),ANIMATION_STOP:i(58525),ANIMATION_UPDATE:i(5243),PAUSE_ALL:i(10598),REMOVE_ANIMATION:i(4860),RESUME_ALL:i(31865)}},13517:(t,e,i)=>{t.exports={Animation:i(85463),AnimationFrame:i(71519),AnimationManager:i(90249),AnimationState:i(16569),Events:i(16938)}},23740:(t,e,i)=>{var s=i(56694),n=i(33885),r=i(6659),o=i(69773),a=new s({initialize:function(){this.entries=new n,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit(o.ADD,this,t,e),this},has:function(t){return this.entries.has(t)},exists:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit(o.REMOVE,this,t,e.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=a},43474:(t,e,i)=>{var s=i(23740),n=i(56694),r=i(97081),o=new n({initialize:function(t){this.game=t,this.binary=new s,this.bitmapFont=new s,this.json=new s,this.physics=new s,this.shader=new s,this.audio=new s,this.video=new s,this.text=new s,this.html=new s,this.obj=new s,this.tilemap=new s,this.xml=new s,this.custom={},this.game.events.once(r.DESTROY,this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new s),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],e=0;e{t.exports="add"},75968:t=>{t.exports="remove"},69773:(t,e,i)=>{t.exports={ADD:i(94762),REMOVE:i(75968)}},45820:(t,e,i)=>{t.exports={BaseCache:i(23740),CacheManager:i(43474),Events:i(69773)}},51052:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(75606),o=i(6659),a=i(89787),h=i(74118),l=i(69360),u=i(93222),c=i(93736),d=new s({Extends:o,Mixins:[n.Alpha,n.Visible],initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),o.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new h,this.dirty=!0,this._x=t,this._y=e,this._width=i,this._height=s,this._bounds=new h,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new l,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new c(i/2,s/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0},addToRenderList:function(t){this.renderList.push(t)},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this},getScroll:function(t,e,i){void 0===i&&(i=new c);var s=.5*this.width,n=.5*this.height;return i.x=t-s,i.y=e-n,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOnX:function(t){var e=.5*this.width;return this.midPoint.x=t,this.scrollX=t-e,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(t){var e=.5*this.height;return this.midPoint.y=t,this.scrollY=t-e,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(t,e){return this.centerOnX(t),this.centerOnY(e),this},centerToBounds:function(){if(this.useBounds){var t=this._bounds,e=.5*this.width,i=.5*this.height;this.midPoint.set(t.centerX,t.centerY),this.scrollX=t.centerX-e,this.scrollY=t.centerY-i}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(t){if(this.disableCull)return t;var e=this.matrix.matrix,i=e[0],s=e[1],n=e[2],r=e[3],o=i*r-s*n;if(!o)return t;var a=e[4],h=e[5],l=this.scrollX,u=this.scrollY,c=this.width,d=this.height,p=this.y,f=p+d,v=this.x,g=v+c,m=this.culledObjects,y=t.length;o=1/o,m.length=0;for(var x=0;xv&&E*i+S*n+ap&&E*s+S*r+hn&&(t=n),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,s=e.y+(i-this.height)/2,n=Math.max(s,s+e.height-i);return tn&&(t=n),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=r(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,s,n){return void 0===n&&(n=!1),this._bounds.setTo(t,e,i,s),this.dirty=!0,this.useBounds=!0,n?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t,e){void 0===e&&(e=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=t,this.isSceneCamera=e;var i=t.sys;return this.sceneManager=i.game.scene,this.scaleManager=i.scale,this.cameraManager=i.cameras,this.updateSystem(),this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setZoom:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),0===t&&(t=.001),0===e&&(e=.001),this.zoomX=t,this.zoomY=e,this},setMask:function(t,e){return void 0===e&&(e=!0),this.mask=t,this._maskCamera=e?this.cameraManager.default:this,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},update:function(){},setIsSceneCamera:function(t){return this.isSceneCamera=t,this},updateSystem:function(){if(this.scaleManager&&this.isSceneCamera){var t=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,e=this.sceneManager;t&&!this._customViewport?e.customViewports++:!t&&this._customViewport&&e.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit(a.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(t){this._x=t,this.updateSystem()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.updateSystem()}},width:{get:function(){return this._width},set:function(t){this._width=t,this.updateSystem()}},height:{get:function(){return this._height},set:function(t){this._height=t,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(t){t!==this._scrollX&&(this._scrollX=t,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(t){t!==this._scrollY&&(this._scrollY=t,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(t){this._zoomX=t,this._zoomY=t,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(t){this._zoomX=t,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(t){this._zoomY=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});t.exports=d},47751:(t,e,i)=>{var s=i(51052),n=i(79993),r=i(82897),o=i(56694),a=i(64937),h=i(53030),l=i(89787),u=i(42798),c=i(74118),d=i(93736),p=new o({Extends:s,Mixins:[a.Pipeline],initialize:function(t,e,i,n){s.call(this,t,e,i,n),this.postPipelines=[],this.pipelineData={},this.inputEnabled=!0,this.fadeEffect=new h.Fade(this),this.flashEffect=new h.Flash(this),this.shakeEffect=new h.Shake(this),this.panEffect=new h.Pan(this),this.rotateToEffect=new h.RotateTo(this),this.zoomEffect=new h.Zoom(this),this.lerp=new d(1,1),this.followOffset=new d,this.deadzone=null,this._follow=null},setDeadzone:function(t,e){if(void 0===t)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=t,this.deadzone.height=e):this.deadzone=new c(0,0,t,e),this._follow){var i=this.width/2,s=this.height/2,r=this._follow.x-this.followOffset.x,o=this._follow.y-this.followOffset.y;this.midPoint.set(r,o),this.scrollX=r-i,this.scrollY=o-s}n(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(t,e,i,s,n,r){return this.fadeEffect.start(!1,t,e,i,s,!0,n,r)},fadeOut:function(t,e,i,s,n,r){return this.fadeEffect.start(!0,t,e,i,s,!0,n,r)},fadeFrom:function(t,e,i,s,n,r,o){return this.fadeEffect.start(!1,t,e,i,s,n,r,o)},fade:function(t,e,i,s,n,r,o){return this.fadeEffect.start(!0,t,e,i,s,n,r,o)},flash:function(t,e,i,s,n,r,o){return this.flashEffect.start(t,e,i,s,n,r,o)},shake:function(t,e,i,s,n){return this.shakeEffect.start(t,e,i,s,n)},pan:function(t,e,i,s,n,r,o){return this.panEffect.start(t,e,i,s,n,r,o)},rotateTo:function(t,e,i,s,n,r,o){return this.rotateToEffect.start(t,e,i,s,n,r,o)},zoomTo:function(t,e,i,s,n,r){return this.zoomEffect.start(t,e,i,s,n,r)},preRender:function(){this.renderList.length=0;var t=this.width,e=this.height,i=.5*t,s=.5*e,r=this.zoom,o=this.matrix,a=t*this.originX,h=e*this.originY,c=this._follow,d=this.deadzone,p=this.scrollX,f=this.scrollY;d&&n(d,this.midPoint.x,this.midPoint.y);var v=!1;if(this.roundPixels&&(a=Math.floor(a),h=Math.floor(h)),c&&!this.panEffect.isRunning){var g=this.lerp,m=c.x-this.followOffset.x,y=c.y-this.followOffset.y;this.roundPixels&&(m=Math.floor(m),y=Math.floor(y)),d?(md.right&&(p=u(p,p+(m-d.right),g.x)),yd.bottom&&(f=u(f,f+(y-d.bottom),g.y))):(p=u(p,m-a,g.x),f=u(f,y-h,g.y)),v=!0}this.useBounds&&(p=this.clampX(p),f=this.clampY(f)),this.roundPixels&&(p=Math.floor(p),f=Math.floor(f)),this.scrollX=p,this.scrollY=f;var x=p+i,T=f+s;this.midPoint.set(x,T);var w=t/r,b=e/r,E=x-w/2,S=T-b/2;this.roundPixels&&(E=Math.floor(E),S=Math.floor(S)),this.worldView.setTo(E,S,w,b),o.applyITRS(Math.floor(this.x+a),Math.floor(this.y+h),this.rotation,r,r),o.translate(-a,-h),this.shakeEffect.preRender(),v&&this.emit(l.FOLLOW_UPDATE,this,c)},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,s,n,o){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===s&&(s=i),void 0===n&&(n=0),void 0===o&&(o=n),this._follow=t,this.roundPixels=e,i=r(i,0,1),s=r(s,0,1),this.lerp.set(i,s),this.followOffset.set(n,o);var a=this.width/2,h=this.height/2,l=t.x-n,u=t.y-o;return this.midPoint.set(l,u),this.scrollX=l-a,this.scrollY=u-h,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.rotateToEffect.update(t,e),this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.resetFX(),s.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=p},62382:(t,e,i)=>{var s=i(47751),n=i(56694),r=i(72632),o=i(91963),a=i(94287),h=i(40444),l=i(7599),u=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.roundPixels=t.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,t.sys.events.once(l.BOOT,this.boot,this),t.sys.events.on(l.START,this.start,this)},boot:function(){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new s(0,0,t.scale.width,t.scale.height).setScene(this.scene),t.game.scale.on(h.RESIZE,this.onResize,this),this.systems.events.once(l.DESTROY,this.destroy,this)},start:function(){if(!this.main){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0]}var e=this.systems.events;e.on(l.UPDATE,this.update,this),e.once(l.SHUTDOWN,this.shutdown,this)},add:function(t,e,i,n,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=new s(t,e,i,n);return a.setName(o),a.setScene(this.scene),a.setRoundPixels(this.roundPixels),a.id=this.getNextID(),this.cameras.push(a),r&&(this.main=a),a},addExisting:function(t,e){return void 0===e&&(e=!1),-1===this.cameras.indexOf(t)?(t.id=this.getNextID(),t.setRoundPixels(this.roundPixels),this.cameras.push(t),e&&(this.main=t),t):null},getNextID:function(){for(var t=this.cameras,e=1,i=0;i<32;i++){for(var s=!1,n=0;n0){r.preRender();var o=this.getVisibleChildren(e.getChildren(),r);t.render(i,o,r)}}},getVisibleChildren:function(t,e){return t.filter((function(t){return t.willRender(e)}))},resetAll:function(){for(var t=0;t{var s=i(82897),n=i(56694),r=i(89787),o=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,o,a,h){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===o&&(o=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),!o&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=s,this.blue=n,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h;var l=t?r.FADE_OUT_START:r.FADE_IN_START;return this.camera.emit(l,this.camera,this,e,i,s,n),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var s=i(82897),n=i(56694),r=i(89787),o=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=1,this.progress=0,this._elapsed=0,this._alpha,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,o,a){return void 0===t&&(t=250),void 0===e&&(e=255),void 0===i&&(i=255),void 0===s&&(s=255),void 0===n&&(n=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!n&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,this.red=e,this.green=i,this.blue=s,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a,this.camera.emit(r.FLASH_START,this.camera,this,t,e,i,s)),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var s=i(82897),n=i(56694),r=i(35060),o=i(89787),a=i(93736),h=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=new a,this.current=new a,this.destination=new a,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,a,h){void 0===i&&(i=1e3),void 0===s&&(s=r.Linear),void 0===n&&(n=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene);var l=this.camera;return!n&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(l.scrollX,l.scrollY),this.destination.set(t,e),l.getScroll(t,e,this.current),"string"==typeof s&&r.hasOwnProperty(s)?this.ease=r[s]:"function"==typeof s&&(this.ease=s),this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h,this.camera.emit(o.PAN_START,this.camera,this,i,t,e)),l},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=s(this._elapsed/this.duration,0,1);this.progress=i;var n=this.camera;if(this._elapsed{var s=i(82897),n=i(56694),r=i(89787),o=i(35060),a=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope,this.clockwise=!0,this.shortestPath=!1},start:function(t,e,i,s,n,a,h){void 0===i&&(i=1e3),void 0===s&&(s=o.Linear),void 0===n&&(n=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),void 0===e&&(e=!1),this.shortestPath=e;var l=t;t<0?(l=-1*t,this.clockwise=!1):this.clockwise=!0;var u=360*Math.PI/180;l-=Math.floor(l/u)*u;var c=this.camera;if(!n&&this.isRunning)return c;if(this.isRunning=!0,this.duration=i,this.progress=0,this.source=c.rotation,this.destination=l,"string"==typeof s&&o.hasOwnProperty(s)?this.ease=o[s]:"function"==typeof s&&(this.ease=s),this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h,this.shortestPath){var d=0,p=0;(d=this.destination>this.source?Math.abs(this.destination-this.source):Math.abs(this.destination+u)-this.source)<(p=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+u)-this.destination)?this.clockwise=!0:d>p&&(this.clockwise=!1)}return this.camera.emit(r.ROTATE_START,this.camera,this,i,l),c},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=s(this._elapsed/this.duration,0,1);this.progress=i;var n=this.camera;if(this._elapsed=l?Math.abs(h-l):Math.abs(h+a)-l;var u=0;u=this.clockwise?n.rotation+o*r:n.rotation-o*r,n.rotation=u,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,n,i,u)}else n.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,n,i,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(r.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});t.exports=a},3241:(t,e,i)=>{var s=i(82897),n=i(56694),r=i(89787),o=i(93736),a=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new o,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===i&&(i=!1),void 0===s&&(s=null),void 0===n&&(n=this.camera.scene),!i&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,"number"==typeof e?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=s,this._onUpdateScope=n,this.camera.emit(r.SHAKE_START,this.camera,this,t,e)),this.camera},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){if(this.isRunning)if(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var s=i(82897),n=i(56694),r=i(35060),o=i(89787),a=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,a){void 0===e&&(e=1e3),void 0===i&&(i=r.Linear),void 0===s&&(s=!1),void 0===n&&(n=null),void 0===a&&(a=this.camera.scene);var h=this.camera;return!s&&this.isRunning||(this.isRunning=!0,this.duration=e,this.progress=0,this.source=h.zoom,this.destination=t,"string"==typeof i&&r.hasOwnProperty(i)?this.ease=r[i]:"function"==typeof i&&(this.ease=i),this._elapsed=0,this._onUpdate=n,this._onUpdateScope=a,this.camera.emit(o.ZOOM_START,this.camera,this,e,t)),h},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._elapsed{t.exports={Fade:i(92522),Flash:i(22151),Pan:i(37551),Shake:i(3241),RotateTo:i(1771),Zoom:i(13383)}},39577:t=>{t.exports="cameradestroy"},85373:t=>{t.exports="camerafadeincomplete"},92057:t=>{t.exports="camerafadeinstart"},1903:t=>{t.exports="camerafadeoutcomplete"},96131:t=>{t.exports="camerafadeoutstart"},85409:t=>{t.exports="cameraflashcomplete"},25500:t=>{t.exports="cameraflashstart"},44071:t=>{t.exports="followupdate"},19818:t=>{t.exports="camerapancomplete"},80002:t=>{t.exports="camerapanstart"},87966:t=>{t.exports="postrender"},74217:t=>{t.exports="prerender"},34805:t=>{t.exports="camerarotatecomplete"},30408:t=>{t.exports="camerarotatestart"},49856:t=>{t.exports="camerashakecomplete"},69189:t=>{t.exports="camerashakestart"},67657:t=>{t.exports="camerazoomcomplete"},14229:t=>{t.exports="camerazoomstart"},89787:(t,e,i)=>{t.exports={DESTROY:i(39577),FADE_IN_COMPLETE:i(85373),FADE_IN_START:i(92057),FADE_OUT_COMPLETE:i(1903),FADE_OUT_START:i(96131),FLASH_COMPLETE:i(85409),FLASH_START:i(25500),FOLLOW_UPDATE:i(44071),PAN_COMPLETE:i(19818),PAN_START:i(80002),POST_RENDER:i(87966),PRE_RENDER:i(74217),ROTATE_COMPLETE:i(34805),ROTATE_START:i(30408),SHAKE_COMPLETE:i(49856),SHAKE_START:i(69189),ZOOM_COMPLETE:i(67657),ZOOM_START:i(14229)}},32356:(t,e,i)=>{t.exports={Camera:i(47751),BaseCamera:i(51052),CameraManager:i(62382),Effects:i(53030),Events:i(89787)}},84219:(t,e,i)=>{var s=i(56694),n=i(10850),r=new s({initialize:function(t){this.camera=n(t,"camera",null),this.left=n(t,"left",null),this.right=n(t,"right",null),this.up=n(t,"up",null),this.down=n(t,"down",null),this.zoomIn=n(t,"zoomIn",null),this.zoomOut=n(t,"zoomOut",null),this.zoomSpeed=n(t,"zoomSpeed",.01),this.minZoom=n(t,"minZoom",.001),this.maxZoom=n(t,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=n(t,"speed",null);"number"==typeof e?(this.speedX=e,this.speedY=e):(this.speedX=n(t,"speed.x",0),this.speedY=n(t,"speed.y",0)),this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this.up&&this.up.isDown?e.scrollY-=this.speedY*t|0:this.down&&this.down.isDown&&(e.scrollY+=this.speedY*t|0),this.left&&this.left.isDown?e.scrollX-=this.speedX*t|0:this.right&&this.right.isDown&&(e.scrollX+=this.speedX*t|0),this.zoomIn&&this.zoomIn.isDown?(e.zoom-=this.zoomSpeed,e.zoomthis.maxZoom&&(e.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},69370:(t,e,i)=>{var s=i(56694),n=i(10850),r=new s({initialize:function(t){this.camera=n(t,"camera",null),this.left=n(t,"left",null),this.right=n(t,"right",null),this.up=n(t,"up",null),this.down=n(t,"down",null),this.zoomIn=n(t,"zoomIn",null),this.zoomOut=n(t,"zoomOut",null),this.zoomSpeed=n(t,"zoomSpeed",.01),this.minZoom=n(t,"minZoom",.001),this.maxZoom=n(t,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=n(t,"acceleration",null);"number"==typeof e?(this.accelX=e,this.accelY=e):(this.accelX=n(t,"acceleration.x",0),this.accelY=n(t,"acceleration.y",0)),this.dragX=0,this.dragY=0;var i=n(t,"drag",null);"number"==typeof i?(this.dragX=i,this.dragY=i):(this.dragX=n(t,"drag.x",0),this.dragY=n(t,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var s=n(t,"maxSpeed",null);"number"==typeof s?(this.maxSpeedX=s,this.maxSpeedY=s):(this.maxSpeedX=n(t,"maxSpeed.x",0),this.maxSpeedY=n(t,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this._speedX>0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoomthis.maxZoom&&(e.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},6524:(t,e,i)=>{t.exports={FixedKeyControl:i(84219),SmoothedKeyControl:i(69370)}},44143:(t,e,i)=>{t.exports={Controls:i(6524),Scene2D:i(32356)}},86459:(t,e,i)=>{var s={VERSION:"3.60.0-beta.17",BlendModes:i(95723),ScaleModes:i(27394),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=s},14033:(t,e,i)=>{var s=i(56694),n=i(86459),r=i(18360),o=i(77290),a=i(72632),h=i(10850),l=i(42911),u=i(72283),c=i(5923),d=i(65641),p=i(93222),f=new s({initialize:function(t){void 0===t&&(t={});var e=h(t,"scale",null);this.width=h(e,"width",1024,t),this.height=h(e,"height",768,t),this.zoom=h(e,"zoom",1,t),this.parent=h(e,"parent",void 0,t),this.scaleMode=h(e,e?"mode":"scaleMode",0,t),this.expandParent=h(e,"expandParent",!0,t),this.autoRound=h(e,"autoRound",!1,t),this.autoCenter=h(e,"autoCenter",0,t),this.resizeInterval=h(e,"resizeInterval",500,t),this.fullscreenTarget=h(e,"fullscreenTarget",null,t),this.minWidth=h(e,"minWidth",0,t),this.maxWidth=h(e,"maxWidth",0,t),this.minHeight=h(e,"minHeight",0,t),this.maxHeight=h(e,"maxHeight",0,t),this.renderType=h(t,"type",n.AUTO),this.canvas=h(t,"canvas",null),this.context=h(t,"context",null),this.canvasStyle=h(t,"canvasStyle",null),this.customEnvironment=h(t,"customEnvironment",!1),this.sceneConfig=h(t,"scene",null),this.seed=h(t,"seed",[(Date.now()*Math.random()).toString()]),c.RND=new c.RandomDataGenerator(this.seed),this.gameTitle=h(t,"title",""),this.gameURL=h(t,"url","https://phaser.io"),this.gameVersion=h(t,"version",""),this.autoFocus=h(t,"autoFocus",!0),this.stableSort=h(t,"stableSort",-1),-1===this.stableSort&&(this.stableSort=o.browser.es2019?1:0),o.features.stableSort=this.stableSort,this.domCreateContainer=h(t,"dom.createContainer",!1),this.domPointerEvents=h(t,"dom.pointerEvents","none"),this.inputKeyboard=h(t,"input.keyboard",!0),this.inputKeyboardEventTarget=h(t,"input.keyboard.target",window),this.inputKeyboardCapture=h(t,"input.keyboard.capture",[]),this.inputMouse=h(t,"input.mouse",!0),this.inputMouseEventTarget=h(t,"input.mouse.target",null),this.inputMousePreventDefaultDown=h(t,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=h(t,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=h(t,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=h(t,"input.mouse.preventDefaultWheel",!0),this.inputTouch=h(t,"input.touch",o.input.touch),this.inputTouchEventTarget=h(t,"input.touch.target",null),this.inputTouchCapture=h(t,"input.touch.capture",!0),this.inputActivePointers=h(t,"input.activePointers",1),this.inputSmoothFactor=h(t,"input.smoothFactor",0),this.inputWindowEvents=h(t,"input.windowEvents",!0),this.inputGamepad=h(t,"input.gamepad",!1),this.inputGamepadEventTarget=h(t,"input.gamepad.target",window),this.disableContextMenu=h(t,"disableContextMenu",!1),this.audio=h(t,"audio",{}),this.hideBanner=!1===h(t,"banner",null),this.hidePhaser=h(t,"banner.hidePhaser",!1),this.bannerTextColor=h(t,"banner.text","#ffffff"),this.bannerBackgroundColor=h(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=h(t,"fps",null);var i=h(t,"render",null);this.pipeline=h(i,"pipeline",null,t),this.autoMobilePipeline=h(i,"autoMobilePipeline",!0,t),this.defaultPipeline=h(i,"defaultPipeline",d.MULTI_PIPELINE,t),this.antialias=h(i,"antialias",!0,t),this.antialiasGL=h(i,"antialiasGL",!0,t),this.mipmapFilter=h(i,"mipmapFilter","LINEAR",t),this.desynchronized=h(i,"desynchronized",!1,t),this.roundPixels=h(i,"roundPixels",!1,t),this.pixelArt=h(i,"pixelArt",1!==this.zoom,t),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=h(i,"transparent",!1,t),this.clearBeforeRender=h(i,"clearBeforeRender",!0,t),this.preserveDrawingBuffer=h(i,"preserveDrawingBuffer",!1,t),this.premultipliedAlpha=h(i,"premultipliedAlpha",!0,t),this.failIfMajorPerformanceCaveat=h(i,"failIfMajorPerformanceCaveat",!1,t),this.powerPreference=h(i,"powerPreference","default",t),this.batchSize=h(i,"batchSize",4096,t),this.maxTextures=h(i,"maxTextures",-1,t),this.maxLights=h(i,"maxLights",10,t);var s=h(t,"backgroundColor",0);this.backgroundColor=p(s),this.transparent&&(this.backgroundColor=p(0),this.backgroundColor.alpha=0),this.preBoot=h(t,"callbacks.preBoot",u),this.postBoot=h(t,"callbacks.postBoot",u),this.physics=h(t,"physics",{}),this.defaultPhysicsSystem=h(this.physics,"default",!1),this.loaderBaseURL=h(t,"loader.baseURL",""),this.loaderPath=h(t,"loader.path",""),this.loaderMaxParallelDownloads=h(t,"loader.maxParallelDownloads",o.os.android?6:32),this.loaderCrossOrigin=h(t,"loader.crossOrigin",void 0),this.loaderResponseType=h(t,"loader.responseType",""),this.loaderAsync=h(t,"loader.async",!0),this.loaderUser=h(t,"loader.user",""),this.loaderPassword=h(t,"loader.password",""),this.loaderTimeout=h(t,"loader.timeout",0),this.loaderWithCredentials=h(t,"loader.withCredentials",!1),this.loaderImageLoadType=h(t,"loader.imageLoadType","XHR"),this.loaderLocalScheme=h(t,"loader.localScheme",["file://","capacitor://"]),this.installGlobalPlugins=[],this.installScenePlugins=[];var f=h(t,"plugins",null),v=r.DefaultScene;f&&(Array.isArray(f)?this.defaultPlugins=f:l(f)&&(this.installGlobalPlugins=a(f,"global",[]),this.installScenePlugins=a(f,"scene",[]),Array.isArray(f.default)?v=f.default:Array.isArray(f.defaultMerge)&&(v=v.concat(f.defaultMerge)))),this.defaultPlugins=v;var g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=h(t,"images.default",g+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=h(t,"images.missing",g+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=h(t,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=n.WEBGL:window.FORCE_CANVAS&&(this.renderType=n.CANVAS))}});t.exports=f},50150:(t,e,i)=>{var s=i(70616),n=i(61068),r=i(86459),o=i(90185);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===r.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==r.HEADLESS)if(e.renderType===r.AUTO&&(e.renderType=o.webGL?r.WEBGL:r.CANVAS),e.renderType===r.WEBGL){if(!o.webGL)throw new Error("Cannot create WebGL context, aborting.")}else{if(e.renderType!==r.CANVAS)throw new Error("Unknown value for renderer type: "+e.renderType);if(!o.canvas)throw new Error("Cannot create Canvas context, aborting.")}e.antialias||n.disableSmoothing();var a,h,l=t.scale.baseSize,u=l.width,c=l.height;(e.canvas?(t.canvas=e.canvas,t.canvas.width=u,t.canvas.height=c):t.canvas=n.create(t,u,c,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||s.setCrisp(t.canvas),e.renderType!==r.HEADLESS)&&(a=i(91135),h=i(11857),e.renderType===r.WEBGL?t.renderer=new h(t):(t.renderer=new a(t),t.context=t.renderer.gameContext))}},77291:(t,e,i)=>{var s=i(86459);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===s.CANVAS?i="Canvas":e.renderType===s.HEADLESS&&(i="Headless");var n,r=e.audio,o=t.device.audio;if(n=o.webAudio&&!r.disableWebAudio?"Web Audio":r.noAudio||!o.webAudio&&!o.audioData?"No Audio":"HTML5 Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+s.VERSION+" / https://phaser.io");else{var a,h="",l=[h];if(Array.isArray(e.bannerBackgroundColor))e.bannerBackgroundColor.forEach((function(t){h=h.concat("%c "),l.push("background: "+t),a=t})),l[l.length-1]="color: "+e.bannerTextColor+"; background: "+a;else h=h.concat("%c "),l.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor);l.push("background: transparent"),e.gameTitle&&(h=h.concat(e.gameTitle),e.gameVersion&&(h=h.concat(" v"+e.gameVersion)),e.hidePhaser||(h=h.concat(" / ")));e.hidePhaser||(h=h.concat("Phaser v"+s.VERSION+" ("+i+" | "+n+")")),h=h.concat(" %c "+e.gameURL),l[0]=h,console.log.apply(console,l)}}}},15213:(t,e,i)=>{var s=i(99584),n=i(90249),r=i(43474),o=i(61068),a=i(56694),h=i(14033),l=i(85178),u=i(50150),c=i(81078),d=i(77291),p=i(77290),f=i(21546),v=i(6659),g=i(97081),m=i(69898),y=i(91963),x=i(49274),T=i(756),w=i(13553),b=i(38203),E=i(6237),S=i(26617),A=i(26493),_=i(84191),C=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new v,this.anims=new n(this),this.textures=new E(this),this.cache=new r(this),this.registry=new c(this),this.input=new m(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=p,this.scale=new T(this,this.config),this.sound=null,this.sound=_.create(this),this.loop=new S(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,f(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),d(this),s(this.canvas,this.config.parent),this.textures.once(b.READY,this.texturesReady,this),this.events.emit(g.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(g.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),A(this);var t=this.events;t.on(g.HIDDEN,this.onHidden,this),t.on(g.VISIBLE,this.onVisible,this),t.on(g.BLUR,this.onBlur,this),t.on(g.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(g.PRE_STEP,t,e),i.emit(g.STEP,t,e),this.scene.update(t,e),i.emit(g.POST_STEP,t,e);var s=this.renderer;s.preRender(),i.emit(g.PRE_RENDER,s,t,e),this.scene.render(s),s.postRender(),i.emit(g.POST_RENDER,s,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(g.PRE_STEP,t,e),i.emit(g.STEP,t,e),this.scene.update(t,e),i.emit(g.POST_STEP,t,e),this.scene.isProcessing=!1,i.emit(g.PRE_RENDER,null,t,e),i.emit(g.POST_RENDER,null,t,e)},onHidden:function(){this.loop.pause(),this.events.emit(g.PAUSE)},pause:function(){this.onHidden()},onVisible:function(){this.loop.resume(),this.events.emit(g.RESUME)},resume:function(){this.onVisible()},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.scene.destroy(),this.events.emit(g.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=C},26617:(t,e,i)=>{var s=i(56694),n=i(10850),r=i(72283),o=i(27385),a=new s({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=n(e,"min",5),this.targetFps=n(e,"target",60),this.fpsLimit=n(e,"limit",0),this.hasFpsLimit=this.fpsLimit>0,this._limitRate=this.hasFpsLimit?1e3/this.fpsLimit:0,this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=n(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=n(e,"deltaHistory",10),this.panicMax=n(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=n(e,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0;for(var e=0;e0||!this.inFocus)&&(this._coolDown--,t=Math.min(t,this._target)),t>this._min&&(t=i[e],t=Math.min(t,this._min)),i[e]=t,this.deltaIndex++,this.deltaIndex>=s&&(this.deltaIndex=0);for(var n=0,r=0;r=this.nextFpsUpdate&&this.updateFPS(t),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(t,this.delta),this.delta=0),this.lastTime=t,this.frame++},step:function(t){this.now=t;var e=Math.max(0,t-this.lastTime);this.rawDelta=e,this.time+=this.rawDelta,this.smoothStep&&(e=this.smoothDelta(e)),this.delta=e,t>=this.nextFpsUpdate&&this.updateFPS(t),this.framesThisSecond++,this.callback(t,e),this.lastTime=t,this.frame++},tick:function(){var t=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(t):this.step(t)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){void 0===t&&(t=!1);var e=window.performance.now();if(!this.running){t&&(this.startTime+=-this.lastTime+(this.lastTime+e));var i=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(i,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0,this.fpsLimitTriggered=!1,this.tick()}},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.raf.destroy(),this.raf=null,this.game=null,this.callback=null}});t.exports=a},26493:(t,e,i)=>{var s=i(97081);t.exports=function(t){var e,i=t.events;if(void 0!==document.hidden)e="visibilitychange";else{["webkit","moz","ms"].forEach((function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")}))}e&&document.addEventListener(e,(function(t){document.hidden||"pause"===t.type?i.emit(s.HIDDEN):i.emit(s.VISIBLE)}),!1),window.onblur=function(){i.emit(s.BLUR)},window.onfocus=function(){i.emit(s.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},41651:t=>{t.exports="blur"},5520:t=>{t.exports="boot"},51673:t=>{t.exports="contextlost"},25055:t=>{t.exports="destroy"},23767:t=>{t.exports="focus"},57564:t=>{t.exports="hidden"},38327:t=>{t.exports="pause"},43807:t=>{t.exports="postrender"},73652:t=>{t.exports="poststep"},780:t=>{t.exports="prerender"},13781:t=>{t.exports="prestep"},38247:t=>{t.exports="ready"},29129:t=>{t.exports="resume"},34994:t=>{t.exports="step"},98704:t=>{t.exports="visible"},97081:(t,e,i)=>{t.exports={BLUR:i(41651),BOOT:i(5520),CONTEXT_LOST:i(51673),DESTROY:i(25055),FOCUS:i(23767),HIDDEN:i(57564),PAUSE:i(38327),POST_RENDER:i(43807),POST_STEP:i(73652),PRE_RENDER:i(780),PRE_STEP:i(13781),READY:i(38247),RESUME:i(29129),STEP:i(34994),VISIBLE:i(98704)}},80293:(t,e,i)=>{t.exports={Config:i(14033),CreateRenderer:i(50150),DebugHeader:i(77291),Events:i(97081),TimeStep:i(26617),VisibilityHandler:i(26493)}},52780:(t,e,i)=>{var s=i(81543),n=i(61068),r=i(10850);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",s),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),p=Math.floor(Math.abs(e[0].length*a)),f=Math.floor(Math.abs(e.length*h));i||(i=n.create2D(this,p,f),l=!1,u=!1),l&&(i.width=p,i.height=f);var v=i.getContext("2d");u&&v.clearRect(0,0,p,f),c&&c(i,v);for(var g=0;g{t.exports={GenerateTexture:i(52780),Palettes:i(25235)}},81543:t=>{t.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},75846:t=>{t.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},83206:t=>{t.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},13194:t=>{t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},50686:t=>{t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},25235:(t,e,i)=>{t.exports={ARNE16:i(81543),C64:i(75846),CGA:i(83206),JMP:i(13194),MSX:i(50686)}},63120:(t,e,i)=>{var s=i(56694),n=i(34631),r=i(38517),o=i(93736),a=new s({Extends:r,initialize:function(t,e,i,s){r.call(this,"CubicBezierCurve"),Array.isArray(t)&&(s=new o(t[6],t[7]),i=new o(t[4],t[5]),e=new o(t[2],t[3]),t=new o(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i,this.p3=s},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.p0,s=this.p1,r=this.p2,a=this.p3;return e.set(n(t,i.x,s.x,r.x,a.x),n(t,i.y,s.y,r.y,a.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var s=1;s{var s=i(56694),n=i(80222),r=i(74118),o=i(93736),a=new s({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var s=Math.max(1,Math.round(i/e));return n(this.getSpacedPoints(s),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],s=this.getPoint(0,this._tmpVec2A),n=0;i.push(0);for(var r=1;r<=t;r++)n+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(s),i.push(n),s.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var s=0;s<=t;s++)i.push(this.getPoint(s/t));return i},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var s=0;s<=t;s++){var n=this.getUtoTmapping(s/t,null,t);i.push(this.getPoint(n))}return i},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=1e-4,s=t-i,n=t+i;return s<0&&(s=0),n>1&&(n=1),this.getPoint(s,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var s,n=this.getLengths(i),r=0,o=n.length;s=e?Math.min(e,n[o-1]):t*n[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=n[r=Math.floor(h+(l-h)/2)]-s)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(n[r=l]===s)return r/(o-1);var u=n[r];return(r+(s-u)/(n[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},48835:(t,e,i)=>{var s=i(56694),n=i(38517),r=i(75606),o=i(10850),a=i(23701),h=i(93736),l=new s({Extends:n,initialize:function(t,e,i,s,a,l,u,c){if("object"==typeof t){var d=t;t=o(d,"x",0),e=o(d,"y",0),i=o(d,"xRadius",0),s=o(d,"yRadius",i),a=o(d,"startAngle",0),l=o(d,"endAngle",360),u=o(d,"clockwise",!1),c=o(d,"rotation",0)}else void 0===s&&(s=i),void 0===a&&(a=0),void 0===l&&(l=360),void 0===u&&(u=!1),void 0===c&&(c=0);n.call(this,"EllipseCurve"),this.p0=new h(t,e),this._xRadius=i,this._yRadius=s,this._startAngle=r(a),this._endAngle=r(l),this._clockwise=u,this._rotation=r(c)},getStartPoint:function(t){return void 0===t&&(t=new h),this.getPoint(0,t)},getResolution:function(t){return 2*t},getPoint:function(t,e){void 0===e&&(e=new h);for(var i=2*Math.PI,s=this._endAngle-this._startAngle,n=Math.abs(s)i;)s-=i;s{var s=i(56694),n=i(38517),r=i(80222),o=i(74118),a=i(93736),h=new s({Extends:n,initialize:function(t,e){n.call(this,"LineCurve"),Array.isArray(t)&&(e=new a(t[2],t[3]),t=new a(t[0],t[1])),this.p0=t,this.p1=e,this.arcLengthDivisions=1},getBounds:function(t){return void 0===t&&(t=new o),r([this.p0,this.p1],t)},getStartPoint:function(t){return void 0===t&&(t=new a),t.copy(this.p0)},getResolution:function(t){return void 0===t&&(t=1),t},getPoint:function(t,e){return void 0===e&&(e=new a),1===t?e.copy(this.p1):(e.copy(this.p1).subtract(this.p0).scale(t).add(this.p0),e)},getPointAt:function(t,e){return this.getPoint(t,e)},getTangent:function(t,e){return void 0===e&&(e=new a),e.copy(this.p1).subtract(this.p0).normalize(),e},getUtoTmapping:function(t,e,i){var s;if(e){var n=this.getLengths(i),r=n[n.length-1];s=Math.min(e,r)/r}else s=t;return s},draw:function(t){return t.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});h.fromJSON=function(t){var e=t.points,i=new a(e[0],e[1]),s=new a(e[2],e[3]);return new h(i,s)},t.exports=h},64761:(t,e,i)=>{var s=i(56694),n=i(38517),r=i(16252),o=i(93736),a=new s({Extends:n,initialize:function(t,e,i){n.call(this,"QuadraticBezierCurve"),Array.isArray(t)&&(i=new o(t[4],t[5]),e=new o(t[2],t[3]),t=new o(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.p0,s=this.p1,n=this.p2;return e.set(r(t,i.x,s.x,n.x),r(t,i.y,s.y,n.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var s=1;s{var s=i(14976),n=i(56694),r=i(38517),o=i(93736),a=new n({Extends:r,initialize:function(t){void 0===t&&(t=[]),r.call(this,"SplineCurve"),this.points=[],this.addPoints(t)},addPoints:function(t){for(var e=0;ei.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(s(a,h.x,l.x,u.x,c.x),s(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e{t.exports={Path:i(12822),MoveTo:i(53639),CubicBezier:i(63120),Curve:i(38517),Ellipse:i(48835),Line:i(58084),QuadraticBezier:i(64761),Spline:i(11956)}},53639:(t,e,i)=>{var s=i(56694),n=i(93736),r=new s({initialize:function(t,e){this.active=!1,this.p0=new n(t,e)},getPoint:function(t,e){return void 0===e&&(e=new n),e.copy(this.p0)},getPointAt:function(t,e){return this.getPoint(t,e)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});t.exports=r},12822:(t,e,i)=>{var s=i(56694),n=i(63120),r=i(48835),o=i(61286),a=i(58084),h=i(53639),l=i(64761),u=i(74118),c=i(11956),d=i(93736),p=i(83392),f=new s({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new d,this._tmpVec2A=new d,this._tmpVec2B=new d,"object"==typeof t?this.fromJSON(t):this.startPoint.set(t,e)},add:function(t){return this.curves.push(t),this},circleTo:function(t,e,i){return void 0===e&&(e=!1),this.ellipseTo(t,t,0,360,e,i)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);return t.equals(e)||this.curves.push(new a(e,t)),this},cubicBezierTo:function(t,e,i,s,r,o){var a,h,l,u=this.getEndPoint();return t instanceof d?(a=t,h=e,l=i):(a=new d(i,s),h=new d(r,o),l=new d(t,e)),this.add(new n(u,a,h,l))},quadraticBezierTo:function(t,e,i,s){var n,r,o=this.getEndPoint();return t instanceof d?(n=t,r=e):(n=new d(i,s),r=new d(t,e)),this.add(new l(o,n,r))},draw:function(t,e){for(var i=0;i=e)return this.curves[s];s++}return null},getEndPoint:function(t){return void 0===t&&(t=new d),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),s=this.getCurveLengths(),n=0;n=i){var r=s[n]-i,o=this.curves[n],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}n++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],s=0;s1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new d),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new d),t.copy(this.startPoint)},getTangent:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),s=this.getCurveLengths(),n=0;n=i){var r=s[n]-i,o=this.curves[n],a=o.getLength(),h=0===a?0:1-r/a;return o.getTangentAt(h,e)}n++}return null},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new h(t.x,t.y)):this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e{var s=i(56694),n=i(35026),r=new s({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(n.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],s=0;s{var s=i(56694),n=i(81078),r=i(91963),o=i(7599),a=new s({Extends:n,initialize:function(t){n.call(this,t,t.sys.events),this.scene=t,this.systems=t.sys,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(o.DESTROY,this.destroy,this)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){n.prototype.destroy.call(this),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null}});r.register("DataManagerPlugin",a,"data"),t.exports=a},73569:t=>{t.exports="changedata"},15590:t=>{t.exports="changedata-"},37669:t=>{t.exports="destroy"},87090:t=>{t.exports="removedata"},90142:t=>{t.exports="setdata"},35026:(t,e,i)=>{t.exports={CHANGE_DATA:i(73569),CHANGE_DATA_KEY:i(15590),DESTROY:i(37669),REMOVE_DATA:i(87090),SET_DATA:i(90142)}},1999:(t,e,i)=>{t.exports={DataManager:i(81078),DataManagerPlugin:i(76508),Events:i(35026)}},10720:(t,e,i)=>{var s=i(1350),n={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return n;n.audioData=!!window.Audio,n.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e){var i=function(e,i){var s=t.canPlayType("audio/"+e).replace(/^no$/,"");return i?Boolean(s||t.canPlayType("audio/"+i).replace(/^no$/,"")):Boolean(s)};if(n.ogg=i('ogg; codecs="vorbis"'),n.opus=i('ogg; codecs="opus"',"opus"),n.mp3=i("mpeg"),n.wav=i("wav"),n.m4a=i("x-m4a"),n.aac=i("aac"),n.flac=i("flac","x-flac"),n.webm=i('webm; codecs="vorbis"'),""!==t.canPlayType('audio/mp4; codecs="ec-3"'))if(s.edge)n.dolby=!0;else if(s.safari&&s.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var r=parseInt(RegExp.$1,10),o=parseInt(RegExp.$2,10);(10===r&&o>=11||r>10)&&(n.dolby=!0)}}}catch(t){}return n}()},1350:(t,e,i)=>{var s,n=i(36580),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};t.exports=(s=navigator.userAgent,/Edge\/\d+/.test(s)?(r.edge=!0,r.es2019=!0):/Chrome\/(\d+)/.test(s)&&!n.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10),r.es2019=r.chromeVersion>69):/Firefox\D+(\d+)/.test(s)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10),r.es2019=r.firefoxVersion>10):/AppleWebKit/.test(s)&&n.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(s)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Opera/.test(s)?(r.opera=!0,r.es2019=!0):/Version\/(\d+\.\d+) Safari/.test(s)&&!n.windowsPhone?(r.safari=!0,r.safariVersion=parseInt(RegExp.$1,10),r.es2019=r.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(s)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(s)&&(r.silk=!0),r)},98581:(t,e,i)=>{var s,n,r,o=i(61068),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(a.supportNewBlendModes=(s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",n="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create2D(t,6).getContext("2d",{willReadFrequently:!0});if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=s+"/wCKxvRF"+n},r.src=s+"AP804Oa6"+n,!1),a.supportInverseAlpha=function(){var t=o.create2D(this,2).getContext("2d",{willReadFrequently:!0});t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1),s=i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3];return o.remove(this),s}()),a)},90185:(t,e,i)=>{var s=i(36580),n=i(1350),r=i(61068),o={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){if("function"==typeof importScripts)return o;o.canvas=!!window.CanvasRenderingContext2D;try{o.localStorage=!!localStorage.getItem}catch(t){o.localStorage=!1}o.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),o.fileSystem=!!window.requestFileSystem;var t,e,i,a=!1;return o.webGL=function(){if(window.WebGLRenderingContext)try{var t=r.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=r.create2D(this),s=i.getContext("2d",{willReadFrequently:!0}).createImageData(1,1);return a=s.data instanceof Uint8ClampedArray,r.remove(t),r.remove(i),!!e}catch(t){return!1}return!1}(),o.worker=!!window.Worker,o.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,o.getUserMedia=o.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,n.firefox&&n.firefoxVersion<21&&(o.getUserMedia=!1),!s.iOS&&(n.ie||n.firefox||n.chrome)&&(o.canvasBitBltShift=!0),(n.safari||n.mobileSafari)&&(o.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(o.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(o.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),o.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==o.littleEndian&&a,o}()},33553:t=>{var e={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"==typeof importScripts)return e;var t,i="Fullscreen",s="FullScreen",n=["request"+i,"request"+s,"webkitRequest"+i,"webkitRequest"+s,"msRequest"+i,"msRequest"+s,"mozRequest"+s,"mozRequest"+i];for(t=0;t{var s=i(1350),n={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=("function"==typeof importScripts||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(n.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(n.mspointer=!0),navigator.getGamepads&&(n.gamepads=!0),"onwheel"in window||s.ie&&"WheelEvent"in window?n.wheelEvent="wheel":"onmousewheel"in window?n.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(n.wheelEvent="DOMMouseScroll")),n)},36580:t=>{var e={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){if("function"==typeof importScripts)return e;var t=navigator.userAgent;/Windows/.test(t)?e.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(e.iOS=!0,e.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),e.iOSVersion=parseInt(RegExp.$1,10)):e.macOS=!0:/Android/.test(t)?e.android=!0:/Linux/.test(t)?e.linux=!0:/iP[ao]d|iPhone/i.test(t)?(e.iOS=!0,navigator.appVersion.match(/OS (\d+)/),e.iOSVersion=parseInt(RegExp.$1,10),e.iPhone=-1!==t.toLowerCase().indexOf("iphone"),e.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?e.kindle=!0:/CrOS/.test(t)&&(e.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(e.android=!1,e.iOS=!1,e.macOS=!1,e.windows=!0,e.windowsPhone=!0);var i=/Silk/.test(t);return(e.windows||e.macOS||e.linux&&!i||e.chromeOS)&&(e.desktop=!0),(e.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(e.desktop=!1),navigator.standalone&&(e.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(e.cordova=!0),void 0!==window.ejecta&&(e.ejecta=!0)),"undefined"!=typeof process&&process.versions&&process.versions.node&&(e.node=!0),e.node&&"object"==typeof process.versions&&(e.nodeWebkit=!!process.versions["node-webkit"],e.electron=!!process.versions.electron),/Crosswalk/.test(t)&&(e.crosswalk=!0),e.pixelRatio=window.devicePixelRatio||1,e}()},53861:t=>{var e={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return e;var t=document.createElement("video"),i=!!t.canPlayType,s=/^no$/;try{i&&(t.canPlayType('video/ogg; codecs="theora"').replace(s,"")&&(e.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(s,"")&&(e.h264=!0,e.mp4=!0),t.canPlayType("video/x-m4v").replace(s,"")&&(e.m4v=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(s,"")&&(e.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(s,"")&&(e.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(s,"")&&(e.hls=!0))}catch(t){}return e}()},77290:(t,e,i)=>{t.exports={os:i(36580),browser:i(1350),features:i(90185),input:i(95872),audio:i(10720),video:i(53861),fullscreen:i(33553),canvasFeatures:i(98581)}},65246:(t,e,i)=>{var s=new(i(56694))({initialize:function(){this._matrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],this.alpha=1,this._dirty=!0,this._data},set:function(t){return this._matrix=t,this._dirty=!0,this},reset:function(){var t=this._matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=1,t[13]=0,t[14]=0,t[15]=0,t[16]=0,t[17]=0,t[18]=1,t[19]=0,this._dirty=!0,this},getData:function(){if(this._dirty){var t=new Float32Array(this._matrix);t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,this._data=t,this._dirty=!1}return this._data},brightness:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t;return this.multiply([i,0,0,0,0,0,i,0,0,0,0,0,i,0,0,0,0,0,1,0],e)},saturate:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=2*t/3+1,s=-.5*(i-1);return this.multiply([i,s,s,0,0,s,i,s,0,0,s,s,i,0,0,0,0,0,1,0],e)},desaturate:function(t){return void 0===t&&(t=!1),this.saturate(-1,t)},hue:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1),t=t/180*Math.PI;var i=Math.cos(t),s=Math.sin(t),n=.213,r=.715,o=.072;return this.multiply([n+.787*i+s*-n,r+i*-r+s*-r,o+i*-o+.928*s,0,0,n+i*-n+.143*s,r+i*(1-r)+.14*s,o+i*-o+-.283*s,0,0,n+i*-n+-.787*s,r+i*-r+s*r,o+.928*i+s*o,0,0,0,0,0,1,0],e)},grayscale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=!1),this.saturate(-t,e)},blackWhite:function(t){return void 0===t&&(t=!1),this.multiply([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t)},contrast:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t+1,s=-.5*(i-1);return this.multiply([i,0,0,0,s,0,i,0,0,s,0,0,i,0,s,0,0,0,1,0],e)},negative:function(t){return void 0===t&&(t=!1),this.multiply([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],t)},desaturateLuminance:function(t){return void 0===t&&(t=!1),this.multiply([.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],t)},sepia:function(t){return void 0===t&&(t=!1),this.multiply([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t)},night:function(t,e){return void 0===t&&(t=.1),void 0===e&&(e=!1),this.multiply([-2*t,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0],e)},lsd:function(t){return void 0===t&&(t=!1),this.multiply([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},brown:function(t){return void 0===t&&(t=!1),this.multiply([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t)},vintagePinhole:function(t){return void 0===t&&(t=!1),this.multiply([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t)},kodachrome:function(t){return void 0===t&&(t=!1),this.multiply([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],t)},technicolor:function(t){return void 0===t&&(t=!1),this.multiply([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],t)},polaroid:function(t){return void 0===t&&(t=!1),this.multiply([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t)},shiftToBGR:function(t){return void 0===t&&(t=!1),this.multiply([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t)},multiply:function(t,e){e||this.reset();for(var i=this._matrix,s=[],n=0;n<20;n++)s[n]=i[n];return i[0]=s[0]*t[0]+s[1]*t[5]+s[2]*t[10]+s[3]*t[15],i[1]=s[0]*t[1]+s[1]*t[6]+s[2]*t[11]+s[3]*t[16],i[2]=s[0]*t[2]+s[1]*t[7]+s[2]*t[12]+s[3]*t[17],i[3]=s[0]*t[3]+s[1]*t[8]+s[2]*t[13]+s[3]*t[18],i[4]=s[0]*t[4]+s[1]*t[9]+s[2]*t[14]+s[3]*t[19]+s[4],i[5]=s[5]*t[0]+s[6]*t[5]+s[7]*t[10]+s[8]*t[15],i[6]=s[5]*t[1]+s[6]*t[6]+s[7]*t[11]+s[8]*t[16],i[7]=s[5]*t[2]+s[6]*t[7]+s[7]*t[12]+s[8]*t[17],i[8]=s[5]*t[3]+s[6]*t[8]+s[7]*t[13]+s[8]*t[18],i[9]=s[5]*t[4]+s[6]*t[9]+s[7]*t[14]+s[8]*t[19]+s[9],i[10]=s[10]*t[0]+s[11]*t[5]+s[12]*t[10]+s[13]*t[15],i[11]=s[10]*t[1]+s[11]*t[6]+s[12]*t[11]+s[13]*t[16],i[12]=s[10]*t[2]+s[11]*t[7]+s[12]*t[12]+s[13]*t[17],i[13]=s[10]*t[3]+s[11]*t[8]+s[12]*t[13]+s[13]*t[18],i[14]=s[10]*t[4]+s[11]*t[9]+s[12]*t[14]+s[13]*t[19]+s[14],i[15]=s[15]*t[0]+s[16]*t[5]+s[17]*t[10]+s[18]*t[15],i[16]=s[15]*t[1]+s[16]*t[6]+s[17]*t[11]+s[18]*t[16],i[17]=s[15]*t[2]+s[16]*t[7]+s[17]*t[12]+s[18]*t[17],i[18]=s[15]*t[3]+s[16]*t[8]+s[17]*t[13]+s[18]*t[18],i[19]=s[15]*t[4]+s[16]*t[9]+s[17]*t[14]+s[18]*t[19]+s[19],this._dirty=!0,this}});t.exports=s},39298:(t,e,i)=>{var s=i(56694),n=i(72283),r=new s({initialize:function(t,e,i){this._rgb=[0,0,0],this.onChangeCallback=n,this.dirty=!1,this.set(t,e,i)},set:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this._rgb=[t,e,i],this.onChange(),this},equals:function(t,e,i){var s=this._rgb;return s[0]===t&&s[1]===e&&s[2]===i},onChange:function(){this.dirty=!0;var t=this._rgb;this.onChangeCallback.call(this,t[0],t[1],t[2])},r:{get:function(){return this._rgb[0]},set:function(t){this._rgb[0]=t,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(t){this._rgb[1]=t,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(t){this._rgb[2]=t,this.onChange()}},destroy:function(){this.onChangeCallback=null}});t.exports=r},84093:t=>{t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},32058:(t,e,i)=>{var s=i(97328),n=i(59994),r=i(73174),o=i(28417);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)+a),t}},85535:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(73174),o=i(74465);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)+a),t}},9605:(t,e,i)=>{var s=i(97328),n=i(70271),r=i(73174),o=i(19298);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)+a),t}},22529:(t,e,i)=>{var s=i(21843),n=i(59994),r=i(29568);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),s(t,n(e)+i,r(e)+o),t}},5739:(t,e,i)=>{var s=i(29568),n=i(40163),r=i(81711),o=i(74465);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)+a),t}},40327:(t,e,i)=>{var s=i(84093),n=[];n[s.BOTTOM_CENTER]=i(32058),n[s.BOTTOM_LEFT]=i(85535),n[s.BOTTOM_RIGHT]=i(9605),n[s.CENTER]=i(22529),n[s.LEFT_CENTER]=i(5739),n[s.RIGHT_CENTER]=i(27683),n[s.TOP_CENTER]=i(96439),n[s.TOP_LEFT]=i(81447),n[s.TOP_RIGHT]=i(47888),n[s.LEFT_BOTTOM]=n[s.BOTTOM_LEFT],n[s.LEFT_TOP]=n[s.TOP_LEFT],n[s.RIGHT_BOTTOM]=n[s.BOTTOM_RIGHT],n[s.RIGHT_TOP]=n[s.TOP_RIGHT];t.exports=function(t,e,i,s,r){return n[i](t,e,s,r)}},27683:(t,e,i)=>{var s=i(29568),n=i(70271),r=i(81711),o=i(19298);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)+a),t}},96439:(t,e,i)=>{var s=i(59994),n=i(47196),r=i(28417),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)-a),t}},81447:(t,e,i)=>{var s=i(40163),n=i(47196),r=i(74465),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)-i),o(t,n(e)-a),t}},47888:(t,e,i)=>{var s=i(70271),n=i(47196),r=i(19298),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)-a),t}},46997:(t,e,i)=>{t.exports={BottomCenter:i(32058),BottomLeft:i(85535),BottomRight:i(9605),Center:i(22529),LeftCenter:i(5739),QuickSet:i(40327),RightCenter:i(27683),TopCenter:i(96439),TopLeft:i(81447),TopRight:i(47888)}},93545:(t,e,i)=>{var s=i(84093),n=i(98611),r={In:i(46997),To:i(86639)};r=n(!1,r,s),t.exports=r},27118:(t,e,i)=>{var s=i(97328),n=i(59994),r=i(28417),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)+a),t}},84469:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(74465),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)+a),t}},51577:(t,e,i)=>{var s=i(97328),n=i(70271),r=i(19298),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)+a),t}},90271:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(73174),o=i(19298);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)+a),t}},30466:(t,e,i)=>{var s=i(29568),n=i(40163),r=i(81711),o=i(19298);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)+a),t}},50087:(t,e,i)=>{var s=i(40163),n=i(47196),r=i(19298),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)-i),o(t,n(e)-a),t}},82590:(t,e,i)=>{var s=i(84093),n=[];n[s.BOTTOM_CENTER]=i(27118),n[s.BOTTOM_LEFT]=i(84469),n[s.BOTTOM_RIGHT]=i(51577),n[s.LEFT_BOTTOM]=i(90271),n[s.LEFT_CENTER]=i(30466),n[s.LEFT_TOP]=i(50087),n[s.RIGHT_BOTTOM]=i(13555),n[s.RIGHT_CENTER]=i(99049),n[s.RIGHT_TOP]=i(67788),n[s.TOP_CENTER]=i(78170),n[s.TOP_LEFT]=i(54145),n[s.TOP_RIGHT]=i(75548);t.exports=function(t,e,i,s,r){return n[i](t,e,s,r)}},13555:(t,e,i)=>{var s=i(97328),n=i(70271),r=i(73174),o=i(74465);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)+a),t}},99049:(t,e,i)=>{var s=i(29568),n=i(70271),r=i(81711),o=i(74465);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)+a),t}},67788:(t,e,i)=>{var s=i(70271),n=i(47196),r=i(74465),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)-a),t}},78170:(t,e,i)=>{var s=i(59994),n=i(47196),r=i(73174),o=i(28417);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)-a),t}},54145:(t,e,i)=>{var s=i(40163),n=i(47196),r=i(73174),o=i(74465);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)-a),t}},75548:(t,e,i)=>{var s=i(70271),n=i(47196),r=i(73174),o=i(19298);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)-a),t}},86639:(t,e,i)=>{t.exports={BottomCenter:i(27118),BottomLeft:i(84469),BottomRight:i(51577),LeftBottom:i(90271),LeftCenter:i(30466),LeftTop:i(50087),QuickSet:i(82590),RightBottom:i(13555),RightCenter:i(99049),RightTop:i(67788),TopCenter:i(78170),TopLeft:i(54145),TopRight:i(75548)}},21843:(t,e,i)=>{var s=i(28417),n=i(81711);t.exports=function(t,e,i){return s(t,e),n(t,i)}},97328:t=>{t.exports=function(t){return t.y+t.height-t.height*t.originY}},7126:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(70271),o=i(47196);t.exports=function(t,e){void 0===e&&(e={});var i=n(t),a=o(t);return e.x=i,e.y=a,e.width=r(t)-i,e.height=s(t)-a,e}},59994:t=>{t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},29568:t=>{t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},40163:t=>{t.exports=function(t){return t.x-t.width*t.originX}},52088:t=>{t.exports=function(t){return t.width*t.originX}},23379:t=>{t.exports=function(t){return t.height*t.originY}},70271:t=>{t.exports=function(t){return t.x+t.width-t.width*t.originX}},47196:t=>{t.exports=function(t){return t.y-t.height*t.originY}},73174:t=>{t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},28417:t=>{t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},81711:t=>{t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},74465:t=>{t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},19298:t=>{t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},84349:t=>{t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},15252:(t,e,i)=>{t.exports={CenterOn:i(21843),GetBottom:i(97328),GetBounds:i(7126),GetCenterX:i(59994),GetCenterY:i(29568),GetLeft:i(40163),GetOffsetX:i(52088),GetOffsetY:i(23379),GetRight:i(70271),GetTop:i(47196),SetBottom:i(73174),SetCenterX:i(28417),SetCenterY:i(81711),SetLeft:i(74465),SetRight:i(19298),SetTop:i(84349)}},70616:t=>{t.exports={setCrisp:function(t){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach((function(e){t.style["image-rendering"]=e})),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},61068:(t,e,i)=>{var s,n,r,o=i(86459),a=i(8213),h=[],l=!1;t.exports=(r=function(){var t=0;return h.forEach((function(e){e.parent&&t++})),t},{create2D:function(t,e,i){return s(t,e,i,o.CANVAS)},create:s=function(t,e,i,s,r){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=o.CANVAS),void 0===r&&(r=!1);var c=n(s);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:s},s===o.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),r&&(c.parent=u),u.width=e,u.height=i,l&&s===o.CANVAS&&a.disable(u.getContext("2d")),u},createWebGL:function(t,e,i){return s(t,e,i,o.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:n=function(t){if(void 0===t&&(t=o.CANVAS),t===o.WEBGL)return null;for(var e=0;e{var e,i="";t.exports={disable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!1),t},enable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!0),t},getPrefix:e=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i{t.exports=function(t,e){return void 0===e&&(e="none"),t.style.msTouchAction=e,t.style["ms-touch-action"]=e,t.style["touch-action"]=e,t}},36505:t=>{t.exports=function(t,e){void 0===e&&(e="none");return["-webkit-","-khtml-","-moz-","-ms-",""].forEach((function(i){t.style[i+"user-select"]=e})),t.style["-webkit-touch-callout"]=e,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t}},23514:(t,e,i)=>{t.exports={CanvasInterpolation:i(70616),CanvasPool:i(61068),Smoothing:i(8213),TouchAction:i(59271),UserSelect:i(36505)}},27119:(t,e,i)=>{var s=i(56694),n=i(22946),r=i(5657),o=i(24650),a=i(68033),h=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,s)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(t,e,i,s,n){return void 0===s&&(s=255),void 0===n&&(n=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=s,this._locked=!1,this.update(n)},setGLTo:function(t,e,i,s){return void 0===s&&(s=1),this._locked=!0,this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=s,this._locked=!1,this.update(!0)},setFromRGB:function(t){return this._locked=!0,this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this._locked=!1,this.update(!0)},setFromHSV:function(t,e,i){return o(t,e,i,this)},update:function(t){if(void 0===t&&(t=!1),this._locked)return this;var e=this.r,i=this.g,s=this.b,o=this.a;return this._color=n(e,i,s),this._color32=r(e,i,s,o),this._rgba="rgba("+e+","+i+","+s+","+o/255+")",t&&a(e,i,s,this),this},updateHSV:function(){var t=this.r,e=this.g,i=this.b;return a(t,e,i,this),this},clone:function(){return new h(this.r,this.g,this.b,this.a)},gray:function(t){return this.setTo(t,t,t)},random:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t)),s=Math.floor(t+Math.random()*(e-t)),n=Math.floor(t+Math.random()*(e-t));return this.setTo(i,s,n)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t));return this.setTo(i,i,i)},saturate:function(t){return this.s+=t/100,this},desaturate:function(t){return this.s-=t/100,this},lighten:function(t){return this.v+=t/100,this},darken:function(t){return this.v-=t/100,this},brighten:function(t){var e=this.r,i=this.g,s=this.b;return e=Math.max(0,Math.min(255,e-Math.round(-t/100*255))),i=Math.max(0,Math.min(255,i-Math.round(-t/100*255))),s=Math.max(0,Math.min(255,s-Math.round(-t/100*255))),this.setTo(e,i,s)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(t){this.gl[0]=Math.min(Math.abs(t),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(t){this.gl[1]=Math.min(Math.abs(t),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(t){this.gl[2]=Math.min(Math.abs(t),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(t){this.gl[3]=Math.min(Math.abs(t),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(t){t=Math.floor(Math.abs(t)),this.r=Math.min(t,255),this.gl[0]=t/255,this.update(!0)}},green:{get:function(){return this.g},set:function(t){t=Math.floor(Math.abs(t)),this.g=Math.min(t,255),this.gl[1]=t/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(t){t=Math.floor(Math.abs(t)),this.b=Math.min(t,255),this.gl[2]=t/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(t){t=Math.floor(Math.abs(t)),this.a=Math.min(t,255),this.gl[3]=t/255,this.update()}},h:{get:function(){return this._h},set:function(t){this._h=t,o(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,o(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,o(this._h,this._s,t,this)}}});t.exports=h},30245:(t,e,i)=>{var s=i(22946);t.exports=function(t){void 0===t&&(t=1024);var e,i=[],n=255,r=255,o=0,a=0;for(e=0;e<=n;e++)i.push({r:r,g:e,b:a,color:s(r,e,a)});for(o=255,e=n;e>=0;e--)i.push({r:e,g:o,b:a,color:s(e,o,a)});for(r=0,e=0;e<=n;e++,o--)i.push({r:r,g:o,b:e,color:s(r,o,e)});for(o=0,a=255,e=0;e<=n;e++,a--,r++)i.push({r:r,g:o,b:a,color:s(r,o,a)});if(1024===t)return i;var h=[],l=0,u=1024/t;for(e=0;e{t.exports=function(t){var e={r:t>>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},25409:t=>{t.exports=function(t){var e=t.toString(16);return 1===e.length?"0"+e:e}},22946:t=>{t.exports=function(t,e,i){return t<<16|e<<8|i}},5657:t=>{t.exports=function(t,e,i,s){return s<<24|t<<16|e<<8|i}},74777:(t,e,i)=>{var s=i(27119),n=i(59998);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=n(l,h,t+1/3),o=n(l,h,t),a=n(l,h,t-1/3)}return(new s).setGLTo(r,o,a,1)}},89263:(t,e,i)=>{var s=i(24650);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],n=0;n<=359;n++)i.push(s(n/359,t,e));return i}},24650:(t,e,i)=>{var s=i(22946);function n(t,e,i,s){var n=(t+6*e)%6,r=Math.min(n,4-n,1);return Math.round(255*(s-s*i*Math.max(0,r)))}t.exports=function(t,e,i,r){void 0===e&&(e=1),void 0===i&&(i=1);var o=n(5,t,e,i),a=n(3,t,e,i),h=n(1,t,e,i);return r?r.setTo?r.setTo(o,a,h,r.alpha,!0):(r.r=o,r.g=a,r.b=h,r.color=s(o,a,h),r):{r:o,g:a,b:h,color:s(o,a,h)}}},91487:(t,e,i)=>{var s=i(27119);t.exports=function(t){var e=new s;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,i,s){return e+e+i+i+s+s}));var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var n=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(n,r,o)}return e}},59998:t=>{t.exports=function(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},74853:(t,e,i)=>{var s=i(27119),n=i(15978);t.exports=function(t){var e=n(t);return new s(e.r,e.g,e.b,e.a)}},15978:t=>{t.exports=function(t){return t>16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},53756:(t,e,i)=>{var s=i(42798),n=function(t,e,i,n,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var l=h/a;return{r:s(t,n,l),g:s(e,r,l),b:s(i,o,l)}};t.exports={RGBWithRGB:n,ColorWithRGB:function(t,e,i,s,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),n(t.r,t.g,t.b,e,i,s,r,o)},ColorWithColor:function(t,e,i,s){return void 0===i&&(i=100),void 0===s&&(s=0),n(t.r,t.g,t.b,e.r,e.g,e.b,i,s)}}},73904:(t,e,i)=>{var s=i(27119);t.exports=function(t){return new s(t.r,t.g,t.b,t.a)}},26841:(t,e,i)=>{var s=i(27119);t.exports=function(t){var e=new s,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var n=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(n,r,o,255*a)}return e}},68033:t=>{t.exports=function(t,e,i,s){void 0===s&&(s={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var n=Math.min(t,e,i),r=Math.max(t,e,i),o=r-n,a=0,h=0===r?0:o/r,l=r;return r!==n&&(r===t?a=(e-i)/o+(e{var s=i(25409);t.exports=function(t,e,i,n,r){return void 0===n&&(n=255),void 0===r&&(r="#"),"#"===r?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1,7):"0x"+s(n)+s(t)+s(e)+s(i)}},37243:(t,e,i)=>{var s=i(17489),n=i(27119);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new n(s(t,e),s(t,e),s(t,e))}},93222:(t,e,i)=>{var s=i(91487),n=i(74853),r=i(73904),o=i(26841);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):s(t);case"number":return n(t);case"object":return r(t)}}},95509:(t,e,i)=>{var s=i(27119);s.ColorSpectrum=i(30245),s.ColorToRGBA=i(86672),s.ComponentToHex=i(25409),s.GetColor=i(22946),s.GetColor32=i(5657),s.HexStringToColor=i(91487),s.HSLToColor=i(74777),s.HSVColorWheel=i(89263),s.HSVToRGB=i(24650),s.HueToComponent=i(59998),s.IntegerToColor=i(74853),s.IntegerToRGB=i(15978),s.Interpolate=i(53756),s.ObjectToColor=i(73904),s.RandomRGB=i(37243),s.RGBStringToColor=i(26841),s.RGBToHSV=i(68033),s.RGBToString=i(4880),s.ValueToColor=i(93222),t.exports=s},24816:(t,e,i)=>{t.exports={Align:i(93545),BaseShader:i(31053),Bounds:i(15252),Canvas:i(23514),Color:i(95509),ColorMatrix:i(65246),Masks:i(93310),RGB:i(39298)}},76756:(t,e,i)=>{var s=i(56694),n=i(61286),r=new s({initialize:function(t,e,i,s,n,r){e||(e=t.sys.make.image({x:i,y:s,key:n,frame:r,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e,i)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});n.register("bitmapMask",(function(t,e,i,s,n){return new r(this.scene,t,e,i,s,n)})),t.exports=r},63037:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var s=t.gl;t.flush(),0===t.maskStack.length&&(s.enable(s.STENCIL_TEST),s.clear(s.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var s=t.gl,n=this.geometryMask,r=t.maskCount;s.colorMask(!1,!1,!1,!1),i?(s.stencilFunc(s.EQUAL,r,255),s.stencilOp(s.KEEP,s.KEEP,s.INCR)):(s.stencilFunc(s.EQUAL,r+1,255),s.stencilOp(s.KEEP,s.KEEP,s.DECR)),n.renderWebGL(t,n,e),t.flush(),s.colorMask(!0,!0,!0,!0),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),i?this.invertAlpha?s.stencilFunc(s.NOTEQUAL,r+1,255):s.stencilFunc(s.EQUAL,r+1,255):this.invertAlpha?s.stencilFunc(s.NOTEQUAL,r,255):s.stencilFunc(s.EQUAL,r,255)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;if(0===t.maskStack.length)i.mask=null,e.disable(e.STENCIL_TEST);else{var s=t.maskStack[t.maskStack.length-1];s.mask.applyStencil(t,s.camera,!1),t.currentCameraMask.mask!==s.mask?(i.mask=s.mask,i.camera=s.camera):i.mask=null}},preRenderCanvas:function(t,e,i){var s=this.geometryMask;t.currentContext.save(),s.renderCanvas(t,s,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=s},93310:(t,e,i)=>{t.exports={BitmapMask:i(76756),GeometryMask:i(63037)}},31053:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s){e&&""!==e||(e=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join("\n")),i&&""!==i||(i=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join("\n")),void 0===s&&(s=null),this.key=t,this.fragmentSrc=e,this.vertexSrc=i,this.uniforms=s}});t.exports=s},99584:t=>{t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement||null===e)return t;return i||(i=document.body),i.appendChild(t),t}},85178:(t,e,i)=>{var s=i(99584);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+e.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=i,s(i,e.parent)}}},21546:(t,e,i)=>{var s=i(36580);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?s.cordova?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},74181:t=>{t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},s=document.createElement("div");return s.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(s),i.w=90===e?s.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:s.offsetHeight,document.documentElement.removeChild(s),s=null,90!==Math.abs(window.orientation)?i.h:i.w}},9229:(t,e,i)=>{var s=i(55301);t.exports=function(t,e){var i=window.screen,n=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);return n&&"string"==typeof n.type?n.type:"string"==typeof n?n:"number"==typeof window.orientation?0===window.orientation||180===window.orientation?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE:window.matchMedia?window.matchMedia("(orientation: portrait)").matches?s.ORIENTATION.PORTRAIT:window.matchMedia("(orientation: landscape)").matches?s.ORIENTATION.LANDSCAPE:void 0:e>t?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE}},2893:t=>{t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||(e=document.body),e}},89200:t=>{t.exports=function(t){var e="";try{if(window.DOMParser)e=(new DOMParser).parseFromString(t,"text/xml");else(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},55638:t=>{t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},27385:(t,e,i)=>{var s=i(56694),n=i(72283),r=new s({initialize:function(){this.isRunning=!1,this.callback=n,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var t=this;this.step=function e(i){t.callback(i),t.isRunning&&(t.timeOutID=window.requestAnimationFrame(e))},this.stepTimeout=function e(){t.isRunning&&(t.timeOutID=window.setTimeout(e,t.delay)),t.callback(window.performance.now())}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.delay=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=n}});t.exports=r},3590:(t,e,i)=>{var s={AddToDOM:i(99584),DOMContentLoaded:i(21546),GetInnerHeight:i(74181),GetScreenOrientation:i(9229),GetTarget:i(2893),ParseXML:i(89200),RemoveFromDOM:i(55638),RequestAnimationFrame:i(27385)};t.exports=s},78491:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(91963),o=new s({Extends:n,initialize:function(){n.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},95146:(t,e,i)=>{t.exports={EventEmitter:i(78491)}},88933:(t,e,i)=>{var s=i(95723),n=i(20494);t.exports=function(t,e,i){e.x=n(i,"x",0),e.y=n(i,"y",0),e.depth=n(i,"depth",0),e.flipX=n(i,"flipX",!1),e.flipY=n(i,"flipY",!1);var r=n(i,"scale",null);"number"==typeof r?e.setScale(r):null!==r&&(e.scaleX=n(r,"x",1),e.scaleY=n(r,"y",1));var o=n(i,"scrollFactor",null);"number"==typeof o?e.setScrollFactor(o):null!==o&&(e.scrollFactorX=n(o,"x",1),e.scrollFactorY=n(o,"y",1)),e.rotation=n(i,"rotation",0);var a=n(i,"angle",null);null!==a&&(e.angle=a),e.alpha=n(i,"alpha",1);var h=n(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=n(h,"x",.5),u=n(h,"y",.5);e.setOrigin(l,u)}return e.blendMode=n(i,"blendMode",s.NORMAL),e.visible=n(i,"visible",!0),n(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},32291:(t,e,i)=>{var s=i(20494);t.exports=function(t,e){var i=s(e,"anims",null);if(null===i)return t;if("string"==typeof i)t.anims.play(i);else if("object"==typeof i){var n=t.anims,r=s(i,"key",void 0);if(r){var o=s(i,"startFrame",void 0),a=s(i,"delay",0),h=s(i,"repeat",0),l=s(i,"repeatDelay",0),u=s(i,"yoyo",!1),c=s(i,"play",!1),d=s(i,"delayedPlay",0),p={key:r,delay:a,repeat:h,repeatDelay:l,yoyo:u,startFrame:o};c?n.play(p):d>0?n.playAfterDelay(p,d):n.load(p)}}return t}},91713:(t,e,i)=>{var s=i(56694),n=i(71207),r=i(91963),o=i(56631),a=i(7599),h=i(17922),l=new s({Extends:n,initialize:function(t){n.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(a.BOOT,this.boot,this),this.events.on(a.START,this.start,this)},boot:function(){this.events.once(a.DESTROY,this.destroy,this)},addChildCallback:function(t){t.displayList&&t.displayList!==this&&t.removeFromDisplayList(),t.parentContainer&&t.parentContainer.remove(t),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(o.ADDED_TO_SCENE,t,this.scene),this.events.emit(a.ADDED_TO_SCENE,t,this.scene))},removeChildCallback:function(t){this.queueDepthSort(),t.displayList=null,t.emit(o.REMOVED_FROM_SCENE,t,this.scene),this.events.emit(a.REMOVED_FROM_SCENE,t,this.scene)},start:function(){this.events.once(a.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(h(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},shutdown:function(){for(var t=this.list;t.length;)t[0].destroy(!0);this.events.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});r.register("DisplayList",l,"displayList"),t.exports=l},89980:(t,e,i)=>{var s=i(56694),n=i(48129),r=i(81078),o=i(6659),a=i(56631),h=i(7599),l=new s({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(a.ADDED_TO_SCENE,this.addedToScene,this),this.on(a.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(t,e){return this.data||(this.data=new r(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new r(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new r(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new r(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return n(this)},willRender:function(t){return!(!(!this.displayList||!this.displayList.active||this.displayList.willRender(t))||l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(a.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t&&t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(a.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},99325:(t,e,i)=>{var s=i(56694),n=i(91963),r=i(7599),o=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},n.register("GameObjectCreator",o,"make"),t.exports=o},61286:(t,e,i)=>{var s=i(56694),n=i(91963),r=i(7599),o=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},n.register("GameObjectFactory",o,"add"),t.exports=o},73329:(t,e,i)=>{var s=i(69360),n=new s,r=new s,o=new s,a={camera:n,sprite:r,calc:o};t.exports=function(t,e,i){var s=n,h=r,l=o;return h.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),h.e=t.x,h.f=t.y):(h.e-=e.scrollX*t.scrollFactorX,h.f-=e.scrollY*t.scrollFactorY),s.multiply(h,l),a}},92034:(t,e,i)=>{var s=i(56694),n=i(74623),r=i(91963),o=i(7599),a=new s({Extends:n,initialize:function(t){n.call(this),this.checkQueue=!0,this.scene=t,this.systems=t.sys,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.start,this)},boot:function(){this.systems.events.once(o.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(o.PRE_UPDATE,this.update,this),t.on(o.UPDATE,this.sceneUpdate,this),t.once(o.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(t,e){for(var i=this._active,s=i.length,n=0;n{t.exports=function(t,e,i,s,n,r,o,a,h,l,u,c,d,p,f){var v=i.x-e.displayOriginX+n,g=i.y-e.displayOriginY+r,m=v+i.w,y=g+i.h,x=o.getXRound(v,g,a),T=o.getYRound(v,g,a),w=o.getXRound(v,y,a),b=o.getYRound(v,y,a),E=o.getXRound(m,y,a),S=o.getYRound(m,y,a),A=o.getXRound(m,g,a),_=o.getYRound(m,g,a);t.batchQuad(e,x,T,w,b,E,S,A,_,s.u0,s.v0,s.u1,s.v1,h,l,u,c,d,p,f)}},82173:t=>{t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),void 0===s)return s={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0};var n,r,o,a,h=t.text,l=h.length,u=t.maxWidth,c=t.wordWrapCharCode,d=Number.MAX_VALUE,p=Number.MAX_VALUE,f=0,v=0,g=t.fontData.chars,m=t.fontData.lineHeight,y=t.letterSpacing,x=t.lineSpacing,T=0,w=0,b=0,E=null,S=t._align,A=0,_=0,C=t.fontSize/t.fontData.size,M=C*t.scaleX,R=C*t.scaleY,P=null,O=0,L=[],F=Number.MAX_VALUE,D=0,k=0,I=0,B=[],N=[],Y=null;if(u>0){for(n=0;nu||H-z>u?(G.push(V.i-1),V.cr?(G.push(V.i+V.word.length),z=0,X=null):X=V):V.cr&&(G.push(V.i+V.word.length),z=0,X=null)}for(n=G.length-1;n>=0;n--)r=h,o=G[n],a="\n",h=r.substr(0,o)+a+r.substr(o+1);s.wrappedText=h,l=h.length,B=[],Y=null}var j=0;for(n=0;nA&&(d=A),p>_&&(p=_);var q=A+E.xAdvance,Z=_+m;fD&&(D=I),ID&&(D=I),I0)for(var Q=0;Q{var s=i(31476);t.exports=function(t,e,i,n,r,o,a){var h=t.sys.textures.get(i),l=h.get(n),u=t.sys.cache.xml.get(r);if(l&&u){var c=s(u,l,o,a,h);return t.sys.cache.bitmapFont.add(e,{data:c,texture:i,frame:n,fromAtlas:!0}),!0}return!1}},39860:(t,e,i)=>{var s=i(10850);t.exports=function(t,e){var i=e.width,n=e.height,r=Math.floor(i/2),o=Math.floor(n/2),a=s(e,"chars","");if(""!==a){var h=s(e,"image",""),l=t.sys.textures.getFrame(h),u=l.cutX,c=l.cutY,d=l.source.width,p=l.source.height,f=s(e,"offset.x",0),v=s(e,"offset.y",0),g=s(e,"spacing.x",0),m=s(e,"spacing.y",0),y=s(e,"lineSpacing",0),x=s(e,"charsPerRow",null);null===x&&(x=d/i)>a.length&&(x=a.length);for(var T=f,w=v,b={retroFont:!0,font:h,size:i,lineHeight:n+y,chars:{}},E=0,S=0;S{function e(t,e){return parseInt(t.getAttribute(e),10)}t.exports=function(t,i,s,n,r){void 0===s&&(s=0),void 0===n&&(n=0);var o=i.cutX,a=i.cutY,h=i.source.width,l=i.source.height,u=i.sourceIndex,c={},d=t.getElementsByTagName("info")[0],p=t.getElementsByTagName("common")[0];c.font=d.getAttribute("face"),c.size=e(d,"size"),c.lineHeight=e(p,"lineHeight")+n,c.chars={};var f=t.getElementsByTagName("char"),v=void 0!==i&&i.trimmed;if(v)var g=i.height,m=i.width;for(var y=0;y{var s=i(66863),n=i(98611),r={Parse:i(39860)};r=n(!1,r,s),t.exports=r},66863:t=>{t.exports={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},13468:(t,e,i)=>{var s=i(44616),n=i(56694),r=i(88899),o=new n({Extends:s,Mixins:[r],initialize:function(t,e,i,n,r,o,a){s.call(this,t,e,i,n,r,o,a),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}});t.exports=o},93438:(t,e,i)=>{var s=i(49584);t.exports=function(t,e,i,n){var r=e._text,o=r.length,a=t.currentContext;if(0!==o&&s(t,a,e,i,n)){i.addToRenderList(e);var h=e.fromAtlas?e.frame:e.texture.frames.__BASE,l=e.displayCallback,u=e.callbackData,c=e.fontData.chars,d=e.fontData.lineHeight,p=e._letterSpacing,f=0,v=0,g=0,m=null,y=0,x=0,T=0,w=0,b=0,E=0,S=null,A=0,_=e.frame.source.image,C=h.cutX,M=h.cutY,R=0,P=0,O=e._fontSize/e.fontData.size,L=e._align,F=0,D=0;e.getTextBounds(!1);var k=e._bounds.lines;1===L?D=(k.longest-k.lengths[0])/2:2===L&&(D=k.longest-k.lengths[0]),a.translate(-e.displayOriginX,-e.displayOriginY);var I=i.roundPixels;e.cropWidth>0&&e.cropHeight>0&&(a.beginPath(),a.rect(0,0,e.cropWidth,e.cropHeight),a.clip());for(var B=0;B{var s=i(13468),n=i(88933),r=i(99325),o=i(20494);r.register("dynamicBitmapText",(function(t,e){void 0===t&&(t={});var i=o(t,"font",""),r=o(t,"text",""),a=o(t,"size",!1),h=new s(this.scene,0,0,i,r,a);return void 0!==e&&(t.add=e),n(this.scene,h,t),h}))},94145:(t,e,i)=>{var s=i(13468);i(61286).register("dynamicBitmapText",(function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,n,r))}))},88899:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(16873),r=i(93438),t.exports={renderWebGL:n,renderCanvas:r}},16873:(t,e,i)=>{var s=i(73329),n=i(69360),r=i(75512),o=new n;t.exports=function(t,e,i,n){var a=e.text,h=a.length;if(0!==h){i.addToRenderList(e);var l=t.pipelines.set(e.pipeline,e),u=s(e,i,n),c=u.sprite,d=u.calc,p=o,f=e.cropWidth>0||e.cropHeight>0;f&&(l.flush(),t.pushScissor(d.tx,d.ty,e.cropWidth*d.scaleX,e.cropHeight*d.scaleY));var v,g,m=e.frame.glTexture,y=e.tintFill,x=r.getTintAppendFloatAlpha(e.tintTopLeft,i.alpha*e._alphaTL),T=r.getTintAppendFloatAlpha(e.tintTopRight,i.alpha*e._alphaTR),w=r.getTintAppendFloatAlpha(e.tintBottomLeft,i.alpha*e._alphaBL),b=r.getTintAppendFloatAlpha(e.tintBottomRight,i.alpha*e._alphaBR),E=l.setGameObject(e),S=0,A=0,_=0,C=0,M=e.letterSpacing,R=0,P=0,O=e.scrollX,L=e.scrollY,F=e.fontData,D=F.chars,k=F.lineHeight,I=e.fontSize/F.size,B=0,N=e._align,Y=0,U=0,X=e.getTextBounds(!1);e.maxWidth>0&&(h=(a=X.wrappedText).length);var z=e._bounds.lines;1===N?U=(z.longest-z.lengths[0])/2:2===N&&(U=z.longest-z.lengths[0]);var G=i.roundPixels,V=e.displayCallback,W=e.callbackData;t.pipelines.preBatch(e);for(var H=0;H{var s=i(56694),n=i(82897),r=i(64937),o=i(89980),a=i(82173),h=i(68298),l=i(31476),u=i(74118),c=i(84557),d=new s({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Texture,r.Tint,r.Transform,r.Visible,c],initialize:function(t,e,i,s,n,r,h){void 0===n&&(n=""),void 0===h&&(h=0),o.call(this,t,"BitmapText"),this.font=s;var l=this.scene.sys.cache.bitmapFont.get(s);l||console.warn("Invalid BitmapText key: "+s),this.fontData=l.data,this._text="",this._fontSize=r||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=h,this._bounds=a(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=l.fromAtlas,this.setTexture(l.texture,l.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.setText(n)},setLeftAlign:function(){return this._align=d.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=d.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=d.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(t){return this._fontSize=t,this._dirty=!0,this},setLetterSpacing:function(t){return void 0===t&&(t=0),this._letterSpacing=t,this._dirty=!0,this},setLineSpacing:function(t){return void 0===t&&(t=0),this.lineSpacing=t,this},setText:function(t){return t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t!==this.text&&(this._text=t.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=.5),this.dropShadowX=t,this.dropShadowY=e,this.dropShadowColor=i,this.dropShadowAlpha=s,this},setCharacterTint:function(t,e,i,s,r,o,a){void 0===t&&(t=0),void 0===e&&(e=1),void 0===i&&(i=!1),void 0===s&&(s=-1),void 0===r&&(r=s,o=s,a=s);var h=this.text.length;-1===e&&(e=h),t<0&&(t=h+t),t=n(t,0,h-1);for(var l=n(t+e,t,h),u=this.charColors,c=t;c{var s=i(49584);t.exports=function(t,e,i,n){var r=e._text,o=r.length,a=t.currentContext;if(0!==o&&s(t,a,e,i,n)){i.addToRenderList(e);var h=e.fromAtlas?e.frame:e.texture.frames.__BASE,l=e.fontData.chars,u=e.fontData.lineHeight,c=e._letterSpacing,d=e._lineSpacing,p=0,f=0,v=0,g=null,m=0,y=0,x=0,T=0,w=0,b=0,E=null,S=0,A=h.source.image,_=h.cutX,C=h.cutY,M=e._fontSize/e.fontData.size,R=e._align,P=0,O=0,L=e.getTextBounds(!1);e.maxWidth>0&&(o=(r=L.wrappedText).length);var F=e._bounds.lines;1===R?O=(F.longest-F.lengths[0])/2:2===R&&(O=F.longest-F.lengths[0]),a.translate(-e.displayOriginX,-e.displayOriginY);for(var D=i.roundPixels,k=0;k{var s=i(44616),n=i(88933),r=i(99325),o=i(20494),a=i(10850);r.register("bitmapText",(function(t,e){void 0===t&&(t={});var i=a(t,"font",""),r=o(t,"text",""),h=o(t,"size",!1),l=a(t,"align",0),u=new s(this.scene,0,0,i,r,h,l);return void 0!==e&&(t.add=e),n(this.scene,u,t),u}))},21797:(t,e,i)=>{var s=i(44616);i(61286).register("bitmapText",(function(t,e,i,n,r,o){return this.displayList.add(new s(this.scene,t,e,i,n,r,o))}))},84557:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(26372),r=i(97545),t.exports={renderWebGL:n,renderCanvas:r}},26372:(t,e,i)=>{var s=i(8810),n=i(73329),r=i(75512);t.exports=function(t,e,i,o){if(0!==e._text.length){i.addToRenderList(e);var a,h,l,u=t.pipelines.set(e.pipeline,e),c=n(e,i,o).calc,d=i.roundPixels,p=i.alpha,f=e.charColors,v=e.tintFill,g=r.getTintAppendFloatAlpha,m=g(e.tintTopLeft,p*e._alphaTL),y=g(e.tintTopRight,p*e._alphaTR),x=g(e.tintBottomLeft,p*e._alphaBL),T=g(e.tintBottomRight,p*e._alphaBR),w=e.frame.glTexture,b=u.setGameObject(e),E=e.getTextBounds(!1).characters,S=e.dropShadowX,A=e.dropShadowY,_=0!==S||0!==A;if(t.pipelines.preBatch(e),_){var C=e.dropShadowColor,M=e.dropShadowAlpha,R=g(C,p*M*e._alphaTL),P=g(C,p*M*e._alphaTR),O=g(C,p*M*e._alphaBL),L=g(C,p*M*e._alphaBR);for(a=0;a{var s=i(92246),n=i(41664),r=i(56694),o=i(64937),a=i(82047),h=i(89980),l=i(71207),u=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,s],initialize:function(t,e,i,s,n){h.call(this,t,"Blitter"),this.setTexture(s,n),this.setPosition(e,i),this.initPipeline(),this.children=new l,this.renderList=[],this.dirty=!1},create:function(t,e,i,s,r){void 0===s&&(s=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));var o=new n(this,t,e,i,s);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,s){for(var n=this.createMultiple(e,i,s),r=0;r0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});t.exports=u},33177:t=>{t.exports=function(t,e,i,s){var n=e.getRenderList();if(0!==n.length){var r=t.currentContext,o=i.alpha*e.alpha;if(0!==o){i.addToRenderList(e),r.globalCompositeOperation=t.blendModes[e.blendMode],r.imageSmoothingEnabled=!e.frame.source.scaleMode;var a=e.x-i.scrollX*e.scrollFactorX,h=e.y-i.scrollY*e.scrollFactorY;r.save(),s&&s.copyToContext(r);for(var l=i.roundPixels,u=0;u0&&f.height>0&&(r.save(),r.translate(c.x+a,c.y+h),r.scale(m,y),r.drawImage(p.source.image,f.x,f.y,f.width,f.height,v,g,f.width,f.height),r.restore())):(l&&(v=Math.round(v),g=Math.round(g)),f.width>0&&f.height>0&&r.drawImage(p.source.image,f.x,f.y,f.width,f.height,v+c.x+a,g+c.y+h,f.width,f.height)))}r.restore()}}}},68452:(t,e,i)=>{var s=i(52816),n=i(88933),r=i(99325),o=i(20494);r.register("blitter",(function(t,e){void 0===t&&(t={});var i=o(t,"key",null),r=o(t,"frame",null),a=new s(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),n(this.scene,a,t),a}))},38906:(t,e,i)=>{var s=i(52816);i(61286).register("blitter",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},92246:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(89165),r=i(33177),t.exports={renderWebGL:n,renderCanvas:r}},89165:(t,e,i)=>{var s=i(69360),n=i(75512),r=new s;t.exports=function(t,e,i,s){var o=e.getRenderList(),a=i.alpha*e.alpha;if(0!==o.length&&0!==a){i.addToRenderList(e);var h=t.pipelines.set(this.pipeline,e),l=i.scrollX*e.scrollFactorX,u=i.scrollY*e.scrollFactorY,c=r.copyFrom(i.matrix);s&&(c.multiplyWithOffset(s,-l,-u),l=0,u=0);var d=e.x-l,p=e.y-u,f=-1,v=i.roundPixels;t.pipelines.preBatch(e);for(var g=0;g{var s=i(56694),n=i(82047),r=new s({initialize:function(t,e,i,s,n){this.parent=t,this.x=e,this.y=i,this.frame=s,this.data={},this.tint=16777215,this._visible=n,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(t){return void 0===t?this.frame=this.parent.frame:t instanceof n&&t.texture===this.parent.texture?this.frame=t:this.frame=this.parent.texture.get(t),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(t,e,i){return this.x=t,this.y=e,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,i&&this.setFrame(i),this},setPosition:function(t,e){return this.x=t,this.y=e,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},setVisible:function(t){return this.visible=t,this},setAlpha:function(t){return this.alpha=t,this},setTint:function(t){return this.tint=t,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(t){this.parent.dirty|=this._visible!==t,this._visible=t}},alpha:{get:function(){return this._alpha},set:function(t){this.parent.dirty|=this._alpha>0!=t>0,this._alpha=t}}});t.exports=r},97123:(t,e,i)=>{var s=i(82897),n={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,n){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=s(t,0,1),this._alphaTR=s(e,0,1),this._alphaBL=s(i,0,1),this._alphaBR=s(n,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=s(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=s(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=s(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=s(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=n},15720:(t,e,i)=>{var s=i(82897),n={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=n},69732:(t,e,i)=>{var s=i(95723),n={_blendMode:s.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=s[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=n},28284:t=>{t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},85293:t=>{var e={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var n=t;this.frame.setCropUVs(this._crop,n.x,n.y,n.width,n.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=e},14975:t=>{var e={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=e},88677:t=>{var e={fxPadding:0,setFXPadding:function(t){return void 0===t&&(t=0),this.fxPadding=t,this},onFXCopy:function(){},onFX:function(){}};t.exports=e},92972:t=>{t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},80693:(t,e,i)=>{var s=i(74118),n=i(2386),r=i(93736),o={prepareBoundsOutput:function(t,e){(void 0===e&&(e=!1),0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,n,r,o,a,h,l;if(void 0===t&&(t=new s),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),u.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),n=t.x,r=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),o=t.x,a=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),n=t.x,r=t.y,this.getBottomLeft(t),o=t.x,a=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,n,o,h),t.y=Math.min(i,r,a,l),t.width=Math.max(e,n,o,h)-t.x,t.height=Math.max(i,r,a,l)-t.y,t}};t.exports=o},39171:(t,e,i)=>{var s=i(76756),n=i(63037),r={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t,e,i,n,r){return void 0===t&&(this.texture||this.shader||this.geom)&&(t=this),new s(this.scene,t,e,i,n,r)},createGeometryMask:function(t){return void 0!==t||"Graphics"!==this.type&&!this.geom||(t=this),new n(this.scene,t)}};t.exports=r},28072:t=>{var e={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=e},54211:(t,e,i)=>{var s=i(75606),n=i(63130),r=i(10850),o=i(55303),a=i(93736),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:o.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=r(t,"from",0),t.to=r(t,"to",1);var h=n(t,"positionOnPath",!1);this.rotateToPath=n(t,"rotateToPath",!1),this.pathRotationOffset=r(t,"rotationOffset",0);var l=r(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.setTargetValue()}),this.pathOffset||(this.pathOffset=new a(this.x,this.y)),this.pathVector||(this.pathVector=new a),this.pathDelta||(this.pathDelta=new a),this.pathDelta.reset(),t.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=o.PLAYING_FORWARD,this.rotateToPath){var u=this.path.getPoint(.1);this.rotation=Math.atan2(u.y-this.y,u.x-this.x)+s(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t){var e=t.data[0],i=this.pathDelta,n=this.pathVector;if(i.copy(n).negate(),e.state===o.COMPLETE)return this.path.getPoint(e.end,n),i.add(n),n.add(this.pathOffset),void this.setPosition(n.x,n.y);if(e.state!==o.PLAYING_FORWARD&&e.state!==o.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),n),i.add(n),n.add(this.pathOffset);var r=this.x,a=this.y;this.setPosition(n.x,n.y);var h=this.x-r,l=this.y-a;if(0===h&&0===l)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(l,h)+s(this.pathRotationOffset))}}};t.exports=h},58210:(t,e,i)=>{var s=i(28699),n=i(72677),r={defaultPipeline:null,pipeline:null,hasPostPipeline:!1,postPipelines:null,pipelineData:null,initPipeline:function(t){var e=this.scene.sys.renderer;if(!e)return!1;var i=e.pipelines;if(this.postPipelines=[],this.pipelineData={},i){void 0===t&&(t=i.default);var s=i.get(t);if(s)return this.defaultPipeline=s,this.pipeline=s,!0}return!1},setPipeline:function(t,e,i){var n=this.scene.sys.renderer;if(!n)return this;var r=n.pipelines;if(r){var o=r.get(t);o&&(this.pipeline=o),e&&(this.pipelineData=i?s(e):e)}return this},setPostPipeline:function(t,e,i){var n=this.scene.sys.renderer;if(!n)return this;var r=n.pipelines;if(r){Array.isArray(t)||(t=[t]);for(var o=0;o0,this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e="string"==typeof t,i=this.postPipelines,s=[],n=0;n=0;i--){var s=e[i];("string"==typeof t&&s.name===t||"string"!=typeof t&&s instanceof t)&&(s.destroy(),n(e,i))}return this.hasPostPipeline=this.postPipelines.length>0,this},getPipelineName:function(){return this.pipeline.name}};t.exports=r},45900:t=>{var e={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=e},31654:t=>{var e={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=this.width,e.hitArea.height=this.height),this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=e},82081:(t,e,i)=>{var s=i(82047),n={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=n},21850:(t,e,i)=>{var s=i(82047),n={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var n=t;this.frame.setCropUVs(this._crop,n.x,n.y,n.width,n.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=n},58072:t=>{var e={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,i=t,s=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=s,this.tintFill=!1,this},setTintFill:function(t,e,i,s){return this.setTint(t,e,i,s),this.tintFill=!0,this},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};t.exports=e},48129:t=>{t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},56584:(t,e,i)=>{var s=i(83392),n=i(69360),r=i(64462),o=i(35786),a=i(62138),h=i(93736),l={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return a(this._rotation*s.RAD_TO_DEG)},set:function(t){this.rotation=a(t)*s.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=o(t)}},setPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=0),this.x=t,this.y=e,this.z=i,this.w=s,this},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===s&&(s=this.scene.sys.scale.height),this.x=t+Math.random()*i,this.y=e+Math.random()*s,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new n),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new n),void 0===e&&(e=new n);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);i;)e.applyITRS(i.x,i.y,i._rotation,i._scaleX,i._scaleY),e.multiply(t,t),i=i.parentContainer;return t},getLocalPoint:function(t,e,i,s){i||(i=new h),s||(s=this.scene.sys.cameras.main);var n=s.scrollX,o=s.scrollY,a=t+n*this.scrollFactorX-n,l=e+o*this.scrollFactorY-o;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(a,l,i):r(a,l,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=l},69360:(t,e,i)=>{var s=i(56694),n=i(83392),r=i(93736),o=new s({initialize:function(t,e,i,s,n,r){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=1),void 0===n&&(n=0),void 0===r&&(r=0),this.matrix=new Float32Array([t,e,i,s,n,r,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],r=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):s||r?n.TAU-(r>0?Math.acos(-s/this.scaleY):-Math.acos(s/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),s=this.matrix,n=s[0],r=s[1],o=s[2],a=s[3];return s[0]=n*i+o*e,s[1]=r*i+a*e,s[2]=n*-e+o*i,s[3]=r*-e+a*i,this},multiply:function(t,e){var i=this.matrix,s=t.matrix,n=i[0],r=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=s[0],c=s[1],d=s[2],p=s[3],f=s[4],v=s[5],g=void 0===e?i:e.matrix;return g[0]=u*n+c*o,g[1]=u*r+c*a,g[2]=d*n+p*o,g[3]=d*r+p*a,g[4]=f*n+v*o+h,g[5]=f*r+v*a+l,g},multiplyWithOffset:function(t,e,i){var s=this.matrix,n=t.matrix,r=s[0],o=s[1],a=s[2],h=s[3],l=e*r+i*a+s[4],u=e*o+i*h+s[5],c=n[0],d=n[1],p=n[2],f=n[3],v=n[4],g=n[5];return s[0]=c*r+d*a,s[1]=c*o+d*h,s[2]=p*r+f*a,s[3]=p*o+f*h,s[4]=v*r+g*a+l,s[5]=v*o+g*h+u,this},transform:function(t,e,i,s,n,r){var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*u,o[2]=i*a+s*l,o[3]=i*h+s*u,o[4]=n*a+r*l+c,o[5]=n*h+r*u+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var s=this.matrix,n=s[0],r=s[1],o=s[2],a=s[3],h=s[4],l=s[5];return i.x=t*n+e*o+h,i.y=t*r+e*a+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=e*n-i*s;return t[0]=n/a,t[1]=-i/a,t[2]=-s/a,t[3]=e/a,t[4]=(s*o-n*r)/a,t[5]=-(e*o-i*r)/a,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,s,n,r){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=s,o[4]=n,o[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],s=e[1],n=e[2],r=e[3],o=i*r-s*n;if(t.translateX=e[4],t.translateY=e[5],i||s){var a=Math.sqrt(i*i+s*s);t.rotation=s>0?Math.acos(i/a):-Math.acos(i/a),t.scaleX=a,t.scaleY=o/a}else if(n||r){var h=Math.sqrt(n*n+r*r);t.rotation=.5*Math.PI-(r>0?Math.acos(-n/h):-Math.acos(n/h)),t.scaleX=o/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,s,n){var r=this.matrix,o=Math.sin(i),a=Math.cos(i);return r[4]=t,r[5]=e,r[0]=a*s,r[1]=o*s,r[2]=-o*n,r[3]=a*n,this},applyInverse:function(t,e,i){void 0===i&&(i=new r);var s=this.matrix,n=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],c=1/(n*h+a*-o);return i.x=h*c*t+-a*c*e+(u*a-l*h)*c,i.y=n*c*e+-o*c*t+(-u*n+l*o)*c,i},setQuad:function(t,e,i,s,n){var r=this.quad,o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return r[0]=t*a+e*l+c,r[1]=t*h+e*u+d,r[2]=t*a+s*l+c,r[3]=t*h+s*u+d,r[4]=i*a+s*l+c,r[5]=i*h+s*u+d,r[6]=i*a+e*l+c,r[7]=i*h+e*u+d,n&&r.forEach((function(t,e){r[e]=Math.round(t)})),r},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var s=this.getX(t,e);return i&&(s=Math.round(s)),s},getYRound:function(t,e,i){var s=this.getY(t,e);return i&&(s=Math.round(s)),s},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});t.exports=o},59694:t=>{var e={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=e},64937:(t,e,i)=>{t.exports={Alpha:i(97123),AlphaSingle:i(15720),BlendMode:i(69732),ComputedSize:i(28284),Crop:i(85293),Depth:i(14975),Flip:i(92972),FX:i(88677),GetBounds:i(80693),Mask:i(39171),Origin:i(28072),PathFollower:i(54211),Pipeline:i(58210),ScrollFactor:i(45900),Size:i(31654),Texture:i(82081),TextureCrop:i(21850),Tint:i(58072),ToJSON:i(48129),Transform:i(56584),TransformMatrix:i(69360),Visible:i(59694)}},70339:(t,e,i)=>{var s=i(59959),n=i(95723),r=i(56694),o=i(64937),a=i(56631),h=i(89980),l=i(74118),u=i(98524),c=i(58795),d=i(93736),p=new r({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Pipeline,o.Transform,o.Visible,u],initialize:function(t,e,i,s){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPipeline(),this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(n.SKIP_CHECK),s&&this.add(s)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,s=new l,n=!1;t.setEmpty();for(var r=0;r-1},setAll:function(t,e,i,n){return s.SetAll(this.list,t,e,i,n),this},each:function(t,e){var i,s=[null],n=this.list.slice(),r=n.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=p},13916:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var n=e.list;if(0!==n.length){var r=e.localTransform;s?(r.loadIdentity(),r.multiply(s),r.translate(e.x,e.y),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY)):r.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var o=-1!==e.blendMode;o||t.setBlendMode(0);var a=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var u=0;u{var s=i(88933),n=i(70339),r=i(99325),o=i(20494);r.register("container",(function(t,e){void 0===t&&(t={});var i=o(t,"x",0),r=o(t,"y",0),a=o(t,"children",null),h=new n(this.scene,i,r,a);return void 0!==e&&(t.add=e),s(this.scene,h,t),h}))},23400:(t,e,i)=>{var s=i(70339);i(61286).register("container",(function(t,e,i){return this.displayList.add(new s(this.scene,t,e,i))}))},98524:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(36934),r=i(13916),t.exports={renderWebGL:n,renderCanvas:r}},36934:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var n=e.list,r=n.length;if(0!==r){var o=e.localTransform;s?(o.loadIdentity(),o.multiply(s),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.pipelines.preBatch(e);var a=-1!==e.blendMode;a||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=0;c{t.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},38943:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(11603),o=i(89980),a=i(42911),h=i(55638),l=i(7599),u=i(51729),c=new s({Extends:o,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Origin,n.ScrollFactor,n.Transform,n.Visible,r],initialize:function(t,e,i,s,n,r){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new u,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),"string"==typeof s?"#"===s[0]?this.setElement(s.substr(1),n,r):this.createElement(s,n,r):s&&this.setElement(s,n,r),t.sys.events.on(l.SLEEP,this.handleSceneEvent,this),t.sys.events.on(l.WAKE,this.handleSceneEvent,this),t.sys.events.on(l.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(t){var e=this.node,i=e.style;e&&(i.display=t.settings.visible?"block":"none")},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e{var s=i(2452),n=i(89980),r=i(69360),o=new r,a=new r,h=new r;t.exports=function(t,e,i,r){if(e.node){var l=e.node.style,u=e.scene.sys.settings;if(!l||!u.visible||n.RENDER_MASK!==e.renderFlags||0!==e.cameraFilter&&e.cameraFilter&i.id||e.parentContainer&&!e.parentContainer.willRender())l.display="none";else{var c=e.parentContainer,d=i.alpha*e.alpha;c&&(d*=c.alpha);var p=o,f=a,v=h,g=0,m=0,y="0%",x="0%";r?(g=e.width*e.scaleX*e.originX,m=e.height*e.scaleY*e.originY,f.applyITRS(e.x-g,e.y-m,e.rotation,e.scaleX,e.scaleY),p.copyFrom(i.matrix),p.multiplyWithOffset(r,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),f.e=e.x-g,f.f=e.y-m,p.multiply(f,v)):(g=e.width*e.originX,m=e.height*e.originY,f.applyITRS(e.x-g,e.y-m,e.rotation,e.scaleX,e.scaleY),p.copyFrom(i.matrix),y=100*e.originX+"%",x=100*e.originY+"%",f.e-=i.scrollX*e.scrollFactorX,f.f-=i.scrollY*e.scrollFactorY,p.multiply(f,v)),e.transformOnly||(l.display="block",l.opacity=d,l.zIndex=e._depth,l.pointerEvents=e.pointerEvents,l.mixBlendMode=s[e._blendMode]),l.transform=v.getCSSMatrix()+" skew("+e.skewX+"rad, "+e.skewY+"rad) rotate3d("+e.rotate3d.x+","+e.rotate3d.y+","+e.rotate3d.z+","+e.rotate3d.w+e.rotate3dAngle+")",l.transformOrigin=y+" "+x}}}},66788:(t,e,i)=>{var s=i(38943);i(61286).register("dom",(function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),o}))},11603:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(66070),r=i(66070),t.exports={renderWebGL:n,renderCanvas:r}},65492:t=>{t.exports="addedtoscene"},98398:t=>{t.exports="destroy"},40239:t=>{t.exports="removedfromscene"},17286:t=>{t.exports="complete"},31496:t=>{t.exports="created"},89587:t=>{t.exports="error"},96342:t=>{t.exports="loop"},49614:t=>{t.exports="play"},24418:t=>{t.exports="seeked"},87318:t=>{t.exports="seeking"},61922:t=>{t.exports="stop"},13991:t=>{t.exports="timeout"},4052:t=>{t.exports="unlocked"},56631:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(65492),DESTROY:i(98398),REMOVED_FROM_SCENE:i(40239),VIDEO_COMPLETE:i(17286),VIDEO_CREATED:i(31496),VIDEO_ERROR:i(89587),VIDEO_LOOP:i(96342),VIDEO_PLAY:i(49614),VIDEO_SEEKED:i(24418),VIDEO_SEEKING:i(87318),VIDEO_STOP:i(61922),VIDEO_TIMEOUT:i(13991),VIDEO_UNLOCKED:i(4052)}},39419:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),o=i(79394),a=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.Origin,n.ScrollFactor,n.Size,n.Texture,n.Tint,n.Transform,n.Visible,o],initialize:function(t){r.call(this,t,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});t.exports=a},96699:()=>{},41155:(t,e,i)=>{var s=i(39419);i(61286).register("extern",(function(){var t=new s(this.scene);return this.displayList.add(t),t}))},79394:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(81410),r=i(96699),t.exports={renderWebGL:n,renderCanvas:r}},81410:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){t.pipelines.clear();var r=s(e,i,n).calc;e.render.call(e,t,i,r),t.pipelines.rebind()}},36266:t=>{t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},33182:(t,e,i)=>{var s=i(51052),n=i(56694),r=i(36266),o=i(15720),a=i(69732),h=i(14975),l=i(39171),u=i(58210),c=i(45900),d=i(56584),p=i(59694),f=i(95669),v=i(89980),g=i(72632),m=i(10850),y=i(83392),x=i(60898),T=new n({Extends:v,Mixins:[o,a,h,l,u,d,p,c,x],initialize:function(t,e){var i=m(e,"x",0),s=m(e,"y",0);v.call(this,t,"Graphics"),this.setPosition(i,s),this.initPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return m(t,"lineStyle",null)&&(this.defaultStrokeWidth=m(t,"lineStyle.width",1),this.defaultStrokeColor=m(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=m(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),m(t,"fillStyle",null)&&(this.defaultFillColor=m(t,"fillStyle.color",16777215),this.defaultFillAlpha=m(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},fillGradientStyle:function(t,e,i,s,n,o,a,h){return void 0===n&&(n=1),void 0===o&&(o=n),void 0===a&&(a=n),void 0===h&&(h=n),this.commandBuffer.push(r.GRADIENT_FILL_STYLE,n,o,a,h,t,e,i,s),this},lineGradientStyle:function(t,e,i,s,n,o){return void 0===o&&(o=1),this.commandBuffer.push(r.GRADIENT_LINE_STYLE,t,o,e,i,s,n),this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},fill:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,y.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,y.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,s){return this.commandBuffer.push(r.FILL_RECT,t,e,i,s),this},strokeRect:function(t,e,i,s){var n=this._lineWidth/2,r=t-n,o=t+n;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+s),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+s),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+s),this.lineTo(o+i,e+s),this.strokePath(),this},fillRoundedRect:function(t,e,i,s,n){void 0===n&&(n=20);var r=n,o=n,a=n,h=n;return"number"!=typeof n&&(r=g(n,"tl",20),o=g(n,"tr",20),a=g(n,"bl",20),h=g(n,"br",20)),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.arc(t+i-o,e+o,o,-y.TAU,0),this.lineTo(t+i,e+s-h),this.arc(t+i-h,e+s-h,h,0,y.TAU),this.lineTo(t+a,e+s),this.arc(t+a,e+s-a,a,y.TAU,Math.PI),this.lineTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-y.TAU),this.fillPath(),this},strokeRoundedRect:function(t,e,i,s,n){void 0===n&&(n=20);var r=n,o=n,a=n,h=n,l=Math.min(i,s)/2;return"number"!=typeof n&&(r=g(n,"tl",20),o=g(n,"tr",20),a=g(n,"bl",20),h=g(n,"br",20)),r=Math.min(r,l),o=Math.min(o,l),a=Math.min(a,l),h=Math.min(h,l),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.moveTo(t+i-o,e),this.arc(t+i-o,e+o,o,-y.TAU,0),this.lineTo(t+i,e+s-h),this.moveTo(t+i,e+s-h),this.arc(t+i-h,e+s-h,h,0,y.TAU),this.lineTo(t+a,e+s),this.moveTo(t+a,e+s),this.arc(t+a,e+s-a,a,y.TAU,Math.PI),this.lineTo(t,e+r),this.moveTo(t,e+r),this.arc(t+r,e+r,r,-Math.PI,-y.TAU),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,s,n,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,s,n,o),this},strokeTriangle:function(t,e,i,s,n,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,s,n,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,s){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,s),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},strokePoints:function(t,e,i,s){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===s&&(s=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var n=1;n-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var s,n,r=this.scene.sys,o=r.game.renderer;if(void 0===e&&(e=r.scale.width),void 0===i&&(i=r.scale.height),T.TargetCamera.setScene(this.scene),T.TargetCamera.setViewport(0,0,e,i),T.TargetCamera.scrollX=this.x,T.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var a=(s=r.textures.get(t)).getSourceImage();a instanceof HTMLCanvasElement&&(n=a.getContext("2d"))}else n=(s=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(n=t.getContext("2d"));return n&&(this.renderCanvas(o,this,T.TargetCamera,null,n,!1),s&&s.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});T.TargetCamera=new s,t.exports=T},91543:(t,e,i)=>{var s=i(36266),n=i(49584);t.exports=function(t,e,i,r,o,a){var h=e.commandBuffer,l=h.length,u=o||t.currentContext;if(0!==l&&n(t,u,e,i,r)){i.addToRenderList(e);var c=1,d=1,p=0,f=0,v=1,g=0,m=0,y=0;u.beginPath();for(var x=0;x>>16,m=(65280&p)>>>8,y=255&p,u.strokeStyle="rgba("+g+","+m+","+y+","+c+")",u.lineWidth=v,x+=3;break;case s.FILL_STYLE:f=h[x+1],d=h[x+2],g=(16711680&f)>>>16,m=(65280&f)>>>8,y=255&f,u.fillStyle="rgba("+g+","+m+","+y+","+d+")",x+=2;break;case s.BEGIN_PATH:u.beginPath();break;case s.CLOSE_PATH:u.closePath();break;case s.FILL_PATH:a||u.fill();break;case s.STROKE_PATH:a||u.stroke();break;case s.FILL_RECT:a?u.rect(h[x+1],h[x+2],h[x+3],h[x+4]):u.fillRect(h[x+1],h[x+2],h[x+3],h[x+4]),x+=4;break;case s.FILL_TRIANGLE:u.beginPath(),u.moveTo(h[x+1],h[x+2]),u.lineTo(h[x+3],h[x+4]),u.lineTo(h[x+5],h[x+6]),u.closePath(),a||u.fill(),x+=6;break;case s.STROKE_TRIANGLE:u.beginPath(),u.moveTo(h[x+1],h[x+2]),u.lineTo(h[x+3],h[x+4]),u.lineTo(h[x+5],h[x+6]),u.closePath(),a||u.stroke(),x+=6;break;case s.LINE_TO:u.lineTo(h[x+1],h[x+2]),x+=2;break;case s.MOVE_TO:u.moveTo(h[x+1],h[x+2]),x+=2;break;case s.LINE_FX_TO:u.lineTo(h[x+1],h[x+2]),x+=5;break;case s.MOVE_FX_TO:u.moveTo(h[x+1],h[x+2]),x+=5;break;case s.SAVE:u.save();break;case s.RESTORE:u.restore();break;case s.TRANSLATE:u.translate(h[x+1],h[x+2]),x+=2;break;case s.SCALE:u.scale(h[x+1],h[x+2]),x+=2;break;case s.ROTATE:u.rotate(h[x+1]),x+=1;break;case s.GRADIENT_FILL_STYLE:x+=5;break;case s.GRADIENT_LINE_STYLE:x+=6}}u.restore()}}},41286:(t,e,i)=>{var s=i(99325),n=i(33182);s.register("graphics",(function(t,e){void 0===t&&(t={}),void 0!==e&&(t.add=e);var i=new n(this.scene,t);return t.add&&this.scene.sys.displayList.add(i),i}))},13122:(t,e,i)=>{var s=i(33182);i(61286).register("graphics",(function(t){return this.displayList.add(new s(this.scene,t))}))},60898:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(34429),r=i(91543),r=i(91543),t.exports={renderWebGL:n,renderCanvas:r}},34429:(t,e,i)=>{var s=i(36266),n=i(73329),r=i(69360),o=i(75512),a=function(t,e,i){this.x=t,this.y=e,this.width=i},h=function(t,e,i){this.points=[],this.pointsLength=1,this.points[0]=new a(t,e,i)},l=[],u=new r;t.exports=function(t,e,i,r){if(0!==e.commandBuffer.length){i.addToRenderList(e);var c=t.pipelines.set(e.pipeline,e);t.pipelines.preBatch(e);for(var d=n(e,i,r).calc,p=u.loadIdentity(),f=e.commandBuffer,v=i.alpha*e.alpha,g=1,m=c.fillTint,y=c.strokeTint,x=0,T=0,w=0,b=2*Math.PI,E=[],S=0,A=!0,_=null,C=o.getTintAppendFloatAlpha,M=0;M0&&(X=X%b-b):X>b?X=b:X<0&&(X=b+X%b),null===_&&(_=new h(B+Math.cos(U)*Y,N+Math.sin(U)*Y,g),E.push(_),I+=.01);I<1+G;)w=X*I+U,x=B+Math.cos(w)*Y,T=N+Math.sin(w)*Y,_.points.push(new a(x,T,g)),I+=.01;w=X+U,x=B+Math.cos(w)*Y,T=N+Math.sin(w)*Y,_.points.push(new a(x,T,g));break;case s.FILL_RECT:c.batchFillRect(f[++M],f[++M],f[++M],f[++M],p,d);break;case s.FILL_TRIANGLE:c.batchFillTriangle(f[++M],f[++M],f[++M],f[++M],f[++M],f[++M],p,d);break;case s.STROKE_TRIANGLE:c.batchStrokeTriangle(f[++M],f[++M],f[++M],f[++M],f[++M],f[++M],g,p,d);break;case s.LINE_TO:null!==_?_.points.push(new a(f[++M],f[++M],g)):(_=new h(f[++M],f[++M],g),E.push(_));break;case s.MOVE_TO:_=new h(f[++M],f[++M],g),E.push(_);break;case s.SAVE:l.push(p.copyToArray());break;case s.RESTORE:p.copyFromArray(l.pop());break;case s.TRANSLATE:B=f[++M],N=f[++M],p.translate(B,N);break;case s.SCALE:B=f[++M],N=f[++M],p.scale(B,N);break;case s.ROTATE:p.rotate(f[++M])}t.pipelines.postBatch(e)}}},59192:(t,e,i)=>{var s=i(83979),n=i(56694),r=i(56631),o=i(6659),a=i(71608),h=i(72632),l=i(10850),u=i(19256),c=i(42911),d=i(75757),p=i(58403),f=i(13747),v=new n({Extends:o,initialize:function(t,e,i){o.call(this),i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?c(e[0])&&(i=e,e=null):c(e)&&(i=e,e=null),this.scene=t,this.children=new p,this.isParent=!0,this.type="Group",this.classType=h(i,"classType",f),this.name=h(i,"name",""),this.active=h(i,"active",!0),this.maxSize=h(i,"maxSize",-1),this.defaultKey=h(i,"defaultKey",null),this.defaultFrame=h(i,"defaultFrame",null),this.runChildUpdate=h(i,"runChildUpdate",!1),this.createCallback=h(i,"createCallback",null),this.removeCallback=h(i,"removeCallback",null),this.createMultipleCallback=h(i,"createMultipleCallback",null),this.internalCreateCallback=h(i,"internalCreateCallback",null),this.internalRemoveCallback=h(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i),this.on(r.ADDED_TO_SCENE,this.addedToScene,this),this.on(r.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(t,e,i,s,n,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===s&&(s=this.defaultFrame),void 0===n&&(n=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,s);return o.addToDisplayList(this.scene.sys.displayList),o.addToUpdateList(),o.visible=n,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof n&&(l.x=n),"number"==typeof r&&(l.y=r),l):s?this.create(n,r,o,a,h):null},get:function(t,e,i,s,n){return this.getFirst(!1,!0,t,e,i,s,n)},getFirstAlive:function(t,e,i,s,n,r){return this.getFirst(!0,t,e,i,s,n,r)},getFirstDead:function(t,e,i,s,n,r){return this.getFirst(!1,t,e,i,s,n,r)},playAnimation:function(t,e){return s.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i{var s=i(99325),n=i(59192);s.register("group",(function(t){return new n(this.scene,null,t)}))},62598:(t,e,i)=>{var s=i(59192);i(61286).register("group",(function(t,e){return this.updateList.add(new s(this.scene,t,e))}))},1539:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),o=i(57322),a=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.FX,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.ScrollFactor,n.Size,n.TextureCrop,n.Tint,n.Transform,n.Visible,o],initialize:function(t,e,i,s,n){r.call(this,t,"Image"),this._crop=this.resetCropObject(),this.setTexture(s,n),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()}});t.exports=a},57786:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},83556:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(1539);n.register("image",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),a=new o(this.scene,0,0,i,n);return void 0!==e&&(t.add=e),s(this.scene,a,t),a}))},20927:(t,e,i)=>{var s=i(1539);i(61286).register("image",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},57322:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(59390),r=i(57786),t.exports={renderWebGL:n,renderCanvas:r}},59390:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),this.pipeline.batchSprite(e,i,s)}},48013:(t,e,i)=>{var s={Events:i(56631),DisplayList:i(91713),GameObjectCreator:i(99325),GameObjectFactory:i(61286),UpdateList:i(92034),Components:i(64937),GetCalcMatrix:i(73329),BuildGameObject:i(88933),BuildGameObjectAnimation:i(32291),GameObject:i(89980),BitmapText:i(44616),Blitter:i(52816),Bob:i(41664),Container:i(70339),DOMElement:i(38943),DynamicBitmapText:i(13468),Extern:i(39419),Graphics:i(33182),Group:i(59192),Image:i(1539),Layer:i(85305),Particles:i(27684),PathFollower:i(29598),RenderTexture:i(15996),RetroFont:i(55873),Rope:i(79968),Sprite:i(13747),Text:i(76555),GetTextSize:i(32979),MeasureText:i(27030),TextStyle:i(74744),TileSprite:i(35856),Zone:i(71030),Video:i(8630),Shape:i(91461),Arc:i(28593),Curve:i(15220),Ellipse:i(28591),Grid:i(39169),IsoBox:i(4415),IsoTriangle:i(65159),Line:i(579),Polygon:i(91249),Rectangle:i(517),Star:i(77843),Triangle:i(21873),Factories:{Blitter:i(38906),Container:i(23400),DOMElement:i(66788),DynamicBitmapText:i(94145),Extern:i(41155),Graphics:i(13122),Group:i(62598),Image:i(20927),Layer:i(17676),Particles:i(30439),PathFollower:i(19626),RenderTexture:i(29599),Rope:i(31982),Sprite:i(66135),StaticBitmapText:i(21797),Text:i(94627),TileSprite:i(20509),Zone:i(34546),Video:i(215),Arc:i(10369),Curve:i(10147),Ellipse:i(99869),Grid:i(9326),IsoBox:i(88154),IsoTriangle:i(67765),Line:i(85665),Polygon:i(88203),Rectangle:i(94355),Star:i(23962),Triangle:i(79296)},Creators:{Blitter:i(68452),Container:i(44516),DynamicBitmapText:i(67513),Graphics:i(41286),Group:i(61295),Image:i(83556),Layer:i(56378),Particles:i(38842),RenderTexture:i(85692),Rope:i(96027),Sprite:i(89219),StaticBitmapText:i(95499),Text:i(75397),TileSprite:i(63950),Zone:i(24067),Video:i(65601)}};s.Shader=i(27902),s.Mesh=i(83321),s.NineSlice=i(44139),s.PointLight=i(13171),s.Factories.Shader=i(51979),s.Factories.Mesh=i(8767),s.Factories.NineSlice=i(53778),s.Factories.PointLight=i(91201),s.Creators.Shader=i(13908),s.Creators.Mesh=i(41839),s.Creators.NineSlice=i(40964),s.Creators.PointLight=i(162),s.Light=i(14455),s.LightsManager=i(26193),s.LightsPlugin=i(50296),t.exports=s},85305:(t,e,i)=>{var s=i(95723),n=i(56694),r=i(64937),o=i(48129),a=i(81078),h=i(6659),l=i(56631),u=i(71207),c=i(58010),d=i(7599),p=i(17922),f=new n({Extends:u,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.Visible,h,c],initialize:function(t,e){u.call(this,t),h.call(this),this.scene=t,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=t.sys,this.events=t.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPipeline(),this.clearAlpha(),this.setBlendMode(s.SKIP_CHECK),e&&this.add(e),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new a(this)),this},setData:function(t,e){return this.data||(this.data=new a(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new a(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new a(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new a(this)),this.data.get(t)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return o(this)},willRender:function(t){return!(15!==this.renderFlags||0===this.list.length||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return i.unshift(this.displayList.getIndex(t)),i},addChildCallback:function(t){t.displayList&&t.displayList!==this&&t.removeFromDisplayList(),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(l.ADDED_TO_SCENE,t,this.scene),this.events.emit(d.ADDED_TO_SCENE,t,this.scene))},removeChildCallback:function(t){this.queueDepthSort(),t.displayList=null,t.emit(l.REMOVED_FROM_SCENE,t,this.scene),this.events.emit(d.REMOVED_FROM_SCENE,t,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(p(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(l.ADDED_TO_SCENE,this,this.scene),t.events.emit(d.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(l.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(d.REMOVED_FROM_SCENE,this,this.scene)),this},destroy:function(t){if(this.scene&&!this.ignoreDestroy){this.emit(l.DESTROY,this);for(var e=this.list;e.length;)e[0].destroy(t);this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});t.exports=f},834:t=>{t.exports=function(t,e,i){var s=e.list;if(0!==s.length){e.depthSort();var n=-1!==e.blendMode;n||t.setBlendMode(0);var r=e._alpha;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var o=0;o{var s=i(88933),n=i(85305),r=i(99325),o=i(20494);r.register("layer",(function(t,e){void 0===t&&(t={});var i=o(t,"children",null),r=new n(this.scene,i);return void 0!==e&&(t.add=e),s(this.scene,r,t),r}))},17676:(t,e,i)=>{var s=i(85305);i(61286).register("layer",(function(t){return this.displayList.add(new s(this.scene,t))}))},58010:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(17576),r=i(834),t.exports={renderWebGL:n,renderCanvas:r}},17576:t=>{t.exports=function(t,e,i){var s=e.list,n=s.length;if(0!==n){e.depthSort(),t.pipelines.preBatch(e);var r=-1!==e.blendMode;r||t.setBlendMode(0);for(var o=e.alpha,a=0;a{var s=i(26673),n=i(56694),r=i(64937),o=i(39298),a=i(75512),h=new n({Extends:s,Mixins:[r.Origin,r.ScrollFactor,r.Transform,r.Visible],initialize:function(t,e,i,n,r,a,h){s.call(this,t,e,i),this.color=new o(n,r,a),this.intensity=h,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(i)},displayWidth:{get:function(){return this.diameter},set:function(t){this.diameter=t}},displayHeight:{get:function(){return this.diameter},set:function(t){this.diameter=t}},width:{get:function(){return this.diameter},set:function(t){this.diameter=t}},height:{get:function(){return this.diameter},set:function(t){this.diameter=t}},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setColor:function(t){var e=a.getFloatsFromUintRGB(t);return this.color.set(e[0],e[1],e[2]),this},setIntensity:function(t){return this.intensity=t,this},setRadius:function(t){return this.radius=t,this}});h.RENDER_MASK=15,t.exports=h},26193:(t,e,i)=>{var s=i(26535),n=i(56694),r=i(53996),o=i(14455),a=i(13171),h=i(39298),l=i(72677),u=i(17922),c=i(75512),d=new n({initialize:function(){this.lights=[],this.ambientColor=new h(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(t,e,i,s,n,r){return this.systems.displayList.add(new a(this.scene,t,e,i,s,n,r))},enable:function(){return-1===this.maxLights&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(t){for(var e=this.lights,i=t.worldView,n=[],o=0;othis.maxLights&&(u(n,this.sortByDistance),n=n.slice(0,this.maxLights)),this.visibleLights=n.length,n},sortByDistance:function(t,e){return t.distance>=e.distance},setAmbientColor:function(t){var e=c.getFloatsFromUintRGB(t);return this.ambientColor.set(e[0],e[1],e[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(t,e,i,s,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=128),void 0===s&&(s=16777215),void 0===n&&(n=1);var r=c.getFloatsFromUintRGB(s),a=new o(t,e,i,r[0],r[1],r[2],n);return this.lights.push(a),a},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&l(this.lights,e),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=d},50296:(t,e,i)=>{var s=i(56694),n=i(26193),r=i(91963),o=i(7599),a=new s({Extends:n,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once(o.BOOT,this.boot,this),n.call(this)},boot:function(){var t=this.systems.events;t.on(o.SHUTDOWN,this.shutdown,this),t.on(o.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",a,"lights"),t.exports=a},83321:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(75606),o=i(18693),a=i(89980),h=i(67623),l=i(53267),u=i(73329),c=i(16650),d=i(23464),p=i(17922),f=i(70015),v=i(85769),g=new s({Extends:a,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Mask,n.Pipeline,n.Size,n.Texture,n.Transform,n.Visible,n.ScrollFactor,d],initialize:function(t,e,i,s,n,r,o,h,l,u,d,p){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s="__WHITE"),a.call(this,t,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new f,this.modelScale=new f(1,1,1),this.modelRotation=new f,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new c,this.viewPosition=new f,this.viewMatrix=new c,this.projectionMatrix=new c,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1;var v=t.sys.renderer;this.setPosition(e,i),this.setTexture(s,n),this.setSize(v.width,v.height),this.initPipeline(),this.setPerspective(v.width,v.height),r&&this.addVertices(r,o,h,l,u,d,p)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(t){return this.viewPosition.addScale(f.LEFT,t),this.dirtyCache[10]=1,this},panY:function(t){return this.viewPosition.y+=f.DOWN.y*t,this.dirtyCache[10]=1,this},panZ:function(t){return this.viewPosition.z+=t,this.dirtyCache[10]=1,this},setPerspective:function(t,e,i,s,n){return void 0===i&&(i=45),void 0===s&&(s=.01),void 0===n&&(n=1e3),this.projectionMatrix.perspective(r(i),t/e,s,n),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(t,e,i,s){return void 0===t&&(t=this.scene.sys.renderer.getAspectRatio()),void 0===e&&(e=1),void 0===i&&(i=-1e3),void 0===s&&(s=1e3),this.projectionMatrix.ortho(-t,t,-e,e,i,s),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach((function(t){t.destroy()})),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(t,e,i,s,n,r,o,a,h){var u,c=this.scene.sys.cache.obj.get(t);return c&&(u=l(c,this,e,i,s,n,r,o,a,h)),u&&0!==u.verts.length||console.warn("Mesh.addVerticesFromObj data empty:",t),this},sortByDepth:function(t,e){return t.depth-e.depth},depthSort:function(){return p(this.faces,this.sortByDepth),this},addVertex:function(t,e,i,s,n,r,o){var a=new v(t,e,i,s,n,r,o);return this.vertices.push(a),a},addFace:function(t,e,i){var s=new o(t,e,i);return this.faces.push(s),this.dirtyCache[9]=-1,s},addVertices:function(t,e,i,s,n,r,o){var a=h(t,e,i,s,n,r,o);return a?(this.faces=this.faces.concat(a.faces),this.vertices=this.vertices.concat(a.vertices)):console.warn("Mesh.addVertices data empty or invalid"),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(t){return this.faces[t]},getFaceAt:function(t,e,i){void 0===i&&(i=this.scene.sys.cameras.main);for(var s=u(this,i).calc,n=this.faces,r=[],o=0;o{t.exports=function(){}},41839:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(10850),a=i(83321);n.register("mesh",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),h=o(t,"vertices",[]),l=o(t,"uvs",[]),u=o(t,"indicies",[]),c=o(t,"containsZ",!1),d=o(t,"normals",[]),p=o(t,"colors",16777215),f=o(t,"alphas",1),v=new a(this.scene,0,0,i,n,h,l,u,c,d,p,f);return void 0!==e&&(t.add=e),s(this.scene,v,t),v}))},8767:(t,e,i)=>{var s=i(83321);i(61286).register("mesh",(function(t,e,i,n,r,o,a,h,l,u,c){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h,l,u,c))}))},23464:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(57410),r=i(6317),t.exports={renderWebGL:n,renderCanvas:r}},57410:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){var r=e.faces,o=r.length;if(0!==o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline,e),h=s(e,i,n).calc,l=a.setGameObject(e),u=a.vertexViewF32,c=a.vertexViewU32,d=a.vertexCount*a.currentShader.vertexComponentCount-1,p=e.tintFill,f=[],v=e.debugCallback,g=h.a,m=h.b,y=h.c,x=h.d,T=h.e,w=h.f,b=e.viewPosition.z,E=e.hideCCW,S=i.roundPixels,A=i.alpha*e.alpha,_=0;t.pipelines.preBatch(e);for(var C=0;C{var s=i(56694),n=i(64937),r=i(89980),o=i(94456),a=i(85769),h=new s({Extends:r,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.FX,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.ScrollFactor,n.Texture,n.Transform,n.Visible,o],initialize:function(t,e,i,s,n,o,h,l,u,c,d){void 0===o&&(o=256),void 0===h&&(h=256),void 0===l&&(l=10),void 0===u&&(u=10),void 0===c&&(c=0),void 0===d&&(d=0),r.call(this,t,"NineSlice"),this._width=o,this._height=h,this._originX=.5,this._originY=.5,this._sizeComponent=!0,this.vertices=[],this.leftWidth=l,this.rightWidth=u,this.topHeight=c,this.bottomHeight=d,this.tint=16777215,this.tintFill=!1,this.is3Slice=0===c&&0===d;for(var p=this.is3Slice?18:54,f=0;f{var s=i(88933),n=i(99325),r=i(20494),o=i(10850),a=i(44139);n.register("nineslice",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),h=o(t,"width",256),l=o(t,"height",256),u=o(t,"leftWidth",10),c=o(t,"rightWidth",10),d=o(t,"topHeight",0),p=o(t,"bottomHeight",0),f=new a(this.scene,0,0,i,n,h,l,u,c,d,p);return void 0!==e&&(t.add=e),s(this.scene,f,t),f}))},53778:(t,e,i)=>{var s=i(44139);i(61286).register("nineslice",(function(t,e,i,n,r,o,a,h,l,u){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h,l,u))}))},94456:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(27420),t.exports={renderWebGL:n,renderCanvas:r}},27420:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){var o=e.vertices,a=o.length;if(0!==a){i.addToRenderList(e);var h=t.pipelines.set(e.pipeline,e),l=s(e,i,r,!1).calc,u=h.setGameObject(e),c=h.vertexViewF32,d=h.vertexViewU32,p=h.vertexCount*h.currentShader.vertexComponentCount-1,f=i.roundPixels,v=e.tintFill,g=i.alpha*e.alpha,m=n.getTintAppendFloatAlpha(e.tint,g);t.pipelines.preBatch(e);var y=h.vertexAvailable(),x=-1;y{var s=i(56694),n=i(61616),r=i(21902),o=i(72632),a=i(1071),h=new s({initialize:function(t,e,i,s){void 0===s&&(s=!1),this.propertyKey=e,this.propertyValue=i,this.defaultValue=i,this.steps=0,this.counter=0,this.start=0,this.end=0,this.ease,this.emitOnly=s,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.loadConfig(t)},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=o(t,this.propertyKey,this.defaultValue),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return this.propertyValue},onChange:function(t){return this.propertyValue=t,this.setMethods()},setMethods:function(){var t=this.propertyValue,e=typeof t;if(this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,null!==t){if("number"===e)this.onEmit=this.staticValueEmit,this.onUpdate=this.staticValueUpdate;else if(Array.isArray(t))this.onEmit=this.randomStaticValueEmit;else if("function"===e)this.emitOnly?this.onEmit=t:this.onUpdate=t;else if("object"===e&&this.hasBoth(t,"start","end")){this.start=t.start,this.end=t.end;var i=this.has(t,"random");if(i&&(this.onEmit=this.randomRangedValueEmit),this.has(t,"steps"))this.steps=t.steps,this.counter=this.start,this.onEmit=this.steppedEmit;else{var s=this.has(t,"ease")?t.ease:"Linear";this.ease=r(s,t.easeParams),i||(this.onEmit=this.easedValueEmit),this.onUpdate=this.easeValueUpdate}}else if("object"===e&&this.hasBoth(t,"min","max"))this.start=t.min,this.end=t.max,this.onEmit=this.randomRangedValueEmit;else if("object"===e&&this.has(t,"random")){var n=t.random;Array.isArray(n)&&(this.start=n[0],this.end=n[1]),this.onEmit=this.randomRangedValueEmit}else"object"===e&&this.hasEither(t,"onEmit","onUpdate")&&(this.has(t,"onEmit")&&(this.onEmit=t.onEmit),this.has(t,"onUpdate")&&(this.onUpdate=t.onUpdate));return this}},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,s){return s},staticValueEmit:function(){return this.propertyValue},staticValueUpdate:function(){return this.propertyValue},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.propertyValue[t]},randomRangedValueEmit:function(t,e){var i=n(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i),i},steppedEmit:function(){var t=this.counter,e=this.counter+(this.end-this.start)/this.steps;return this.counter=a(e,this.start,this.end),t},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.start},easeValueUpdate:function(t,e,i){var s=t.data[e];return(s.max-s.min)*this.ease(i)+s.min}});t.exports=h},87811:(t,e,i)=>{var s=i(56694),n=i(72632),r=new s({initialize:function(t,e,i,s,r){if("object"==typeof t){var o=t;t=n(o,"x",0),e=n(o,"y",0),i=n(o,"power",0),s=n(o,"epsilon",100),r=n(o,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=100),void 0===r&&(r=50);this.x=t,this.y=e,this.active=!0,this._gravity=r,this._power=0,this._epsilon=0,this.power=i,this.epsilon=s},update:function(t,e){var i=this.x-t.x,s=this.y-t.y,n=i*i+s*s;if(0!==n){var r=Math.sqrt(n);n{var s=i(56694),n=i(75606),r=new s({initialize:function(t){this.emitter=t,this.frame=null,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215,current:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1}}},isAlive:function(){return this.lifeCurrent>0},resetPosition:function(){this.x=0,this.y=0},fire:function(t,e){var i=this.emitter;if(this.frame=i.getFrame(),!this.frame)throw new Error("Particle has no texture frame");i.emitZone&&i.emitZone.getPoint(this),void 0===t?this.x+=i.x.onEmit(this,"x"):i.x.steps>0?this.x+=t+i.x.onEmit(this,"x"):this.x+=t,void 0===e?this.y+=i.y.onEmit(this,"y"):i.y.steps>0?this.y+=e+i.y.onEmit(this,"y"):this.y+=e,this.life=i.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0;var s=i.speedX.onEmit(this,"speedX"),r=i.speedY?i.speedY.onEmit(this,"speedY"):s;if(i.radial){var o=n(i.angle.onEmit(this,"angle"));this.velocityX=Math.cos(o)*Math.abs(s),this.velocityY=Math.sin(o)*Math.abs(r)}else if(i.moveTo){var a=i.moveToX.onEmit(this,"moveToX"),h=i.moveToY?i.moveToY.onEmit(this,"moveToY"):a,l=this.life/1e3;this.velocityX=(a-this.x)/l,this.velocityY=(h-this.y)/l}else this.velocityX=s,this.velocityY=r;i.acceleration&&(this.accelerationX=i.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=i.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=i.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=i.maxVelocityY.onEmit(this,"maxVelocityY"),this.delayCurrent=i.delay.onEmit(this,"delay"),this.scaleX=i.scaleX.onEmit(this,"scaleX"),this.scaleY=i.scaleY.onEmit(this,"scaleY"),this.angle=i.rotate.onEmit(this,"rotate"),this.rotation=n(this.angle),this.bounce=i.bounce.onEmit(this,"bounce"),this.alpha=i.alpha.onEmit(this,"alpha"),this.tint=i.tint.onEmit(this,"tint")},computeVelocity:function(t,e,i,s){var n=this.velocityX,r=this.velocityY,o=this.accelerationX,a=this.accelerationY,h=this.maxVelocityX,l=this.maxVelocityY;n+=t.gravityX*i,r+=t.gravityY*i,o&&(n+=o*i),a&&(r+=a*i),n>h?n=h:n<-h&&(n=-h),r>l?r=l:r<-l&&(r=-l),this.velocityX=n,this.velocityY=r;for(var u=0;ue.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(this.delayCurrent>0)return this.delayCurrent-=t,!1;var s=this.emitter,r=1-this.lifeCurrent/this.life;return this.lifeT=r,this.computeVelocity(s,t,e,i),this.x+=this.velocityX*e,this.y+=this.velocityY*e,s.bounds&&this.checkBounds(s),s.deathZone&&s.deathZone.willKill(this)?(this.lifeCurrent=0,!0):(this.scaleX=s.scaleX.onUpdate(this,"scaleX",r,this.scaleX),this.scaleY=s.scaleY.onUpdate(this,"scaleY",r,this.scaleY),this.angle=s.rotate.onUpdate(this,"rotate",r,this.angle),this.rotation=n(this.angle),this.alpha=s.alpha.onUpdate(this,"alpha",r,this.alpha),this.tint=s.tint.onUpdate(this,"tint",r,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0)}});t.exports=r},9216:(t,e,i)=>{var s=i(95723),n=i(56694),r=i(64937),o=i(69361),a=i(54213),h=i(93025),l=i(72632),u=i(72861),c=i(53523),d=i(19256),p=i(14909),f=i(68433),v=i(74118),g=i(17922),m=i(93736),y=i(1071),x=new n({Mixins:[r.BlendMode,r.Mask,r.ScrollFactor,r.Visible],initialize:function(t,e){this.manager=t,this.texture=t.texture,this.frames=[t.defaultFrame],this.defaultFrame=t.defaultFrame,this.configFastMap=["active","blendMode","collideBottom","collideLeft","collideRight","collideTop","deathCallback","deathCallbackScope","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxParticles","maxAliveParticles","name","on","particleBringToTop","particleClass","radial","timeScale","trackVisible","visible"],this.configOpMap=["accelerationX","accelerationY","angle","alpha","bounce","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],this.name="",this.particleClass=p,this.x=new h(e,"x",0,!0),this.y=new h(e,"y",0,!0),this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.accelerationX=new h(e,"accelerationX",0,!0),this.accelerationY=new h(e,"accelerationY",0,!0),this.maxVelocityX=new h(e,"maxVelocityX",1e4,!0),this.maxVelocityY=new h(e,"maxVelocityY",1e4,!0),this.speedX=new h(e,"speedX",0,!0),this.speedY=new h(e,"speedY",0,!0),this.moveTo=!1,this.moveToX=new h(e,"moveToX",null,!0),this.moveToY=new h(e,"moveToY",null,!0),this.bounce=new h(e,"bounce",0,!0),this.scaleX=new h(e,"scaleX",1),this.scaleY=new h(e,"scaleY",1),this.tint=new h(e,"tint",16777215),this.alpha=new h(e,"alpha",1),this.lifespan=new h(e,"lifespan",1e3,!0),this.angle=new h(e,"angle",{min:0,max:360},!0),this.rotate=new h(e,"rotate",0),this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.maxAliveParticles=0,this.quantity=new h(e,"quantity",1,!0),this.delay=new h(e,"delay",0,!0),this.frequency=0,this.on=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZone=null,this.deathZone=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.active=!0,this.visible=!0,this.blendMode=s.NORMAL,this.follow=null,this.followOffset=new m,this.trackVisible=!1,this.currentFrame=0,this.randomFrame=!0,this.frameQuantity=1,this.dead=[],this.alive=[],this._counter=0,this._frameCounter=0,e&&this.fromJSON(e)},fromJSON:function(t){if(!t)return this;var e=0,i="";for(e=0;e0&&this.getParticleCount()>=this.maxParticles||this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,s=i.length,n=0;n0){var u=this.deathCallback,c=this.deathCallbackScope;for(o=h-1;o>=0;o--){var d=a[o];n.splice(d.index,1),r.push(d.particle),u&&u.call(c,d.particle),d.particle.resetPosition()}}if(this.on)if(0===this.frequency)this.emitParticle();else if(this.frequency>0)for(this._counter-=e;this._counter<=0;)this.emitParticle(),this._counter+=this.frequency},depthSortCallback:function(t,e){return t.y-e.y}});t.exports=x},84622:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),o=i(87811),a=i(71207),h=i(9216),l=i(72745),u=new s({Extends:r,Mixins:[n.Depth,n.Mask,n.Pipeline,n.Transform,n.Visible,l],initialize:function(t,e,i,s){if(r.call(this,t,"ParticleEmitterManager"),this.blendMode=-1,this.timeScale=1,this.texture=null,this.frame=null,this.frameNames=[],null===i||"object"!=typeof i&&!Array.isArray(i)||(s=i,i=null),this.setTexture(e,i),this.initPipeline(),this.emitters=new a(this),this.wells=new a(this),s){Array.isArray(s)||(s=[s]);for(var n=0;n0?e.defaultFrame=i[0]:(console.warn("No texture frames were set"),e.defaultFrame=this.defaultFrame),this},addEmitter:function(t){return this.emitters.add(t)},createEmitter:function(t){return this.addEmitter(new h(this,t))},removeEmitter:function(t){return this.emitters.remove(t,!0)},addGravityWell:function(t){return this.wells.add(t)},createGravityWell:function(t){return this.addGravityWell(new o(t))},emitParticle:function(t,e,i){for(var s=this.emitters.list,n=0;n{var s=i(69360),n=new s,r=new s,o=new s,a=new s;t.exports=function(t,e,i,s){var h=e.emitters.list,l=h.length;if(0!==l){var u=n.copyFrom(i.matrix),c=r,d=o,p=a;s?(p.loadIdentity(),p.multiply(s),p.translate(e.x,e.y),p.rotate(e.rotation),p.scale(e.scaleX,e.scaleY)):p.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);for(var f=t.currentContext,v=i.roundPixels,g=0;g0&&_.height>0){var C=-A.halfWidth,M=-A.halfHeight;f.globalAlpha=S,f.save(),c.setToContext(f),v&&(C=Math.round(C),M=Math.round(M)),f.imageSmoothingEnabled=!A.source.scaleMode,f.drawImage(A.source.image,_.x,_.y,_.width,_.height,C,M,_.width,_.height),f.restore()}}}f.restore()}}}}},38842:(t,e,i)=>{var s=i(99325),n=i(20494),r=i(72632),o=i(84622);s.register("particles",(function(t,e){void 0===t&&(t={});var i=n(t,"key",null),s=n(t,"frame",null),a=r(t,"emitters",null),h=new o(this.scene,i,s,a);return void 0!==e&&(t.add=e),r(t,"add",!1)?this.displayList.add(h):this.updateList.add(h),h}))},30439:(t,e,i)=>{var s=i(61286),n=i(84622);s.register("particles",(function(t,e,i){return this.displayList.add(new n(this.scene,t,e,i))}))},72745:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(58971),r=i(66545),t.exports={renderWebGL:n,renderCanvas:r}},58971:(t,e,i)=>{var s=i(69360),n=i(75512),r=new s,o=new s,a=new s,h=new s;t.exports=function(t,e,i,s){var l=e.emitters.list,u=l.length;if(0!==u){var c=t.pipelines.set(e.pipeline),d=r,p=o,f=a,v=h;s?(v.loadIdentity(),v.multiply(s),v.translate(e.x,e.y),v.rotate(e.rotation),v.scale(e.scaleX,e.scaleY)):v.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var g=i.roundPixels,m=e.defaultFrame.glTexture,y=n.getTintAppendFloatAlpha,x=c.setGameObject(e,e.defaultFrame);t.pipelines.preBatch(e);for(var T=0;T{t.exports={EmitterOp:i(93025),GravityWell:i(87811),Particle:i(14909),ParticleEmitter:i(9216),ParticleEmitterManager:i(84622),Zones:i(25962)}},69361:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t){var e=this.source.contains(t.x,t.y);return e&&this.killOnEnter||!e&&!this.killOnEnter}});t.exports=s},54213:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s,n){void 0===s&&(s=!1),void 0===n&&(n=!0),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=s,this.counter=-1,this.seamless=n,this._length=0,this._direction=0,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=s},68433:(t,e,i)=>{var s=i(56694),n=i(93736),r=new s({initialize:function(t){this.source=t,this._tempVec=new n},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},25962:(t,e,i)=>{t.exports={DeathZone:i(69361),EdgeZone:i(54213),RandomZone:i(68433)}},29598:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(13747),o=new s({Extends:r,Mixins:[n.PathFollower],initialize:function(t,e,i,s,n,o){r.call(this,t,i,s,n,o),this.path=e},preUpdate:function(t,e){this.anims.update(t,e),this.pathUpdate(t)}});t.exports=o},19626:(t,e,i)=>{var s=i(61286),n=i(29598);s.register("follower",(function(t,e,i,s,r){var o=new n(this.scene,t,e,i,s,r);return this.displayList.add(o),this.updateList.add(o),o}))},13171:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),o=i(74853),a=i(65641),h=i(71606),l=new s({Extends:r,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Mask,n.Pipeline,n.ScrollFactor,n.Transform,n.Visible,h],initialize:function(t,e,i,s,n,h,l){void 0===s&&(s=16777215),void 0===n&&(n=128),void 0===h&&(h=1),void 0===l&&(l=.1),r.call(this,t,"PointLight"),this.initPipeline(a.POINTLIGHT_PIPELINE),this.setPosition(e,i),this.color=o(s),this.intensity=h,this.attenuation=l,this.width=2*n,this.height=2*n,this._radius=n},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this.width=2*t,this.height=2*t}},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});t.exports=l},162:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(13171);n.register("pointlight",(function(t,e){void 0===t&&(t={});var i=r(t,"color",16777215),n=r(t,"radius",128),a=r(t,"intensity",1),h=r(t,"attenuation",.1),l=new o(this.scene,0,0,i,n,a,h);return void 0!==e&&(t.add=e),s(this.scene,l,t),l}))},91201:(t,e,i)=>{var s=i(61286),n=i(13171);s.register("pointlight",(function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))}))},71606:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(80590),t.exports={renderWebGL:n,renderCanvas:r}},80590:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),o=s(e,i,n).calc,a=e.width,h=e.height,l=-e._radius,u=-e._radius,c=l+a,d=u+h,p=o.getX(0,0),f=o.getY(0,0),v=o.getX(l,u),g=o.getY(l,u),m=o.getX(l,d),y=o.getY(l,d),x=o.getX(c,d),T=o.getY(c,d),w=o.getX(c,u),b=o.getY(c,u);t.pipelines.preBatch(e),r.batchPointLight(e,i,v,g,m,y,x,T,w,b,p,f),t.pipelines.postBatch(e)}},15996:(t,e,i)=>{var s=i(56694),n=i(845),r=i(1539),o=new s({Extends:r,initialize:function(t,e,i,s,o){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=32),void 0===o&&(o=32);var a=new n(t.sys.textures,"",s,o);r.call(this,t,e,i,a),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(t,e){this.width=t,this.height=e,this.texture.setSize(t,e),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this},resize:function(t,e){return this.setSize(t,e),this},saveTexture:function(t){var e=this.texture;return e.key=t,e.manager.addDynamicTexture(e)&&(this._saved=!0),e},fill:function(t,e,i,s,n,r){return this.texture.fill(t,e,i,s,n,r),this},clear:function(){return this.texture.clear(),this},stamp:function(t,e,i,s,n){return this.texture.stamp(t,e,i,s,n),this},erase:function(t,e,i){return this.texture.erase(t,e,i),this},draw:function(t,e,i,s,n){return this.texture.draw(t,e,i,s,n),this},drawFrame:function(t,e,i,s,n,r){return this.texture.drawFrame(t,e,i,s,n,r),this},repeat:function(t,e,i,s,n,r,o,a,h){return this.texture.repeat(t,e,i,s,n,r,o,a,h),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(t,e,i,s,n){return this.texture.batchDraw(t,e,i,s,n),this},batchDrawFrame:function(t,e,i,s,n,r){return this.texture.batchDrawFrame(t,e,i,s,n,r),this},endDraw:function(t){return this.texture.endDraw(t),this},snapshotArea:function(t,e,i,s,n,r,o){return this.texture.snapshotArea(t,e,i,s,n,r,o),this},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.width,this.height,t,e,i)},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i,"pixel")},preDestroy:function(){this._saved||this.texture.destroy()}});t.exports=o},85692:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(15996);n.register("renderTexture",(function(t,e){void 0===t&&(t={});var i=r(t,"x",0),n=r(t,"y",0),a=r(t,"width",32),h=r(t,"height",32),l=new o(this.scene,i,n,a,h);return void 0!==e&&(t.add=e),s(this.scene,l,t),l}))},29599:(t,e,i)=>{var s=i(61286),n=i(15996);s.register("renderTexture",(function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))}))},79968:(t,e,i)=>{var s=i(16569),n=i(56694),r=i(64937),o=i(89980),a=i(65641),h=i(58912),l=i(93736),u=new n({Extends:o,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Flip,r.Mask,r.Pipeline,r.Size,r.Texture,r.Transform,r.Visible,r.ScrollFactor,h],initialize:function(t,e,i,n,r,h,u,c,d){void 0===n&&(n="__DEFAULT"),void 0===h&&(h=2),void 0===u&&(u=!0),o.call(this,t,"Rope"),this.anims=new s(this),this.points=h,this.vertices,this.uv,this.colors,this.alphas,this.tintFill="__DEFAULT"===n,this.dirty=!1,this.horizontal=u,this._flipX=!1,this._flipY=!1,this._perp=new l,this.debugCallback=null,this.debugGraphic=null,this.setTexture(n,r),this.setPosition(e,i),this.setSizeToFrame(),this.initPipeline(a.ROPE_PIPELINE),Array.isArray(h)&&this.resizeArrays(h.length),this.setPoints(h,c,d),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){var i=this.anims.currentFrame;this.anims.update(t,e),this.anims.currentFrame!==i&&(this.updateUVs(),this.updateVertices())},play:function(t,e,i){return this.anims.play(t,e,i),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(t,e,i){return void 0===t&&(t=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(t,e,i))},setVertical:function(t,e,i){return void 0===t&&(t=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(t,e,i)):this},setTintFill:function(t){return void 0===t&&(t=!1),this.tintFill=t,this},setAlphas:function(t,e){var i=this.points.length;if(i<1)return this;var s,n=this.alphas;void 0===t?t=[1]:Array.isArray(t)||void 0!==e||(t=[t]);var r=0;if(void 0!==e)for(s=0;sr&&(o=t[r]),n[r]=o,t.length>r+1&&(o=t[r+1]),n[r+1]=o}return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i,s=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var n=0;if(t.length===e)for(i=0;in&&(r=t[n]),s[n]=r,t.length>n+1&&(r=t[n+1]),s[n+1]=r}return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var s,n,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,n=this.frame.width/(o-1),s=0;s{t.exports=function(){}},96027:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(10850),a=i(79968);n.register("rope",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),h=r(t,"horizontal",!0),l=o(t,"points",void 0),u=o(t,"colors",void 0),c=o(t,"alphas",void 0),d=new a(this.scene,0,0,i,n,l,h,u,c);return void 0!==e&&(t.add=e),s(this.scene,d,t),d}))},31982:(t,e,i)=>{var s=i(79968);i(61286).register("rope",(function(t,e,i,n,r,o,a,h){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h))}))},58912:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(49489),r=i(44598),t.exports={renderWebGL:n,renderCanvas:r}},49489:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline,e),a=s(e,i,r).calc,h=e.vertices,l=e.uv,u=e.colors,c=e.alphas,d=e.alpha,p=n.getTintAppendFloatAlpha,f=i.roundPixels,v=h.length,g=Math.floor(.5*v);o.flush(),t.pipelines.preBatch(e);var m=o.setGameObject(e),y=o.vertexViewF32,x=o.vertexViewU32,T=o.vertexCount*o.currentShader.vertexComponentCount-1,w=0,b=e.tintFill;e.dirty&&e.updateVertices();for(var E=e.debugCallback,S=[],A=0;A{var s=i(56694),n=i(64937),r=i(89980),o=i(72632),a=i(98611),h=i(22440),l=i(24252),u=i(69360),c=new s({Extends:r,Mixins:[n.ComputedSize,n.Depth,n.GetBounds,n.Mask,n.Origin,n.ScrollFactor,n.Transform,n.Visible,l],initialize:function(t,e,i,s,n,o,a,h){void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=128),void 0===o&&(o=128),r.call(this,t,"Shader"),this.blendMode=-1,this.shader;var l=t.sys.renderer;this.renderer=l,this.gl=l.gl,this.vertexData=new ArrayBuffer(2*Float32Array.BYTES_PER_ELEMENT*6),this.vertexBuffer=l.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new u,this._tempMatrix2=new u,this._tempMatrix3=new u,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=l.width,this._rendererHeight=l.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(i,s),this.setSize(n,o),this.setOrigin(.5,.5),this.setShader(e,a,h)},willRender:function(t){return!!this.renderToTexture||!(r.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setRenderToTexture:function(t,e){if(void 0===e&&(e=!1),!this.renderToTexture){var i=this.width,s=this.height,n=this.renderer;this.glTexture=n.createTextureFromSource(null,i,s,0),this.glTexture.flipY=e,this.framebuffer=n.createFramebuffer(i,s,this.glTexture,!1),this._rendererWidth=i,this._rendererHeight=s,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),t&&(this.texture=this.scene.sys.textures.addGLTexture(t,this.glTexture,i,s))}return this.shader&&(n.pipelines.clear(),this.load(),this.flush(),n.pipelines.rebind()),this},setShader:function(t,e,i){if(void 0===e&&(e=[]),"string"==typeof t){var s=this.scene.sys.cache.shader;if(!s.has(t))return console.warn("Shader missing: "+t),this;this.shader=s.get(t)}else this.shader=t;var n=this.gl,r=this.renderer;this.program&&n.deleteProgram(this.program);var o=r.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);n.uniformMatrix4fv(n.getUniformLocation(o,"uViewMatrix"),!1,this.viewMatrix),n.uniformMatrix4fv(n.getUniformLocation(o,"uProjectionMatrix"),!1,this.projectionMatrix),n.uniform2f(n.getUniformLocation(o,"uResolution"),this.width,this.height),this.program=o;var h=new Date,l={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[h.getFullYear(),h.getMonth(),h.getDate(),60*h.getHours()*60+60*h.getMinutes()+h.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=a(!0,{},this.shader.uniforms,l):this.uniforms=l;for(var u=0;u<4;u++)e[u]&&this.setSampler2D("iChannel"+u,e[u],u,i);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(t){return this.pointer=t,this},projOrtho:function(t,e,i,s){var n=1/(t-e),r=1/(i-s),o=this.projectionMatrix;o[0]=-2*n,o[5]=-2*r,o[10]=-.001,o[12]=(t+e)*n,o[13]=(s+i)*r,o[14]=-0;var a=this.program,h=this.gl;this.renderer.setProgram(a),h.uniformMatrix4fv(h.getUniformLocation(a,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=e,this._rendererHeight=i},initUniforms:function(){var t=this.gl,e=this.renderer.glFuncMap,i=this.program;for(var s in this._textureCount=0,this.uniforms){var n=this.uniforms[s],r=n.type,o=e[r];n.uniformLocation=t.getUniformLocation(i,s),"sampler2D"!==r&&(n.glMatrix=o.matrix,n.glValueLength=o.length,n.glFunc=o.func)}},setSampler2DBuffer:function(t,e,i,s,n,r){void 0===n&&(n=0),void 0===r&&(r={});var o=this.uniforms[t];return o.value=e,r.width=i,r.height=s,o.textureData=r,this._textureCount=n,this.initSampler2D(o),this},setSampler2D:function(t,e,i,s){void 0===i&&(i=0);var n=this.scene.sys.textures;if(n.exists(e)){var r=n.getFrame(e);if(r.glTexture&&r.glTexture.isRenderTexture)return this.setSampler2DBuffer(t,r.glTexture,r.width,r.height,i,s);var o=this.uniforms[t],a=r.source;o.textureKey=e,o.source=a.image,o.value=r.glTexture,a.isGLTexture&&(s||(s={}),s.width=a.width,s.height=a.height),s&&(o.textureData=s),this._textureCount=i,this.initSampler2D(o)}return this},setUniform:function(t,e){return h(this.uniforms,t,e),this},getUniform:function(t){return o(this.uniforms,t,null)},setChannel0:function(t,e){return this.setSampler2D("iChannel0",t,0,e)},setChannel1:function(t,e){return this.setSampler2D("iChannel1",t,1,e)},setChannel2:function(t,e){return this.setSampler2D("iChannel2",t,2,e)},setChannel3:function(t,e){return this.setSampler2D("iChannel3",t,3,e)},initSampler2D:function(t){if(t.value){var e=this.gl;e.activeTexture(e.TEXTURE0+this._textureCount),e.bindTexture(e.TEXTURE_2D,t.value);var i=t.textureData;if(i&&!t.value.isRenderTexture){var s=e[o(i,"magFilter","linear").toUpperCase()],n=e[o(i,"minFilter","linear").toUpperCase()],r=e[o(i,"wrapS","repeat").toUpperCase()],a=e[o(i,"wrapT","repeat").toUpperCase()],h=e[o(i,"format","rgba").toUpperCase()];if(i.repeat&&(r=e.REPEAT,a=e.REPEAT),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!!i.flipY),i.width){var l=o(i,"width",512),u=o(i,"height",2),c=o(i,"border",0);e.texImage2D(e.TEXTURE_2D,0,h,l,u,c,h,e.UNSIGNED_BYTE,null)}else e.texImage2D(e.TEXTURE_2D,0,h,e.RGBA,e.UNSIGNED_BYTE,t.source);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,s),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,a)}this.renderer.setProgram(this.program),e.uniform1i(t.uniformLocation,this._textureCount),this._textureCount++}},syncUniforms:function(){var t,e,i,s,n,r=this.gl,o=this.uniforms,a=0;for(var h in o)i=(t=o[h]).glFunc,e=t.glValueLength,s=t.uniformLocation,null!==(n=t.value)&&(1===e?t.glMatrix?i.call(r,s,t.transpose,n):i.call(r,s,n):2===e?i.call(r,s,n.x,n.y):3===e?i.call(r,s,n.x,n.y,n.z):4===e?i.call(r,s,n.x,n.y,n.z,n.w):"sampler2D"===t.type&&(r.activeTexture(r.TEXTURE0+a),r.bindTexture(r.TEXTURE_2D,n),r.uniform1i(s,a),a++))},load:function(t){var e=this.gl,i=this.width,s=this.height,n=this.renderer,r=this.program,o=this.viewMatrix;if(!this.renderToTexture){var a=-this._displayOriginX,h=-this._displayOriginY;o[0]=t[0],o[1]=t[1],o[4]=t[2],o[5]=t[3],o[8]=t[4],o[9]=t[5],o[12]=o[0]*a+o[4]*h,o[13]=o[1]*a+o[5]*h}e.useProgram(r),e.uniformMatrix4fv(e.getUniformLocation(r,"uViewMatrix"),!1,o),e.uniform2f(e.getUniformLocation(r,"uResolution"),this.width,this.height);var l=this.uniforms,u=l.resolution;u.value.x=i,u.value.y=s,l.time.value=n.game.loop.getDuration();var c=this.pointer;if(c){var d=l.mouse,p=c.x/i,f=1-c.y/s;d.value.x=p.toFixed(2),d.value.y=f.toFixed(2)}this.syncUniforms()},flush:function(){var t=this.width,e=this.height,i=this.program,s=this.gl,n=this.vertexBuffer,r=this.renderer,o=2*Float32Array.BYTES_PER_ELEMENT;this.renderToTexture&&(r.setFramebuffer(this.framebuffer),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT)),s.bindBuffer(s.ARRAY_BUFFER,n);var a=s.getAttribLocation(i,"inPosition");-1!==a&&(s.enableVertexAttribArray(a),s.vertexAttribPointer(a,2,s.FLOAT,!1,o,0));var h=this.vertexViewF32;h[3]=e,h[4]=t,h[5]=e,h[8]=t,h[9]=e,h[10]=t;s.bufferSubData(s.ARRAY_BUFFER,0,this.bytes.subarray(0,6*o)),s.drawArrays(s.TRIANGLES,0,6),this.renderToTexture&&r.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},preDestroy:function(){var t=this.gl;t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(this.renderer.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null)}});t.exports=c},10612:t=>{t.exports=function(){}},13908:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(27902);n.register("shader",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"x",0),a=r(t,"y",0),h=r(t,"width",128),l=r(t,"height",128),u=new o(this.scene,i,n,a,h,l);return void 0!==e&&(t.add=e),s(this.scene,u,t),u}))},51979:(t,e,i)=>{var s=i(27902);i(61286).register("shader",(function(t,e,i,n,r,o,a){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a))}))},24252:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(19782),r=i(10612),t.exports={renderWebGL:n,renderCanvas:r}},19782:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){if(e.shader){if(i.addToRenderList(e),t.pipelines.clear(),e.renderToTexture)e.load(),e.flush();else{var r=s(e,i,n).calc;t.width===e._rendererWidth&&t.height===e._rendererHeight||e.projOrtho(0,t.width,t.height,0),e.load(r.matrix),e.flush()}t.pipelines.rebind()}}},19543:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n,r,o){for(var a=s.getTintAppendFloatAlpha(i.fillColor,i.fillAlpha*n),h=i.pathData,l=i.pathIndexes,u=0;u{t.exports=function(t,e,i,s){var n=i||e.fillColor,r=s||e.fillAlpha,o=(16711680&n)>>>16,a=(65280&n)>>>8,h=255&n;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},17876:t=>{t.exports=function(t,e,i,s){var n=i||e.strokeColor,r=s||e.strokeAlpha,o=(16711680&n)>>>16,a=(65280&n)>>>8,h=255&n;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},91461:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),o=i(88829),a=new s({Extends:r,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.GetBounds,n.FX,n.Mask,n.Origin,n.Pipeline,n.ScrollFactor,n.Transform,n.Visible],initialize:function(t,e,i){void 0===e&&(e="Shape"),r.call(this,t,e),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new o,this.width=0,this.height=0,this.initPipeline()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.isFilled=!1:(this.fillColor=t,this.fillAlpha=e,this.isFilled=!0),this},setStrokeStyle:function(t,e,i){return void 0===i&&(i=1),void 0===t?this.isStroked=!1:(this.lineWidth=t,this.strokeColor=e,this.strokeAlpha=i,this.isStroked=!0),this},setClosePath:function(t){return this.closePath=t,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}}});t.exports=a},50262:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n,r){var o=t.strokeTint,a=s.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*i);o.TL=a,o.TR=a,o.BL=a,o.BR=a;var h=e.pathData,l=h.length-1,u=e.lineWidth,c=u/2,d=h[0]-n,p=h[1]-r;e.closePath||(l-=2);for(var f=2;f{var s=i(2213),n=i(56694),r=i(75606),o=i(11117),a=i(26673),h=i(83392),l=i(91461),u=new n({Extends:l,Mixins:[s],initialize:function(t,e,i,s,n,r,o,h,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===n&&(n=0),void 0===r&&(r=360),void 0===o&&(o=!1),l.call(this,t,"Arc",new a(0,0,s)),this._startAngle=n,this._endAngle=r,this._anticlockwise=o,this._iterations=.01,this.setPosition(e,i);var c=2*this.geom.radius;this.setSize(c,c),void 0!==h&&this.setFillStyle(h,u),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(t){this._iterations=t,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(t){this.geom.radius=t;var e=2*t;this.setSize(e,e),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(t){this._startAngle=t,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(t){this._endAngle=t,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(t){this._anticlockwise=t,this.updateData()}},setRadius:function(t){return this.radius=t,this},setIterations:function(t){return void 0===t&&(t=.01),this.iterations=t,this},setStartAngle:function(t,e){return this._startAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},setEndAngle:function(t,e){return this._endAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},updateData:function(){var t=this._iterations,e=t,i=this.geom.radius,s=r(this._startAngle),n=r(this._endAngle),a=i,l=i;n-=s,this._anticlockwise?n<-h.PI2?n=-h.PI2:n>0&&(n=-h.PI2+n%h.PI2):n>h.PI2?n=h.PI2:n<0&&(n=h.PI2+n%h.PI2);for(var u,c=[a+Math.cos(s)*i,l+Math.sin(s)*i];e<1;)u=n*e+s,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),e+=t;return u=n+s,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),c.push(a+Math.cos(s)*i,l+Math.sin(s)*i),this.pathIndexes=o(c),this.pathData=c,this}});t.exports=u},23560:(t,e,i)=>{var s=i(75606),n=i(15608),r=i(17876),o=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var h=t.currentContext;if(o(t,h,e,i,a)){var l=e.radius;h.beginPath(),h.arc(l-e.originX*(2*l),l-e.originY*(2*l),l,s(e._startAngle),s(e._endAngle),e.anticlockwise),e.closePath&&h.closePath(),e.isFilled&&(n(h,e),h.fill()),e.isStroked&&(r(h,e),h.stroke()),h.restore()}}},10369:(t,e,i)=>{var s=i(28593),n=i(61286);n.register("arc",(function(t,e,i,n,r,o,a,h){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h))})),n.register("circle",(function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,0,360,!1,n,r))}))},2213:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(58356),r=i(23560),t.exports={renderWebGL:n,renderCanvas:r}},58356:(t,e,i)=>{var s=i(73329),n=i(19543),r=i(50262);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=s(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&n(a,l,e,d,u,c),e.isStroked&&r(a,e,d,u,c),t.pipelines.postBatch(e)}},15220:(t,e,i)=>{var s=i(56694),n=i(87203),r=i(11117),o=i(74118),a=i(91461),h=new s({Extends:a,Mixins:[n],initialize:function(t,e,i,s,n,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",s),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==n&&this.setFillStyle(n,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],s=this.geom.getPoints(e),n=0;n{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX+e._curveBounds.x,l=e._displayOriginY+e._curveBounds.y,u=e.pathData,c=u.length-1,d=u[0]-h,p=u[1]-l;a.beginPath(),a.moveTo(d,p),e.closePath||(c-=2);for(var f=2;f{var s=i(61286),n=i(15220);s.register("curve",(function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))}))},87203:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(82958),r=i(4024),t.exports={renderWebGL:n,renderCanvas:r}},82958:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=n(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX+e._curveBounds.x,c=e._displayOriginY+e._curveBounds.y,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(a,l,e,d,u,c),e.isStroked&&r(a,e,d,u,c),t.pipelines.postBatch(e)}},28591:(t,e,i)=>{var s=i(56694),n=i(11117),r=i(84171),o=i(95669),a=i(91461),h=new s({Extends:a,Mixins:[r],initialize:function(t,e,i,s,n,r,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===n&&(n=128),a.call(this,t,"Ellipse",new o(s/2,n/2,s,n)),this._smoothness=64,this.setPosition(e,i),this.width=s,this.height=n,void 0!==r&&this.setFillStyle(r,h),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSize:function(t,e){return this.width=t,this.height=e,this.geom.setPosition(t/2,e/2),this.geom.setSize(t,e),this.updateData()},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){for(var t=[],e=this.geom.getPoints(this._smoothness),i=0;i{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,p=u[1]-l;a.beginPath(),a.moveTo(d,p),e.closePath||(c-=2);for(var f=2;f{var s=i(28591);i(61286).register("ellipse",(function(t,e,i,n,r,o){return this.displayList.add(new s(this.scene,t,e,i,n,r,o))}))},84171:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(17554),r=i(55881),t.exports={renderWebGL:n,renderCanvas:r}},17554:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=n(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(a,l,e,d,u,c),e.isStroked&&r(a,e,d,u,c),t.pipelines.postBatch(e)}},39169:(t,e,i)=>{var s=i(56694),n=i(91461),r=i(88059),o=new s({Extends:n,Mixins:[r],initialize:function(t,e,i,s,r,o,a,h,l,u,c){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===r&&(r=128),void 0===o&&(o=32),void 0===a&&(a=32),n.call(this,t,"Grid",null),this.cellWidth=o,this.cellHeight=a,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(e,i),this.setSize(s,r),this.setFillStyle(h,l),void 0!==u&&this.setOutlineStyle(u,c),this.updateDisplayOrigin()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showCells=!1:(this.fillColor=t,this.fillAlpha=e,this.showCells=!0),this},setAltFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showAltCells=!1:(this.altFillColor=t,this.altFillAlpha=e,this.showAltCells=!0),this},setOutlineStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showOutline=!1:(this.outlineFillColor=t,this.outlineFillAlpha=e,this.showOutline=!0),this}});t.exports=o},95525:(t,e,i)=>{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=-e._displayOriginX,l=-e._displayOriginY,u=i.alpha*e.alpha,c=e.width,d=e.height,p=e.cellWidth,f=e.cellHeight,v=Math.ceil(c/p),g=Math.ceil(d/f),m=p,y=f,x=p-(v*p-c),T=f-(g*f-d),w=e.showCells,b=e.showAltCells,E=e.showOutline,S=0,A=0,_=0,C=0,M=0;if(E&&(m--,y--,x===p&&x--,T===f&&T--),w&&e.fillAlpha>0)for(s(a,e),A=0;A0)for(s(a,e,e.altFillColor,e.altFillAlpha*u),A=0;A0){for(n(a,e,e.outlineFillColor,e.outlineFillAlpha*u),S=1;S{var s=i(61286),n=i(39169);s.register("grid",(function(t,e,i,s,r,o,a,h,l,u){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h,l,u))}))},88059:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(50639),r=i(95525),t.exports={renderWebGL:n,renderCanvas:r}},50639:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),a=s(e,i,r);o.calcMatrix.copyFrom(a.calc).translate(-e._displayOriginX,-e._displayOriginY);var h,l,u=i.alpha*e.alpha,c=e.width,d=e.height,p=e.cellWidth,f=e.cellHeight,v=Math.ceil(c/p),g=Math.ceil(d/f),m=p,y=f,x=p-(v*p-c),T=f-(g*f-d),w=e.showCells,b=e.showAltCells,E=e.showOutline,S=0,A=0,_=0,C=0,M=0;if(E&&(m--,y--,x===p&&x--,T===f&&T--),t.pipelines.preBatch(e),w&&e.fillAlpha>0)for(h=o.fillTint,l=n.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*u),h.TL=l,h.TR=l,h.BL=l,h.BR=l,A=0;A0)for(h=o.fillTint,l=n.getTintAppendFloatAlpha(e.altFillColor,e.altFillAlpha*u),h.TL=l,h.TR=l,h.BL=l,h.BR=l,A=0;A0){var R=o.strokeTint,P=n.getTintAppendFloatAlpha(e.outlineFillColor,e.outlineFillAlpha*u);for(R.TL=P,R.TR=P,R.BL=P,R.BR=P,S=1;S{var s=i(72296),n=i(56694),r=i(91461),o=new n({Extends:r,Mixins:[s],initialize:function(t,e,i,s,n,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=48),void 0===n&&(n=32),void 0===o&&(o=15658734),void 0===a&&(a=10066329),void 0===h&&(h=13421772),r.call(this,t,"IsoBox",null),this.projection=4,this.fillTop=o,this.fillLeft=a,this.fillRight=h,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(e,i),this.setSize(s,n),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=o},32884:(t,e,i)=>{var s=i(15608),n=i(49584);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.currentContext;if(n(t,o,e,i,r)&&e.isFilled){var a=e.width,h=e.height,l=a/2,u=a/e.projection;e.showTop&&(s(o,e,e.fillTop),o.beginPath(),o.moveTo(-l,-h),o.lineTo(0,-u-h),o.lineTo(l,-h),o.lineTo(l,-1),o.lineTo(0,u-1),o.lineTo(-l,-1),o.lineTo(-l,-h),o.fill()),e.showLeft&&(s(o,e,e.fillLeft),o.beginPath(),o.moveTo(-l,0),o.lineTo(0,u),o.lineTo(0,u-h),o.lineTo(-l,-h),o.lineTo(-l,0),o.fill()),e.showRight&&(s(o,e,e.fillRight),o.beginPath(),o.moveTo(l,0),o.lineTo(0,u),o.lineTo(0,u-h),o.lineTo(l,-h),o.lineTo(l,0),o.fill()),o.restore()}}},88154:(t,e,i)=>{var s=i(61286),n=i(4415);s.register("isobox",(function(t,e,i,s,r,o,a){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a))}))},72296:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(33101),r=i(32884),t.exports={renderWebGL:n,renderCanvas:r}},33101:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var o,a,h,l,u,c,d,p,f,v=t.pipelines.set(e.pipeline),g=s(e,i,r),m=v.calcMatrix.copyFrom(g.calc),y=e.width,x=e.height,T=y/2,w=y/e.projection,b=i.alpha*e.alpha;e.isFilled&&(t.pipelines.preBatch(e),e.showTop&&(o=n.getTintAppendFloatAlpha(e.fillTop,b),a=m.getX(-T,-x),h=m.getY(-T,-x),l=m.getX(0,-w-x),u=m.getY(0,-w-x),c=m.getX(T,-x),d=m.getY(T,-x),p=m.getX(0,w-x),f=m.getY(0,w-x),v.batchQuad(e,a,h,l,u,c,d,p,f,0,0,1,1,o,o,o,o,2)),e.showLeft&&(o=n.getTintAppendFloatAlpha(e.fillLeft,b),a=m.getX(-T,0),h=m.getY(-T,0),l=m.getX(0,w),u=m.getY(0,w),c=m.getX(0,w-x),d=m.getY(0,w-x),p=m.getX(-T,-x),f=m.getY(-T,-x),v.batchQuad(e,a,h,l,u,c,d,p,f,0,0,1,1,o,o,o,o,2)),e.showRight&&(o=n.getTintAppendFloatAlpha(e.fillRight,b),a=m.getX(T,0),h=m.getY(T,0),l=m.getX(0,w),u=m.getY(0,w),c=m.getX(0,w-x),d=m.getY(0,w-x),p=m.getX(T,-x),f=m.getY(T,-x),v.batchQuad(e,a,h,l,u,c,d,p,f,0,0,1,1,o,o,o,o,2)),t.pipelines.postBatch(e))}},65159:(t,e,i)=>{var s=i(56694),n=i(93387),r=i(91461),o=new s({Extends:r,Mixins:[n],initialize:function(t,e,i,s,n,o,a,h,l){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=48),void 0===n&&(n=32),void 0===o&&(o=!1),void 0===a&&(a=15658734),void 0===h&&(h=10066329),void 0===l&&(l=13421772),r.call(this,t,"IsoTriangle",null),this.projection=4,this.fillTop=a,this.fillLeft=h,this.fillRight=l,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=o,this.isFilled=!0,this.setPosition(e,i),this.setSize(s,n),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setReversed:function(t){return this.isReversed=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=o},9923:(t,e,i)=>{var s=i(15608),n=i(49584);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.currentContext;if(n(t,o,e,i,r)&&e.isFilled){var a=e.width,h=e.height,l=a/2,u=a/e.projection,c=e.isReversed;e.showTop&&c&&(s(o,e,e.fillTop),o.beginPath(),o.moveTo(-l,-h),o.lineTo(0,-u-h),o.lineTo(l,-h),o.lineTo(0,u-h),o.fill()),e.showLeft&&(s(o,e,e.fillLeft),o.beginPath(),c?(o.moveTo(-l,-h),o.lineTo(0,u),o.lineTo(0,u-h)):(o.moveTo(-l,0),o.lineTo(0,u),o.lineTo(0,u-h)),o.fill()),e.showRight&&(s(o,e,e.fillRight),o.beginPath(),c?(o.moveTo(l,-h),o.lineTo(0,u),o.lineTo(0,u-h)):(o.moveTo(l,0),o.lineTo(0,u),o.lineTo(0,u-h)),o.fill()),o.restore()}}},67765:(t,e,i)=>{var s=i(61286),n=i(65159);s.register("isotriangle",(function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))}))},93387:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(54946),r=i(9923),t.exports={renderWebGL:n,renderCanvas:r}},54946:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),a=s(e,i,r),h=o.calcMatrix.copyFrom(a.calc),l=e.width,u=e.height,c=l/2,d=l/e.projection,p=e.isReversed,f=i.alpha*e.alpha;if(e.isFilled){var v,g,m,y,x,T,w;if(t.pipelines.preBatch(e),e.showTop&&p){v=n.getTintAppendFloatAlpha(e.fillTop,f),g=h.getX(-c,-u),m=h.getY(-c,-u),y=h.getX(0,-d-u),x=h.getY(0,-d-u),T=h.getX(c,-u),w=h.getY(c,-u);var b=h.getX(0,d-u),E=h.getY(0,d-u);o.batchQuad(e,g,m,y,x,T,w,b,E,0,0,1,1,v,v,v,v,2)}e.showLeft&&(v=n.getTintAppendFloatAlpha(e.fillLeft,f),p?(g=h.getX(-c,-u),m=h.getY(-c,-u),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)):(g=h.getX(-c,0),m=h.getY(-c,0),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)),o.batchTri(e,g,m,y,x,T,w,0,0,1,1,v,v,v,2)),e.showRight&&(v=n.getTintAppendFloatAlpha(e.fillRight,f),p?(g=h.getX(c,-u),m=h.getY(c,-u),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)):(g=h.getX(c,0),m=h.getY(c,0),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)),o.batchTri(e,g,m,y,x,T,w,0,0,1,1,v,v,v,2)),t.pipelines.postBatch(e)}}},579:(t,e,i)=>{var s=i(56694),n=i(91461),r=i(88829),o=i(52660),a=new s({Extends:n,Mixins:[o],initialize:function(t,e,i,s,o,a,h,l,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===o&&(o=0),void 0===a&&(a=128),void 0===h&&(h=0),n.call(this,t,"Line",new r(s,o,a,h));var c=Math.max(1,this.geom.right-this.geom.left),d=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(e,i),this.setSize(c,d),void 0!==l&&this.setStrokeStyle(1,l,u),this.updateDisplayOrigin()},setLineWidth:function(t,e){return void 0===e&&(e=t),this._startWidth=t,this._endWidth=e,this.lineWidth=t,this},setTo:function(t,e,i,s){return this.geom.setTo(t,e,i,s),this}});t.exports=a},52044:(t,e,i)=>{var s=i(17876),n=i(49584);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.currentContext;if(n(t,o,e,i,r)){var a=e._displayOriginX,h=e._displayOriginY;e.isStroked&&(s(o,e),o.beginPath(),o.moveTo(e.geom.x1-a,e.geom.y1-h),o.lineTo(e.geom.x2-a,e.geom.y2-h),o.stroke()),o.restore()}}},85665:(t,e,i)=>{var s=i(61286),n=i(579);s.register("line",(function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))}))},52660:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(46952),r=i(52044),t.exports={renderWebGL:n,renderCanvas:r}},46952:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),a=s(e,i,r);o.calcMatrix.copyFrom(a.calc);var h=e._displayOriginX,l=e._displayOriginY,u=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isStroked){var c=o.strokeTint,d=n.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*u);c.TL=d,c.TR=d,c.BL=d,c.BR=d;var p=e._startWidth,f=e._endWidth;o.batchLine(e.geom.x1-h,e.geom.y1-l,e.geom.x2-h,e.geom.y2-l,p,f,1,0,!1,a.sprite,a.camera)}t.pipelines.postBatch(e)}},91249:(t,e,i)=>{var s=i(70573),n=i(56694),r=i(11117),o=i(14045),a=i(8580),h=i(91461),l=i(18974),u=new n({Extends:h,Mixins:[s],initialize:function(t,e,i,s,n,r){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Polygon",new a(s));var l=o(this.geom);this.setPosition(e,i),this.setSize(l.width,l.height),void 0!==n&&this.setFillStyle(n,r),this.updateDisplayOrigin(),this.updateData()},smooth:function(t){void 0===t&&(t=1);for(var e=0;e{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,p=u[1]-l;a.beginPath(),a.moveTo(d,p),e.closePath||(c-=2);for(var f=2;f{var s=i(61286),n=i(91249);s.register("polygon",(function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))}))},70573:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(72841),r=i(40834),t.exports={renderWebGL:n,renderCanvas:r}},72841:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=n(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(a,l,e,d,u,c),e.isStroked&&r(a,e,d,u,c),t.pipelines.postBatch(e)}},517:(t,e,i)=>{var s=i(56694),n=i(74118),r=i(91461),o=i(37673),a=new s({Extends:r,Mixins:[o],initialize:function(t,e,i,s,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===o&&(o=128),r.call(this,t,"Rectangle",new n(0,0,s,o)),this.setPosition(e,i),this.setSize(s,o),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setSize:function(t,e){this.width=t,this.height=e,this.geom.setSize(t,e),this.updateData(),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},4091:(t,e,i)=>{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY;e.isFilled&&(s(a,e),a.fillRect(-h,-l,e.width,e.height)),e.isStroked&&(n(a,e),a.beginPath(),a.rect(-h,-l,e.width,e.height),a.stroke()),a.restore()}}},94355:(t,e,i)=>{var s=i(61286),n=i(517);s.register("rectangle",(function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))}))},37673:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(43532),r=i(4091),t.exports={renderWebGL:n,renderCanvas:r}},43532:(t,e,i)=>{var s=i(73329),n=i(50262),r=i(75512);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=s(e,i,o);a.calcMatrix.copyFrom(h.calc);var l=e._displayOriginX,u=e._displayOriginY,c=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isFilled){var d=a.fillTint,p=r.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*c);d.TL=p,d.TR=p,d.BL=p,d.BR=p,a.batchFillRect(-l,-u,e.width,e.height)}e.isStroked&&n(a,e,c,l,u),t.pipelines.postBatch(e)}},77843:(t,e,i)=>{var s=i(87956),n=i(56694),r=i(11117),o=i(91461),a=new n({Extends:o,Mixins:[s],initialize:function(t,e,i,s,n,r,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=5),void 0===n&&(n=32),void 0===r&&(r=64),o.call(this,t,"Star",null),this._points=s,this._innerRadius=n,this._outerRadius=r,this.setPosition(e,i),this.setSize(2*r,2*r),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,s=this._outerRadius,n=Math.PI/2*3,o=Math.PI/e,a=s,h=s;t.push(a,h+-s);for(var l=0;l{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,p=u[1]-l;a.beginPath(),a.moveTo(d,p),e.closePath||(c-=2);for(var f=2;f{var s=i(77843);i(61286).register("star",(function(t,e,i,n,r,o,a){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a))}))},87956:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(12037),r=i(11401),t.exports={renderWebGL:n,renderCanvas:r}},12037:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=n(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(a,l,e,d,u,c),e.isStroked&&r(a,e,d,u,c),t.pipelines.postBatch(e)}},21873:(t,e,i)=>{var s=i(56694),n=i(91461),r=i(66349),o=i(70498),a=new s({Extends:n,Mixins:[o],initialize:function(t,e,i,s,o,a,h,l,u,c,d){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===o&&(o=128),void 0===a&&(a=64),void 0===h&&(h=0),void 0===l&&(l=128),void 0===u&&(u=128),n.call(this,t,"Triangle",new r(s,o,a,h,l,u));var p=this.geom.right-this.geom.left,f=this.geom.bottom-this.geom.top;this.setPosition(e,i),this.setSize(p,f),void 0!==c&&this.setFillStyle(c,d),this.updateDisplayOrigin(),this.updateData()},setTo:function(t,e,i,s,n,r){return this.geom.setTo(t,e,i,s,n,r),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},60213:(t,e,i)=>{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.geom.x1-h,c=e.geom.y1-l,d=e.geom.x2-h,p=e.geom.y2-l,f=e.geom.x3-h,v=e.geom.y3-l;a.beginPath(),a.moveTo(u,c),a.lineTo(d,p),a.lineTo(f,v),a.closePath(),e.isFilled&&(s(a,e),a.fill()),e.isStroked&&(n(a,e),a.stroke()),a.restore()}}},79296:(t,e,i)=>{var s=i(61286),n=i(21873);s.register("triangle",(function(t,e,i,s,r,o,a,h,l,u){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h,l,u))}))},70498:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(72291),r=i(60213),t.exports={renderWebGL:n,renderCanvas:r}},72291:(t,e,i)=>{var s=i(73329),n=i(50262),r=i(75512);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=s(e,i,o);a.calcMatrix.copyFrom(h.calc);var l=e._displayOriginX,u=e._displayOriginY,c=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isFilled){var d=a.fillTint,p=r.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*c);d.TL=p,d.TR=p,d.BL=p,d.BR=p;var f=e.geom.x1-l,v=e.geom.y1-u,g=e.geom.x2-l,m=e.geom.y2-u,y=e.geom.x3-l,x=e.geom.y3-u;a.batchFillTriangle(f,v,g,m,y,x,h.sprite,h.camera)}e.isStroked&&n(a,e,c,l,u),t.pipelines.postBatch(e)}},13747:(t,e,i)=>{var s=i(16569),n=i(56694),r=i(64937),o=i(89980),a=i(20791),h=new n({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.FX,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,a],initialize:function(t,e,i,n,r){o.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s(this),this.setTexture(n,r),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e){return this.anims.play(t,e)},playReverse:function(t,e){return this.anims.playReverse(t,e)},playAfterDelay:function(t,e){return this.anims.playAfterDelay(t,e)},playAfterRepeat:function(t,e){return this.anims.playAfterRepeat(t,e)},chain:function(t){return this.anims.chain(t)},stop:function(){return this.anims.stop()},stopAfterDelay:function(t){return this.anims.stopAfterDelay(t)},stopAfterRepeat:function(t){return this.anims.stopAfterRepeat(t)},stopOnFrame:function(t){return this.anims.stopOnFrame(t)},toJSON:function(){return r.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=h},27573:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},89219:(t,e,i)=>{var s=i(88933),n=i(32291),r=i(99325),o=i(20494),a=i(13747);r.register("sprite",(function(t,e){void 0===t&&(t={});var i=o(t,"key",null),r=o(t,"frame",null),h=new a(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),s(this.scene,h,t),n(h,t),h}))},66135:(t,e,i)=>{var s=i(61286),n=i(13747);s.register("sprite",(function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.displayList.add(r),r}))},20791:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(21034),r=i(27573),t.exports={renderWebGL:n,renderCanvas:r}},21034:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),e.pipeline.batchSprite(e,i,s)}},32979:t=>{t.exports=function(t,e,i){var s=t.canvas,n=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&r.maxLines1&&(d+=p*(h-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:p,lineHeight:c}}},27030:(t,e,i)=>{var s=i(61068);t.exports=function(t){var e=s.create(this),i=e.getContext("2d");t.syncFont(e,i);var n=i.measureText(t.testString);if("actualBoundingBoxAscent"in n){var r=n.actualBoundingBoxAscent,o=n.actualBoundingBoxDescent;return s.remove(e),{ascent:r,descent:o,fontSize:r+o}}var a=Math.ceil(n.width*t.baselineX),h=a,l=2*h;h=h*t.baselineY|0,e.width=a,e.height=l,i.fillStyle="#f00",i.fillRect(0,0,a,l),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,h);var u={ascent:0,descent:0,fontSize:0},c=i.getImageData(0,0,a,l);if(!c)return u.ascent=h,u.descent=h+6,u.fontSize=u.ascent+u.descent,s.remove(e),u;var d,p,f=c.data,v=f.length,g=4*a,m=0,y=!1;for(d=0;dh;d--){for(p=0;p{var s=i(99584),n=i(61068),r=i(56694),o=i(64937),a=i(89980),h=i(32979),l=i(10850),u=i(55638),c=i(80032),d=i(74744),p=new r({Extends:a,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.FX,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.ScrollFactor,o.Tint,o.Transform,o.Visible,c],initialize:function(t,e,i,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Text"),this.renderer=t.sys.renderer,this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.canvas=n.create(this),this.context=this.canvas.getContext("2d"),this.style=new d(this,r),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this._text=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.lineSpacing=0,this.dirty=!1,0===this.style.resolution&&(this.style.resolution=1),this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(s),r&&r.padding&&this.setPadding(r.padding),r&&r.lineSpacing&&this.setLineSpacing(r.lineSpacing)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",s(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(t){var e=this.style;if(e.wordWrapCallback){var i=e.wordWrapCallback.call(e.wordWrapCallbackScope,t,this);return Array.isArray(i)&&(i=i.join("\n")),i}return e.wordWrapWidth?e.wordWrapUseAdvanced?this.advancedWordWrap(t,this.context,this.style.wordWrapWidth):this.basicWordWrap(t,this.context,this.style.wordWrapWidth):t},advancedWordWrap:function(t,e,i){for(var s="",n=t.replace(/ +/gi," ").split(this.splitRegExp),r=n.length,o=0;ol){if(0===c){for(var v=p;v.length&&(v=v.slice(0,-1),!((f=e.measureText(v).width)<=l)););if(!v.length)throw new Error("wordWrapWidth < a single character");var g=d.substr(v.length);u[c]=g,h+=v}var m=u[c].length?c:c+1,y=u.slice(m).join(" ").replace(/[ \n]*$/gi,"");n.splice(o+1,0,y),r=n.length;break}h+=p,l-=f}s+=h.replace(/[ \n]*$/gi,"")+"\n"}}return s=s.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var s="",n=t.split(this.splitRegExp),r=n.length-1,o=e.measureText(" ").width,a=0;a<=r;a++){for(var h=i,l=n[a].split(" "),u=l.length-1,c=0;c<=u;c++){var d=l[c],p=e.measureText(d).width,f=p;ch&&c>0&&(s+="\n",h=i),s+=d,c0&&(d+=l.lineSpacing*v),i.rtl)c=p-c-u.left-u.right;else if("right"===i.align)c+=o-l.lineWidths[v];else if("center"===i.align)c+=(o-l.lineWidths[v])/2;else if("justify"===i.align){if(l.lineWidths[v]/l.width>=.85){var g=l.width-l.lineWidths[v],m=e.measureText(" ").width,y=a[v].trim(),x=y.split(" ");g+=(a[v].length-y.length)*m;for(var T=Math.floor(g/m),w=0;T>0;)x[w]+=" ",w=(w+1)%(x.length-1||1),--T;a[v]=x.join(" ")}}this.autoRound&&(c=Math.round(c),d=Math.round(d)),i.strokeThickness&&(i.syncShadow(e,i.shadowStroke),e.strokeText(a[v],c,d)),i.color&&(i.syncShadow(e,i.shadowFill),e.fillText(a[v],c,d))}e.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var b=this.input;return b&&!b.customHitArea&&(b.hitArea.width=this.width,b.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(t){this.setText(t)}},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&u(this.canvas),n.remove(this.canvas),this.texture.destroy()}});t.exports=p},71649:t=>{t.exports=function(t,e,i,s){0!==e.width&&0!==e.height&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,s))}},75397:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(76555);n.register("text",(function(t,e){void 0===t&&(t={});var i=r(t,"text",""),n=r(t,"style",null),a=r(t,"padding",null);null!==a&&(n.padding=a);var h=new o(this.scene,0,0,i,n);return void 0!==e&&(t.add=e),s(this.scene,h,t),h.autoRound=r(t,"autoRound",!0),h.resolution=r(t,"resolution",1),h}))},94627:(t,e,i)=>{var s=i(76555);i(61286).register("text",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},80032:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(76128),r=i(71649),t.exports={renderWebGL:n,renderCanvas:r}},74744:(t,e,i)=>{var s=i(56694),n=i(20494),r=i(10850),o=i(27030),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new s({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this.wordWrapWidth,this.wordWrapCallback,this.wordWrapCallbackScope,this.wordWrapUseAdvanced,this._font,this.setStyle(e,!1,!0)},setStyle:function(t,e,i){for(var s in void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),a){var h=i?a[s][1]:this[s];this[s]="wordWrapCallback"===s||"wordWrapCallbackScope"===s?r(t,a[s][0],h):n(t,a[s][0],h)}var l=r(t,"font",null);null!==l&&this.setFont(l,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var u=r(t,"fill",null);null!==u&&(this.color=u);var c=r(t,"metrics",!1);return c?this.metrics={ascent:r(c,"ascent",0),descent:r(c,"descent",0),fontSize:r(c,"fontSize",0)}:!e&&this.metrics||(this.metrics=o(this)),e?this.parent.updateText():this.parent},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow: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)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=o(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i=t,s="",n="";if("string"!=typeof t)i=r(t,"fontFamily","Courier"),s=r(t,"fontSize","16px"),n=r(t,"fontStyle","");else{var o=t.split(" "),a=0;n=o.length>2?o[a++]:"",s=o[a++]||"16px",i=o[a++]||"Courier"}return i===this.fontFamily&&s===this.fontSize&&n===this.fontStyle||(this.fontFamily=i,this.fontSize=s,this.fontStyle=n,e&&this.update(!0)),this.parent},setFontFamily:function(t){return this.fontFamily!==t&&(this.fontFamily=t,this.update(!0)),this.parent},setFontStyle:function(t){return this.fontStyle!==t&&(this.fontStyle=t,this.update(!0)),this.parent},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize!==t&&(this.fontSize=t,this.update(!0)),this.parent},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setResolution:function(t){return this.resolution=t,this.update(!1)},setStroke:function(t,e){return void 0===e&&(e=this.strokeThickness),void 0===t&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):this.stroke===t&&this.strokeThickness===e||(this.stroke=t,this.strokeThickness=e,this.update(!0)),this.parent},setShadow:function(t,e,i,s,n,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===s&&(s=0),void 0===n&&(n=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=s,this.shadowStroke=n,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},76128:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n){if(0!==e.width&&0!==e.height){i.addToRenderList(e);var r=e.frame,o=r.width,a=r.height,h=s.getTintAppendFloatAlpha,l=t.pipelines.set(e.pipeline,e),u=l.setTexture2D(r.glTexture,e);l.batchTexture(e,r.glTexture,o,a,e.x,e.y,o/e.style.resolution,a/e.style.resolution,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,o,a,h(e.tintTopLeft,i.alpha*e._alphaTL),h(e.tintTopRight,i.alpha*e._alphaTR),h(e.tintBottomLeft,i.alpha*e._alphaBL),h(e.tintBottomRight,i.alpha*e._alphaBR),e.tintFill,0,0,i,n,!1,u)}}},35856:(t,e,i)=>{var s=i(61068),n=i(56694),r=i(64937),o=i(89980),a=i(3504),h=i(8213),l=i(9271),u=i(93736),c=new n({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.FX,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,l],initialize:function(t,e,i,n,r,h,l){var c=t.sys.renderer;o.call(this,t,"TileSprite");var d=t.sys.textures.get(h),p=d.get(l);p.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed textures"),p=(d=t.sys.textures.get("__MISSING")).get()),n&&r?(n=Math.floor(n),r=Math.floor(r)):(n=p.width,r=p.height),this._tilePosition=new u,this._tileScale=new u(1,1),this.dirty=!1,this.renderer=c,this.canvas=s.create(this,n,r),this.context=this.canvas.getContext("2d"),this.displayTexture=d,this.displayFrame=p,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=a(p.width),this.potHeight=a(p.height),this.fillCanvas=s.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(e,i),this.setSize(n,r),this.setFrame(l),this.setOriginFromFrame(),this.initPipeline()},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){var e=this.displayTexture.get(t);return this.potWidth=a(e.width),this.potHeight=a(e.height),this.canvas.width=0,e.cutWidth&&e.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=e,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileScale:function(t,e){return void 0===t&&(t=this.tileScaleX),void 0===e&&(e=t),this.tileScaleX=t,this.tileScaleY=e,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var t=this.displayFrame;if(t.source.isRenderTexture||t.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var e=this.fillContext,i=this.fillCanvas,s=this.potWidth,n=this.potHeight;this.renderer&&this.renderer.gl||(s=t.cutWidth,n=t.cutHeight),e.clearRect(0,0,s,n),i.width=s,i.height=n,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,s,n),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var t=this.canvas;if(t.width===this.width&&t.height===this.height||(t.width=this.width,t.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context;this.scene.sys.game.config.antialias||h.disable(e);var i=this._tileScale.x,s=this._tileScale.y,n=this._tilePosition.x,r=this._tilePosition.y;e.clearRect(0,0,this.width,this.height),e.save(),e.scale(i,s),e.translate(-n,-r),e.fillStyle=this.fillPattern,e.fillRect(n,r,this.width/i,this.height/s),e.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),s.remove(this.canvas),s.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}});t.exports=c},93305:t=>{t.exports=function(t,e,i,s){e.updateCanvas(),i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},63950:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(35856);n.register("tileSprite",(function(t,e){void 0===t&&(t={});var i=r(t,"x",0),n=r(t,"y",0),a=r(t,"width",512),h=r(t,"height",512),l=r(t,"key",""),u=r(t,"frame",""),c=new o(this.scene,i,n,a,h,l,u);return void 0!==e&&(t.add=e),s(this.scene,c,t),c}))},20509:(t,e,i)=>{var s=i(35856);i(61286).register("tileSprite",(function(t,e,i,n,r,o){return this.displayList.add(new s(this.scene,t,e,i,n,r,o))}))},9271:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(74287),r=i(93305),t.exports={renderWebGL:n,renderCanvas:r}},74287:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n){e.updateCanvas();var r=e.width,o=e.height;if(0!==r&&0!==o){i.addToRenderList(e);var a=s.getTintAppendFloatAlpha,h=t.pipelines.set(e.pipeline,e),l=h.setTexture2D(e.fillPattern,e);h.batchTexture(e,e.fillPattern,e.displayFrame.width*e.tileScaleX,e.displayFrame.height*e.tileScaleY,e.x,e.y,r,o,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.originX*r,e.originY*o,0,0,r,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,e.tilePositionX%e.displayFrame.width/e.displayFrame.width,e.tilePositionY%e.displayFrame.height/e.displayFrame.height,i,n,!1,l)}}},8630:(t,e,i)=>{var s=i(56694),n=i(82897),r=i(64937),o=i(56631),a=i(97081),h=i(33963),l=i(89980),u=i(76038),c=i(76583),d=i(77974),p=i(83392),f=new s({Extends:l,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.FX,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,d],initialize:function(t,e,i,s){l.call(this,t,"Video"),this.video=null,this.videoTexture=null,this.videoTextureSource=null,this.snapshotTexture=null,this.flipY=!1,this._key=c(),this.touchLocked=!0,this.playWhenUnlocked=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={play:this.playHandler.bind(this),load:this.loadHandler.bind(this),error:this.loadErrorHandler.bind(this),end:this.completeHandler.bind(this),time:this.timeUpdateHandler.bind(this),seeking:this.seekingHandler.bind(this),seeked:this.seekedHandler.bind(this)},this._crop=this.resetCropObject(),this.markers={},this._markerIn=-1,this._markerOut=p.MAX_SAFE_INTEGER,this._lastUpdate=0,this._cacheKey="",this._isSeeking=!1,this.removeVideoElementOnDestroy=!1,this.setPosition(e,i),this.setSize(256,256),this.initPipeline(),s&&this.changeSource(s,!1);var n=t.sys.game.events;n.on(a.PAUSE,this.globalPause,this),n.on(a.RESUME,this.globalResume,this);var r=t.sys.sound;r&&r.on(u.GLOBAL_MUTE,this.globalMute,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},play:function(t,e,i){if(this.touchLocked&&this.playWhenUnlocked||this.isPlaying())return this;var s=this.video;if(!s)return console.warn("Video not loaded"),this;void 0===t&&(t=s.loop);var n=this.scene.sys.sound;return n&&n.mute&&this.setMute(!0),isNaN(e)||(this._markerIn=e),!isNaN(i)&&i>e&&(this._markerOut=i),s.loop=t,this.createPlayPromise()},createPlayPromise:function(){var t=this.video,e=this._callbacks;this.isPlaying();var i=t.play();return void 0!==i?i.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)):(t.addEventListener("playing",e.play),t.readyState<2&&(this.retry=this.retryLimit,this._retryID&&window.clearTimeout(this._retryID),this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))),t.addEventListener("error",e.error),t.addEventListener("abort",e.error),t.addEventListener("stalled",e.error),t.addEventListener("suspend",e.error),t.addEventListener("waiting",e.error),t.addEventListener("ended",e.end),t.addEventListener("timeupdate",e.time),t.addEventListener("seeking",e.seeking),t.addEventListener("seeked",e.seeked),t.addEventListener("play",this.playHandler2.bind(this)),t.addEventListener("pause",this.pauseHandler.bind(this)),this},playHandler2:function(t){console.log("play",this._cacheKey)},pauseHandler:function(t){console.log("paused",this._cacheKey)},changeSource:function(t,e,i,s,n){void 0===e&&(e=!0),this.video&&this.stop();var r=this.scene.sys.cache.video.get(t);return r?(this.video=r,this._cacheKey=t,this._codePaused=r.paused,this._codeMuted=r.muted,this.videoTexture?(this.scene.sys.textures.remove(this._key),this.videoTexture=this.scene.sys.textures.create(this._key,r,r.videoWidth,r.videoHeight),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,r.videoWidth,r.videoHeight),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,r.videoWidth,r.videoHeight)):this.updateTexture(),r.currentTime=0,this._lastUpdate=0,e&&this.play(i,s,n)):this.video=null,this},addMarker:function(t,e,i){return!isNaN(e)&&e>=0&&!isNaN(i)&&(this.markers[t]=[e,i]),this},playMarker:function(t,e){var i=this.markers[t];return i&&this.play(e,i[0],i[1]),this},removeMarker:function(t){return delete this.markers[t],this},snapshot:function(t,e){return void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.snapshotArea(0,0,this.width,this.height,t,e)},snapshotArea:function(t,e,i,s,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===s&&(s=this.height),void 0===n&&(n=i),void 0===r&&(r=s);var o=this.video,a=this.snapshotTexture;return a?(a.setSize(n,r),o&&a.context.drawImage(o,t,e,i,s,0,0,n,r)):(a=this.scene.sys.textures.createCanvas(c(),n,r),this.snapshotTexture=a,o&&a.context.drawImage(o,t,e,i,s,0,0,n,r)),a.update()},saveSnapshotTexture:function(t){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,t):this.snapshotTexture=this.scene.sys.textures.createCanvas(t,this.width,this.height),this.snapshotTexture},loadURL:function(t,e,i,s){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var n=document.createElement("video");return n.controls=!1,i&&(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")),n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),void 0!==s&&n.setAttribute("crossorigin",s),n.addEventListener("error",this._callbacks.error),n.addEventListener(e,this._callbacks.load),n.src=t,n.load(),this.video=n,this},loadMediaStream:function(t,e,i){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var s=document.createElement("video");s.controls=!1,i&&(s.muted=!0,s.defaultMuted=!0,s.setAttribute("autoplay","autoplay")),s.setAttribute("playsinline","playsinline"),s.setAttribute("preload","auto"),s.addEventListener("error",this._callbacks.error,!0),s.addEventListener(e,this._callbacks.load,!0);try{s.srcObject=t}catch(e){s.src=window.URL.createObjectURL(t)}return s.load(),this.video=s,this},playPromiseSuccessHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn)},playPromiseErrorHandler:function(t){console.log("pp error handler",t),this.scene.sys.input.once(h.POINTER_DOWN,this.unlockHandler,this),this.touchLocked=!0,this.playWhenUnlocked=!0,this.emit(o.VIDEO_ERROR,this,t)},playHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this.video.removeEventListener("playing",this._callbacks.play,!0)},loadHandler:function(){this.updateTexture()},loadErrorHandler:function(t){this.stop(),this.emit(o.VIDEO_ERROR,this,t)},unlockHandler:function(){this.touchLocked=!1,this.playWhenUnlocked=!1,this.emit(o.VIDEO_UNLOCKED,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn),this.createPlayPromise()},completeHandler:function(){console.log("ended"),this.emit(o.VIDEO_COMPLETE,this)},timeUpdateHandler:function(){this.video&&this.video.currentTime=this._markerOut&&(t.loop?(t.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=e,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),console.log("prEUp stop"),this.stop())))}},checkVideoProgress:function(){this.video.readyState>=2?this.updateTexture():(this.retry--,this.retry>0?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):this.emit(o.VIDEO_TIMEOUT,this))},updateTexture:function(){var t=this.video,e=t.videoWidth,i=t.videoHeight;if(this.videoTexture){var s=this.videoTextureSource;s.source!==t&&(s.source=t,s.width=e,s.height=i),s.update()}else this.videoTexture=this.scene.sys.textures.create(this._key,t,e,i),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,e,i),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,e,i)},getVideoKey:function(){return this._cacheKey},seekTo:function(t){var e=this.video;if(e){var i=e.duration;if(i!==1/0&&!isNaN(i)){var s=i*t;this.setCurrentTime(s)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e=this.video;if(e){if("string"==typeof t){var i=t[0],s=parseFloat(t.substr(1));"+"===i?t=e.currentTime+s:"-"===i&&(t=e.currentTime-s)}e.currentTime=t,this._lastUpdate=t}return this},isSeeking:function(){return this._isSeeking},seekingHandler:function(){this._isSeeking=!0,this.emit(o.VIDEO_SEEKING,this)},seekedHandler:function(){this._isSeeking=!1,this.emit(o.VIDEO_SEEKED,this),this.video&&this.updateTexture()},getProgress:function(){var t=this.video;if(t){var e=t.currentTime,i=t.duration;if(i!==1/0&&!isNaN(i))return e/i}return 0},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){void 0===t&&(t=!0),this._codeMuted=t;var e=this.video;return e&&(e.muted=!!this._systemMuted||t),this},isMuted:function(){return this._codeMuted},globalMute:function(t,e){this._systemMuted=e;var i=this.video;i&&(i.muted=!!this._codeMuted||e)},globalPause:function(){this._systemPaused=!0,this.video&&this.video.pause()},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&this.createPlayPromise()},setPaused:function(t){void 0===t&&(t=!0);var e=this.video;return this._codePaused=t,e&&(t?e.paused||e.pause():t||e.paused&&!this._systemPaused&&this.createPlayPromise()),this},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(t){return void 0===t&&(t=1),this.video&&(this.video.volume=n(t,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(t){return this.video&&(this.video.playbackRate=t),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(t){return void 0===t&&(t=!0),this.video&&(this.video.loop=t),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!1),this.videoTexture&&this.scene.sys.textures.renameTexture(this._key,t),this._key=t,this.flipY=e,this.videoTextureSource&&this.videoTextureSource.setFlipY(e),this.videoTexture},stop:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.removeEventListener(i,e[i]);t.pause()}return this._retryID&&window.clearTimeout(this._retryID),this.emit(o.VIDEO_STOP,this),this},removeVideoElement:function(){var t=this.video;if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("autoplay"),t.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(),this.removeVideoElementOnDestroy&&this.removeVideoElement();var t=this.scene.sys.game.events;t.off(a.PAUSE,this.globalPause,this),t.off(a.RESUME,this.globalResume,this);var e=this.scene.sys.sound;e&&e.off(u.GLOBAL_MUTE,this.globalMute,this),this._retryID&&window.clearTimeout(this._retryID)}});t.exports=f},56933:t=>{t.exports=function(t,e,i,s){e.videoTexture&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,s))}},65601:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(8630);n.register("video",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=new o(this.scene,0,0,i);return void 0!==e&&(t.add=e),s(this.scene,n,t),n}))},215:(t,e,i)=>{var s=i(8630);i(61286).register("video",(function(t,e,i){return this.displayList.add(new s(this.scene,t,e,i))}))},77974:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(83572),r=i(56933),t.exports={renderWebGL:n,renderCanvas:r}},83572:t=>{t.exports=function(t,e,i,s){e.videoTexture&&(i.addToRenderList(e),e.pipeline.batchSprite(e,i,s))}},71030:(t,e,i)=>{var s=i(95723),n=i(26673),r=i(65650),o=i(56694),a=i(64937),h=i(89980),l=i(74118),u=i(94287),c=new o({Extends:h,Mixins:[a.Depth,a.GetBounds,a.Origin,a.Transform,a.ScrollFactor,a.Visible],initialize:function(t,e,i,n,r){void 0===n&&(n=1),void 0===r&&(r=n),h.call(this,t,"Zone"),this.setPosition(e,i),this.width=n,this.height=r,this.blendMode=s.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e,i){void 0===i&&(i=!0),this.width=t,this.height=e,this.updateDisplayOrigin();var s=this.input;return i&&s&&!s.customHitArea&&(s.hitArea.width=t,s.hitArea.height=e),this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},setCircleDropZone:function(t){return this.setDropZone(new n(0,0,t),r)},setRectangleDropZone:function(t,e){return this.setDropZone(new l(0,0,t,e),u)},setDropZone:function(t,e){return this.input||this.setInteractive(t,e,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(t,e,i){i.addToRenderList(e)},renderWebGL:function(t,e,i){i.addToRenderList(e)}});t.exports=c},24067:(t,e,i)=>{var s=i(99325),n=i(20494),r=i(71030);s.register("zone",(function(t){var e=n(t,"x",0),i=n(t,"y",0),s=n(t,"width",1),o=n(t,"height",s);return new r(this.scene,e,i,s,o)}))},34546:(t,e,i)=>{var s=i(71030);i(61286).register("zone",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},95847:t=>{t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},26673:(t,e,i)=>{var s=i(56694),n=i(65650),r=i(94026),o=i(62941),a=i(52394),h=i(30977),l=new s({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.type=a.CIRCLE,this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=l},37964:t=>{t.exports=function(t){return Math.PI*t.radius*2}},72233:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x+t.radius*Math.cos(e),i.y=t.y+t.radius*Math.sin(e),i}},61761:(t,e,i)=>{var s=i(26673);t.exports=function(t){return new s(t.x,t.y,t.radius)}},65650:t=>{t.exports=function(t,e,i){return t.radius>0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},39187:(t,e,i)=>{var s=i(65650);t.exports=function(t,e){return s(t,e.x,e.y)}},58672:(t,e,i)=>{var s=i(65650);t.exports=function(t,e){return s(t,e.x,e.y)&&s(t,e.right,e.y)&&s(t,e.x,e.bottom)&&s(t,e.right,e.bottom)}},42997:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},94894:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},48027:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},94026:(t,e,i)=>{var s=i(72233),n=i(91806),r=i(83392),o=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=n(e,0,r.PI2);return s(t,a,i)}},62941:(t,e,i)=>{var s=i(37964),n=i(72233),r=i(91806),o=i(83392);t.exports=function(t,e,i,a){void 0===a&&(a=[]),!e&&i>0&&(e=s(t)/i);for(var h=0;h{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},88665:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},30977:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=2*Math.PI*Math.random(),n=Math.random()+Math.random(),r=n>1?2-n:n,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},6112:(t,e,i)=>{var s=i(26673);s.Area=i(95847),s.Circumference=i(37964),s.CircumferencePoint=i(72233),s.Clone=i(61761),s.Contains=i(65650),s.ContainsPoint=i(39187),s.ContainsRect=i(58672),s.CopyFrom=i(42997),s.Equals=i(94894),s.GetBounds=i(48027),s.GetPoint=i(94026),s.GetPoints=i(62941),s.Offset=i(34585),s.OffsetPoint=i(88665),s.Random=i(30977),t.exports=s},52394:t=>{t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},58605:t=>{t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},39507:t=>{t.exports=function(t){var e=t.width/2,i=t.height/2,s=Math.pow(e-i,2)/Math.pow(e+i,2);return Math.PI*(e+i)*(1+3*s/(10+Math.sqrt(4-3*s)))}},86998:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.width/2,r=t.height/2;return i.x=t.x+n*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},81773:(t,e,i)=>{var s=i(95669);t.exports=function(t){return new s(t.x,t.y,t.width,t.height)}},72313:t=>{t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var s=(e-t.x)/t.width,n=(i-t.y)/t.height;return(s*=s)+(n*=n)<.25}},34368:(t,e,i)=>{var s=i(72313);t.exports=function(t,e){return s(t,e.x,e.y)}},71431:(t,e,i)=>{var s=i(72313);t.exports=function(t,e){return s(t,e.x,e.y)&&s(t,e.right,e.y)&&s(t,e.x,e.bottom)&&s(t,e.right,e.bottom)}},75459:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},95669:(t,e,i)=>{var s=i(56694),n=i(72313),r=i(95340),o=i(54978),a=i(52394),h=i(72006),l=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=l},98068:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},72897:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},95340:(t,e,i)=>{var s=i(86998),n=i(91806),r=i(83392),o=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=n(e,0,r.PI2);return s(t,a,i)}},54978:(t,e,i)=>{var s=i(39507),n=i(86998),r=i(91806),o=i(83392);t.exports=function(t,e,i,a){void 0===a&&(a=[]),!e&&i>0&&(e=s(t)/i);for(var h=0;h{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},36233:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},72006:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random()*Math.PI*2,n=Math.sqrt(Math.random());return e.x=t.x+n*Math.cos(i)*t.width/2,e.y=t.y+n*Math.sin(i)*t.height/2,e}},40652:(t,e,i)=>{var s=i(95669);s.Area=i(58605),s.Circumference=i(39507),s.CircumferencePoint=i(86998),s.Clone=i(81773),s.Contains=i(72313),s.ContainsPoint=i(34368),s.ContainsRect=i(71431),s.CopyFrom=i(75459),s.Equals=i(98068),s.GetBounds=i(72897),s.GetPoint=i(95340),s.GetPoints=i(54978),s.Offset=i(77951),s.OffsetPoint=i(36233),s.Random=i(72006),t.exports=s},84068:(t,e,i)=>{var s=i(52394),n=i(98611),r={Circle:i(6112),Ellipse:i(40652),Intersects:i(7563),Line:i(28482),Mesh:i(14293),Point:i(63472),Polygon:i(44359),Rectangle:i(66658),Triangle:i(87619)};r=n(!1,r,s),t.exports=r},22184:(t,e,i)=>{var s=i(53996);t.exports=function(t,e){return s(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},26535:t=>{t.exports=function(t,e){var i=e.width/2,s=e.height/2,n=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-s),o=i+t.radius,a=s+t.radius;if(n>o||r>a)return!1;if(n<=i||r<=s)return!0;var h=n-i,l=r-s;return h*h+l*l<=t.radius*t.radius}},71145:(t,e,i)=>{var s=i(79967),n=i(22184);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r,o,a,h,l=t.x,u=t.y,c=t.radius,d=e.x,p=e.y,f=e.radius;if(u===p)0===(a=(o=-2*p)*o-4*(r=1)*(d*d+(h=(f*f-c*c-d*d+l*l)/(2*(l-d)))*h-2*d*h+p*p-f*f))?i.push(new s(h,-o/(2*r))):a>0&&(i.push(new s(h,(-o+Math.sqrt(a))/(2*r))),i.push(new s(h,(-o-Math.sqrt(a))/(2*r))));else{var v=(l-d)/(u-p),g=(f*f-c*c-d*d+l*l-p*p+u*u)/(2*(u-p));0===(a=(o=2*u*v-2*g*v-2*l)*o-4*(r=v*v+1)*(l*l+u*u+g*g-c*c-2*u*g))?(h=-o/(2*r),i.push(new s(h,g-h*v))):a>0&&(h=(-o+Math.sqrt(a))/(2*r),i.push(new s(h,g-h*v)),h=(-o-Math.sqrt(a))/(2*r),i.push(new s(h,g-h*v)))}}return i}},62508:(t,e,i)=>{var s=i(26111),n=i(26535);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC(),h=e.getLineD();s(r,t,i),s(o,t,i),s(a,t,i),s(h,t,i)}return i}},26111:(t,e,i)=>{var s=i(79967),n=i(61472);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r,o,a=t.x1,h=t.y1,l=t.x2,u=t.y2,c=e.x,d=e.y,p=e.radius,f=l-a,v=u-h,g=a-c,m=h-d,y=f*f+v*v,x=2*(f*g+v*m),T=x*x-4*y*(g*g+m*m-p*p);if(0===T){var w=-x/(2*y);r=a+w*f,o=h+w*v,w>=0&&w<=1&&i.push(new s(r,o))}else if(T>0){var b=(-x-Math.sqrt(T))/(2*y);r=a+b*f,o=h+b*v,b>=0&&b<=1&&i.push(new s(r,o));var E=(-x+Math.sqrt(T))/(2*y);r=a+E*f,o=h+E*v,E>=0&&E<=1&&i.push(new s(r,o))}}return i}},96537:(t,e,i)=>{var s=i(70015);t.exports=function(t,e,i,n){void 0===i&&(i=!1);var r,o,a,h=t.x1,l=t.y1,u=t.x2,c=t.y2,d=e.x1,p=e.y1,f=u-h,v=c-l,g=e.x2-d,m=e.y2-p,y=f*m-v*g;if(0===y)return!1;if(i){if((o=(d+g*(r=(f*(p-l)+v*(h-d))/(g*v-m*f))-h)/f)<0||r<0||r>1)return null;a=o}else{if(o=((l-p)*f-(h-d)*v)/y,(r=((d-h)*m-(p-l)*g)/y)<0||r>1||o<0||o>1)return null;a=r}return void 0===n&&(n=new s),n.set(h+f*a,l+v*a,a)}},17647:(t,e,i)=>{var s=i(96537),n=i(88829),r=i(70015),o=new n,a=new r;t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=new r);var h=!1;n.set(),a.set();for(var l=e[0],u=1;u{var s=i(70015),n=i(51729),r=i(17647),o=new s;t.exports=function(t,e,i,s){void 0===s&&(s=new n),Array.isArray(e)||(e=[e]);var a=!1;s.set(),o.set();for(var h=0;h{var s=i(79967),n=i(25227),r=i(47910);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e))for(var o=e.getLineA(),a=e.getLineB(),h=e.getLineC(),l=e.getLineD(),u=[new s,new s,new s,new s],c=[n(o,t,u[0]),n(a,t,u[1]),n(h,t,u[2]),n(l,t,u[3])],d=0;d<4;d++)c[d]&&i.push(u[d]);return i}},7449:(t,e,i)=>{var s=i(51729),n=i(68439),r=new(i(88829));function o(t,e,i,o,a){var h=Math.cos(t),l=Math.sin(t);r.setTo(e,i,e+h,i+l);var u=n(r,o,!0);u&&a.push(new s(u.x,u.y,t,u.w))}function a(t,e){return t.z-e.z}t.exports=function(t,e,i){Array.isArray(i)||(i=[i]);for(var s=[],n=[],r=0;r{var s=i(74118),n=i(90205);t.exports=function(t,e,i){return void 0===i&&(i=new s),n(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},1946:(t,e,i)=>{var s=i(9569),n=i(90205);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC(),h=t.getLineD();s(r,e,i),s(o,e,i),s(a,e,i),s(h,e,i)}return i}},34211:(t,e,i)=>{var s=i(20370),n=i(9569);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();n(r,t,i),n(o,t,i),n(a,t,i)}return i}},80511:(t,e,i)=>{var s=i(26111),n=i(48411);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();s(r,e,i),s(o,e,i),s(a,e,i)}return i}},31343:(t,e,i)=>{var s=i(79967),n=i(86117),r=i(25227);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e))for(var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=[new s,new s,new s],u=[r(o,e,l[0]),r(a,e,l[1]),r(h,e,l[2])],c=0;c<3;c++)u[c]&&i.push(l[c]);return i}},70534:(t,e,i)=>{var s=i(23589),n=i(31343);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();n(t,r,i),n(t,o,i),n(t,a,i)}return i}},61472:(t,e,i)=>{var s=i(65650),n=new(i(79967));t.exports=function(t,e,i){if(void 0===i&&(i=n),s(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(s(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,c=o;if(l>0){var d=(a*r+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*o>=0&&s(e,i.x,i.y)}},25227:t=>{t.exports=function(t,e,i){var s=t.x1,n=t.y1,r=t.x2,o=t.y2,a=e.x1,h=e.y1,l=e.x2,u=e.y2,c=(u-h)*(r-s)-(l-a)*(o-n);if(0===c)return!1;var d=((l-a)*(n-h)-(u-h)*(s-a))/c,p=((r-s)*(n-h)-(o-n)*(s-a))/c;return d>=0&&d<=1&&p>=0&&p<=1&&(i&&(i.x=s+d*(r-s),i.y=n+d*(o-n)),!0)}},47910:t=>{t.exports=function(t,e){var i=t.x1,s=t.y1,n=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,l=e.bottom,u=0;if(i>=o&&i<=h&&s>=a&&s<=l||n>=o&&n<=h&&r>=a&&r<=l)return!0;if(i=o){if((u=s+(r-s)*(o-i)/(n-i))>a&&u<=l)return!0}else if(i>h&&n<=h&&(u=s+(r-s)*(h-i)/(n-i))>=a&&u<=l)return!0;if(s=a){if((u=i+(n-i)*(a-s)/(r-s))>=o&&u<=h)return!0}else if(s>l&&r<=l&&(u=i+(n-i)*(l-s)/(r-s))>=o&&u<=h)return!0;return!1}},34426:t=>{t.exports=function(t,e,i){void 0===i&&(i=1);var s=e.x1,n=e.y1,r=e.x2,o=e.y2,a=t.x,h=t.y,l=(r-s)*(r-s)+(o-n)*(o-n);if(0===l)return!1;var u=((a-s)*(r-s)+(h-n)*(o-n))/l;if(u<0)return Math.sqrt((s-a)*(s-a)+(n-h)*(n-h))<=i;if(u>=0&&u<=1){var c=((n-h)*(r-s)-(s-a)*(o-n))/l;return Math.abs(c)*Math.sqrt(l)<=i}return Math.sqrt((r-a)*(r-a)+(o-h)*(o-h))<=i}},81414:(t,e,i)=>{var s=i(34426);t.exports=function(t,e){if(!s(t,e))return!1;var i=Math.min(e.x1,e.x2),n=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=n&&t.y>=r&&t.y<=o}},90205:t=>{t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0)&&!(t.righte.right||t.y>e.bottom)}},20370:(t,e,i)=>{var s=i(25227),n=i(94287),r=i(86875),o=i(87279);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},8786:t=>{t.exports=function(t,e,i,s,n,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||n{var s=i(61472),n=i(60689);t.exports=function(t,e){return!(t.left>e.right||t.righte.bottom||t.bottom{var s=i(25227);t.exports=function(t,e){return!(!t.contains(e.x1,e.y1)&&!t.contains(e.x2,e.y2))||(!!s(t.getLineA(),e)||(!!s(t.getLineB(),e)||!!s(t.getLineC(),e)))}},23589:(t,e,i)=>{var s=i(86875),n=i(18680),r=i(25227);t.exports=function(t,e){if(t.left>e.right||t.righte.bottom||t.bottom0||(c=n(e),(d=s(t,c,!0)).length>0)}},7563:(t,e,i)=>{t.exports={CircleToCircle:i(22184),CircleToRectangle:i(26535),GetCircleToCircle:i(71145),GetCircleToRectangle:i(62508),GetLineToCircle:i(26111),GetLineToLine:i(96537),GetLineToPoints:i(17647),GetLineToPolygon:i(68439),GetLineToRectangle:i(9569),GetRaysFromPointToPolygon:i(7449),GetRectangleIntersection:i(82931),GetRectangleToRectangle:i(1946),GetRectangleToTriangle:i(34211),GetTriangleToCircle:i(80511),GetTriangleToLine:i(31343),GetTriangleToTriangle:i(70534),LineToCircle:i(61472),LineToLine:i(25227),LineToRectangle:i(47910),PointToLine:i(34426),PointToLineSegment:i(81414),RectangleToRectangle:i(90205),RectangleToTriangle:i(20370),RectangleToValues:i(8786),TriangleToCircle:i(48411),TriangleToLine:i(86117),TriangleToTriangle:i(23589)}},50599:t=>{t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},58813:t=>{t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=[]);var s=Math.round(t.x1),n=Math.round(t.y1),r=Math.round(t.x2),o=Math.round(t.y2),a=Math.abs(r-s),h=Math.abs(o-n),l=s-h&&(c-=h,s+=l),p{t.exports=function(t,e,i){var s=e-(t.x1+t.x2)/2,n=i-(t.y1+t.y2)/2;return t.x1+=s,t.y1+=n,t.x2+=s,t.y2+=n,t}},26718:(t,e,i)=>{var s=i(88829);t.exports=function(t){return new s(t.x1,t.y1,t.x2,t.y2)}},88930:t=>{t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},90656:t=>{t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},30897:(t,e,i)=>{var s=i(16028);t.exports=function(t,e,i){void 0===i&&(i=e);var n=s(t),r=t.x2-t.x1,o=t.y2-t.y1;return e&&(t.x1=t.x1-r/n*e,t.y1=t.y1-o/n*e),i&&(t.x2=t.x2+r/n*i,t.y2=t.y2+o/n*i),t}},30684:(t,e,i)=>{var s=i(92951),n=i(21902),r=i(79967);t.exports=function(t,e,i,o,a){void 0===o&&(o=0),void 0===a&&(a=[]);var h,l,u=[],c=t.x1,d=t.y1,p=t.x2-c,f=t.y2-d,v=n(e,a),g=i-1;for(h=0;h0){var m=u[0],y=[m];for(h=1;h=o&&(y.push(x),m=x)}var T=u[u.length-1];return s(m,T){var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},11222:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.x1,r=t.y1,o=t.x2,a=t.y2,h=(o-n)*(o-n)+(a-r)*(a-r);if(0===h)return i;var l=((e.x-n)*(o-n)+(e.y-r)*(a-r))/h;return i.x=n+l*(o-n),i.y=r+l*(a-r),i}},7377:(t,e,i)=>{var s=i(83392),n=i(50599),r=i(79967);t.exports=function(t,e){void 0===e&&(e=new r);var i=n(t)-s.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},66464:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},8570:(t,e,i)=>{var s=i(16028),n=i(79967);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(e=s(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u{t.exports=function(t,e){var i=t.x1,s=t.y1,n=t.x2,r=t.y2,o=(n-i)*(n-i)+(r-s)*(r-s);if(0===o)return!1;var a=((s-e.y)*(n-i)-(i-e.x)*(r-s))/o;return Math.abs(a)*Math.sqrt(o)}},82996:t=>{t.exports=function(t){return Math.abs(t.y1-t.y2)}},16028:t=>{t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},88829:(t,e,i)=>{var s=i(56694),n=i(66464),r=i(8570),o=i(52394),a=i(74077),h=i(93736),l=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=o.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=s},getPoint:function(t,e){return n(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},73273:(t,e,i)=>{var s=i(83392),n=i(1071),r=i(50599);t.exports=function(t){var e=r(t)-s.TAU;return n(e,-Math.PI,Math.PI)}},96936:(t,e,i)=>{var s=i(83392),n=i(50599);t.exports=function(t){return Math.cos(n(t)-s.TAU)}},43581:(t,e,i)=>{var s=i(83392),n=i(50599);t.exports=function(t){return Math.sin(n(t)-s.TAU)}},13990:t=>{t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},1298:t=>{t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},74077:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},30473:(t,e,i)=>{var s=i(50599),n=i(73273);t.exports=function(t,e){return 2*n(e)-Math.PI-s(t)}},25968:(t,e,i)=>{var s=i(1809);t.exports=function(t,e){var i=(t.x1+t.x2)/2,n=(t.y1+t.y2)/2;return s(t,i,n,e)}},24296:(t,e,i)=>{var s=i(1809);t.exports=function(t,e,i){return s(t,e.x,e.y,i)}},1809:t=>{t.exports=function(t,e,i,s){var n=Math.cos(s),r=Math.sin(s),o=t.x1-e,a=t.y1-i;return t.x1=o*n-a*r+e,t.y1=o*r+a*n+i,o=t.x2-e,a=t.y2-i,t.x2=o*n-a*r+e,t.y2=o*r+a*n+i,t}},88171:t=>{t.exports=function(t,e,i,s,n){return t.x1=e,t.y1=i,t.x2=e+Math.cos(s)*n,t.y2=i+Math.sin(s)*n,t}},82797:t=>{t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},41067:t=>{t.exports=function(t){return Math.abs(t.x1-t.x2)}},28482:(t,e,i)=>{var s=i(88829);s.Angle=i(50599),s.BresenhamPoints=i(58813),s.CenterOn=i(88513),s.Clone=i(26718),s.CopyFrom=i(88930),s.Equals=i(90656),s.Extend=i(30897),s.GetEasedPoints=i(30684),s.GetMidPoint=i(20487),s.GetNearestPoint=i(11222),s.GetNormal=i(7377),s.GetPoint=i(66464),s.GetPoints=i(8570),s.GetShortestDistance=i(65269),s.Height=i(82996),s.Length=i(16028),s.NormalAngle=i(73273),s.NormalX=i(96936),s.NormalY=i(43581),s.Offset=i(13990),s.PerpSlope=i(1298),s.Random=i(74077),s.ReflectAngle=i(30473),s.Rotate=i(25968),s.RotateAroundPoint=i(24296),s.RotateAroundXY=i(1809),s.SetToAngle=i(88171),s.Slope=i(82797),s.Width=i(41067),t.exports=s},18693:(t,e,i)=>{var s=i(56694),n=i(74118),r=i(93736);function o(t,e,i,s){var n=t-i,r=e-s,o=n*n+r*r;return Math.sqrt(o)}var a=new s({initialize:function(t,e,i){this.vertex1=t,this.vertex2=e,this.vertex3=i,this.bounds=new n,this._inCenter=new r},getInCenter:function(t){void 0===t&&(t=!0);var e,i,s,n,r,a,h=this.vertex1,l=this.vertex2,u=this.vertex3;t?(e=h.x,i=h.y,s=l.x,n=l.y,r=u.x,a=u.y):(e=h.vx,i=h.vy,s=l.vx,n=l.vy,r=u.vx,a=u.vy);var c=o(r,a,s,n),d=o(e,i,r,a),p=o(s,n,e,i),f=c+d+p;return this._inCenter.set((e*c+s*d+r*p)/f,(i*c+n*d+a*p)/f)},contains:function(t,e,i){var s=this.vertex1,n=this.vertex2,r=this.vertex3,o=s.vx,a=s.vy,h=n.vx,l=n.vy,u=r.vx,c=r.vy;if(i){var d=i.a,p=i.b,f=i.c,v=i.d,g=i.e,m=i.f;o=s.vx*d+s.vy*f+g,a=s.vx*p+s.vy*v+m,h=n.vx*d+n.vy*f+g,l=n.vx*p+n.vy*v+m,u=r.vx*d+r.vy*f+g,c=r.vx*p+r.vy*v+m}var y=u-o,x=c-a,T=h-o,w=l-a,b=t-o,E=e-a,S=y*y+x*x,A=y*T+x*w,_=y*b+x*E,C=T*T+w*w,M=T*b+w*E,R=S*C-A*A,P=0===R?0:1/R,O=(C*_-A*M)*P,L=(S*M-A*_)*P;return O>=0&&L>=0&&O+L<1},isCounterClockwise:function(t){var e=this.vertex1,i=this.vertex2,s=this.vertex3,n=(i.vx-e.vx)*(s.vy-e.vy)-(i.vy-e.vy)*(s.vx-e.vx);return t<=0?n>=0:n<0},load:function(t,e,i,s,n){return i=this.vertex1.load(t,e,i,s,n),i=this.vertex2.load(t,e,i,s,n),i=this.vertex3.load(t,e,i,s,n)},transformCoordinatesLocal:function(t,e,i,s){return this.vertex1.transformCoordinatesLocal(t,e,i,s),this.vertex2.transformCoordinatesLocal(t,e,i,s),this.vertex3.transformCoordinatesLocal(t,e,i,s),this},updateBounds:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3,s=this.bounds;return s.x=Math.min(t.vx,e.vx,i.vx),s.y=Math.min(t.vy,e.vy,i.vy),s.width=Math.max(t.vx,e.vx,i.vx)-s.x,s.height=Math.max(t.vy,e.vy,i.vy)-s.y,this},isInView:function(t,e,i,s,n,r,o,a,h,l,u){this.update(s,n,r,o,a,h,l,u);var c=this.vertex1,d=this.vertex2,p=this.vertex3;if(c.ta<=0&&d.ta<=0&&p.ta<=0)return!1;if(e&&!this.isCounterClockwise(i))return!1;var f=this.bounds;f.x=Math.min(c.tx,d.tx,p.tx),f.y=Math.min(c.ty,d.ty,p.ty),f.width=Math.max(c.tx,d.tx,p.tx)-f.x,f.height=Math.max(c.ty,d.ty,p.ty)-f.y;var v=t.x+t.width,g=t.y+t.height;return!(f.width<=0||f.height<=0||t.width<=0||t.height<=0)&&!(f.rightv||f.y>g)},update:function(t,e,i,s,n,r,o,a){return this.vertex1.update(e,i,s,n,r,o,a,t),this.vertex2.update(e,i,s,n,r,o,a,t),this.vertex3.update(e,i,s,n,r,o,a,t),this},translate:function(t,e){void 0===e&&(e=0);var i=this.vertex1,s=this.vertex2,n=this.vertex3;return i.x+=t,i.y+=e,s.x+=t,s.y+=e,n.x+=t,n.y+=e,this},x:{get:function(){return this.getInCenter().x},set:function(t){var e=this.getInCenter();this.translate(t-e.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(t){var e=this.getInCenter();this.translate(0,t-e.y)}},alpha:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.alpha+e.alpha+i.alpha)/3},set:function(t){this.vertex1.alpha=t,this.vertex2.alpha=t,this.vertex3.alpha=t}},depth:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.vz+e.vz+i.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});t.exports=a},99425:(t,e,i)=>{var s=i(18693),n=i(72632),r=i(16650),o=i(70015),a=i(85769),h=new o,l=new o,u=new r;t.exports=function(t){var e=n(t,"mesh"),i=n(t,"texture",null),r=n(t,"frame"),o=n(t,"width",1),c=n(t,"height",o),d=n(t,"widthSegments",1),p=n(t,"heightSegments",d),f=n(t,"x",0),v=n(t,"y",0),g=n(t,"z",0),m=n(t,"rotateX",0),y=n(t,"rotateY",0),x=n(t,"rotateZ",0),T=n(t,"zIsUp",!0),w=n(t,"isOrtho",!!e&&e.dirtyCache[11]),b=n(t,"colors",[16777215]),E=n(t,"alphas",[1]),S=n(t,"tile",!1),A=n(t,"flipY",!1),_=n(t,"width",null),C={faces:[],verts:[]};if(h.set(f,v,g),l.set(m,y,x),u.fromRotationXYTranslation(l,h,T),!i&&e)i=e.texture;else if(e&&"string"==typeof i)i=e.scene.sys.textures.get(i);else if(!i)return C;var M=i.get(r);!_&&w&&i&&e&&(o=M.width/e.height,c=M.height/e.height);var R,P,O=o/2,L=c/2,F=Math.floor(d),D=Math.floor(p),k=F+1,I=D+1,B=o/F,N=c/D,Y=[],U=[],X=0,z=1,G=0,V=1;M&&(X=M.u0,z=M.u1,A?(G=M.v1,V=M.v0):(G=M.v0,V=M.v1));var W=z-X,H=V-G;for(P=0;P{var s=i(18693),n=i(16650),r=i(70015),o=i(85769),a=new r,h=new r,l=new n;t.exports=function(t,e,i,n,r,u,c,d,p,f){void 0===i&&(i=1),void 0===n&&(n=0),void 0===r&&(r=0),void 0===u&&(u=0),void 0===c&&(c=0),void 0===d&&(d=0),void 0===p&&(p=0),void 0===f&&(f=!0);var v={faces:[],verts:[]},g=t.materials;a.set(n,r,u),h.set(c,d,p),l.fromRotationXYTranslation(h,a,f);for(var m=0;m{var s=i(18693),n=i(85769);t.exports=function(t,e,i,r,o,a,h){if(void 0===r&&(r=!1),void 0===a&&(a=16777215),void 0===h&&(h=1),t.length===e.length){var l,u,c,d,p,f,v,g,m,y,x,T={faces:[],vertices:[]},w=r?3:2,b=Array.isArray(a),E=Array.isArray(h);if(Array.isArray(i)&&i.length>0)for(l=0;l{var e=!0,i="untitled",s="",n="";function r(t){var e=t.indexOf("#");return e>-1?t.substring(0,e):t}function o(t){return 0===t.models.length&&t.models.push({faces:[],name:i,textureCoords:[],vertexNormals:[],vertices:[]}),s="",t.models[t.models.length-1]}function a(t,e){var n=t.length>=2?t[1]:i;e.models.push({faces:[],name:n,textureCoords:[],vertexNormals:[],vertices:[]}),s=""}function h(t){2===t.length&&(s=t[1])}function l(t,e){var i=t.length,s=i>=2?parseFloat(t[1]):0,n=i>=3?parseFloat(t[2]):0,r=i>=4?parseFloat(t[3]):0;o(e).vertices.push({x:s,y:n,z:r})}function u(t,i){var s=t.length,n=s>=2?parseFloat(t[1]):0,r=s>=3?parseFloat(t[2]):0,a=s>=4?parseFloat(t[3]):0;isNaN(n)&&(n=0),isNaN(r)&&(r=0),isNaN(a)&&(a=0),e&&(r=1-r),o(i).textureCoords.push({u:n,v:r,w:a})}function c(t,e){var i=t.length,s=i>=2?parseFloat(t[1]):0,n=i>=3?parseFloat(t[2]):0,r=i>=4?parseFloat(t[3]):0;o(e).vertexNormals.push({x:s,y:n,z:r})}function d(t,e){var i=t.length-1;if(!(i<3)){for(var r={group:s,material:n,vertices:[]},a=0;a3)){var u=0,c=0,d=0;u=parseInt(h[0],10),l>1&&""!==h[1]&&(c=parseInt(h[1],10)),l>2&&(d=parseInt(h[2],10)),0!==u&&(u<0&&(u=o(e).vertices.length+1+u),c-=1,u-=1,d-=1,r.vertices.push({textureCoordsIndex:c,vertexIndex:u,vertexNormalIndex:d}))}}o(e).faces.push(r)}}function p(t,e){t.length>=2&&e.materialLibraries.push(t[1])}function f(t){t.length>=2&&(n=t[1])}t.exports=function(t,i){void 0===i&&(i=!0),e=i;var o={materials:{},materialLibraries:[],models:[]};s="",n="";for(var v=t.split("\n"),g=0;g{var s=i(22946);t.exports=function(t){for(var e={},i=t.split("\n"),n="",r=0;r=2?Math.floor(255*a[2]):h,u=a.length>=3?Math.floor(255*a[3]):h;e[n]=s(h,l,u)}}}return e}},15313:t=>{t.exports=function(t,e,i,s){var n,r;if(void 0===i&&void 0===s){var o=t.getInCenter();n=o.x,r=o.y}var a=Math.cos(e),h=Math.sin(e),l=t.vertex1,u=t.vertex2,c=t.vertex3,d=l.x-n,p=l.y-r;l.set(d*a-p*h+n,d*h+p*a+r),d=u.x-n,p=u.y-r,u.set(d*a-p*h+n,d*h+p*a+r),d=c.x-n,p=c.y-r,c.set(d*a-p*h+n,d*h+p*a+r)}},85769:(t,e,i)=>{var s=i(56694),n=i(75512),r=i(70015),o=new s({Extends:r,initialize:function(t,e,i,s,n,o,a,h,l,u){void 0===o&&(o=16777215),void 0===a&&(a=1),void 0===h&&(h=0),void 0===l&&(l=0),void 0===u&&(u=0),r.call(this,t,e,i),this.vx=0,this.vy=0,this.vz=0,this.nx=h,this.ny=l,this.nz=u,this.u=s,this.v=n,this.color=o,this.alpha=a,this.tx=0,this.ty=0,this.ta=0},setUVs:function(t,e){return this.u=t,this.v=e,this},transformCoordinatesLocal:function(t,e,i,s){var n=this.x,r=this.y,o=this.z,a=t.val,h=n*a[0]+r*a[4]+o*a[8]+a[12],l=n*a[1]+r*a[5]+o*a[9]+a[13],u=n*a[2]+r*a[6]+o*a[10]+a[14],c=n*a[3]+r*a[7]+o*a[11]+a[15];this.vx=h/c*e,this.vy=-l/c*i,this.vz=s<=0?u/c:-u/c},resize:function(t,e,i,s,n,r){return this.x=t,this.y=e,this.vx=this.x*i,this.vy=-this.y*s,this.vz=0,n<.5?this.vx+=i*(.5-n):n>.5&&(this.vx-=i*(n-.5)),r<.5?this.vy+=s*(.5-r):r>.5&&(this.vy-=s*(r-.5)),this},update:function(t,e,i,s,n,r,o,a){var h=this.vx*t+this.vy*i+n,l=this.vx*e+this.vy*s+r;return o&&(h=Math.round(h),l=Math.round(l)),this.tx=h,this.ty=l,this.ta=this.alpha*a,this},load:function(t,e,i,s,r){return t[++i]=this.tx,t[++i]=this.ty,t[++i]=this.u,t[++i]=this.v,t[++i]=s,t[++i]=r,e[++i]=n.getTintAppendFloatAlpha(this.color,this.ta),i}});t.exports=o},14293:(t,e,i)=>{var s={Face:i(18693),GenerateGridVerts:i(99425),GenerateObjVerts:i(53267),GenerateVerts:i(67623),ParseObj:i(27291),ParseObjMaterial:i(76799),RotateFace:i(15313),Vertex:i(85769)};t.exports=s},77601:t=>{t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},38933:(t,e,i)=>{var s=i(79967);t.exports=function(t){return new s(t.x,t.y)}},47103:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y)}},13625:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},12536:t=>{t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},54205:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){if(void 0===e&&(e=new s),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var n=0;n{t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},82712:t=>{t.exports=function(t){return t.x*t.x+t.y*t.y}},20052:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){void 0===e&&(e=new s);for(var i=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,a=0;ai&&(i=h.x),h.xr&&(r=h.y),h.y{var s=i(79967);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=new s),n.x=t.x+(e.x-t.x)*i,n.y=t.y+(e.y-t.y)*i,n}},42397:t=>{t.exports=function(t){return t.setTo(t.y,t.x)}},59464:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.setTo(-t.x,-t.y)}},79967:(t,e,i)=>{var s=i(56694),n=i(52394),r=new s({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=n.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=r},53581:(t,e,i)=>{var s=i(79967),n=i(82712);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=(t.x*e.x+t.y*e.y)/n(e);return 0!==r&&(i.x=r*e.x,i.y=r*e.y),i}},50817:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.x*e.x+t.y*e.y;return 0!==n&&(i.x=n*e.x,i.y=n*e.y),i}},40525:(t,e,i)=>{var s=i(50083);t.exports=function(t,e){if(0!==t.x||0!==t.y){var i=s(t);t.x/=i,t.y/=i}return t.x*=e,t.y*=e,t}},63472:(t,e,i)=>{var s=i(79967);s.Ceil=i(77601),s.Clone=i(38933),s.CopyFrom=i(47103),s.Equals=i(13625),s.Floor=i(12536),s.GetCentroid=i(54205),s.GetMagnitude=i(50083),s.GetMagnitudeSq=i(82712),s.GetRectangleFromPoints=i(20052),s.Interpolate=i(77154),s.Invert=i(42397),s.Negative=i(59464),s.Project=i(53581),s.ProjectUnit=i(50817),s.SetMagnitude=i(40525),t.exports=s},19631:(t,e,i)=>{var s=i(8580);t.exports=function(t){return new s(t.points)}},45604:t=>{t.exports=function(t,e,i){for(var s=!1,n=-1,r=t.points.length-1;++n{var s=i(45604);t.exports=function(t,e){return s(t,e.x,e.y)}},11117:t=>{"use strict";function e(t,e,s){s=s||2;var r,o,a,h,c,d,f,v=e&&e.length,g=v?e[0]*s:t.length,m=i(t,0,g,s,!0),y=[];if(!m||m.next===m.prev)return y;if(v&&(m=function(t,e,s,n){var r,o,a,h=[];for(r=0,o=e.length;r80*s){r=a=t[0],o=h=t[1];for(var x=s;xa&&(a=c),d>h&&(h=d);f=0!==(f=Math.max(a-r,h-o))?32767/f:0}return n(m,y,s,r,o,f,0),y}function i(t,e,i,s,n){var r,o;if(n===_(t,e,i,s)>0)for(r=e;r=e;r-=s)o=E(r,t[r],t[r+1],o);return o&&m(o,o.next)&&(S(o),o=o.next),o}function s(t,e){if(!t)return t;e||(e=t);var i,s=t;do{if(i=!1,s.steiner||!m(s,s.next)&&0!==g(s.prev,s,s.next))s=s.next;else{if(S(s),(s=e=s.prev)===s.next)break;i=!0}}while(i||s!==e);return e}function n(t,e,i,l,u,c,p){if(t){!p&&c&&function(t,e,i,s){var n=t;do{0===n.z&&(n.z=d(n.x,n.y,e,i,s)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,i,s,n,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,s=i,a=0,e=0;e0||h>0&&s;)0!==a&&(0===h||!s||i.z<=s.z)?(n=i,i=i.nextZ,a--):(n=s,s=s.nextZ,h--),r?r.nextZ=n:t=n,n.prevZ=r,r=n;i=s}r.nextZ=null,l*=2}while(o>1)}(n)}(t,l,u,c);for(var f,v,g=t;t.prev!==t.next;)if(f=t.prev,v=t.next,c?o(t,l,u,c):r(t))e.push(f.i/i|0),e.push(t.i/i|0),e.push(v.i/i|0),S(t),t=v.next,g=v.next;else if((t=v)===g){p?1===p?n(t=a(s(t),e,i),e,i,l,u,c,2):2===p&&h(t,e,i,l,u,c):n(s(t),e,i,l,u,c,1);break}}}function r(t){var e=t.prev,i=t,s=t.next;if(g(e,i,s)>=0)return!1;for(var n=e.x,r=i.x,o=s.x,a=e.y,h=i.y,l=s.y,u=nr?n>o?n:o:r>o?r:o,p=a>h?a>l?a:l:h>l?h:l,v=s.next;v!==e;){if(v.x>=u&&v.x<=d&&v.y>=c&&v.y<=p&&f(n,a,r,h,o,l,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function o(t,e,i,s){var n=t.prev,r=t,o=t.next;if(g(n,r,o)>=0)return!1;for(var a=n.x,h=r.x,l=o.x,u=n.y,c=r.y,p=o.y,v=ah?a>l?a:l:h>l?h:l,x=u>c?u>p?u:p:c>p?c:p,T=d(v,m,e,i,s),w=d(y,x,e,i,s),b=t.prevZ,E=t.nextZ;b&&b.z>=T&&E&&E.z<=w;){if(b.x>=v&&b.x<=y&&b.y>=m&&b.y<=x&&b!==n&&b!==o&&f(a,u,h,c,l,p,b.x,b.y)&&g(b.prev,b,b.next)>=0)return!1;if(b=b.prevZ,E.x>=v&&E.x<=y&&E.y>=m&&E.y<=x&&E!==n&&E!==o&&f(a,u,h,c,l,p,E.x,E.y)&&g(E.prev,E,E.next)>=0)return!1;E=E.nextZ}for(;b&&b.z>=T;){if(b.x>=v&&b.x<=y&&b.y>=m&&b.y<=x&&b!==n&&b!==o&&f(a,u,h,c,l,p,b.x,b.y)&&g(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;E&&E.z<=w;){if(E.x>=v&&E.x<=y&&E.y>=m&&E.y<=x&&E!==n&&E!==o&&f(a,u,h,c,l,p,E.x,E.y)&&g(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function a(t,e,i){var n=t;do{var r=n.prev,o=n.next.next;!m(r,o)&&y(r,n,n.next,o)&&w(r,o)&&w(o,r)&&(e.push(r.i/i|0),e.push(n.i/i|0),e.push(o.i/i|0),S(n),S(n.next),n=t=o),n=n.next}while(n!==t);return s(n)}function h(t,e,i,r,o,a){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&v(h,l)){var u=b(h,l);return h=s(h,h.next),u=s(u,u.next),n(h,e,i,r,o,a,0),void n(u,e,i,r,o,a,0)}l=l.next}h=h.next}while(h!==t)}function l(t,e){return t.x-e.x}function u(t,e){var i=function(t,e){var i,s=e,n=t.x,r=t.y,o=-1/0;do{if(r<=s.y&&r>=s.next.y&&s.next.y!==s.y){var a=s.x+(r-s.y)*(s.next.x-s.x)/(s.next.y-s.y);if(a<=n&&a>o&&(o=a,i=s.x=s.x&&s.x>=u&&n!==s.x&&f(ri.x||s.x===i.x&&c(i,s)))&&(i=s,p=h)),s=s.next}while(s!==l);return i}(t,e);if(!i)return e;var n=b(i,t);return s(n,n.next),s(i,i.next)}function c(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function d(t,e,i,s,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-i)*n|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-s)*n|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{(e.x=(t-o)*(r-a)&&(t-o)*(s-a)>=(i-o)*(e-a)&&(i-o)*(r-a)>=(n-o)*(s-a)}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&y(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(w(t,e)&&w(e,t)&&function(t,e){var i=t,s=!1,n=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&n<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(s=!s),i=i.next}while(i!==t);return s}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||m(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function m(t,e){return t.x===e.x&&t.y===e.y}function y(t,e,i,s){var n=T(g(t,e,i)),r=T(g(t,e,s)),o=T(g(i,s,t)),a=T(g(i,s,e));return n!==r&&o!==a||(!(0!==n||!x(t,i,e))||(!(0!==r||!x(t,s,e))||(!(0!==o||!x(i,t,s))||!(0!==a||!x(i,e,s)))))}function x(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function T(t){return t>0?1:t<0?-1:0}function w(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function b(t,e){var i=new A(t.i,t.x,t.y),s=new A(e.i,e.x,e.y),n=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=n,n.prev=i,s.next=i,i.prev=s,r.next=s,s.prev=r,s}function E(t,e,i,s){var n=new A(t,e,i);return s?(n.next=s.next,n.prev=s,s.next.prev=n,s.next=n):(n.prev=n,n.next=n),n}function S(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function A(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function _(t,e,i,s){for(var n=0,r=e,o=i-s;r0&&(s+=t[n-1].length,i.holes.push(s))}return i},t.exports=e},14045:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){void 0===e&&(e=new s);for(var i,n=1/0,r=1/0,o=-n,a=-r,h=0;h{t.exports=function(t,e){void 0===e&&(e=[]);for(var i=0;i{var s=i(16028),n=i(88829),r=i(5159);t.exports=function(t,e,i,o){void 0===o&&(o=[]);var a=t.points,h=r(t);!e&&i>0&&(e=h/i);for(var l=0;lc+g)){var m=v.getPoint((u-c)/g);o.push(m);break}c+=g}return o}},5159:(t,e,i)=>{var s=i(16028),n=i(88829);t.exports=function(t){for(var e=t.points,i=0,r=0;r{var s=i(56694),n=i(45604),r=i(89294),o=i(52394),a=new s({initialize:function(t){this.type=o.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return n(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,s=0;s{t.exports=function(t){return t.points.reverse(),t}},95874:t=>{function e(t,e,i){var s=e.x,n=e.y,r=i.x-s,o=i.y-n;if(0!==r||0!==o){var a=((t.x-s)*r+(t.y-n)*o)/(r*r+o*o);a>1?(s=i.x,n=i.y):a>0&&(s+=r*a,n+=o*a)}return(r=t.x-s)*r+(o=t.y-n)*o}function i(t,s,n,r,o){for(var a,h=r,l=s+1;lh&&(a=l,h=u)}h>r&&(a-s>1&&i(t,s,a,r,o),o.push(t[a]),n-a>1&&i(t,a,n,r,o))}function s(t,e){var s=t.length-1,n=[t[0]];return i(t,0,s,e,n),n.push(t[s]),n}t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=!1);var n=t.points;if(n.length>2){var r=e*e;i||(n=function(t,e){for(var i,s,n,r,o,a=t[0],h=[a],l=1,u=t.length;le&&(h.push(i),a=i);return a!==i&&h.push(i),h}(n,r)),t.setTo(s(n,r))}return t}},18974:t=>{var e=function(t,e){return t[0]=e[0],t[1]=e[1],t};t.exports=function(t){var i,s=[],n=t.points;for(i=0;i0&&r.push(e([0,0],s[0])),i=0;i1&&r.push(e([0,0],s[s.length-1])),t.setTo(r)}},23490:t=>{t.exports=function(t,e,i){for(var s=t.points,n=0;n{var s=i(8580);s.Clone=i(19631),s.Contains=i(45604),s.ContainsPoint=i(87289),s.Earcut=i(11117),s.GetAABB=i(14045),s.GetNumberArray=i(98286),s.GetPoints=i(89294),s.Perimeter=i(5159),s.Reverse=i(32244),s.Simplify=i(95874),s.Smooth=i(18974),s.Translate=i(23490),t.exports=s},1653:t=>{t.exports=function(t){return t.width*t.height}},33943:t=>{t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t}},58662:t=>{t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t.width=Math.ceil(t.width),t.height=Math.ceil(t.height),t}},79993:t=>{t.exports=function(t,e,i){return t.x=e-t.width/2,t.y=i-t.height/2,t}},81572:(t,e,i)=>{var s=i(74118);t.exports=function(t){return new s(t.x,t.y,t.width,t.height)}},94287:t=>{t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i)}},28687:(t,e,i)=>{var s=i(94287);t.exports=function(t,e){return s(t,e.x,e.y)}},73222:t=>{t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&(e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom{t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},87279:t=>{t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},19989:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},92628:(t,e,i)=>{var s=i(6700);t.exports=function(t,e){var i=s(t);return i{var s=i(6700);t.exports=function(t,e){var i=s(t);return i>s(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},71356:t=>{t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},21687:t=>{t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},80222:(t,e,i)=>{var s=i(74118),n=i(83392);t.exports=function(t,e){if(void 0===e&&(e=new s),0===t.length)return e;for(var i,r,o,a=Number.MAX_VALUE,h=Number.MAX_VALUE,l=n.MIN_SAFE_INTEGER,u=n.MIN_SAFE_INTEGER,c=0;c{var s=i(74118);t.exports=function(t,e,i,n,r){return void 0===r&&(r=new s),r.setTo(Math.min(t,i),Math.min(e,n),Math.abs(t-i),Math.abs(e-n))}},6700:t=>{t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},35242:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.centerX,e.y=t.centerY,e}},47698:(t,e,i)=>{var s=i(85876),n=i(79967);t.exports=function(t,e,i){if(void 0===i&&(i=new n),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=s(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},54932:(t,e,i)=>{var s=i(47698),n=i(85876);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(e=n(t)/i);for(var o=0;o{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.width,e.y=t.height,e}},7782:(t,e,i)=>{var s=i(79993);t.exports=function(t,e,i){var n=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),s(t,n,r)}},66217:(t,e,i)=>{var s=i(74118),n=i(90205);t.exports=function(t,e,i){return void 0===i&&(i=new s),n(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},40053:(t,e,i)=>{var s=i(85876),n=i(79967);t.exports=function(t,e,i,r){if(void 0===r&&(r=[]),!e&&!i)return r;e?i=Math.round(s(t)/e):e=s(t)/i;for(var o=t.x,a=t.y,h=0,l=0;l=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},86673:t=>{t.exports=function(t,e){for(var i=t.x,s=t.right,n=t.y,r=t.bottom,o=0;o{t.exports=function(t,e){var i=Math.min(t.x,e.x),s=Math.max(t.right,e.right);t.x=i,t.width=s-i;var n=Math.min(t.y,e.y),r=Math.max(t.bottom,e.bottom);return t.y=n,t.height=r-n,t}},44755:t=>{t.exports=function(t,e,i){var s=Math.min(t.x,e),n=Math.max(t.right,e);t.x=s,t.width=n-s;var r=Math.min(t.y,i),o=Math.max(t.bottom,i);return t.y=r,t.height=o-r,t}},74466:t=>{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},55946:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},97474:t=>{t.exports=function(t,e){return t.xe.x&&t.ye.y}},85876:t=>{t.exports=function(t){return 2*(t.width+t.height)}},20243:(t,e,i)=>{var s=i(79967),n=i(75606);t.exports=function(t,e,i){void 0===i&&(i=new s),e=n(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r){var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},97691:(t,e,i)=>{var s=i(17489),n=i(73222),r=i(79967);t.exports=function(t,e,i){if(void 0===i&&(i=new r),n(t,e))switch(s(0,3)){case 0:i.x=t.x+Math.random()*(e.right-t.x),i.y=t.y+Math.random()*(e.top-t.y);break;case 1:i.x=e.x+Math.random()*(t.right-e.x),i.y=e.bottom+Math.random()*(t.bottom-e.bottom);break;case 2:i.x=t.x+Math.random()*(e.x-t.x),i.y=e.y+Math.random()*(t.bottom-e.y);break;case 3:i.x=e.right+Math.random()*(t.right-e.right),i.y=t.y+Math.random()*(e.bottom-t.y)}return i}},74118:(t,e,i)=>{var s=i(56694),n=i(94287),r=i(47698),o=i(54932),a=i(52394),h=i(88829),l=i(30001),u=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=a.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},51828:t=>{t.exports=function(t,e){return t.width===e.width&&t.height===e.height}},5691:t=>{t.exports=function(t,e,i){return void 0===i&&(i=e),t.width*=e,t.height*=i,t}},58795:(t,e,i)=>{var s=i(74118);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=Math.min(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-n,a=Math.max(t.bottom,e.bottom)-r;return i.setTo(n,r,o,a)}},66658:(t,e,i)=>{var s=i(74118);s.Area=i(1653),s.Ceil=i(33943),s.CeilAll=i(58662),s.CenterOn=i(79993),s.Clone=i(81572),s.Contains=i(94287),s.ContainsPoint=i(28687),s.ContainsRect=i(73222),s.CopyFrom=i(29538),s.Decompose=i(87279),s.Equals=i(19989),s.FitInside=i(92628),s.FitOutside=i(85028),s.Floor=i(71356),s.FloorAll=i(21687),s.FromPoints=i(80222),s.FromXY=i(75785),s.GetAspectRatio=i(6700),s.GetCenter=i(35242),s.GetPoint=i(47698),s.GetPoints=i(54932),s.GetSize=i(31591),s.Inflate=i(7782),s.Intersection=i(66217),s.MarchingAnts=i(40053),s.MergePoints=i(86673),s.MergeRect=i(14655),s.MergeXY=i(44755),s.Offset=i(74466),s.OffsetPoint=i(55946),s.Overlaps=i(97474),s.Perimeter=i(85876),s.PerimeterPoint=i(20243),s.Random=i(30001),s.RandomOutside=i(97691),s.SameDimensions=i(51828),s.Scale=i(5691),s.Union=i(58795),t.exports=s},19108:t=>{t.exports=function(t){var e=t.x1,i=t.y1,s=t.x2,n=t.y2,r=t.x3,o=t.y3;return Math.abs(((r-e)*(n-i)-(s-e)*(o-i))/2)}},41199:(t,e,i)=>{var s=i(66349);t.exports=function(t,e,i){var n=i*(Math.sqrt(3)/2);return new s(t,e,t+i/2,e+n,t-i/2,e+n)}},88730:(t,e,i)=>{var s=i(11117),n=i(66349);t.exports=function(t,e,i,r,o){void 0===e&&(e=null),void 0===i&&(i=1),void 0===r&&(r=1),void 0===o&&(o=[]);for(var a,h,l,u,c,d,p,f,v,g=s(t,e),m=0;m{var s=i(66349);t.exports=function(t,e,i,n){return void 0===n&&(n=i),new s(t,e,t,e-n,t+i,e)}},1882:(t,e,i)=>{var s=i(56595),n=i(9640);t.exports=function(t,e,i,r){void 0===r&&(r=s);var o=r(t),a=e-o.x,h=i-o.y;return n(t,a,h)}},56595:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},91835:(t,e,i)=>{var s=i(93736);function n(t,e,i,s){return t*s-e*i}t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x3,r=t.y3,o=t.x1-i,a=t.y1-r,h=t.x2-i,l=t.y2-r,u=2*n(o,a,h,l),c=n(a,o*o+a*a,l,h*h+l*l),d=n(o,o*o+a*a,h,h*h+l*l);return e.x=i-c/u,e.y=r+d/u,e}},97073:(t,e,i)=>{var s=i(26673);t.exports=function(t,e){void 0===e&&(e=new s);var i,n,r=t.x1,o=t.y1,a=t.x2,h=t.y2,l=t.x3,u=t.y3,c=a-r,d=h-o,p=l-r,f=u-o,v=c*(r+a)+d*(o+h),g=p*(r+l)+f*(o+u),m=2*(c*(u-h)-d*(l-a));if(Math.abs(m)<1e-6){var y=Math.min(r,a,l),x=Math.min(o,h,u);i=.5*(Math.max(r,a,l)-y),n=.5*(Math.max(o,h,u)-x),e.x=y+i,e.y=x+n,e.radius=Math.sqrt(i*i+n*n)}else e.x=(f*v-d*g)/m,e.y=(c*g-p*v)/m,i=e.x-r,n=e.y-o,e.radius=Math.sqrt(i*i+n*n);return e}},75974:(t,e,i)=>{var s=i(66349);t.exports=function(t){return new s(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},60689:t=>{t.exports=function(t,e,i){var s=t.x3-t.x1,n=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,l=s*s+n*n,u=s*r+n*o,c=s*a+n*h,d=r*r+o*o,p=r*a+o*h,f=l*d-u*u,v=0===f?0:1/f,g=(d*c-u*p)*v,m=(l*p-u*c)*v;return g>=0&&m>=0&&g+m<1}},86875:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=!1),void 0===s&&(s=[]);for(var n,r,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,p=t.y2-t.y1,f=u*u+c*c,v=u*d+c*p,g=d*d+p*p,m=f*g-v*v,y=0===m?0:1/m,x=t.x1,T=t.y1,w=0;w=0&&r>=0&&n+r<1&&(s.push({x:e[w].x,y:e[w].y}),i)));w++);return s}},51532:(t,e,i)=>{var s=i(60689);t.exports=function(t,e){return s(t,e.x,e.y)}},42538:t=>{t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},18680:t=>{t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},29977:t=>{t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2&&t.x3===e.x3&&t.y3===e.y3}},56088:(t,e,i)=>{var s=i(79967),n=i(16028);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();if(e<=0||e>=1)return i.x=r.x1,i.y=r.y1,i;var h=n(r),l=n(o),u=n(a),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},24402:(t,e,i)=>{var s=i(16028),n=i(79967);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=s(o),u=s(a),c=s(h),d=l+u+c;!e&&i>0&&(e=d/i);for(var p=0;pl+u?(v=(f-=l+u)/c,g.x=h.x1+(h.x2-h.x1)*v,g.y=h.y1+(h.y2-h.y1)*v):(v=(f-=l)/u,g.x=a.x1+(a.x2-a.x1)*v,g.y=a.y1+(a.y2-a.y1)*v),r.push(g)}return r}},83648:(t,e,i)=>{var s=i(79967);function n(t,e,i,s){var n=t-i,r=e-s,o=n*n+r*r;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,l=t.y3,u=n(h,l,o,a),c=n(i,r,h,l),d=n(o,a,i,r),p=u+c+d;return e.x=(i*u+o*c+h*d)/p,e.y=(r*u+a*c+l*d)/p,e}},9640:t=>{t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},95290:(t,e,i)=>{var s=i(16028);t.exports=function(t){var e=t.getLineA(),i=t.getLineB(),n=t.getLineC();return s(e)+s(i)+s(n)}},99761:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x2-t.x1,n=t.y2-t.y1,r=t.x3-t.x1,o=t.y3-t.y1,a=Math.random(),h=Math.random();return a+h>=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(n*a+o*h),e}},21934:(t,e,i)=>{var s=i(19211),n=i(83648);t.exports=function(t,e){var i=n(t);return s(t,i.x,i.y,e)}},68454:(t,e,i)=>{var s=i(19211);t.exports=function(t,e,i){return s(t,e.x,e.y,i)}},19211:t=>{t.exports=function(t,e,i,s){var n=Math.cos(s),r=Math.sin(s),o=t.x1-e,a=t.y1-i;return t.x1=o*n-a*r+e,t.y1=o*r+a*n+i,o=t.x2-e,a=t.y2-i,t.x2=o*n-a*r+e,t.y2=o*r+a*n+i,o=t.x3-e,a=t.y3-i,t.x3=o*n-a*r+e,t.y3=o*r+a*n+i,t}},66349:(t,e,i)=>{var s=i(56694),n=i(60689),r=i(56088),o=i(24402),a=i(52394),h=i(88829),l=i(99761),u=new s({initialize:function(t,e,i,s,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=0),this.type=a.TRIANGLE,this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.x3=n,this.y3=r},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,s,n,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.x3=n,this.y3=r,this},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.x3,this.y3,this.x1,this.y1),t},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=u},87619:(t,e,i)=>{var s=i(66349);s.Area=i(19108),s.BuildEquilateral=i(41199),s.BuildFromPolygon=i(88730),s.BuildRight=i(3635),s.CenterOn=i(1882),s.Centroid=i(56595),s.CircumCenter=i(91835),s.CircumCircle=i(97073),s.Clone=i(75974),s.Contains=i(60689),s.ContainsArray=i(86875),s.ContainsPoint=i(51532),s.CopyFrom=i(42538),s.Decompose=i(18680),s.Equals=i(29977),s.GetPoint=i(56088),s.GetPoints=i(24402),s.InCenter=i(83648),s.Perimeter=i(95290),s.Offset=i(9640),s.Random=i(99761),s.Rotate=i(21934),s.RotateAroundPoint=i(68454),s.RotateAroundXY=i(19211),t.exports=s},27395:t=>{t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}}},18104:t=>{t.exports=function(t,e){return function(i,s,n,r){var o=t.getPixelAlpha(s,n,r.texture.key,r.frame.name);return o&&o>=e}}},69898:(t,e,i)=>{var s=i(56694),n=i(72687),r=i(6659),o=i(33963),a=i(97081),h=i(71064),l=i(7905),u=i(40398),c=i(37579),d=i(69360),p=i(64462),f=new s({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new r,this.isOver=!0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new h(this):null,this.mouse=e.inputMouse?new l(this):null,this.touch=e.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var s=new u(this,i);s.smoothFactor=e.inputSmoothFactor,this.pointers.push(s)}this.mousePointer=e.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new d,this._tempMatrix2=new d,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(a.BOOT,this.boot,this)},boot:function(){var t=this.game,e=t.events;this.canvas=t.canvas,this.scaleManager=t.scale,this.events.emit(o.MANAGER_BOOT),e.on(a.PRE_RENDER,this.preRender,this),e.once(a.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(o.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(o.GAME_OUT,t)},preRender:function(){var t=this.game.loop.now,e=this.game.loop.delta,i=this.game.scene.getScenes(!0,!0);this.time=t,this.events.emit(o.MANAGER_UPDATE);for(var s=0;s10&&(t=10-this.pointersTotal);for(var i=0;i{var s=i(26673),n=i(65650),r=i(56694),o=i(72687),a=i(27395),h=i(18104),l=i(53996),u=i(95669),c=i(72313),d=i(33963),p=i(6659),f=i(72632),v=i(52394),g=i(63399),m=i(42911),y=i(91963),x=i(74118),T=i(94287),w=i(7599),b=i(66349),E=i(60689),S=new r({Extends:p,initialize:function(t){p.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.pluginEvents=new p,this.enabled=!0,this.displayList,this.cameras,g.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var e={cancelled:!1};this._eventContainer={stopPropagation:function(){e.cancelled=!0}},this._eventData=e,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,t.sys.events.once(w.BOOT,this.boot,this),t.sys.events.on(w.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(w.DESTROY,this.destroy,this),this.pluginEvents.emit(d.BOOT)},start:function(){var t=this.systems.events;t.on(w.TRANSITION_START,this.transitionIn,this),t.on(w.TRANSITION_OUT,this.transitionOut,this),t.on(w.TRANSITION_COMPLETE,this.transitionComplete,this),t.on(w.PRE_UPDATE,this.preUpdate,this),t.once(w.SHUTDOWN,this.shutdown,this),this.manager.events.on(d.GAME_OUT,this.onGameOut,this),this.manager.events.on(d.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(d.START)},onGameOver:function(t){this.isActive()&&this.emit(d.GAME_OVER,t.timeStamp,t)},onGameOut:function(t){this.isActive()&&this.emit(d.GAME_OUT,t.timeStamp,t)},preUpdate:function(){this.pluginEvents.emit(d.PRE_UPDATE);var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,s=e.length;if(0!==i||0!==s){for(var n=this._list,r=0;r-1&&(n.splice(a,1),this.clear(o,!0))}this._pendingRemoval.length=0,this._list=n.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.canInput()},updatePoll:function(t,e){if(!this.isActive())return!1;if(this.pluginEvents.emit(d.UPDATE,t,e),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var i,s=this.manager,n=s.pointers,r=s.pointersTotal;for(i=0;i0){if(this._pollTimer-=e,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var a=!1;for(i=0;i0&&(a=!0)}return a},update:function(t,e){if(!this.isActive())return!1;for(var i=e.length,s=!1,n=0;n0&&(s=!0)}return this._updatedThisFrame=!0,s},clear:function(t,e){void 0===e&&(e=!1),this.disable(t);var i=t.input;i&&(this.removeDebug(t),i.gameObject=void 0,i.target=void 0,i.hitArea=void 0,i.hitAreaCallback=void 0,i.callbackContext=void 0,t.input=null),e||this.queueForRemoval(t);var s=this._draggable.indexOf(t);return s>-1&&this._draggable.splice(s,1),t},disable:function(t){var e=t.input;e&&(e.enabled=!1,e.dragState=0);var i=this._temp,s=this._drag,n=this._over,r=this.manager,o=i.indexOf(t);o>-1&&i.splice(o,1);for(var a=0;a-1&&s[a].splice(o,1),(o=n[a].indexOf(t))>-1&&(n[a].splice(o,1),r.resetCursor(e));return this},enable:function(t,e,i,s){return void 0===s&&(s=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&s&&!t.input.dropZone&&(t.input.dropZone=s),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i0)return t.camera=s,n}return t.camera=e[0],[]},processDownEvents:function(t){var e=0,i=this._temp,s=this._eventData,n=this._eventContainer;s.cancelled=!1;for(var r=!1,o=0;o0&&l(t.x,t.y,t.downX,t.downY)>=n||s>0&&e>=t.downTime+s)&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;i1&&(this.sortGameObjects(i,t),this.topOnly&&i.splice(1)),this._drag[t.id]=i,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?(this.setDragState(t,3),this.processDragStartList(t)):(this.setDragState(t,2),0))},processDragMoveEvent:function(t){if(2===this.getDragState(t)&&this.processDragThresholdEvent(t,this.manager.game.loop.now),4!==this.getDragState(t))return 0;for(var e=this._tempZones,i=this._drag[t.id],s=0;s0?(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),e[0]?(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):a.target=null)}else!h&&e[0]&&(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h));if(o.parentContainer){var u=t.worldX-a.dragStartXGlobal,c=t.worldY-a.dragStartYGlobal,p=o.getParentRotation(),f=u*Math.cos(p)+c*Math.sin(p),v=c*Math.cos(p)-u*Math.sin(p);f*=1/o.parentContainer.scaleX,v*=1/o.parentContainer.scaleY,n=f+a.dragStartX,r=v+a.dragStartY}else n=t.worldX-a.dragX,r=t.worldY-a.dragY;o.emit(d.GAMEOBJECT_DRAG,t,n,r),this.emit(d.DRAG,t,o,n,r)}return i.length},processDragUpEvent:function(t){for(var e=this._drag[t.id],i=0;i0){var r=this.manager,o=this._eventData,a=this._eventContainer;o.cancelled=!1;for(var h=!1,l=0;l0){var n=this.manager,r=this._eventData,o=this._eventContainer;r.cancelled=!1;var a=!1;this.sortGameObjects(e,t);for(var h=0;h0){for(this.sortGameObjects(n,t),e=0;e0){for(this.sortGameObjects(r,t),e=0;e-1&&this._draggable.splice(n,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return h(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var s=!1,n=!1,r=!1,o=!1,h=!1,l=!0;if(m(e)){var u=e;e=f(u,"hitArea",null),i=f(u,"hitAreaCallback",null),s=f(u,"draggable",!1),n=f(u,"dropZone",!1),r=f(u,"cursor",!1),o=f(u,"useHandCursor",!1),h=f(u,"pixelPerfect",!1);var c=f(u,"alphaTolerance",1);h&&(e={},i=this.makePixelPerfect(c)),e&&i||(this.setHitAreaFromTexture(t),l=!1)}else"function"!=typeof e||i||(i=e,e={});for(var d=0;d{var s=i(10850),n={},r={register:function(t,e,i,s,r){n[t]={plugin:e,mapping:i,settingsKey:s,configKey:r}},getPlugin:function(t){return n[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,r=e.game.config;for(var o in n){var a=n[o].plugin,h=n[o].mapping,l=n[o].settingsKey,u=n[o].configKey;s(i,l,r[u])&&(t[h]=new a(t))}},remove:function(t){n.hasOwnProperty(t)&&delete n[t]}};t.exports=r},40398:(t,e,i)=>{var s=i(90447),n=i(56694),r=i(53996),o=i(88456),a=i(44521),h=i(93736),l=i(36580),u=new n({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new h,this.prevPosition=new h,this.midPoint=new h(-1,-1),this.velocity=new h,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===e,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(t){var e=t.getWorldPoint(this.x,this.y);return this.worldX=e.x,this.worldY=e.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t=this.position.x,e=this.position.y,i=this.midPoint.x,n=this.midPoint.y;if(t!==i||e!==n){var r=a(this.motionFactor,i,t),h=a(this.motionFactor,n,e);o(r,t,.1)&&(r=t),o(h,e,.1)&&(h=e),this.midPoint.set(r,h);var l=t-r,u=e-h;this.velocity.set(l,u),this.angle=s(r,h,t,e),this.distance=Math.sqrt(l*l+u*u)}},up:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),0===this.buttons&&(this.isDown=!1,this.upTime=t.timeStamp,this.wasTouch=!1)},down:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),l.macOS&&t.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=t.timeStamp),this.wasTouch=!1},move:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.locked&&(this.movementX=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.moveTime=t.timeStamp,this.wasTouch=!1},wheel:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=e,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(t,e){this.event=e,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.moveTime=e.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?s(this.downX,this.downY,this.x,this.y):s(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,s=this.prevPosition.y,n=this.position.x,r=this.position.y,o=0;o{t.exports={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8}},14874:t=>{t.exports="boot"},54168:t=>{t.exports="destroy"},526:t=>{t.exports="dragend"},81623:t=>{t.exports="dragenter"},94472:t=>{t.exports="drag"},9304:t=>{t.exports="dragleave"},34265:t=>{t.exports="dragover"},50151:t=>{t.exports="dragstart"},98134:t=>{t.exports="drop"},56773:t=>{t.exports="gameobjectdown"},45824:t=>{t.exports="dragend"},39578:t=>{t.exports="dragenter"},72072:t=>{t.exports="drag"},82569:t=>{t.exports="dragleave"},70833:t=>{t.exports="dragover"},81442:t=>{t.exports="dragstart"},32936:t=>{t.exports="drop"},99658:t=>{t.exports="gameobjectmove"},60515:t=>{t.exports="gameobjectout"},55254:t=>{t.exports="gameobjectover"},34782:t=>{t.exports="pointerdown"},41769:t=>{t.exports="pointermove"},65588:t=>{t.exports="pointerout"},61640:t=>{t.exports="pointerover"},49342:t=>{t.exports="pointerup"},82662:t=>{t.exports="wheel"},13058:t=>{t.exports="gameobjectup"},52426:t=>{t.exports="gameobjectwheel"},78072:t=>{t.exports="gameout"},1545:t=>{t.exports="gameover"},67137:t=>{t.exports="boot"},27678:t=>{t.exports="process"},22257:t=>{t.exports="update"},90379:t=>{t.exports="pointerlockchange"},88909:t=>{t.exports="pointerdown"},36548:t=>{t.exports="pointerdownoutside"},18483:t=>{t.exports="pointermove"},22355:t=>{t.exports="pointerout"},7997:t=>{t.exports="pointerover"},66318:t=>{t.exports="pointerup"},94812:t=>{t.exports="pointerupoutside"},37310:t=>{t.exports="wheel"},24196:t=>{t.exports="preupdate"},27053:t=>{t.exports="shutdown"},29413:t=>{t.exports="start"},25165:t=>{t.exports="update"},33963:(t,e,i)=>{t.exports={BOOT:i(14874),DESTROY:i(54168),DRAG_END:i(526),DRAG_ENTER:i(81623),DRAG:i(94472),DRAG_LEAVE:i(9304),DRAG_OVER:i(34265),DRAG_START:i(50151),DROP:i(98134),GAME_OUT:i(78072),GAME_OVER:i(1545),GAMEOBJECT_DOWN:i(56773),GAMEOBJECT_DRAG_END:i(45824),GAMEOBJECT_DRAG_ENTER:i(39578),GAMEOBJECT_DRAG:i(72072),GAMEOBJECT_DRAG_LEAVE:i(82569),GAMEOBJECT_DRAG_OVER:i(70833),GAMEOBJECT_DRAG_START:i(81442),GAMEOBJECT_DROP:i(32936),GAMEOBJECT_MOVE:i(99658),GAMEOBJECT_OUT:i(60515),GAMEOBJECT_OVER:i(55254),GAMEOBJECT_POINTER_DOWN:i(34782),GAMEOBJECT_POINTER_MOVE:i(41769),GAMEOBJECT_POINTER_OUT:i(65588),GAMEOBJECT_POINTER_OVER:i(61640),GAMEOBJECT_POINTER_UP:i(49342),GAMEOBJECT_POINTER_WHEEL:i(82662),GAMEOBJECT_UP:i(13058),GAMEOBJECT_WHEEL:i(52426),MANAGER_BOOT:i(67137),MANAGER_PROCESS:i(27678),MANAGER_UPDATE:i(22257),POINTER_DOWN:i(88909),POINTER_DOWN_OUTSIDE:i(36548),POINTER_MOVE:i(18483),POINTER_OUT:i(22355),POINTER_OVER:i(7997),POINTER_UP:i(66318),POINTER_UP_OUTSIDE:i(94812),POINTER_WHEEL:i(37310),POINTERLOCK_CHANGE:i(90379),PRE_UPDATE:i(24196),SHUTDOWN:i(27053),START:i(29413),UPDATE:i(25165)}},70848:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=.1},update:function(t){this.value=t},getValue:function(){return Math.abs(this.value){var s=i(56694),n=i(43200),r=new s({initialize:function(t,e){this.pad=t,this.events=t.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(t){this.value=t;var e=this.pad,i=this.index;t>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(n.BUTTON_DOWN,e,this,t),this.pad.emit(n.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(n.BUTTON_UP,e,this,t),this.pad.emit(n.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},75956:(t,e,i)=>{var s=i(70848),n=i(21274),r=i(56694),o=i(6659),a=i(93736),h=new r({Extends:o,initialize:function(t,e){o.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],r=0;r=2&&(this.leftStick.set(r[0].getValue(),r[1].getValue()),n>=4&&this.rightStick.set(r[2].getValue(),r[3].getValue()))}},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t{var s=i(56694),n=i(6659),r=i(43200),o=i(75956),a=i(10850),h=i(63399),l=i(33963),u=new s({Extends:n,initialize:function(t){n.call(this),this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,t.pluginEvents.once(l.BOOT,this.boot,this),t.pluginEvents.on(l.START,this.start,this)},boot:function(){var t=this.scene.sys.game,e=this.settings.input,i=t.config;this.enabled=a(e,"gamepad",i.inputGamepad)&&t.device.input.gamepads,this.target=a(e,"gamepad.target",i.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(l.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(l.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var t=this,e=this.target,i=function(e){!e.defaultPrevented&&t.isActive()&&(t.refreshPads(),t.queue.push(e))};this.onGamepadHandler=i,e.addEventListener("gamepadconnected",i,!1),e.addEventListener("gamepaddisconnected",i,!1),this.sceneInputPlugin.pluginEvents.on(l.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(l.UPDATE,this.update);for(var t=0;t{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},74982:t=>{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},43247:t=>{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},4898:(t,e,i)=>{t.exports={DUALSHOCK_4:i(74982),SNES_USB:i(33171),XBOX_360:i(43247)}},17344:t=>{t.exports="down"},36635:t=>{t.exports="up"},85724:t=>{t.exports="connected"},55832:t=>{t.exports="disconnected"},772:t=>{t.exports="down"},33608:t=>{t.exports="up"},43200:(t,e,i)=>{t.exports={BUTTON_DOWN:i(17344),BUTTON_UP:i(36635),CONNECTED:i(85724),DISCONNECTED:i(55832),GAMEPAD_BUTTON_DOWN:i(772),GAMEPAD_BUTTON_UP:i(33608)}},92636:(t,e,i)=>{t.exports={Axis:i(70848),Button:i(21274),Events:i(43200),Gamepad:i(75956),GamepadPlugin:i(1379),Configs:i(4898)}},20873:(t,e,i)=>{var s=i(72687),n=i(98611),r={CreatePixelPerfectHandler:i(18104),CreateInteractiveObject:i(27395),Events:i(33963),Gamepad:i(92636),InputManager:i(69898),InputPlugin:i(12499),InputPluginCache:i(63399),Keyboard:i(28388),Mouse:i(11343),Pointer:i(40398),Touch:i(77423)};r=n(!1,r,s),t.exports=r},71064:(t,e,i)=>{var s=i(66458),n=i(56694),r=i(97081),o=i(33963),a=i(11873),h=i(72283),l=new n({initialize:function(t){this.manager=t,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=h,this.onKeyUp=h,t.events.once(o.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.addCapture(t.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(r.POST_STEP,this.postUpdate,this)},startListeners:function(){var t=this;this.onKeyDown=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}},this.onKeyUp=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}};var e=this.target;e&&(e.addEventListener("keydown",this.onKeyDown,!1),e.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var t=this.target;t.removeEventListener("keydown",this.onKeyDown,!1),t.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},removeCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(r.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=l},89666:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(94030),o=i(97081),a=i(10850),h=i(33963),l=i(63399),u=i(50165),c=i(11873),d=i(95625),p=i(48044),f=i(7599),v=i(84314),g=new s({Extends:n,initialize:function(t){n.call(this),this.game=t.systems.game,this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.manager=t.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,t.pluginEvents.once(h.BOOT,this.boot,this),t.pluginEvents.on(h.START,this.start,this)},boot:function(){var t=this.settings.input;this.enabled=a(t,"keyboard",!0);var e=a(t,"keyboard.capture",null);e&&this.addCaptures(e),this.sceneInputPlugin.pluginEvents.once(h.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(h.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(h.SHUTDOWN,this.shutdown,this),this.game.events.on(o.BLUR,this.resetKeys,this),this.scene.sys.events.on(f.PAUSE,this.resetKeys,this),this.scene.sys.events.on(f.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(t){return this.manager.addCapture(t),this},removeCapture:function(t){return this.manager.removeCapture(t),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:c.UP,down:c.DOWN,left:c.LEFT,right:c.RIGHT,space:c.SPACE,shift:c.SHIFT})},addKeys:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var s={};if("string"==typeof t){t=t.split(",");for(var n=0;n-1?s[n]=t:s[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t}return"string"==typeof t&&(t=c[t.toUpperCase()]),s[t]||(s[t]=new u(this,t),e&&this.addCapture(t),s[t].setEmitOnRepeat(i)),s[t]},removeKey:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var s,n=this.keys;if(t instanceof u){var r=n.indexOf(t);r>-1&&(s=this.keys[r],this.keys[r]=void 0)}else"string"==typeof t&&(t=c[t.toUpperCase()]);return n[t]&&(s=n[t],n[t]=void 0),s&&(s.plugin=null,i&&this.removeCapture(s.keyCode),e&&s.destroy()),this},removeAllKeys:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);for(var i=this.keys,s=0;st._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,s=0;s{t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},95625:(t,e,i)=>{var s=i(56694),n=i(94030),r=i(72632),o=i(2544),a=i(88754),h=new s({initialize:function(t,e,i){if(void 0===i&&(i={}),e.length<2)return!1;this.manager=t,this.enabled=!0,this.keyCodes=[];for(var s=0;s{var s=i(60258);t.exports=function(t,e){if(e.matched)return!0;var i=!1,n=!1;if(t.keyCode===e.current)if(e.index>0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(n=!0,i=s(t,e))}else n=!0,i=s(t,e);return!n&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},88754:t=>{t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},5044:t=>{t.exports="keydown"},40813:t=>{t.exports="keyup"},89319:t=>{t.exports="keycombomatch"},43267:t=>{t.exports="down"},78595:t=>{t.exports="keydown-"},30056:t=>{t.exports="keyup-"},81939:t=>{t.exports="up"},94030:(t,e,i)=>{t.exports={ANY_KEY_DOWN:i(5044),ANY_KEY_UP:i(40813),COMBO_MATCH:i(89319),DOWN:i(43267),KEY_DOWN:i(78595),KEY_UP:i(30056),UP:i(81939)}},28388:(t,e,i)=>{t.exports={Events:i(94030),KeyboardManager:i(71064),KeyboardPlugin:i(89666),Key:i(50165),KeyCodes:i(11873),KeyCombo:i(95625),AdvanceKeyCombo:i(60258),ProcessKeyCombo:i(2544),ResetKeyCombo:i(88754),JustDown:i(42460),JustUp:i(53162),DownDuration:i(64964),UpDuration:i(70331)}},64964:t=>{t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeDown;return t.isDown&&i{t.exports=function(t){return!!t._justDown&&(t._justDown=!1,!0)}},53162:t=>{t.exports=function(t){return!!t._justUp&&(t._justUp=!1,!0)}},50165:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(94030),o=new s({Extends:n,initialize:function(t,e){n.call(this),this.plugin=t,this.keyCode=e,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(t){return this.emitOnRepeat=t,this},onDown:function(t){this.originalEvent=t,this.enabled&&(this.altKey=t.altKey,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.location=t.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(r.DOWN,this,t):(this.isDown=!0,this.isUp=!1,this.timeDown=t.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(r.DOWN,this,t)))},onUp:function(t){this.originalEvent=t,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=t.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(r.UP,this,t))},reset:function(){return this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});t.exports=o},11873:t=>{t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},48044:(t,e,i)=>{var s=i(11873),n={};for(var r in s)n[s[r]]=r;t.exports=n},70331:t=>{t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeUp;return t.isUp&&i{var s=i(56694),n=i(90185),r=i(33963),o=i(72283),a=new s({initialize:function(t){this.manager=t,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=o,this.onMouseDown=o,this.onMouseUp=o,this.onMouseDownWindow=o,this.onMouseUpWindow=o,this.onMouseOver=o,this.onMouseOut=o,this.onMouseWheel=o,this.pointerLockChange=o,this.isTop=!0,t.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.passive=t.inputMousePassive,this.preventDefaultDown=t.inputMousePreventDefaultDown,this.preventDefaultUp=t.inputMousePreventDefaultUp,this.preventDefaultMove=t.inputMousePreventDefaultMove,this.preventDefaultWheel=t.inputMousePreventDefaultWheel,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",(function(t){return t.preventDefault(),!1})),this},requestPointerLock:function(){if(n.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},releasePointerLock:function(){n.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this.target;if(t){var e=this,i=this.manager,s=i.canvas,r=window&&window.focus&&i.game.config.autoFocus;this.onMouseMove=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseMove(t),e.preventDefaultMove&&t.preventDefault())},this.onMouseDown=function(t){r&&window.focus(),!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseDown(t),e.preventDefaultDown&&t.target===s&&t.preventDefault())},this.onMouseDownWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onMouseDown(t)},this.onMouseUp=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseUp(t),e.preventDefaultUp&&t.target===s&&t.preventDefault())},this.onMouseUpWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onMouseUp(t)},this.onMouseOver=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOver(t)},this.onMouseOut=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOut(t)},this.onMouseWheel=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onMouseWheel(t),e.preventDefaultWheel&&t.target===s&&t.preventDefault()};var o={passive:!0};if(t.addEventListener("mousemove",this.onMouseMove),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("mouseover",this.onMouseOver,o),t.addEventListener("mouseout",this.onMouseOut,o),this.preventDefaultWheel?t.addEventListener("wheel",this.onMouseWheel,{passive:!1}):t.addEventListener("wheel",this.onMouseWheel,o),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,o),window.top.addEventListener("mouseup",this.onMouseUpWindow,o)}catch(t){window.addEventListener("mousedown",this.onMouseDownWindow,o),window.addEventListener("mouseup",this.onMouseUpWindow,o),this.isTop=!1}n.pointerLock&&(this.pointerLockChange=function(t){var s=e.target;e.locked=document.pointerLockElement===s||document.mozPointerLockElement===s||document.webkitPointerLockElement===s,i.onPointerLockChange(t)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&((t=this.isTop?window.top:window).removeEventListener("mousedown",this.onMouseDownWindow),t.removeEventListener("mouseup",this.onMouseUpWindow)),n.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=a},11343:(t,e,i)=>{t.exports={MouseManager:i(7905)}},37579:(t,e,i)=>{var s=i(56694),n=i(33963),r=i(72283),o=new s({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=r,this.onTouchStartWindow=r,this.onTouchMove=r,this.onTouchEnd=r,this.onTouchEndWindow=r,this.onTouchCancel=r,this.onTouchCancelWindow=r,this.isTop=!0,t.events.once(n.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputTouch,this.target=t.inputTouchEventTarget,this.capture=t.inputTouchCapture,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",(function(t){return t.preventDefault(),!1})),this},startListeners:function(){var t=this.target;if(t){var e=this,i=this.manager,s=i.canvas,n=window&&window.focus&&i.game.config.autoFocus;this.onTouchMove=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchMove(t),e.capture&&t.cancelable&&t.preventDefault())},this.onTouchStart=function(t){n&&window.focus(),!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchStart(t),e.capture&&t.cancelable&&t.target===s&&t.preventDefault())},this.onTouchStartWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onTouchStart(t)},this.onTouchEnd=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchEnd(t),e.capture&&t.cancelable&&t.target===s&&t.preventDefault())},this.onTouchEndWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onTouchEnd(t)},this.onTouchCancel=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchCancel(t),e.capture&&t.preventDefault())},this.onTouchCancelWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onTouchCancel(t)};var r=this.capture,o={passive:!0},a={passive:!1};if(t.addEventListener("touchstart",this.onTouchStart,r?a:o),t.addEventListener("touchmove",this.onTouchMove,r?a:o),t.addEventListener("touchend",this.onTouchEnd,r?a:o),t.addEventListener("touchcancel",this.onTouchCancel,r?a:o),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,a),window.top.addEventListener("touchend",this.onTouchEndWindow,a),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,a)}catch(t){window.addEventListener("touchstart",this.onTouchStartWindow,a),window.addEventListener("touchend",this.onTouchEndWindow,a),window.addEventListener("touchcancel",this.onTouchCancelWindow,a),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("touchstart",this.onTouchStart),t.removeEventListener("touchmove",this.onTouchMove),t.removeEventListener("touchend",this.onTouchEnd),t.removeEventListener("touchcancel",this.onTouchCancel),window&&((t=this.isTop?window.top:window).removeEventListener("touchstart",this.onTouchStartWindow),t.removeEventListener("touchend",this.onTouchEndWindow),t.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=o},77423:(t,e,i)=>{t.exports={TouchManager:i(37579)}},98035:(t,e,i)=>{var s=i(56694),n=i(12117),r=i(683),o=i(72632),a=i(30750),h=i(43531),l=i(88490),u=i(33868),c=new s({initialize:function(t,e){if(this.loader=t,this.cache=o(e,"cache",!1),this.type=o(e,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=o(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.key)throw new Error("Invalid File key: "+this.key);var s=o(e,"url");void 0===s?s=t.path+i+"."+o(e,"extension",""):"string"!=typeof s||s.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(s=t.path+s),this.url=s,this.src="",this.xhrSettings=u(o(e,"responseType",void 0)),o(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,o(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?n.FILE_POPULATED:n.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=o(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===n.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=n.FILE_LOADING,this.src=a(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&this.loader.localSchemes.some((function(e){return 0===t.responseURL.indexOf(e)}))&&0===e.target.status,s=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(s=!1),this.state=n.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,s)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(r.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=n.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=n.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=n.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(t){if(this.state!==n.FILE_PENDING_DESTROY){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(r.FILE_COMPLETE,e,i,t),this.loader.emit(r.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this),this.state=n.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var s=new FileReader;s.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+s.result.split(",")[1]},s.onerror=t.onerror,s.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},76846:t=>{var e={},i={install:function(t){for(var i in e)t[i]=e[i]},register:function(t,i){e[t]=i},destroy:function(){e={}}};t.exports=i},30750:t=>{t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},67285:(t,e,i)=>{var s=i(56694),n=i(12117),r=i(58403),o=i(6659),a=i(683),h=i(76846),l=i(72632),u=i(10850),c=i(91963),d=i(7599),p=i(33868),f=new s({Extends:o,initialize:function(t){o.call(this);var e=t.sys.game.config,i=t.sys.settings.loader;this.scene=t,this.systems=t.sys,this.cacheManager=t.sys.cache,this.textureManager=t.sys.textures,this.sceneManager=t.sys.game.scene,h.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(l(i,"baseURL",e.loaderBaseURL)),this.setPath(l(i,"path",e.loaderPath)),this.setPrefix(l(i,"prefix",e.loaderPrefix)),this.maxParallelDownloads=l(i,"maxParallelDownloads",e.loaderMaxParallelDownloads),this.xhr=p(l(i,"responseType",e.loaderResponseType),l(i,"async",e.loaderAsync),l(i,"user",e.loaderUser),l(i,"password",e.loaderPassword),l(i,"timeout",e.loaderTimeout),l(i,"withCredentials",e.loaderWithCredentials)),this.crossOrigin=l(i,"crossOrigin",e.loaderCrossOrigin),this.imageLoadType=l(i,"imageLoadType",e.loaderImageLoadType),this.localSchemes=l(i,"localScheme",e.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new r,this.inflight=new r,this.queue=new r,this._deleteQueue=new r,this.totalFailed=0,this.totalComplete=0,this.state=n.LOADER_IDLE,this.multiKeyIndex=0,t.sys.events.once(d.BOOT,this.boot,this),t.sys.events.on(d.START,this.pluginStart,this)},boot:function(){this.systems.events.once(d.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(d.SHUTDOWN,this.shutdown,this)},setBaseURL:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.baseURL=t,this},setPath:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.path=t,this},setPrefix:function(t){return void 0===t&&(t=""),this.prefix=t,this},setCORS:function(t){return this.crossOrigin=t,this},addFile:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e0},isLoading:function(){return this.state===n.LOADER_LOADING||this.state===n.LOADER_PROCESSING},isReady:function(){return this.state===n.LOADER_IDLE||this.state===n.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(a.START,this),0===this.list.size?this.loadComplete():(this.state=n.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(d.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(a.PROGRESS,this.progress)},update:function(){this.state===n.LOADER_LOADING&&this.list.size>0&&this.inflight.size{var s=i(98611),n=i(33868);t.exports=function(t,e){var i=void 0===t?n():s({},t);if(e)for(var r in e)void 0!==e[r]&&(i[r]=e[r]);return i}},45176:(t,e,i)=>{var s=i(56694),n=i(12117),r=i(683),o=new s({initialize:function(t,e,i,s){var r=[];s.forEach((function(t){t&&r.push(t)})),this.loader=t,this.type=e,this.key=i,this.multiKeyIndex=t.multiKeyIndex++,this.files=r,this.state=n.FILE_PENDING,this.complete=!1,this.pending=r.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var o=0;o{var s=i(43531);t.exports=function(t,e){var i=s(e,t.xhrSettings),n=new XMLHttpRequest;if(n.open("GET",t.src,i.async,i.user,i.password),n.responseType=t.xhrSettings.responseType,n.timeout=i.timeout,i.headers)for(var r in i.headers)n.setRequestHeader(r,i.headers[r]);return i.header&&i.headerValue&&n.setRequestHeader(i.header,i.headerValue),i.requestedWith&&n.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&n.overrideMimeType(i.overrideMimeType),i.withCredentials&&(n.withCredentials=!0),n.onload=t.onLoad.bind(t,n),n.onerror=t.onError.bind(t,n),n.onprogress=t.onProgress.bind(t),n.send(),n}},33868:t=>{t.exports=function(t,e,i,s,n,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===s&&(s=""),void 0===n&&(n=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:s,timeout:n,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},12117:t=>{t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20}},7398:t=>{t.exports="addfile"},52187:t=>{t.exports="complete"},36627:t=>{t.exports="filecomplete"},81925:t=>{t.exports="filecomplete-"},29774:t=>{t.exports="loaderror"},20943:t=>{t.exports="load"},74693:t=>{t.exports="fileprogress"},71176:t=>{t.exports="postprocess"},88984:t=>{t.exports="progress"},72753:t=>{t.exports="start"},683:(t,e,i)=>{t.exports={ADD:i(7398),COMPLETE:i(52187),FILE_COMPLETE:i(36627),FILE_KEY_COMPLETE:i(81925),FILE_LOAD_ERROR:i(29774),FILE_LOAD:i(20943),FILE_PROGRESS:i(74693),POST_PROCESS:i(71176),PROGRESS:i(88984),START:i(72753)}},46468:(t,e,i)=>{var s=i(56694),n=i(76846),r=i(70806),o=i(683),a=new s({Extends:r,initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.type="animationJSON"},onProcess:function(){this.loader.once(o.POST_PROCESS,this.onLoadComplete,this),r.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});n.register("animation",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(70806),l=i(45176),u=new s({Extends:l,initialize:function(t,e,i,s,n,u){var c,d;if(a(e)){var p=e;e=r(p,"key"),c=new o(t,{key:e,url:r(p,"textureURL"),extension:r(p,"textureExtension","png"),normalMap:r(p,"normalMap"),xhrSettings:r(p,"textureXhrSettings")}),d=new h(t,{key:e,url:r(p,"atlasURL"),extension:r(p,"atlasExtension","json"),xhrSettings:r(p,"atlasXhrSettings")})}else c=new o(t,e,i,n),d=new h(t,e,s,u);c.linkFile?l.call(this,t,"atlasjson",e,[c,d,c.linkFile]):l.call(this,t,"atlasjson",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),e.addToCache(),this.complete=!0}}});n.register("aseprite",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(70806),l=i(45176),u=new s({Extends:l,initialize:function(t,e,i,s,n,u){var c,d;if(a(e)){var p=e;e=r(p,"key"),c=new o(t,{key:e,url:r(p,"textureURL"),extension:r(p,"textureExtension","png"),normalMap:r(p,"normalMap"),xhrSettings:r(p,"textureXhrSettings")}),d=new h(t,{key:e,url:r(p,"atlasURL"),extension:r(p,"atlasExtension","json"),xhrSettings:r(p,"atlasXhrSettings")})}else c=new o(t,e,i,n),d=new h(t,e,s,u);c.linkFile?l.call(this,t,"atlasjson",e,[c,d,c.linkFile]):l.call(this,t,"atlasjson",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),this.complete=!0}}});n.register("atlas",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(45176),l=i(15297),u=new s({Extends:h,initialize:function(t,e,i,s,n,u){var c,d;if(a(e)){var p=e;e=r(p,"key"),c=new o(t,{key:e,url:r(p,"textureURL"),extension:r(p,"textureExtension","png"),normalMap:r(p,"normalMap"),xhrSettings:r(p,"textureXhrSettings")}),d=new l(t,{key:e,url:r(p,"atlasURL"),extension:r(p,"atlasExtension","xml"),xhrSettings:r(p,"atlasXhrSettings")})}else c=new o(t,e,i,n),d=new l(t,e,s,u);c.linkFile?h.call(this,t,"atlasxml",e,[c,d,c.linkFile]):h.call(this,t,"atlasxml",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(t.key,t.data,e.data,i),this.complete=!0}}});n.register("atlasXML",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(30929),l=i(42911),u=new s({Extends:r,initialize:function(t,e,i,s,n){if(l(e)){var o=e;e=a(o,"key"),s=a(o,"xhrSettings"),n=a(o,"context",n)}var h={type:"audio",cache:t.cacheManager.audio,extension:i.type,responseType:"arraybuffer",key:e,url:i.url,xhrSettings:s,config:{context:n}};r.call(this,t,h)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this;this.config.context.decodeAudioData(this.xhrLoader.response,(function(e){t.data=e,t.onProcessComplete()}),(function(e){console.error("Error decoding audio: "+t.key+" - ",e?e.message:null),t.onProcessError()})),this.config.context=null}});u.create=function(t,e,i,s,n){var r=t.systems.game,o=r.config.audio,c=r.device.audio;l(e)&&(i=a(e,"url",[]),s=a(e,"config",{}));var d=u.getAudioURL(r,i);return d?c.webAudio&&!o.disableWebAudio?new u(t,e,d,n,r.sound.context):new h(t,e,d,s):null},u.getAudioURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i{var s=i(67448),n=i(56694),r=i(76846),o=i(72632),a=i(42911),h=i(70806),l=i(45176),u=new n({Extends:l,initialize:function(t,e,i,n,r,u,c){if(a(e)){var d=e;e=o(d,"key"),i=o(d,"jsonURL"),n=o(d,"audioURL"),r=o(d,"audioConfig"),u=o(d,"audioXhrSettings"),c=o(d,"jsonXhrSettings")}var p;if(n){var f=s.create(t,e,n,r,u);f&&(p=new h(t,e,i,c),l.call(this,t,"audiosprite",e,[f,p]),this.config.resourceLoad=!1)}else p=new h(t,e,i,c),l.call(this,t,"audiosprite",e,[p]),this.config.resourceLoad=!0,this.config.audioConfig=r,this.config.audioXhrSettings=u},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,this.config.resourceLoad&&"json"===t.type&&t.data.hasOwnProperty("resources"))){var e=t.data.resources,i=o(this.config,"audioConfig"),n=o(this.config,"audioXhrSettings"),r=s.create(this.loader,t.key,e,i,n);r&&(this.addToMultiFile(r),this.loader.addFile(r))}},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache(),e.addToCache(),this.complete=!0}}});r.register("audioSprite",(function(t,e,i,s,n,r){var o,a=this.systems.game,h=a.config.audio,l=a.device.audio;if(h&&h.noAudio||!l.webAudio&&!l.audioData)return this;if(Array.isArray(t))for(var c=0;c{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n){var o="bin";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),s=a(l,"xhrSettings"),o=a(l,"extension",o),n=a(l,"dataType",n)}var u={type:"binary",cache:t.cacheManager.binary,extension:o,responseType:"arraybuffer",key:e,url:i,xhrSettings:s,config:{dataType:n}};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this.config.dataType;this.data=t?new t(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});o.register("binary",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(45176),l=i(31476),u=i(15297),c=new s({Extends:h,initialize:function(t,e,i,s,n,l){var c,d;if(a(e)){var p=e;e=r(p,"key"),c=new o(t,{key:e,url:r(p,"textureURL"),extension:r(p,"textureExtension","png"),normalMap:r(p,"normalMap"),xhrSettings:r(p,"textureXhrSettings")}),d=new u(t,{key:e,url:r(p,"fontDataURL"),extension:r(p,"fontDataExtension","xml"),xhrSettings:r(p,"fontDataXhrSettings")})}else c=new o(t,e,i,n),d=new u(t,e,s,l);c.linkFile?h.call(this,t,"bitmapfont",e,[c,d,c.linkFile]):h.call(this,t,"bitmapfont",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache();var i=t.cache.get(t.key),s=l(e.data,t.cache.getFrame(t.key),0,0,i);this.loader.cacheManager.bitmapFont.add(t.key,{data:s,texture:t.key,frame:null}),this.complete=!0}}});n.register("bitmapFont",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="css";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var l={type:"script",cache:!1,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});o.register("css",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(73152),n=i(40612),r=i(56694),o=i(76846),a=i(72632),h=i(42927),l=i(42911),u=i(70806),c=i(67409),d=i(30657),p=i(80802),f=i(45176),v=i(24904),g=new r({Extends:f,initialize:function(t,e,i,s){if(i.multiAtlasURL){var r=new u(t,{key:e,url:i.multiAtlasURL,xhrSettings:s,config:i});f.call(this,t,"texture",e,[r])}else{var o=i.textureURL.substr(i.textureURL.length-3);i.type||(i.type="ktx"===o.toLowerCase()?"KTX":"PVR");var a=new n(t,{key:e,url:i.textureURL,extension:o,xhrSettings:s,config:i});if(i.atlasURL){var h=new u(t,{key:e,url:i.atlasURL,xhrSettings:s,config:i});f.call(this,t,"texture",e,[a,h])}else f.call(this,t,"texture",e,[a])}this.config=i},onFileComplete:function(t){if(-1!==this.files.indexOf(t)){if(this.pending--,!this.config.multiAtlasURL)return;if("json"===t.type&&t.data.hasOwnProperty("textures")){var e=t.data.textures,i=this.config,s=this.loader,r=s.baseURL,o=s.path,h=s.prefix,l=a(i,"multiBaseURL",this.baseURL),u=a(i,"multiPath",this.path),c=a(i,"prefix",this.prefix),d=a(i,"textureXhrSettings");l&&s.setBaseURL(l),u&&s.setPath(u),c&&s.setPrefix(c);for(var p=0;p{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=i(31053),u=new s({Extends:r,initialize:function(t,e,i,s,n){var o="glsl";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),s=a(l,"shaderType","fragment"),n=a(l,"xhrSettings"),o=a(l,"extension",o)}else void 0===s&&(s="fragment");var u={type:"glsl",cache:t.cacheManager.shader,extension:o,responseType:"text",key:e,url:i,config:{shaderType:s},xhrSettings:n};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.split("\n"),e=this.extractBlock(t,0);if(e)for(;e;){var i=this.getShaderName(e.header),s=this.getShaderType(e.header),n=this.getShaderUniforms(e.header),r=e.shader;if(this.cache.has(i)){var o=this.cache.get(i);"fragment"===s?o.fragmentSrc=r:o.vertexSrc=r,o.uniforms||(o.uniforms=n)}else"fragment"===s?this.cache.add(i,new l(i,r,"",n)):this.cache.add(i,new l(i,"",r,n));e=this.extractBlock(t,e.offset)}else"fragment"===this.config.shaderType?this.cache.add(this.key,new l(this.key,this.data)):this.cache.add(this.key,new l(this.key,"",this.data))},getShaderName:function(t){for(var e=0;e{var s=i(56694),n=i(683),r=i(98035),o=i(72632),a=i(30750),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){if(h(e)){var n=e;e=o(n,"key"),s=o(n,"config",s)}var a={type:"audio",cache:t.cacheManager.audio,extension:i.type,key:e,url:i.url,config:s};r.call(this,t,a),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="html";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var l={type:"text",cache:t.cacheManager.html,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("html",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n,o){void 0===s&&(s=512),void 0===n&&(n=512);var l="html";if(h(e)){var u=e;e=a(u,"key"),i=a(u,"url"),o=a(u,"xhrSettings"),l=a(u,"extension",l),s=a(u,"width",s),n=a(u,"height",n)}var c={type:"html",cache:t.textureManager,extension:l,responseType:"text",key:e,url:i,xhrSettings:o,config:{width:s,height:n}};r.call(this,t,c)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this.config.width,e=this.config.height,i=[];i.push(''),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var s=[i.join("\n")],o=this;try{var a=new window.Blob(s,{type:"image/svg+xml;charset=utf-8"})}catch(t){return o.state=n.FILE_ERRORED,void o.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(o.data),o.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(o.data),o.onProcessError()},r.createObjectURL(this.data,a,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});o.register("htmlTexture",(function(t,e,i,s,n){if(Array.isArray(t))for(var r=0;r{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=i(30750),u=new s({Extends:r,initialize:function t(e,i,s,n,o){var l,u="png";if(h(i)){var c=i;i=a(c,"key"),s=a(c,"url"),l=a(c,"normalMap"),n=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"frameConfig")}Array.isArray(s)&&(l=s[1],s=s[0]);var d={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:s,xhrSettings:n,config:o};if(r.call(this,e,d),l){var p=new t(e,this.key,l,n,o);p.type="normalMap",this.setLink(p),e.addFile(p)}this.useImageElementLoad="HTMLImageElement"===e.imageLoadType,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){r.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(t.data),t.onProcessError()},r.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=n.FILE_PROCESSING,t===n.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){if(this.state=n.FILE_LOADING,this.src=l(this,this.loader.baseURL),0===this.src.indexOf("data:"))console.warn("Local data URIs are not supported: "+this.key);else{this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=n.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src}},addToCache:function(){var t=this.linkFile;t?t.state>=n.FILE_COMPLETE&&("normalMap"===this.type?this.cache.addImage(this.key,t.data,this.data):this.cache.addImage(this.key,this.data,t.data)):this.cache.addImage(this.key,this.data)}});o.register("image",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(10850),l=i(42911),u=new s({Extends:r,initialize:function(t,e,i,s,o){var u="json";if(l(e)){var c=e;e=a(c,"key"),i=a(c,"url"),s=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"dataKey",o)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:s,config:o};r.call(this,t,d),l(i)&&(this.data=o?h(i,o):i,this.state=n.FILE_POPULATED)},onProcess:function(){if(this.state!==n.FILE_POPULATED){this.state=n.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});o.register("json",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(70806),l=i(45176),u=new s({Extends:l,initialize:function(t,e,i,s,n,o,u){if(a(e)){var c=e;e=r(c,"key"),i=r(c,"url",!1)?r(c,"url"):r(c,"atlasURL"),o=r(c,"xhrSettings"),s=r(c,"path"),n=r(c,"baseURL"),u=r(c,"textureXhrSettings")}var d=new h(t,e,i,o);l.call(this,t,"multiatlas",e,[d]),this.config.path=s,this.config.baseURL=n,this.config.textureXhrSettings=u},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"json"===t.type&&t.data.hasOwnProperty("textures"))){var e=t.data.textures,i=this.config,s=this.loader,n=s.baseURL,a=s.path,h=s.prefix,l=r(i,"baseURL",this.baseURL),u=r(i,"path",this.path),c=r(i,"prefix",this.prefix),d=r(i,"textureXhrSettings");s.setBaseURL(l),s.setPath(u),s.setPrefix(c);for(var p=0;p{var s=i(56694),n=i(76846),r=i(72632),o=i(42911),a=i(45176),h=i(55188),l=new s({Extends:a,initialize:function(t,e,i,s){var n="js",l=[];if(o(e)){var u=e;e=r(u,"key"),i=r(u,"url"),s=r(u,"xhrSettings"),n=r(u,"extension",n)}Array.isArray(i)||(i=[i]);for(var c=0;c{var s=i(56694),n=i(76846),r=i(72632),o=i(42911),a=i(45176),h=i(27291),l=i(76799),u=i(86897),c=new s({Extends:a,initialize:function(t,e,i,s,n,h){var l,c,d=t.cacheManager.obj;if(o(e)){var p=e;e=r(p,"key"),l=new u(t,{key:e,type:"obj",cache:d,url:r(p,"url"),extension:r(p,"extension","obj"),xhrSettings:r(p,"xhrSettings"),config:{flipUV:r(p,"flipUV",n)}}),(s=r(p,"matURL"))&&(c=new u(t,{key:e,type:"mat",cache:d,url:s,extension:r(p,"matExtension","mat"),xhrSettings:r(p,"xhrSettings")}))}else l=new u(t,{key:e,url:i,type:"obj",cache:d,extension:"obj",xhrSettings:h,config:{flipUV:n}}),s&&(c=new u(t,{key:e,url:s,type:"mat",cache:d,extension:"mat",xhrSettings:h}));a.call(this,t,"obj",e,[l,c])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=h(t.data,t.config.flipUV);e&&(i.materials=l(e.data)),t.cache.add(t.key,i),this.complete=!0}}});n.register("obj",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(12117),r=i(76846),o=i(70806),a=new s({Extends:o,initialize:function(t,e,i,s,n){o.call(this,t,e,i,s,n),this.type="packfile"},onProcess:function(){if(this.state!==n.FILE_POPULATED&&(this.state=n.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var t={};t[this.config]=this.data,this.data=t}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});r.register("pack",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,o,l){var u="js";if(h(e)){var c=e;e=a(c,"key"),i=a(c,"url"),l=a(c,"xhrSettings"),u=a(c,"extension",u),s=a(c,"start"),o=a(c,"mapping")}var d={type:"plugin",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:l,config:{start:s,mapping:o}};r.call(this,t,d),"function"==typeof i&&(this.data=i,this.state=n.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=a(e,"start",!1),s=a(e,"mapping",null);if(this.state===n.FILE_POPULATED)t.install(this.key,this.data,i,s);else{this.state=n.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var r=t.install(this.key,window[this.key],i,s);(i||s)&&(this.loader.systems[s]=r,this.loader.scene[s]=r)}this.onProcessComplete()}});o.register("plugin",(function(t,e,i,s,n){if(Array.isArray(t))for(var r=0;r{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n){var o="svg";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),s=a(l,"svgConfig",{}),n=a(l,"xhrSettings"),o=a(l,"extension",o)}var u={type:"svg",cache:t.textureManager,extension:o,responseType:"text",key:e,url:i,xhrSettings:n,config:{width:a(s,"width"),height:a(s,"height"),scale:a(s,"scale")}};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this.xhrLoader.responseText,e=[t],i=this.config.width,s=this.config.height,o=this.config.scale;t:if(i&&s||o){var a=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("svg")[0],h=a.hasAttribute("viewBox"),l=parseFloat(a.getAttribute("width")),u=parseFloat(a.getAttribute("height"));if(!h&&l&&u)a.setAttribute("viewBox","0 0 "+l+" "+u);else if(h&&!l&&!u){var c=a.getAttribute("viewBox").split(/\s+|,/);l=c[2],u=c[3]}if(o){if(!l||!u)break t;i=l*o,s=u*o}a.setAttribute("width",i.toString()+"px"),a.setAttribute("height",s.toString()+"px"),e=[(new XMLSerializer).serializeToString(a)]}try{var d=new window.Blob(e,{type:"image/svg+xml;charset=utf-8"})}catch(t){return void this.onProcessError()}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var p=this,f=!1;this.data.onload=function(){f||r.revokeObjectURL(p.data),p.onProcessComplete()},this.data.onerror=function(){f?p.onProcessError():(f=!0,r.revokeObjectURL(p.data),p.data.src="data:image/svg+xml,"+encodeURIComponent(e.join("")))},r.createObjectURL(this.data,d,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});o.register("svg",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="js";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var l={type:"text",extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.concat("(function(){\nreturn new "+this.key+"();\n}).call(this);"),e=eval;this.loader.sceneManager.add(this.key,e(t)),this.complete=!0}});o.register("sceneFile",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,o,l){var u="js";if(h(e)){var c=e;e=a(c,"key"),i=a(c,"url"),l=a(c,"xhrSettings"),u=a(c,"extension",u),s=a(c,"systemKey"),o=a(c,"sceneKey")}var d={type:"scenePlugin",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:l,config:{systemKey:s,sceneKey:o}};r.call(this,t,d),"function"==typeof i&&(this.data=i,this.state=n.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=this.key,s=a(e,"systemKey",i),r=a(e,"sceneKey",i);this.state===n.FILE_POPULATED?t.installScenePlugin(s,this.data,r,this.loader.scene,!0):(this.state=n.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),t.installScenePlugin(s,window[this.key],r,this.loader.scene,!0)),this.onProcessComplete()}});o.register("scenePlugin",(function(t,e,i,s,n){if(Array.isArray(t))for(var r=0;r{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n){var o="js";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),s=a(l,"type","script"),n=a(l,"xhrSettings"),o=a(l,"extension",o)}else void 0===s&&(s="script");var u={type:s,cache:!1,extension:o,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});o.register("script",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(42927),o=new s({Extends:r,initialize:function(t,e,i,s,n){r.call(this,t,e,i,n,s),this.type="spritesheet"},addToCache:function(){this.cache.addSpriteSheet(this.key,this.data,this.config)}});n.register("spritesheet",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="text",o="txt",l=t.cacheManager.text;if(h(e)){var u=e;e=a(u,"key"),i=a(u,"url"),s=a(u,"xhrSettings"),o=a(u,"extension",o),n=a(u,"type",n),l=a(u,"cache",l)}var c={type:n,cache:l,extension:o,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,c)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("text",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=i(93560),u=new s({Extends:r,initialize:function(t,e,i,s){var n="csv";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var u={type:"tilemapCSV",cache:t.cacheManager.tilemap,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,u),this.tilemapFormat=l.CSV},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,t)}});o.register("tilemapCSV",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(76846),r=i(70806),o=i(93560),a=new s({Extends:r,initialize:function(t,e,i,s){r.call(this,t,e,i,s),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:o.WELTMEISTER,data:this.data};this.cache.add(this.key,t)}});n.register("tilemapImpact",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(76846),r=i(70806),o=i(93560),a=new s({Extends:r,initialize:function(t,e,i,s){r.call(this,t,e,i,s),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:o.TILED_JSON,data:this.data};this.cache.add(this.key,t)}});n.register("tilemapTiledJSON",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(45176),l=i(86897),u=new s({Extends:h,initialize:function(t,e,i,s,n,u){var c,d;if(a(e)){var p=e;e=r(p,"key"),c=new o(t,{key:e,url:r(p,"textureURL"),extension:r(p,"textureExtension","png"),normalMap:r(p,"normalMap"),xhrSettings:r(p,"textureXhrSettings")}),d=new l(t,{key:e,url:r(p,"atlasURL"),extension:r(p,"atlasExtension","txt"),xhrSettings:r(p,"atlasXhrSettings")})}else c=new o(t,e,i,n),d=new l(t,e,s,u);c.linkFile?h.call(this,t,"unityatlas",e,[c,d,c.linkFile]):h.call(this,t,"unityatlas",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(t.key,t.data,e.data,i),this.complete=!0}}});n.register("unityAtlas",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(30750),h=i(72632),l=i(42911),u=new s({Extends:r,initialize:function(t,e,i,s,n,o,a){void 0===s&&(s="loadeddata"),void 0===n&&(n=!1),void 0===o&&(o=!1),"loadeddata"!==s&&"canplay"!==s&&"canplaythrough"!==s&&(s="loadeddata");var h={type:"video",cache:t.cacheManager.video,extension:i.type,responseType:"blob",key:e,url:i.url,xhrSettings:a,config:{loadEvent:s,asBlob:n,noAudio:o}};this.onLoadCallback=this.onVideoLoadHandler.bind(this),this.onErrorCallback=this.onVideoErrorHandler.bind(this),r.call(this,t,h)},onProcess:function(){if(this.state=n.FILE_PROCESSING,this.config.asBlob){var t=this.createVideoElement();this.data=t;var e=this;this.data.onloadeddata=function(){e.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(e.data),e.onProcessError()},r.createObjectURL(t,this.xhrLoader.response,""),t.load()}else this.onProcessComplete()},createVideoElement:function(){var t=document.createElement("video");return t.controls=!1,t.crossOrigin=this.loader.crossOrigin,this.config.noAudio&&(t.muted=!0,t.defaultMuted=!0,t.setAttribute("autoplay","autoplay")),t.setAttribute("playsinline","playsinline"),t.setAttribute("preload","auto"),t},onVideoLoadHandler:function(t){var e=t.target;e.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),e.removeEventListener("error",this.onErrorCallback,!0),this.data=e,this.resetXHR(),this.loader.nextFile(this,!0)},onVideoErrorHandler:function(t){var e=t.target;e&&(e.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),e.removeEventListener("error",this.onErrorCallback,!0)),this.resetXHR(),this.loader.nextFile(this,!1)},load:function(){var t=this.config.loadEvent;if(this.config.asBlob)r.prototype.load.call(this);else{this.percentComplete=0;var e=this.createVideoElement();e.addEventListener(t,this.onLoadCallback,!0),e.addEventListener("error",this.onErrorCallback,!0),e.src=a(this,this.loader.baseURL),e.load()}}});u.create=function(t,e,i,s,n,r,o){var a=t.systems.game;l(e)&&(i=h(e,"url",[]),s=h(e,"loadEvent","loadeddata"),n=h(e,"asBlob",!1),r=h(e,"noAudio",!1),o=h(e,"xhrSettings"),e=h(e,"key"));var c=u.getVideoURL(a,i);if(c)return new u(t,e,c,s,n,r,o)},u.getVideoURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=i(89200),u=new s({Extends:r,initialize:function(t,e,i,s){var n="xml";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var l={type:"xml",cache:t.cacheManager.xml,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});o.register("xml",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{t.exports={AnimationJSONFile:i(46468),AsepriteFile:i(31648),AtlasJSONFile:i(73152),AtlasXMLFile:i(24616),AudioFile:i(67448),AudioSpriteFile:i(66109),BinaryFile:i(40612),BitmapFontFile:i(54565),CompressedTextureFile:i(47375),CSSFile:i(99898),GLSLFile:i(46568),HTML5AudioFile:i(30929),HTMLFile:i(77459),HTMLTextureFile:i(9755),ImageFile:i(42927),JSONFile:i(70806),MultiAtlasFile:i(80802),MultiScriptFile:i(39034),OBJFile:i(85527),PackFile:i(3616),PluginFile:i(12217),SceneFile:i(95171),ScenePluginFile:i(82458),ScriptFile:i(55188),SpriteSheetFile:i(33536),SVGFile:i(4474),TextFile:i(86897),TilemapCSVFile:i(58673),TilemapImpactFile:i(98896),TilemapJSONFile:i(50563),UnityAtlasFile:i(82857),VideoFile:i(22833),XMLFile:i(15297)}},95695:(t,e,i)=>{var s=i(12117),n=i(98611),r={Events:i(683),FileTypes:i(34034),File:i(98035),FileTypesManager:i(76846),GetURL:i(30750),LoaderPlugin:i(67285),MergeXHRSettings:i(43531),MultiFile:i(45176),XHRLoader:i(88490),XHRSettings:i(33868)};r=n(!1,r,s),t.exports=r},26042:t=>{t.exports=function(t){for(var e=0,i=0;i{var s=i(8034);t.exports=function(t,e){return s(t)/s(e)/s(t-e)}},17489:t=>{t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},14976:t=>{t.exports=function(t,e,i,s,n){var r=.5*(s-e),o=.5*(n-i),a=t*t;return(2*i-2*s+r+o)*(t*a)+(-3*i+3*s-2*r-o)*a+r*t+i}},89129:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.ceil(t*s)/s}},82897:t=>{t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},75606:(t,e,i)=>{var s=i(83392);t.exports=function(t){return t*s.DEG_TO_RAD}},767:t=>{t.exports=function(t,e){return Math.abs(t-e)}},9849:(t,e,i)=>{var s=i(82897),n=i(56694),r=i(16650),o=i(72283),a=new r,h=new n({initialize:function t(e,i,s,n){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=t.DefaultOrder),this._x=e,this._y=i,this._z=s,this._order=n,this.onChangeCallback=o},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,s){return void 0===s&&(s=this._order),this._x=t,this._y=e,this._z=i,this._order=s,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),a.fromQuat(t),this.setFromRotationMatrix(a,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var n=t.val,r=n[0],o=n[4],a=n[8],h=n[1],l=n[5],u=n[9],c=n[2],d=n[6],p=n[10],f=0,v=0,g=0,m=.99999;switch(e){case"XYZ":v=Math.asin(s(a,-1,1)),Math.abs(a){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},61616:t=>{t.exports=function(t,e){return Math.random()*(e-t)+t}},60679:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.floor(t*s)/s}},91806:(t,e,i)=>{var s=i(82897);t.exports=function(t,e,i){return(i-e)*(t=s(t,0,1))+e}},79366:t=>{t.exports=function(t,e){return t/e/1e3}},43776:t=>{t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},58442:t=>{t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},42798:t=>{t.exports=function(t,e,i){return(e-t)*i+t}},61072:t=>{t.exports=function(t,e,i){return void 0===i&&(i=0),t.clone().lerp(e,i)}},5341:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new s(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=s,this},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*n+o*a,d=h*n-r*a,p=e*u+i*c+s*d;return p?(p=1/p,t[0]=u*p,t[1]=(-l*i+s*h)*p,t[2]=(o*i-s*r)*p,t[3]=c*p,t[4]=(l*e-s*a)*p,t[5]=(-o*e+s*n)*p,t[6]=d*p,t[7]=(-h*e+i*a)*p,t[8]=(r*e-i*n)*p,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=s*h-i*l,t[2]=i*o-s*r,t[3]=o*a-n*l,t[4]=e*l-s*a,t[5]=s*n-e*o,t[6]=n*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*n,this},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*n+o*a)+s*(h*n-r*a)},multiply:function(t){var e=this.val,i=e[0],s=e[1],n=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],p=c[1],f=c[2],v=c[3],g=c[4],m=c[5],y=c[6],x=c[7],T=c[8];return e[0]=d*i+p*r+f*h,e[1]=d*s+p*o+f*l,e[2]=d*n+p*a+f*u,e[3]=v*i+g*r+m*h,e[4]=v*s+g*o+m*l,e[5]=v*n+g*a+m*u,e[6]=y*i+x*r+T*h,e[7]=y*s+x*o+T*l,e[8]=y*n+x*a+T*u,this},translate:function(t){var e=this.val,i=t.x,s=t.y;return e[6]=i*e[0]+s*e[3]+e[6],e[7]=i*e[1]+s*e[4]+e[7],e[8]=i*e[2]+s*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],s=e[1],n=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*s+h*o,e[2]=l*n+h*a,e[3]=l*r-h*i,e[4]=l*o-h*s,e[5]=l*a-h*n,this},scale:function(t){var e=this.val,i=t.x,s=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=s*e[3],e[4]=s*e[4],e[5]=s*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,s=t.z,n=t.w,r=e+e,o=i+i,a=s+s,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,p=s*a,f=n*r,v=n*o,g=n*a,m=this.val;return m[0]=1-(c+p),m[3]=l+g,m[6]=u-v,m[1]=l-g,m[4]=1-(h+p),m[7]=d+f,m[2]=u+v,m[5]=d-f,m[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,s=e[0],n=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],p=e[10],f=e[11],v=e[12],g=e[13],m=e[14],y=e[15],x=s*h-n*a,T=s*l-r*a,w=s*u-o*a,b=n*l-r*h,E=n*u-o*h,S=r*u-o*l,A=c*g-d*v,_=c*m-p*v,C=c*y-f*v,M=d*m-p*g,R=d*y-f*g,P=p*y-f*m,O=x*P-T*R+w*M+b*C-E*_+S*A;return O?(O=1/O,i[0]=(h*P-l*R+u*M)*O,i[1]=(l*C-a*P-u*_)*O,i[2]=(a*R-h*C+u*A)*O,i[3]=(r*R-n*P-o*M)*O,i[4]=(s*P-r*C+o*_)*O,i[5]=(n*C-s*R-o*A)*O,i[6]=(g*S-m*E+y*b)*O,i[7]=(m*w-v*S-y*T)*O,i[8]=(v*E-g*w+y*x)*O,this):null}});t.exports=s},16650:(t,e,i)=>{var s=i(56694),n=i(70015),r=1e-6,o=new s({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new o(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,s,n,r,o,a,h,l,u,c,d,p,f,v){var g=this.val;return g[0]=t,g[1]=e,g[2]=i,g[3]=s,g[4]=n,g[5]=r,g[6]=o,g[7]=a,g[8]=h,g[9]=l,g[10]=u,g[11]=c,g[12]=d,g[13]=p,g[14]=f,g[15]=v,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var s=a.fromQuat(i).val,n=e.x,r=e.y,o=e.z;return this.setValues(s[0]*n,s[1]*n,s[2]*n,0,s[4]*r,s[5]*r,s[6]*r,0,s[8]*o,s[9]*o,s[10]*o,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var s=this.val;return s[12]=t,s[13]=e,s[14]=i,this},scaling:function(t,e,i){this.zero();var s=this.val;return s[0]=t,s[5]=e,s[10]=i,s[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[3],n=t[6],r=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=n,t[11]=t[14],t[12]=s,t[13]=r,t[14]=o,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],p=t[12],f=t[13],v=t[14],g=t[15],m=e*o-i*r,y=e*a-s*r,x=e*h-n*r,T=i*a-s*o,w=i*h-n*o,b=s*h-n*a,E=l*f-u*p,S=l*v-c*p,A=l*g-d*p,_=u*v-c*f,C=u*g-d*f,M=c*g-d*v,R=m*M-y*C+x*_+T*A-w*S+b*E;return R?(R=1/R,this.setValues((o*M-a*C+h*_)*R,(s*C-i*M-n*_)*R,(f*b-v*w+g*T)*R,(c*w-u*b-d*T)*R,(a*A-r*M-h*S)*R,(e*M-s*A+n*S)*R,(v*x-p*b-g*y)*R,(l*b-c*x+d*y)*R,(r*C-o*A+h*E)*R,(i*A-e*C-n*E)*R,(p*w-f*x+g*m)*R,(u*x-l*w-d*m)*R,(o*S-r*_-a*E)*R,(e*_-i*S+s*E)*R,(f*y-p*T-v*m)*R,(l*T-u*y+c*m)*R)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],p=t[12],f=t[13],v=t[14],g=t[15];return this.setValues(o*(c*g-d*v)-u*(a*g-h*v)+f*(a*d-h*c),-(i*(c*g-d*v)-u*(s*g-n*v)+f*(s*d-n*c)),i*(a*g-h*v)-o*(s*g-n*v)+f*(s*h-n*a),-(i*(a*d-h*c)-o*(s*d-n*c)+u*(s*h-n*a)),-(r*(c*g-d*v)-l*(a*g-h*v)+p*(a*d-h*c)),e*(c*g-d*v)-l*(s*g-n*v)+p*(s*d-n*c),-(e*(a*g-h*v)-r*(s*g-n*v)+p*(s*h-n*a)),e*(a*d-h*c)-r*(s*d-n*c)+l*(s*h-n*a),r*(u*g-d*f)-l*(o*g-h*f)+p*(o*d-h*u),-(e*(u*g-d*f)-l*(i*g-n*f)+p*(i*d-n*u)),e*(o*g-h*f)-r*(i*g-n*f)+p*(i*h-n*o),-(e*(o*d-h*u)-r*(i*d-n*u)+l*(i*h-n*o)),-(r*(u*v-c*f)-l*(o*v-a*f)+p*(o*c-a*u)),e*(u*v-c*f)-l*(i*v-s*f)+p*(i*c-s*u),-(e*(o*v-a*f)-r*(i*v-s*f)+p*(i*a-s*o)),e*(o*c-a*u)-r*(i*c-s*u)+l*(i*a-s*o))},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],p=t[12],f=t[13],v=t[14],g=t[15];return(e*o-i*r)*(c*g-d*v)-(e*a-s*r)*(u*g-d*f)+(e*h-n*r)*(u*v-c*f)+(i*a-s*o)*(l*g-d*p)-(i*h-n*o)*(l*v-c*p)+(s*h-n*a)*(l*f-u*p)},multiply:function(t){var e=this.val,i=e[0],s=e[1],n=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],p=e[11],f=e[12],v=e[13],g=e[14],m=e[15],y=t.val,x=y[0],T=y[1],w=y[2],b=y[3];return e[0]=x*i+T*o+w*u+b*f,e[1]=x*s+T*a+w*c+b*v,e[2]=x*n+T*h+w*d+b*g,e[3]=x*r+T*l+w*p+b*m,x=y[4],T=y[5],w=y[6],b=y[7],e[4]=x*i+T*o+w*u+b*f,e[5]=x*s+T*a+w*c+b*v,e[6]=x*n+T*h+w*d+b*g,e[7]=x*r+T*l+w*p+b*m,x=y[8],T=y[9],w=y[10],b=y[11],e[8]=x*i+T*o+w*u+b*f,e[9]=x*s+T*a+w*c+b*v,e[10]=x*n+T*h+w*d+b*g,e[11]=x*r+T*l+w*p+b*m,x=y[12],T=y[13],w=y[14],b=y[15],e[12]=x*i+T*o+w*u+b*f,e[13]=x*s+T*a+w*c+b*v,e[14]=x*n+T*h+w*d+b*g,e[15]=x*r+T*l+w*p+b*m,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,s=e.val,n=i[0],r=i[4],o=i[8],a=i[12],h=i[1],l=i[5],u=i[9],c=i[13],d=i[2],p=i[6],f=i[10],v=i[14],g=i[3],m=i[7],y=i[11],x=i[15],T=s[0],w=s[4],b=s[8],E=s[12],S=s[1],A=s[5],_=s[9],C=s[13],M=s[2],R=s[6],P=s[10],O=s[14],L=s[3],F=s[7],D=s[11],k=s[15];return this.setValues(n*T+r*S+o*M+a*L,h*T+l*S+u*M+c*L,d*T+p*S+f*M+v*L,g*T+m*S+y*M+x*L,n*w+r*A+o*R+a*F,h*w+l*A+u*R+c*F,d*w+p*A+f*R+v*F,g*w+m*A+y*R+x*F,n*b+r*_+o*P+a*D,h*b+l*_+u*P+c*D,d*b+p*_+f*P+v*D,g*b+m*_+y*P+x*D,n*E+r*C+o*O+a*k,h*E+l*C+u*O+c*k,d*E+p*C+f*O+v*k,g*E+m*C+y*O+x*k)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var s=this.val;return s[12]=s[0]*t+s[4]*e+s[8]*i+s[12],s[13]=s[1]*t+s[5]*e+s[9]*i+s[13],s[14]=s[2]*t+s[6]*e+s[10]*i+s[14],s[15]=s[3]*t+s[7]*e+s[11]*i+s[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var s=this.val;return s[0]=s[0]*t,s[1]=s[1]*t,s[2]=s[2]*t,s[3]=s[3]*t,s[4]=s[4]*e,s[5]=s[5]*e,s[6]=s[6]*e,s[7]=s[7]*e,s[8]=s[8]*i,s[9]=s[9]*i,s[10]=s[10]*i,s[11]=s[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),s=Math.sin(e),n=1-i,r=t.x,o=t.y,a=t.z,h=n*r,l=n*o;return this.setValues(h*r+i,h*o-s*a,h*a+s*o,0,h*o+s*a,l*o+i,l*a-s*r,0,h*a-s*o,l*a+s*r,n*a*a+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,s=e.x,n=e.y,o=e.z,a=Math.sqrt(s*s+n*n+o*o);if(Math.abs(a){t.exports=function(t,e,i){return Math.min(t+e,i)}},37394:t=>{t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort((function(t,e){return t-e}));var i=Math.floor(e/2);return e%2==0?(t[i]+t[i-1])/2:t[i]}},17259:t=>{t.exports=function(t,e,i){return Math.max(t-e,i)}},61820:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=e+1);var n=(t-e)/(i-e);return n>1?void 0!==s?(n=(s-t)/(s-i))<0&&(n=0):n=1:n<0&&(n=0),n}},75003:(t,e,i)=>{var s=i(56694),n=i(5341),r=i(72283),o=i(70015),a=1e-6,h=new Int8Array([1,2,0]),l=new Float32Array([0,0,0]),u=new o(1,0,0),c=new o(0,1,0),d=new o,p=new n,f=new s({initialize:function(t,e,i,s){this.onChangeCallback=r,this.set(t,e,i,s)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,s,n){return void 0===n&&(n=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=s||0),n&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,n=t*t+e*e+i*i+s*s;return n>0&&(n=1/Math.sqrt(n),this._x=t*n,this._y=e*n,this._z=i*n,this._w=s*n),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,n=this.z,r=this.w;return this.set(i+e*(t.x-i),s+e*(t.y-s),n+e*(t.z-n),r+e*(t.w-r))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(d.copy(u).cross(t).length().999999?this.set(0,0,0,1):(d.copy(t).cross(e),this._x=d.x,this._y=d.y,this._z=d.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var s=p.val;return s[0]=e.x,s[3]=e.y,s[6]=e.z,s[1]=i.x,s[4]=i.y,s[7]=i.z,s[2]=-t.x,s[5]=-t.y,s[8]=-t.z,this.fromMat3(p).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,s=this.z,n=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.set(e*h+n*r+i*a-s*o,i*h+n*o+s*r-e*a,s*h+n*a+e*o-i*r,n*h-e*r-i*o-s*a)},slerp:function(t,e){var i=this.x,s=this.y,n=this.z,r=this.w,o=t.x,h=t.y,l=t.z,u=t.w,c=i*o+s*h+n*l+r*u;c<0&&(c=-c,o=-o,h=-h,l=-l,u=-u);var d=1-e,p=e;if(1-c>a){var f=Math.acos(c),v=Math.sin(f);d=Math.sin((1-e)*f)/v,p=Math.sin(e*f)/v}return this.set(d*i+p*o,d*s+p*h,d*n+p*l,d*r+p*u)},invert:function(){var t=this.x,e=this.y,i=this.z,s=this.w,n=t*t+e*e+i*i+s*s,r=n?1/n:0;return this.set(-t*r,-e*r,-i*r,s*r)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,n=this.w,r=Math.sin(t),o=Math.cos(t);return this.set(e*o+n*r,i*o+s*r,s*o-i*r,n*o-e*r)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,n=this.w,r=Math.sin(t),o=Math.cos(t);return this.set(e*o-s*r,i*o+n*r,s*o+e*r,n*o-i*r)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,n=this.w,r=Math.sin(t),o=Math.cos(t);return this.set(e*o+i*r,i*o-e*r,s*o+n*r,n*o-s*r)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,s=t.y/2,n=t.z/2,r=Math.cos(i),o=Math.cos(s),a=Math.cos(n),h=Math.sin(i),l=Math.sin(s),u=Math.sin(n);switch(t.order){case"XYZ":this.set(h*o*a+r*l*u,r*l*a-h*o*u,r*o*u+h*l*a,r*o*a-h*l*u,e);break;case"YXZ":this.set(h*o*a+r*l*u,r*l*a-h*o*u,r*o*u-h*l*a,r*o*a+h*l*u,e);break;case"ZXY":this.set(h*o*a-r*l*u,r*l*a+h*o*u,r*o*u+h*l*a,r*o*a-h*l*u,e);break;case"ZYX":this.set(h*o*a-r*l*u,r*l*a+h*o*u,r*o*u-h*l*a,r*o*a+h*l*u,e);break;case"YZX":this.set(h*o*a+r*l*u,r*l*a+h*o*u,r*o*u-h*l*a,r*o*a-h*l*u,e);break;case"XZY":this.set(h*o*a-r*l*u,r*l*a-h*o*u,r*o*u+h*l*a,r*o*a+h*l*u,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,s=i[0],n=i[4],r=i[8],o=i[1],a=i[5],h=i[9],l=i[2],u=i[6],c=i[10],d=s+a+c;return d>0?(e=.5/Math.sqrt(d+1),this.set((u-h)*e,(r-l)*e,(o-n)*e,.25/e)):s>a&&s>c?(e=2*Math.sqrt(1+s-a-c),this.set(.25*e,(n+o)/e,(r+l)/e,(u-h)/e)):a>c?(e=2*Math.sqrt(1+a-s-c),this.set((n+o)/e,.25*e,(h+u)/e,(r-l)/e)):(e=2*Math.sqrt(1+c-s-a),this.set((r+l)/e,(h+u)/e,.25*e,(o-n)/e)),this},fromMat3:function(t){var e,i=t.val,s=i[0]+i[4]+i[8];if(s>0)e=Math.sqrt(s+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var n=0;i[4]>i[0]&&(n=1),i[8]>i[3*n+n]&&(n=2);var r=h[n],o=h[r];e=Math.sqrt(i[3*n+n]-i[3*r+r]-i[3*o+o]+1),l[n]=.5*e,e=.5/e,l[r]=(i[3*r+n]+i[3*n+r])*e,l[o]=(i[3*o+n]+i[3*n+o])*e,this._x=l[0],this._y=l[1],this._z=l[2],this._w=(i[3*o+r]-i[3*r+o])*e}return this.onChangeCallback(this),this}});t.exports=f},23701:(t,e,i)=>{var s=i(83392);t.exports=function(t){return t*s.RAD_TO_DEG}},16906:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},52417:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,s=2*Math.random()-1,n=Math.sqrt(1-s*s)*e;return t.x=Math.cos(i)*n,t.y=Math.sin(i)*n,t.z=s*e,t}},17915:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},52257:t=>{t.exports=function(t,e){var i=t.x,s=t.y;return t.x=i*Math.cos(e)-s*Math.sin(e),t.y=i*Math.sin(e)+s*Math.cos(e),t}},2386:t=>{t.exports=function(t,e,i,s){var n=Math.cos(s),r=Math.sin(s),o=t.x-e,a=t.y-i;return t.x=o*n-a*r+e,t.y=o*r+a*n+i,t}},72395:t=>{t.exports=function(t,e,i,s,n){var r=s+Math.atan2(t.y-i,t.x-e);return t.x=e+n*Math.cos(r),t.y=i+n*Math.sin(r),t}},41061:t=>{t.exports=function(t,e,i,s,n){return t.x=e+n*Math.cos(s),t.y=i+n*Math.sin(s),t}},93709:(t,e,i)=>{var s=i(70015),n=i(16650),r=i(75003),o=new n,a=new r,h=new s;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},67233:t=>{t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},64333:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.round(t*s)/s}},59533:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=1),s*=Math.PI/t;for(var n=[],r=[],o=0;o{t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},87736:t=>{t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},55805:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n){void 0===n&&(n=new s);var r=0,o=0;return t>0&&t<=e*i&&(r=t>e-1?t-(o=Math.floor(t/e))*e:t),n.set(r,o)}},64462:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,o,a,h){void 0===h&&(h=new s);var l=Math.sin(r),u=Math.cos(r),c=u*o,d=l*o,p=-l*a,f=u*a,v=1/(c*f+p*-d);return h.x=f*v*t+-p*v*e+(n*p-i*f)*v,h.y=c*v*e+-d*v*t+(-n*c+i*d)*v,h}},93736:(t,e,i)=>{var s=i(56694),n=i(88456),r=new s({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new r(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return n(this.x,t.x,e)&&n(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this},transformMat3:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[3]*i+s[6],this.y=s[1]*e+s[4]*i+s[7],this},transformMat4:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[4]*i+s[12],this.y=s[1]*e+s[5]*i+s[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)},project:function(t){var e=this.dot(t)/t.dot(t);return this.copy(t).scale(e)}});r.ZERO=new r,r.RIGHT=new r(1,0),r.LEFT=new r(-1,0),r.UP=new r(0,-1),r.DOWN=new r(0,1),r.ONE=new r(1,1),t.exports=r},70015:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new s(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var i=t.x,s=t.y,n=t.z,r=e.x,o=e.y,a=e.z;return this.x=s*a-n*o,this.y=n*r-i*a,this.z=i*o-s*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return Math.sqrt(e*e+i*i+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return e*e+i*i+s*s},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,s=t*t+e*e+i*i;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,s=this.z,n=t.x,r=t.y,o=t.z;return this.x=i*o-s*r,this.y=s*n-e*o,this.z=e*r-i*n,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,n=this.z;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=n+e*(t.z-n),this},applyMatrix3:function(t){var e=this.x,i=this.y,s=this.z,n=t.val;return this.x=n[0]*e+n[3]*i+n[6]*s,this.y=n[1]*e+n[4]*i+n[7]*s,this.z=n[2]*e+n[5]*i+n[8]*s,this},applyMatrix4:function(t){var e=this.x,i=this.y,s=this.z,n=t.val,r=1/(n[3]*e+n[7]*i+n[11]*s+n[15]);return this.x=(n[0]*e+n[4]*i+n[8]*s+n[12])*r,this.y=(n[1]*e+n[5]*i+n[9]*s+n[13])*r,this.z=(n[2]*e+n[6]*i+n[10]*s+n[14])*r,this},transformMat3:function(t){var e=this.x,i=this.y,s=this.z,n=t.val;return this.x=e*n[0]+i*n[3]+s*n[6],this.y=e*n[1]+i*n[4]+s*n[7],this.z=e*n[2]+i*n[5]+s*n[8],this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,n=t.val;return this.x=n[0]*e+n[4]*i+n[8]*s+n[12],this.y=n[1]*e+n[5]*i+n[9]*s+n[13],this.z=n[2]*e+n[6]*i+n[10]*s+n[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,s=this.z,n=t.val,r=e*n[0]+i*n[4]+s*n[8]+n[12],o=e*n[1]+i*n[5]+s*n[9]+n[13],a=e*n[2]+i*n[6]+s*n[10]+n[14],h=e*n[3]+i*n[7]+s*n[11]+n[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,n=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*s-o*i,l=a*i+o*e-n*s,u=a*s+n*i-r*e,c=-n*e-r*i-o*s;return this.x=h*a+c*-n+l*-o-u*-r,this.y=l*a+c*-r+u*-n-h*-o,this.z=u*a+c*-o+h*-r-l*-n,this},project:function(t){var e=this.x,i=this.y,s=this.z,n=t.val,r=n[0],o=n[1],a=n[2],h=n[3],l=n[4],u=n[5],c=n[6],d=n[7],p=n[8],f=n[9],v=n[10],g=n[11],m=n[12],y=n[13],x=n[14],T=1/(e*h+i*d+s*g+n[15]);return this.x=(e*r+i*l+s*p+m)*T,this.y=(e*o+i*u+s*f+y)*T,this.z=(e*a+i*c+s*v+x)*T,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,s=t.y,n=t.z,r=t.w,o=this.x-i,a=r-this.y-1-s,h=this.z;return this.x=2*o/n-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});s.ZERO=new s,s.RIGHT=new s(1,0,0),s.LEFT=new s(-1,0,0),s.UP=new s(0,-1,0),s.DOWN=new s(0,1,0),s.FORWARD=new s(0,0,1),s.BACK=new s(0,0,-1),s.ONE=new s(1,1,1),t.exports=s},51729:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0)},clone:function(){return new s(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,s){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,n=t*t+e*e+i*i+s*s;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n,this.w=s*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,n=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=n+e*(t.z-n),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,n=t.w-this.w||0;return Math.sqrt(e*e+i*i+s*s+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,n=t.w-this.w||0;return e*e+i*i+s*s+n*n},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,n=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*s+r[12]*n,this.y=r[1]*e+r[5]*i+r[9]*s+r[13]*n,this.z=r[2]*e+r[6]*i+r[10]*s+r[14]*n,this.w=r[3]*e+r[7]*i+r[11]*s+r[15]*n,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,n=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*s-o*i,l=a*i+o*e-n*s,u=a*s+n*i-r*e,c=-n*e-r*i-o*s;return this.x=h*a+c*-n+l*-o-u*-r,this.y=l*a+c*-r+u*-n-h*-o,this.z=u*a+c*-o+h*-r-l*-n,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});s.prototype.sub=s.prototype.subtract,s.prototype.mul=s.prototype.multiply,s.prototype.div=s.prototype.divide,s.prototype.dist=s.prototype.distance,s.prototype.distSq=s.prototype.distanceSq,s.prototype.len=s.prototype.length,s.prototype.lenSq=s.prototype.lengthSq,t.exports=s},9557:t=>{t.exports=function(t,e,i){return Math.abs(t-e)<=i}},1071:t=>{t.exports=function(t,e,i){var s=i-e;return e+((t-e)%s+s)%s}},90447:t=>{t.exports=function(t,e,i,s){return Math.atan2(s-e,i-t)}},94240:t=>{t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},84066:t=>{t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},9678:t=>{t.exports=function(t,e,i,s){return Math.atan2(i-t,s-e)}},76861:(t,e,i)=>{var s=i(83392);t.exports=function(t){return t>Math.PI&&(t-=s.PI2),Math.abs(((t+s.TAU)%s.PI2-s.PI2)%s.PI2)}},37570:t=>{t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},87597:(t,e,i)=>{var s=i(61616);t.exports=function(){return s(-Math.PI,Math.PI)}},74493:(t,e,i)=>{var s=i(61616);t.exports=function(){return s(-180,180)}},19049:(t,e,i)=>{var s=i(37570);t.exports=function(t){return s(t+Math.PI)}},90612:(t,e,i)=>{var s=i(83392);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=s.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e{t.exports=function(t,e){var i=e-t;return 0===i?0:i-360*Math.floor((i- -180)/360)}},35786:(t,e,i)=>{var s=i(1071);t.exports=function(t){return s(t,-Math.PI,Math.PI)}},62138:(t,e,i)=>{var s=i(1071);t.exports=function(t){return s(t,-180,180)}},22153:(t,e,i)=>{t.exports={Between:i(90447),BetweenPoints:i(94240),BetweenPointsY:i(84066),BetweenY:i(9678),CounterClockwise:i(76861),Normalize:i(37570),Random:i(87597),RandomDegrees:i(74493),Reverse:i(19049),RotateTo:i(90612),ShortestBetween:i(93954),Wrap:i(35786),WrapDegrees:i(62138)}},83392:t=>{var e={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=e},53996:t=>{t.exports=function(t,e,i,s){var n=t-i,r=e-s;return Math.sqrt(n*n+r*r)}},92951:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return Math.sqrt(i*i+s*s)}},12161:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return i*i+s*s}},38057:t=>{t.exports=function(t,e,i,s){return Math.max(Math.abs(t-i),Math.abs(e-s))}},33297:t=>{t.exports=function(t,e,i,s,n){return void 0===n&&(n=2),Math.sqrt(Math.pow(i-t,n)+Math.pow(s-e,n))}},90366:t=>{t.exports=function(t,e,i,s){return Math.abs(t-i)+Math.abs(e-s)}},35032:t=>{t.exports=function(t,e,i,s){var n=t-i,r=e-s;return n*n+r*r}},10130:(t,e,i)=>{t.exports={Between:i(53996),BetweenPoints:i(92951),BetweenPointsSquared:i(12161),Chebyshev:i(38057),Power:i(33297),Snake:i(90366),Squared:i(35032)}},35060:(t,e,i)=>{var s=i(25265),n=i(57428),r=i(73214),o=i(71778),a=i(36468),h=i(88258),l=i(52910),u=i(67799),c=i(74083),d=i(92284),p=i(28035),f=i(8754);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:p.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:s.Out,Bounce:n.Out,Stepped:f,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":p.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":s.In,"Bounce.easeIn":n.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":p.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":s.Out,"Bounce.easeOut":n.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":p.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":s.InOut,"Bounce.easeInOut":n.InOut}},25860:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},45264:t=>{t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},36699:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},25265:(t,e,i)=>{t.exports={In:i(25860),Out:i(36699),InOut:i(45264)}},62191:t=>{t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},24799:t=>{t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},60819:t=>{t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},57428:(t,e,i)=>{t.exports={In:i(62191),Out:i(60819),InOut:i(24799)}},86855:t=>{t.exports=function(t){return 1-Math.sqrt(1-t*t)}},7280:t=>{t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},18058:t=>{t.exports=function(t){return Math.sqrt(1- --t*t)}},73214:(t,e,i)=>{t.exports={In:i(86855),Out:i(18058),InOut:i(7280)}},91532:t=>{t.exports=function(t){return t*t*t}},63180:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},16518:t=>{t.exports=function(t){return--t*t*t+1}},71778:(t,e,i)=>{t.exports={In:i(91532),Out:i(16518),InOut:i(63180)}},24729:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)}},50325:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*.5+1}},84074:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-s)*(2*Math.PI)/i)+1}},36468:(t,e,i)=>{t.exports={In:i(24729),Out:i(84074),InOut:i(50325)}},95638:t=>{t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},10357:t=>{t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},14894:t=>{t.exports=function(t){return 1-Math.pow(2,-10*t)}},88258:(t,e,i)=>{t.exports={In:i(95638),Out:i(14894),InOut:i(10357)}},33063:(t,e,i)=>{t.exports={Back:i(25265),Bounce:i(57428),Circular:i(73214),Cubic:i(71778),Elastic:i(36468),Expo:i(88258),Linear:i(52910),Quadratic:i(67799),Quartic:i(74083),Quintic:i(92284),Sine:i(28035),Stepped:i(8754)}},43927:t=>{t.exports=function(t){return t}},52910:(t,e,i)=>{t.exports=i(43927)},77471:t=>{t.exports=function(t){return t*t}},83863:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},44383:t=>{t.exports=function(t){return t*(2-t)}},67799:(t,e,i)=>{t.exports={In:i(77471),Out:i(44383),InOut:i(83863)}},48311:t=>{t.exports=function(t){return t*t*t*t}},55248:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},23135:t=>{t.exports=function(t){return 1- --t*t*t*t}},74083:(t,e,i)=>{t.exports={In:i(48311),Out:i(23135),InOut:i(55248)}},7313:t=>{t.exports=function(t){return t*t*t*t*t}},98759:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},26670:t=>{t.exports=function(t){return--t*t*t*t*t+1}},92284:(t,e,i)=>{t.exports={In:i(7313),Out:i(26670),InOut:i(98759)}},52929:t=>{t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},66333:t=>{t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},37255:t=>{t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},28035:(t,e,i)=>{t.exports={In:i(52929),Out:i(37255),InOut:i(66333)}},52770:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},8754:(t,e,i)=>{t.exports=i(52770)},17247:t=>{t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},88456:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},41935:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},54726:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t{t.exports={Ceil:i(17247),Equal:i(88456),Floor:i(61824),GreaterThan:i(41935),LessThan:i(54726)}},5923:(t,e,i)=>{var s=i(83392),n=i(98611),r={Angle:i(22153),Distance:i(10130),Easing:i(33063),Fuzzy:i(52778),Interpolation:i(48528),Pow2:i(73773),Snap:i(23679),RandomDataGenerator:i(81429),Average:i(26042),Bernstein:i(22824),Between:i(17489),CatmullRom:i(14976),CeilTo:i(89129),Clamp:i(82897),DegToRad:i(75606),Difference:i(767),Euler:i(9849),Factorial:i(8034),FloatBetween:i(61616),FloorTo:i(60679),FromPercent:i(91806),GetSpeed:i(79366),IsEven:i(43776),IsEvenStrict:i(58442),Linear:i(42798),LinearXY:i(61072),MaxAdd:i(69635),Median:i(37394),MinSub:i(17259),Percent:i(61820),RadToDeg:i(23701),RandomXY:i(16906),RandomXYZ:i(52417),RandomXYZW:i(17915),Rotate:i(52257),RotateAround:i(2386),RotateAroundDistance:i(72395),RotateTo:i(41061),RoundAwayFromZero:i(67233),RoundTo:i(64333),SinCosTableGenerator:i(59533),SmootherStep:i(87736),SmoothStep:i(5514),ToXY:i(55805),TransformXY:i(64462),Within:i(9557),Wrap:i(1071),Vector2:i(93736),Vector3:i(70015),Vector4:i(51729),Matrix3:i(5341),Matrix4:i(16650),Quaternion:i(75003),RotateVec3:i(93709)};r=n(!1,r,s),t.exports=r},63210:(t,e,i)=>{var s=i(22824);t.exports=function(t,e){for(var i=0,n=t.length-1,r=0;r<=n;r++)i+=Math.pow(1-e,n-r)*Math.pow(e,r)*t[r]*s(n,r);return i}},88332:(t,e,i)=>{var s=i(14976);t.exports=function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n);return t[0]===t[i]?(e<0&&(r=Math.floor(n=i*(1+e))),s(n-r,t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i])):e<0?t[0]-(s(-n,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(s(n-i,t[i],t[i],t[i-1],t[i-1])-t[i]):s(n-r,t[r?r-1:0],t[r],t[i{t.exports=function(t,e,i,s,n){return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,s)+function(t,e){return t*t*t*e}(t,n)}},47614:(t,e,i)=>{var s=i(42798);t.exports=function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n);return e<0?s(t[0],t[1],n):e>1?s(t[i],t[i-1],i-n):s(t[r],t[r+1>i?i:r+1],n-r)}},16252:t=>{t.exports=function(t,e,i,s){return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,s)}},44521:(t,e,i)=>{var s=i(5514);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},45507:(t,e,i)=>{var s=i(87736);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},48528:(t,e,i)=>{t.exports={Bezier:i(63210),CatmullRom:i(88332),CubicBezier:i(34631),Linear:i(47614),QuadraticBezier:i(16252),SmoothStep:i(44521),SmootherStep:i(45507)}},3504:t=>{t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<{t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},2018:t=>{t.exports=function(t){return t>0&&0==(t&t-1)}},73773:(t,e,i)=>{t.exports={GetNext:i(3504),IsSize:i(28621),IsValue:i(2018)}},81429:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),s=t[i];t[i]=t[e],t[e]=s}return t}});t.exports=s},82127:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),s?(i+t)/e:i+t)}},84314:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),s?(i+t)/e:i+t)}},88462:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),s?(i+t)/e:i+t)}},23679:(t,e,i)=>{t.exports={Ceil:i(82127),Floor:i(84314),To:i(88462)}},92491:(t,e,i)=>{var s=i(86459),n=i(98611),r={Actions:i(83979),Animations:i(13517),BlendModes:i(95723),Cache:i(45820),Cameras:i(44143),Core:i(80293),Class:i(56694),Create:i(84106),Curves:i(73962),Data:i(1999),Display:i(24816),DOM:i(3590),Events:i(95146),Game:i(15213),GameObjects:i(48013),Geom:i(84068),Input:i(20873),Loader:i(95695),Math:i(5923),Physics:i(53954),Plugins:i(45615),Renderer:i(42069),Scale:i(86754),ScaleModes:i(27394),Scene:i(87157),Scenes:i(20436),Structs:i(20010),Textures:i(87499),Tilemaps:i(52678),Time:i(97121),Tweens:i(75193),Utils:i(22178)};r.Sound=i(56751),r=n(!1,r,s),t.exports=r,i.g.Phaser=r},62832:(t,e,i)=>{var s=i(56694),n=i(7864),r=i(1539),o=new s({Extends:r,Mixins:[n.Acceleration,n.Angular,n.Bounce,n.Debug,n.Drag,n.Enable,n.Friction,n.Gravity,n.Immovable,n.Mass,n.Pushable,n.Size,n.Velocity],initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.body=null}});t.exports=o},66150:(t,e,i)=>{var s=i(56694),n=i(75606),r=i(53996),o=i(35032),a=i(99523),h=i(72632),l=i(30657),u=i(2732),c=i(15147),d=i(91963),p=i(7599),f=i(93736),v=i(85233),g=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,t.sys.events.once(p.BOOT,this.boot,this),t.sys.events.on(p.START,this.start,this)},boot:function(){this.world=new v(this.scene,this.config),this.add=new a(this.world),this.systems.events.once(p.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new v(this.scene,this.config),this.add=new a(this.world));var t=this.systems.events;h(this.config,"customUpdate",!1)||t.on(p.UPDATE,this.world.update,this.world),t.on(p.POST_UPDATE,this.world.postUpdate,this.world),t.once(p.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(p.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(p.UPDATE,this.world.update,this.world)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return l(h(e,"arcade",{}),h(t,"arcade",{}))},overlap:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.world.collideObjects(t,e,i,s,n,!0)},collide:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.world.collideObjects(t,e,i,s,n,!1)},collideTiles:function(t,e,i,s,n){return this.world.collideTiles(t,e,i,s,n)},overlapTiles:function(t,e,i,s,n){return this.world.overlapTiles(t,e,i,s,n)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(t,e,i,s,n,r){void 0===s&&(s=60);var o=Math.atan2(i-t.y,e-t.x);return t.body.acceleration.setToPolar(o,s),void 0!==n&&void 0!==r&&t.body.maxVelocity.set(n,r),o},accelerateToObject:function(t,e,i,s,n){return this.accelerateTo(t,e.x,e.y,i,s,n)},closest:function(t,e){e||(e=this.world.bodies.entries);for(var i=Number.MAX_VALUE,s=null,n=t.x,r=t.y,a=e.length,h=0;hi&&(s=l,i=c)}}return s},moveTo:function(t,e,i,s,n){void 0===s&&(s=60),void 0===n&&(n=0);var o=Math.atan2(i-t.y,e-t.x);return n>0&&(s=r(t.x,t.y,e,i)/(n/1e3)),t.body.velocity.setToPolar(o,s),o},moveToObject:function(t,e,i,s){return this.moveTo(t,e.x,e.y,i,s)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new f),i.setToPolar(n(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new f),i.setToPolar(t,e)},overlapRect:function(t,e,i,s,n,r){return c(this.world,t,e,i,s,n,r)},overlapCirc:function(t,e,i,s,n){return u(this.world,t,e,i,s,n)},shutdown:function(){if(this.world){var t=this.systems.events;t.off(p.UPDATE,this.world.update,this.world),t.off(p.POST_UPDATE,this.world.postUpdate,this.world),t.off(p.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null}},destroy:function(){this.shutdown(),this.scene.sys.events.off(p.START,this.start,this),this.scene=null,this.systems=null}});d.register("ArcadePhysics",g,"arcadePhysics"),t.exports=g},25084:(t,e,i)=>{var s=i(56694),n=i(7864),r=i(13747),o=new s({Extends:r,Mixins:[n.Acceleration,n.Angular,n.Bounce,n.Debug,n.Drag,n.Enable,n.Friction,n.Gravity,n.Immovable,n.Mass,n.Pushable,n.Size,n.Velocity],initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.body=null}});t.exports=o},97602:(t,e,i)=>{var s=i(56694),n=i(47401),r=i(27037),o=i(23701),a=i(74118),h=i(94287),l=i(93736),u=new s({initialize:function(t,e){var i=64,s=64,r=void 0!==e;r&&e.displayWidth&&(i=e.displayWidth,s=e.displayHeight),r||(e={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=t,this.gameObject=r?e:void 0,this.isBody=!0,this.transform={x:e.x,y:e.y,rotation:e.angle,scaleX:e.scaleX,scaleY:e.scaleY,displayOriginX:e.displayOriginX,displayOriginY:e.displayOriginY},this.debugShowBody=t.defaults.debugShowBody,this.debugShowVelocity=t.defaults.debugShowVelocity,this.debugBodyColor=t.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new l,this.position=new l(e.x-e.scaleX*e.displayOriginX,e.y-e.scaleY*e.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=e.angle,this.preRotation=e.angle,this.width=i,this.height=s,this.sourceWidth=i,this.sourceHeight=s,e.frame&&(this.sourceWidth=e.frame.realWidth,this.sourceHeight=e.frame.realHeight),this.halfWidth=Math.abs(i/2),this.halfHeight=Math.abs(s/2),this.center=new l(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new l,this.newVelocity=new l,this.deltaMax=new l,this.acceleration=new l,this.allowDrag=!0,this.drag=new l,this.allowGravity=!0,this.gravity=new l,this.bounce=new l,this.worldBounce=null,this.customBoundsRectangle=t.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new l(1e4,1e4),this.maxSpeed=-1,this.friction=new l(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=n.FACING_NONE,this.immovable=!1,this.pushable=!0,this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.syncBounds=!1,this.physicsType=n.DYNAMIC_BODY,this._sx=e.scaleX,this._sy=e.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new a},updateBounds:function(){var t=this.gameObject,e=this.transform;if(t.parentContainer){var i=t.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);e.x=i.tx,e.y=i.ty,e.rotation=o(i.rotation),e.scaleX=i.scaleX,e.scaleY=i.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY}else e.x=t.x,e.y=t.y,e.rotation=t.angle,e.scaleX=t.scaleX,e.scaleY=t.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY;var s=!1;if(this.syncBounds){var n=t.getBounds(this._bounds);this.width=n.width,this.height=n.height,s=!0}else{var r=Math.abs(e.scaleX),a=Math.abs(e.scaleY);this._sx===r&&this._sy===a||(this.width=this.sourceWidth*r,this.height=this.sourceHeight*a,this._sx=r,this._sy=a,s=!0)}s&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var t=this.transform;this.position.x=t.x+t.scaleX*(this.offset.x-t.displayOriginX),this.position.y=t.y+t.scaleY*(this.offset.y-t.displayOriginY),this.updateCenter()},resetFlags:function(t){void 0===t&&(t=!1);var e=this.wasTouching,i=this.touching,s=this.blocked;t?(e.none=!0,e.up=!1,e.down=!1,e.left=!1,e.right=!1):(e.none=i.none,e.up=i.up,e.down=i.down,e.left=i.left,e.right=i.right),i.none=!0,i.up=!1,i.down=!1,i.left=!1,i.right=!1,s.none=!0,s.up=!1,s.down=!1,s.left=!1,s.right=!1,this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(t,e){t&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves&&(this.prev.x=this.position.x,this.prev.y=this.position.y,this.prevFrame.x=this.position.x,this.prevFrame.y=this.position.y),t&&this.update(e)},update:function(t){if(this.prev.x=this.position.x,this.prev.y=this.position.y,this.moves){this.world.updateMotion(this,t);var e=this.velocity.x,i=this.velocity.y;this.newVelocity.set(e*t,i*t),this.position.add(this.newVelocity),this.updateCenter(),this.angle=Math.atan2(i,e),this.speed=Math.sqrt(e*e+i*i),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds&&this.world.emit(r.WORLD_BOUNDS,this,this.blocked.up,this.blocked.down,this.blocked.left,this.blocked.right)}this._dx=this.position.x-this.prev.x,this._dy=this.position.y-this.prev.y},postUpdate:function(){var t=this.position.x-this.prevFrame.x,e=this.position.y-this.prevFrame.y,i=this.gameObject;if(this.moves){var s=this.deltaMax.x,r=this.deltaMax.y;0!==s&&0!==t&&(t<0&&t<-s?t=-s:t>0&&t>s&&(t=s)),0!==r&&0!==e&&(e<0&&e<-r?e=-r:e>0&&e>r&&(e=r)),i&&(i.x+=t,i.y+=e)}t<0?this.facing=n.FACING_LEFT:t>0&&(this.facing=n.FACING_RIGHT),e<0?this.facing=n.FACING_UP:e>0&&(this.facing=n.FACING_DOWN),this.allowRotation&&i&&(i.angle+=this.deltaZ()),this._tx=t,this._ty=e},setBoundsRectangle:function(t){return this.customBoundsRectangle=t||this.world.bounds,this},checkWorldBounds:function(){var t=this.position,e=this.customBoundsRectangle,i=this.world.checkCollision,s=this.worldBounce?-this.worldBounce.x:-this.bounce.x,n=this.worldBounce?-this.worldBounce.y:-this.bounce.y,r=!1;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=s,this.blocked.right=!0,r=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=n,this.blocked.down=!0,r=!0),r&&(this.blocked.none=!1,this.updateCenter()),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setGameObject:function(t,e){return void 0===e&&(e=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=t,t.body&&(t.body=this),this.setSize(),this.world.add(this),this.enable=e,this},setSize:function(t,e,i){void 0===i&&(i=!0);var s=this.gameObject;if(s&&(!t&&s.frame&&(t=s.frame.realWidth),!e&&s.frame&&(e=s.frame.realHeight)),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&s&&s.getCenter){var n=(s.width-t)/2,r=(s.height-e)/2;this.offset.set(n,r)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i&&(i.setPosition(t,e),this.rotation=i.angle,this.preRotation=i.angle);var s=this.position;i&&i.getTopLeft?i.getTopLeft(s):s.set(t,e),this.prev.copy(s),this.prevFrame.copy(s),i&&this.updateBounds(),this.updateCenter(),this.collideWorldBounds&&this.checkWorldBounds(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?this.radius>0&&t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:h(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,s=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor),this.isCircle?t.strokeCircle(i,s,this.width/2):(this.checkCollision.up&&t.lineBetween(e.x,e.y,e.x+this.width,e.y),this.checkCollision.right&&t.lineBetween(e.x+this.width,e.y,e.x+this.width,e.y+this.height),this.checkCollision.down&&t.lineBetween(e.x,e.y+this.height,e.x+this.width,e.y+this.height),this.checkCollision.left&&t.lineBetween(e.x,e.y,e.x,e.y+this.height))),this.debugShowVelocity&&(t.lineStyle(t.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,s,i+this.velocity.x/2,s+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t,e,i,s){void 0===t&&(t=!0),this.collideWorldBounds=t;var n=void 0!==e,r=void 0!==i;return(n||r)&&(this.worldBounce||(this.worldBounce=new l),n&&(this.worldBounce.x=e),r&&(this.worldBounce.y=i)),void 0!==s&&(this.onWorldBounds=s),this},setVelocity:function(t,e){return this.velocity.set(t,e),t=this.velocity.x,e=this.velocity.y,this.speed=Math.sqrt(t*t+e*e),this},setVelocityX:function(t){return this.setVelocity(t,this.velocity.y)},setVelocityY:function(t){return this.setVelocity(this.velocity.x,t)},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),this},setMaxVelocityX:function(t){return this.maxVelocity.x=t,this},setMaxVelocityY:function(t){return this.maxVelocity.y=t,this},setMaxSpeed:function(t){return this.maxSpeed=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setAllowDrag:function(t){return void 0===t&&(t=!0),this.allowDrag=t,this},setAllowGravity:function(t){return void 0===t&&(t=!0),this.allowGravity=t,this},setAllowRotation:function(t){return void 0===t&&(t=!0),this.allowRotation=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDamping:function(t){return this.useDamping=t,this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return void 0===t&&(t=!0),this.immovable=t,this},setEnable:function(t){return void 0===t&&(t=!0),this.enable=t,this},processX:function(t,e,i,s){this.x+=t,this.updateCenter(),null!==e&&(this.velocity.x=e);var n=this.blocked;i&&(n.left=!0),s&&(n.right=!0)},processY:function(t,e,i,s){this.y+=t,this.updateCenter(),null!==e&&(this.velocity.y=e);var n=this.blocked;i&&(n.up=!0),s&&(n.down=!0)},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},3909:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s,n,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=s,this.collideCallback=n,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=s},99523:(t,e,i)=>{var s=i(62832),n=i(25084),r=i(97602),o=i(56694),a=i(47401),h=i(10481),l=i(66634),u=i(46346),c=new o({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,s,n){return this.world.addCollider(t,e,i,s,n)},overlap:function(t,e,i,s,n){return this.world.addOverlap(t,e,i,s,n)},existing:function(t,e){var i=e?a.STATIC_BODY:a.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.world.enableBody(r,a.STATIC_BODY),r},image:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.world.enableBody(r,a.DYNAMIC_BODY),r},staticSprite:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,a.STATIC_BODY),r},sprite:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,a.DYNAMIC_BODY),r},staticGroup:function(t,e){return this.sys.updateList.add(new u(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},body:function(t,e,i,s){var n=new r(this.world);return n.position.set(t,e),i&&s&&n.setSize(i,s),this.world.add(n,a.DYNAMIC_BODY),n},staticBody:function(t,e,i,s){var n=new l(this.world);return n.position.set(t,e),i&&s&&n.setSize(i,s),this.world.add(n,a.STATIC_BODY),n},destroy:function(){this.world=null,this.scene=null,this.sys=null}});t.exports=c},75671:(t,e,i)=>{var s=i(47401);t.exports=function(t,e,i,n){var r=0,o=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?(r=t.right-e.x)>o&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?r=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.right=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.left=!0)):t._dxo&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?r=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.left=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=r,e.overlapX=r,r}},66185:(t,e,i)=>{var s=i(47401);t.exports=function(t,e,i,n){var r=0,o=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(r=t.bottom-e.y)>o&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?r=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.down=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.up=!0)):t._dyo&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?r=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.up=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=r,e.overlapY=r,r}},10481:(t,e,i)=>{var s=i(25084),n=i(56694),r=i(47401),o=i(72632),a=i(59192),h=i(42911),l=new n({Extends:a,initialize:function(t,e,i,n){if(i||n)if(h(i))n=i,i=null,n.internalCreateCallback=this.createCallbackHandler,n.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(i)&&h(i[0])){n=i[0];var l=this;i.forEach((function(t){t.internalCreateCallback=l.createCallbackHandler,t.internalRemoveCallback=l.removeCallbackHandler})),i=null}else n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=t,n.classType=o(n,"classType",s),this.physicsType=r.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:o(n,"collideWorldBounds",!1),setBoundsRectangle:o(n,"customBoundsRectangle",null),setAccelerationX:o(n,"accelerationX",0),setAccelerationY:o(n,"accelerationY",0),setAllowDrag:o(n,"allowDrag",!0),setAllowGravity:o(n,"allowGravity",!0),setAllowRotation:o(n,"allowRotation",!0),setDamping:o(n,"useDamping",!1),setBounceX:o(n,"bounceX",0),setBounceY:o(n,"bounceY",0),setDragX:o(n,"dragX",0),setDragY:o(n,"dragY",0),setEnable:o(n,"enable",!0),setGravityX:o(n,"gravityX",0),setGravityY:o(n,"gravityY",0),setFrictionX:o(n,"frictionX",0),setFrictionY:o(n,"frictionY",0),setMaxSpeed:o(n,"maxSpeed",-1),setMaxVelocityX:o(n,"maxVelocityX",1e4),setMaxVelocityY:o(n,"maxVelocityY",1e4),setVelocityX:o(n,"velocityX",0),setVelocityY:o(n,"velocityY",0),setAngularVelocity:o(n,"angularVelocity",0),setAngularAcceleration:o(n,"angularAcceleration",0),setAngularDrag:o(n,"angularDrag",0),setMass:o(n,"mass",1),setImmovable:o(n,"immovable",!1)},a.call(this,e,i,n),this.type="PhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,r.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var s=this.getChildren(),n=0;n{var e,i,s,n,r,o,a,h,l,u,c,d,p,f,v,g,m,y=function(){return u&&v&&i.blocked.right?(e.processX(-m,a,!1,!0),1):l&&g&&i.blocked.left?(e.processX(m,a,!0),1):p&&g&&e.blocked.right?(i.processX(-m,h,!1,!0),2):d&&v&&e.blocked.left?(i.processX(m,h,!0),2):0},x=function(t){if(s&&n)m*=.5,0===t||3===t?(e.processX(m,r),i.processX(-m,o)):(e.processX(-m,r),i.processX(m,o));else if(s&&!n)0===t||3===t?e.processX(m,a,!0):e.processX(-m,a,!1,!0);else if(!s&&n)0===t||3===t?i.processX(-m,h,!1,!0):i.processX(m,h,!0);else{var v=.5*m;0===t?f?(e.processX(m,0,!0),i.processX(0,null,!1,!0)):p?(e.processX(v,0,!0),i.processX(-v,0,!1,!0)):(e.processX(v,i.velocity.x,!0),i.processX(-v,null,!1,!0)):1===t?c?(e.processX(0,null,!1,!0),i.processX(m,0,!0)):u?(e.processX(-v,0,!1,!0),i.processX(v,0,!0)):(e.processX(-v,null,!1,!0),i.processX(v,e.velocity.x,!0)):2===t?f?(e.processX(-m,0,!1,!0),i.processX(0,null,!0)):d?(e.processX(-v,0,!1,!0),i.processX(v,0,!0)):(e.processX(-v,i.velocity.x,!1,!0),i.processX(v,null,!0)):3===t&&(c?(e.processX(0,null,!0),i.processX(-m,0,!1,!0)):l?(e.processX(v,0,!0),i.processX(-v,0,!1,!0)):(e.processX(v,i.velocity.y,!0),i.processX(-v,null,!1,!0)))}return!0};t.exports={BlockCheck:y,Check:function(){var t=e.velocity.x,s=i.velocity.x,n=Math.sqrt(s*s*i.mass/e.mass)*(s>0?1:-1),a=Math.sqrt(t*t*e.mass/i.mass)*(t>0?1:-1),h=.5*(n+a);return a-=h,r=h+(n-=h)*e.bounce.x,o=h+a*i.bounce.x,l&&g?x(0):d&&v?x(1):u&&v?x(2):!(!p||!g)&&x(3)},Set:function(t,r,o){i=r;var x=(e=t).velocity.x,T=i.velocity.x;return s=e.pushable,l=e._dx<0,u=e._dx>0,c=0===e._dx,v=Math.abs(e.right-i.x)<=Math.abs(i.right-e.x),a=T-x*e.bounce.x,n=i.pushable,d=i._dx<0,p=i._dx>0,f=0===i._dx,g=!v,h=x-T*i.bounce.x,m=Math.abs(o),y()},Run:x,RunImmovableBody1:function(t){1===t?i.velocity.x=0:v?i.processX(m,h,!0):i.processX(-m,h,!1,!0),e.moves&&(i.y+=(e.y-e.prev.y)*e.friction.y,i._dy=i.y-i.prev.y)},RunImmovableBody2:function(t){2===t?e.velocity.x=0:g?e.processX(m,a,!0):e.processX(-m,a,!1,!0),i.moves&&(e.y+=(i.y-i.prev.y)*i.friction.y,e._dy=e.y-e.prev.y)}}},67050:t=>{var e,i,s,n,r,o,a,h,l,u,c,d,p,f,v,g,m,y=function(){return u&&v&&i.blocked.down?(e.processY(-m,a,!1,!0),1):l&&g&&i.blocked.up?(e.processY(m,a,!0),1):p&&g&&e.blocked.down?(i.processY(-m,h,!1,!0),2):d&&v&&e.blocked.up?(i.processY(m,h,!0),2):0},x=function(t){if(s&&n)m*=.5,0===t||3===t?(e.processY(m,r),i.processY(-m,o)):(e.processY(-m,r),i.processY(m,o));else if(s&&!n)0===t||3===t?e.processY(m,a,!0):e.processY(-m,a,!1,!0);else if(!s&&n)0===t||3===t?i.processY(-m,h,!1,!0):i.processY(m,h,!0);else{var v=.5*m;0===t?f?(e.processY(m,0,!0),i.processY(0,null,!1,!0)):p?(e.processY(v,0,!0),i.processY(-v,0,!1,!0)):(e.processY(v,i.velocity.y,!0),i.processY(-v,null,!1,!0)):1===t?c?(e.processY(0,null,!1,!0),i.processY(m,0,!0)):u?(e.processY(-v,0,!1,!0),i.processY(v,0,!0)):(e.processY(-v,null,!1,!0),i.processY(v,e.velocity.y,!0)):2===t?f?(e.processY(-m,0,!1,!0),i.processY(0,null,!0)):d?(e.processY(-v,0,!1,!0),i.processY(v,0,!0)):(e.processY(-v,i.velocity.y,!1,!0),i.processY(v,null,!0)):3===t&&(c?(e.processY(0,null,!0),i.processY(-m,0,!1,!0)):l?(e.processY(v,0,!0),i.processY(-v,0,!1,!0)):(e.processY(v,i.velocity.y,!0),i.processY(-v,null,!1,!0)))}return!0};t.exports={BlockCheck:y,Check:function(){var t=e.velocity.y,s=i.velocity.y,n=Math.sqrt(s*s*i.mass/e.mass)*(s>0?1:-1),a=Math.sqrt(t*t*e.mass/i.mass)*(t>0?1:-1),h=.5*(n+a);return a-=h,r=h+(n-=h)*e.bounce.y,o=h+a*i.bounce.y,l&&g?x(0):d&&v?x(1):u&&v?x(2):!(!p||!g)&&x(3)},Set:function(t,r,o){i=r;var x=(e=t).velocity.y,T=i.velocity.y;return s=e.pushable,l=e._dy<0,u=e._dy>0,c=0===e._dy,v=Math.abs(e.bottom-i.y)<=Math.abs(i.bottom-e.y),a=T-x*e.bounce.y,n=i.pushable,d=i._dy<0,p=i._dy>0,f=0===i._dy,g=!v,h=x-T*i.bounce.y,m=Math.abs(o),y()},Run:x,RunImmovableBody1:function(t){1===t?i.velocity.y=0:v?i.processY(m,h,!0):i.processY(-m,h,!1,!0),e.moves&&(i.x+=(e.x-e.prev.x)*e.friction.x,i._dx=i.x-i.prev.x)},RunImmovableBody2:function(t){2===t?e.velocity.y=0:g?e.processY(m,a,!0):e.processY(-m,a,!1,!0),i.moves&&(e.x+=(i.x-i.prev.x)*i.friction.x,e._dx=e.x-e.prev.x)}}},61777:(t,e,i)=>{var s=i(75671),n=i(22916);t.exports=function(t,e,i,r){var o=s(t,e,i,r),a=t.immovable,h=e.immovable;if(i||0===o||a&&h||t.customSeparateX||e.customSeparateX)return 0!==o||t.embedded&&e.embedded;var l=n.Set(t,e,o);return a||h?(a?n.RunImmovableBody1(l):h&&n.RunImmovableBody2(l),!0):l>0||n.Check()}},25299:(t,e,i)=>{var s=i(66185),n=i(67050);t.exports=function(t,e,i,r){var o=s(t,e,i,r),a=t.immovable,h=e.immovable;if(i||0===o||a&&h||t.customSeparateY||e.customSeparateY)return 0!==o||t.embedded&&e.embedded;var l=n.Set(t,e,o);return a||h?(a?n.RunImmovableBody1(l):h&&n.RunImmovableBody2(l),!0):l>0||n.Check()}},66634:(t,e,i)=>{var s=i(65650),n=i(56694),r=i(47401),o=i(94287),a=i(93736),h=new n({initialize:function(t,e){var i=64,s=64,n=void 0!==e;n&&e.displayWidth&&(i=e.displayWidth,s=e.displayHeight),n||(e={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=t,this.gameObject=n?e:void 0,this.isBody=!0,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-i*e.originX,e.y-s*e.originY),this.width=i,this.height=s,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var s=this.gameObject;if(!t&&s.frame&&(t=s.frame.realWidth),!e&&s.frame&&(e=s.frame.realHeight),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&s.getCenter){var n=s.displayWidth/2,r=s.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(n-this.halfWidth,r-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.setPosition(t,e),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?s(this,t,e):o(this,t,e)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,s=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?t.strokeCircle(i,s,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},46346:(t,e,i)=>{var s=i(25084),n=i(56694),r=i(47401),o=i(72632),a=i(59192),h=i(42911),l=new n({Extends:a,initialize:function(t,e,i,n){i||n?h(i)?(n=i,i=null,n.internalCreateCallback=this.createCallbackHandler,n.internalRemoveCallback=this.removeCallbackHandler,n.createMultipleCallback=this.createMultipleCallbackHandler,n.classType=o(n,"classType",s)):Array.isArray(i)&&h(i[0])?(n=i,i=null,n.forEach((function(t){t.internalCreateCallback=this.createCallbackHandler,t.internalRemoveCallback=this.removeCallbackHandler,t.createMultipleCallback=this.createMultipleCallbackHandler,t.classType=o(t,"classType",s)}))):n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler}:n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:s},this.world=t,this.physicsType=r.STATIC_BODY,a.call(this,e,i,n),this.type="StaticPhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,r.STATIC_BODY)},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var t=this.children.entries,e=0;e{var s=i(94240),n=i(97602),r=i(82897),o=i(56694),a=i(3909),h=i(47401),l=i(53996),u=i(6659),c=i(27037),d=i(88456),p=i(41935),f=i(54726),v=i(75671),g=i(66185),m=i(44662),y=i(10850),x=i(83392),T=i(74623),w=i(25163),b=i(74118),E=i(68687),S=i(27354),A=i(61777),_=i(25299),C=i(58403),M=i(66634),R=i(28808),P=i(69360),O=i(93736),L=i(1071),F=new o({Extends:u,initialize:function(t,e){u.call(this),this.scene=t,this.bodies=new C,this.staticBodies=new C,this.pendingDestroy=new C,this.colliders=new T,this.gravity=new O(y(e,"gravity.x",0),y(e,"gravity.y",0)),this.bounds=new b(y(e,"x",0),y(e,"y",0),y(e,"width",t.sys.scale.width),y(e,"height",t.sys.scale.height)),this.checkCollision={up:y(e,"checkCollision.up",!0),down:y(e,"checkCollision.down",!0),left:y(e,"checkCollision.left",!0),right:y(e,"checkCollision.right",!0)},this.fps=y(e,"fps",60),this.fixedStep=y(e,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=y(e,"timeScale",1),this.OVERLAP_BIAS=y(e,"overlapBias",4),this.TILE_BIAS=y(e,"tileBias",16),this.forceX=y(e,"forceX",!1),this.isPaused=y(e,"isPaused",!1),this._total=0,this.drawDebug=y(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:y(e,"debugShowBody",!0),debugShowStaticBody:y(e,"debugShowStaticBody",!0),debugShowVelocity:y(e,"debugShowVelocity",!0),bodyDebugColor:y(e,"debugBodyColor",16711935),staticBodyDebugColor:y(e,"debugStaticBodyColor",255),velocityDebugColor:y(e,"debugVelocityColor",65280)},this.maxEntries=y(e,"maxEntries",16),this.useTree=y(e,"useTree",!0),this.tree=new E(this.maxEntries),this.staticTree=new E(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new P,this._tempMatrix2=new P,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(t,e){void 0===e&&(e=h.DYNAMIC_BODY),Array.isArray(t)||(t=[t]);for(var i=0;i=r;for(this.fixedStep||(n=.001*e,a=!0,this._elapsed=0),i=0;i=r;)this._elapsed-=r,this.step(n)}},step:function(t){var e,i,s=this.bodies.entries,n=s.length;for(e=0;e0){var l=this.tree,u=this.staticTree;for(s=(i=a.entries).length,t=0;t-1&&c>v&&(t.velocity.normalize().scale(v),c=v),t.speed=c},separate:function(t,e,i,s,n){if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return!1;if(i&&!1===i.call(s,t.gameObject,e.gameObject))return!1;if(t.isCircle&&e.isCircle)return this.separateCircle(t,e,n);if(t.isCircle!==e.isCircle){var r=t.isCircle?e:t,o=t.isCircle?t:e,a={x:r.x,y:r.y,right:r.right,bottom:r.bottom},h=o.center;if((h.ya.bottom)&&(h.xa.right))return this.separateCircle(t,e,n)}var l=!1,u=!1;n?(l=A(t,e,n,this.OVERLAP_BIAS),u=_(t,e,n,this.OVERLAP_BIAS)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)o.right&&(r=l(a.x,a.y,o.right,o.y)-a.radius):a.y>o.bottom&&(a.xo.right&&(r=l(a.x,a.y,o.right,o.bottom)-a.radius)),r*=-1}else r=t.halfWidth+e.halfWidth-l(t.center.x,t.center.y,e.center.x,e.center.y);if(t.overlapR=r,e.overlapR=r,i||0===r||t.immovable&&e.immovable||t.customSeparateX||e.customSeparateX)return 0!==r&&(t.onOverlap||e.onOverlap)&&this.emit(c.OVERLAP,t.gameObject,e.gameObject,t,e),0!==r;var h=t.center.x-e.center.x,u=t.center.y-e.center.y,d=Math.sqrt(Math.pow(h,2)+Math.pow(u,2)),p=(e.center.x-t.center.x)/d||0,f=(e.center.y-t.center.y)/d||0,m=2*(t.velocity.x*p+t.velocity.y*f-e.velocity.x*p-e.velocity.y*f)/(t.mass+e.mass);(t.immovable||e.immovable)&&(m*=2),t.immovable||(t.velocity.x=t.velocity.x-m/t.mass*p,t.velocity.y=t.velocity.y-m/t.mass*f),e.immovable||(e.velocity.x=e.velocity.x+m/e.mass*p,e.velocity.y=e.velocity.y+m/e.mass*f),t.immovable||e.immovable||(r/=2);var y=s(t.center,e.center),T=(r+x.EPSILON)*Math.cos(y),w=(r+x.EPSILON)*Math.sin(y);return t.immovable||(t.x-=T,t.y-=w,t.updateCenter()),e.immovable||(e.x+=T,e.y+=w,e.updateCenter()),t.velocity.x*=t.bounce.x,t.velocity.y*=t.bounce.y,e.velocity.x*=e.bounce.x,e.velocity.y*=e.bounce.y,(t.onCollide||e.onCollide)&&this.emit(c.COLLIDE,t.gameObject,e.gameObject,t,e),!0},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?l(t.center.x,t.center.y,e.center.x,e.center.y)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.position.x||t.bottom<=e.position.y||t.position.x>=e.right||t.position.y>=e.bottom))},circleBodyIntersects:function(t,e){var i=r(t.center.x,e.left,e.right),s=r(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-s)*(t.center.y-s)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.collideObjects(t,e,i,s,n,!0)},collide:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.collideObjects(t,e,i,s,n,!1)},collideObjects:function(t,e,i,s,n,r){var o,a;!t.isParent||void 0!==t.physicsType&&void 0!==e&&t!==e||(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var h=Array.isArray(t),l=Array.isArray(e);if(this._total=0,h||l)if(!h&&l)for(o=0;o0},collideHandler:function(t,e,i,s,n,r){if(void 0===e&&t.isParent)return this.collideGroupVsGroup(t,t,i,s,n,r);if(!t||!e)return!1;if(t.body||t.isBody){if(e.body||e.isBody)return this.collideSpriteVsSprite(t,e,i,s,n,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,s,n,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,s,n,r)}else if(t.isParent){if(e.body||e.isBody)return this.collideSpriteVsGroup(e,t,i,s,n,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,s,n,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,s,n,r)}else if(t.isTilemap){if(e.body||e.isBody)return this.collideSpriteVsTilemapLayer(e,t,i,s,n,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,s,n,r)}},collideSpriteVsSprite:function(t,e,i,s,n,r){var o=t.isBody?t:t.body,a=e.isBody?e:e.body;return!(!o||!a)&&(this.separate(o,a,s,n,r)&&(i&&i.call(n,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,s,n,r){var o,a,l,u=t.isBody?t:t.body;if(0!==e.length&&u&&u.enable&&!u.checkCollision.none)if(this.useTree||e.physicsType===h.STATIC_BODY){var c=this.treeMinMax;c.minX=u.left,c.minY=u.top,c.maxX=u.right,c.maxY=u.bottom;var d=e.physicsType===h.DYNAMIC_BODY?this.tree.search(c):this.staticTree.search(c);for(a=d.length,o=0;oc.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=d,l+=d}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var p=r?null:this.tileFilterOptions,f=m(a,h,l,u,p,e.scene.cameras.main,e.layer);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,s,n,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,s,n,r,o){for(var a,h,l=t.isBody?t:t.body,u={left:0,right:0,top:0,bottom:0},d=!1,p=0;p{t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},29257:t=>{t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},62122:t=>{t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,e,i,s){return this.body.setCollideWorldBounds(t,e,i,s),this}}},99803:t=>{t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},87145:t=>{t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}}},96174:t=>{var e={enableBody:function(t,e,i,s,n){return t&&this.body.reset(e,i),s&&(this.body.gameObject.active=!0),n&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=e},51702:t=>{t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},25578:t=>{t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},72029:t=>{var e={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=e},34566:t=>{t.exports={setMass:function(t){return this.body.mass=t,this}}},2732:(t,e,i)=>{var s=i(15147),n=i(26673),r=i(22184),o=i(26535);t.exports=function(t,e,i,a,h,l){var u=s(t,e-a,i-a,2*a,2*a,h,l);if(0===u.length)return u;for(var c=new n(e,i,a),d=new n,p=[],f=0;f{t.exports=function(t,e,i,s,n,r,o){void 0===r&&(r=!0),void 0===o&&(o=!1);var a=[],h=[],l=t.treeMinMax;if(l.minX=e,l.minY=i,l.maxX=e+s,l.maxY=i+n,o&&(h=t.staticTree.search(l)),r&&t.useTree)a=t.tree.search(l);else if(r){var u=t.bodies,c={position:{x:e,y:i},left:e,top:i,right:e+s,bottom:i+n,isCircle:!1},d=t.intersects;u.iterate((function(t){d(t,c)&&a.push(t)}))}return h.concat(a)}},57527:t=>{var e={setPushable:function(t){return void 0===t&&(t=!0),this.body.pushable=t,this}};t.exports=e},77687:t=>{t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setBodySize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},66536:t=>{t.exports={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}}},7864:(t,e,i)=>{t.exports={Acceleration:i(5321),Angular:i(29257),Bounce:i(62122),Debug:i(99803),Drag:i(87145),Enable:i(96174),Friction:i(51702),Gravity:i(25578),Immovable:i(72029),Mass:i(34566),OverlapCirc:i(2732),OverlapRect:i(15147),Pushable:i(57527),Size:i(77687),Velocity:i(66536)}},47401:t=>{t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},22346:t=>{t.exports="collide"},95092:t=>{t.exports="overlap"},15775:t=>{t.exports="pause"},74142:t=>{t.exports="resume"},22825:t=>{t.exports="tilecollide"},10851:t=>{t.exports="tileoverlap"},7543:t=>{t.exports="worldbounds"},1487:t=>{t.exports="worldstep"},27037:(t,e,i)=>{t.exports={COLLIDE:i(22346),OVERLAP:i(95092),PAUSE:i(15775),RESUME:i(74142),TILE_COLLIDE:i(22825),TILE_OVERLAP:i(10851),WORLD_BOUNDS:i(7543),WORLD_STEP:i(1487)}},39977:(t,e,i)=>{var s=i(47401),n=i(98611),r={ArcadePhysics:i(66150),Body:i(97602),Collider:i(3909),Components:i(7864),Events:i(27037),Factory:i(99523),GetOverlapX:i(75671),GetOverlapY:i(66185),SeparateX:i(61777),SeparateY:i(25299),Group:i(10481),Image:i(62832),Sprite:i(25084),StaticBody:i(66634),StaticGroup:i(46346),Tilemap:i(8413),World:i(85233)};r=n(!1,r,s),t.exports=r},25163:t=>{t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},98209:t=>{t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):e>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,t.updateCenter(),0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},72792:t=>{t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):e>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,t.updateCenter(),0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},27354:(t,e,i)=>{var s=i(14405),n=i(52926),r=i(28808);t.exports=function(t,e,i,o,a,h,l){var u=o.left,c=o.top,d=o.right,p=o.bottom,f=i.faceLeft||i.faceRight,v=i.faceTop||i.faceBottom;if(l||(f=!0,v=!0),!f&&!v)return!1;var g=0,m=0,y=0,x=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX(){var s=i(98209);t.exports=function(t,e,i,n,r,o){var a=0,h=e.faceLeft,l=e.faceRight,u=e.collideLeft,c=e.collideRight;return o||(h=!0,l=!0,u=!0,c=!0),t.deltaX()<0&&c&&t.checkCollision.left?l&&t.x0&&u&&t.checkCollision.right&&h&&t.right>i&&(a=t.right-i)>r&&(a=0),0!==a&&(t.customSeparateX?t.overlapX=a:s(t,a)),a}},52926:(t,e,i)=>{var s=i(72792);t.exports=function(t,e,i,n,r,o){var a=0,h=e.faceTop,l=e.faceBottom,u=e.collideUp,c=e.collideDown;return o||(h=!0,l=!0,u=!0,c=!0),t.deltaY()<0&&c&&t.checkCollision.up?l&&t.y0&&u&&t.checkCollision.down&&h&&t.bottom>i&&(a=t.bottom-i)>r&&(a=0),0!==a&&(t.customSeparateY?t.overlapY=a:s(t,a)),a}},28808:t=>{t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},8413:(t,e,i)=>{var s={ProcessTileCallbacks:i(25163),ProcessTileSeparationX:i(98209),ProcessTileSeparationY:i(72792),SeparateTile:i(27354),TileCheckX:i(14405),TileCheckY:i(52926),TileIntersectsBody:i(28808)};t.exports=s},53954:(t,e,i)=>{t.exports={Arcade:i(39977),Matter:i(45949)}},63568:(t,e,i)=>{var s=i(56694),n=i(93736),r=new s({initialize:function(){this.boundsCenter=new n,this.centerDiff=new n},parseBody:function(t){if(!(t=t.hasOwnProperty("body")?t.body:t).hasOwnProperty("bounds")||!t.hasOwnProperty("centerOfMass"))return!1;var e=this.boundsCenter,i=this.centerDiff,s=t.bounds.max.x-t.bounds.min.x,n=t.bounds.max.y-t.bounds.min.y,r=s*t.centerOfMass.x,o=n*t.centerOfMass.y;return e.set(s/2,n/2),i.set(r-e.x,o-e.y),!0},getTopLeft:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e+s.x+r.x,i+s.y+r.y)}return!1},getTopCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e+r.x,i+s.y+r.y)}return!1},getTopRight:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e-(s.x-r.x),i+s.y+r.y)}return!1},getLeftCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e+s.x+r.x,i+r.y)}return!1},getCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.centerDiff;return new n(e+s.x,i+s.y)}return!1},getRightCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e-(s.x-r.x),i+r.y)}return!1},getBottomLeft:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e+s.x+r.x,i-(s.y-r.y))}return!1},getBottomCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e+r.x,i-(s.y-r.y))}return!1},getBottomRight:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e-(s.x-r.x),i-(s.y-r.y))}return!1}});t.exports=r},18171:(t,e,i)=>{var s=i(16929);s.Body=i(84125),s.Composite=i(11299),s.World=i(72005),s.Collision=i(63454),s.Detector=i(13657),s.Pairs=i(91327),s.Pair=i(70584),s.Query=i(13390),s.Resolver=i(44272),s.Constraint=i(52838),s.Common=i(68758),s.Engine=i(45775),s.Events=i(39073),s.Sleeping=i(22806),s.Plugin=i(84474),s.Bodies=i(68516),s.Composites=i(56643),s.Axes=i(50658),s.Bounds=i(84091),s.Svg=i(92765),s.Vector=i(10438),s.Vertices=i(39745),s.World.add=s.Composite.add,s.World.remove=s.Composite.remove,s.World.addComposite=s.Composite.addComposite,s.World.addBody=s.Composite.addBody,s.World.addConstraint=s.Composite.addConstraint,s.World.clear=s.Composite.clear,t.exports=s},72653:(t,e,i)=>{var s=i(68516),n=i(56694),r=i(56643),o=i(52838),a=i(92765),h=i(3860),l=i(7030),u=i(73658),c=i(84720),d=i(10998),p=i(72829),f=i(88596),v=i(39745),g=new n({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},rectangle:function(t,e,i,n,r){var o=s.rectangle(t,e,i,n,r);return this.world.add(o),o},trapezoid:function(t,e,i,n,r,o){var a=s.trapezoid(t,e,i,n,r,o);return this.world.add(a),a},circle:function(t,e,i,n,r){var o=s.circle(t,e,i,n,r);return this.world.add(o),o},polygon:function(t,e,i,n,r){var o=s.polygon(t,e,i,n,r);return this.world.add(o),o},fromVertices:function(t,e,i,n,r,o,a){"string"==typeof i&&(i=v.fromPath(i));var h=s.fromVertices(t,e,i,n,r,o,a);return this.world.add(h),h},fromPhysicsEditor:function(t,e,i,s,n){void 0===n&&(n=!0);var r=d.parseBody(t,e,i,s);return n&&!this.world.has(r)&&this.world.add(r),r},fromSVG:function(t,e,i,n,r,o){void 0===n&&(n=1),void 0===r&&(r={}),void 0===o&&(o=!0);for(var h=i.getElementsByTagName("path"),l=[],u=0;u{var s=i(74527),n=i(72632),r=i(93736);t.exports=function(t,e,i,o){void 0===i&&(i={}),void 0===o&&(o=!0);var a=e.x,h=e.y;if(e.body={temp:!0,position:{x:a,y:h}},[s.Bounce,s.Collision,s.Force,s.Friction,s.Gravity,s.Mass,s.Sensor,s.SetBody,s.Sleep,s.Static,s.Transform,s.Velocity].forEach((function(t){for(var i in t)(s=t[i]).get&&"function"==typeof s.get||s.set&&"function"==typeof s.set?Object.defineProperty(e,i,{get:t[i].get,set:t[i].set}):Object.defineProperty(e,i,{value:t[i]});var s})),e.world=t,e._tempVec2=new r(a,h),i.hasOwnProperty("type")&&"body"===i.type)e.setExistingBody(i,o);else{var l=n(i,"shape",null);l||(l="rectangle"),i.addToWorld=o,e.setBody(l,i)}return e}},7030:(t,e,i)=>{var s=i(56694),n=i(74527),r=i(89980),o=i(72632),a=i(1539),h=i(58210),l=i(93736),u=new s({Extends:a,Mixins:[n.Bounce,n.Collision,n.Force,n.Friction,n.Gravity,n.Mass,n.Sensor,n.SetBody,n.Sleep,n.Static,n.Transform,n.Velocity,h],initialize:function(t,e,i,s,n,a){r.call(this,t.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(s,n),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new l(e,i);var h=o(a,"shape",null);h?this.setBody(h,a):this.setRectangle(this.width,this.height,a),this.setPosition(e,i),this.initPipeline()}});t.exports=u},50583:(t,e,i)=>{var s=i(84093),n=i(50658),r=i(68516),o=i(84125),a=i(63568),h=i(84091),l=i(56694),u=i(63454),c=i(68758),d=i(11299),p=i(56643),f=i(52838),v=i(13657),g=i(53996),m=i(72653),y=i(72632),x=i(10850),T=i(1675),w=i(80391),b=i(16929),E=i(44097),S=i(30657),A=i(70584),_=i(91327),C=i(84474),M=i(91963),R=i(13390),P=i(44272),O=i(7599),L=i(92765),F=i(10438),D=i(39745),k=i(31468);c.setDecomp(i(81084));var I=new l({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=o,this.composite=d,this.collision=u,this.detector=v,this.pair=A,this.pairs=_,this.query=R,this.resolver=P,this.constraint=f,this.bodies=r,this.composites=p,this.axes=n,this.bounds=h,this.svg=L,this.vector=F,this.vertices=D,this.verts=D,this._tempVec2=F.create(),x(this.config,"plugins.collisionevents",!0)&&this.enableCollisionEventsPlugin(),x(this.config,"plugins.attractors",!1)&&this.enableAttractorPlugin(),x(this.config,"plugins.wrap",!1)&&this.enableWrapPlugin(),P._restingThresh=x(this.config,"restingThresh",4),P._restingThreshTangent=x(this.config,"restingThreshTangent",6),P._positionDampen=x(this.config,"positionDampen",.9),P._positionWarming=x(this.config,"positionWarming",.8),P._frictionNormalMultiplier=x(this.config,"frictionNormalMultiplier",5),t.sys.events.once(O.BOOT,this.boot,this),t.sys.events.on(O.START,this.start,this)},boot:function(){this.world=new k(this.scene,this.config),this.add=new m(this.world),this.bodyBounds=new a,this.systems.events.once(O.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new k(this.scene,this.config),this.add=new m(this.world));var t=this.systems.events;t.on(O.UPDATE,this.world.update,this.world),t.on(O.POST_UPDATE,this.world.postUpdate,this.world),t.once(O.SHUTDOWN,this.shutdown,this)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return S(y(e,"matter",{}),y(t,"matter",{}))},enableAttractorPlugin:function(){return C.register(T),C.use(b,T),this},enableWrapPlugin:function(){return C.register(E),C.use(b,E),this},enableCollisionEventsPlugin:function(){return C.register(w),C.use(b,w),this},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(t,e){this.world.step(t,e)},containsPoint:function(t,e,i){t=this.getMatterBodies(t);var s=F.create(e,i);return R.point(t,s).length>0},intersectPoint:function(t,e,i){i=this.getMatterBodies(i);var s=F.create(t,e),n=[];return R.point(i,s).forEach((function(t){-1===n.indexOf(t)&&n.push(t)})),n},intersectRect:function(t,e,i,s,n,r){void 0===n&&(n=!1),r=this.getMatterBodies(r);var o={min:{x:t,y:e},max:{x:t+i,y:e+s}},a=[];return R.region(r,o,n).forEach((function(t){-1===a.indexOf(t)&&a.push(t)})),a},intersectRay:function(t,e,i,s,n,r){void 0===n&&(n=1),r=this.getMatterBodies(r);for(var o=[],a=R.ray(r,F.create(t,e),F.create(i,s),n),h=0;h{var s=i(16569),n=i(56694),r=i(74527),o=i(89980),a=i(72632),h=i(58210),l=i(13747),u=i(93736),c=new n({Extends:l,Mixins:[r.Bounce,r.Collision,r.Force,r.Friction,r.Gravity,r.Mass,r.Sensor,r.SetBody,r.Sleep,r.Static,r.Transform,r.Velocity,h],initialize:function(t,e,i,n,r,h){o.call(this,t.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s(this),this.setTexture(n,r),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new u(e,i);var l=a(h,"shape",null);l?this.setBody(l,h):this.setRectangle(this.width,this.height,h),this.setPosition(e,i),this.initPipeline()}});t.exports=c},84720:(t,e,i)=>{var s=i(68516),n=i(84125),r=i(56694),o=i(74527),a=i(6659),h=i(72632),l=i(19256),u=i(39745),c=new r({Extends:a,Mixins:[o.Bounce,o.Collision,o.Friction,o.Gravity,o.Mass,o.Sensor,o.Sleep,o.Static],initialize:function(t,e,i){a.call(this),this.tile=e,this.world=t,e.physics.matterBody&&e.physics.matterBody.destroy(),e.physics.matterBody=this;var s=h(i,"body",null),n=h(i,"addToWorld",!0);if(s)this.setBody(s,n);else{var r=e.getCollisionGroup();h(r,"objects",[]).length>0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}},setFromTileRectangle:function(t){void 0===t&&(t={}),l(t,"isStatic")||(t.isStatic=!0),l(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,n=e.y+e.height/2,r=s.rectangle(i,n,e.width,e.height,t);return this.setBody(r,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),l(t,"isStatic")||(t.isStatic=!0),l(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,r=this.tile.getLeft(),o=this.tile.getTop(),a=this.tile.getCollisionGroup(),c=h(a,"objects",[]),d=[],p=0;p1&&(t.parts=d,this.setBody(n.create(t),t.addToWorld)),this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0,this.removeAllListeners()}});t.exports=c},10998:(t,e,i)=>{var s=i(68516),n=i(84125),r=i(68758),o=i(72632),a=i(39745),h={parseBody:function(t,e,i,s){void 0===s&&(s={});for(var a=o(i,"fixtures",[]),h=[],l=0;l{var s=i(68516),n=i(84125),r={parseBody:function(t,e,i,r){var o;void 0===r&&(r={});var a=i.vertices;if(1===a.length)r.vertices=a[0],o=n.create(r),s.flagCoincidentParts(o.parts);else{for(var h=[],l=0;l{var s=i(84091),n=i(56694),r=i(11299),o=i(52838),a=i(13657),h=i(35416),l=i(33963),u=i(30657),c=i(22806),d=i(93736),p=i(39745),f=new n({initialize:function(t,e,i){void 0===i&&(i={});this.scene=t,this.world=e,this.camera=null,this.pointer=null,this.active=!0,this.position=new d,this.body=null,this.part=null,this.constraint=o.create(u(i,{label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}})),this.world.on(h.BEFORE_UPDATE,this.update,this),t.sys.input.on(l.POINTER_DOWN,this.onDown,this),t.sys.input.on(l.POINTER_UP,this.onUp,this)},onDown:function(t){this.pointer||(this.pointer=t,this.camera=t.camera)},onUp:function(t){t===this.pointer&&(this.pointer=null)},getBody:function(t){var e=this.position,i=this.constraint;this.camera.getWorldPoint(t.x,t.y,e);for(var n=r.allBodies(this.world.localWorld),o=0;o1?1:0;n{var s=i(68516),n=i(84125),r=i(56694),o=i(68758),a=i(11299),h=i(45775),l=i(6659),u=i(35416),c=i(72632),d=i(10850),p=i(84125),f=i(39073),v=i(84720),g=i(72005),m=i(10438),y=new r({Extends:l,initialize:function(t,e){l.call(this),this.scene=t,this.engine=h.create(e),this.localWorld=this.engine.world;var i=d(e,"gravity",null);i?this.setGravity(i.x,i.y,i.scale):!1===i&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=d(e,"enabled",!0),this.correction=d(e,"correction",1),this.getDelta=d(e,"getDelta",this.update60Hz);var s=c(e,"runner",{}),n=c(s,"fps",!1),r=c(s,"fps",60),o=c(s,"delta",1e3/r),a=c(s,"deltaMin",1e3/r),u=c(s,"deltaMax",1e3/(.5*r));n||(r=1e3/o),this.runner={fps:r,correction:c(s,"correction",1),deltaSampleSize:c(s,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:c(s,"isFixed",!1),delta:o,deltaMin:a,deltaMax:u},this.autoUpdate=d(e,"autoUpdate",!0);var p=d(e,"debug",!1);if(this.drawDebug="object"==typeof p||p,this.debugGraphic,this.debugConfig={showAxes:c(p,"showAxes",!1),showAngleIndicator:c(p,"showAngleIndicator",!1),angleColor:c(p,"angleColor",15208787),showBroadphase:c(p,"showBroadphase",!1),broadphaseColor:c(p,"broadphaseColor",16757760),showBounds:c(p,"showBounds",!1),boundsColor:c(p,"boundsColor",16777215),showVelocity:c(p,"showVelocity",!1),velocityColor:c(p,"velocityColor",44783),showCollisions:c(p,"showCollisions",!1),collisionColor:c(p,"collisionColor",16094476),showSeparations:c(p,"showSeparations",!1),separationColor:c(p,"separationColor",16753920),showBody:c(p,"showBody",!0),showStaticBody:c(p,"showStaticBody",!0),showInternalEdges:c(p,"showInternalEdges",!1),renderFill:c(p,"renderFill",!1),renderLine:c(p,"renderLine",!0),fillColor:c(p,"fillColor",1075465),fillOpacity:c(p,"fillOpacity",1),lineColor:c(p,"lineColor",2678297),lineOpacity:c(p,"lineOpacity",1),lineThickness:c(p,"lineThickness",1),staticFillColor:c(p,"staticFillColor",857979),staticLineColor:c(p,"staticLineColor",1255396),showSleeping:c(p,"showSleeping",!1),staticBodySleepOpacity:c(p,"staticBodySleepOpacity",.7),sleepFillColor:c(p,"sleepFillColor",4605510),sleepLineColor:c(p,"sleepLineColor",10066585),showSensors:c(p,"showSensors",!0),sensorFillColor:c(p,"sensorFillColor",857979),sensorLineColor:c(p,"sensorLineColor",1255396),showPositions:c(p,"showPositions",!0),positionSize:c(p,"positionSize",4),positionColor:c(p,"positionColor",14697178),showJoint:c(p,"showJoint",!0),jointColor:c(p,"jointColor",14737474),jointLineOpacity:c(p,"jointLineOpacity",1),jointLineThickness:c(p,"jointLineThickness",2),pinSize:c(p,"pinSize",4),pinColor:c(p,"pinColor",4382944),springColor:c(p,"springColor",14697184),anchorColor:c(p,"anchorColor",15724527),anchorSize:c(p,"anchorSize",4),showConvexHulls:c(p,"showConvexHulls",!1),hullColor:c(p,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),c(e,"setBounds",!1)){var f=e.setBounds;if("boolean"==typeof f)this.setBounds();else{var v=c(f,"x",0),g=c(f,"y",0),m=c(f,"width",t.sys.scale.width),y=c(f,"height",t.sys.scale.height),x=c(f,"thickness",64),T=c(f,"left",!0),w=c(f,"right",!0),b=c(f,"top",!0),E=c(f,"bottom",!0);this.setBounds(v,g,m,y,x,T,w,b,E)}}},setCompositeRenderStyle:function(t){var e,i,s,n=t.bodies,r=t.constraints,o=t.composites;for(e=0;e0&&(i=n[0].bodyA,s=n[0].bodyB),t.emit(u.COLLISION_START,e,i,s)})),f.on(e,"collisionActive",(function(e){var i,s,n=e.pairs;n.length>0&&(i=n[0].bodyA,s=n[0].bodyB),t.emit(u.COLLISION_ACTIVE,e,i,s)})),f.on(e,"collisionEnd",(function(e){var i,s,n=e.pairs;n.length>0&&(i=n[0].bodyA,s=n[0].bodyB),t.emit(u.COLLISION_END,e,i,s)}))},setBounds:function(t,e,i,s,n,r,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===s&&(s=this.scene.sys.scale.height),void 0===n&&(n=64),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-n,e-n,n,s+2*n),this.updateWall(o,"right",t+i,e-n,n,s+2*n),this.updateWall(a,"top",t,e-n,i,n),this.updateWall(h,"bottom",t,e+s,i,n),this},updateWall:function(t,e,i,s,n,r){var o=this.walls[e];t?(o&&g.remove(this.localWorld,o),i+=n/2,s+=r/2,this.walls[e]=this.create(i,s,n,r,{isStatic:!0,friction:0,frictionStatic:0})):(o&&g.remove(this.localWorld,o),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setDepth(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=1),this.localWorld.gravity.x=t,this.localWorld.gravity.y=e,void 0!==i&&(this.localWorld.gravity.scale=i),this},create:function(t,e,i,n,r){var o=s.rectangle(t,e,i,n,r);return g.add(this.localWorld,o),o},add:function(t){return g.add(this.localWorld,t),this},remove:function(t,e){Array.isArray(t)||(t=[t]);for(var i=0;is.deltaMax?s.deltaMax:e)/s.delta,s.delta=e),0!==s.timeScalePrev&&(r*=n.timeScale/s.timeScalePrev),0===n.timeScale&&(r=0),s.timeScalePrev=n.timeScale,s.correction=r,s.frameCounter+=1,t-s.counterTimestamp>=1e3&&(s.fps=s.frameCounter*((t-s.counterTimestamp)/1e3),s.counterTimestamp=t,s.frameCounter=0),h.update(i,e,r)}},step:function(t,e){h.update(this.engine,t,e)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(t){var e=t.hasOwnProperty("body")?t.body:t;return null!==a.get(this.localWorld,e.id,e.type)},getAllBodies:function(){return a.allBodies(this.localWorld)},getAllConstraints:function(){return a.allConstraints(this.localWorld)},getAllComposites:function(){return a.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var t=this.debugConfig,e=this.engine,i=this.debugGraphic,s=a.allBodies(this.localWorld);this.debugGraphic.clear(),t.showBroadphase&&e.broadphase.controller&&this.renderGrid(e.broadphase,i,t.broadphaseColor,.5),t.showBounds&&this.renderBodyBounds(s,i,t.boundsColor,.5),(t.showBody||t.showStaticBody)&&this.renderBodies(s),t.showJoint&&this.renderJoints(),(t.showAxes||t.showAngleIndicator)&&this.renderBodyAxes(s,i,t.showAxes,t.angleColor,.5),t.showVelocity&&this.renderBodyVelocity(s,i,t.velocityColor,1,2),t.showSeparations&&this.renderSeparations(e.pairs.list,i,t.separationColor),t.showCollisions&&this.renderCollisions(e.pairs.list,i,t.collisionColor)}},renderGrid:function(t,e,i,s){e.lineStyle(1,i,s);for(var n=o.keys(t.buckets),r=0;r0){var l=h[0].vertex.x,u=h[0].vertex.y;2===h.length&&(l=(h[0].vertex.x+h[1].vertex.x)/2,u=(h[0].vertex.y+h[1].vertex.y)/2),a.bodyB===a.supports[0].body||a.bodyA.isStatic?e.lineBetween(l-8*a.normal.x,u-8*a.normal.y,l,u):e.lineBetween(l+8*a.normal.x,u+8*a.normal.y,l,u)}}return this},renderBodyBounds:function(t,e,i,s){e.lineStyle(1,i,s);for(var n=0;n1?1:0;h1?1:0;a1?1:0;a1&&this.renderConvexHull(v,e,p,y)}}},renderBody:function(t,e,i,s,n,r,o,a){void 0===s&&(s=null),void 0===n&&(n=null),void 0===r&&(r=1),void 0===o&&(o=null),void 0===a&&(a=null);for(var h=this.debugConfig,l=h.sensorFillColor,u=h.sensorLineColor,c=t.parts,d=c.length,p=d>1?1:0;p1){var n=t.vertices;e.lineStyle(s,i),e.beginPath(),e.moveTo(n[0].x,n[0].y);for(var r=1;r0&&(e.fillStyle(a),e.fillCircle(u.x,u.y,h),e.fillCircle(c.x,c.y,h)),this},resetCollisionIDs:function(){return n._nextCollidingGroupId=1,n._nextNonCollidingGroupId=-1,n._nextCategory=1,this},shutdown:function(){f.off(this.engine),this.removeAllListeners(),g.clear(this.localWorld,!1),h.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});t.exports=y},95349:t=>{t.exports={setBounce:function(t){return this.body.restitution=t,this}}},70679:t=>{var e={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var e=0;if(Array.isArray(t))for(var i=0;i{var s=i(84125),n={applyForce:function(t){return this._tempVec2.set(this.body.position.x,this.body.position.y),s.applyForce(this.body,this._tempVec2,t),this},applyForceFrom:function(t,e){return s.applyForce(this.body,t,e),this},thrust:function(t){var e=this.body.angle;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),s.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(t){var e=this.body.angle-Math.PI/2;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),s.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(t){var e=this.body.angle+Math.PI/2;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),s.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(t){var e=this.body.angle-Math.PI;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),s.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};t.exports=n},74015:t=>{var e={setFriction:function(t,e,i){return this.body.friction=t,void 0!==e&&(this.body.frictionAir=e),void 0!==i&&(this.body.frictionStatic=i),this},setFrictionAir:function(t){return this.body.frictionAir=t,this},setFrictionStatic:function(t){return this.body.frictionStatic=t,this}};t.exports=e},11535:t=>{t.exports={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}}},74497:(t,e,i)=>{var s=i(84125),n=i(93736),r={setMass:function(t){return s.setMass(this.body,t),this},setDensity:function(t){return s.setDensity(this.body,t),this},centerOfMass:{get:function(){return new n(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};t.exports=r},75529:t=>{t.exports={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}}},64024:(t,e,i)=>{var s=i(68516),n=i(84125),r=i(88456),o=i(72632),a=i(10998),h=i(72829),l=i(39745),u={setRectangle:function(t,e,i){return this.setBody({type:"rectangle",width:t,height:e},i)},setCircle:function(t,e){return this.setBody({type:"circle",radius:t},e)},setPolygon:function(t,e,i){return this.setBody({type:"polygon",sides:e,radius:t},i)},setTrapezoid:function(t,e,i,s){return this.setBody({type:"trapezoid",width:t,height:e,slope:i},s)},setExistingBody:function(t,e){void 0===e&&(e=!0),this.body&&this.world.remove(this.body,!0),this.body=t;for(var i=0;i{var s=i(35416),n=i(22806),r=i(39073),o={setToSleep:function(){return n.set(this.body,!0),this},setAwake:function(){return n.set(this.body,!1),this},setSleepThreshold:function(t){return void 0===t&&(t=60),this.body.sleepThreshold=t,this},setSleepEvents:function(t,e){return this.setSleepStartEvent(t),this.setSleepEndEvent(e),this},setSleepStartEvent:function(t){if(t){var e=this.world;r.on(this.body,"sleepStart",(function(t){e.emit(s.SLEEP_START,t,this)}))}else r.off(this.body,"sleepStart");return this},setSleepEndEvent:function(t){if(t){var e=this.world;r.on(this.body,"sleepEnd",(function(t){e.emit(s.SLEEP_END,t,this)}))}else r.off(this.body,"sleepEnd");return this}};t.exports=o},82884:(t,e,i)=>{var s=i(84125),n={setStatic:function(t){return s.setStatic(this.body,t),this},isStatic:function(){return this.body.isStatic}};t.exports=n},4753:(t,e,i)=>{var s=i(84125),n=i(83392),r=i(35786),o=i(62138),a={x:{get:function(){return this.body.position.x},set:function(t){this._tempVec2.set(t,this.y),s.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(t){this._tempVec2.set(this.x,t),s.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(t){var e=1/this._scaleX,i=1/this._scaleY;this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4,s.scale(this.body,e,i),s.scale(this.body,t,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(t){var e=1/this._scaleX,i=1/this._scaleY;this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4,s.scale(this.body,e,i),s.scale(this.body,this._scaleX,t)}},angle:{get:function(){return o(this.body.angle*n.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(t){this._rotation=r(t),s.setAngle(this.body,this._rotation)}},setPosition:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this._tempVec2.set(t,e),s.setPosition(this.body,this._tempVec2),this},setRotation:function(t){return void 0===t&&(t=0),this._rotation=r(t),s.setAngle(this.body,t),this},setFixedRotation:function(){return s.setInertia(this.body,1/0),this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,s.setAngle(this.body,this.rotation),this},setScale:function(t,e,i){void 0===t&&(t=1),void 0===e&&(e=t);var n=1/this._scaleX,r=1/this._scaleY;return this._scaleX=t,this._scaleY=e,s.scale(this.body,n,r,i),s.scale(this.body,t,e,i),this}};t.exports=a},37268:(t,e,i)=>{var s=i(84125),n={setAngularVelocity:function(t){return s.setAngularVelocity(this.body,t),this},setVelocityX:function(t){return this._tempVec2.set(t,this.body.velocity.y),s.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(t){return this._tempVec2.set(this.body.velocity.x,t),s.setVelocity(this.body,this._tempVec2),this},setVelocity:function(t,e){return this._tempVec2.set(t,e),s.setVelocity(this.body,this._tempVec2),this}};t.exports=n},74527:(t,e,i)=>{t.exports={Bounce:i(95349),Collision:i(70679),Force:i(77178),Friction:i(74015),Gravity:i(11535),Mass:i(74497),Sensor:i(75529),SetBody:i(64024),Sleep:i(25106),Static:i(82884),Transform:i(4753),Velocity:i(37268)}},63201:t=>{t.exports="afteradd"},30474:t=>{t.exports="afterremove"},44822:t=>{t.exports="afterupdate"},88820:t=>{t.exports="beforeadd"},94849:t=>{t.exports="beforeremove"},6391:t=>{t.exports="beforeupdate"},96738:t=>{t.exports="collisionactive"},7916:t=>{t.exports="collisionend"},59529:t=>{t.exports="collisionstart"},10219:t=>{t.exports="dragend"},183:t=>{t.exports="drag"},39143:t=>{t.exports="dragstart"},16483:t=>{t.exports="pause"},35806:t=>{t.exports="resume"},22106:t=>{t.exports="sleepend"},5803:t=>{t.exports="sleepstart"},35416:(t,e,i)=>{t.exports={AFTER_ADD:i(63201),AFTER_REMOVE:i(30474),AFTER_UPDATE:i(44822),BEFORE_ADD:i(88820),BEFORE_REMOVE:i(94849),BEFORE_UPDATE:i(6391),COLLISION_ACTIVE:i(96738),COLLISION_END:i(7916),COLLISION_START:i(59529),DRAG_END:i(10219),DRAG:i(183),DRAG_START:i(39143),PAUSE:i(16483),RESUME:i(35806),SLEEP_END:i(22106),SLEEP_START:i(5803)}},45949:(t,e,i)=>{t.exports={BodyBounds:i(63568),Components:i(74527),Events:i(35416),Factory:i(72653),MatterGameObject:i(3860),Image:i(7030),Matter:i(18171),MatterPhysics:i(50583),PolyDecomp:i(81084),Sprite:i(73658),TileBody:i(84720),PhysicsEditorParser:i(10998),PhysicsJSONParser:i(72829),PointerConstraint:i(88596),World:i(31468)}},84125:(t,e,i)=>{var s={};t.exports=s;var n=i(39745),r=i(10438),o=i(22806),a=i(68758),h=i(84091),l=i(50658);!function(){s._inertiaScale=4,s._nextCollidingGroupId=1,s._nextNonCollidingGroupId=-1,s._nextCategory=1,s.create=function(e){var i={id:a.nextId(),type:"body",label:"Body",parts:[],plugin:{},angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!e.hasOwnProperty("position")&&e.hasOwnProperty("vertices")?e.position=n.centre(e.vertices):e.hasOwnProperty("vertices")||(i.vertices=n.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var s=a.extend(i,e);return t(s,e),s.setOnCollideWith=function(t,e){return e?this.onCollideWith[t.id]=e:delete this.onCollideWith[t.id],this},s},s.nextGroup=function(t){return t?s._nextNonCollidingGroupId--:s._nextCollidingGroupId++},s.nextCategory=function(){return s._nextCategory=s._nextCategory<<1,s._nextCategory};var t=function(t,e){e=e||{},s.set(t,{bounds:t.bounds||h.create(t.vertices),positionPrev:t.positionPrev||r.clone(t.position),anglePrev:t.anglePrev||t.angle,vertices:t.vertices,parts:t.parts||[t],isStatic:t.isStatic,isSleeping:t.isSleeping,parent:t.parent||t});var i=t.bounds;if(n.rotate(t.vertices,t.angle,t.position),l.rotate(t.axes,t.angle),h.update(i,t.vertices,t.velocity),s.set(t,{axes:e.axes||t.axes,area:e.area||t.area,mass:e.mass||t.mass,inertia:e.inertia||t.inertia}),1===t.parts.length){var o=t.centerOfMass,a=t.centerOffset,u=i.max.x-i.min.x,c=i.max.y-i.min.y;o.x=-(i.min.x-t.position.x)/u,o.y=-(i.min.y-t.position.y)/c,a.x=u*o.x,a.y=c*o.y}};s.set=function(t,e,i){var n;for(n in"string"==typeof e&&(n=e,(e={})[n]=i),e)if(Object.prototype.hasOwnProperty.call(e,n))switch(i=e[n],n){case"isStatic":s.setStatic(t,i);break;case"isSleeping":o.set(t,i);break;case"mass":s.setMass(t,i);break;case"density":s.setDensity(t,i);break;case"inertia":s.setInertia(t,i);break;case"vertices":s.setVertices(t,i);break;case"position":s.setPosition(t,i);break;case"angle":s.setAngle(t,i);break;case"velocity":s.setVelocity(t,i);break;case"angularVelocity":s.setAngularVelocity(t,i);break;case"parts":s.setParts(t,i);break;case"centre":s.setCentre(t,i);break;default:t[n]=i}},s.setStatic=function(t,e){for(var i=0;i0&&r.rotateAbout(o.position,i,t.position,o.position)}},s.setVelocity=function(t,e){t.positionPrev.x=t.position.x-e.x,t.positionPrev.y=t.position.y-e.y,t.velocity.x=e.x,t.velocity.y=e.y,t.speed=r.magnitude(t.velocity)},s.setAngularVelocity=function(t,e){t.anglePrev=t.angle-e,t.angularVelocity=e,t.angularSpeed=Math.abs(t.angularVelocity)},s.translate=function(t,e){s.setPosition(t,r.add(t.position,e))},s.rotate=function(t,e,i){if(i){var n=Math.cos(e),r=Math.sin(e),o=t.position.x-i.x,a=t.position.y-i.y;s.setPosition(t,{x:i.x+(o*n-a*r),y:i.y+(o*r+a*n)}),s.setAngle(t,t.angle+e)}else s.setAngle(t,t.angle+e)},s.scale=function(t,e,i,r){var o=0,a=0;r=r||t.position;for(var u=0;u0&&(o+=c.area,a+=c.inertia),c.position.x=r.x+(c.position.x-r.x)*e,c.position.y=r.y+(c.position.y-r.y)*i,h.update(c.bounds,c.vertices,t.velocity)}t.parts.length>1&&(t.area=o,t.isStatic||(s.setMass(t,t.density*o),s.setInertia(t,a))),t.circleRadius&&(e===i?t.circleRadius*=e:t.circleRadius=null)},s.update=function(t,e,i,s){var o=Math.pow(e*i*t.timeScale,2),a=1-t.frictionAir*i*t.timeScale,u=t.position.x-t.positionPrev.x,c=t.position.y-t.positionPrev.y;t.velocity.x=u*a*s+t.force.x/t.mass*o,t.velocity.y=c*a*s+t.force.y/t.mass*o,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.position.x+=t.velocity.x,t.position.y+=t.velocity.y,t.angularVelocity=(t.angle-t.anglePrev)*a*s+t.torque/t.inertia*o,t.anglePrev=t.angle,t.angle+=t.angularVelocity,t.speed=r.magnitude(t.velocity),t.angularSpeed=Math.abs(t.angularVelocity);for(var d=0;d0&&(p.position.x+=t.velocity.x,p.position.y+=t.velocity.y),0!==t.angularVelocity&&(n.rotate(p.vertices,t.angularVelocity,t.position),l.rotate(p.axes,t.angularVelocity),d>0&&r.rotateAbout(p.position,t.angularVelocity,t.position,p.position)),h.update(p.bounds,p.vertices,t.velocity)}},s.applyForce=function(t,e,i){t.force.x+=i.x,t.force.y+=i.y;var s=e.x-t.position.x,n=e.y-t.position.y;t.torque+=s*i.y-n*i.x},s._totalProperties=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;i{var s={};t.exports=s;var n=i(39073),r=i(68758),o=i(84091),a=i(84125);s.create=function(t){return r.extend({id:r.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},cache:{allBodies:null,allConstraints:null,allComposites:null}},t)},s.setModified=function(t,e,i,r){if(n.trigger(t,"compositeModified",t),t.isModified=e,e&&t.cache&&(t.cache.allBodies=null,t.cache.allConstraints=null,t.cache.allComposites=null),i&&t.parent&&s.setModified(t.parent,e,i,r),r)for(var o=0;o{var s={};t.exports=s;var n=i(11299);s.create=n.create,s.add=n.add,s.remove=n.remove,s.clear=n.clear,s.addComposite=n.addComposite,s.addBody=n.addBody,s.addConstraint=n.addConstraint},63454:(t,e,i)=>{var s={};t.exports=s;var n,r,o,a=i(39745),h=i(70584);n=[],r={overlap:0,axis:null},o={overlap:0,axis:null},s.create=function(t,e){return{pair:null,collided:!1,bodyA:t,bodyB:e,parentA:t.parent,parentB:e.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[]}},s.collides=function(t,e,i){if(s._overlapAxes(r,t.vertices,e.vertices,t.axes),r.overlap<=0)return null;if(s._overlapAxes(o,e.vertices,t.vertices,e.axes),o.overlap<=0)return null;var n,l,u=i&&i.table[h.id(t,e)];u?n=u.collision:((n=s.create(t,e)).collided=!0,n.bodyA=t.idS?S=a:aA?A=a:an?n=o:o{var e={};t.exports=e,e.create=function(t){return{vertex:t,normalImpulse:0,tangentImpulse:0}}},13657:(t,e,i)=>{var s={};t.exports=s;var n=i(68758),r=i(63454);s.create=function(t){return n.extend({bodies:[],pairs:null},t)},s.setBodies=function(t,e){t.bodies=e.slice(0)},s.clear=function(t){t.bodies=[]},s.collisions=function(t){var e,i,n=[],o=t.pairs,a=t.bodies,h=a.length,l=s.canCollide,u=r.collides;for(a.sort(s._compareBoundsX),e=0;ep)break;if(!(fC.max.y)&&(!g||!x.isStatic&&!x.isSleeping)&&l(c.collisionFilter,x.collisionFilter)){var T=x.parts.length;if(y&&1===T)(A=u(c,x,o))&&n.push(A);else for(var w=T>1?1:0,b=m>1?1:0;bC.max.x||d.max.xC.max.y||(A=u(E,_,o))&&n.push(A)}}}}return n},s.canCollide=function(t,e){return t.group===e.group&&0!==t.group?t.group>0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)},s._compareBoundsX=function(t,e){return t.bounds.min.x-e.bounds.min.x}},70584:(t,e,i)=>{var s={};t.exports=s;var n=i(17319);s.create=function(t,e){var i=t.bodyA,n=t.bodyB,r={id:s.id(i,n),bodyA:i,bodyB:n,collision:t,contacts:[],activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:i.isSensor||n.isSensor,timeCreated:e,timeUpdated:e,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return s.update(r,t,e),r},s.update=function(t,e,i){var s=t.contacts,r=e.supports,o=t.activeContacts,a=e.parentA,h=e.parentB,l=a.vertices.length;t.isActive=!0,t.timeUpdated=i,t.collision=e,t.separation=e.depth,t.inverseMass=a.inverseMass+h.inverseMass,t.friction=a.frictionh.frictionStatic?a.frictionStatic:h.frictionStatic,t.restitution=a.restitution>h.restitution?a.restitution:h.restitution,t.slop=a.slop>h.slop?a.slop:h.slop,e.pair=t,o.length=0;for(var u=0;u{var s={};t.exports=s;var n=i(70584),r=i(68758);s.create=function(t){return r.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},s.update=function(t,e,i){var s,r,o,a,h=t.list,l=h.length,u=t.table,c=e.length,d=t.collisionStart,p=t.collisionEnd,f=t.collisionActive;for(d.length=0,p.length=0,f.length=0,a=0;a{var s={};t.exports=s;var n=i(10438),r=i(63454),o=i(84091),a=i(68516),h=i(39745);s.collides=function(t,e){for(var i=[],s=e.length,n=t.bounds,a=r.collides,h=o.overlaps,l=0;l{var s={};t.exports=s;var n=i(39745),r=i(84091);s._restingThresh=4,s._restingThreshTangent=6,s._positionDampen=.9,s._positionWarming=.8,s._frictionNormalMultiplier=5,s.preSolvePosition=function(t){var e,i,s,n=t.length;for(e=0;ez||-Y>z?(n=Y>0?Y:-Y,(i=p.friction*(Y>0?1:-1)*a)<-n?i=-n:i>n&&(i=n)):(i=Y,n=c);var G=P*T-O*x,V=L*T-F*x,W=A/(_+v.inverseInertia*G*G+g.inverseInertia*V*V),H=(1+p.restitution)*N*W;if(i*=W,N*N>h&&N<0)M.normalImpulse=0;else{var j=M.normalImpulse;M.normalImpulse+=H,M.normalImpulse=Math.min(M.normalImpulse,0),H=M.normalImpulse-j}if(Y*Y>u)M.tangentImpulse=0;else{var K=M.tangentImpulse;M.tangentImpulse+=i,M.tangentImpulse<-n&&(M.tangentImpulse=-n),M.tangentImpulse>n&&(M.tangentImpulse=n),i=M.tangentImpulse-K}var q=x*H+w*i,Z=T*H+b*i;v.isStatic||v.isSleeping||(v.positionPrev.x+=q*v.inverseMass,v.positionPrev.y+=Z*v.inverseMass,v.anglePrev+=(P*Z-O*q)*v.inverseInertia),g.isStatic||g.isSleeping||(g.positionPrev.x-=q*g.inverseMass,g.positionPrev.y-=Z*g.inverseMass,g.anglePrev-=(L*Z-F*q)*g.inverseInertia)}}}}},52838:(t,e,i)=>{var s={};t.exports=s;var n=i(39745),r=i(10438),o=i(22806),a=i(84091),h=i(50658),l=i(68758);s._warming=.4,s._torqueDampen=1,s._minLength=1e-6,s.create=function(t){var e=t;e.bodyA&&!e.pointA&&(e.pointA={x:0,y:0}),e.bodyB&&!e.pointB&&(e.pointB={x:0,y:0});var i=e.bodyA?r.add(e.bodyA.position,e.pointA):e.pointA,s=e.bodyB?r.add(e.bodyB.position,e.pointB):e.pointB,n=r.magnitude(r.sub(i,s));e.length=void 0!==e.length?e.length:n,e.id=e.id||l.nextId(),e.label=e.label||"Constraint",e.type="constraint",e.stiffness=e.stiffness||(e.length>0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=l.extend(o,e.render),e},s.preSolveAll=function(t){for(var e=0;e0&&(c.position.x+=l.x,c.position.y+=l.y),0!==l.angle&&(n.rotate(c.vertices,l.angle,i.position),h.rotate(c.axes,l.angle),u>0&&r.rotateAbout(c.position,l.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}l.angle*=s._warming,l.x*=s._warming,l.y*=s._warming}}},s.pointAWorld=function(t){return{x:(t.bodyA?t.bodyA.position.x:0)+(t.pointA?t.pointA.x:0),y:(t.bodyA?t.bodyA.position.y:0)+(t.pointA?t.pointA.y:0)}},s.pointBWorld=function(t){return{x:(t.bodyB?t.bodyB.position.x:0)+(t.pointB?t.pointB.x:0),y:(t.bodyB?t.bodyB.position.y:0)+(t.pointB?t.pointB.y:0)}}},68758:(t,e,i)=>{var s={};t.exports=s,function(){s._nextId=0,s._seed=0,s._nowStartTime=+new Date,s._warnedOnce={},s._decomp=null,s.extend=function(t,e){var i,n;"boolean"==typeof e?(i=2,n=e):(i=1,n=!0);for(var r=i;r0;e--){var i=Math.floor(s.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t},s.choose=function(t){return t[Math.floor(s.random()*t.length)]},s.isElement=function(t){return"undefined"!=typeof HTMLElement?t instanceof HTMLElement:!!(t&&t.nodeType&&t.nodeName)},s.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},s.isFunction=function(t){return"function"==typeof t},s.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},s.isString=function(t){return"[object String]"===toString.call(t)},s.clamp=function(t,e,i){return ti?i:t},s.sign=function(t){return t<0?-1:1},s.now=function(){if("undefined"!=typeof window&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return Date.now?Date.now():new Date-s._nowStartTime},s.random=function(e,i){return i=void 0!==i?i:1,(e=void 0!==e?e:0)+t()*(i-e)};var t=function(){return s._seed=(9301*s._seed+49297)%233280,s._seed/233280};s.colorToNumber=function(t){return 3==(t=t.replace("#","")).length&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),parseInt(t,16)},s.logLevel=1,s.log=function(){console&&s.logLevel>0&&s.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},s.info=function(){console&&s.logLevel>0&&s.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},s.warn=function(){console&&s.logLevel>0&&s.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},s.warnOnce=function(){var t=Array.prototype.slice.call(arguments).join(" ");s._warnedOnce[t]||(s.warn(t),s._warnedOnce[t]=!0)},s.deprecated=function(t,e,i){t[e]=s.chain((function(){s.warnOnce("🔅 deprecated 🔅",i)}),t[e])},s.nextId=function(){return s._nextId++},s.indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var i=0;i{var s={};t.exports=s;var n=i(22806),r=i(44272),o=i(13657),a=i(91327),h=i(39073),l=i(11299),u=i(52838),c=i(68758),d=i(84125);s.create=function(t){t=t||{};var e=c.extend({positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},gravity:{x:0,y:1,scale:.001},timing:{timestamp:0,timeScale:1,lastDelta:0,lastElapsed:0}},t);return e.world=t.world||l.create({label:"World"}),e.pairs=t.pairs||a.create(),e.detector=t.detector||o.create(),e.grid={buckets:[]},e.world.gravity=e.gravity,e.broadphase=e.grid,e.metrics={},e},s.update=function(t,e,i){var d=c.now();e=e||1e3/60,i=i||1;var p,f=t.world,v=t.detector,g=t.pairs,m=t.timing,y=m.timestamp;m.timestamp+=e*m.timeScale,m.lastDelta=e*m.timeScale;var x={timestamp:m.timestamp};h.trigger(t,"beforeUpdate",x);var T=l.allBodies(f),w=l.allConstraints(f);for(f.isModified&&o.setBodies(v,T),f.isModified&&l.setModified(f,!1,!1,!0),t.enableSleeping&&n.update(T,m.timeScale),s._bodiesApplyGravity(T,t.gravity),s._bodiesUpdate(T,e,m.timeScale,i,f.bounds),u.preSolveAll(T),p=0;p0&&h.trigger(t,"collisionStart",{pairs:g.collisionStart}),r.preSolvePosition(g.list),p=0;p0&&h.trigger(t,"collisionActive",{pairs:g.collisionActive}),g.collisionEnd.length>0&&h.trigger(t,"collisionEnd",{pairs:g.collisionEnd}),s._bodiesClearForces(T),h.trigger(t,"afterUpdate",x),t.timing.lastElapsed=c.now()-d,t},s.merge=function(t,e){if(c.extend(t,e),e.world){t.world=e.world,s.clear(t);for(var i=l.allBodies(t.world),r=0;r{var s={};t.exports=s;var n=i(68758);s.on=function(t,e,i){for(var s,n=e.split(" "),r=0;r0){i||(i={}),s=e.split(" ");for(var l=0;l{var s={};t.exports=s;var n=i(84474),r=i(68758);s.name="matter-js",s.version="0.18.0",s.uses=[],s.used=[],s.use=function(){n.use(s,Array.prototype.slice.call(arguments))},s.before=function(t,e){return t=t.replace(/^Matter./,""),r.chainPathBefore(s,t,e)},s.after=function(t,e){return t=t.replace(/^Matter./,""),r.chainPathAfter(s,t,e)}},84474:(t,e,i)=>{var s={};t.exports=s;var n=i(68758);s._registry={},s.register=function(t){if(s.isPlugin(t)||n.warn("Plugin.register:",s.toString(t),"does not implement all required fields."),t.name in s._registry){var e=s._registry[t.name],i=s.versionParse(t.version).number,r=s.versionParse(e.version).number;i>r?(n.warn("Plugin.register:",s.toString(e),"was upgraded to",s.toString(t)),s._registry[t.name]=t):i-1},s.isFor=function(t,e){var i=t.for&&s.dependencyParse(t.for);return!t.for||e.name===i.name&&s.versionSatisfies(e.version,i.range)},s.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i=s.dependencies(t),r=n.topologicalSort(i),o=[],a=0;a0&&!h.silent&&n.info(o.join(" "))}else n.warn("Plugin.use:",s.toString(t),"does not specify any dependencies to install.")},s.dependencies=function(t,e){var i=s.dependencyParse(t),r=i.name;if(!(r in(e=e||{}))){t=s.resolve(t)||t,e[r]=n.map(t.uses||[],(function(e){s.isPlugin(e)&&s.register(e);var r=s.dependencyParse(e),o=s.resolve(e);return o&&!s.versionSatisfies(o.version,r.range)?(n.warn("Plugin.dependencies:",s.toString(o),"does not satisfy",s.toString(r),"used by",s.toString(i)+"."),o._warned=!0,t._warned=!0):o||(n.warn("Plugin.dependencies:",s.toString(e),"used by",s.toString(i),"could not be resolved."),t._warned=!0),r.name}));for(var o=0;o=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;e.test(t)||n.warn("Plugin.versionParse:",t,"is not a valid version or range.");var i=e.exec(t),s=Number(i[4]),r=Number(i[5]),o=Number(i[6]);return{isRange:Boolean(i[1]||i[2]),version:i[3],range:t,operator:i[1]||i[2]||"",major:s,minor:r,patch:o,parts:[s,r,o],prerelease:i[7],number:1e8*s+1e4*r+o}},s.versionSatisfies=function(t,e){e=e||"*";var i=s.versionParse(e),n=s.versionParse(t);if(i.isRange){if("*"===i.operator||"*"===t)return!0;if(">"===i.operator)return n.number>i.number;if(">="===i.operator)return n.number>=i.number;if("~"===i.operator)return n.major===i.major&&n.minor===i.minor&&n.patch>=i.patch;if("^"===i.operator)return i.major>0?n.major===i.major&&n.number>=i.number:i.minor>0?n.minor===i.minor&&n.patch>=i.patch:n.patch===i.patch}return t===e||"*"===t}},22806:(t,e,i)=>{var s={};t.exports=s;var n=i(39073);s._motionWakeThreshold=.18,s._motionSleepThreshold=.08,s._minBias=.9,s.update=function(t,e){for(var i=e*e*e,n=0;n0&&r.motion=r.sleepThreshold&&s.set(r,!0)):r.sleepCounter>0&&(r.sleepCounter-=1)}else s.set(r,!1)}},s.afterCollisions=function(t,e){for(var i=e*e*e,n=0;ns._motionWakeThreshold*i&&s.set(l,!1)}}}},s.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||n.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&n.trigger(t,"sleepEnd"))}},68516:(t,e,i)=>{var s={};t.exports=s;var n=i(39745),r=i(68758),o=i(84125),a=i(84091),h=i(10438);s.rectangle=function(t,e,i,s,a){a=a||{};var h={label:"Rectangle Body",position:{x:t,y:e},vertices:n.fromPath("L 0 0 L "+i+" 0 L "+i+" "+s+" L 0 "+s)};if(a.chamfer){var l=a.chamfer;h.vertices=n.chamfer(h.vertices,l.radius,l.quality,l.qualityMin,l.qualityMax),delete a.chamfer}return o.create(r.extend({},h,a))},s.trapezoid=function(t,e,i,s,a,h){h=h||{};var l,u=i*(a*=.5),c=u+(1-2*a)*i,d=c+u;l=a<.5?"L 0 0 L "+u+" "+-s+" L "+c+" "+-s+" L "+d+" 0":"L 0 0 L "+c+" "+-s+" L "+d+" 0";var p={label:"Trapezoid Body",position:{x:t,y:e},vertices:n.fromPath(l)};if(h.chamfer){var f=h.chamfer;p.vertices=n.chamfer(p.vertices,f.radius,f.quality,f.qualityMin,f.qualityMax),delete h.chamfer}return o.create(r.extend({},p,h))},s.circle=function(t,e,i,n,o){n=n||{};var a={label:"Circle Body",circleRadius:i};o=o||25;var h=Math.ceil(Math.max(10,Math.min(o,i)));return h%2==1&&(h+=1),s.polygon(t,e,h,i,r.extend({},a,n))},s.polygon=function(t,e,i,a,h){if(h=h||{},i<3)return s.circle(t,e,a,h);for(var l=2*Math.PI/i,u="",c=.5*l,d=0;d0&&n.area(b)1?(p=o.create(r.extend({parts:f.slice(0)},a)),o.setPosition(p,{x:t,y:e}),p):f[0]},s.flagCoincidentParts=function(t,e){void 0===e&&(e=5);for(var i=0;i{var s={};t.exports=s;var n=i(11299),r=i(52838),o=i(68758),a=i(84125),h=i(68516),l=o.deprecated;s.stack=function(t,e,i,s,r,o,h){for(var l,u=n.create({label:"Stack"}),c=t,d=e,p=0,f=0;fv&&(v=y),a.translate(m,{x:.5*x,y:.5*y}),c=m.bounds.max.x+r,n.addBody(u,m),l=m,p+=1}else c+=r}d+=v+o,c=t}return u},s.chain=function(t,e,i,s,a,h){for(var l=t.bodies,u=1;u0)for(l=0;l0&&(d=p[l-1+(h-1)*e],n.addConstraint(t,r.create(o.extend({bodyA:d,bodyB:c},a)))),s&&ld||o<(l=d-l)||o>i-1-l))return 1===c&&a.translate(u,{x:(o+(i%2==1?1:-1))*p,y:0}),h(t+(u?o*p:0)+o*r,s,o,l,u,c)}))},s.newtonsCradle=function(t,e,i,s,o){for(var a=n.create({label:"Newtons Cradle"}),l=0;l{var s={};t.exports=s;var n=i(10438),r=i(68758);s.fromVertices=function(t){for(var e={},i=0;i{var e={};t.exports=e,e.create=function(t){var i={min:{x:0,y:0},max:{x:0,y:0}};return t&&e.update(i,t),i},e.update=function(t,e,i){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var s=0;st.max.x&&(t.max.x=n.x),n.xt.max.y&&(t.max.y=n.y),n.y0?t.max.x+=i.x:t.min.x+=i.x,i.y>0?t.max.y+=i.y:t.min.y+=i.y)},e.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},e.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},e.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},e.shift=function(t,e){var i=t.max.x-t.min.x,s=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+s}},92765:(t,e,i)=>{var s={};t.exports=s;i(84091);var n=i(68758);s.pathToVertices=function(t,e){"undefined"==typeof window||"SVGPathSeg"in window||n.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var i,r,o,a,h,l,u,c,d,p,f,v=[],g=0,m=0,y=0;e=e||15;var x=function(t,e,i){var s=i%2==1&&i>1;if(!d||t!=d.x||e!=d.y){d&&s?(p=d.x,f=d.y):(p=0,f=0);var n={x:p+t,y:f+e};!s&&d||(d=n),v.push(n),m=p+t,y=f+e}},T=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":m=t.x,y=t.y;break;case"H":m=t.x;break;case"V":y=t.y}x(m,y,t.pathSegType)}};for(s._svgPathToAbsolute(t),o=t.getTotalLength(),l=[],i=0;i{var e={};t.exports=e,e.create=function(t,e){return{x:t||0,y:e||0}},e.clone=function(t){return{x:t.x,y:t.y}},e.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},e.rotate=function(t,e,i){var s=Math.cos(e),n=Math.sin(e);i||(i={});var r=t.x*s-t.y*n;return i.y=t.x*n+t.y*s,i.x=r,i},e.rotateAbout=function(t,e,i,s){var n=Math.cos(e),r=Math.sin(e);s||(s={});var o=i.x+((t.x-i.x)*n-(t.y-i.y)*r);return s.y=i.y+((t.x-i.x)*r+(t.y-i.y)*n),s.x=o,s},e.normalise=function(t){var i=e.magnitude(t);return 0===i?{x:0,y:0}:{x:t.x/i,y:t.y/i}},e.dot=function(t,e){return t.x*e.x+t.y*e.y},e.cross=function(t,e){return t.x*e.y-t.y*e.x},e.cross3=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x)},e.add=function(t,e,i){return i||(i={}),i.x=t.x+e.x,i.y=t.y+e.y,i},e.sub=function(t,e,i){return i||(i={}),i.x=t.x-e.x,i.y=t.y-e.y,i},e.mult=function(t,e){return{x:t.x*e,y:t.y*e}},e.div=function(t,e){return{x:t.x/e,y:t.y/e}},e.perp=function(t,e){return{x:(e=!0===e?-1:1)*-t.y,y:e*t.x}},e.neg=function(t){return{x:-t.x,y:-t.y}},e.angle=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},e._temp=[e.create(),e.create(),e.create(),e.create(),e.create(),e.create()]},39745:(t,e,i)=>{var s={};t.exports=s;var n=i(10438),r=i(68758);s.create=function(t,e){for(var i=[],s=0;s0)return!1;o=i}return!0},s.scale=function(t,e,i,r){if(1===e&&1===i)return t;var o,a;r=r||s.centre(t);for(var h=0;h=0?h-1:t.length-1],u=t[h],c=t[(h+1)%t.length],d=e[h0&&(r|=2),3===r)return!1;return 0!==r||null},s.hull=function(t){var e,i,s=[],r=[];for((t=t.slice(0)).sort((function(t,e){var i=t.x-e.x;return 0!==i?i:t.y-e.y})),i=0;i=2&&n.cross3(r[r.length-2],r[r.length-1],e)<=0;)r.pop();r.push(e)}for(i=t.length-1;i>=0;i-=1){for(e=t[i];s.length>=2&&n.cross3(s[s.length-2],s[s.length-1],e)<=0;)s.pop();s.push(e)}return s.pop(),r.pop(),s.concat(r)}},1675:(t,e,i)=>{var s=i(18171),n={name:"matter-attractors",version:"0.1.7",for:"matter-js@^0.18.0",silent:!0,install:function(t){t.after("Body.create",(function(){n.Body.init(this)})),t.before("Engine.update",(function(t){n.Engine.update(t)}))},Body:{init:function(t){t.plugin.attractors=t.plugin.attractors||[]}},Engine:{update:function(t){for(var e=s.Composite.allBodies(t.world),i=0;i0)for(var o=0;o{t.exports={name:"matter-collision-events",version:"0.1.6",for:"matter-js@^0.18.0",silent:!0,install:function(t){t.after("Engine.create",(function(){t.Events.on(this,"collisionStart",(function(e){e.pairs.map((function(e){var i=e.bodyA,s=e.bodyB;i.gameObject&&i.gameObject.emit("collide",i,s,e),s.gameObject&&s.gameObject.emit("collide",s,i,e),t.Events.trigger(i,"onCollide",{pair:e}),t.Events.trigger(s,"onCollide",{pair:e}),i.onCollideCallback&&i.onCollideCallback(e),s.onCollideCallback&&s.onCollideCallback(e),i.onCollideWith[s.id]&&i.onCollideWith[s.id](s,e),s.onCollideWith[i.id]&&s.onCollideWith[i.id](i,e)}))})),t.Events.on(this,"collisionActive",(function(e){e.pairs.map((function(e){var i=e.bodyA,s=e.bodyB;i.gameObject&&i.gameObject.emit("collideActive",i,s,e),s.gameObject&&s.gameObject.emit("collideActive",s,i,e),t.Events.trigger(i,"onCollideActive",{pair:e}),t.Events.trigger(s,"onCollideActive",{pair:e}),i.onCollideActiveCallback&&i.onCollideActiveCallback(e),s.onCollideActiveCallback&&s.onCollideActiveCallback(e)}))})),t.Events.on(this,"collisionEnd",(function(e){e.pairs.map((function(e){var i=e.bodyA,s=e.bodyB;i.gameObject&&i.gameObject.emit("collideEnd",i,s,e),s.gameObject&&s.gameObject.emit("collideEnd",s,i,e),t.Events.trigger(i,"onCollideEnd",{pair:e}),t.Events.trigger(s,"onCollideEnd",{pair:e}),i.onCollideEndCallback&&i.onCollideEndCallback(e),s.onCollideEndCallback&&s.onCollideEndCallback(e)}))}))}))}}},44097:(t,e,i)=>{var s=i(18171),n={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.18.0",silent:!0,install:function(t){t.after("Engine.update",(function(){n.Engine.update(this)}))},Engine:{update:function(t){for(var e=t.world,i=s.Composite.allBodies(e),r=s.Composite.allComposites(e),o=0;oe.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?s=e.min.y-t.max.y:t.max.y{function e(t,e,i){i=i||0;var s,n,r,o,a,h,l,u=[0,0];return s=t[1][1]-t[0][1],n=t[0][0]-t[1][0],r=s*t[0][0]+n*t[0][1],o=e[1][1]-e[0][1],a=e[0][0]-e[1][0],h=o*e[0][0]+a*e[0][1],E(l=s*a-o*n,0,i)||(u[0]=(a*r-n*h)/l,u[1]=(s*h-o*r)/l),u}function i(t,e,i,s){var n=e[0]-t[0],r=e[1]-t[1],o=s[0]-i[0],a=s[1]-i[1];if(o*r-a*n==0)return!1;var h=(n*(i[1]-t[1])+r*(t[0]-i[0]))/(o*r-a*n),l=(o*(t[1]-i[1])+a*(i[0]-t[0]))/(a*n-o*r);return h>=0&&h<=1&&l>=0&&l<=1}function s(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function n(t,e,i){return s(t,e,i)>0}function r(t,e,i){return s(t,e,i)>=0}function o(t,e,i){return s(t,e,i)<0}function a(t,e,i){return s(t,e,i)<=0}t.exports={decomp:function(t){var e=T(t);return e.length>0?w(t,e):[t]},quickDecomp:function t(e,i,s,h,l,u,v){u=u||100,v=v||0,l=l||25,i=void 0!==i?i:[],s=s||[],h=h||[];var g=[0,0],m=[0,0],x=[0,0],T=0,w=0,E=0,S=0,A=0,_=0,C=0,M=[],R=[],P=e,O=e;if(O.length<3)return i;if(++v>u)return console.warn("quickDecomp: max level ("+u+") reached."),i;for(var L=0;LA&&(A+=e.length),S=Number.MAX_VALUE,A<_)return i;for(F=_;F<=A;++F)r(d(P,L-1),d(P,L),d(P,F))&&a(d(P,L+1),d(P,L),d(P,F))&&(E=c(d(P,L),d(P,F)))3&&s>=0;--s)u(d(t,s-1),d(t,s),d(t,s+1),e)&&(t.splice(s%t.length,1),i++);return i},removeDuplicatePoints:function(t,e){for(var i=t.length-1;i>=1;--i)for(var s=t[i],n=i-1;n>=0;--n)S(s,t[n],e)&&t.splice(i,1)},makeCCW:function(t){for(var e=0,i=t,s=1;si[e][0])&&(e=s);return!n(d(t,e-1),d(t,e),d(t,e+1))&&(function(t){for(var e=[],i=t.length,s=0;s!==i;s++)e.push(t.pop());for(s=0;s!==i;s++)t[s]=e[s]}(t),!0)}};var h=[],l=[];function u(t,e,i,n){if(n){var r=h,o=l;r[0]=e[0]-t[0],r[1]=e[1]-t[1],o[0]=i[0]-e[0],o[1]=i[1]-e[1];var a=r[0]*o[0]+r[1]*o[1],u=Math.sqrt(r[0]*r[0]+r[1]*r[1]),c=Math.sqrt(o[0]*o[0]+o[1]*o[1]);return Math.acos(a/(u*c)){var s=new(i(56694))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=s},18360:t=>{t.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},91963:t=>{var e={},i={},s={register:function(t,i,s,n){void 0===n&&(n=!1),e[t]={plugin:i,mapping:s,custom:n}},registerCustom:function(t,e,s,n){i[t]={plugin:e,mapping:s,data:n}},hasCore:function(t){return e.hasOwnProperty(t)},hasCustom:function(t){return i.hasOwnProperty(t)},getCore:function(t){return e[t]},getCustom:function(t){return i[t]},getCustomClass:function(t){return i.hasOwnProperty(t)?i[t].plugin:null},remove:function(t){e.hasOwnProperty(t)&&delete e[t]},removeCustom:function(t){i.hasOwnProperty(t)&&delete i[t]},destroyCorePlugins:function(){for(var t in e)e.hasOwnProperty(t)&&delete e[t]},destroyCustomPlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]}};t.exports=s},49274:(t,e,i)=>{var s=i(56694),n=i(97081),r=i(6659),o=i(76846),a=i(99325),h=i(61286),l=i(72632),u=i(91963),c=i(66458),d=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],t.isBooted?this.boot():t.events.once(n.BOOT,this.boot,this)},boot:function(){var t,e,i,s,r,o,a,h=this.game.config,u=h.installGlobalPlugins;for(u=u.concat(this._pendingGlobal),t=0;t{var s=i(88257),n=i(56694),r=i(7599),o=new n({Extends:s,initialize:function(t,e,i){s.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,t.sys.events.once(r.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=o},45615:(t,e,i)=>{t.exports={BasePlugin:i(88257),DefaultPlugins:i(18360),PluginCache:i(91963),PluginManager:i(49274),ScenePlugin:i(39283)}},95723:t=>{t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},27394:t=>{t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},91135:(t,e,i)=>{var s=i(89787),n=i(61840),r=i(56694),o=i(86459),a=i(6659),h=i(81044),l=i(32834),u=i(40444),c=i(38203),d=i(69360),p=new r({Extends:a,initialize:function(t){a.call(this);var e=t.config;this.config={clearBeforeRender:e.clearBeforeRender,backgroundColor:e.backgroundColor,antialias:e.antialias,roundPixels:e.roundPixels},this.game=t,this.type=o.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=t.canvas;var i={alpha:t.config.transparent,desynchronized:t.config.desynchronized,willReadFrequently:!1};this.gameContext=e.context?e.context:this.gameCanvas.getContext("2d",i),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=l(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new d,this._tempMatrix2=new d,this._tempMatrix3=new d,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(c.READY,this.boot,this)},boot:function(){var t=this.game,e=t.scale.baseSize;this.width=e.width,this.height=e.height,this.isBooted=!0,t.scale.on(u.RESIZE,this.onResize,this),this.resize(e.width,e.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e,this.emit(h.RESIZE,t,e)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,s=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&(t.clearRect(0,0,i,s),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,s))),t.save(),this.drawCount=0,this.emit(h.PRE_RENDER)},render:function(t,e,i){var n=e.length;this.emit(h.RENDER,t,i);var r=i.x,o=i.y,a=i.width,l=i.height,u=i.renderToTexture?i.context:t.sys.context;u.save(),this.game.scene.customViewports&&(u.beginPath(),u.rect(r,o,a,l),u.clip()),i.emit(s.PRE_RENDER,i),this.currentContext=u;var c=i.mask;c&&c.preRenderCanvas(this,null,i._maskCamera),i.transparent||(u.fillStyle=i.backgroundColor.rgba,u.fillRect(r,o,a,l)),u.globalAlpha=i.alpha,u.globalCompositeOperation="source-over",this.drawCount+=n,i.renderToTexture&&i.emit(s.PRE_RENDER,i),i.matrix.copyToContext(u);for(var d=0;d=0?m=-(m+c):m<0&&(m=Math.abs(m)-c)),t.flipY&&(y>=0?y=-(y+d):y<0&&(y=Math.abs(y)-d))}var T=1,w=1;t.flipX&&(p||(m+=-e.realWidth+2*v),T=-1),t.flipY&&(p||(y+=-e.realHeight+2*g),w=-1);var b=t.x,E=t.y;i.roundPixels&&(b=Math.floor(b),E=Math.floor(E)),a.applyITRS(b,E,t.rotation,t.scaleX*T,t.scaleY*w),o.copyFrom(i.matrix),s?(o.multiplyWithOffset(s,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),a.e=b,a.f=E):(a.e-=i.scrollX*t.scrollFactorX,a.f-=i.scrollY*t.scrollFactorY),o.multiply(a),i.roundPixels&&(o.e=Math.round(o.e),o.f=Math.round(o.f)),r.save(),o.setToContext(r),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=n,r.imageSmoothingEnabled=!e.source.scaleMode,t.mask&&t.mask.preRenderCanvas(this,t,i),c>0&&d>0&&r.drawImage(e.source.image,l,u,c,d,m,y,c/f,d/f),t.mask&&t.mask.postRenderCanvas(this,t,i),r.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});t.exports=p},6046:(t,e,i)=>{t.exports={CanvasRenderer:i(91135),GetBlendModes:i(32834),SetTransform:i(49584)}},32834:(t,e,i)=>{var s=i(95723),n=i(98581);t.exports=function(){var t=[],e=n.supportNewBlendModes,i="source-over";return t[s.NORMAL]=i,t[s.ADD]="lighter",t[s.MULTIPLY]=e?"multiply":i,t[s.SCREEN]=e?"screen":i,t[s.OVERLAY]=e?"overlay":i,t[s.DARKEN]=e?"darken":i,t[s.LIGHTEN]=e?"lighten":i,t[s.COLOR_DODGE]=e?"color-dodge":i,t[s.COLOR_BURN]=e?"color-burn":i,t[s.HARD_LIGHT]=e?"hard-light":i,t[s.SOFT_LIGHT]=e?"soft-light":i,t[s.DIFFERENCE]=e?"difference":i,t[s.EXCLUSION]=e?"exclusion":i,t[s.HUE]=e?"hue":i,t[s.SATURATION]=e?"saturation":i,t[s.COLOR]=e?"color":i,t[s.LUMINOSITY]=e?"luminosity":i,t[s.ERASE]="destination-out",t[s.SOURCE_IN]="source-in",t[s.SOURCE_OUT]="source-out",t[s.SOURCE_ATOP]="source-atop",t[s.DESTINATION_OVER]="destination-over",t[s.DESTINATION_IN]="destination-in",t[s.DESTINATION_OUT]="destination-out",t[s.DESTINATION_ATOP]="destination-atop",t[s.LIGHTER]="lighter",t[s.COPY]="copy",t[s.XOR]="xor",t}},49584:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n,r){var o=n.alpha*i.alpha;if(o<=0)return!1;var a=s(i,n,r).calc;return e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=o,e.save(),a.setToContext(e),e.imageSmoothingEnabled=i.frame?!i.frame.source.scaleMode:t.antialias,!0}},70936:t=>{t.exports="postrender"},99298:t=>{t.exports="prerender"},7743:t=>{t.exports="render"},99519:t=>{t.exports="resize"},81044:(t,e,i)=>{t.exports={POST_RENDER:i(70936),PRE_RENDER:i(99298),RENDER:i(7743),RESIZE:i(99519)}},42069:(t,e,i)=>{t.exports={Canvas:i(6046),Events:i(81044),Snapshot:i(95528),WebGL:i(55478)}},61840:(t,e,i)=>{var s=i(61068),n=i(27119),r=i(72632);t.exports=function(t,e){var i=r(e,"callback"),o=r(e,"type","image/png"),a=r(e,"encoder",.92),h=Math.abs(Math.round(r(e,"x",0))),l=Math.abs(Math.round(r(e,"y",0))),u=Math.floor(r(e,"width",t.width)),c=Math.floor(r(e,"height",t.height));if(r(e,"getPixel",!1)){var d=t.getContext("2d").getImageData(h,l,1,1).data;i.call(null,new n(d[0],d[1],d[2],d[3]))}else if(0!==h||0!==l||u!==t.width||c!==t.height){var p=s.createWebGL(this,u,c),f=p.getContext("2d");u>0&&c>0&&f.drawImage(t,h,l,u,c,0,0,u,c);var v=new Image;v.onerror=function(){i.call(null),s.remove(p)},v.onload=function(){i.call(null,v),s.remove(p)},v.src=p.toDataURL(o,a)}else{var g=new Image;g.onerror=function(){i.call(null)},g.onload=function(){i.call(null,g)},g.src=t.toDataURL(o,a)}}},1217:(t,e,i)=>{var s=i(61068),n=i(27119),r=i(72632);t.exports=function(t,e){var i=t,o=r(e,"callback"),a=r(e,"type","image/png"),h=r(e,"encoder",.92),l=Math.abs(Math.round(r(e,"x",0))),u=Math.abs(Math.round(r(e,"y",0))),c=r(e,"getPixel",!1),d=r(e,"isFramebuffer",!1),p=d?r(e,"bufferWidth",1):i.drawingBufferWidth,f=d?r(e,"bufferHeight",1):i.drawingBufferHeight;if(c){var v=new Uint8Array(4),g=d?u:f-u;i.readPixels(l,g,1,1,i.RGBA,i.UNSIGNED_BYTE,v),o.call(null,new n(v[0],v[1],v[2],v[3]))}else{var m=Math.floor(r(e,"width",p)),y=Math.floor(r(e,"height",f)),x=m*y*4,T=new Uint8Array(x);i.readPixels(l,f-u-y,m,y,i.RGBA,i.UNSIGNED_BYTE,T);for(var w=s.createWebGL(this,m,y),b=w.getContext("2d"),E=b.getImageData(0,0,m,y),S=E.data,A=0;A{t.exports={Canvas:i(61840),WebGL:i(1217)}},35217:(t,e,i)=>{var s=i(56694),n=i(65641),r=i(33885),o=i(77290),a=i(72632),h=i(37410),l=i(82127),u=i(5583),c=i(66901),d=i(71264),p=i(77310),f=i(10919),v=i(21213),g=i(51212),m=i(60848),y=new s({initialize:function(t){this.game=t.game,this.renderer=t,this.classes=new r([[n.UTILITY_PIPELINE,m],[n.MULTI_PIPELINE,p],[n.BITMAPMASK_PIPELINE,u],[n.SINGLE_PIPELINE,g],[n.ROPE_PIPELINE,v],[n.LIGHT_PIPELINE,c],[n.POINTLIGHT_PIPELINE,f],[n.MOBILE_PIPELINE,d]]),this.postPipelineClasses=new r,this.pipelines=new r,this.default=null,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.MOBILE_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderTargets=[],this.maxDimension=0,this.frameInc=32,this.targetIndex=0},boot:function(t,e,i){var s=this.renderer,r=this.renderTargets;this.frameInc=Math.floor(a(t,"frameInc",32));for(var l,u,c=s.width,d=s.height,p=Math.min(c,d),f=Math.ceil(p/this.frameInc),v=1;v=0;i--){var s=e[i];s.active&&s.preBatch(t)}}},postBatch:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;i=0;i--){var s=e[i];s.active&&s.preBatch(t)}}},postBatchCamera:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;ithis.maxDimension)return this.targetIndex=e.length-3,e[this.targetIndex];var i=3*(l(t,this.frameInc,0,!0)-1);return this.targetIndex=i,e[i]},getSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+1]},getAltSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+2]},destroy:function(){this.flush(),this.classes.clear(),this.postPipelineClasses.clear(),this.pipelines.clear(),this.renderer=null,this.game=null,this.classes=null,this.postPipelineClasses=null,this.pipelines=null,this.default=null,this.current=null,this.previous=null}});t.exports=y},37410:(t,e,i)=>{var s=i(56694),n=i(81044),r=new s({initialize:function(t,e,i,s,n,r,o){void 0===s&&(s=1),void 0===n&&(n=0),void 0===r&&(r=!0),void 0===o&&(o=!1),this.renderer=t,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=s,this.minFilter=n,this.autoClear=r,this.autoResize=!1,this.resize(e,i),o&&this.setAutoResize(!0)},setAutoResize:function(t){return t&&!this.autoResize?(this.renderer.on(n.RESIZE,this.resize,this),this.autoResize=!0):!t&&this.autoResize&&(this.renderer.off(n.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(t,e){var i=t*this.scale,s=e*this.scale;if(i!==this.width||s!==this.height){var n=this.renderer;n.deleteFramebuffer(this.framebuffer),n.deleteTexture(this.texture),t*=this.scale,e*=this.scale,(t=Math.round(t))<=0&&(t=1),(e=Math.round(e))<=0&&(e=1),this.texture=n.createTextureFromSource(null,t,e,this.minFilter,!0),this.framebuffer=n.createFramebuffer(t,e,this.texture,!0),this.width=t,this.height=e}return this},bind:function(t,e,i){if(void 0===t&&(t=!1),t&&this.renderer.flush(),e&&i&&this.resize(e,i),this.renderer.pushFramebuffer(this.framebuffer,!1,!1,!1),t&&this.adjustViewport(),this.autoClear){var s=this.renderer.gl;s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT)}},adjustViewport:function(){var t=this.renderer.gl;t.viewport(0,0,this.width,this.height),t.disable(t.SCISSOR_TEST)},clear:function(){var t=this.renderer,e=t.gl;t.pushFramebuffer(this.framebuffer),e.disable(e.SCISSOR_TEST),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),t.popFramebuffer(),t.resetScissor()},unbind:function(t){void 0===t&&(t=!1);var e=this.renderer;return t&&e.flush(),e.popFramebuffer()},destroy:function(){var t=this.renderer;t.deleteFramebuffer(this.framebuffer),t.deleteTexture(this.texture),t.off(n.RESIZE,this.resize,this),this.renderer=null,this.framebuffer=null,this.texture=null}});t.exports=r},75512:t=>{t.exports={getTintFromFloats:function(t,e,i,s){return((255&(255*s|0))<<24|(255&(255*t|0))<<16|(255&(255*e|0))<<8|255&(255*i|0))>>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},checkShaderMax:function(t,e){var i=Math.min(16,t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS));return e&&-1!==e?Math.min(i,e):i},parseFragmentShaderMaxTextures:function(t,e){if(!t)return"";for(var i="",s=0;s0&&(i+="\n\telse "),s{var s=i(56694),n=i(28699),r=i(6659),o=i(18970),a=i(72632),h=i(16650),l=i(81044),u=i(37410),c=i(75512),d=i(71305),p=new s({Extends:r,initialize:function(t){r.call(this);var e=t.game,i=e.renderer,s=i.gl;this.name=a(t,"name","WebGLPipeline"),this.game=e,this.renderer=i,this.manager,this.gl=s,this.view=e.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=a(t,"topology",s.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=a(t,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.isSpriteFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=t,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[]},boot:function(){var t,e=this.gl,i=this.config,s=this.renderer;this.isPostFX||(this.projectionMatrix=(new h).identity());var n=this.renderTargets,r=a(i,"renderTarget",!1);"boolean"==typeof r&&r&&(r=1);var c=s.width,d=s.height;if("number"==typeof r)for(t=0;tx&&(x=y[t].vertexSize);var T=a(i,"batchSize",s.config.batchSize);this.vertexCapacity=6*T;var w=new ArrayBuffer(this.vertexCapacity*x);this.vertexData=w,this.bytes=new Uint8Array(w),this.vertexViewF32=new Float32Array(w),this.vertexViewU32=new Uint32Array(w);var b=a(i,"vertices",null);for(b?(this.vertexViewF32.set(b),this.vertexBuffer=s.createVertexBuffer(w,e.STATIC_DRAW)):this.vertexBuffer=s.createVertexBuffer(w.byteLength,e.DYNAMIC_DRAW),this.setVertexBuffer(),t=y.length-1;t>=0;t--)y[t].rebind();this.hasBooted=!0,s.on(l.RESIZE,this.resize,this),s.on(l.PRE_RENDER,this.onPreRender,this),s.on(l.RENDER,this.onRender,this),s.on(l.POST_RENDER,this.onPostRender,this),this.emit(o.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(t,e,i){var s=this.renderer;t===this.currentShader&&s.currentProgram===this.currentShader.program||(this.flush(),this.setVertexBuffer(i)&&!e&&(e=!0),t.bind(e,!1),this.currentShader=t);return this},getShaderByName:function(t){for(var e=this.shaders,i=0;ithis.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(t,e){t===this.width&&e===this.height||this.flush(),this.width=t,this.height=e;for(var i=this.renderTargets,s=0;s=0;i--){var s=e[i].rebind();t&&s!==t||(this.currentShader=s)}return this.activeTextures.length=0,this.emit(o.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},setVertexBuffer:function(t){if(void 0===t&&(t=this.vertexBuffer),t!==this.activeBuffer){var e=this.gl;return this.gl.bindBuffer(e.ARRAY_BUFFER,t),this.activeBuffer=t,!0}return!1},preBatch:function(t){return this.currentRenderTarget&&this.currentRenderTarget.bind(),this.onPreBatch(t),this},postBatch:function(t){return this.onDraw(this.currentRenderTarget),this.onPostBatch(t),this},onDraw:function(){},unbind:function(){this.currentRenderTarget&&this.currentRenderTarget.unbind()},flush:function(t){if(void 0===t&&(t=!1),this.vertexCount>0){this.emit(o.BEFORE_FLUSH,this,t),this.onBeforeFlush(t);var e=this.gl,i=this.vertexCount,s=this.currentShader.vertexSize,n=this.topology;if(this.active){var r,a,h;this.setVertexBuffer(),i===this.vertexCapacity?e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.DYNAMIC_DRAW):e.bufferSubData(e.ARRAY_BUFFER,0,this.bytes.subarray(0,i*s));var l=this.batch,u=this.activeTextures;if(this.forceZero)for(u[0]||e.activeTexture(e.TEXTURE0),r=0;r{var s=i(66458),n=i(89787),r=i(56694),o=i(86459),a=i(6659),h=i(81044),l=i(28621),u=i(16650),c=i(72283),d=i(35217),p=i(37410),f=i(40444),v=i(38203),g=i(75512),m=i(1217),y=!1,x=new r({Extends:a,initialize:function(t){a.call(this);var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!1,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference,preserveDrawingBuffer:e.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,roundPixels:e.roundPixels,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=o.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=t.canvas,this.blendModes=[],this.contextLost=!1,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.maxTextures=0,this.textureIndexes,this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=c,this.contextRestoredHandler=c,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats,this.compression,this.drawingBufferHeight=0,this.blankTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.maskSource=null,this.maskTarget=null,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(t){var e,i=this.game,s=this.canvas,n=t.backgroundColor;if(!(e=i.config.context?i.config.context:s.getContext("webgl",t.contextCreation)||s.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=e;var r=this;this.contextLostHandler=function(t){r.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),t.preventDefault()},s.addEventListener("webglcontextlost",this.contextLostHandler,!1),i.context=e;for(var a=0;a<=27;a++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[e.ZERO,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_REVERSE_SUBTRACT},this.glFormats=[e.BYTE,e.SHORT,e.UNSIGNED_BYTE,e.UNSIGNED_SHORT,e.FLOAT],this.glFuncMap={mat2:{func:e.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:e.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:e.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:e.uniform1f,length:1},"1fv":{func:e.uniform1fv,length:1},"1i":{func:e.uniform1i,length:1},"1iv":{func:e.uniform1iv,length:1},"2f":{func:e.uniform2f,length:2},"2fv":{func:e.uniform2fv,length:1},"2i":{func:e.uniform2i,length:2},"2iv":{func:e.uniform2iv,length:1},"3f":{func:e.uniform3f,length:3},"3fv":{func:e.uniform3fv,length:1},"3i":{func:e.uniform3i,length:3},"3iv":{func:e.uniform3iv,length:1},"4f":{func:e.uniform4f,length:4},"4fv":{func:e.uniform4fv,length:1},"4i":{func:e.uniform4i,length:4},"4iv":{func:e.uniform4iv,length:1}};var h=e.getSupportedExtensions();t.maxTextures&&-1!==t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),this.supportedExtensions=h;var l="ANGLE_instanced_arrays";this.instancedArraysExtension=h.indexOf(l)>-1?e.getExtension(l):null;var c="OES_vertex_array_object";this.vaoExtension=h.indexOf(c)>-1?e.getExtension(c):null,e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(n.redGL,n.greenGL,n.blueGL,n.alphaGL),this.mipmapFilter=e[t.mipmapFilter],this.maxTextures=g.checkShaderMax(e,t.maxTextures),this.textureIndexes=[];for(var p=0;p0&&s>0;if(o&&a){var h=o[0],l=o[1],u=o[2],c=o[3];a=h!==t||l!==e||u!==i||c!==s}a&&(this.flush(),r.scissor(t,n-e-s,i,s))},resetScissor:function(){var t=this.gl;t.enable(t.SCISSOR_TEST);var e=this.currentScissor;if(e){var i=e[0],s=e[1],n=e[2],r=e[3];n>0&&r>0&&t.scissor(i,this.drawingBufferHeight-s-r,n,r)}},popScissor:function(){var t=this.scissorStack;t.pop();var e=t[t.length-1];e&&this.setScissor(e[0],e[1],e[2],e[3]),this.currentScissor=e},hasActiveStencilMask:function(){var t=this.currentMask.mask,e=this.currentCameraMask.mask;return t&&t.isStencil||e&&e.isStencil},resetViewport:function(){var t=this.gl;t.viewport(0,0,this.width,this.height),this.drawingBufferHeight=t.drawingBufferHeight},setBlendMode:function(t,e){void 0===e&&(e=!1);var i=this.gl,s=this.blendModes[t];return!!(e||t!==o.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(s.equation),s.func.length>2?i.blendFuncSeparate(s.func[0],s.func[1],s.func[2],s.func[3]):i.blendFunc(s.func[0],s.func[1]),this.currentBlendMode=t,!0)},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>17&&this.blendModes[t]&&this.blendModes.splice(t,1),this},pushFramebuffer:function(t,e,i){return t===this.currentFramebuffer?this:(this.fboStack.push(t),this.setFramebuffer(t,e,i))},setFramebuffer:function(t,e,i){if(void 0===e&&(e=!1),void 0===i&&(i=!0),t===this.currentFramebuffer)return this;var s=this.gl,n=this.width,r=this.height;return t&&t.renderTexture&&i?(n=t.renderTexture.width,r=t.renderTexture.height):this.flush(),s.bindFramebuffer(s.FRAMEBUFFER,t),i&&s.viewport(0,0,n,r),e&&(t?(this.drawingBufferHeight=r,this.pushScissor(0,0,n,r)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=t,this},popFramebuffer:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!0);var i=this.fboStack;i.pop();var s=i[i.length-1];return s||(s=null),this.setFramebuffer(s,t,e),s},setProgram:function(t){return t!==this.currentProgram&&(this.flush(),this.gl.useProgram(t),this.currentProgram=t,!0)},resetProgram:function(){return this.gl.useProgram(this.currentProgram),this},createTextureFromSource:function(t,e,i,s,n){void 0===n&&(n=!1);var r=this.gl,a=r.NEAREST,h=r.NEAREST,u=r.CLAMP_TO_EDGE;e=t?t.width:e,i=t?t.height:i;var c=l(e,i);return c&&!n&&(u=r.REPEAT),s===o.ScaleModes.LINEAR&&this.config.antialias&&(a=c?this.mipmapFilter:r.LINEAR,h=r.LINEAR),t&&t.compressed&&(a=r.LINEAR,h=r.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,h,u,u,r.RGBA,t):this.createTexture2D(0,a,h,u,u,r.RGBA,null,e,i)},createTexture2D:function(t,e,i,s,n,r,o,a,h,u,c,d){u=null==u||u,void 0===c&&(c=!1),void 0===d&&(d=!1);var p=this.gl,f=p.createTexture();p.activeTexture(p.TEXTURE0);var v=p.getParameter(p.TEXTURE_BINDING_2D);p.bindTexture(p.TEXTURE_2D,f),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,e),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,i),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,n),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,s),p.pixelStorei(p.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),d&&p.pixelStorei(p.UNPACK_FLIP_Y_WEBGL,!0);var g=!1;if(null==o)p.texImage2D(p.TEXTURE_2D,t,r,a,h,0,r,p.UNSIGNED_BYTE,null),g=l(a,h);else if(o.compressed){a=o.width,h=o.height,g=o.generateMipmap;for(var m=0;m0)&&this.pipelines.setMulti().drawFillRect(e,i,s,r,g.getTintFromFloats(o.blueGL,o.greenGL,o.redGL,1),o.alphaGL)},getCurrentStencilMask:function(){var t=null,e=this.maskStack,i=this.currentCameraMask;return e.length>0?t=e[e.length-1]:i.mask&&i.mask.isStencil&&(t=i),t},postRenderCamera:function(t){var e=t.flashEffect,i=t.fadeEffect;if(e.isRunning||i.isRunning||i.isComplete){var s=this.pipelines.setMulti();e.postRenderWebGL(s,g.getTintFromFloats),i.postRenderWebGL(s,g.getTintFromFloats)}t.dirty=!1,this.popScissor(),t.mask&&(this.currentCameraMask.mask=null,t.mask.postRenderWebGL(this,t._maskCamera)),this.pipelines.postBatchCamera(t),t.emit(n.POST_RENDER,t)},preRender:function(){if(!this.contextLost){var t=this.gl;if(t.bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender){var e=this.config.backgroundColor;t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)}t.enable(t.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(h.PRE_RENDER)}},render:function(t,e,i){if(!this.contextLost){var s=e.length;if(this.emit(h.RENDER,t,i),this.preRenderCamera(i),0===s)return this.setBlendMode(o.BlendModes.NORMAL),void this.postRenderCamera(i);this.currentType="";for(var n=this.currentMask,r=0;r0&&r>0){s.activeTexture(s.TEXTURE0);var o=s.getParameter(s.TEXTURE_BINDING_2D);s.bindTexture(s.TEXTURE_2D,e),i&&s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!0),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,t),e.width=n,e.height=r,o&&s.bindTexture(s.TEXTURE_2D,o)}return e},createVideoTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var s=this.gl,n=s.NEAREST,r=s.NEAREST,o=t.videoWidth,a=t.videoHeight,h=s.CLAMP_TO_EDGE,u=l(o,a);return!e&&u&&(h=s.REPEAT),this.config.antialias&&(n=u?this.mipmapFilter:s.LINEAR,r=s.LINEAR),this.createTexture2D(0,n,r,h,h,s.RGBA,t,o,a,!0,!0,i)},updateVideoTexture:function(t,e,i){void 0===i&&(i=!1);var s=this.gl,n=t.videoWidth,r=t.videoHeight;if(n>0&&r>0){s.activeTexture(s.TEXTURE0);var o=s.getParameter(s.TEXTURE_BINDING_2D);s.bindTexture(s.TEXTURE_2D,e),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,i),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,t),e.width=n,e.height=r,o&&s.bindTexture(s.TEXTURE_2D,o)}return e},setTextureFilter:function(t,e){var i=this.gl,s=[i.LINEAR,i.NEAREST][e];i.activeTexture(i.TEXTURE0);var n=i.getParameter(i.TEXTURE_BINDING_2D);return i.bindTexture(i.TEXTURE_2D,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,s),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,s),n&&i.bindTexture(i.TEXTURE_2D,n),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.maskTarget.destroy(),this.maskSource.destroy(),this.pipelines.destroy(),this.removeAllListeners(),this.fboStack=[],this.maskStack=[],this.extensions={},this.textureIndexes=[],this.gl=null,this.game=null,this.canvas=null,this.contextLost=!0,this.currentMask=null,this.currentCameraMask=null}});t.exports=x},71305:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(71402),o=new s({initialize:function(t,e,i,s,n){this.pipeline=t,this.name=e,this.renderer=t.renderer,this.gl=this.renderer.gl,this.fragSrc=s,this.vertSrc=i,this.program=this.renderer.createProgram(i,s),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(n),this.createUniforms()},createAttributes:function(t){var e=0,i=0,s=[];this.vertexComponentCount=0;for(var o=0;o=0?(e.enableVertexAttribArray(p),e.vertexAttribPointer(p,a,h,d,i,l),o.enabled=!0,o.location=p):-1!==p&&e.disableVertexAttribArray(p)}else u?e.vertexAttribPointer(c,a,h,d,i,l):!u&&c>-1&&(e.disableVertexAttribArray(c),o.location=-1)}return this},createUniforms:function(){var t,e,i,s=this.gl,n=this.program,r=this.uniforms,o=s.getProgramParameter(n,s.ACTIVE_UNIFORMS);for(t=0;t0&&(e=e.substr(0,h),r.hasOwnProperty(e)||null!==(i=s.getUniformLocation(n,e))&&(r[e]={name:e,location:i,value1:null,value2:null,value3:null,value4:null}))}}return this},hasUniform:function(t){return this.uniforms.hasOwnProperty(t)},resetUniform:function(t){var e=this.uniforms[t];return e&&(e.value1=null,e.value2=null,e.value3=null,e.value4=null),this},setUniform1:function(t,e,i,s){var n=this.uniforms[e];return n?((s||n.value1!==i)&&(n.value1=i,this.renderer.setProgram(this.program),t.call(this.gl,n.location,i),this.pipeline.currentShader=this),this):this},setUniform2:function(t,e,i,s,n){var r=this.uniforms[e];return r?((n||r.value1!==i||r.value2!==s)&&(r.value1=i,r.value2=s,this.renderer.setProgram(this.program),t.call(this.gl,r.location,i,s),this.pipeline.currentShader=this),this):this},setUniform3:function(t,e,i,s,n,r){var o=this.uniforms[e];return o?((r||o.value1!==i||o.value2!==s||o.value3!==n)&&(o.value1=i,o.value2=s,o.value3=n,this.renderer.setProgram(this.program),t.call(this.gl,o.location,i,s,n),this.pipeline.currentShader=this),this):this},setUniform4:function(t,e,i,s,n,r,o){var a=this.uniforms[e];return a?((o||a.value1!==i||a.value2!==s||a.value3!==n||a.value4!==r)&&(a.value1=i,a.value2=s,a.value3=n,a.value4=r,this.renderer.setProgram(this.program),t.call(this.gl,a.location,i,s,n,r),this.pipeline.currentShader=this),this):this},setBoolean:function(t,e){return this.setUniform1(this.gl.uniform1i,t,Number(e))},set1f:function(t,e){return this.setUniform1(this.gl.uniform1f,t,e)},set2f:function(t,e,i){return this.setUniform2(this.gl.uniform2f,t,e,i)},set3f:function(t,e,i,s){return this.setUniform3(this.gl.uniform3f,t,e,i,s)},set4f:function(t,e,i,s,n){return this.setUniform4(this.gl.uniform4f,t,e,i,s,n)},set1fv:function(t,e){return this.setUniform1(this.gl.uniform1fv,t,e,!0)},set2fv:function(t,e){return this.setUniform1(this.gl.uniform2fv,t,e,!0)},set3fv:function(t,e){return this.setUniform1(this.gl.uniform3fv,t,e,!0)},set4fv:function(t,e){return this.setUniform1(this.gl.uniform4fv,t,e,!0)},set1iv:function(t,e){return this.setUniform1(this.gl.uniform1iv,t,e,!0)},set2iv:function(t,e){return this.setUniform1(this.gl.uniform2iv,t,e,!0)},set3iv:function(t,e){return this.setUniform1(this.gl.uniform3iv,t,e,!0)},set4iv:function(t,e){return this.setUniform1(this.gl.uniform4iv,t,e,!0)},set1i:function(t,e){return this.setUniform1(this.gl.uniform1i,t,e)},set2i:function(t,e,i){return this.setUniform2(this.gl.uniform2i,t,e,i)},set3i:function(t,e,i,s){return this.setUniform3(this.gl.uniform3i,t,e,i,s)},set4i:function(t,e,i,s,n){return this.setUniform4(this.gl.uniform4i,t,e,i,s,n)},setMatrix2fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix2fv,t,e,i,!0)},setMatrix3fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix3fv,t,e,i,!0)},setMatrix4fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix4fv,t,e,i,!0)},createProgram:function(t,e){void 0===t&&(t=this.vertSrc),void 0===e&&(e=this.fragSrc);var i=this.gl;return this.program&&i.deleteProgram(this.program),this.vertSrc=t,this.fragSrc=e,this.program=this.renderer.createProgram(t,e),this.createUniforms(),this.rebind()},destroy:function(){this.gl.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null,this.attributes=null,this.uniforms=null}});t.exports=o},71402:t=>{t.exports={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}}},55478:(t,e,i)=>{var s=i(71402),n=i(98611),r={PipelineManager:i(35217),Pipelines:i(62253),RenderTarget:i(37410),Utils:i(75512),WebGLPipeline:i(44775),WebGLRenderer:i(11857),WebGLShader:i(71305)};r=n(!1,r,s),t.exports=r},5583:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(91679),o=i(89053),a=i(71402),h=i(44775),l=new s({Extends:h,initialize:function(t){t.fragShader=n(t,"fragShader",r),t.vertShader=n(t,"vertShader",o),t.batchSize=n(t,"batchSize",1),t.vertices=n(t,"vertices",[-1,1,-1,-7,7,1]),t.attributes=n(t,"attributes",[{name:"inPosition",size:2,type:a.FLOAT}]),h.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(t,e){h.prototype.resize.call(this,t,e),this.set2f("uResolution",t,e)},beginMask:function(t,e,i){this.renderer.beginBitmapMask(t,i)},endMask:function(t,e,i){var s=this.gl,n=this.renderer,r=t.bitmapMask;r&&s&&(n.drawBitmapMask(r,e,this),i&&this.set2f("uResolution",i.width,i.height),this.set1i("uInvertMaskAlpha",t.invertAlpha),s.drawArrays(this.topology,0,3),i&&this.set2f("uResolution",this.width,this.height),s.bindTexture(s.TEXTURE_2D,null))}});t.exports=l},66901:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(65045),o=i(77310),a=i(69360),h=i(93736),l=i(44775),u=new s({Extends:o,initialize:function(t){var e=n(t,"fragShader",r);t.fragShader=e.replace("%LIGHT_COUNT%",t.game.renderer.config.maxLights),o.call(this,t),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.defaultNormalMap,this.currentNormalMap,this.lightsActive=!0,this.tempVec2=new h,this._tempMatrix=new a,this._tempMatrix2=new a},boot:function(){l.prototype.boot.call(this);var t=this.gl,e=t.createTexture();t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([127,127,255,255])),this.defaultNormalMap={glTexture:e}},onRender:function(t,e){var i=t.sys.lights;if(this.lightsActive=!1,i&&i.active){var s,n=i.getLights(e),r=n.length;this.lightsActive=!0;var o=this.renderer.height,a=e.matrix,h=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",e.x,e.y,e.rotation,e.zoom),this.set3f("uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),this.set1i("uLightCount",r),s=0;s0&&this.flush();var e=this.inverseRotationMatrix;if(t){var i=-t,s=Math.cos(i),n=Math.sin(i);e[1]=n,e[3]=-n,e[0]=e[4]=s}else e[0]=e[4]=1,e[1]=e[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,e),this.currentNormalMapRotation=t}},setTexture2D:function(t,e){var i=this.renderer;void 0===t&&(t=i.whiteTexture);var s=this.getNormalMap(e);this.isNewNormalMap(t,s)&&(this.flush(),this.createBatch(t),this.addTextureToBatch(s),this.currentNormalMap=s);var n=0;e&&e.parentContainer?n=e.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2).rotationNormalized:e&&(n=e.rotation);return this.setNormalMapRotation(n),0},setGameObject:function(t,e){void 0===e&&(e=t.frame);var i=e.glTexture,s=this.getNormalMap(t);if(this.isNewNormalMap(i,s)&&(this.flush(),this.createBatch(i),this.addTextureToBatch(s),this.currentNormalMap=s),t.parentContainer){var n=t.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(n.rotationNormalized)}else this.setNormalMapRotation(t.rotation);return 0},isNewNormalMap:function(t,e){return this.currentTexture!==t||this.currentNormalMap!==e},getNormalMap:function(t){var e;return t?t.displayTexture?e=t.displayTexture.dataSource[t.displayFrame.sourceIndex]:t.texture?e=t.texture.dataSource[t.frame.sourceIndex]:t.tileset&&(e=Array.isArray(t.tileset)?t.tileset[0].image.dataSource[0]:t.tileset.image.dataSource[0]):e=this.defaultNormalMap,e||(e=this.defaultNormalMap),e.glTexture},batchSprite:function(t,e,i){this.lightsActive&&o.prototype.batchSprite.call(this,t,e,i)},batchTexture:function(t,e,i,s,n,r,a,h,l,u,c,d,p,f,v,g,m,y,x,T,w,b,E,S,A,_,C,M,R,P,O,L){this.lightsActive&&o.prototype.batchTexture.call(this,t,e,i,s,n,r,a,h,l,u,c,d,p,f,v,g,m,y,x,T,w,b,E,S,A,_,C,M,R,P,O,L)},batchTextureFrame:function(t,e,i,s,n,r,a){this.lightsActive&&o.prototype.batchTextureFrame.call(this,t,e,i,s,n,r,a)}});t.exports=u},71264:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(77310),o=i(85060),a=i(18166),h=i(71402),l=i(44775),u=new s({Extends:r,initialize:function(t){t.fragShader=n(t,"fragShader",o),t.vertShader=n(t,"vertShader",a),t.attributes=n(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:h.UNSIGNED_BYTE,normalized:!0}]),t.forceZero=!0,r.call(this,t)},boot:function(){l.prototype.boot.call(this),this.set1i("uMainSampler",0)}});t.exports=u},77310:(t,e,i)=>{var s=i(56694),n=i(11117),r=i(72632),o=i(53787),a=i(15968),h=i(69360),l=i(75512),u=i(71402),c=i(44775),d=new s({Extends:c,initialize:function(t){var e=t.game.renderer,i=r(t,"fragShader",o);t.fragShader=l.parseFragmentShaderMaxTextures(i,e.maxTextures),t.vertShader=r(t,"vertShader",a),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:u.UNSIGNED_BYTE,normalized:!0}]),c.call(this,t),this._tempMatrix1=new h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.calcMatrix=new h,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){c.prototype.boot.call(this),this.currentShader.set1iv("uMainSampler",this.renderer.textureIndexes)},batchSprite:function(t,e,i){this.manager.set(this,t);var s=this._tempMatrix1,n=this._tempMatrix2,r=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,u=o.v0,c=o.u1,d=o.v1,p=o.x,f=o.y,v=o.cutWidth,g=o.cutHeight,m=o.customPivot,y=t.displayOriginX,x=t.displayOriginY,T=-y+p,w=-x+f;if(t.isCropped){var b=t._crop;b.flipX===t.flipX&&b.flipY===t.flipY||o.updateCropUVs(b,t.flipX,t.flipY),h=b.u0,u=b.v0,c=b.u1,d=b.v1,v=b.width,g=b.height,T=-y+(p=b.x),w=-x+(f=b.y)}var E=1,S=1;t.flipX&&(m||(T+=-o.realWidth+2*y),E=-1),(t.flipY||o.source.isGLTexture&&!a.flipY)&&(m||(w+=-o.realHeight+2*x),S=-1);var A=t.x,_=t.y;e.roundPixels&&(A=Math.floor(A),_=Math.floor(_)),n.applyITRS(A,_,t.rotation,t.scaleX*E,t.scaleY*S),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),n.e=A,n.f=_):(n.e-=e.scrollX*t.scrollFactorX,n.f-=e.scrollY*t.scrollFactorY),s.multiply(n,r);var C=r.setQuad(T,w,T+v,w+g,!1),M=l.getTintAppendFloatAlpha,R=e.alpha,P=M(t.tintTopLeft,R*t._alphaTL),O=M(t.tintTopRight,R*t._alphaTR),L=M(t.tintBottomLeft,R*t._alphaBL),F=M(t.tintBottomRight,R*t._alphaBR);this.shouldFlush(6)&&this.flush();var D=this.setGameObject(t,o);this.manager.preBatch(t),this.batchQuad(t,C[0],C[1],C[2],C[3],C[4],C[5],C[6],C[7],h,u,c,d,P,O,L,F,t.tintFill,a,D),this.manager.postBatch(t)},batchTexture:function(t,e,i,s,n,r,o,a,h,l,u,c,d,p,f,v,g,m,y,x,T,w,b,E,S,A,_,C,M,R,P,O){this.manager.set(this,t);var L=this._tempMatrix1,F=this._tempMatrix2,D=this._tempMatrix3,k=m/i+_,I=y/s+C,B=(m+x)/i+_,N=(y+T)/s+C,Y=o,U=a,X=-v,z=-g;if(t.isCropped){var G=t._crop,V=G.width,W=G.height;Y=V,U=W,o=V,a=W;var H=m=G.x,j=y=G.y;c&&(H=x-G.x-V),d&&(j=T-G.y-W),k=H/i+_,I=j/s+C,B=(H+V)/i+_,N=(j+W)/s+C,X=-v+m,z=-g+y}c&&(Y*=-1,X+=o),(d^=!P&&e.isRenderTexture?1:0)&&(U*=-1,z+=a),M.roundPixels&&(n=Math.floor(n),r=Math.floor(r)),F.applyITRS(n,r,u,h,l),L.copyFrom(M.matrix),R?(L.multiplyWithOffset(R,-M.scrollX*p,-M.scrollY*f),F.e=n,F.f=r):(F.e-=M.scrollX*p,F.f-=M.scrollY*f),L.multiply(F,D);var K=D.setQuad(X,z,X+Y,z+U,!1);void 0===O&&(O=this.setTexture2D(e)),t&&this.manager.preBatch(t),this.batchQuad(t,K[0],K[1],K[2],K[3],K[4],K[5],K[6],K[7],k,I,B,N,w,b,E,S,A,e,O),t&&this.manager.postBatch(t)},batchTextureFrame:function(t,e,i,s,n,r,o){this.manager.set(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2;o?a.multiply(o,h):h=a;var u=h.setQuad(e,i,e+t.width,i+t.height,!1),c=this.setTexture2D(t.source.glTexture);s=l.getTintAppendFloatAlpha(s,n),this.batchQuad(null,u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],t.u0,t.v0,t.u1,t.v1,s,s,s,s,0,t.glTexture,c)},batchFillRect:function(t,e,i,s,n,r){this.renderer.pipelines.set(this);var o=this.calcMatrix;r&&r.multiply(n,o);var a=o.setQuad(t,e,t+i,e+s,!1),h=this.fillTint;this.batchQuad(null,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],0,0,1,1,h.TL,h.TR,h.BL,h.BR,2)},batchFillTriangle:function(t,e,i,s,n,r,o,a){this.renderer.pipelines.set(this);var h=this.calcMatrix;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,s),d=h.getY(i,s),p=h.getX(n,r),f=h.getY(n,r),v=this.fillTint;this.batchTri(null,l,u,c,d,p,f,0,0,1,1,v.TL,v.TR,v.BL,2)},batchStrokeTriangle:function(t,e,i,s,n,r,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=s,l[1].width=o,l[2].x=n,l[2].y=r,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.pipelines.set(this);var s=this.calcMatrix;i&&i.multiply(e,s);for(var r,o,a=t.length,h=this.polygonCache,l=this.fillTint.TL,u=this.fillTint.TR,c=this.fillTint.BL,d=0;d0&&U[4]?this.batchQuad(null,F,D,R,P,U[0],U[1],U[2],U[3],0,0,1,1,I,B,N,Y,2):(X[0]=F,X[1]=D,X[2]=R,X[3]=P,X[4]=1),h&&X[4]?this.batchQuad(null,C,M,O,L,X[0],X[1],X[2],X[3],0,0,1,1,I,B,N,Y,2):(U[0]=C,U[1]=M,U[2]=O,U[3]=L,U[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,c.prototype.destroy.call(this),this}});t.exports=d},10919:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(83327),o=i(54677),a=i(44775),h=new s({Extends:a,initialize:function(t){t.vertShader=n(t,"vertShader",o),t.fragShader=n(t,"fragShader",r),t.attributes=n(t,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),a.call(this,t)},onRender:function(t,e){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",e.zoom)},batchPointLight:function(t,e,i,s,n,r,o,a,h,l,u,c){var d=t.color,p=t.intensity,f=t.radius,v=t.attenuation,g=d.r*p,m=d.g*p,y=d.b*p,x=e.alpha*t.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(i,s,u,c,f,v,g,m,y,x),this.batchLightVert(n,r,u,c,f,v,g,m,y,x),this.batchLightVert(o,a,u,c,f,v,g,m,y,x),this.batchLightVert(i,s,u,c,f,v,g,m,y,x),this.batchLightVert(o,a,u,c,f,v,g,m,y,x),this.batchLightVert(h,l,u,c,f,v,g,m,y,x),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(t,e,i,s,n,r,o,a,h,l){var u=this.vertexViewF32,c=this.vertexCount*this.currentShader.vertexComponentCount-1;u[++c]=t,u[++c]=e,u[++c]=i,u[++c]=s,u[++c]=n,u[++c]=r,u[++c]=o,u[++c]=a,u[++c]=h,u[++c]=l,this.vertexCount++}});t.exports=h},80486:(t,e,i)=>{var s=i(56694),n=i(65246),r=i(72632),o=i(12569),a=i(99365),h=i(44775),l=new s({Extends:h,initialize:function(t){t.renderTarget=r(t,"renderTarget",1),t.fragShader=r(t,"fragShader",o),t.vertShader=r(t,"vertShader",a),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.batchSize=1,t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],h.call(this,t),this.isPostFX=!0,this.gameObject,this.colorMatrix=new n,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){h.prototype.boot.call(this);var t=this.manager.UTILITY_PIPELINE;this.fullFrame1=t.fullFrame1,this.fullFrame2=t.fullFrame2,this.halfFrame1=t.halfFrame1,this.halfFrame2=t.halfFrame2,this.set1i("uMainSampler",0)},onDraw:function(t){this.bindAndDraw(t)},copyFrame:function(t,e,i,s,n){this.manager.copyFrame(t,e,i,s,n)},copyToGame:function(t){this.manager.copyToGame(t)},drawFrame:function(t,e,i){this.manager.drawFrame(t,e,i,this.colorMatrix)},blendFrames:function(t,e,i,s,n){this.manager.blendFrames(t,e,i,s,n)},blendFramesAdditive:function(t,e,i,s,n){this.manager.blendFramesAdditive(t,e,i,s,n)},clearFrame:function(t,e){this.manager.clearFrame(t,e)},blitFrame:function(t,e,i,s,n,r){this.manager.blitFrame(t,e,i,s,n,r)},copyFrameRect:function(t,e,i,s,n,r,o,a){this.manager.copyFrameRect(t,e,i,s,n,r,o,a)},bindAndDraw:function(t,e,i,s,n){void 0===i&&(i=!0),void 0===s&&(s=!0);var r=this.gl,o=this.renderer;this.bind(n),this.set1i("uMainSampler",0),e?(r.viewport(0,0,e.width,e.height),r.bindFramebuffer(r.FRAMEBUFFER,e.framebuffer),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.texture,0),i&&(s?r.clearColor(0,0,0,0):r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT))):(o.popFramebuffer(!1,!1,!1),o.currentFramebuffer||r.viewport(0,0,o.width,o.height)),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,t.texture),r.bufferData(r.ARRAY_BUFFER,this.vertexData,r.STATIC_DRAW),r.drawArrays(r.TRIANGLES,0,6),e&&(r.bindTexture(r.TEXTURE_2D,null),r.bindFramebuffer(r.FRAMEBUFFER,null))}});t.exports=l},21213:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(77310),o=new s({Extends:r,initialize:function(t){t.topology=5,t.batchSize=n(t,"batchSize",256),r.call(this,t)}});t.exports=o},51212:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(77310),o=i(85060),a=i(18166),h=i(44775),l=new s({Extends:r,initialize:function(t){t.fragShader=n(t,"fragShader",o),t.vertShader=n(t,"vertShader",a),t.forceZero=!0,r.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0)}});t.exports=l},38964:(t,e,i)=>{var s=i(95723),n=i(79993),r=i(56694),o=i(72632),a=i(77310),h=i(12569),l=i(74118),u=i(37410),c=i(85060),d=i(18166),p=i(44775),f=new r({Extends:a,initialize:function(t){var e=o(t,"fragShader",h),i=o(t,"vertShader",d),s=o(t,"drawShader",h),n=[{name:"DrawSprite",fragShader:c,vertShader:d},{name:"CopySprite",fragShader:e,vertShader:i},{name:"DrawGame",fragShader:s,vertShader:d}],r=o(t,"shaders",[]);t.shaders=n.concat(r),t.vertShader||(t.vertShader=i),t.batchSize=1,a.call(this,t),this.isSpriteFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new l,this.targetBounds=new l,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){p.prototype.boot.call(this);var t=this.shaders,e=this.renderer;this.drawSpriteShader=t[0],this.copyShader=t[1],this.gameShader=t[2],this.fsTarget=new u(e,e.width,e.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var i=new ArrayBuffer(168);this.quadVertexData=i,this.quadVertexViewF32=new Float32Array(i),this.quadVertexBuffer=e.createVertexBuffer(i,this.gl.STATIC_DRAW),this.onResize(e.width,e.height),this.currentShader=this.copyShader},onResize:function(t,e){var i=this.quadVertexViewF32;i[1]=e,i[22]=e,i[14]=t,i[28]=t,i[35]=t,i[36]=e},batchQuad:function(t,e,i,s,r,o,a,h,l,u,c,d,p,f,v,g,m,y,x){var T=Math.min(e,s,o,h),w=Math.min(i,r,a,l),b=Math.max(e,s,o,h)-T,E=Math.max(i,r,a,l)-w,S=this.spriteBounds.setTo(T,w,b,E),A=t?t.fxPadding:0,_=b+2*A,C=E+2*A,M=Math.abs(Math.max(_,C)),R=this.manager.getRenderTarget(M),P=this.targetBounds.setTo(0,0,R.width,R.height);n(P,S.centerX,S.centerY),this.tempSprite=t;var O=this.gl,L=this.renderer;this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.flipProjectionMatrix(!0),t&&(this.onDrawSprite(t,R),t.onFX(this));var F=this.fsTarget;return this.flush(),O.viewport(0,0,L.width,L.height),O.bindFramebuffer(O.FRAMEBUFFER,F.framebuffer),O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,F.texture,0),O.clearColor(0,0,0,0),O.clear(O.COLOR_BUFFER_BIT),this.setTexture2D(x),this.batchVert(e,i,u,c,0,y,f),this.batchVert(s,r,u,p,0,y,g),this.batchVert(o,a,d,p,0,y,m),this.batchVert(e,i,u,c,0,y,f),this.batchVert(o,a,d,p,0,y,m),this.batchVert(h,l,d,c,0,y,v),this.flush(),this.flipProjectionMatrix(!1),O.activeTexture(O.TEXTURE0),O.bindTexture(O.TEXTURE_2D,R.texture),O.copyTexSubImage2D(O.TEXTURE_2D,0,0,0,P.x,P.y,P.width,P.height),O.bindFramebuffer(O.FRAMEBUFFER,null),O.bindTexture(O.TEXTURE_2D,null),this.onBatch(t),this.currentShader=this.copyShader,this.onDraw(R,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(t,e,i,n,r,o){void 0===i&&(i=!0),void 0===n&&(n=!0),void 0===r&&(r=!1),void 0===o&&(o=this.copyShader);var a=this.gl,h=this.tempSprite;this.currentShader=o;var l=this.setVertexBuffer(this.quadVertexBuffer);if(o.bind(l,!1),this.set1i("uMainSampler",0),h.onFXCopy(this),this.onCopySprite(t,e,h),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,t.texture),t.height>e.height)a.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e);else{var u=e.height-t.height;a.viewport(0,u,t.width,t.height),this.resetUVs()}if(a.bindFramebuffer(a.FRAMEBUFFER,e.framebuffer),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,e.texture,0),i&&(a.clearColor(0,0,0,Number(!n)),a.clear(a.COLOR_BUFFER_BIT)),r){var c=this.renderer.currentBlendMode;this.renderer.setBlendMode(s.ERASE)}a.bufferData(a.ARRAY_BUFFER,this.quadVertexData,a.STATIC_DRAW),a.drawArrays(a.TRIANGLES,0,6),r&&this.renderer.setBlendMode(c),a.bindFramebuffer(a.FRAMEBUFFER,null)},blendFrames:function(t,e,i,s,n){this.manager.blendFrames(t,e,i,s,n)},blendFramesAdditive:function(t,e,i,s,n){this.manager.blendFramesAdditive(t,e,i,s,n)},drawToGame:function(t){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(t)},copyToGame:function(t){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(t)},bindAndDraw:function(t){var e=this.gl,i=this.renderer;this.set1i("uMainSampler",0),i.popFramebuffer(!1,!1,!1),i.currentFramebuffer||e.viewport(0,0,i.width,i.height),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(t.texture);var s=this._tempMatrix1.loadIdentity(),n=this.targetBounds.x,r=this.targetBounds.y,o=n+t.width,a=r+t.height,h=s.getX(n,r),l=s.getX(n,a),u=s.getX(o,a),c=s.getX(o,r),d=s.getY(n,r),p=s.getY(n,a),f=s.getY(o,a),v=s.getY(o,r);this.batchVert(h,d,0,0,0,0,16777215),this.batchVert(l,p,0,1,0,0,16777215),this.batchVert(u,f,1,1,0,0,16777215),this.batchVert(h,d,0,0,0,0,16777215),this.batchVert(u,f,1,1,0,0,16777215),this.batchVert(c,v,1,0,0,0,16777215),this.flush(),this.tempSprite=null},onDraw:function(t){this.drawToGame(t)},setUVs:function(t,e,i,s,n,r,o,a){var h=this.quadVertexViewF32;h[2]=t,h[3]=e,h[9]=i,h[10]=s,h[16]=n,h[17]=r,h[23]=t,h[24]=e,h[30]=n,h[31]=r,h[37]=o,h[38]=a},setTargetUVs:function(t,e){var i=e.height/t.height;i=i>.5?.5-(i-.5):.5-i+.5,this.setUVs(0,i,0,1+i,1,1+i,1,i)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)},destroy:function(){return this.gl.deleteBuffer(this.quadVertexBuffer),this.drawSpriteShader=null,this.copyShader=null,this.gameShader=null,this.quadVertexData=null,this.quadVertexBuffer=null,this.quadVertexViewF32=null,this.fsTarget=null,this.tempSprite=null,a.prototype.destroy.call(this),this}});t.exports=f},60848:(t,e,i)=>{var s=i(2529),n=i(95723),r=i(56694),o=i(65246),a=i(37486),h=i(79060),l=i(72632),u=i(98921),c=i(99365),d=i(44775),p=new r({Extends:d,initialize:function(t){t.renderTarget=l(t,"renderTarget",[{scale:1},{scale:1},{scale:.5},{scale:.5}]),t.vertShader=l(t,"vertShader",c),t.shaders=l(t,"shaders",[{name:"Copy",fragShader:h},{name:"AddBlend",fragShader:s},{name:"LinearBlend",fragShader:u},{name:"ColorMatrix",fragShader:a}]),t.attributes=l(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],t.batchSize=1,d.call(this,t),this.colorMatrix=new o,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){d.prototype.boot.call(this);var t=this.shaders,e=this.renderTargets;this.copyShader=t[0],this.addShader=t[1],this.linearShader=t[2],this.colorMatrixShader=t[3],this.fullFrame1=e[0],this.fullFrame2=e[1],this.halfFrame1=e[2],this.halfFrame2=e[3]},copyFrame:function(t,e,i,s,n){void 0===i&&(i=1),void 0===s&&(s=!0),void 0===n&&(n=!0);var r=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,t.texture),e?(r.viewport(0,0,e.width,e.height),r.bindFramebuffer(r.FRAMEBUFFER,e.framebuffer),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.texture,0)):r.viewport(0,0,t.width,t.height),s&&(n?r.clearColor(0,0,0,0):r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT)),r.bufferData(r.ARRAY_BUFFER,this.vertexData,r.STATIC_DRAW),r.drawArrays(r.TRIANGLES,0,6),r.bindFramebuffer(r.FRAMEBUFFER,null),r.bindTexture(r.TEXTURE_2D,null)},blitFrame:function(t,e,i,s,r,o,a){void 0===i&&(i=1),void 0===s&&(s=!0),void 0===r&&(r=!0),void 0===o&&(o=!1),void 0===a&&(a=!1);var h=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,t.texture),t.height>e.height)h.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e);else{var l=e.height-t.height;h.viewport(0,l,t.width,t.height)}if(h.bindFramebuffer(h.FRAMEBUFFER,e.framebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,e.texture,0),s&&(r?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),o){var u=this.renderer.currentBlendMode;this.renderer.setBlendMode(n.ERASE)}a&&this.flipY(),h.bufferData(h.ARRAY_BUFFER,this.vertexData,h.STATIC_DRAW),h.drawArrays(h.TRIANGLES,0,6),o&&this.renderer.setBlendMode(u),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(t,e,i,s,n,r,o,a){void 0===o&&(o=!0),void 0===a&&(a=!0);var h=this.gl;h.bindFramebuffer(h.FRAMEBUFFER,t.framebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,t.texture,0),o&&(a?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,e.texture),h.copyTexSubImage2D(h.TEXTURE_2D,0,0,0,i,s,n,r),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null)},copyToGame:function(t){var e=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,t.texture),e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.STATIC_DRAW),e.drawArrays(e.TRIANGLES,0,6)},drawFrame:function(t,e,i,s){void 0===i&&(i=!0),void 0===s&&(s=this.colorMatrix);var n=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",s.getData()),this.set1f("uAlpha",s.alpha),n.activeTexture(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,t.texture),e?(n.viewport(0,0,e.width,e.height),n.bindFramebuffer(n.FRAMEBUFFER,e.framebuffer),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e.texture,0)):n.viewport(0,0,t.width,t.height),i?n.clearColor(0,0,0,0):n.clearColor(0,0,0,1),n.clear(n.COLOR_BUFFER_BIT),n.bufferData(n.ARRAY_BUFFER,this.vertexData,n.STATIC_DRAW),n.drawArrays(n.TRIANGLES,0,6),n.bindFramebuffer(n.FRAMEBUFFER,null),n.bindTexture(n.TEXTURE_2D,null)},blendFrames:function(t,e,i,s,n,r){void 0===s&&(s=1),void 0===n&&(n=!0),void 0===r&&(r=this.linearShader);var o=this.gl;this.setShader(r),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",s),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,t.texture),o.activeTexture(o.TEXTURE1),o.bindTexture(o.TEXTURE_2D,e.texture),i?(o.bindFramebuffer(o.FRAMEBUFFER,i.framebuffer),o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,i.texture,0),o.viewport(0,0,i.width,i.height)):o.viewport(0,0,t.width,t.height),n?o.clearColor(0,0,0,0):o.clearColor(0,0,0,1),o.clear(o.COLOR_BUFFER_BIT),o.bufferData(o.ARRAY_BUFFER,this.vertexData,o.STATIC_DRAW),o.drawArrays(o.TRIANGLES,0,6),o.bindFramebuffer(o.FRAMEBUFFER,null),o.bindTexture(o.TEXTURE_2D,null)},blendFramesAdditive:function(t,e,i,s,n){this.blendFrames(t,e,i,s,n,this.addShader)},clearFrame:function(t,e){void 0===e&&(e=!0);var i=this.gl;i.viewport(0,0,t.width,t.height),i.bindFramebuffer(i.FRAMEBUFFER,t.framebuffer),e?i.clearColor(0,0,0,0):i.clearColor(0,0,0,1),i.clear(i.COLOR_BUFFER_BIT);var s=this.renderer.currentFramebuffer;i.bindFramebuffer(i.FRAMEBUFFER,s)},setUVs:function(t,e,i,s,n,r,o,a){var h=this.vertexViewF32;h[2]=t,h[3]=e,h[6]=i,h[7]=s,h[10]=n,h[11]=r,h[14]=t,h[15]=e,h[18]=n,h[19]=r,h[22]=o,h[23]=a},setTargetUVs:function(t,e){var i=e.height/t.height;i=i>.5?.5-(i-.5):.5-i+.5,this.setUVs(0,i,0,1+i,1,1+i,1,i)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});t.exports=p},65641:t=>{t.exports={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline",MOBILE_PIPELINE:"MobilePipeline"}},68726:t=>{t.exports="pipelineafterflush"},67186:t=>{t.exports="pipelinebeforeflush"},22709:t=>{t.exports="pipelinebind"},74469:t=>{t.exports="pipelineboot"},93953:t=>{t.exports="pipelinedestroy"},51687:t=>{t.exports="pipelinerebind"},25034:t=>{t.exports="pipelineresize"},18970:(t,e,i)=>{t.exports={AFTER_FLUSH:i(68726),BEFORE_FLUSH:i(67186),BIND:i(22709),BOOT:i(74469),DESTROY:i(93953),REBIND:i(51687),RESIZE:i(25034)}},62253:(t,e,i)=>{var s=i(65641),n=i(98611),r={BitmapMaskPipeline:i(5583),Events:i(18970),LightPipeline:i(66901),MobilePipeline:i(71264),MultiPipeline:i(77310),PointLightPipeline:i(10919),PostFXPipeline:i(80486),RopePipeline:i(21213),SinglePipeline:i(51212),SpriteFXPipeline:i(38964),UtilityPipeline:i(60848)};r=n(!1,r,s),t.exports=r},2529:t=>{t.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = frame1 + frame2 * uStrength;","}",""].join("\n")},91679:t=>{t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;",""," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);",""," if (!uInvertMaskAlpha)"," {"," mainColor *= maskColor.a;"," }"," else"," {"," mainColor *= (1.0 - maskColor.a);"," }",""," gl_FragColor = mainColor;","}",""].join("\n")},89053:t=>{t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join("\n")},37486:t=>{t.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);",""," if (uAlpha == 0.0)"," {"," gl_FragColor = c;",""," return;"," }",""," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }",""," vec4 result;",""," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];",""," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);",""," rgb *= result.a;",""," gl_FragColor = vec4(rgb, result.a);","}",""].join("\n")},79060:t=>{t.exports=["#define SHADER_NAME PHASER_COPY_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uBrightness;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}",""].join("\n")},65045:t=>{t.exports=["#define SHADER_NAME PHASER_LIGHT_FS","","precision mediump float;","","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","","const int kMaxLights = %LIGHT_COUNT%;","","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","uniform int uLightCount;","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);",""," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;",""," for (int index = 0; index < kMaxLights; ++index)"," {"," if (index < uLightCount)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }"," }",""," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);",""," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}",""].join("\n")},98921:t=>{t.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}",""].join("\n")},53787:t=>{t.exports=["#define SHADER_NAME PHASER_MULTI_FS","","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","","uniform sampler2D uMainSampler[%count%];","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec4 texture;",""," %forloop%",""," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},15968:t=>{t.exports=["#define SHADER_NAME PHASER_MULTI_VS","","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join("\n")},83327:t=>{t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform float uCameraZoom;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);",""," float distToSurf = length(center - gl_FragCoord.xy);",""," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);",""," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);",""," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;",""," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}",""].join("\n")},54677:t=>{t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);",""," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}",""].join("\n")},12569:t=>{t.exports=["#define SHADER_NAME PHASER_POSTFX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}",""].join("\n")},99365:t=>{t.exports=["#define SHADER_NAME PHASER_QUAD_VS","","precision mediump float;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","","varying vec2 outFragCoord;","varying vec2 outTexCoord;","","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;",""," gl_Position = vec4(inPosition, 0, 1);","}",""].join("\n")},85060:t=>{t.exports=["#define SHADER_NAME PHASER_SINGLE_FS","","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},18166:t=>{t.exports=["#define SHADER_NAME PHASER_SINGLE_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join("\n")},756:(t,e,i)=>{var s=i(55301),n=i(56694),r=i(6659),o=i(40444),a=i(97081),h=i(74181),l=i(2893),u=i(9229),c=i(72283),d=i(74118),p=i(90881),f=i(84314),v=i(93736),g=i(47751),m=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.canvas,this.canvasBounds=new d,this.parent=null,this.parentIsWindow=!1,this.parentSize=new p,this.gameSize=new p,this.baseSize=new p,this.displaySize=new p,this.scaleMode=s.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new v(1,1),this.autoRound=!1,this.autoCenter=s.CENTER.NO_CENTER,this.orientation=s.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.domlisteners={orientationChange:c,windowResize:c,fullScreenChange:c,fullScreenError:c}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(a.BOOT,this.boot,this)},boot:function(){var t=this.game;this.canvas=t.canvas,this.fullscreen=t.device.fullscreen,this.scaleMode!==s.SCALE_MODE.RESIZE&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===s.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),t.events.on(a.PRE_STEP,this.step,this),t.events.once(a.READY,this.refresh,this),t.events.once(a.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e=t.width,i=t.height,n=t.scaleMode,r=t.zoom,o=t.autoRound;if("string"==typeof e){var a=this.parentSize.width;0===a&&(a=window.innerWidth);var h=parseInt(e,10)/100;e=Math.floor(a*h)}if("string"==typeof i){var l=this.parentSize.height;0===l&&(l=window.innerHeight);var c=parseInt(i,10)/100;i=Math.floor(l*c)}this.scaleMode=n,this.autoRound=o,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,o&&(e=Math.floor(e),i=Math.floor(i)),this.gameSize.setSize(e,i),r===s.ZOOM.MAX_ZOOM&&(r=this.getMaxZoom()),this.zoom=r,1!==r&&(this._resetZoom=!0),this.baseSize.setSize(e,i),o&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),t.minWidth>0&&this.displaySize.setMin(t.minWidth*r,t.minHeight*r),t.maxWidth>0&&this.displaySize.setMax(t.maxWidth*r,t.maxHeight*r),this.displaySize.setSize(e,i),this.orientation=u(e,i)},getParent:function(t){var e=t.parent;if(null!==e){if(this.parent=l(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==s.SCALE_MODE.NONE){var i=this.parent.getBoundingClientRect();(this.parentIsWindow||0===i.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",i=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==i.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(t.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var t=this.parentSize,e=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(e.height=h(!0));var i=e.width,s=e.height;if(t.width!==i||t.height!==s)return t.setSize(i,s),!0;if(this.canvas){var n=this.canvasBounds,r=this.canvas.getBoundingClientRect();if(r.x!==n.x||r.y!==n.y)return!0}return!1},lockOrientation:function(t){var e=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!e&&e.call(screen,t)},setParentSize:function(t,e){return this.parentSize.setSize(t,e),this.refresh()},setGameSize:function(t,e){var i=this.autoRound;i&&(t=Math.floor(t),e=Math.floor(e));var s=this.width,n=this.height;return this.gameSize.resize(t,e),this.baseSize.resize(t,e),i&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(t/e),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(s,n)},resize:function(t,e){var i=this.zoom,s=this.autoRound;s&&(t=Math.floor(t),e=Math.floor(e));var n=this.width,r=this.height;this.gameSize.resize(t,e),this.baseSize.resize(t,e),s&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t*i,e*i),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var o=this.canvas.style,a=t*i,h=e*i;return s&&(a=Math.floor(a),h=Math.floor(h)),a===t&&h===e||(o.width=a+"px",o.height=h+"px"),this.refresh(n,r)},setZoom:function(t){return this.zoom=t,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var i=this.game.domContainer;if(i){this.baseSize.setCSS(i);var s=this.canvas.style,n=i.style;n.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",n.marginLeft=s.marginLeft,n.marginTop=s.marginTop}return this.emit(o.RESIZE,this.gameSize,this.baseSize,this.displaySize,t,e),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var t=u(this.width,this.height);t!==this.orientation&&(this.orientation=t,this.emit(o.ORIENTATION_CHANGE,t))}},updateScale:function(){var t,e,i=this.canvas.style,n=this.gameSize.width,r=this.gameSize.height,o=this.zoom,a=this.autoRound;this.scaleMode===s.SCALE_MODE.NONE?(this.displaySize.setSize(n*o,r*o),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),this._resetZoom&&(i.width=t+"px",i.height=e+"px",this._resetZoom=!1)):this.scaleMode===s.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=f(this.parentSize.width,this.gameSize.width,0,!0),e=f(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t=this.autoCenter;if(t!==s.CENTER.NO_CENTER){var e=this.canvas,i=e.style,n=e.getBoundingClientRect(),r=n.width,o=n.height,a=Math.floor((this.parentSize.width-r)/2),h=Math.floor((this.parentSize.height-o)/2);t===s.CENTER.CENTER_HORIZONTALLY?h=0:t===s.CENTER.CENTER_VERTICALLY&&(a=0),i.marginLeft=a+"px",i.marginTop=h+"px"}},updateBounds:function(){var t=this.canvasBounds,e=this.canvas.getBoundingClientRect();t.x=e.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),t.y=e.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),t.width=e.width,t.height=e.height},transformX:function(t){return(t-this.canvasBounds.left)*this.displayScale.x},transformY:function(t){return(t-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(t){void 0===t&&(t={navigationUI:"hide"});var e=this.fullscreen;if(e.available){if(!e.active){var i=this.getFullscreenTarget();e.keyboard?i[e.request](Element.ALLOW_KEYBOARD_INPUT):i[e.request](t)}}else this.emit(o.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(o.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(o.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var t=document.createElement("div");t.style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0}this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas));return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var t=this.fullscreenTarget;if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(this.canvas,t),e.removeChild(t)}}},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(o.FULLSCREEN_UNSUPPORTED),!1;t.active&&document[t.cancel](),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(o.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var t=this,e=this.domlisteners;if(e.orientationChange=function(){t.updateBounds(),t._checkOrientation=!0,t.dirty=!0},e.windowResize=function(){t.updateBounds(),t.dirty=!0},window.addEventListener("orientationchange",e.orientationChange,!1),window.addEventListener("resize",e.windowResize,!1),this.fullscreen.available){e.fullScreenChange=function(e){return t.onFullScreenChange(e)},e.fullScreenError=function(e){return t.onFullScreenError(e)};["webkit","moz",""].forEach((function(t){document.addEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",e.fullScreenError,!1)})),document.addEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.addEventListener("MSFullscreenError",e.fullScreenError,!1)}},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():this.stopFullscreen()},onFullScreenError:function(){this.removeFullscreenTarget()},getViewPort:function(t,e){t instanceof g||(e=t,t=void 0),void 0===e&&(e=new d);var i,s,n=this.baseSize,r=this.parentSize,o=this.canvasBounds,a=this.displayScale,h=o.x>=0?0:-o.x*a.x,l=o.y>=0?0:-o.y*a.y;return i=r.width>=o.width?n.width:n.width-(o.width-r.width)*a.x,s=r.height>=o.height?n.height:n.height-(o.height-r.height)*a.y,e.setTo(h,l,i,s),t&&(e.width/=t.zoomX,e.height/=t.zoomY,e.centerX=t.centerX+t.scrollX,e.centerY=t.centerY+t.scrollY),e},step:function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var t=this.domlisteners;window.removeEventListener("orientationchange",t.orientationChange,!1),window.removeEventListener("resize",t.windowResize,!1);["webkit","moz",""].forEach((function(e){document.removeEventListener(e+"fullscreenchange",t.fullScreenChange,!1),document.removeEventListener(e+"fullscreenerror",t.fullScreenError,!1)})),document.removeEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",t.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===s.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===s.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=m},35098:t=>{t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},53539:t=>{t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},12637:t=>{t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},10217:t=>{t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},55301:(t,e,i)=>{var s={CENTER:i(35098),ORIENTATION:i(53539),SCALE_MODE:i(12637),ZOOM:i(10217)};t.exports=s},82085:t=>{t.exports="enterfullscreen"},11826:t=>{t.exports="fullscreenfailed"},56691:t=>{t.exports="fullscreenunsupported"},34739:t=>{t.exports="leavefullscreen"},26681:t=>{t.exports="orientationchange"},11428:t=>{t.exports="resize"},40444:(t,e,i)=>{t.exports={ENTER_FULLSCREEN:i(82085),FULLSCREEN_FAILED:i(11826),FULLSCREEN_UNSUPPORTED:i(56691),LEAVE_FULLSCREEN:i(34739),ORIENTATION_CHANGE:i(26681),RESIZE:i(11428)}},86754:(t,e,i)=>{var s=i(98611),n=i(55301),r={Center:i(35098),Events:i(40444),Orientation:i(53539),ScaleManager:i(756),ScaleModes:i(12637),Zoom:i(10217)};r=s(!1,r,n.CENTER),r=s(!1,r,n.ORIENTATION),r=s(!1,r,n.SCALE_MODE),r=s(!1,r,n.ZOOM),t.exports=r},47736:(t,e,i)=>{var s=i(72632),n=i(40587);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=s(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(n(e+"Physics")),i)for(var o in i)o=n(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},91088:(t,e,i)=>{var s=i(72632);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=s(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},90415:t=>{t.exports={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},87157:(t,e,i)=>{var s=i(56694),n=i(63946),r=new s({initialize:function(t){this.sys=new n(this,t),this.game,this.anims,this.cache,this.registry,this.sound,this.textures,this.events,this.cameras,this.add,this.make,this.scene,this.children,this.lights,this.data,this.input,this.load,this.time,this.tweens,this.physics,this.matter,this.scale,this.plugins,this.renderer},update:function(){}});t.exports=r},13553:(t,e,i)=>{var s=i(56694),n=i(92980),r=i(7599),o=i(97081),a=i(10850),h=i(683),l=i(72283),u=i(87157),c=i(63946),d=new s({initialize:function(t,e){if(this.game=t,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,e){Array.isArray(e)||(e=[e]);for(var i=0;i-1&&(delete this.keys[s],this.scenes.splice(i,1),this._start.indexOf(s)>-1&&(i=this._start.indexOf(s),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,s=i.settings;i.sceneUpdate=l,t.init&&(t.init.call(t,s.data),s.status=n.INIT,s.isTransition&&i.events.emit(r.TRANSITION_INIT,s.transitionFrom,s.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),s.status=n.LOADING,e.once(h.COMPLETE,this.loadComplete,this),e.start()):this.create(t)},loadComplete:function(t){this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(t.scene)},payloadComplete:function(t){this.bootScene(t.scene)},update:function(t,e){this.processQueue(),this.isProcessing=!0;for(var i=this.scenes.length-1;i>=0;i--){var s=this.scenes[i].sys;s.settings.status>n.START&&s.settings.status<=n.RUNNING&&s.step(t,e)}},render:function(t){for(var e=0;e=n.LOADING&&i.settings.status=n.START&&o<=n.CREATING)return this;if(o>=n.RUNNING&&o<=n.SLEEPING)r.shutdown(),r.sceneUpdate=l,r.start(e);else if(r.sceneUpdate=l,r.start(e),r.load&&(s=r.load),s&&r.settings.hasOwnProperty("pack")&&(s.reset(),s.addPack({payload:r.settings.pack})))return r.settings.status=n.LOADING,s.once(h.COMPLETE,this.payloadComplete,this),s.start(),this;return this.bootScene(i),this},stop:function(t,e){var i=this.getScene(t);if(i&&!i.sys.isTransitioning()&&i.sys.settings.status!==n.SHUTDOWN){var s=i.sys.load;s.off(h.COMPLETE,this.loadComplete,this),s.off(h.COMPLETE,this.payloadComplete,this),i.sys.shutdown(e)}return this},switch:function(t,e){var i=this.getScene(t),s=this.getScene(e);return i&&s&&i!==s&&(this.sleep(t),this.isSleeping(e)?this.wake(e):this.start(e)),this},getAt:function(t){return this.scenes[t]},getIndex:function(t){var e=this.getScene(t);return this.scenes.indexOf(e)},bringToTop:function(t){if(this.isProcessing)this._queue.push({op:"bringToTop",keyA:t,keyB:null});else{var e=this.getIndex(t);if(-1!==e&&e0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,s=this.getScene(t),n=this.getAt(i);this.scenes[e]=n,this.scenes[i]=s}}return this},moveUp:function(t){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(ei),0,n)}}return this},moveBelow:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:t,keyB:e});else{var i=this.getIndex(t),s=this.getIndex(e);if(-1!==i&&-1!==s&&s>i){var n=this.getAt(s);this.scenes.splice(s,1),0===i?this.scenes.unshift(n):this.scenes.splice(i-(s{var s=i(82897),n=i(56694),r=i(7599),o=i(72632),a=i(91963),h=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.pluginStart,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=o(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var s=o(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=s,this._willSleep=o(t,"sleep",!1),this._willRemove=o(t,"remove",!1);var n=o(t,"onUpdate",null);n&&(this._onUpdate=n,this._onUpdateScope=o(t,"onUpdateScope",this.scene));var a=o(t,"allowInput",!1);this.settings.transitionAllowInput=a;var h=i.sys.settings;h.isTransition=!0,h.transitionFrom=this.scene,h.transitionDuration=s,h.transitionAllowInput=a,o(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):o(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake(o(t,"data")):this.manager.start(e,o(t,"data"));var l=o(t,"onStart",null),u=o(t,"onStartScope",this.scene);return l&&l.call(u,this.scene,i,s),this.systems.events.emit(r.TRANSITION_OUT,i,s),this.systems.events.on(r.UPDATE,this.step,this),!0},checkValidTransition:function(t){return!(!t||t.sys.isActive()||t.sys.isTransitioning()||t===this.scene||this.systems.isTransitioning())},step:function(t,e){this._elapsed+=e,this.transitionProgress=s(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;this.systems.events.off(r.UPDATE,this.step,this),t.events.emit(r.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(t,e,i,s){return this.manager.add(t,e,i,s)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var s=this.manager.getScene(e);return s&&s.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getStatus:function(t){var e=this.manager.getScene(t);if(e)return e.sys.getStatus()},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(r.SHUTDOWN,this.shutdown,this),t.off(r.POST_UPDATE,this.step,this),t.off(r.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});a.register("ScenePlugin",h,"scenePlugin"),t.exports=h},36765:(t,e,i)=>{var s=i(92980),n=i(10850),r=i(30657),o=i(90415),a={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:s.PENDING,key:n(t,"key",""),active:n(t,"active",!1),visible:n(t,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:n(t,"pack",!1),cameras:n(t,"cameras",null),map:n(t,"map",r(o,n(t,"mapAdd",{}))),physics:n(t,"physics",{}),loader:n(t,"loader",{}),plugins:n(t,"plugins",!1),input:n(t,"input",{})}}};t.exports=a},63946:(t,e,i)=>{var s=i(56694),n=i(92980),r=i(18360),o=i(7599),a=i(47736),h=i(91088),l=i(72283),u=i(36765),c=new s({initialize:function(t,e){this.scene=t,this.game,this.renderer,this.config=e,this.settings=u.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.scale,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList,this.sceneUpdate=l},init:function(t){this.settings.status=n.INIT,this.sceneUpdate=l,this.game=t,this.renderer=t.renderer,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.addToScene(this,r.Global,[r.CoreScene,h(this),a(this)]),this.events.emit(o.BOOT,this),this.settings.isBooted=!0},step:function(t,e){var i=this.events;i.emit(o.PRE_UPDATE,t,e),i.emit(o.UPDATE,t,e),this.sceneUpdate.call(this.scene,t,e),i.emit(o.POST_UPDATE,t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.events.emit(o.PRE_RENDER,t),this.cameras.render(t,e),this.events.emit(o.RENDER,t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(t){var e=this.settings,i=this.getStatus();return i!==n.CREATING&&i!==n.RUNNING?console.warn("Cannot pause non-running Scene",e.key):this.settings.active&&(e.status=n.PAUSED,e.active=!1,this.events.emit(o.PAUSE,this,t)),this},resume:function(t){var e=this.events,i=this.settings;return this.settings.active||(i.status=n.RUNNING,i.active=!0,e.emit(o.RESUME,this,t)),this},sleep:function(t){var e=this.settings,i=this.getStatus();return i!==n.CREATING&&i!==n.RUNNING?console.warn("Cannot sleep non-running Scene",e.key):(e.status=n.SLEEPING,e.active=!1,e.visible=!1,this.events.emit(o.SLEEP,this,t)),this},wake:function(t){var e=this.events,i=this.settings;return i.status=n.RUNNING,i.active=!0,i.visible=!0,e.emit(o.WAKE,this,t),i.isTransition&&e.emit(o.TRANSITION_WAKE,i.transitionFrom,i.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var t=this.settings.status;return t>n.PENDING&&t<=n.RUNNING},isSleeping:function(){return this.settings.status===n.SLEEPING},isActive:function(){return this.settings.status===n.RUNNING},isPaused:function(){return this.settings.status===n.PAUSED},isTransitioning:function(){return this.settings.isTransition||null!==this.scenePlugin._target},isTransitionOut:function(){return null!==this.scenePlugin._target&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){var e=this.events,i=this.settings;t&&(i.data=t),i.status=n.START,i.active=!0,i.visible=!0,e.emit(o.START,this),e.emit(o.READY,this,t)},shutdown:function(t){var e=this.events,i=this.settings;e.off(o.TRANSITION_INIT),e.off(o.TRANSITION_START),e.off(o.TRANSITION_COMPLETE),e.off(o.TRANSITION_OUT),i.status=n.SHUTDOWN,i.active=!1,i.visible=!1,e.emit(o.SHUTDOWN,this,t)},destroy:function(){var t=this.events,e=this.settings;e.status=n.DESTROYED,e.active=!1,e.visible=!1,t.emit(o.DESTROY,this),t.removeAllListeners();for(var i=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],s=0;s{t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},31803:t=>{t.exports="addedtoscene"},94817:t=>{t.exports="boot"},28977:t=>{t.exports="create"},91959:t=>{t.exports="destroy"},363:t=>{t.exports="pause"},15643:t=>{t.exports="postupdate"},17058:t=>{t.exports="prerender"},77125:t=>{t.exports="preupdate"},76018:t=>{t.exports="ready"},28620:t=>{t.exports="removedfromscene"},41538:t=>{t.exports="render"},34268:t=>{t.exports="resume"},2342:t=>{t.exports="shutdown"},96541:t=>{t.exports="sleep"},74244:t=>{t.exports="start"},17046:t=>{t.exports="transitioncomplete"},13637:t=>{t.exports="transitioninit"},14733:t=>{t.exports="transitionout"},33899:t=>{t.exports="transitionstart"},52418:t=>{t.exports="transitionwake"},31735:t=>{t.exports="update"},8470:t=>{t.exports="wake"},7599:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(31803),BOOT:i(94817),CREATE:i(28977),DESTROY:i(91959),PAUSE:i(363),POST_UPDATE:i(15643),PRE_RENDER:i(17058),PRE_UPDATE:i(77125),READY:i(76018),REMOVED_FROM_SCENE:i(28620),RENDER:i(41538),RESUME:i(34268),SHUTDOWN:i(2342),SLEEP:i(96541),START:i(74244),TRANSITION_COMPLETE:i(17046),TRANSITION_INIT:i(13637),TRANSITION_OUT:i(14733),TRANSITION_START:i(33899),TRANSITION_WAKE:i(52418),UPDATE:i(31735),WAKE:i(8470)}},20436:(t,e,i)=>{var s=i(92980),n=i(98611),r={Events:i(7599),GetPhysicsPlugins:i(47736),GetScenePlugins:i(91088),SceneManager:i(13553),ScenePlugin:i(64051),Settings:i(36765),Systems:i(63946)};r=n(!1,r,s),t.exports=r},25798:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(76038),o=i(98611),a=i(72283),h=new s({Extends:n,initialize:function(t,e,i){n.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=o(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),!1):(t=o(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=o(!0,this.markers[t.name],t),!0):(console.warn("Audio Marker: "+t.name+" missing in Sound: "+this.key),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return console.warn("Marker: "+t+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=o(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop,this.pan=this.currentConfig.pan},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:a,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e},destroy:function(){this.pendingRemove||(this.emit(r.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});t.exports=h},12486:(t,e,i)=>{var s=i(56694),n=i(32742),r=i(6659),o=i(76038),a=i(97081),h=i(72283),l=i(71608),u=i(51463),c=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.jsonCache=t.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,t.events.on(a.BLUR,this.onGameBlur,this),t.events.on(a.FOCUS,this.onGameFocus,this),t.events.on(a.PRE_STEP,this.update,this),t.events.once(a.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var s in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(s)){var r=n(e),o=i.spritemap[s];r.loop=!!o.hasOwnProperty("loop")&&o.loop,i.addMarker({name:s,start:o.start,duration:o.end-o.start,config:r})}return i},get:function(t){return u(this.sounds,"key",t)},getAll:function(t){return t?l(this.sounds,"key",t):l(this.sounds)},getAllPlaying:function(){return l(this.sounds,"isPlaying",!0)},play:function(t,e){var i=this.add(t);return i.once(o.COMPLETE,i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var s=this.addAudioSprite(t);return s.once(o.COMPLETE,s.destroy,s),s.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeAll:function(){this.sounds.forEach((function(t){t.destroy()})),this.sounds.length=0},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var s=this.sounds[i];s.key===t&&(s.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound((function(t){t.pause()})),this.emit(o.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound((function(t){t.resume()})),this.emit(o.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound((function(t){t.stop()})),this.emit(o.STOP_ALL,this)},stopByKey:function(t){var e=0;return this.getAll(t).forEach((function(t){t.stop()&&e++})),e},unlock:h,onBlur:h,onFocus:h,onGameBlur:function(){this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.pauseOnBlur&&this.onFocus()},update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(o.UNLOCKED,this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach((function(i){i.update(t,e)}))},destroy:function(){this.game.events.off(a.BLUR,this.onGameBlur,this),this.game.events.off(a.FOCUS,this.onGameFocus,this),this.game.events.off(a.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach((function(s,n){s&&!s.pendingRemove&&t.call(e||i,s,n,i.sounds)}))},setRate:function(t){return this.rate=t,this},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound((function(t){t.calculateRate()})),this.emit(o.GLOBAL_RATE,this,t)}},setDetune:function(t){return this.detune=t,this},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound((function(t){t.calculateRate()})),this.emit(o.GLOBAL_DETUNE,this,t)}}});t.exports=c},84191:(t,e,i)=>{var s=i(27622),n=i(17546),r=i(55491),o={create:function(t){var e=t.config.audio,i=t.device.audio;return e.noAudio||!i.webAudio&&!i.audioData?new n(t):i.webAudio&&!e.disableWebAudio?new r(t):new s(t)}};t.exports=o},77578:t=>{t.exports="complete"},19679:t=>{t.exports="decodedall"},56951:t=>{t.exports="decoded"},16436:t=>{t.exports="destroy"},55154:t=>{t.exports="detune"},57818:t=>{t.exports="detune"},57890:t=>{t.exports="mute"},83022:t=>{t.exports="rate"},99170:t=>{t.exports="volume"},64289:t=>{t.exports="looped"},67214:t=>{t.exports="loop"},53128:t=>{t.exports="mute"},73078:t=>{t.exports="pan"},76763:t=>{t.exports="pauseall"},88426:t=>{t.exports="pause"},13765:t=>{t.exports="play"},80291:t=>{t.exports="rate"},11124:t=>{t.exports="resumeall"},55382:t=>{t.exports="resume"},71157:t=>{t.exports="seek"},31776:t=>{t.exports="stopall"},39450:t=>{t.exports="stop"},21939:t=>{t.exports="unlocked"},33019:t=>{t.exports="volume"},76038:(t,e,i)=>{t.exports={COMPLETE:i(77578),DECODED:i(56951),DECODED_ALL:i(19679),DESTROY:i(16436),DETUNE:i(55154),GLOBAL_DETUNE:i(57818),GLOBAL_MUTE:i(57890),GLOBAL_RATE:i(83022),GLOBAL_VOLUME:i(99170),LOOP:i(67214),LOOPED:i(64289),MUTE:i(53128),PAN:i(73078),PAUSE_ALL:i(76763),PAUSE:i(88426),PLAY:i(13765),RATE:i(80291),RESUME_ALL:i(11124),RESUME:i(55382),SEEK:i(71157),STOP_ALL:i(31776),STOP:i(39450),UNLOCKED:i(21939),VOLUME:i(33019)}},34350:(t,e,i)=>{var s=i(25798),n=i(56694),r=i(76038),o=i(82897),a=new n({Extends:s,initialize:function(t,e,i){if(void 0===i&&(i={}),this.tags=t.game.cache.audio.get(e),!this.tags)throw new Error('No cached audio asset with key "'+e);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,s.call(this,t,e,i)},play:function(t,e){return!this.manager.isLocked(this,"play",[t,e])&&(!!s.prototype.play.call(this,t,e)&&(!!this.pickAndPlayAudioTag()&&(this.emit(r.PLAY,this),!0)))},pause:function(){return!this.manager.isLocked(this,"pause")&&(!(this.startTime>0)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(r.PAUSE,this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!s.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit(r.RESUME,this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!s.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(r.STOP,this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=i-this.manager.loopEndOffset?(this.audio.currentTime=e+Math.max(0,s-i),s=this.audio.currentTime):s=i)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(r.COMPLETE,this);this.previousTime=s}},destroy:function(){s.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=o(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){s.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.updateMute(),this.emit(r.MUTE,this,t))}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.updateVolume(),this.emit(r.VOLUME,this,t))}},setVolume:function(t){return this.volume=t,this},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,r.RATE,t)||(this.calculateRate(),this.emit(r.RATE,this,t))}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,r.DETUNE,t)||(this.calculateRate(),this.emit(r.DETUNE,this,t))}},setDetune:function(t){return this.detune=t,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit(r.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit(r.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this},pan:{get:function(){return this.currentConfig.pan},set:function(t){this.currentConfig.pan=t,this.emit(r.PAN,this,t)}},setPan:function(t){return this.pan=t,this}});t.exports=a},27622:(t,e,i)=>{var s=i(12486),n=i(56694),r=i(76038),o=i(34350),a=new n({Extends:s,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,s.call(this,t)},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},unlock:function(){this.locked=!1;var t=this;if(this.game.cache.audio.entries.each((function(e,i){for(var s=0;s{t.exports={SoundManagerCreator:i(84191),Events:i(76038),BaseSound:i(25798),BaseSoundManager:i(12486),WebAudioSound:i(96008),WebAudioSoundManager:i(55491),HTML5AudioSound:i(34350),HTML5AudioSoundManager:i(27622),NoAudioSound:i(38662),NoAudioSoundManager:i(17546)}},38662:(t,e,i)=>{var s=i(25798),n=i(56694),r=i(6659),o=i(98611),a=i(72283),h=function(){return!1},l=function(){return null},u=function(){return this},c=new n({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.pan=0,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:h,updateMarker:h,removeMarker:l,play:h,pause:h,resume:h,stop:h,setMute:u,setVolume:u,setRate:u,setDetune:u,setSeek:u,setLoop:u,setPan:u,applyConfig:l,resetConfig:l,update:a,calculateRate:l,destroy:function(){s.prototype.destroy.call(this)}});t.exports=c},17546:(t,e,i)=>{var s=i(12486),n=i(56694),r=i(6659),o=i(38662),a=i(72283),h=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},get:function(t){return s.prototype.get.call(this,t)},getAll:function(t){return s.prototype.getAll.call(this,t)},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return s.prototype.remove.call(this,t)},removeAll:function(){return s.prototype.removeAll.call(this)},removeByKey:function(t){return s.prototype.removeByKey.call(this,t)},stopByKey:function(t){return s.prototype.stopByKey.call(this,t)},onBlur:a,onFocus:a,onGameBlur:a,onGameFocus:a,pauseAll:a,resumeAll:a,stopAll:a,update:a,setRate:a,setDetune:a,setMute:a,setVolume:a,unlock:a,forEachActiveSound:function(t,e){s.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){s.prototype.destroy.call(this)}});t.exports=h},96008:(t,e,i)=>{var s=i(25798),n=i(56694),r=i(76038),o=new n({Extends:s,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('Audio key "'+e+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.pannerNode=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),t.context.createStereoPanner?(this.pannerNode=t.context.createStereoPanner(),this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(t.destination)):this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,s.call(this,t,e,i)},play:function(t,e){return!!s.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime{var s=i(82329),n=i(12486),r=i(56694),o=i(76038),a=i(97081),h=i(96008),l=new r({Extends:n,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),n.call(this,t),this.locked&&t.isBooted?this.unlock():t.events.once(a.BOOT,this.unlock,this)},createAudioContext:function(t){var e=t.config.audio;return e.context?(e.context.resume(),e.context):window.hasOwnProperty("AudioContext")?new AudioContext:window.hasOwnProperty("webkitAudioContext")?new window.webkitAudioContext:void 0},setAudioContext:function(t){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=t,this.masterMuteNode=t.createGain(),this.masterVolumeNode=t.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(t.destination),this.destination=this.masterMuteNode,this},add:function(t,e){var i=new h(this,t,e);return this.sounds.push(i),i},decodeAudio:function(t,e){var i;i=Array.isArray(t)?t:[{key:t,data:e}];for(var n=this.game.cache.audio,r=i.length,a=0;a{var s=i(59959),n=i(56694),r=i(72283),o=i(17922),a=new n({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=r,this.removeCallback=r,this._sortKey=""},add:function(t,e){return e?s.Add(this.list,t):s.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?s.AddAt(this.list,t,e):s.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),o(this.list,e),this):this},getByName:function(t){return s.GetFirst(this.list,"name",t)},getRandom:function(t,e){return s.GetRandom(this.list,t,e)},getFirst:function(t,e,i,n){return s.GetFirst(this.list,t,e,i,n)},getAll:function(t,e,i,n){return s.GetAll(this.list,t,e,i,n)},count:function(t,e){return s.CountAllMatching(this.list,t,e)},swap:function(t,e){s.Swap(this.list,t,e)},moveTo:function(t,e){return s.MoveTo(this.list,t,e)},moveAbove:function(t,e){return s.MoveAbove(this.list,t,e)},moveBelow:function(t,e){return s.MoveBelow(this.list,t,e)},remove:function(t,e){return e?s.Remove(this.list,t):s.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?s.RemoveAt(this.list,t):s.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?s.RemoveBetween(this.list,t,e):s.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return s.BringToTop(this.list,t)},sendToBack:function(t){return s.SendToBack(this.list,t)},moveUp:function(t){return s.MoveUp(this.list,t),t},moveDown:function(t){return s.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return s.Shuffle(this.list),this},replace:function(t,e){return s.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,n){return s.SetAll(this.list,t,e,i,n),this},each:function(t,e){for(var i=[null],s=2;s0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=a},33885:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e{var s=i(56694),n=i(6659),r=i(36716),o=new s({Extends:n,initialize:function(){n.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(t){return this._active.indexOf(t)>-1},isPending:function(t){return this._toProcess>0&&this._pending.indexOf(t)>-1},isDestroying:function(t){return this._destroy.indexOf(t)>-1},add:function(t){return this.checkQueue&&this.isActive()&&!this.isDestroying()||this.isPending()||(this._pending.push(t),this._toProcess++),t},remove:function(t){if(this.isPending(t)){var e=this._pending,i=e.indexOf(t);-1!==i&&e.splice(i,1)}else this.isActive(t)&&(this._destroy.push(t),this._toProcess++);return t},removeAll:function(){for(var t=this._active,e=this._destroy,i=t.length;i--;)e.push(t[i]),this._toProcess++;return this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,s=this._active;for(t=0;t{var s=i(53466);function n(t){if(!(this instanceof n))return new n(t,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function r(t,e,i){if(!i)return e.indexOf(t);for(var s=0;s=t.minX&&e.maxY>=t.minY}function v(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,e,i,n,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=n||(o=e+Math.ceil((i-e)/n/2)*n,s(t,o,e,i,r),a.push(e,o,o,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],s=this.toBBox;if(!f(t,e))return i;for(var n,r,o,a,h=[];e;){for(n=0,r=e.children.length;n=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},_split:function(t,e){var i=t[e],s=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,s);var r=this._chooseSplitIndex(i,n,s),a=v(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=v([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var s,n,r,o,h,l,u,d,p,f,v,g,m,y;for(l=u=1/0,s=e;s<=i-e;s++)n=a(t,0,s,this.toBBox),r=a(t,s,i,this.toBBox),p=n,f=r,v=void 0,g=void 0,m=void 0,y=void 0,v=Math.max(p.minX,f.minX),g=Math.max(p.minY,f.minY),m=Math.min(p.maxX,f.maxX),y=Math.min(p.maxY,f.maxY),o=Math.max(0,m-v)*Math.max(0,y-g),h=c(n)+c(r),o=e;n--)r=t.children[n],h(u,t.leaf?o(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var s=i;s>=0;s--)h(e[s],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=n},58403:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){if(this.entries=[],Array.isArray(t))for(var e=0;e-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new s;return t.entries.forEach((function(t){e.set(t)})),this.entries.forEach((function(t){e.set(t)})),e},intersect:function(t){var e=new s;return this.entries.forEach((function(i){t.contains(i)&&e.set(i)})),e},difference:function(t){var e=new s;return this.entries.forEach((function(i){t.contains(i)||e.set(i)})),e},size:{get:function(){return this.entries.length},set:function(t){return t{var s=i(82897),n=i(56694),r=i(84314),o=i(93736),a=new n({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=null),this._width=t,this._height=e,this._parent=s,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=s(t,0,this.maxWidth),this.minHeight=s(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=s(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=s(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=s(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=s(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var s=this.snapTo,n=0===e?1:t/e;return i&&this.aspectRatio>n||!i&&this.aspectRatio0&&(t=(e=r(e,s.y))*this.aspectRatio)):(i&&this.aspectRation)&&(t=(e=r(e,s.y))*this.aspectRatio,s.x>0&&(e=(t=r(t,s.x))*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(t){t&&t.style&&(t.style.width=this._width+"px",t.style.height=this._height+"px")},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});a.NONE=0,a.WIDTH_CONTROLS_HEIGHT=1,a.HEIGHT_CONTROLS_WIDTH=2,a.FIT=3,a.ENVELOP=4,t.exports=a},94160:t=>{t.exports="add"},95393:t=>{t.exports="remove"},36716:(t,e,i)=>{t.exports={PROCESS_QUEUE_ADD:i(94160),PROCESS_QUEUE_REMOVE:i(95393)}},20010:(t,e,i)=>{t.exports={Events:i(36716),List:i(71207),Map:i(33885),ProcessQueue:i(74623),RTree:i(68687),Set:i(58403),Size:i(90881)}},17487:(t,e,i)=>{var s=i(56694),n=i(82897),r=i(27119),o=i(86459),a=i(28621),h=i(31673),l=new s({Extends:h,initialize:function(t,e,i,s,n){h.call(this,t,e,i,s,n),this.add("__BASE",0,0,0,s,n),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=s,this.height=n,this.imageData=this.context.getImageData(0,0,s,n),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===o.WEBGL&&this.refresh(),this},draw:function(t,e,i){return this.context.drawImage(i,t,e),this.update()},drawFrame:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0);var n=this.manager.getFrame(t,e);if(n){var r=n.canvasData,o=n.cutWidth,a=n.cutHeight,h=n.source.resolution;return this.context.drawImage(n.source.image,r.x,r.y,o,a,i,s,o/h,a/h),this.update()}return this},setPixel:function(t,e,i,s,n,r){if(void 0===r&&(r=255),t=Math.abs(Math.floor(t)),e=Math.abs(Math.floor(e)),this.getIndex(t,e)>-1){var o=this.context.getImageData(t,e,1,1);o.data[0]=i,o.data[1]=s,o.data[2]=n,o.data[3]=r,this.context.putImageData(o,t,e)}return this},putData:function(t,e,i,s,n,r,o){return void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=t.width),void 0===o&&(o=t.height),this.context.putImageData(t,e,i,s,n,r,o),this},getData:function(t,e,i,s){return t=n(Math.floor(t),0,this.width-1),e=n(Math.floor(e),0,this.height-1),i=n(i,1,this.width-t),s=n(s,1,this.height-e),this.context.getImageData(t,e,i,s)},getPixel:function(t,e,i){i||(i=new r);var s=this.getIndex(t,e);if(s>-1){var n=this.data,o=n[s+0],a=n[s+1],h=n[s+2],l=n[s+3];i.setTo(o,a,h,l)}return i},getPixels:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===s&&(s=i),t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e));for(var o=n(t,0,this.width),a=n(t+i,0,this.width),h=n(e,0,this.height),l=n(e+s,0,this.height),u=new r,c=[],d=h;d{var s=i(95723),n=i(51052),r=i(61068),o=i(56694),a=i(86459),h=i(82047),l=i(72632),u=i(65641),c=i(37410),d=i(31673),p=i(75512),f=new o({Extends:d,initialize:function(t,e,i,s){void 0===i&&(i=256),void 0===s&&(s=256),this.type="DynamicTexture";var o=t.game.renderer,h=o&&o.type===a.CANVAS,l=h?r.create2D(this,i,s):[this];d.call(this,t,e,l,i,s),this.add("__BASE",0,0,0,i,s),this.renderer=o,this.isDrawing=!1,this.canvas=h?l:null,this.context=h?l.getContext("2d"):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new n(0,0,i,s).setScene(t.game.scene.systemScene,!1),this.renderTarget=h?null:new c(o,i,s,1,0,!1),this.pipeline=h?null:o.pipelines.get(u.SINGLE_PIPELINE),this.setSize(i,s)},setSize:function(t,e){void 0===e&&(e=t);var i=this.get(),s=i.source;if(t!==this.width||e!==this.height){this.canvas&&(this.canvas.width=t,this.canvas.height=e);var n=this.renderTarget;n&&(n.resize(t,e),i.glTexture=n.texture,s.isRenderTexture=!0,s.isGLTexture=!0,s.glTexture=n.texture,s.glTexture.flipY=!0),this.camera.setSize(t,e),s.width=t,s.height=e,i.setSize(t,e),this.width=t,this.height=e}else{var r=this.getSourceImage();i.cutX+t>r.width&&(t=r.width-i.cutX),i.cutY+e>r.height&&(e=r.height-i.cutY),i.setSize(t,e,i.cutX,i.cutY)}return this},setIsSpriteTexture:function(t){return this.isSpriteTexture=t,this},fill:function(t,e,i,s,n,r){var o=this.camera,a=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=this.width),void 0===r&&(r=this.height);var h=t>>16&255,l=t>>8&255,u=255&t,c=this.renderTarget;if(o.preRender(),c){c.bind(!0);var d=this.pipeline.manager.set(this.pipeline),f=a.width/c.width,v=a.height/c.height;d.drawFillRect(i*f,s*v,n*f,r*v,p.getTintFromFloats(u/255,l/255,h/255,1),e),c.unbind(!0)}else{var g=this.context;a.setContext(g),g.globalCompositeOperation="source-over",g.fillStyle="rgba("+h+","+l+","+u+","+e+")",g.fillRect(i,s,n,r),a.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var t=this.context,e=this.renderTarget;e?e.clear():t&&(t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,this.width,this.height),t.restore()),this.dirty=!1}return this},stamp:function(t,e,i,s,n){void 0===i&&(i=0),void 0===s&&(s=0);var r=l(n,"alpha",1),o=l(n,"tint",16777215),a=l(n,"angle",0),h=l(n,"rotation",0),u=l(n,"scale",1),c=l(n,"scaleX",u),d=l(n,"scaleY",u),p=l(n,"originX",.5),f=l(n,"originY",.5),v=l(n,"blendMode",0),g=l(n,"erase",!1),m=this.manager.resetStamp(r,o);return m.setAngle(0),0!==a?m.setAngle(a):0!==h&&m.setRotation(h),m.setScale(c,d),m.setTexture(t,e),m.setOrigin(p,f),m.setBlendMode(v),g&&(this._eraseMode=!0),this.draw(m,i,s),g&&(this._eraseMode=!1),this},erase:function(t,e,i){return this._eraseMode=!0,this.draw(t,e,i),this._eraseMode=!1,this},draw:function(t,e,i,s,n){return this.beginDraw(),this.batchDraw(t,e,i,s,n),this.endDraw(),this},drawFrame:function(t,e,i,s,n,r){return this.beginDraw(),this.batchDrawFrame(t,e,i,s,n,r),this.endDraw(),this},repeat:function(t,e,i,s,n,r,o,a,l){if(void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=this.width),void 0===r&&(r=this.height),void 0===o&&(o=1),void 0===a&&(a=16777215),void 0===l&&(l=!1),!(e=t instanceof h?t:this.manager.getFrame(t,e)))return this;var u=this.manager.resetStamp(o,a);u.setFrame(e),u.setOrigin(0);var c=e.width,d=e.height;n=Math.floor(n),r=Math.floor(r);var p=Math.ceil(n/c),f=Math.ceil(r/d),v=p*c-n,g=f*d-r;v>0&&(v=c-v),g>0&&(g=d-g),i<0&&(p+=Math.ceil(Math.abs(i)/c)),s<0&&(f+=Math.ceil(Math.abs(s)/d));var m=i,y=s,x=!1,T=this.manager.stampCrop.setTo(0,0,c,d);l||this.beginDraw();for(var w=0;w0&&b===p-1&&(x=!0,T.width=v),g>0&&w===f-1&&(x=!0,T.height=g),x&&u.setCrop(T),this.batchGameObject(u,m,y),u.isCropped=!1,T.setTo(0,0,c,d)),m+=c;m=i,y+=d}return l||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var t=this.camera,e=this.renderer,i=this.renderTarget;t.preRender(),i?e.beginCapture(i.width,i.height):e.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(t,e,i,s,n){return Array.isArray(t)||(t=[t]),this.batchList(t,e,i,s,n),this},batchDrawFrame:function(t,e,i,s,n,r){void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=1),void 0===r&&(r=16777215);var o=this.manager.getFrame(t,e);return o&&(this.renderTarget?this.pipeline.batchTextureFrame(o,i,s,r,n,this.camera.matrix,null):this.batchTextureFrame(o,i,s,n,r)),this},endDraw:function(t){if(void 0===t&&(t=this._eraseMode),this.isDrawing){var e=this.renderer,i=this.renderTarget;if(i){var s=e.endCapture();e.pipelines.setUtility().blitFrame(s,i,1,!1,!1,t,this.isSpriteTexture),e.resetScissor(),e.resetViewport()}else e.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(t,e,i,s,n){var r=t.length;if(0!==r)for(var o=0;o0&&a.height>0&&o.drawImage(h,a.x,a.y,a.width,a.height,e,i,a.width,a.height),o.restore()}},snapshotArea:function(t,e,i,s,n,r,o){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,n,!1,t,e,i,s,r,o):this.renderer.snapshotCanvas(this.canvas,n,!1,t,e,i,s,r,o),this},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.width,this.height,t,e,i)},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i,"pixel")},renderWebGL:function(t,e,i,s){var n=this.manager.resetStamp();n.setTexture(this),n.setOrigin(0),n.renderWebGL(t,n,i,s)},renderCanvas:function(){},preDestroy:function(){r.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.stamp.destroy(),this.canvas=null,this.context=null,this.renderer=null,this.scene=null}});t.exports=f},82047:(t,e,i)=>{var s=i(56694),n=i(82897),r=i(98611),o=new s({initialize:function(t,e,i,s,n,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(r,o,s,n)},setSize:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0),this.cutX=i,this.cutY=s,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var n=this.data,r=n.cut;r.x=i,r.y=s,r.w=t,r.h=e,r.r=i+t,r.b=s+e,n.sourceSize.w=t,n.sourceSize.h=e,n.spriteSourceSize.w=t,n.spriteSourceSize.h=e,n.radius=.5*Math.sqrt(t*t+e*e);var o=n.drawImage;return o.x=i,o.y=s,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,s,n,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=s,a.w=n,a.h=r,a.r=i+n,a.b=s+r,this.x=i,this.y=s,this.width=n,this.height=r,this.halfWidth=.5*n,this.halfHeight=.5*r,this.centerX=Math.floor(n/2),this.centerY=Math.floor(r/2),this.updateUVs()},setCropUVs:function(t,e,i,s,r,o,a){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,p=this.realHeight,f=h+(e=n(e,0,d)),v=l+(i=n(i,0,p)),g=s=n(s,0,d-e),m=r=n(r,0,p-i),y=this.data;if(y.trim){var x=y.spriteSourceSize,T=e+(s=n(s,0,u-e)),w=i+(r=n(r,0,c-i));if(!(x.rT||x.y>w)){var b=Math.max(x.x,e),E=Math.max(x.y,i),S=Math.min(x.r,T)-b,A=Math.min(x.b,w)-E;g=S,m=A,f=o?h+(u-(b-x.x)-S):h+(b-x.x),v=a?l+(c-(E-x.y)-A):l+(E-x.y),e=b,i=E,s=S,r=A}else f=0,v=0,g=0,m=0}else o&&(f=h+(u-e-s)),a&&(v=l+(c-i-r));var _=this.source.width,C=this.source.height;return t.u0=Math.max(0,f/_),t.v0=Math.max(0,v/C),t.u1=Math.min(1,(f+g)/_),t.v1=Math.min(1,(v+m)/C),t.x=e,t.y=i,t.cx=f,t.cy=v,t.cw=g,t.ch=m,t.width=s,t.height=r,t.flipX=o,t.flipY=a,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,s,n,r){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=s,this.u1=n,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,s=this.cutHeight,n=this.data.drawImage;n.width=i,n.height=s;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=e/o,this.u1=(t+i)/r,this.v1=(e+s)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new o(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=r(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=o},31673:(t,e,i)=>{var s=i(56694),n=i(82047),r=i(32547),o='Texture "%s" has no frame "%s"',a=new s({initialize:function(t,e,i,s,n){Array.isArray(i)||(i=[i]),this.manager=t,this.key=e,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var o=0;o{var s=i(61068),n=i(17487),r=i(56694),o=i(27119),a=i(86459),h=i(845),l=i(6659),u=i(38203),c=i(82047),d=i(97081),p=i(52780),f=i(10850),v=i(1539),g=i(42911),m=i(69150),y=i(74118),x=i(31673),T=new r({Extends:l,initialize:function(t){l.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=s.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new y,this.silentWarnings=!1,t.events.once(d.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(u.LOAD,this.updatePending,this),this.on(u.ERROR,this.updatePending,this);var t=this.game.config;this.addBase64("__DEFAULT",t.defaultImage),this.addBase64("__MISSING",t.missingImage),this.addBase64("__WHITE",t.whiteImage),this.game.events.once(d.DESTROY,this.destroy,this)},updatePending:function(){this._pending--,0===this._pending&&(this.off(u.LOAD),this.off(u.ERROR),this.emit(u.READY),this.stamp=new v(this.game.scene.systemScene).setOrigin(0))},checkKey:function(t){return!this.exists(t)||(this.silentWarnings||console.error("Texture key already in use: "+t),!1)},remove:function(t){if("string"==typeof t){if(!this.exists(t))return this.silentWarnings||console.warn("No texture found matching key: "+t),this;t=this.get(t)}return this.list.hasOwnProperty(t.key)&&(t.destroy(),this.emit(u.REMOVE,t.key),this.emit(u.REMOVE_KEY+t.key)),this},removeKey:function(t){return this.list.hasOwnProperty(t)&&delete this.list[t],this},addBase64:function(t,e){if(this.checkKey(t)){var i=this,s=new Image;s.onerror=function(){i.emit(u.ERROR,t)},s.onload=function(){var e=i.create(t,s);m.Image(e,0),i.emit(u.ADD,t,e),i.emit(u.ADD_KEY+t,e),i.emit(u.LOAD,t,e)},s.src=e}return this},getBase64:function(t,e,i,n){void 0===i&&(i="image/png"),void 0===n&&(n=.92);var r="",o=this.getFrame(t,e);if(o&&(o.source.isRenderTexture||o.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(o){var a=o.canvasData,h=s.create2D(this,a.width,a.height),l=h.getContext("2d");a.width>0&&a.height>0&&l.drawImage(o.source.image,a.x,a.y,a.width,a.height,0,0,a.width,a.height),r=h.toDataURL(i,n),s.remove(h)}return r},addImage:function(t,e,i){var s=null;return this.checkKey(t)&&(s=this.create(t,e),m.Image(s,0),i&&s.setDataSource(i),this.emit(u.ADD,t,s),this.emit(u.ADD_KEY+t,s)),s},addGLTexture:function(t,e,i,s){var n=null;return this.checkKey(t)&&(void 0===i&&(i=e.width),void 0===s&&(s=e.height),(n=this.create(t,e,i,s)).add("__BASE",0,0,0,i,s),this.emit(u.ADD,t,n),this.emit(u.ADD_KEY+t,n)),n},addCompressedTexture:function(t,e,i){var s=null;if(this.checkKey(t)){if((s=this.create(t,e)).add("__BASE",0,0,0,e.width,e.height),i)if(Array.isArray(i))for(var n=0;n=r.x&&t=r.y&&e=r.x&&t=r.y&&e{var s=i(61068),n=i(56694),r=i(28621),o=i(27394),a=new n({initialize:function(t,e,i,s,n){void 0===n&&(n=!1);var a=t.manager.game;this.renderer=a.renderer,this.texture=t,this.source=e,this.image=e.compressed?null:e,this.compressionAlgorithm=e.compressed?e.format:null,this.resolution=1,this.width=i||e.naturalWidth||e.videoWidth||e.width||0,this.height=s||e.naturalHeight||e.videoHeight||e.height||0,this.scaleMode=o.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&e instanceof HTMLVideoElement,this.isRenderTexture="RenderTexture"===e.type||"DynamicTexture"===e.type,this.isGLTexture=window.hasOwnProperty("WebGLTexture")&&e instanceof WebGLTexture,this.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.flipY=n,this.init(a)},init:function(t){var e=this.renderer;if(e){var i=this.source;if(e.gl){var s=this.image,n=this.flipY,r=this.width,o=this.height,a=this.scaleMode;this.isCanvas?this.glTexture=e.createCanvasTexture(s,!1,n):this.isVideo?this.glTexture=e.createVideoTexture(s,!1,n):this.isRenderTexture?this.glTexture=e.createTextureFromSource(null,r,o,a):this.isGLTexture?this.glTexture=i:this.compressionAlgorithm?this.glTexture=e.createTextureFromSource(i):this.glTexture=e.createTextureFromSource(s,r,o,a)}else this.isRenderTexture&&(this.image=i.canvas)}t.config.antialias||this.setFilter(1)},setFilter:function(t){this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,t),this.scaleMode=t},setFlipY:function(t){return void 0===t&&(t=!0),this.flipY=t,this},update:function(){var t=this.renderer,e=this.image,i=this.flipY,s=t.gl;s&&this.isCanvas?this.glTexture=t.updateCanvasTexture(e,this.glTexture,i):s&&this.isVideo&&(this.glTexture=t.updateVideoTexture(e,this.glTexture,i))},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture,!0),this.isCanvas&&s.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});t.exports=a},65154:t=>{t.exports={LINEAR:0,NEAREST:1}},49644:t=>{t.exports="addtexture"},29569:t=>{t.exports="addtexture-"},60079:t=>{t.exports="onerror"},72665:t=>{t.exports="onload"},93006:t=>{t.exports="ready"},69018:t=>{t.exports="removetexture"},85549:t=>{t.exports="removetexture-"},38203:(t,e,i)=>{t.exports={ADD:i(49644),ADD_KEY:i(29569),ERROR:i(60079),LOAD:i(72665),READY:i(93006),REMOVE:i(69018),REMOVE_KEY:i(85549)}},87499:(t,e,i)=>{var s=i(98611),n=i(65154),r={CanvasTexture:i(17487),DynamicTexture:i(845),Events:i(38203),FilterMode:n,Frame:i(82047),Parsers:i(69150),Texture:i(31673),TextureManager:i(6237),TextureSource:i(32547)};r=s(!1,r,n),t.exports=r},35082:t=>{t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var n,r=i.getElementsByTagName("SubTexture"),o=0;o{t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},21560:t=>{t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},64423:(t,e,i)=>{var s=i(32742);t.exports=function(t,e,i){if(i.frames||i.textures){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var r,o=Array.isArray(i.textures)?i.textures[e].frames:i.frames,a=0;a{var s=i(32742);t.exports=function(t,e,i){if(i.frames){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);var r,o=i.frames;for(var a in o)if(o.hasOwnProperty(a)){var h=o[a];if(r=t.add(a,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h)){h.trimmed&&r.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(r.rotated=!0,r.updateUVsInverted());var l=h.anchor||h.pivot;l&&(r.customPivot=!0,r.pivotX=l.x,r.pivotY=l.y),r.customData=s(h)}else console.warn("Invalid atlas json, frame already exists: "+a)}for(var u in i)"frames"!==u&&(Array.isArray(i[u])?t.customData[u]=i[u].slice(0):t.customData[u]=i[u]);return t}console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object")}},67409:t=>{t.exports=function(t){var e,i=[171,75,84,88,32,49,49,187,13,10,26,10],s=new Uint8Array(t,0,12);for(e=0;e>1),v=Math.max(1,v>>1),p+=g}return{mipmaps:d,width:h,height:l,internalFormat:a,compressed:!0,generateMipmap:!1}}console.warn("KTXParser - Only compressed formats supported")}},24904:t=>{function e(t,e,i,s,n,r,o){return void 0===o&&(o=16),Math.floor((t+i)/n)*Math.floor((e+s)/r)*o}function i(t,e){return(t=Math.max(t,16))*(e=Math.max(e,8))/4}function s(t,e){return(t=Math.max(t,8))*(e=Math.max(e,8))/2}function n(t,i){return e(t,i,3,3,4,4,8)}function r(t,i){return e(t,i,3,3,4,4)}var o={0:{sizeFunc:i,glFormat:35841},1:{sizeFunc:i,glFormat:35843},2:{sizeFunc:s,glFormat:35840},3:{sizeFunc:s,glFormat:35842},6:{sizeFunc:n,glFormat:36196},7:{sizeFunc:n,glFormat:33776},8:{sizeFunc:r,glFormat:33777},9:{sizeFunc:r,glFormat:33778},11:{sizeFunc:r,glFormat:33779},22:{sizeFunc:n,glFormat:37492},23:{sizeFunc:r,glFormat:37496},24:{sizeFunc:n,glFormat:37494},25:{sizeFunc:n,glFormat:37488},26:{sizeFunc:r,glFormat:37490},27:{sizeFunc:r,glFormat:37808},28:{sizeFunc:function(t,i){return e(t,i,4,3,5,4)},glFormat:37809},29:{sizeFunc:function(t,i){return e(t,i,4,4,5,5)},glFormat:37810},30:{sizeFunc:function(t,i){return e(t,i,5,4,6,5)},glFormat:37811},31:{sizeFunc:function(t,i){return e(t,i,5,5,6,6)},glFormat:37812},32:{sizeFunc:function(t,i){return e(t,i,7,4,8,5)},glFormat:37813},33:{sizeFunc:function(t,i){return e(t,i,7,5,8,6)},glFormat:37814},34:{sizeFunc:function(t,i){return e(t,i,7,7,8,8)},glFormat:37815},35:{sizeFunc:function(t,i){return e(t,i,9,4,10,5)},glFormat:37816},36:{sizeFunc:function(t,i){return e(t,i,9,5,10,6)},glFormat:37817},37:{sizeFunc:function(t,i){return e(t,i,9,7,10,8)},glFormat:37818},38:{sizeFunc:function(t,i){return e(t,i,9,9,10,10)},glFormat:37819},39:{sizeFunc:function(t,i){return e(t,i,11,9,12,10)},glFormat:37820},40:{sizeFunc:function(t,i){return e(t,i,11,11,12,12)},glFormat:37821}};t.exports=function(t){for(var e=new Uint32Array(t,0,13),i=e[2],s=o[i].glFormat,n=o[i].sizeFunc,r=e[11],a=e[7],h=e[6],l=52+e[12],u=new Uint8Array(t,l),c=new Array(r),d=0,p=a,f=h,v=0;v>1),f=Math.max(1,f>>1),d+=g}return{mipmaps:c,width:a,height:h,internalFormat:s,compressed:!0,generateMipmap:!1}}},6143:(t,e,i)=>{var s=i(72632);t.exports=function(t,e,i,n,r,o,a){var h=s(a,"frameWidth",null),l=s(a,"frameHeight",h);if(null===h)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var u=t.source[e];t.add("__BASE",e,0,0,u.width,u.height);var c=s(a,"startFrame",0),d=s(a,"endFrame",-1),p=s(a,"margin",0),f=s(a,"spacing",0),v=Math.floor((r-p+f)/(h+f))*Math.floor((o-p+f)/(l+f));0===v&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",t.key),(c>v||c<-v)&&(c=0),c<0&&(c=v+c),(-1===d||d>v||dr&&(y=b-r),E>o&&(x=E-o),w>=c&&w<=d&&(t.add(T,e,i+g,n+m,h-y,l-x),T++),(g+=h+f)+h>r&&(g=p,m+=l+f)}return t}},20030:(t,e,i)=>{var s=i(72632);t.exports=function(t,e,i){var n=s(i,"frameWidth",null),r=s(i,"frameHeight",n);if(!n)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o=t.source[0];t.add("__BASE",0,0,0,o.width,o.height);var a,h=s(i,"startFrame",0),l=s(i,"endFrame",-1),u=s(i,"margin",0),c=s(i,"spacing",0),d=e.cutX,p=e.cutY,f=e.cutWidth,v=e.cutHeight,g=e.realWidth,m=e.realHeight,y=Math.floor((g-u+c)/(n+c)),x=Math.floor((m-u+c)/(r+c)),T=y*x,w=e.x,b=n-w,E=n-(g-f-w),S=e.y,A=r-S,_=r-(m-v-S);(h>T||h<-T)&&(h=0),h<0&&(h=T+h),-1!==l&&(T=h+(l+1));for(var C=u,M=u,R=0,P=e.sourceIndex,O=0;O{var e=0,i=function(t,i,s,n){var r=e-n.y-n.height;t.add(s,i,n.x,r,n.width,n.height)};t.exports=function(t,s,n){var r=t.source[s];t.add("__BASE",s,0,0,r.width,r.height),e=r.height;for(var o=n.split("\n"),a=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",l="",u={x:0,y:0,width:0,height:0},c=0;c{t.exports={AtlasXML:i(35082),Canvas:i(83332),Image:i(21560),JSONArray:i(64423),JSONHash:i(17264),KTXParser:i(67409),PVRParser:i(24904),SpriteSheet:i(6143),SpriteSheetFromAtlas:i(20030),UnityYAML:i(89187)}},93560:t=>{t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},97042:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s,n,r,o){(void 0===i||i<=0)&&(i=32),(void 0===s||s<=0)&&(s=32),void 0===n&&(n=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|s,this.imageMargin=0|n,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&t{var s=new(i(56694))({initialize:function(t){if(this.gids=[],void 0!==t)for(var e=0;e{var s=i(93560),n=i(16586),r=i(90715),o=i(89797);t.exports=function(t,e,i,a,h,l,u,c){void 0===i&&(i=32),void 0===a&&(a=32),void 0===h&&(h=10),void 0===l&&(l=10),void 0===c&&(c=!1);var d=null;if(Array.isArray(u))d=r(void 0!==e?e:"map",s.ARRAY_2D,u,i,a,c);else if(void 0!==e){var p=t.cache.tilemap.get(e);p?d=r(e,p.format,p.data,i,a,c):console.warn("No map data found for key "+e)}return null===d&&(d=new n({tileWidth:i,tileHeight:a,width:h,height:l})),new o(t,d)}},29633:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(12920),o=i(28699),a=i(66658),h=new s({Mixins:[n.Alpha,n.Flip,n.Visible],initialize:function(t,e,i,s,n,r,o,a){this.layer=t,this.index=e,this.x=i,this.y=s,this.width=n,this.height=r,this.right,this.bottom,this.baseWidth=void 0!==o?o:n,this.baseHeight=void 0!==a?a:r,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,this.collisionCallbackContext=this,this.tint=16777215,this.physics={}},containsPoint:function(t,e){return!(tthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=o(t.properties),this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldXY(this.x,this.y,void 0,t).x:this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldXY(this.x,this.y,void 0,t).y:this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new a),e.x=this.getLeft(t),e.y=this.getTop(t),e.width=this.getRight(t)-e.x,e.height=this.getBottom(t)-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},intersects:function(t,e,i,s){return!(i<=this.pixelX||s<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,s,n){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===s&&(s=t),void 0===n&&(n=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=s,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=s,n)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,s){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==s&&(this.baseHeight=s),this.updatePixelXY(),this},updatePixelXY:function(){var t=this.layer.orientation;if(t===r.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(t===r.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(t===r.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(t===r.HEXAGONAL){var e=this.layer.hexSideLength,i=(this.baseHeight-e)/2+e;this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*i}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||void 0!==this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=h},89797:(t,e,i)=>{var s=i(56694),n=i(75606),r=i(93560),o=i(72632),a=i(94990),h=i(46422),l=i(12920),u=i(52257),c=i(72677),d=i(13747),p=i(29633),f=i(5047),v=i(87177),g=i(47975),m=new s({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.renderOrder=e.renderOrder,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0,this.hexSideLength=e.hexSideLength;var i=this.orientation;this._convert={WorldToTileXY:f.GetWorldToTileXYFunction(i),WorldToTileX:f.GetWorldToTileXFunction(i),WorldToTileY:f.GetWorldToTileYFunction(i),TileToWorldXY:f.GetTileToWorldXYFunction(i),TileToWorldX:f.GetTileToWorldXFunction(i),TileToWorldY:f.GetTileToWorldYFunction(i),GetTileCorners:f.GetTileCornersFunction(i)}},setRenderOrder:function(t){var e=["right-down","left-down","right-up","left-up"];return"number"==typeof t&&(t=e[t]),e.indexOf(t)>-1&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,s,n,o,a){if(void 0===t)return null;if(null==e&&(e=t),!this.scene.sys.textures.exists(e))return console.warn("Invalid Tileset Image: "+e),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===r.TILED_JSON)return console.warn("No data found for Tileset: "+t),null;var u=this.tilesets[l];return u?(u.setTileSize(i,s),u.setSpacing(n,o),u.setImage(h),u):(void 0===i&&(i=this.tileWidth),void 0===s&&(s=this.tileHeight),void 0===n&&(n=0),void 0===o&&(o=0),void 0===a&&(a=0),(u=new g(t,a,i,s,n,o)).setImage(h),this.tilesets.push(u),u)},copy:function(t,e,i,s,n,r,o,a){return null!==(a=this.getLayer(a))?(f.Copy(t,e,i,s,n,r,o,a),this):null},createBlankLayer:function(t,e,i,s,n,r,o,h){if(void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=this.width),void 0===r&&(r=this.height),void 0===o&&(o=this.tileWidth),void 0===h&&(h=this.tileHeight),null!==this.getLayerIndex(t))return console.warn("Invalid Tilemap Layer ID: "+t),null;for(var l,u=new a({name:t,tileWidth:o,tileHeight:h,width:n,height:r,orientation:this.orientation}),c=0;c-1&&this.putTileAt(e,r.x,r.y,i,r.tilemapLayer)}return s},removeTileAt:function(t,e,i,s,n){return void 0===i&&(i=!0),void 0===s&&(s=!0),null===(n=this.getLayer(n))?null:f.RemoveTileAt(t,e,i,s,n)},removeTileAtWorldXY:function(t,e,i,s,n,r){return void 0===i&&(i=!0),void 0===s&&(s=!0),null===(r=this.getLayer(r))?null:f.RemoveTileAtWorldXY(t,e,i,s,n,r)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(this.orientation===l.ORTHOGONAL&&f.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,s=0;s{var s=i(99325),n=i(15043);s.register("tilemap",(function(t){var e=void 0!==t?t:{};return n(this.scene,e.key,e.tileWidth,e.tileHeight,e.width,e.height,e.data,e.insertNull)}))},37940:(t,e,i)=>{var s=i(61286),n=i(15043);s.register("tilemap",(function(t,e,i,s,r,o,a){return null===t&&(t=void 0),null===e&&(e=void 0),null===i&&(i=void 0),null===s&&(s=void 0),null===r&&(r=void 0),n(this.scene,t,e,i,s,r,o,a)}))},87177:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),o=i(5047),a=i(96193),h=i(93736),l=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.ComputedSize,n.Depth,n.Flip,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.Transform,n.Visible,n.ScrollFactor,a],initialize:function(t,e,i,s,n,a){r.call(this,t,"TilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],this.layer.tilemapLayer=this,this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=o.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new h,this.setTilesets(s),this.setAlpha(this.layer.alpha),this.setPosition(n,a),this.setOrigin(0,0),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.initPipeline()},setTilesets:function(t){var e=[],i=[],s=this.tilemap;Array.isArray(t)||(t=[t]);for(var n=0;n=0&&t<4&&(this._renderOrder=t),this},calculateFacesAt:function(t,e){return o.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,s){return o.CalculateFacesWithin(t,e,i,s,this.layer),this},createFromTiles:function(t,e,i,s,n){return o.CreateFromTiles(t,e,i,s,n,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,s,n,r,a){return o.Copy(t,e,i,s,n,r,a,this.layer),this},fill:function(t,e,i,s,n,r){return o.Fill(t,e,i,s,n,r,this.layer),this},filterTiles:function(t,e,i,s,n,r,a){return o.FilterTiles(t,e,i,s,n,r,a,this.layer)},findByIndex:function(t,e,i){return o.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,s,n,r,a){return o.FindTile(t,e,i,s,n,r,a,this.layer)},forEachTile:function(t,e,i,s,n,r,a){return o.ForEachTile(t,e,i,s,n,r,a,this.layer),this},setTint:function(t,e,i,s,n,r){void 0===t&&(t=16777215);return this.forEachTile((function(e){e.tint=t}),this,e,i,s,n,r)},getTileAt:function(t,e,i){return o.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,s){return o.GetTileAtWorldXY(t,e,i,s,this.layer)},getIsoTileAtWorldXY:function(t,e,i,s,n){void 0===i&&(i=!0);var r=this.tempVec;return o.IsometricWorldToTileXY(t,e,!0,r,n,this.layer,i),this.getTileAt(r.x,r.y,s)},getTilesWithin:function(t,e,i,s,n){return o.GetTilesWithin(t,e,i,s,n,this.layer)},getTilesWithinShape:function(t,e,i){return o.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,s,n,r){return o.GetTilesWithinWorldXY(t,e,i,s,n,r,this.layer)},hasTileAt:function(t,e){return o.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return o.HasTileAtWorldXY(t,e,i,this.layer)},putTileAt:function(t,e,i,s){return o.PutTileAt(t,e,i,s,this.layer)},putTileAtWorldXY:function(t,e,i,s,n){return o.PutTileAtWorldXY(t,e,i,s,n,this.layer)},putTilesAt:function(t,e,i,s){return o.PutTilesAt(t,e,i,s,this.layer),this},randomize:function(t,e,i,s,n){return o.Randomize(t,e,i,s,n,this.layer),this},removeTileAt:function(t,e,i,s){return o.RemoveTileAt(t,e,i,s,this.layer)},removeTileAtWorldXY:function(t,e,i,s,n){return o.RemoveTileAtWorldXY(t,e,i,s,n,this.layer)},renderDebug:function(t,e){return o.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,s,n,r){return o.ReplaceByIndex(t,e,i,s,n,r,this.layer),this},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this},setCollision:function(t,e,i,s){return o.SetCollision(t,e,i,this.layer,s),this},setCollisionBetween:function(t,e,i,s){return o.SetCollisionBetween(t,e,i,s,this.layer),this},setCollisionByProperty:function(t,e,i){return o.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return o.SetCollisionByExclusion(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return o.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileIndexCallback:function(t,e,i){return o.SetTileIndexCallback(t,e,i,this.layer),this},setTileLocationCallback:function(t,e,i,s,n,r){return o.SetTileLocationCallback(t,e,i,s,n,r,this.layer),this},shuffle:function(t,e,i,s){return o.Shuffle(t,e,i,s,this.layer),this},swapByIndex:function(t,e,i,s,n,r){return o.SwapByIndex(t,e,i,s,n,r,this.layer),this},tileToWorldX:function(t,e){return this.tilemap.tileToWorldX(t,e,this)},tileToWorldY:function(t,e){return this.tilemap.tileToWorldY(t,e,this)},tileToWorldXY:function(t,e,i,s){return this.tilemap.tileToWorldXY(t,e,i,s,this)},getTileCorners:function(t,e,i){return this.tilemap.getTileCorners(t,e,i,this)},weightedRandomize:function(t,e,i,s,n){return o.WeightedRandomize(e,i,s,n,t,this.layer),this},worldToTileX:function(t,e,i){return this.tilemap.worldToTileX(t,e,i,this)},worldToTileY:function(t,e,i){return this.tilemap.worldToTileY(t,e,i,this)},worldToTileXY:function(t,e,i,s,n){return this.tilemap.worldToTileXY(t,e,i,s,n,this)},destroy:function(t){void 0===t&&(t=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),t&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],r.prototype.destroy.call(this))}});t.exports=l},17394:(t,e,i)=>{var s=i(69360),n=new s,r=new s,o=new s;t.exports=function(t,e,i,s){var a=e.cull(i),h=a.length,l=i.alpha*e.alpha;if(!(0===h||l<=0)){var u=n,c=r,d=o;c.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),u.copyFrom(i.matrix);var p=t.currentContext,f=e.gidMap;p.save(),s?(u.multiplyWithOffset(s,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),c.e=e.x,c.f=e.y,u.multiply(c,d),d.copyToContext(p)):(c.e-=i.scrollX*e.scrollFactorX,c.f-=i.scrollY*e.scrollFactorY,c.copyToContext(p)),(!t.antialias||e.scaleX>1||e.scaleY>1)&&(p.imageSmoothingEnabled=!1);for(var v=0;v{var s=i(72283),n=s,r=s;n=i(51395),r=i(17394),t.exports={renderWebGL:n,renderCanvas:r}},51395:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i){var n=e.cull(i),r=n.length,o=i.alpha*e.alpha;if(!(0===r||o<=0)){var a=e.gidMap,h=t.pipelines.set(e.pipeline,e),l=s.getTintAppendFloatAlpha,u=e.scrollFactorX,c=e.scrollFactorY,d=e.x,p=e.y,f=e.scaleX,v=e.scaleY;t.pipelines.preBatch(e);for(var g=0;g{var s=i(56694),n=i(93736),r=new s({initialize:function(t,e,i,s,r,o,a,h,l){(void 0===i||i<=0)&&(i=32),(void 0===s||s<=0)&&(s=32),void 0===r&&(r=0),void 0===o&&(o=0),void 0===a&&(a={}),void 0===h&&(h={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=s,this.tileMargin=r,this.tileSpacing=o,this.tileProperties=a,this.tileData=h,this.tileOffset=new n,void 0!==l&&this.tileOffset.set(l.x,l.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t{var s=i(15494);t.exports=function(t,e,i){var n=s(t,e,!0,i),r=s(t,e-1,!0,i),o=s(t,e+1,!0,i),a=s(t-1,e,!0,i),h=s(t+1,e,!0,i),l=n&&n.collides;return l&&(n.faceTop=!0,n.faceBottom=!0,n.faceLeft=!0,n.faceRight=!0),r&&r.collides&&(l&&(n.faceTop=!1),r.faceBottom=!l),o&&o.collides&&(l&&(n.faceBottom=!1),o.faceTop=!l),a&&a.collides&&(l&&(n.faceLeft=!1),a.faceRight=!l),h&&h.collides&&(l&&(n.faceRight=!1),h.faceLeft=!l),n&&!n.collides&&n.resetFaces(),n}},60386:(t,e,i)=>{var s=i(15494),n=i(50811);t.exports=function(t,e,i,r,o){for(var a=null,h=null,l=null,u=null,c=n(t,e,i,r,null,o),d=0;d{var s=new(i(93736));t.exports=function(t,e,i,n){var r=i.tilemapLayer,o=r.cullPaddingX,a=r.cullPaddingY,h=r.tilemap.tileToWorldXY(t,e,s,n,r);return h.x>n.worldView.x+r.scaleX*i.tileWidth*(-o-.5)&&h.xn.worldView.y+r.scaleY*i.tileHeight*(-a-1)&&h.y{var s=i(60386),n=i(50811),r=i(62839),o=i(29633);t.exports=function(t,e,i,a,h,l,u,c){void 0===u&&(u=!0);var d=n(t,e,i,a,null,c),p=[];d.forEach((function(t){var e=new o(t.layer,t.index,t.x,t.y,t.width,t.height,t.baseWidth,t.baseHeight);e.copy(t),p.push(e)}));for(var f=h-t,v=l-e,g=0;g{var s=i(50811),n=i(51202);t.exports=function(t,e,i,r,o,a){i||(i={}),Array.isArray(t)||(t=[t]);var h=a.tilemapLayer;r||(r=h.scene),o||(o=r.cameras.main);var l,u=s(0,0,a.width,a.height,null,a),c=[];for(l=0;l{var s=i(74118),n=i(82127),r=i(84314),o=new s;t.exports=function(t,e){var i=t.tilemapLayer.tilemap,s=t.tilemapLayer,a=Math.floor(i.tileWidth*s.scaleX),h=Math.floor(i.tileHeight*s.scaleY),l=r(e.worldView.x-s.x,a,0,!0)-s.cullPaddingX,u=n(e.worldView.right-s.x,a,0,!0)+s.cullPaddingX,c=r(e.worldView.y-s.y,h,0,!0)-s.cullPaddingY,d=n(e.worldView.bottom-s.y,h,0,!0)+s.cullPaddingY;return o.setTo(l,c,u-l,d-c)}},381:(t,e,i)=>{var s=i(71586),n=i(6987);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var o=t.tilemapLayer,a=s(t,e);return(o.skipCull||1!==o.scrollFactorX||1!==o.scrollFactorY)&&(a.left=0,a.right=t.width,a.top=0,a.bottom=t.height),n(t,a,r,i),i}},97734:(t,e,i)=>{var s=i(50811),n=i(60386),r=i(68234);t.exports=function(t,e,i,o,a,h,l){for(var u=-1!==l.collideIndexes.indexOf(t),c=s(e,i,o,a,null,l),d=0;d{var s=i(50811);t.exports=function(t,e,i,n,r,o,a,h){return s(i,n,r,o,a,h).filter(t,e)}},37982:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=0),void 0===i&&(i=!1);var n,r,o,a=0;if(i){for(r=s.height-1;r>=0;r--)for(n=s.width-1;n>=0;n--)if((o=s.data[r][n])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;r{var s=i(50811);t.exports=function(t,e,i,n,r,o,a,h){return s(i,n,r,o,a,h).find(t,e)||null}},80916:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,n,r,o,a,h){s(i,n,r,o,a,h).forEach(t,e)}},31493:(t,e,i)=>{var s=i(12920),n=i(381),r=i(37524),o=i(20887),a=i(72283),h=i(19242);t.exports=function(t){return t===s.ORTHOGONAL?n:t===s.HEXAGONAL?r:t===s.STAGGERED?h:t===s.ISOMETRIC?o:a}},15494:(t,e,i)=>{var s=i(62839);t.exports=function(t,e,i,n){if(void 0===i&&(i=!1),s(t,e,n)){var r=n.data[e][t]||null;return r?-1===r.index?i?r:null:r:null}return null}},24640:(t,e,i)=>{var s=i(15494),n=new(i(93736));t.exports=function(t,e,i,r,o){return o.tilemapLayer.worldToTileXY(t,e,!0,n,r),s(n.x,n.y,i,o)}},48495:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n){var r=n.baseTileWidth,o=n.baseTileHeight,a=n.tilemapLayer,h=0,l=0;a&&(i||(i=a.scene.cameras.main),h=a.x+i.scrollX*(1-a.scrollFactorX),l=a.y+i.scrollY*(1-a.scrollFactorY),r*=a.scaleX,o*=a.scaleY);var u=h+t*r,c=l+e*o;return[new s(u,c),new s(u+r,c),new s(u+r,c+o),new s(u,c+o)]}},7160:(t,e,i)=>{var s=i(12920),n=i(63634),r=i(72283),o=i(48495);t.exports=function(t){return t===s.ORTHOGONAL?o:t===s.ISOMETRIC?r:t===s.HEXAGONAL?n:(s.STAGGERED,r)}},16884:(t,e,i)=>{var s=i(12920),n=i(72283),r=i(44150);t.exports=function(t){return t===s.ORTHOGONAL?r:n}},68182:(t,e,i)=>{var s=i(12920),n=i(21715),r=i(21808),o=i(72283),a=i(33388),h=i(46836);t.exports=function(t){return t===s.ORTHOGONAL?h:t===s.ISOMETRIC?r:t===s.HEXAGONAL?n:t===s.STAGGERED?a:o}},3752:(t,e,i)=>{var s=i(12920),n=i(72283),r=i(84132),o=i(42477);t.exports=function(t){return t===s.ORTHOGONAL?o:t===s.STAGGERED?r:n}},50811:(t,e,i)=>{var s=i(72632);t.exports=function(t,e,i,n,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=o.width),void 0===n&&(n=o.height),r||(r={});var a=s(r,"isNotEmpty",!1),h=s(r,"isColliding",!1),l=s(r,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(n+=e,e=0),t+i>o.width&&(i=Math.max(o.width-t,0)),e+n>o.height&&(n=Math.max(o.height-e,0));for(var u=[],c=e;c{var s=i(84068),n=i(50811),r=i(7563),o=i(72283),a=i(93736),h=function(t,e){return r.RectangleToTriangle(e,t)},l=new a,u=new a,c=new a;t.exports=function(t,e,i,a){if(void 0===t)return[];var d=o;t instanceof s.Circle?d=r.CircleToRectangle:t instanceof s.Rectangle?d=r.RectangleToRectangle:t instanceof s.Triangle?d=h:t instanceof s.Line&&(d=r.LineToRectangle),a.tilemapLayer.worldToTileXY(t.left,t.top,!0,u,i);var p=u.x,f=u.y;a.tilemapLayer.worldToTileXY(t.right,t.bottom,!1,c,i);var v=Math.ceil(c.x),g=Math.ceil(c.y),m=Math.max(v-p,1),y=Math.max(g-f,1),x=n(p,f,m,y,e,a),T=a.tileWidth,w=a.tileHeight;a.tilemapLayer&&(T*=a.tilemapLayer.scaleX,w*=a.tilemapLayer.scaleY);for(var b=[],E=new s.Rectangle(0,0,T,w),S=0;S{var s=i(50811),n=i(93736),r=new n,o=new n;t.exports=function(t,e,i,n,a,h,l){var u=l.tilemapLayer.tilemap._convert.WorldToTileXY;u(t,e,!0,r,h,l);var c=r.x,d=r.y;u(t+i,e+n,!1,o,h,l);var p=Math.ceil(o.x),f=Math.ceil(o.y);return s(c,d,p-c,f-d,a,l)}},29296:(t,e,i)=>{var s=i(12920),n=i(10618),r=i(806);t.exports=function(t){return t===s.ORTHOGONAL?r:n}},32688:(t,e,i)=>{var s=i(12920),n=i(11516),r=i(18750),o=i(72283),a=i(90562),h=i(45676);t.exports=function(t){return t===s.ORTHOGONAL?h:t===s.ISOMETRIC?r:t===s.HEXAGONAL?n:t===s.STAGGERED?a:o}},74326:(t,e,i)=>{var s=i(12920),n=i(10618),r=i(3689),o=i(70520);t.exports=function(t){return t===s.ORTHOGONAL?o:t===s.STAGGERED?r:n}},46598:(t,e,i)=>{var s=i(62839);t.exports=function(t,e,i){if(s(t,e,i)){var n=i.data[e][t];return null!==n&&n.index>-1}return!1}},28654:(t,e,i)=>{var s=i(46598),n=new(i(93736));t.exports=function(t,e,i,r){r.tilemapLayer.worldToTileXY(t,e,!0,n,i);var o=n.x,a=n.y;return s(o,a,r)}},6358:(t,e,i)=>{var s=i(82127),n=i(84314);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,r=t.tilemapLayer,o=Math.floor(i.tileWidth*r.scaleX),a=Math.floor(i.tileHeight*r.scaleY),h=t.hexSideLength,l=(a-h)/2+h;return{left:n(e.worldView.x-r.x,o,0,!0)-r.cullPaddingX,right:s(e.worldView.right-r.x,o,0,!0)+r.cullPaddingX,top:n(e.worldView.y-r.y,l,0,!0)-r.cullPaddingY,bottom:s(e.worldView.bottom-r.y,l,0,!0)+r.cullPaddingY}}},37524:(t,e,i)=>{var s=i(6358),n=i(6987);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var o=t.tilemapLayer;if(!o.skipCull&&1===o.scrollFactorX&&1===o.scrollFactorY){var a=s(t,e);n(t,a,r,i)}return i}},63634:(t,e,i)=>{var s=i(21715),n=i(93736),r=new n;t.exports=function(t,e,i,o){var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(a*=l.scaleX,h*=l.scaleY);for(var u=s(t,e,r,i,o),c=[],d=.5773502691896257*a,p=h/2,f=0;f<6;f++){var v=2*Math.PI*(.5-f)/6;c.push(new n(u.x+d*Math.cos(v),u.y+p*Math.sin(v)))}return c}},21715:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){i||(i=new s);var o=r.baseTileWidth,a=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(n||(n=h.scene.cameras.main),l=h.x+n.scrollX*(1-h.scrollFactorX),u=h.y+n.scrollY*(1-h.scrollFactorY),o*=h.scaleX,a*=h.scaleY);var c=a/2,d=l+o*t+o,p=u+1.5*e*c+c;return e%2==0&&(d-=o/2),i.set(d,p)}},11516:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,o){n||(n=new s);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(r||(r=l.scene.cameras.main),t-=l.x+r.scrollX*(1-l.scrollFactorX),e-=l.y+r.scrollY*(1-l.scrollFactorY),a*=l.scaleX,h*=l.scaleY);var u=.5773502691896257,c=h/2,d=(t-a/2)/(u*a),p=(e-c)/c,f=u*d+-.3333333333333333*p,v=0*d+.6666666666666666*p,g=-f-v,m=Math.round(f),y=Math.round(v),x=Math.round(g),T=Math.abs(m-f),w=Math.abs(y-v),b=Math.abs(x-g);T>w&&T>b?m=-y-x:w>b&&(y=-m-x);var E=y,S=E%2==0?y/2+m:y/2+m-.5;return n.set(S,E)}},62839:t=>{t.exports=function(t,e,i){return t>=0&&t=0&&e{var s=i(13125);t.exports=function(t,e,i,n){void 0===i&&(i=[]),void 0===n&&(n=0),i.length=0;var r,o,a,h=t.tilemapLayer,l=t.data,u=t.width,c=t.height,d=u,p=c;if(!h.skipCull)if(0===n){for(o=0;o=0;r--)if(s(r,o,t,e)){if(!(a=l[o][r])||-1===a.index||!a.visible||0===a.alpha)continue;i.push(a)}}else if(2===n){for(o=p;o>=0;o--)for(r=0;l[o]&&r=0;o--)for(r=d;l[o]&&r>=0;r--)if(s(r,o,t,e)){if(!(a=l[o][r])||-1===a.index||!a.visible||0===a.alpha)continue;i.push(a)}return h.tilesDrawn=i.length,h.tilesTotal=u*c,i}},21808:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){i||(i=new s);var o=r.baseTileWidth,a=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(n||(n=h.scene.cameras.main),l=h.x+n.scrollX*(1-h.scrollFactorX),o*=h.scaleX,u=h.y+n.scrollY*(1-h.scrollFactorY),a*=h.scaleY);var c=l+o/2*(t-e),d=u+(t+e)*(a/2);return i.set(c,d)}},18750:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,o,a){n||(n=new s);var h=o.baseTileWidth,l=o.baseTileHeight,u=o.tilemapLayer;u&&(r||(r=u.scene.cameras.main),e-=u.y+r.scrollY*(1-u.scrollFactorY),l*=u.scaleY,t-=u.x+r.scrollX*(1-u.scrollFactorX),h*=u.scaleX);var c=h/2,d=l/2;a||(e-=l);var p=.5*((t-=c)/c+e/d),f=.5*(-t/c+e/d);return i&&(p=Math.floor(p),f=Math.floor(f)),n.set(p,f)}},29003:(t,e,i)=>{var s=i(29633),n=i(62839),r=i(92839),o=i(68234),a=i(14556);t.exports=function(t,e,i,h,l){if(void 0===h&&(h=!0),!n(e,i,l))return null;var u,c=l.data[i][e],d=c&&c.collides;t instanceof s?(null===l.data[i][e]&&(l.data[i][e]=new s(l,t.index,e,i,l.tileWidth,l.tileHeight)),l.data[i][e].copy(t)):(u=t,null===l.data[i][e]?l.data[i][e]=new s(l,u,e,i,l.tileWidth,l.tileHeight):l.data[i][e].index=u);var p=l.data[i][e],f=-1!==l.collideIndexes.indexOf(p.index),v=a(l.tilemapLayer.tilemap)[u=t instanceof s?t.index:t][2],g=l.tilemapLayer.tileset[v];return p.width=g.tileWidth,p.height=g.tileHeight,o(p,f),h&&d!==p.collides&&r(e,i,l),p}},48565:(t,e,i)=>{var s=i(29003),n=new(i(93736));t.exports=function(t,e,i,r,o,a){return a.tilemapLayer.worldToTileXY(e,i,!0,n,o,a),s(t,n.x,n.y,r,a)}},56547:(t,e,i)=>{var s=i(60386),n=i(29003);t.exports=function(t,e,i,r,o){if(void 0===r&&(r=!0),!Array.isArray(t))return null;Array.isArray(t[0])||(t=[t]);for(var a=t.length,h=t[0].length,l=0;l{var s=i(50811),n=i(72861);t.exports=function(t,e,i,r,o,a){var h,l=s(t,e,i,r,{},a);if(!o)for(o=[],h=0;h{var s=i(29633),n=i(62839),r=i(92839);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!0),void 0===o&&(o=!0),!n(t,e,a))return null;var h=a.data[e][t];return h?(a.data[e][t]=i?null:new s(a,-1,t,e,a.tileWidth,a.tileHeight),o&&h&&h.collides&&r(t,e,a),h):null}},17384:(t,e,i)=>{var s=i(929),n=new(i(93736));t.exports=function(t,e,i,r,o,a){return a.tilemapLayer.worldToTileXY(t,e,!0,n,o,a),s(n.x,n.y,i,r,a)}},93763:(t,e,i)=>{var s=i(50811),n=i(95509),r=new n(105,210,231,150),o=new n(243,134,48,200),a=new n(40,39,37,150);t.exports=function(t,e,i){void 0===e&&(e={});var n=void 0!==e.tileColor?e.tileColor:r,h=void 0!==e.collidingTileColor?e.collidingTileColor:o,l=void 0!==e.faceColor?e.faceColor:a,u=s(0,0,i.width,i.height,null,i);t.translateCanvas(i.tilemapLayer.x,i.tilemapLayer.y),t.scaleCanvas(i.tilemapLayer.scaleX,i.tilemapLayer.scaleY);for(var c=0;c{var s=i(50811);t.exports=function(t,e,i,n,r,o,a){for(var h=s(i,n,r,o,null,a),l=0;l{t.exports=function(t,e,i,s){var n,r,o,a=t.data,h=t.width,l=t.height,u=t.tilemapLayer,c=Math.max(0,e.left),d=Math.min(h,e.right),p=Math.max(0,e.top),f=Math.min(l,e.bottom);if(0===i)for(r=p;r=c;n--)(o=a[r][n])&&-1!==o.index&&o.visible&&0!==o.alpha&&s.push(o);else if(2===i)for(r=f;r>=p;r--)for(n=c;a[r]&&n=p;r--)for(n=d;a[r]&&n>=c;n--)(o=a[r][n])&&-1!==o.index&&o.visible&&0!==o.alpha&&s.push(o);return u.tilesDrawn=s.length,u.tilesTotal=h*l,s}},51710:(t,e,i)=>{var s=i(68234),n=i(60386),r=i(91181);t.exports=function(t,e,i,o,a){void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===a&&(a=!0),Array.isArray(t)||(t=[t]);for(var h=0;h{var s=i(68234),n=i(60386),r=i(91181);t.exports=function(t,e,i,o,a,h){if(void 0===i&&(i=!0),void 0===o&&(o=!0),void 0===h&&(h=!0),!(t>e)){for(var l=t;l<=e;l++)r(l,i,a);if(h)for(var u=0;u=t&&d.index<=e&&s(d,i)}o&&n(0,0,a.width,a.height,a)}}},33158:(t,e,i)=>{var s=i(68234),n=i(60386),r=i(91181);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a{var s=i(68234),n=i(60386),r=i(19256);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0);for(var a=0;a{var s=i(68234),n=i(60386);t.exports=function(t,e,i){void 0===t&&(t=!0),void 0===e&&(e=!0);for(var r=0;r0&&s(a,t)}}e&&n(0,0,i.width,i.height,i)}},91181:t=>{t.exports=function(t,e,i){var s=i.collideIndexes.indexOf(t);e&&-1===s?i.collideIndexes.push(t):e||-1===s||i.collideIndexes.splice(s,1)}},68234:t=>{t.exports=function(t,e){e?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)}},11628:t=>{t.exports=function(t,e,i,s){if("number"==typeof t)s.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var n=0,r=t.length;n{var s=i(50811);t.exports=function(t,e,i,n,r,o,a){for(var h=s(t,e,i,n,null,a),l=0;l{var s=i(50811),n=i(18592);t.exports=function(t,e,i,r,o){var a=s(t,e,i,r,null,o),h=a.map((function(t){return t.index}));n(h);for(var l=0;l{var s=i(82127),n=i(84314);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,r=t.tilemapLayer,o=Math.floor(i.tileWidth*r.scaleX),a=Math.floor(i.tileHeight*r.scaleY);return{left:n(e.worldView.x-r.x,o,0,!0)-r.cullPaddingX,right:s(e.worldView.right-r.x,o,0,!0)+r.cullPaddingX,top:n(e.worldView.y-r.y,a/2,0,!0)-r.cullPaddingY,bottom:s(e.worldView.bottom-r.y,a/2,0,!0)+r.cullPaddingY}}},19242:(t,e,i)=>{var s=i(53945),n=i(6987);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var o=t.tilemapLayer;if(!o.skipCull&&1===o.scrollFactorX&&1===o.scrollFactorY){var a=s(t,e);n(t,a,r,i)}return i}},33388:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){i||(i=new s);var o=r.baseTileWidth,a=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(n||(n=h.scene.cameras.main),l=h.x+n.scrollX*(1-h.scrollFactorX),o*=h.scaleX,u=h.y+n.scrollY*(1-h.scrollFactorY),a*=h.scaleY);var c=l+t*o+e%2*(o/2),d=u+e*(a/2);return i.set(c,d)}},84132:t=>{t.exports=function(t,e,i){var s=i.baseTileHeight,n=i.tilemapLayer,r=0;return n&&(void 0===e&&(e=n.scene.cameras.main),r=n.y+e.scrollY*(1-n.scrollFactorY),s*=n.scaleY),r+t*(s/2)+s}},90562:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,o){n||(n=new s);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(r||(r=l.scene.cameras.main),e-=l.y+r.scrollY*(1-l.scrollFactorY),h*=l.scaleY,t-=l.x+r.scrollX*(1-l.scrollFactorX),a*=l.scaleX);var u=i?Math.floor(e/(h/2)):e/(h/2),c=i?Math.floor((t+u%2*.5*a)/a):(t+u%2*.5*a)/a;return n.set(c,u)}},3689:t=>{t.exports=function(t,e,i,s){var n=s.baseTileHeight,r=s.tilemapLayer;return r&&(i||(i=r.scene.cameras.main),t-=r.y+i.scrollY*(1-r.scrollFactorY),n*=r.scaleY),e?Math.floor(t/(n/2)):t/(n/2)}},55217:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,n,r,o,a){for(var h=s(i,n,r,o,null,a),l=0;l{t.exports=function(t,e,i){var s=i.baseTileWidth,n=i.tilemapLayer,r=0;return n&&(e||(e=n.scene.cameras.main),r=n.x+e.scrollX*(1-n.scrollFactorX),s*=n.scaleX),r+t*s}},46836:(t,e,i)=>{var s=i(44150),n=i(42477),r=i(93736);t.exports=function(t,e,i,o,a){return i||(i=new r(0,0)),i.x=s(t,o,a),i.y=n(e,o,a),i}},42477:t=>{t.exports=function(t,e,i){var s=i.baseTileHeight,n=i.tilemapLayer,r=0;return n&&(e||(e=n.scene.cameras.main),r=n.y+e.scrollY*(1-n.scrollFactorY),s*=n.scaleY),r+t*s}},39677:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,n,r,o){if(r){var a,h=s(t,e,i,n,null,o),l=0;for(a=0;a{var s=i(45676),n=new(i(93736));t.exports=function(t,e,i,r){return s(t,0,e,n,i,r),n.x}},45676:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,o){void 0===i&&(i=!0),n||(n=new s);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(r||(r=l.scene.cameras.main),t-=l.x+r.scrollX*(1-l.scrollFactorX),e-=l.y+r.scrollY*(1-l.scrollFactorY),a*=l.scaleX,h*=l.scaleY);var u=t/a,c=e/h;return i&&(u=Math.floor(u),c=Math.floor(c)),n.set(u,c)}},70520:(t,e,i)=>{var s=i(45676),n=new(i(93736));t.exports=function(t,e,i,r){return s(0,t,e,n,i,r),n.y}},5047:(t,e,i)=>{t.exports={CalculateFacesAt:i(92839),CalculateFacesWithin:i(60386),CheckIsoBounds:i(13125),Copy:i(17347),CreateFromTiles:i(93604),CullBounds:i(71586),CullTiles:i(381),Fill:i(97734),FilterTiles:i(63555),FindByIndex:i(37982),FindTile:i(48297),ForEachTile:i(80916),GetCullTilesFunction:i(31493),GetTileAt:i(15494),GetTileAtWorldXY:i(24640),GetTileCorners:i(48495),GetTileCornersFunction:i(7160),GetTilesWithin:i(50811),GetTilesWithinShape:i(31674),GetTilesWithinWorldXY:i(44662),GetTileToWorldXFunction:i(16884),GetTileToWorldXYFunction:i(68182),GetTileToWorldYFunction:i(3752),GetWorldToTileXFunction:i(29296),GetWorldToTileXYFunction:i(32688),GetWorldToTileYFunction:i(74326),HasTileAt:i(46598),HasTileAtWorldXY:i(28654),HexagonalCullBounds:i(6358),HexagonalCullTiles:i(37524),HexagonalGetTileCorners:i(63634),HexagonalTileToWorldXY:i(21715),HexagonalWorldToTileXY:i(11516),IsInLayerBounds:i(62839),IsometricCullTiles:i(20887),IsometricTileToWorldXY:i(21808),IsometricWorldToTileXY:i(18750),PutTileAt:i(29003),PutTileAtWorldXY:i(48565),PutTilesAt:i(56547),Randomize:i(91180),RemoveTileAt:i(929),RemoveTileAtWorldXY:i(17384),RenderDebug:i(93763),ReplaceByIndex:i(51202),RunCull:i(6987),SetCollision:i(51710),SetCollisionBetween:i(15216),SetCollisionByExclusion:i(33158),SetCollisionByProperty:i(4180),SetCollisionFromCollisionGroup:i(18625),SetLayerCollisionIndex:i(91181),SetTileCollision:i(68234),SetTileIndexCallback:i(11628),SetTileLocationCallback:i(72732),Shuffle:i(34397),StaggeredCullBounds:i(53945),StaggeredCullTiles:i(19242),StaggeredTileToWorldXY:i(33388),StaggeredTileToWorldY:i(84132),StaggeredWorldToTileXY:i(90562),StaggeredWorldToTileY:i(3689),SwapByIndex:i(55217),TileToWorldX:i(44150),TileToWorldXY:i(46836),TileToWorldY:i(42477),WeightedRandomize:i(39677),WorldToTileX:i(806),WorldToTileXY:i(45676),WorldToTileY:i(70520)}},12920:t=>{t.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},84758:(t,e,i)=>{var s={ORIENTATION:i(12920)};t.exports=s},52678:(t,e,i)=>{var s=i(98611),n=i(84758),r={Components:i(5047),Parsers:i(34124),Formats:i(93560),ImageCollection:i(97042),ParseToTilemap:i(15043),Tile:i(29633),Tilemap:i(89797),TilemapCreator:i(4843),TilemapFactory:i(37940),Tileset:i(47975),TilemapLayer:i(87177),Orientation:i(12920),LayerData:i(94990),MapData:i(16586),ObjectLayer:i(15256)};r=s(!1,r,n.ORIENTATION),t.exports=r},94990:(t,e,i)=>{var s=i(56694),n=i(12920),r=i(72632),o=new s({initialize:function(t){void 0===t&&(t={}),this.name=r(t,"name","layer"),this.x=r(t,"x",0),this.y=r(t,"y",0),this.width=r(t,"width",0),this.height=r(t,"height",0),this.tileWidth=r(t,"tileWidth",0),this.tileHeight=r(t,"tileHeight",0),this.baseTileWidth=r(t,"baseTileWidth",this.tileWidth),this.baseTileHeight=r(t,"baseTileHeight",this.tileHeight),this.orientation=r(t,"orientation",n.ORTHOGONAL),this.widthInPixels=r(t,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=r(t,"heightInPixels",this.height*this.baseTileHeight),this.alpha=r(t,"alpha",1),this.visible=r(t,"visible",!0),this.properties=r(t,"properties",[]),this.indexes=r(t,"indexes",[]),this.collideIndexes=r(t,"collideIndexes",[]),this.callbacks=r(t,"callbacks",[]),this.bodies=r(t,"bodies",[]),this.data=r(t,"data",[]),this.tilemapLayer=r(t,"tilemapLayer",null),this.hexSideLength=r(t,"hexSideLength",0)}});t.exports=o},16586:(t,e,i)=>{var s=i(56694),n=i(12920),r=i(72632),o=new s({initialize:function(t){void 0===t&&(t={}),this.name=r(t,"name","map"),this.width=r(t,"width",0),this.height=r(t,"height",0),this.infinite=r(t,"infinite",!1),this.tileWidth=r(t,"tileWidth",0),this.tileHeight=r(t,"tileHeight",0),this.widthInPixels=r(t,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=r(t,"heightInPixels",this.height*this.tileHeight),this.format=r(t,"format",null),this.orientation=r(t,"orientation",n.ORTHOGONAL),this.renderOrder=r(t,"renderOrder","right-down"),this.version=r(t,"version","1"),this.properties=r(t,"properties",{}),this.layers=r(t,"layers",[]),this.images=r(t,"images",[]),this.objects=r(t,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=r(t,"collision",{}),this.tilesets=r(t,"tilesets",[]),this.imageCollections=r(t,"imageCollections",[]),this.tiles=r(t,"tiles",[]),this.hexSideLength=r(t,"hexSideLength",0),this.staggerAxis=r(t,"staggerAxis","y"),this.staggerIndex=r(t,"staggerIndex","odd")}});t.exports=o},15256:(t,e,i)=>{var s=i(56694),n=i(72632),r=new s({initialize:function(t){void 0===t&&(t={}),this.name=n(t,"name","object layer"),this.opacity=n(t,"opacity",1),this.properties=n(t,"properties",{}),this.propertyTypes=n(t,"propertytypes",{}),this.type=n(t,"type","objectgroup"),this.visible=n(t,"visible",!0),this.objects=n(t,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});t.exports=r},21394:(t,e,i)=>{var s=i(12920);t.exports=function(t){return"isometric"===(t=t.toLowerCase())?s.ISOMETRIC:"staggered"===t?s.STAGGERED:"hexagonal"===t?s.HEXAGONAL:s.ORTHOGONAL}},90715:(t,e,i)=>{var s=i(93560),n=i(84346),r=i(96097),o=i(2378),a=i(44909);t.exports=function(t,e,i,h,l,u){var c;switch(e){case s.ARRAY_2D:c=n(t,i,h,l,u);break;case s.CSV:c=r(t,i,h,l,u);break;case s.TILED_JSON:c=o(t,i,u);break;case s.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},84346:(t,e,i)=>{var s=i(93560),n=i(94990),r=i(16586),o=i(29633);t.exports=function(t,e,i,a,h){for(var l=new n({tileWidth:i,tileHeight:a}),u=new r({name:t,tileWidth:i,tileHeight:a,format:s.ARRAY_2D,layers:[l]}),c=[],d=e.length,p=0,f=0;f{var s=i(93560),n=i(84346);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map((function(t){return t.split(",")})),h=n(t,a,i,r,o);return h.format=s.CSV,h}},30951:(t,e,i)=>{var s=i(94990),n=i(29633);t.exports=function(t,e){for(var i=[],r=0;r-1?new n(a,p,c,u,o.tilesize,o.tilesize):e?null:new n(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},47488:(t,e,i)=>{var s=i(47975);t.exports=function(t){for(var e=[],i=[],n=0;n{var s=i(93560),n=i(16586),r=i(30951),o=i(47488);t.exports=function(t,e,i){if(0===e.layer.length)return console.warn("No layers found in the Weltmeister map: "+t),null;for(var a=0,h=0,l=0;la&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new n({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:s.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},24507:(t,e,i)=>{t.exports={ParseTileLayers:i(30951),ParseTilesets:i(47488),ParseWeltmeister:i(44909)}},34124:(t,e,i)=>{t.exports={FromOrientationString:i(21394),Parse:i(90715),Parse2DArray:i(84346),ParseCSV:i(96097),Impact:i(24507),Tiled:i(50044)}},48646:(t,e,i)=>{var s=i(98611);t.exports=function(t){for(var e,i,n,r,o,a=0;a{t.exports=function(t){for(var e=window.atob(t),i=e.length,s=new Array(i/4),n=0;n>>0;return s}},14556:(t,e,i)=>{var s=i(47975);t.exports=function(t){var e,i,n=[];for(e=0;e{var s=i(72632);t.exports=function(t,e,i){if(!e)return{i:0,layers:t.layers,name:"",opacity:1,visible:!0,x:0,y:0};var n=e.x+s(e,"startx",0)*t.tilewidth+s(e,"offsetx",0),r=e.y+s(e,"starty",0)*t.tileheight+s(e,"offsety",0);return{i:0,layers:e.layers,name:i.name+e.name+"/",opacity:i.opacity*e.opacity,visible:i.visible&&e.visible,x:i.x+n,y:i.y+r}}},8847:t=>{var e=2147483648,i=1073741824,s=536870912;t.exports=function(t){var n=Boolean(t&e),r=Boolean(t&i),o=Boolean(t&s);t&=536870911;var a=0,h=!1;return n&&r&&o?(a=Math.PI/2,h=!0):n&&r&&!o?(a=Math.PI,h=!1):n&&!r&&o?(a=Math.PI/2,h=!1):!n||r||o?!n&&r&&o?(a=3*Math.PI/2,h=!1):n||!r||o?n||r||!o?n||r||o||(a=0,h=!1):(a=3*Math.PI/2,h=!0):(a=Math.PI,h=!0):(a=0,h=!0),{gid:t,flippedHorizontal:n,flippedVertical:r,flippedAntiDiagonal:o,rotation:a,flipped:h}}},78339:(t,e,i)=>{var s=i(72632),n=i(92044);t.exports=function(t){for(var e=[],i=[],r=n(t);r.i0;)if(r.i>=r.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=i.pop()}else{var o=r.layers[r.i];if(r.i++,"imagelayer"===o.type){var a=s(o,"offsetx",0)+s(o,"startx",0),h=s(o,"offsety",0)+s(o,"starty",0);e.push({name:r.name+o.name,image:o.image,x:r.x+a+o.x,y:r.y+h+o.y,alpha:r.opacity*o.opacity,visible:r.visible&&o.visible,properties:s(o,"properties",{})})}else if("group"===o.type){var l=n(t,o,r);i.push(r),r=l}}return e}},2378:(t,e,i)=>{var s=i(48646),n=i(14556),r=i(12920),o=i(28699),a=i(93560),h=i(21394),l=i(16586),u=i(78339),c=i(61136),d=i(95925),p=i(93392);t.exports=function(t,e,i){var f=o(e),v=new l({width:f.width,height:f.height,name:t,tileWidth:f.tilewidth,tileHeight:f.tileheight,orientation:h(f.orientation),format:a.TILED_JSON,version:f.version,properties:f.properties,renderOrder:f.renderorder,infinite:f.infinite});v.orientation===r.HEXAGONAL&&(v.hexSideLength=f.hexsidelength,v.staggerAxis=f.staggeraxis,v.staggerIndex=f.staggerindex),v.layers=d(f,i),v.images=u(f);var g=p(f);return v.tilesets=g.tilesets,v.imageCollections=g.imageCollections,v.objects=c(f),v.tiles=n(v),s(v),v}},4281:(t,e,i)=>{var s=i(28820),n=i(8847),r=function(t){return{x:t.x,y:t.y}},o=["id","name","type","rotation","properties","visible","x","y","width","height"];t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var a=s(t,o);if(a.x+=e,a.y+=i,t.gid){var h=n(t.gid);a.gid=h.gid,a.flippedHorizontal=h.flippedHorizontal,a.flippedVertical=h.flippedVertical,a.flippedAntiDiagonal=h.flippedAntiDiagonal}else t.polyline?a.polyline=t.polyline.map(r):t.polygon?a.polygon=t.polygon.map(r):t.ellipse?a.ellipse=t.ellipse:t.text?a.text=t.text:t.point?a.point=!0:a.rectangle=!0;return a}},61136:(t,e,i)=>{var s=i(72632),n=i(4281),r=i(15256),o=i(92044);t.exports=function(t){for(var e=[],i=[],a=o(t);a.i0;)if(a.i>=a.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}a=i.pop()}else{var h=a.layers[a.i];if(a.i++,h.opacity*=a.opacity,h.visible=a.visible&&h.visible,"objectgroup"===h.type){h.name=a.name+h.name;for(var l=a.x+s(h,"startx",0)+s(h,"offsetx",0),u=a.y+s(h,"starty",0)+s(h,"offsety",0),c=[],d=0;d{var s=i(43908),n=i(12920),r=i(92044),o=i(21394),a=i(72632),h=i(94990),l=i(8847),u=i(29633);t.exports=function(t,e){for(var i=a(t,"infinite",!1),c=[],d=[],p=r(t);p.i0;)if(p.i>=p.layers.length){if(d.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}p=d.pop()}else{var f=p.layers[p.i];if(p.i++,"tilelayer"===f.type)if(f.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+f.name+"'");else{if(f.encoding&&"base64"===f.encoding){if(f.chunks)for(var v=0;v0?((y=new u(g,m.gid,L,F,t.tilewidth,t.tileheight)).rotation=m.rotation,y.flipX=m.flipped,T[F][L]=y):(x=e?null:new u(g,-1,L,F,t.tilewidth,t.tileheight),T[F][L]=x),++w===_.width&&(R++,w=0)}}else{(g=new h({name:p.name+f.name,x:p.x+a(f,"offsetx",0)+f.x,y:p.y+a(f,"offsety",0)+f.y,width:f.width,height:f.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:p.opacity*f.opacity,visible:p.visible&&f.visible,properties:a(f,"properties",[]),orientation:o(t.orientation)})).orientation===n.HEXAGONAL&&(g.hexSideLength=t.hexsidelength);for(var D=[],k=0,I=f.data.length;k0?((y=new u(g,m.gid,w,T.length,t.tilewidth,t.tileheight)).rotation=m.rotation,y.flipX=m.flipped,D.push(y)):(x=e?null:new u(g,-1,w,T.length,t.tilewidth,t.tileheight),D.push(x)),++w===f.width&&(T.push(D),w=0,D=[])}g.data=T,c.push(g)}else if("group"===f.type){var B=r(t,f,p);d.push(p),p=B}}return c}},93392:(t,e,i)=>{var s=i(47975),n=i(97042),r=i(4281),o=i(39642);t.exports=function(t){for(var e,i=[],a=[],h=null,l=0;l1){var d=void 0,p=void 0;if(Array.isArray(u.tiles)){d=d||{},p=p||{};for(var f=0;f{t.exports=function(t,e){for(var i=0;i0){var r,o,a,h={},l={};if(Array.isArray(s.edgecolors))for(r=0;r{t.exports={AssignTileProperties:i(48646),Base64Decode:i(43908),BuildTilesetIndex:i(14556),CreateGroupLayer:i(92044),ParseGID:i(8847),ParseImageLayers:i(78339),ParseJSONTiled:i(2378),ParseObject:i(4281),ParseObjectLayers:i(61136),ParseTileLayers:i(95925),ParseTilesets:i(93392)}},73779:(t,e,i)=>{var s=i(56694),n=i(91963),r=i(7599),o=i(57911),a=i(66458),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.now=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(r.PRE_UPDATE,this.preUpdate,this),t.on(r.UPDATE,this.update,this),t.once(r.SHUTDOWN,this.shutdown,this)},addEvent:function(t){var e;return t instanceof o?(e=t,this.removeEvent(e),e.elapsed=e.startAt,e.hasDispatched=!1,e.repeatCount=-1===e.repeat||e.loop?999999999999:e.repeat):e=new o(t),this._pendingInsertion.push(e),e},delayedCall:function(t,e,i,s){return this.addEvent({delay:t,callback:e,args:i,callbackScope:s})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e-1&&this._active.splice(n,1),s.destroy()}for(i=0;i=s.delay)){var n=s.elapsed-s.delay;if(s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),s.repeatCount>0){if(s.repeatCount--,n>=s.delay)for(;n>=s.delay&&s.repeatCount>0;)s.callback&&s.callback.apply(s.callbackScope,s.args),n-=s.delay,s.repeatCount--;s.elapsed=n,s.hasDispatched=!1}else s.hasDispatched&&this._pendingRemoval.push(s)}}}},shutdown:function(){var t;for(t=0;t{var s=i(56694),n=i(72632),r=new s({initialize:function(t){this.delay=0,this.repeat=0,this.repeatCount=0,this.loop=!1,this.callback,this.callbackScope,this.args,this.timeScale=1,this.startAt=0,this.elapsed=0,this.paused=!1,this.hasDispatched=!1,this.reset(t)},reset:function(t){if(this.delay=n(t,"delay",0),this.repeat=n(t,"repeat",0),this.loop=n(t,"loop",!1),this.callback=n(t,"callback",void 0),this.callbackScope=n(t,"callbackScope",this.callback),this.args=n(t,"args",[]),this.timeScale=n(t,"timeScale",1),this.startAt=n(t,"startAt",0),this.paused=n(t,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=-1===this.repeat||this.loop?999999999999:this.repeat,0===this.delay&&(this.repeat>0||this.loop))throw new Error("TimerEvent infinite loop created via zero delay");return this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return.001*this.getRemaining()},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return.001*this.getOverallRemaining()},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},97121:(t,e,i)=>{t.exports={Clock:i(73779),TimerEvent:i(57911)}},64532:(t,e,i)=>{var s=i(66458),n=i(56694),r=i(5454),o=i(68710),a=i(91963),h=i(7599),l=i(91944),u=i(39366),c=i(68061),d=i(45641),p=i(56034),f=new n({initialize:function(t){this.scene=t,this.events=t.sys.events,this.timeScale=1,this.paused=!1,this.processing=!1,this.tweens=[],this.time=0,this.startTime=0,this.nextTime=0,this.prevTime=0,this.maxLag=500,this.lagSkip=33,this.gap=1e3/240,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.events.once(h.DESTROY,this.destroy,this)},start:function(){this.timeScale=1,this.paused=!1,this.startTime=Date.now(),this.prevTime=this.startTime,this.nextTime=this.gap,this.events.on(h.UPDATE,this.update,this),this.events.once(h.SHUTDOWN,this.shutdown,this)},create:function(t){Array.isArray(t)||(t=[t]);for(var e=[],i=0;i-1},existing:function(t){return this.has(t)||this.tweens.push(t.reset()),this},addCounter:function(t){var e=o(this,t);return this.tweens.push(e.reset()),e},stagger:function(t,e){return l(t,e)},setLagSmooth:function(t,e){return void 0===t&&(t=1/1e-8),void 0===e&&(e=0),this.maxLag=t,this.lagSkip=Math.min(e,this.maxLag),this},setFps:function(t){return void 0===t&&(t=240),this.gap=1e3/t,this.nextTime=1e3*this.time+this.gap,this},getDelta:function(t){var e=Date.now()-this.prevTime;e>this.maxLag&&(this.startTime+=e-this.lagSkip),this.prevTime+=e;var i=this.prevTime-this.startTime,s=i-this.nextTime,n=i-1e3*this.time;return s>0||t?(i/=1e3,this.time=i,this.nextTime+=s+(s>=this.gap?4:this.gap-s)):n=0,n},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(t){void 0===t&&(t=!1);var e=this.getDelta(t);if(!(e<=0)){var i,s;this.processing=!0;var n=[],r=this.tweens;for(i=0;i0){for(i=0;i-1&&(s.isPendingRemove()||s.isDestroyed())&&(r.splice(a,1),s.destroy())}n.length=0}this.processing=!1}},remove:function(t){return this.processing?t.setPendingRemoveState():(s(this.tweens,t),t.setRemovedState()),this},reset:function(t){return this.existing(t),t.seek(),t.setActiveState(),this},makeActive:function(t){return this.existing(t),t.setActiveState(),this},each:function(t,e){var i,s=[null];for(i=1;i{t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},21902:(t,e,i)=>{var s=i(35060),n=i(40587);t.exports=function(t,e){var i=s.Power0;if("string"==typeof t)if(s.hasOwnProperty(t))i=s[t];else{var r="";if(t.indexOf(".")){var o=(r=t.substring(t.indexOf(".")+1)).toLowerCase();"in"===o?r="easeIn":"out"===o?r="easeOut":"inout"===o&&(r="easeInOut")}t=n(t.substring(0,t.indexOf(".")+1)+r),s.hasOwnProperty(t)&&(i=s[t])}else"function"==typeof t&&(i=t);if(!e)return i;var a=e.slice(0);return a.unshift(0),function(t){return a[0]=t,i.apply(this,a)}}},4840:(t,e,i)=>{var s=i(63210),n=i(88332),r={bezier:s,catmull:n,catmullrom:n,linear:i(47614)};t.exports=function(t){if(null===t)return null;var e=r.linear;return"string"==typeof t?r.hasOwnProperty(t)&&(e=r[t]):"function"==typeof t&&(e=t),e}},28348:t=>{t.exports=function(t,e,i){var s;t.hasOwnProperty(e)?s="function"===typeof t[e]?function(i,s,n,r,o,a){return t[e](i,s,n,r,o,a)}:function(){return t[e]}:s="function"==typeof i?i:function(){return i};return s}},92407:(t,e,i)=>{var s=i(53709);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substring(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===s.indexOf(e)&&"_"!==e.substring(0,1)&&i.push({key:e,value:t[e]});return i}},65868:(t,e,i)=>{var s=i(10850);t.exports=function(t){var e=s(t,"targets",null);return null===e||("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e])),e}},9744:(t,e,i)=>{var s=i(17489),n=i(61616);function r(t){return!!t.getActive&&"function"==typeof t.getActive}function o(t){return!!t.getStart&&"function"==typeof t.getStart}function a(t){return!!t.getEnd&&"function"==typeof t.getEnd}var h=function(t,e){var i,l,u=function(t,e,i){return i},c=function(t,e,i){return i},d=null,p=typeof e;if("number"===p)u=function(){return e};else if(Array.isArray(e))c=function(){return e[0]},u=function(){return e[e.length-1]};else if("string"===p){var f=e.toLowerCase(),v="random"===f.substring(0,6),g="int"===f.substring(0,3);if(v||g){var m=f.indexOf("("),y=f.indexOf(")"),x=f.indexOf(",");if(!(m&&y&&x))throw new Error("invalid random() format");var T=parseFloat(f.substring(m+1,x)),w=parseFloat(f.substring(x+1,y));u=v?function(){return n(T,w)}:function(){return s(T,w)}}else{f=f[0];var b=parseFloat(e.substr(2));switch(f){case"+":u=function(t,e,i){return i+b};break;case"-":u=function(t,e,i){return i-b};break;case"*":u=function(t,e,i){return i*b};break;case"/":u=function(t,e,i){return i/b};break;default:u=function(){return parseFloat(e)}}}}else if("function"===p)u=e;else if("object"===p)if(o(l=e)||a(l)||r(l))r(e)&&(d=e.getActive),a(e)&&(u=e.getEnd),o(e)&&(c=e.getStart);else if(e.hasOwnProperty("value"))i=h(t,e.value);else{var E=e.hasOwnProperty("to"),S=e.hasOwnProperty("from"),A=e.hasOwnProperty("start");if(E&&(S||A)){if(i=h(t,e.to),A){var _=h(t,e.start);i.getActive=_.getEnd}if(S){var C=h(t,e.from);i.getStart=C.getEnd}}}return i||(i={getActive:d,getEnd:u,getStart:c}),i};t.exports=h},68710:(t,e,i)=>{var s=i(502),n=i(99730),r=i(20494),o=i(63130),a=i(21902),h=i(28348),l=i(10850),u=i(9744),c=i(72066),d=i(39366);t.exports=function(t,e,i){if(e instanceof d)return e.parent=t,e;i=void 0===i?n:c(n,i);var p=l(e,"from",0),f=l(e,"to",1),v=[{value:p}],g=l(e,"delay",i.delay),m=l(e,"easeParams",i.easeParams),y=l(e,"ease",i.ease),x=u("value",f),T=new d(t,v),w=T.add(0,"value",x.getEnd,x.getStart,x.getActive,a(l(e,"ease",y),l(e,"easeParams",m)),h(e,"delay",g),l(e,"duration",i.duration),o(e,"yoyo",i.yoyo),l(e,"hold",i.hold),l(e,"repeat",i.repeat),l(e,"repeatDelay",i.repeatDelay),!1,!1);w.start=p,w.current=p,T.completeDelay=r(e,"completeDelay",0),T.loop=Math.round(r(e,"loop",0)),T.loopDelay=Math.round(r(e,"loopDelay",0)),T.paused=o(e,"paused",!1),T.persist=o(e,"persist",!1),T.callbackScope=l(e,"callbackScope",T);for(var b=s.TYPES,E=0;E{var s=i(21902),n=i(10850),r=i(83392);t.exports=function(t,e){var i;void 0===e&&(e={});var o=n(e,"start",0),a=n(e,"ease",null),h=n(e,"grid",null),l=n(e,"from",0),u="first"===l,c="center"===l,d="last"===l,p="number"==typeof l,f=Array.isArray(t),v=f?parseFloat(t[0]):parseFloat(t),g=f?parseFloat(t[1]):0,m=Math.max(v,g);if(f&&(o+=v),h){var y=h[0],x=h[1],T=0,w=0,b=0,E=0,S=[];d?(T=y-1,w=x-1):p?(T=l%y,w=Math.floor(l/y)):c&&(T=(y-1)/2,w=(x-1)/2);for(var A=r.MIN_SAFE_INTEGER,_=0;_A&&(A=M),S[_][C]=M}}}var R=a?s(a):null;return i=h?function(t,e,i,s){var n,r=0,a=s%y,h=Math.floor(s/y);if(a>=0&&a=0&&h{var s=i(502),n=i(99730),r=i(20494),o=i(63130),a=i(21902),h=i(4840),l=i(28348),u=i(92407),c=i(65868),d=i(10850),p=i(9744),f=i(72066),v=i(39366);t.exports=function(t,e,i){if(e instanceof v)return e.parent=t,e;i=void 0===i?n:f(n,i);var g=c(e);!g&&i.targets&&(g=i.targets);for(var m=u(e),y=d(e,"delay",i.delay),x=d(e,"duration",i.duration),T=d(e,"easeParams",i.easeParams),w=d(e,"ease",i.ease),b=d(e,"hold",i.hold),E=d(e,"repeat",i.repeat),S=d(e,"repeatDelay",i.repeatDelay),A=o(e,"yoyo",i.yoyo),_=o(e,"flipX",i.flipX),C=o(e,"flipY",i.flipY),M=d(e,"interpolation",i.interpolation),R=function(t,e,i,s){if("texture"===i){var n=s,r=void 0;Array.isArray(s)?(n=s[0],r=s[1]):s.hasOwnProperty("value")?(n=s.value,Array.isArray(s.value)?(n=s.value[0],r=s.value[1]):"string"==typeof s.value&&(n=s.value)):"string"==typeof s&&(n=s),t.addFrame(e,n,r,l(s,"delay",y),d(s,"duration",x),d(s,"hold",b),d(s,"repeat",E),d(s,"repeatDelay",S),o(s,"flipX",_),o(s,"flipY",C))}else{var u=p(i,s),c=h(d(s,"interpolation",M));t.add(e,i,u.getEnd,u.getStart,u.getActive,a(d(s,"ease",w),d(s,"easeParams",T)),l(s,"delay",y),d(s,"duration",x),o(s,"yoyo",A),d(s,"hold",b),d(s,"repeat",E),d(s,"repeatDelay",S),o(s,"flipX",_),o(s,"flipY",C),c,c?s:null)}},P=new v(t,g),O=0;O{var s=i(502),n=i(20494),r=i(63130),o=i(65868),a=i(10850),h=i(68061),l=i(45641);t.exports=function(t,e){if(e instanceof l)return e.parent=t,e;var i,u=new l(t);u.startDelay=a(e,"delay",0),u.completeDelay=n(e,"completeDelay",0),u.loop=Math.round(n(e,"loop",a(e,"repeat",0))),u.loopDelay=Math.round(n(e,"loopDelay",a(e,"repeatDelay",0))),u.paused=r(e,"paused",!1),u.persist=r(e,"persist",!0),u.callbackScope=a(e,"callbackScope",u);var c=s.TYPES;for(i=0;i{t.exports={GetBoolean:i(63130),GetEaseFunction:i(21902),GetInterpolationFunction:i(4840),GetNewValue:i(28348),GetProps:i(92407),GetTargets:i(65868),GetValueOp:i(9744),NumberTweenBuilder:i(68710),StaggerBuilder:i(91944),TweenBuilder:i(68061)}},5570:t=>{t.exports="active"},6383:t=>{t.exports="complete"},72582:t=>{t.exports="loop"},90281:t=>{t.exports="pause"},80803:t=>{t.exports="repeat"},13640:t=>{t.exports="resume"},10472:t=>{t.exports="start"},5379:t=>{t.exports="stop"},43449:t=>{t.exports="update"},61541:t=>{t.exports="yoyo"},54272:(t,e,i)=>{t.exports={TWEEN_ACTIVE:i(5570),TWEEN_COMPLETE:i(6383),TWEEN_LOOP:i(72582),TWEEN_PAUSE:i(90281),TWEEN_RESUME:i(13640),TWEEN_REPEAT:i(80803),TWEEN_START:i(10472),TWEEN_STOP:i(5379),TWEEN_UPDATE:i(43449),TWEEN_YOYO:i(61541)}},75193:(t,e,i)=>{var s={States:i(55303),Builders:i(79619),Events:i(54272),TweenManager:i(64532),Tween:i(39366),TweenData:i(15718),TweenFrameData:i(96490),BaseTween:i(502),TweenChain:i(45641)};t.exports=s},502:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(54272),o=i(55303),a=new s({Extends:n,initialize:function(t){n.call(this),this.parent=t,this.data=[],this.totalData=0,this.startDelay=0,this.hasStarted=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=o.PENDING,this.paused=!1,this.callbacks={onActive:null,onComplete:null,onLoop:null,onPause:null,onRepeat:null,onResume:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope,this.persist=!1},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return!this.paused&&this.isActive()},isPaused:function(){return this.paused},pause:function(){return this.paused||(this.paused=!0,this.dispatchEvent(r.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(r.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(r.TWEEN_COMPLETE,"onComplete")},complete:function(t){return void 0===t&&(t=0),t?(this.setCompleteDelayState(),this.countdown=t):this.onCompleteHandler(),this},completeAfterLoop:function(t){return void 0===t&&(t=0),this.loopCounter>t&&(this.loopCounter=t),this},remove:function(){return this.parent.remove(this),this},stop:function(){return this.isRemoved()||this.isPendingRemove()||this.isDestroyed()||(this.dispatchEvent(r.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(t){this.countdown-=t,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(r.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(t){return this.countdown-=t,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(r.TWEEN_START,"onStart"),t=0),t},updateCompleteDelay:function(t){this.countdown-=t,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(t,e,i){return void 0===i&&(i=[]),this.callbacks.hasOwnProperty(t)&&(this.callbacks[t]={func:e,params:i}),this},setPendingState:function(){this.state=o.PENDING},setActiveState:function(){this.state=o.ACTIVE},setLoopDelayState:function(){this.state=o.LOOP_DELAY},setCompleteDelayState:function(){this.state=o.COMPLETE_DELAY},setStartDelayState:function(){this.state=o.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=o.PENDING_REMOVE},setRemovedState:function(){this.state=o.REMOVED},setFinishedState:function(){this.state=o.FINISHED},setDestroyedState:function(){this.state=o.DESTROYED},isPending:function(){return this.state===o.PENDING},isActive:function(){return this.state===o.ACTIVE},isLoopDelayed:function(){return this.state===o.LOOP_DELAY},isCompleteDelayed:function(){return this.state===o.COMPLETE_DELAY},isStartDelayed:function(){return this.state===o.START_DELAY},isPendingRemove:function(){return this.state===o.PENDING_REMOVE},isRemoved:function(){return this.state===o.REMOVED},isFinished:function(){return this.state===o.FINISHED},isDestroyed:function(){return this.state===o.DESTROYED},destroy:function(){this.data&&this.data.forEach((function(t){t.destroy()})),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});a.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],t.exports=a},65521:(t,e,i)=>{var s=i(56694),n=i(54272),r=i(55303),o=new s({initialize:function(t,e,i,s,n,r,o,a,h,l){this.tween=t,this.targetIndex=e,this.duration=s,this.totalDuration=0,this.delay=0,this.getDelay=i,this.yoyo=n,this.hold=r,this.repeat=o,this.repeatDelay=a,this.repeatCounter=0,this.flipX=h,this.flipY=l,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(t){void 0===t&&(t=this.current),this.tween.targets[this.targetIndex][this.key]=t},setCreatedState:function(){this.state=r.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=r.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=r.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=r.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=r.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=r.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=r.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=r.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===r.CREATED},isDelayed:function(){return this.state===r.DELAY},isPendingRender:function(){return this.state===r.PENDING_RENDER},isPlayingForward:function(){return this.state===r.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===r.PLAYING_BACKWARD},isHolding:function(){return this.state===r.HOLD_DELAY},isRepeating:function(){return this.state===r.REPEAT_DELAY},isComplete:function(){return this.state===r.COMPLETE},setStateFromEnd:function(t){this.yoyo?this.onRepeat(t,!0,!0):this.repeatCounter>0?this.onRepeat(t,!0,!1):this.setCompleteState()},setStateFromStart:function(t){this.repeatCounter>0?this.onRepeat(t,!1):this.setCompleteState()},reset:function(){var t=this.tween,e=t.totalTargets,i=this.targetIndex,s=t.targets[i],n=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(s,n,0,i,e,t),this.repeatCounter=-1===this.repeat?r.MAX:this.repeat,this.setPendingRenderState();var o=this.duration+this.hold;this.yoyo&&(o+=this.duration);var a=o+this.repeatDelay;this.totalDuration=this.delay+o,-1===this.repeat?(this.totalDuration+=a*r.MAX,t.isInfinite=!0):this.repeat>0&&(this.totalDuration+=a*this.repeat),this.totalDuration>t.duration&&(t.duration=this.totalDuration),this.delay0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(t,e,i){var s=this.tween,r=s.totalTargets,o=this.targetIndex,a=s.targets[o],h=this.key,l="texture"!==h;if(this.elapsed=t,this.progress=t/this.duration,this.flipX&&a.toggleFlipX(),this.flipY&&a.toggleFlipY(),l&&(e||i)&&(this.start=this.getStartValue(a,h,this.start,o,r,s)),i)return this.setPlayingBackwardState(),void this.dispatchEvent(n.TWEEN_YOYO,"onYoyo");this.repeatCounter--,l&&(this.end=this.getEndValue(a,h,this.start,o,r,s)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-t,l&&(this.current=this.start,a[h]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(n.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});t.exports=o},99730:t=>{t.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1,persist:!1,interpolation:null}},53709:t=>{t.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","interpolation","loop","loopDelay","onActive","onActiveParams","onComplete","onCompleteParams","onLoop","onLoopParams","onPause","onPauseParams","onRepeat","onRepeatParams","onResume","onResumeParams","onStart","onStartParams","onStop","onStopParams","onUpdate","onUpdateParams","onYoyo","onYoyoParams","paused","persist","props","repeat","repeatDelay","targets","yoyo"]},39366:(t,e,i)=>{var s=i(502),n=i(56694),r=i(54272),o=i(99325),a=i(61286),h=i(83392),l=i(55303),u=i(15718),c=i(96490),d=new n({Extends:s,initialize:function(t,e){s.call(this,t),this.targets=e,this.totalTargets=e.length,this.isSeeking=!1,this.isInfinite=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0},add:function(t,e,i,s,n,r,o,a,h,l,c,d,p,f,v,g){var m=new u(this,t,e,i,s,n,r,o,a,h,l,c,d,p,f,v,g);return this.totalData=this.data.push(m),m},addFrame:function(t,e,i,s,n,r,o,a,h,l){var u=new c(this,t,e,i,s,n,r,o,a,h,l);return this.totalData=this.data.push(u),u},getValue:function(t){void 0===t&&(t=0);var e=null;return this.data&&(e=this.data[t].current),e},hasTarget:function(t){return this.targets&&-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){if(void 0===i&&(i=!1),"texture"!==t&&(this.isPlayingForward()||this.isPlayingBackward()))for(var s=0;s0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(r.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,s.prototype.onCompleteHandler.call(this)},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed Tween",this),this):((this.isPendingRemove()||this.isFinished())&&this.seek(),this.paused=!1,this.setActiveState(),this)},seek:function(t,e,i){if(void 0===t&&(t=0),void 0===e&&(e=16.6),void 0===i&&(i=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;i||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive");var s=this.paused;if(this.paused=!1,t>0){for(var n=Math.floor(t/e),o=t-n*e,a=0;a0&&this.update(o)}return this.paused=s,this.isSeeking=!1,this},initTweenData:function(t){void 0===t&&(t=!1),this.duration=0,this.startDelay=h.MAX_SAFE_INTEGER;for(var e=this.data,i=0;i0?s+n+(s+o)*r:s+n},reset:function(t){return void 0===t&&(t=!1),this.elapsed=0,this.totalElapsed=0,this.progress=0,this.totalProgress=0,this.loopCounter=this.loop,-1===this.loop&&(this.isInfinite=!0,this.loopCounter=l.MAX),t||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive")),this},update:function(t){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(t*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(t),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(t),!1;this.hasStarted||(this.startDelay-=t,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(r.TWEEN_START,"onStart"),t=0));var e=!1;if(this.isActive())for(var i=this.data,s=0;s{var s=i(66458),n=i(502),r=i(56694),o=i(54272),a=i(99325),h=i(61286),l=i(55303),u=new r({Extends:n,initialize:function(t){n.call(this,t),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=-1===this.loop?l.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this.dispatchEvent(o.TWEEN_ACTIVE,"onActive"),this},add:function(t){var e=this.parent.create(t);Array.isArray(e)||(e=[e]);for(var i=this.data,s=0;s0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(o.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed TweenChain",this),this):((this.isPendingRemove()||this.isPending())&&this.resetTweens(),this.paused=!1,this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this)},resetTweens:function(){for(var t=this.data,e=this.totalData,i=0;i{var s=i(65521),n=i(82897),r=i(56694),o=i(54272),a=new r({Extends:s,initialize:function(t,e,i,n,r,o,a,h,l,u,c,d,p,f,v,g,m){s.call(this,t,e,h,l,u,c,d,p,f,v),this.key=i,this.getActiveValue=o,this.getEndValue=n,this.getStartValue=r,this.ease=a,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=g,this.interpolationData=m},reset:function(t){s.prototype.reset.call(this);var e=this.tween.targets[this.targetIndex],i=this.key;t&&(e[i]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(e[i]=this.getActiveValue(e,i,0))},update:function(t){var e=this.tween,i=e.totalTargets,s=this.targetIndex,r=e.targets[s],a=this.key;if(!r)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=t,this.elapsed<=0&&(this.elapsed=0,t=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(o.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(r,a,r[a],s,i,e),this.end=this.getEndValue(r,a,this.start,s,i,e),this.current=this.start,r[a]=this.start,this.setPlayingForwardState(),!0;var h=this.isPlayingForward(),l=this.isPlayingBackward();if(h||l){var u=this.elapsed,c=this.duration,d=0,p=!1;(u+=t)>=c?(d=u-c,u=c,p=!0):u<0&&(u=0);var f=n(u/c,0,1);if(this.elapsed=u,this.progress=f,this.previous=this.current,p)h?(this.current=this.end,r[a]=this.end,this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(d)):(this.current=this.start,r[a]=this.start,this.setStateFromStart(d));else{h||(f=1-f);var v=this.ease(f);this.interpolation?this.current=this.interpolation(this.interpolationData,v):this.current=this.start+(this.end-this.start)*v,r[a]=this.current}this.dispatchEvent(o.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(t,e){var i=this.tween;if(!i.isSeeking){var s=i.targets[this.targetIndex],n=this.key,r=this.current,o=this.previous;i.emit(t,i,n,s,r,o);var a=i.callbacks[e];a&&a.func.apply(i.callbackScope,[i,s,n,r,o].concat(a.params))}},destroy:function(){s.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});t.exports=a},96490:(t,e,i)=>{var s=i(65521),n=i(82897),r=i(56694),o=i(54272),a=new r({Extends:s,initialize:function(t,e,i,n,r,o,a,h,l,u,c){s.call(this,t,e,r,o,!1,a,h,l,u,c),this.key="texture",this.startTexture=null,this.endTexture=i,this.startFrame=null,this.endFrame=n,this.yoyo=0!==h},reset:function(t){s.prototype.reset.call(this);var e=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=e.texture.key,this.startFrame=e.frame.name),t&&e.setTexture(this.startTexture,this.startFrame)},update:function(t){var e=this.tween,i=this.targetIndex,s=e.targets[i];if(!s)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=t,this.elapsed<=0&&(this.elapsed=0,t=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(o.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&s.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var r=this.isPlayingForward(),a=this.isPlayingBackward();if(r||a){var h=this.elapsed,l=this.duration,u=0,c=!1;(h+=t)>=l?(u=h-l,h=l,c=!0):h<0&&(h=0);var d=n(h/l,0,1);this.elapsed=h,this.progress=d,c&&(r?(s.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(u)):(s.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(u))),this.dispatchEvent(o.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(t,e){var i=this.tween;if(!i.isSeeking){var s=i.targets[this.targetIndex],n=this.key;i.emit(t,i,n,s);var r=i.callbacks[e];r&&r.func.apply(i.callbackScope,[i,s,n].concat(r.params))}},destroy:function(){s.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});t.exports=a},55303:t=>{t.exports={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999}},56694:t=>{function e(t,e,i){var s=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&s.value&&"object"==typeof s.value&&(s=s.value),!(!s||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(s))&&(void 0===s.enumerable&&(s.enumerable=!0),void 0===s.configurable&&(s.configurable=!0),s)}function i(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,s,n,o){for(var a in s)if(s.hasOwnProperty(a)){var h=e(s,a,n);if(!1!==h){if(i((o||t).prototype,a)){if(r.ignoreFinals)continue;throw new Error("cannot override final property '"+a+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,a,h)}else t.prototype[a]=s[a]}}function n(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i{t.exports=function(){}},10618:t=>{t.exports=function(){return null}},78991:t=>{t.exports=function(t,e,i,s,n){if(void 0===n&&(n=t),i>0){var r=i-t.length;if(r<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),s&&s.call(n,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a{t.exports=function(t,e,i,s,n,r){if(void 0===i&&(i=0),void 0===r&&(r=t),s>0){var o=s-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),n&&n.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;s>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var l=e[h];t.splice(i,0,l),n&&n.call(r,l)}return e}},58742:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i{var s=i(45838);t.exports=function(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);var o=0;if(s(t,n,r))for(var a=n;a{t.exports=function(t,e,i){var s,n=[null];for(s=3;s{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r)){var o,a=[null];for(o=5;o{t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var s,n,r=1;if(i){if(te.length&&(r=e.length),i?(s=e[r-1][i],(n=e[r][i])-t<=t-s?e[r]:e[r-1]):(s=e[r-1],(n=e[r])-t<=t-s?n:s)}},5454:t=>{var e=function(t,i){void 0===i&&(i=[]);for(var s=0;s{var s=i(45838);t.exports=function(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);var o=[];if(s(t,n,r))for(var a=n;a{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r))for(var o=n;o{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var s=e+Math.floor(Math.random()*i);return void 0===t[s]?null:t[s]}},24218:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),n=t.indexOf(i);if(s<0||n<0)throw new Error("Supplied items must be elements of the same array");return s>n||(t.splice(s,1),n===t.length-1?t.push(e):t.splice(n,0,e)),t}},58258:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),n=t.indexOf(i);if(s<0||n<0)throw new Error("Supplied items must be elements of the same array");return s{t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var s=t[i-1],n=t.indexOf(s);t[i]=s,t[n]=e}return t}},68396:t=>{t.exports=function(t,e,i){var s=t.indexOf(e);if(-1===s||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return s!==i&&(t.splice(s,1),t.splice(i,0,e)),e}},27555:t=>{t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i{t.exports=function(t,e,i,s){var n,r=[],o=!1;if((i||s)&&(o=!0,i||(i=""),s||(s="")),e=e;n--)o?r.push(i+n.toString()+s):r.push(n);else for(n=t;n<=e;n++)o?r.push(i+n.toString()+s):r.push(n);return r}},89955:(t,e,i)=>{var s=i(67233);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var n=[],r=Math.max(s((e-t)/(i||1)),0),o=0;o{function e(t,e,i){var s=t[e];t[e]=t[i],t[i]=s}function i(t,e){return te?1:0}var s=function(t,n,r,o,a){for(void 0===r&&(r=0),void 0===o&&(o=t.length-1),void 0===a&&(a=i);o>r;){if(o-r>600){var h=o-r+1,l=n-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),p=Math.max(r,Math.floor(n-l*c/h+d)),f=Math.min(o,Math.floor(n+(h-l)*c/h+d));s(t,n,p,f,a)}var v=t[n],g=r,m=o;for(e(t,r,n),a(t[o],v)>0&&e(t,r,o);g0;)m--}0===a(t[r],v)?e(t,r,m):e(t,++m,o),m<=n&&(r=m+1),n<=m&&(o=m-1)}};t.exports=s},75757:(t,e,i)=>{var s=i(10850),n=i(18592),r=function(t,e,i){for(var s=[],n=0;n{var s=i(72677);t.exports=function(t,e,i,n){var r;if(void 0===n&&(n=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(s(t,r),i&&i.call(n,e),e):null;for(var o=e.length-1,a=[];o>=0;){var h=e[o];-1!==(r=t.indexOf(h))&&(s(t,r),a.push(h),i&&i.call(n,h)),o--}return a}},8324:(t,e,i)=>{var s=i(72677);t.exports=function(t,e,i,n){if(void 0===n&&(n=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var r=s(t,e);return i&&i.call(n,r),r}},47427:(t,e,i)=>{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),s(t,e,i)){var o=i-e,a=t.splice(e,o);if(n)for(var h=0;h{var s=i(72677);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var n=e+Math.floor(Math.random()*i);return s(t,n)}},80402:t=>{t.exports=function(t,e,i){var s=t.indexOf(e),n=t.indexOf(i);return-1!==s&&-1===n&&(t[s]=i,!0)}},77640:t=>{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e,i,s){var n=t.length;if(e<0||e>n||e>=i||i>n){if(s)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},27847:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},6034:(t,e,i)=>{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r))for(var o=n;o{t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[i],t[i]=s}return t}},28834:t=>{t.exports=function(t){var e=/\D/g;return t.sort((function(t,i){return parseInt(t.replace(e,""),10)-parseInt(i.replace(e,""),10)})),t}},72677:t=>{t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,s=t[e],n=e;n{var s=i(77290);function n(t,e){return String(t).localeCompare(e)}function r(t,e,i,s){var n,r,o,a,h,l=t.length,u=0,c=2*i;for(n=0;nl&&(r=l),o>l&&(o=l),a=n,h=r;;)if(a{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),n=t.indexOf(i);if(s<0||n<0)throw new Error("Supplied items must be elements of the same array");return t[s]=i,t[n]=e,t}},59959:(t,e,i)=>{t.exports={Matrix:i(13515),Add:i(78991),AddAt:i(48522),BringToTop:i(58742),CountAllMatching:i(30164),Each:i(36337),EachInRange:i(46208),FindClosestInSorted:i(2406),Flatten:i(5454),GetAll:i(71608),GetFirst:i(51463),GetRandom:i(72861),MoveDown:i(51172),MoveTo:i(68396),MoveUp:i(27555),MoveAbove:i(24218),MoveBelow:i(58258),NumberArray:i(13401),NumberArrayStep:i(89955),QuickSelect:i(53466),Range:i(75757),Remove:i(66458),RemoveAt:i(8324),RemoveBetween:i(47427),RemoveRandomElement:i(50147),Replace:i(80402),RotateLeft:i(77640),RotateRight:i(38487),SafeRange:i(45838),SendToBack:i(27847),SetAll:i(6034),Shuffle:i(18592),SortByDigits:i(28834),SpliceOne:i(72677),StableSort:i(17922),Swap:i(96928)}},97494:t=>{t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i{var s=i(76400),n=i(97494);t.exports=function(t){var e="";if(!n(t))return e;for(var i=0;i{t.exports=function(t){return t.reverse()}},51995:t=>{t.exports=function(t){for(var e=0;e{var s=i(63515);t.exports=function(t){return s(t,180)}},42549:(t,e,i)=>{var s=i(63515);t.exports=function(t){return s(t,90)}},63515:(t,e,i)=>{var s=i(97494),n=i(78581);t.exports=function(t,e){if(void 0===e&&(e=90),!s(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=n(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=n(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i{var s=i(63515);t.exports=function(t){return s(t,-90)}},27365:(t,e,i)=>{var s=i(77640),n=i(38487);t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?s(t,Math.abs(i)):n(t,i)),0!==e)for(var r=0;r{t.exports=function(t){for(var e=t.length,i=t[0].length,s=new Array(i),n=0;n-1;r--)s[n][r]=t[r][n]}return s}},13515:(t,e,i)=>{t.exports={CheckMatrix:i(97494),MatrixToString:i(68428),ReverseColumns:i(59521),ReverseRows:i(51995),Rotate180:i(89011),RotateLeft:i(42549),RotateMatrix:i(63515),RotateRight:i(14305),Translate:i(27365),TransposeMatrix:i(78581)}},40581:t=>{var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";t.exports=function(t,i){for(var s=new Uint8Array(t),n=s.length,r=i?"data:"+i+";base64,":"",o=0;o>2],r+=e[(3&s[o])<<4|s[o+1]>>4],r+=e[(15&s[o+1])<<2|s[o+2]>>6],r+=e[63&s[o+2]];return n%3==2?r=r.substring(0,r.length-1)+"=":n%3==1&&(r=r.substring(0,r.length-2)+"=="),r}},82329:t=>{for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(256),s=0;s>4,u[h++]=(15&s)<<4|n>>2,u[h++]=(3&n)<<6|63&r;return l}},78417:(t,e,i)=>{t.exports={ArrayBufferToBase64:i(40581),Base64ToArrayBuffer:i(82329)}},22178:(t,e,i)=>{t.exports={Array:i(59959),Base64:i(78417),Objects:i(64615),String:i(50379),NOOP:i(72283),NULL:i(10618)}},32742:t=>{t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},28699:t=>{var e=function(t){var i,s,n;if("object"!=typeof t||null===t)return t;for(n in i=Array.isArray(t)?[]:{},t)s=t[n],i[n]=e(s);return i};t.exports=e},98611:(t,e,i)=>{var s=i(42911),n=function(){var t,e,i,r,o,a,h=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},l=2),u===l&&(h=this,--l);l{var s=i(5923),n=i(10850);t.exports=function(t,e,i){var r=n(t,e,null);if(null===r)return i;if(Array.isArray(r))return s.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return s.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return s.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},72632:t=>{t.exports=function(t,e,i){var s=typeof t;return t&&"number"!==s&&"string"!==s&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},94324:(t,e,i)=>{var s=i(10850),n=i(82897);t.exports=function(t,e,i,r,o){void 0===o&&(o=i);var a=s(t,e,o);return n(a,i,r)}},10850:t=>{t.exports=function(t,e,i,s){if(!t&&!s||"number"==typeof t)return i;if(t&&t.hasOwnProperty(e))return t[e];if(s&&s.hasOwnProperty(e))return s[e];if(-1!==e.indexOf(".")){for(var n=e.split("."),r=t,o=s,a=i,h=i,l=!0,u=!0,c=0;c{t.exports=function(t,e){for(var i=0;i{t.exports=function(t,e){for(var i=0;i{t.exports=function(t,e){return t.hasOwnProperty(e)}},42911:t=>{t.exports=function(t){if(!t||"object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},30657:(t,e,i)=>{var s=i(32742);t.exports=function(t,e){var i=s(t);for(var n in e)i.hasOwnProperty(n)||(i[n]=e[n]);return i}},72066:(t,e,i)=>{var s=i(32742);t.exports=function(t,e){var i=s(t);for(var n in e)i.hasOwnProperty(n)&&(i[n]=e[n]);return i}},28820:(t,e,i)=>{var s=i(19256);t.exports=function(t,e){for(var i={},n=0;n{t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))return t[e]=i,!0;if(-1!==e.indexOf(".")){for(var s=e.split("."),n=t,r=t,o=0;o{t.exports={Clone:i(32742),DeepCopy:i(28699),Extend:i(98611),GetAdvancedValue:i(20494),GetFastValue:i(72632),GetMinMaxValue:i(94324),GetValue:i(10850),HasAll:i(87701),HasAny:i(53523),HasValue:i(19256),IsPlainObject:i(42911),Merge:i(30657),MergeRight:i(72066),Pick:i(28820),SetValue:i(22440)}},69429:t=>{t.exports=function(t,e){return t.replace(/%([0-9]+)/g,(function(t,i){return e[Number(i)-1]}))}},76400:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===s&&(s=3);var n=0;if(e+1>=(t=t.toString()).length)switch(s){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((n=e-t.length)/2);t=new Array(n-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},76872:t=>{t.exports=function(t,e){return 0===e?t.slice(1):t.slice(0,e-1)+t.slice(e)}},8051:t=>{t.exports=function(t){return t.split("").reverse().join("")}},76583:t=>{t.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}},40587:t=>{t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},50379:(t,e,i)=>{t.exports={Format:i(69429),Pad:i(76400),RemoveAt:i(76872),Reverse:i(8051),UppercaseFirst:i(40587),UUID:i(76583)}}},e={};function i(s){var n=e[s];if(void 0!==n)return n.exports;var r=e[s]={exports:{}};return t[s](r,r.exports,i),r.exports}return i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i(92491)})())); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Phaser",[],e):"object"==typeof exports?exports.Phaser=e():t.Phaser=e()}(this,(()=>(()=>{var t={6659:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function s(){}function n(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function r(t,e,s,r,o){if("function"!=typeof s)throw new TypeError("The listener must be a function");var a=new n(s,r||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 s:delete t._events[e]}function a(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(i=!1)),a.prototype.eventNames=function(){var t,s,n=[];if(0===this._eventsCount)return n;for(s in t=this._events)e.call(t,s)&&n.push(i?s.slice(1):s);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},a.prototype.listeners=function(t){var e=i?i+t:t,s=this._events[e];if(!s)return[];if(s.fn)return[s.fn];for(var n=0,r=s.length,o=new Array(r);n{var s=i(82590);t.exports=function(t,e,i,n){for(var r=t[0],o=1;o{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"angle",e,i,n,r)}},22015:t=>{t.exports=function(t,e,i){for(var s=0;s{t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=i;s{t.exports=function(t,e,i){void 0===i&&(i=0);for(var s=i;s{var s=i(40327),n=i(84093),r=i(72632),o=i(72283),a=new(i(71030))({sys:{queueDepthSort:o,events:{once:o}}},0,0,1,1).setOrigin(0,0);t.exports=function(t,e){void 0===e&&(e={});var i=e.hasOwnProperty("width"),o=e.hasOwnProperty("height"),h=r(e,"width",-1),l=r(e,"height",-1),u=r(e,"cellWidth",1),c=r(e,"cellHeight",u),d=r(e,"position",n.TOP_LEFT),p=r(e,"x",0),f=r(e,"y",0),v=0,g=0,m=h*u,y=l*c;a.setPosition(p,f),a.setSize(u,c);for(var x=0;x{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"alpha",e,i,n,r)}},3877:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"x",e,i,n,r)}},71020:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"x",e,n,o,a),s(t,"y",i,r,o,a)}},28970:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"y",e,i,n,r)}},82249:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=6.28);for(var n=i,r=(s-i)/t.length,o=e.x,a=e.y,h=e.radius,l=0;l{t.exports=function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=6.28);for(var n=i,r=(s-i)/t.length,o=e.width/2,a=e.height/2,h=0;h{var s=i(8570);t.exports=function(t,e){for(var i=s(e,t.length),n=0;n{var s=i(40053),n=i(77640),r=i(38487);t.exports=function(t,e,i){void 0===i&&(i=0);var o=s(e,!1,t.length);i>0?n(o,i):i<0&&r(o,Math.abs(i));for(var a=0;a{var s=i(58813);t.exports=function(t,e,i){var n=s({x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2},i),r=s({x1:e.x2,y1:e.y2,x2:e.x3,y2:e.y3},i),o=s({x1:e.x3,y1:e.y3,x2:e.x1,y2:e.y1},i);n.pop(),r.pop(),o.pop();for(var a=(n=n.concat(r,o)).length/t.length,h=0,l=0;l{t.exports=function(t,e,i){for(var s=0;s{t.exports=function(t,e,i,s,n,r){var o;void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=1);var a=0,h=t.length;if(1===r)for(o=n;o=0;o--)t[o][e]+=i+a*s,a++;return t}},23646:t=>{t.exports=function(t,e,i,s,n,r){var o;void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=1);var a=0,h=t.length;if(1===r)for(o=n;o=0;o--)t[o][e]=i+a*s,a++;return t}},4392:(t,e,i)=>{var s=i(30977);t.exports=function(t,e){for(var i=0;i{var s=i(72006);t.exports=function(t,e){for(var i=0;i{var s=i(74077);t.exports=function(t,e){for(var i=0;i{var s=i(30001);t.exports=function(t,e){for(var i=0;i{var s=i(99761);t.exports=function(t,e){for(var i=0;i{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"rotation",e,i,n,r)}},87299:(t,e,i)=>{var s=i(72395),n=i(53996);t.exports=function(t,e,i){for(var r=e.x,o=e.y,a=0;a{var s=i(72395);t.exports=function(t,e,i,n){var r=e.x,o=e.y;if(0===n)return t;for(var a=0;a{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"scaleX",e,i,n,r)}},51449:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"scaleX",e,n,o,a),s(t,"scaleY",i,r,o,a)}},64895:(t,e,i)=>{var s=i(6124);t.exports=function(t,e,i,n,r){return s(t,"scaleY",e,i,n,r)}},30329:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"alpha",e,i,n,r)}},43954:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n){return s(t,"blendMode",e,0,i,n)}},70688:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"depth",e,i,n,r)}},8314:t=>{t.exports=function(t,e,i){for(var s=0;s{var s=i(23646);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"originX",e,n,o,a),s(t,"originY",i,r,o,a),t.forEach((function(t){t.updateDisplayOrigin()})),t}},38767:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"rotation",e,i,n,r)}},18584:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"scaleX",e,n,o,a),s(t,"scaleY",i,r,o,a)}},17381:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scaleX",e,i,n,r)}},74370:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scaleY",e,i,n,r)}},27773:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"scrollFactorX",e,n,o,a),s(t,"scrollFactorY",i,r,o,a)}},75257:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scrollFactorX",e,i,n,r)}},54512:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"scrollFactorY",e,i,n,r)}},69423:t=>{t.exports=function(t,e,i,s,n){for(var r=0;r{var s=i(23646);t.exports=function(t,e,i,n){return s(t,"visible",e,0,i,n)}},94833:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"x",e,i,n,r)}},14284:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r,o,a){return null==i&&(i=e),s(t,"x",e,n,o,a),s(t,"y",i,r,o,a)}},96574:(t,e,i)=>{var s=i(23646);t.exports=function(t,e,i,n,r){return s(t,"y",e,i,n,r)}},74086:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){var o,a;void 0===n&&(n=0),void 0===r&&(r=new s);var h=t.length;if(1===h)o=t[0].x,a=t[0].y,t[0].x=e,t[0].y=i;else{var l=1,u=0;0===n&&(u=h-1,l=h-2),o=t[u].x,a=t[u].y,t[u].x=e,t[u].y=i;for(var c=0;c=h||-1===l)){var d=t[l],p=d.x,f=d.y;d.x=o,d.y=a,o=p,a=f,0===n?l--:l++}}return r.x=o,r.y=a,r}},86347:(t,e,i)=>{var s=i(18592);t.exports=function(t){return s(t)}},1558:(t,e,i)=>{var s=i(5514);t.exports=function(t,e,i,n,r){void 0===r&&(r=!1);var o,a=Math.abs(n-i)/t.length;if(r)for(o=0;o{var s=i(87736);t.exports=function(t,e,i,n,r){void 0===r&&(r=!1);var o,a=Math.abs(n-i)/t.length;if(r)for(o=0;o{t.exports=function(t,e,i,s,n){if(void 0===n&&(n=!1),0===t.length)return t;if(1===t.length)return n?t[0][e]+=(s+i)/2:t[0][e]=(s+i)/2,t;var r,o=Math.abs(s-i)/(t.length-1);if(n)for(r=0;r{t.exports=function(t){for(var e=0;e{var s=i(1071);t.exports=function(t,e,i){void 0===i&&(i=0);for(var n=0;n{t.exports={AlignTo:i(62270),Angle:i(61148),Call:i(22015),GetFirst:i(31060),GetLast:i(52367),GridAlign:i(12673),IncAlpha:i(691),IncX:i(3877),IncXY:i(71020),IncY:i(28970),PlaceOnCircle:i(82249),PlaceOnEllipse:i(30285),PlaceOnLine:i(61557),PlaceOnRectangle:i(63549),PlaceOnTriangle:i(51629),PlayAnimation:i(1045),PropertyValueInc:i(6124),PropertyValueSet:i(23646),RandomCircle:i(4392),RandomEllipse:i(94985),RandomLine:i(63305),RandomRectangle:i(90739),RandomTriangle:i(91417),Rotate:i(26182),RotateAround:i(87299),RotateAroundDistance:i(92194),ScaleX:i(30363),ScaleXY:i(51449),ScaleY:i(64895),SetAlpha:i(30329),SetBlendMode:i(43954),SetDepth:i(70688),SetHitArea:i(8314),SetOrigin:i(12894),SetRotation:i(38767),SetScale:i(18584),SetScaleX:i(17381),SetScaleY:i(74370),SetScrollFactor:i(27773),SetScrollFactorX:i(75257),SetScrollFactorY:i(54512),SetTint:i(69423),SetVisible:i(58291),SetX:i(94833),SetXY:i(14284),SetY:i(96574),ShiftPosition:i(74086),Shuffle:i(86347),SmootherStep:i(9938),SmoothStep:i(1558),Spread:i(71060),ToggleVisible:i(11207),WrapInRectangle:i(24404)}},85463:(t,e,i)=>{var s=i(82897),n=i(56694),r=i(16938),o=i(2406),a=i(71519),h=i(10850),l=i(28834),u=new n({initialize:function(t,e,i){this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,h(i,"frames",[]),h(i,"defaultTextureKey",null),h(i,"sortFrames",!0)),this.frameRate=h(i,"frameRate",null),this.duration=h(i,"duration",null),this.msPerFrame,this.skipMissedFrames=h(i,"skipMissedFrames",!0),this.delay=h(i,"delay",0),this.repeat=h(i,"repeat",0),this.repeatDelay=h(i,"repeatDelay",0),this.yoyo=h(i,"yoyo",!1),this.showBeforeDelay=h(i,"showBeforeDelay",!1),this.showOnStart=h(i,"showOnStart",!1),this.hideOnComplete=h(i,"hideOnComplete",!1),this.paused=!1,this.calculateDuration(this,this.getTotalFrames(),this.duration,this.frameRate),this.manager.on&&(this.manager.on(r.PAUSE_ALL,this.pause,this),this.manager.on(r.RESUME_ALL,this.resume,this))},getTotalFrames:function(){return this.frames.length},calculateDuration:function(t,e,i,s){null===i&&null===s?(t.frameRate=24,t.duration=24/e*1e3):i&&null===s?(t.duration=i,t.frameRate=e/(i/1e3)):(t.frameRate=s,t.duration=e/s*1e3),t.msPerFrame=1e3/t.frameRate},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var i=this.getFrames(this.manager.textureManager,e);if(i.length>0){if(0===t)this.frames=i.concat(this.frames);else if(t===this.frames.length)this.frames=this.frames.concat(i);else{var s=this.frames.slice(0,t),n=this.frames.slice(t);this.frames=s.concat(i,n)}this.updateFrameSequence()}return this},checkFrame:function(t){return t>=0&&t0){r.isLast=!0,r.nextFrame=c[0],c[0].prevFrame=r;var y=1/(c.length-1);for(o=0;o0?t.inReverse&&t.forward?t.forward=!1:this.repeatAnimation(t):t.complete():this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e||(e=!1),t.inReverse===!e&&t.repeatCounter>0)return(0===t.repeatDelay||t.pendingRepeat)&&(t.forward=e),void this.repeatAnimation(t);if(t.inReverse===e||0!==t.repeatCounter){t.forward=e;var i=e?t.currentFrame.nextFrame:t.currentFrame.prevFrame;this.updateAndGetNextTick(t,i)}else t.complete()},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t.yoyo?this.handleYoyoFrame(t,!0):t.repeatCounter>0?(t.inReverse&&!t.forward||(t.forward=!0),this.repeatAnimation(t)):t.complete():this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.setCurrentFrame(e),this.getNextTick(t)},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop){if(0===t._pendingStopValue)return t.stop();t._pendingStopValue--}t.repeatDelay>0&&!t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t.repeatDelay):(t.repeatCounter--,t.forward?t.setCurrentFrame(t.currentFrame.nextFrame):t.setCurrentFrame(t.currentFrame.prevFrame),t.isPlaying&&(this.getNextTick(t),t.handleRepeat()))},toJSON:function(){var t={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showBeforeDelay:this.showBeforeDelay,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach((function(e){t.frames.push(e.toJSON())})),t},updateFrameSequence:function(){for(var t,e=this.frames.length,i=1/(e-1),s=0;s1?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):e>1&&(t.prevFrame=this.frames[s-1],t.nextFrame=this.frames[s+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.manager.off&&(this.manager.off(r.PAUSE_ALL,this.pause,this),this.manager.off(r.RESUME_ALL,this.resume,this)),this.manager.remove(this.key);for(var t=0;t{var s=new(i(56694))({initialize:function(t,e,i,s,n){void 0===n&&(n=!1),this.textureKey=t,this.textureFrame=e,this.index=i,this.frame=s,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0,this.isKeyFrame=n},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration,keyframe:this.isKeyFrame}},destroy:function(){this.frame=void 0}});t.exports=s},90249:(t,e,i)=>{var s=i(85463),n=i(56694),r=i(33885),o=i(6659),a=i(16938),h=i(97081),l=i(72632),u=i(10850),c=i(83392),d=i(13401),p=i(76400),f=new n({Extends:o,initialize:function(t){o.call(this),this.game=t,this.textureManager=null,this.globalTimeScale=1,this.anims=new r,this.mixes=new r,this.paused=!1,this.name="AnimationManager",t.events.once(h.BOOT,this.boot,this)},boot:function(){this.textureManager=this.game.textures,this.game.events.once(h.DESTROY,this.destroy,this)},addMix:function(t,e,i){var s=this.anims,n=this.mixes,r="string"==typeof t?t:t.key,o="string"==typeof e?e:e.key;if(s.has(r)&&s.has(o)){var a=n.get(r);a||(a={}),a[o]=i,n.set(r,a)}return this},removeMix:function(t,e){var i=this.mixes,s="string"==typeof t?t:t.key,n=i.get(s);if(n)if(e){var r="string"==typeof e?e:e.key;n.hasOwnProperty(r)&&delete n[r]}else e||i.delete(s);return this},getMix:function(t,e){var i=this.mixes,s="string"==typeof t?t:t.key,n="string"==typeof e?e:e.key,r=i.get(s);return r&&r.hasOwnProperty(n)?r[n]:0},add:function(t,e){return this.anims.has(t)?(console.warn("Animation key exists: "+t),this):(e.key=t,this.anims.set(t,e),this.emit(a.ADD_ANIMATION,t,e),this)},exists:function(t){return this.anims.has(t)},createFromAseprite:function(t,e,i){var s=[],n=this.game.cache.json.get(t);if(!n)return s;var r=this,o=u(n,"meta",null),a=u(n,"frames",null);o&&a&&u(o,"frameTags",[]).forEach((function(n){var o=[],h=l(n,"name",null),u=l(n,"from",0),d=l(n,"to",0),p=l(n,"direction","forward");if(h&&(!e||e&&e.indexOf(h)>-1)){for(var f=0,v=u;v<=d;v++){var g=v.toString(),m=a[g];if(m){var y=l(m,"duration",c.MAX_SAFE_INTEGER);o.push({key:t,frame:g,duration:y}),f+=y}}var x=f/o.length;o.forEach((function(t){t.duration-=x})),"reverse"===p&&(o=o.reverse());var T,w={key:h,frames:o,duration:f,yoyo:"pingpong"===p};i?i.anims&&(T=i.anims.create(w)):T=r.create(w),T&&s.push(T)}}));return s},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))||(i=new s(this,e,t),this.anims.set(e,i),this.emit(a.ADD_ANIMATION,e,i))),i},fromJSON:function(t,e){void 0===e&&(e=!1),e&&this.anims.clear(),"string"==typeof t&&(t=JSON.parse(t));var i=[];if(t.hasOwnProperty("anims")&&Array.isArray(t.anims)){for(var s=0;s{var s=i(56694),n=i(33885),r=i(72632),o=i(16938),a=i(85463),h=new s({initialize:function(t){this.parent=t,this.animationManager=t.scene.sys.anims,this.animationManager.on(o.REMOVE_ANIMATION,this.globalRemove,this),this.textureManager=this.animationManager.textureManager,this.anims=null,this.isPlaying=!1,this.hasStarted=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this.timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this.delay=0,this.repeat=0,this.repeatDelay=0,this.yoyo=!1,this.showBeforeDelay=!1,this.showOnStart=!1,this.hideOnComplete=!1,this.forward=!0,this.inReverse=!1,this.accumulator=0,this.nextTick=0,this.delayCounter=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},chain:function(t){var e=this.parent;if(void 0===t)return this.nextAnimsQueue.length=0,this.nextAnim=null,e;Array.isArray(t)||(t=[t]);for(var i=0;is.getTotalFrames()&&(h=0);var l=s.frames[h];0!==h||this.forward||(l=s.getLastFrame()),this.currentFrame=l}else console.warn("Missing animation: "+i);return this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.setCurrentFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.setCurrentFrame(t),this.parent},playAfterDelay:function(t,e){if(this.isPlaying){var i=this.nextAnim,s=this.nextAnimsQueue;i&&s.unshift(i),this.nextAnim=t,this._pendingStop=1,this._pendingStopValue=e}else this.delayCounter=e,this.play(t,!0);return this.parent},playAfterRepeat:function(t,e){if(void 0===e&&(e=1),this.isPlaying){var i=this.nextAnim,s=this.nextAnimsQueue;i&&s.unshift(i),-1!==this.repeatCounter&&e>this.repeatCounter&&(e=this.repeatCounter),this.nextAnim=t,this._pendingStop=2,this._pendingStopValue=e}else this.play(t);return this.parent},play:function(t,e){void 0===e&&(e=!1);var i=this.currentAnim,s=this.parent,n="string"==typeof t?t:t.key;if(e&&this.isPlaying&&i.key===n)return s;if(i&&this.isPlaying){var r=this.animationManager.getMix(i.key,t);if(r>0)return this.playAfterDelay(t,r)}return this.forward=!0,this.inReverse=!1,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t)},playReverse:function(t,e){void 0===e&&(e=!1);var i="string"==typeof t?t:t.key;return e&&this.isPlaying&&this.currentAnim.key===i?this.parent:(this.forward=!1,this.inReverse=!0,this._paused=!1,this._wasPlaying=!0,this.startAnimation(t))},startAnimation:function(t){this.load(t);var e=this.currentAnim,i=this.parent;return e?(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat,e.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!1,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.delayCounter+=this.delay,0===this.delayCounter?this.handleStart():this.showBeforeDelay&&this.setCurrentFrame(this.currentFrame),i):i},handleStart:function(){this.showOnStart&&this.parent.setVisible(!0),this.setCurrentFrame(this.currentFrame),this.hasStarted=!0,this.emitEvents(o.ANIMATION_START)},handleRepeat:function(){this.pendingRepeat=!1,this.emitEvents(o.ANIMATION_REPEAT)},handleStop:function(){this._pendingStop=0,this.isPlaying=!1,this.emitEvents(o.ANIMATION_STOP)},handleComplete:function(){this._pendingStop=0,this.isPlaying=!1,this.hideOnComplete&&this.parent.setVisible(!1),this.emitEvents(o.ANIMATION_COMPLETE,o.ANIMATION_COMPLETE_KEY)},emitEvents:function(t,e){var i=this.currentAnim;if(i){var s=this.currentFrame,n=this.parent,r=s.textureFrame;n.emit(t,i,s,n,r),e&&n.emit(e+i.key,i,s,n,r)}},reverse:function(){return this.isPlaying&&(this.inReverse=!this.inReverse,this.forward=!this.forward),this.parent},getProgress:function(){var t=this.currentFrame;if(!t)return 0;var e=t.progress;return this.inReverse&&(e*=-1),e},setProgress:function(t){return this.forward||(t=1-t),this.setCurrentFrame(this.currentAnim.getFrameByProgress(t)),this.parent},setRepeat:function(t){return this.repeatCounter=-1===t?Number.MAX_VALUE:t,this.parent},globalRemove:function(t,e){void 0===e&&(e=this.currentAnim),this.isPlaying&&e.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},restart:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var i=this.currentAnim,s=this.parent;return i?(e&&(this.repeatCounter=-1===this.repeat?Number.MAX_VALUE:this.repeat),i.getFirstTick(this),this.emitEvents(o.ANIMATION_RESTART),this.isPlaying=!0,this.pendingRepeat=!1,this.hasStarted=!t,this._pendingStop=0,this._pendingStopValue=0,this._paused=!1,this.setCurrentFrame(i.frames[0]),this.parent):s},complete:function(){if(this._pendingStop=0,this.isPlaying=!1,this.currentAnim&&this.handleComplete(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.length>0?this.nextAnimsQueue.shift():null,this.play(t)}return this.parent},stop:function(){if(this._pendingStop=0,this.isPlaying=!1,this.delayCounter=0,this.currentAnim&&this.handleStop(),this.nextAnim){var t=this.nextAnim;this.nextAnim=this.nextAnimsQueue.shift(),this.play(t)}return this.parent},stopAfterDelay:function(t){return this._pendingStop=1,this._pendingStopValue=t,this.parent},stopAfterRepeat:function(t){return void 0===t&&(t=1),-1!==this.repeatCounter&&t>this.repeatCounter&&(t=this.repeatCounter),this._pendingStop=2,this._pendingStopValue=t,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},getTotalFrames:function(){return this.currentAnim?this.currentAnim.getTotalFrames():0},update:function(t,e){var i=this.currentAnim;if(this.isPlaying&&i&&!i.paused){if(this.accumulator+=e*this.timeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.stop();if(this.hasStarted){if(this.accumulator>=this.nextTick&&(this.forward?i.nextFrame(this):i.previousFrame(this),this.isPlaying&&0===this._pendingStop&&this.skipMissedFrames&&this.accumulator>this.nextTick)){var s=0;do{this.forward?i.nextFrame(this):i.previousFrame(this),s++}while(this.isPlaying&&this.accumulator>this.nextTick&&s<60)}}else this.accumulator>=this.delayCounter&&(this.accumulator-=this.delayCounter,this.handleStart())}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),t.setAlpha&&(e.alpha=t.alpha),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),this.isPlaying&&this.hasStarted&&(this.emitEvents(o.ANIMATION_UPDATE),3===this._pendingStop&&this._pendingStopValue===t&&this.stop()),e},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},get:function(t){return this.anims?this.anims.get(t):null},exists:function(t){return!!this.anims&&this.anims.has(t)},create:function(t){var e=t.key,i=!1;return e&&((i=this.get(e))||(i=new a(this,e,t),this.anims||(this.anims=new n),this.anims.set(e,i))),i},createFromAseprite:function(t,e){return this.animationManager.createFromAseprite(t,e,this.parent)},generateFrameNames:function(t,e){return this.animationManager.generateFrameNames(t,e)},generateFrameNumbers:function(t,e){return this.animationManager.generateFrameNumbers(t,e)},remove:function(t){var e=this.get(t);return e&&(this.currentAnim===e&&this.stop(),this.anims.delete(t)),e},destroy:function(){this.animationManager.off(o.REMOVE_ANIMATION,this.globalRemove,this),this.anims&&this.anims.clear(),this.animationManager=null,this.parent=null,this.nextAnim=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null},isPaused:{get:function(){return this._paused}}});t.exports=h},44509:t=>{t.exports="add"},84563:t=>{t.exports="animationcomplete"},61586:t=>{t.exports="animationcomplete-"},72175:t=>{t.exports="animationrepeat"},568:t=>{t.exports="animationrestart"},37690:t=>{t.exports="animationstart"},58525:t=>{t.exports="animationstop"},5243:t=>{t.exports="animationupdate"},10598:t=>{t.exports="pauseall"},4860:t=>{t.exports="remove"},31865:t=>{t.exports="resumeall"},16938:(t,e,i)=>{t.exports={ADD_ANIMATION:i(44509),ANIMATION_COMPLETE:i(84563),ANIMATION_COMPLETE_KEY:i(61586),ANIMATION_REPEAT:i(72175),ANIMATION_RESTART:i(568),ANIMATION_START:i(37690),ANIMATION_STOP:i(58525),ANIMATION_UPDATE:i(5243),PAUSE_ALL:i(10598),REMOVE_ANIMATION:i(4860),RESUME_ALL:i(31865)}},13517:(t,e,i)=>{t.exports={Animation:i(85463),AnimationFrame:i(71519),AnimationManager:i(90249),AnimationState:i(16569),Events:i(16938)}},23740:(t,e,i)=>{var s=i(56694),n=i(33885),r=i(6659),o=i(69773),a=new s({initialize:function(){this.entries=new n,this.events=new r},add:function(t,e){return this.entries.set(t,e),this.events.emit(o.ADD,this,t,e),this},has:function(t){return this.entries.has(t)},exists:function(t){return this.entries.has(t)},get:function(t){return this.entries.get(t)},remove:function(t){var e=this.get(t);return e&&(this.entries.delete(t),this.events.emit(o.REMOVE,this,t,e.data)),this},getKeys:function(){return this.entries.keys()},destroy:function(){this.entries.clear(),this.events.removeAllListeners(),this.entries=null,this.events=null}});t.exports=a},43474:(t,e,i)=>{var s=i(23740),n=i(56694),r=i(97081),o=new n({initialize:function(t){this.game=t,this.binary=new s,this.bitmapFont=new s,this.json=new s,this.physics=new s,this.shader=new s,this.audio=new s,this.video=new s,this.text=new s,this.html=new s,this.obj=new s,this.tilemap=new s,this.xml=new s,this.custom={},this.game.events.once(r.DESTROY,this.destroy,this)},addCustom:function(t){return this.custom.hasOwnProperty(t)||(this.custom[t]=new s),this.custom[t]},destroy:function(){for(var t=["binary","bitmapFont","json","physics","shader","audio","video","text","html","obj","tilemap","xml"],e=0;e{t.exports="add"},75968:t=>{t.exports="remove"},69773:(t,e,i)=>{t.exports={ADD:i(94762),REMOVE:i(75968)}},45820:(t,e,i)=>{t.exports={BaseCache:i(23740),CacheManager:i(43474),Events:i(69773)}},51052:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(75606),o=i(6659),a=i(89787),h=i(74118),l=i(69360),u=i(93222),c=i(93736),d=new s({Extends:o,Mixins:[n.Alpha,n.Visible],initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),o.call(this),this.scene,this.sceneManager,this.scaleManager,this.cameraManager,this.id=0,this.name="",this.roundPixels=!1,this.useBounds=!1,this.worldView=new h,this.dirty=!0,this._x=t,this._y=e,this._width=i,this._height=s,this._bounds=new h,this._scrollX=0,this._scrollY=0,this._zoomX=1,this._zoomY=1,this._rotation=0,this.matrix=new l,this.transparent=!0,this.backgroundColor=u("rgba(0,0,0,0)"),this.disableCull=!1,this.culledObjects=[],this.midPoint=new c(i/2,s/2),this.originX=.5,this.originY=.5,this._customViewport=!1,this.mask=null,this._maskCamera=null,this.renderList=[],this.isSceneCamera=!0},addToRenderList:function(t){this.renderList.push(t)},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this},getScroll:function(t,e,i){void 0===i&&(i=new c);var s=.5*this.width,n=.5*this.height;return i.x=t-s,i.y=e-n,this.useBounds&&(i.x=this.clampX(i.x),i.y=this.clampY(i.y)),i},centerOnX:function(t){var e=.5*this.width;return this.midPoint.x=t,this.scrollX=t-e,this.useBounds&&(this.scrollX=this.clampX(this.scrollX)),this},centerOnY:function(t){var e=.5*this.height;return this.midPoint.y=t,this.scrollY=t-e,this.useBounds&&(this.scrollY=this.clampY(this.scrollY)),this},centerOn:function(t,e){return this.centerOnX(t),this.centerOnY(e),this},centerToBounds:function(){if(this.useBounds){var t=this._bounds,e=.5*this.width,i=.5*this.height;this.midPoint.set(t.centerX,t.centerY),this.scrollX=t.centerX-e,this.scrollY=t.centerY-i}return this},centerToSize:function(){return this.scrollX=.5*this.width,this.scrollY=.5*this.height,this},cull:function(t){if(this.disableCull)return t;var e=this.matrix.matrix,i=e[0],s=e[1],n=e[2],r=e[3],o=i*r-s*n;if(!o)return t;var a=e[4],h=e[5],l=this.scrollX,u=this.scrollY,c=this.width,d=this.height,p=this.y,f=p+d,v=this.x,g=v+c,m=this.culledObjects,y=t.length;o=1/o,m.length=0;for(var x=0;xv&&E*i+S*n+ap&&E*s+S*r+hn&&(t=n),t},clampY:function(t){var e=this._bounds,i=this.displayHeight,s=e.y+(i-this.height)/2,n=Math.max(s,s+e.height-i);return tn&&(t=n),t},removeBounds:function(){return this.useBounds=!1,this.dirty=!0,this._bounds.setEmpty(),this},setAngle:function(t){return void 0===t&&(t=0),this.rotation=r(t),this},setBackgroundColor:function(t){return void 0===t&&(t="rgba(0,0,0,0)"),this.backgroundColor=u(t),this.transparent=0===this.backgroundColor.alpha,this},setBounds:function(t,e,i,s,n){return void 0===n&&(n=!1),this._bounds.setTo(t,e,i,s),this.dirty=!0,this.useBounds=!0,n?this.centerToBounds():(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},getBounds:function(t){void 0===t&&(t=new h);var e=this._bounds;return t.setTo(e.x,e.y,e.width,e.height),t},setName:function(t){return void 0===t&&(t=""),this.name=t,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setRoundPixels:function(t){return this.roundPixels=t,this},setScene:function(t,e){void 0===e&&(e=!0),this.scene&&this._customViewport&&this.sceneManager.customViewports--,this.scene=t,this.isSceneCamera=e;var i=t.sys;return this.sceneManager=i.game.scene,this.scaleManager=i.scale,this.cameraManager=i.cameras,this.updateSystem(),this},setScroll:function(t,e){return void 0===e&&(e=t),this.scrollX=t,this.scrollY=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},setViewport:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setZoom:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),0===t&&(t=.001),0===e&&(e=.001),this.zoomX=t,this.zoomY=e,this},setMask:function(t,e){return void 0===e&&(e=!0),this.mask=t,this._maskCamera=e?this.cameraManager.default:this,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},toJSON:function(){var t={name:this.name,x:this.x,y:this.y,width:this.width,height:this.height,zoom:this.zoom,rotation:this.rotation,roundPixels:this.roundPixels,scrollX:this.scrollX,scrollY:this.scrollY,backgroundColor:this.backgroundColor.rgba};return this.useBounds&&(t.bounds={x:this._bounds.x,y:this._bounds.y,width:this._bounds.width,height:this._bounds.height}),t},update:function(){},setIsSceneCamera:function(t){return this.isSceneCamera=t,this},updateSystem:function(){if(this.scaleManager&&this.isSceneCamera){var t=0!==this._x||0!==this._y||this.scaleManager.width!==this._width||this.scaleManager.height!==this._height,e=this.sceneManager;t&&!this._customViewport?e.customViewports++:!t&&this._customViewport&&e.customViewports--,this.dirty=!0,this._customViewport=t}},destroy:function(){this.emit(a.DESTROY,this),this.removeAllListeners(),this.matrix.destroy(),this.culledObjects=[],this._customViewport&&this.sceneManager.customViewports--,this.renderList=[],this._bounds=null,this.scene=null,this.scaleManager=null,this.sceneManager=null,this.cameraManager=null},x:{get:function(){return this._x},set:function(t){this._x=t,this.updateSystem()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.updateSystem()}},width:{get:function(){return this._width},set:function(t){this._width=t,this.updateSystem()}},height:{get:function(){return this._height},set:function(t){this._height=t,this.updateSystem()}},scrollX:{get:function(){return this._scrollX},set:function(t){t!==this._scrollX&&(this._scrollX=t,this.dirty=!0)}},scrollY:{get:function(){return this._scrollY},set:function(t){t!==this._scrollY&&(this._scrollY=t,this.dirty=!0)}},zoom:{get:function(){return(this._zoomX+this._zoomY)/2},set:function(t){this._zoomX=t,this._zoomY=t,this.dirty=!0}},zoomX:{get:function(){return this._zoomX},set:function(t){this._zoomX=t,this.dirty=!0}},zoomY:{get:function(){return this._zoomY},set:function(t){this._zoomY=t,this.dirty=!0}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=t,this.dirty=!0}},centerX:{get:function(){return this.x+.5*this.width}},centerY:{get:function(){return this.y+.5*this.height}},displayWidth:{get:function(){return this.width/this.zoomX}},displayHeight:{get:function(){return this.height/this.zoomY}}});t.exports=d},47751:(t,e,i)=>{var s=i(51052),n=i(79993),r=i(82897),o=i(56694),a=i(64937),h=i(53030),l=i(89787),u=i(42798),c=i(74118),d=i(93736),p=new o({Extends:s,Mixins:[a.Pipeline],initialize:function(t,e,i,n){s.call(this,t,e,i,n),this.postPipelines=[],this.pipelineData={},this.inputEnabled=!0,this.fadeEffect=new h.Fade(this),this.flashEffect=new h.Flash(this),this.shakeEffect=new h.Shake(this),this.panEffect=new h.Pan(this),this.rotateToEffect=new h.RotateTo(this),this.zoomEffect=new h.Zoom(this),this.lerp=new d(1,1),this.followOffset=new d,this.deadzone=null,this._follow=null},setDeadzone:function(t,e){if(void 0===t)this.deadzone=null;else{if(this.deadzone?(this.deadzone.width=t,this.deadzone.height=e):this.deadzone=new c(0,0,t,e),this._follow){var i=this.width/2,s=this.height/2,r=this._follow.x-this.followOffset.x,o=this._follow.y-this.followOffset.y;this.midPoint.set(r,o),this.scrollX=r-i,this.scrollY=o-s}n(this.deadzone,this.midPoint.x,this.midPoint.y)}return this},fadeIn:function(t,e,i,s,n,r){return this.fadeEffect.start(!1,t,e,i,s,!0,n,r)},fadeOut:function(t,e,i,s,n,r){return this.fadeEffect.start(!0,t,e,i,s,!0,n,r)},fadeFrom:function(t,e,i,s,n,r,o){return this.fadeEffect.start(!1,t,e,i,s,n,r,o)},fade:function(t,e,i,s,n,r,o){return this.fadeEffect.start(!0,t,e,i,s,n,r,o)},flash:function(t,e,i,s,n,r,o){return this.flashEffect.start(t,e,i,s,n,r,o)},shake:function(t,e,i,s,n){return this.shakeEffect.start(t,e,i,s,n)},pan:function(t,e,i,s,n,r,o){return this.panEffect.start(t,e,i,s,n,r,o)},rotateTo:function(t,e,i,s,n,r,o){return this.rotateToEffect.start(t,e,i,s,n,r,o)},zoomTo:function(t,e,i,s,n,r){return this.zoomEffect.start(t,e,i,s,n,r)},preRender:function(){this.renderList.length=0;var t=this.width,e=this.height,i=.5*t,s=.5*e,r=this.zoom,o=this.matrix,a=t*this.originX,h=e*this.originY,c=this._follow,d=this.deadzone,p=this.scrollX,f=this.scrollY;d&&n(d,this.midPoint.x,this.midPoint.y);var v=!1;if(this.roundPixels&&(a=Math.floor(a),h=Math.floor(h)),c&&!this.panEffect.isRunning){var g=this.lerp,m=c.x-this.followOffset.x,y=c.y-this.followOffset.y;this.roundPixels&&(m=Math.floor(m),y=Math.floor(y)),d?(md.right&&(p=u(p,p+(m-d.right),g.x)),yd.bottom&&(f=u(f,f+(y-d.bottom),g.y))):(p=u(p,m-a,g.x),f=u(f,y-h,g.y)),v=!0}this.useBounds&&(p=this.clampX(p),f=this.clampY(f)),this.roundPixels&&(p=Math.floor(p),f=Math.floor(f)),this.scrollX=p,this.scrollY=f;var x=p+i,T=f+s;this.midPoint.set(x,T);var w=t/r,b=e/r,E=x-w/2,S=T-b/2;this.roundPixels&&(E=Math.floor(E),S=Math.floor(S)),this.worldView.setTo(E,S,w,b),o.applyITRS(Math.floor(this.x+a),Math.floor(this.y+h),this.rotation,r,r),o.translate(-a,-h),this.shakeEffect.preRender(),v&&this.emit(l.FOLLOW_UPDATE,this,c)},setLerp:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.lerp.set(t,e),this},setFollowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=0),this.followOffset.set(t,e),this},startFollow:function(t,e,i,s,n,o){void 0===e&&(e=!1),void 0===i&&(i=1),void 0===s&&(s=i),void 0===n&&(n=0),void 0===o&&(o=n),this._follow=t,this.roundPixels=e,i=r(i,0,1),s=r(s,0,1),this.lerp.set(i,s),this.followOffset.set(n,o);var a=this.width/2,h=this.height/2,l=t.x-n,u=t.y-o;return this.midPoint.set(l,u),this.scrollX=l-a,this.scrollY=u-h,this.useBounds&&(this.scrollX=this.clampX(this.scrollX),this.scrollY=this.clampY(this.scrollY)),this},stopFollow:function(){return this._follow=null,this},resetFX:function(){return this.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.rotateToEffect.update(t,e),this.panEffect.update(t,e),this.zoomEffect.update(t,e),this.shakeEffect.update(t,e),this.flashEffect.update(t,e),this.fadeEffect.update(t,e))},destroy:function(){this.resetFX(),s.prototype.destroy.call(this),this._follow=null,this.deadzone=null}});t.exports=p},62382:(t,e,i)=>{var s=i(47751),n=i(56694),r=i(72632),o=i(91963),a=i(94287),h=i(40444),l=i(7599),u=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.roundPixels=t.sys.game.config.roundPixels,this.cameras=[],this.main,this.default,t.sys.events.once(l.BOOT,this.boot,this),t.sys.events.on(l.START,this.start,this)},boot:function(){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0],this.default=new s(0,0,t.scale.width,t.scale.height).setScene(this.scene),t.game.scale.on(h.RESIZE,this.onResize,this),this.systems.events.once(l.DESTROY,this.destroy,this)},start:function(){if(!this.main){var t=this.systems;t.settings.cameras?this.fromJSON(t.settings.cameras):this.add(),this.main=this.cameras[0]}var e=this.systems.events;e.on(l.UPDATE,this.update,this),e.once(l.SHUTDOWN,this.shutdown,this)},add:function(t,e,i,n,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),void 0===r&&(r=!1),void 0===o&&(o="");var a=new s(t,e,i,n);return a.setName(o),a.setScene(this.scene),a.setRoundPixels(this.roundPixels),a.id=this.getNextID(),this.cameras.push(a),r&&(this.main=a),a},addExisting:function(t,e){return void 0===e&&(e=!1),-1===this.cameras.indexOf(t)?(t.id=this.getNextID(),t.setRoundPixels(this.roundPixels),this.cameras.push(t),e&&(this.main=t),t):null},getNextID:function(){for(var t=this.cameras,e=1,i=0;i<32;i++){for(var s=!1,n=0;n0){r.preRender();var o=this.getVisibleChildren(e.getChildren(),r);t.render(i,o,r)}}},getVisibleChildren:function(t,e){return t.filter((function(t){return t.willRender(e)}))},resetAll:function(){for(var t=0;t{var s=i(82897),n=i(56694),r=i(89787),o=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.isComplete=!1,this.direction=!0,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,o,a,h){if(void 0===t&&(t=!0),void 0===e&&(e=1e3),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===o&&(o=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),!o&&this.isRunning)return this.camera;this.isRunning=!0,this.isComplete=!1,this.duration=e,this.direction=t,this.progress=0,this.red=i,this.green=s,this.blue=n,this.alpha=t?Number.MIN_VALUE:1,this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h;var l=t?r.FADE_OUT_START:r.FADE_IN_START;return this.camera.emit(l,this.camera,this,e,i,s,n),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var s=i(82897),n=i(56694),r=i(89787),o=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.red=0,this.green=0,this.blue=0,this.alpha=1,this.progress=0,this._elapsed=0,this._alpha,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,o,a){return void 0===t&&(t=250),void 0===e&&(e=255),void 0===i&&(i=255),void 0===s&&(s=255),void 0===n&&(n=!1),void 0===o&&(o=null),void 0===a&&(a=this.camera.scene),!n&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,this.red=e,this.green=i,this.blue=s,this._alpha=this.alpha,this._elapsed=0,this._onUpdate=o,this._onUpdateScope=a,this.camera.emit(r.FLASH_START,this.camera,this,t,e,i,s)),this.camera},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var s=i(82897),n=i(56694),r=i(35060),o=i(89787),a=i(93736),h=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=new a,this.current=new a,this.destination=new a,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,a,h){void 0===i&&(i=1e3),void 0===s&&(s=r.Linear),void 0===n&&(n=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene);var l=this.camera;return!n&&this.isRunning||(this.isRunning=!0,this.duration=i,this.progress=0,this.source.set(l.scrollX,l.scrollY),this.destination.set(t,e),l.getScroll(t,e,this.current),"string"==typeof s&&r.hasOwnProperty(s)?this.ease=r[s]:"function"==typeof s&&(this.ease=s),this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h,this.camera.emit(o.PAN_START,this.camera,this,i,t,e)),l},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=s(this._elapsed/this.duration,0,1);this.progress=i;var n=this.camera;if(this._elapsed{var s=i(82897),n=i(56694),r=i(89787),o=i(35060),a=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=0,this.current=0,this.destination=0,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope,this.clockwise=!0,this.shortestPath=!1},start:function(t,e,i,s,n,a,h){void 0===i&&(i=1e3),void 0===s&&(s=o.Linear),void 0===n&&(n=!1),void 0===a&&(a=null),void 0===h&&(h=this.camera.scene),void 0===e&&(e=!1),this.shortestPath=e;var l=t;t<0?(l=-1*t,this.clockwise=!1):this.clockwise=!0;var u=360*Math.PI/180;l-=Math.floor(l/u)*u;var c=this.camera;if(!n&&this.isRunning)return c;if(this.isRunning=!0,this.duration=i,this.progress=0,this.source=c.rotation,this.destination=l,"string"==typeof s&&o.hasOwnProperty(s)?this.ease=o[s]:"function"==typeof s&&(this.ease=s),this._elapsed=0,this._onUpdate=a,this._onUpdateScope=h,this.shortestPath){var d=0,p=0;(d=this.destination>this.source?Math.abs(this.destination-this.source):Math.abs(this.destination+u)-this.source)<(p=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+u)-this.destination)?this.clockwise=!0:d>p&&(this.clockwise=!1)}return this.camera.emit(r.ROTATE_START,this.camera,this,i,l),c},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=s(this._elapsed/this.duration,0,1);this.progress=i;var n=this.camera;if(this._elapsed=l?Math.abs(h-l):Math.abs(h+a)-l;var u=0;u=this.clockwise?n.rotation+o*r:n.rotation-o*r,n.rotation=u,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,n,i,u)}else n.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,n,i,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(r.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});t.exports=a},3241:(t,e,i)=>{var s=i(82897),n=i(56694),r=i(89787),o=i(93736),a=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.intensity=new o,this.progress=0,this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n){return void 0===t&&(t=100),void 0===e&&(e=.05),void 0===i&&(i=!1),void 0===s&&(s=null),void 0===n&&(n=this.camera.scene),!i&&this.isRunning||(this.isRunning=!0,this.duration=t,this.progress=0,"number"==typeof e?this.intensity.set(e):this.intensity.set(e.x,e.y),this._elapsed=0,this._offsetX=0,this._offsetY=0,this._onUpdate=s,this._onUpdateScope=n,this.camera.emit(r.SHAKE_START,this.camera,this,t,e)),this.camera},preRender:function(){this.isRunning&&this.camera.matrix.translate(this._offsetX,this._offsetY)},update:function(t,e){if(this.isRunning)if(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.camera,this.progress),this._elapsed{var s=i(82897),n=i(56694),r=i(35060),o=i(89787),a=new n({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,s,n,a){void 0===e&&(e=1e3),void 0===i&&(i=r.Linear),void 0===s&&(s=!1),void 0===n&&(n=null),void 0===a&&(a=this.camera.scene);var h=this.camera;return!s&&this.isRunning||(this.isRunning=!0,this.duration=e,this.progress=0,this.source=h.zoom,this.destination=t,"string"==typeof i&&r.hasOwnProperty(i)?this.ease=r[i]:"function"==typeof i&&(this.ease=i),this._elapsed=0,this._onUpdate=n,this._onUpdateScope=a,this.camera.emit(o.ZOOM_START,this.camera,this,e,t)),h},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=s(this._elapsed/this.duration,0,1),this._elapsed{t.exports={Fade:i(92522),Flash:i(22151),Pan:i(37551),Shake:i(3241),RotateTo:i(1771),Zoom:i(13383)}},39577:t=>{t.exports="cameradestroy"},85373:t=>{t.exports="camerafadeincomplete"},92057:t=>{t.exports="camerafadeinstart"},1903:t=>{t.exports="camerafadeoutcomplete"},96131:t=>{t.exports="camerafadeoutstart"},85409:t=>{t.exports="cameraflashcomplete"},25500:t=>{t.exports="cameraflashstart"},44071:t=>{t.exports="followupdate"},19818:t=>{t.exports="camerapancomplete"},80002:t=>{t.exports="camerapanstart"},87966:t=>{t.exports="postrender"},74217:t=>{t.exports="prerender"},34805:t=>{t.exports="camerarotatecomplete"},30408:t=>{t.exports="camerarotatestart"},49856:t=>{t.exports="camerashakecomplete"},69189:t=>{t.exports="camerashakestart"},67657:t=>{t.exports="camerazoomcomplete"},14229:t=>{t.exports="camerazoomstart"},89787:(t,e,i)=>{t.exports={DESTROY:i(39577),FADE_IN_COMPLETE:i(85373),FADE_IN_START:i(92057),FADE_OUT_COMPLETE:i(1903),FADE_OUT_START:i(96131),FLASH_COMPLETE:i(85409),FLASH_START:i(25500),FOLLOW_UPDATE:i(44071),PAN_COMPLETE:i(19818),PAN_START:i(80002),POST_RENDER:i(87966),PRE_RENDER:i(74217),ROTATE_COMPLETE:i(34805),ROTATE_START:i(30408),SHAKE_COMPLETE:i(49856),SHAKE_START:i(69189),ZOOM_COMPLETE:i(67657),ZOOM_START:i(14229)}},32356:(t,e,i)=>{t.exports={Camera:i(47751),BaseCamera:i(51052),CameraManager:i(62382),Effects:i(53030),Events:i(89787)}},84219:(t,e,i)=>{var s=i(56694),n=i(10850),r=new s({initialize:function(t){this.camera=n(t,"camera",null),this.left=n(t,"left",null),this.right=n(t,"right",null),this.up=n(t,"up",null),this.down=n(t,"down",null),this.zoomIn=n(t,"zoomIn",null),this.zoomOut=n(t,"zoomOut",null),this.zoomSpeed=n(t,"zoomSpeed",.01),this.minZoom=n(t,"minZoom",.001),this.maxZoom=n(t,"maxZoom",1e3),this.speedX=0,this.speedY=0;var e=n(t,"speed",null);"number"==typeof e?(this.speedX=e,this.speedY=e):(this.speedX=n(t,"speed.x",0),this.speedY=n(t,"speed.y",0)),this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this.up&&this.up.isDown?e.scrollY-=this.speedY*t|0:this.down&&this.down.isDown&&(e.scrollY+=this.speedY*t|0),this.left&&this.left.isDown?e.scrollX-=this.speedX*t|0:this.right&&this.right.isDown&&(e.scrollX+=this.speedX*t|0),this.zoomIn&&this.zoomIn.isDown?(e.zoom-=this.zoomSpeed,e.zoomthis.maxZoom&&(e.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},69370:(t,e,i)=>{var s=i(56694),n=i(10850),r=new s({initialize:function(t){this.camera=n(t,"camera",null),this.left=n(t,"left",null),this.right=n(t,"right",null),this.up=n(t,"up",null),this.down=n(t,"down",null),this.zoomIn=n(t,"zoomIn",null),this.zoomOut=n(t,"zoomOut",null),this.zoomSpeed=n(t,"zoomSpeed",.01),this.minZoom=n(t,"minZoom",.001),this.maxZoom=n(t,"maxZoom",1e3),this.accelX=0,this.accelY=0;var e=n(t,"acceleration",null);"number"==typeof e?(this.accelX=e,this.accelY=e):(this.accelX=n(t,"acceleration.x",0),this.accelY=n(t,"acceleration.y",0)),this.dragX=0,this.dragY=0;var i=n(t,"drag",null);"number"==typeof i?(this.dragX=i,this.dragY=i):(this.dragX=n(t,"drag.x",0),this.dragY=n(t,"drag.y",0)),this.maxSpeedX=0,this.maxSpeedY=0;var s=n(t,"maxSpeed",null);"number"==typeof s?(this.maxSpeedX=s,this.maxSpeedY=s):(this.maxSpeedX=n(t,"maxSpeed.x",0),this.maxSpeedY=n(t,"maxSpeed.y",0)),this._speedX=0,this._speedY=0,this._zoom=0,this.active=null!==this.camera},start:function(){return this.active=null!==this.camera,this},stop:function(){return this.active=!1,this},setCamera:function(t){return this.camera=t,this},update:function(t){if(this.active){void 0===t&&(t=1);var e=this.camera;this._speedX>0?(this._speedX-=this.dragX*t,this._speedX<0&&(this._speedX=0)):this._speedX<0&&(this._speedX+=this.dragX*t,this._speedX>0&&(this._speedX=0)),this._speedY>0?(this._speedY-=this.dragY*t,this._speedY<0&&(this._speedY=0)):this._speedY<0&&(this._speedY+=this.dragY*t,this._speedY>0&&(this._speedY=0)),this.up&&this.up.isDown?(this._speedY+=this.accelY,this._speedY>this.maxSpeedY&&(this._speedY=this.maxSpeedY)):this.down&&this.down.isDown&&(this._speedY-=this.accelY,this._speedY<-this.maxSpeedY&&(this._speedY=-this.maxSpeedY)),this.left&&this.left.isDown?(this._speedX+=this.accelX,this._speedX>this.maxSpeedX&&(this._speedX=this.maxSpeedX)):this.right&&this.right.isDown&&(this._speedX-=this.accelX,this._speedX<-this.maxSpeedX&&(this._speedX=-this.maxSpeedX)),this.zoomIn&&this.zoomIn.isDown?this._zoom=-this.zoomSpeed:this.zoomOut&&this.zoomOut.isDown?this._zoom=this.zoomSpeed:this._zoom=0,0!==this._speedX&&(e.scrollX-=this._speedX*t|0),0!==this._speedY&&(e.scrollY-=this._speedY*t|0),0!==this._zoom&&(e.zoom+=this._zoom,e.zoomthis.maxZoom&&(e.zoom=this.maxZoom))}},destroy:function(){this.camera=null,this.left=null,this.right=null,this.up=null,this.down=null,this.zoomIn=null,this.zoomOut=null}});t.exports=r},6524:(t,e,i)=>{t.exports={FixedKeyControl:i(84219),SmoothedKeyControl:i(69370)}},44143:(t,e,i)=>{t.exports={Controls:i(6524),Scene2D:i(32356)}},86459:(t,e,i)=>{var s={VERSION:"3.60.0-beta.18",BlendModes:i(95723),ScaleModes:i(27394),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=s},14033:(t,e,i)=>{var s=i(56694),n=i(86459),r=i(18360),o=i(77290),a=i(72632),h=i(10850),l=i(42911),u=i(72283),c=i(5923),d=i(65641),p=i(93222),f=new s({initialize:function(t){void 0===t&&(t={});var e=h(t,"scale",null);this.width=h(e,"width",1024,t),this.height=h(e,"height",768,t),this.zoom=h(e,"zoom",1,t),this.parent=h(e,"parent",void 0,t),this.scaleMode=h(e,e?"mode":"scaleMode",0,t),this.expandParent=h(e,"expandParent",!0,t),this.autoRound=h(e,"autoRound",!1,t),this.autoCenter=h(e,"autoCenter",0,t),this.resizeInterval=h(e,"resizeInterval",500,t),this.fullscreenTarget=h(e,"fullscreenTarget",null,t),this.minWidth=h(e,"minWidth",0,t),this.maxWidth=h(e,"maxWidth",0,t),this.minHeight=h(e,"minHeight",0,t),this.maxHeight=h(e,"maxHeight",0,t),this.renderType=h(t,"type",n.AUTO),this.canvas=h(t,"canvas",null),this.context=h(t,"context",null),this.canvasStyle=h(t,"canvasStyle",null),this.customEnvironment=h(t,"customEnvironment",!1),this.sceneConfig=h(t,"scene",null),this.seed=h(t,"seed",[(Date.now()*Math.random()).toString()]),c.RND=new c.RandomDataGenerator(this.seed),this.gameTitle=h(t,"title",""),this.gameURL=h(t,"url","https://phaser.io"),this.gameVersion=h(t,"version",""),this.autoFocus=h(t,"autoFocus",!0),this.stableSort=h(t,"stableSort",-1),-1===this.stableSort&&(this.stableSort=o.browser.es2019?1:0),o.features.stableSort=this.stableSort,this.domCreateContainer=h(t,"dom.createContainer",!1),this.domPointerEvents=h(t,"dom.pointerEvents","none"),this.inputKeyboard=h(t,"input.keyboard",!0),this.inputKeyboardEventTarget=h(t,"input.keyboard.target",window),this.inputKeyboardCapture=h(t,"input.keyboard.capture",[]),this.inputMouse=h(t,"input.mouse",!0),this.inputMouseEventTarget=h(t,"input.mouse.target",null),this.inputMousePreventDefaultDown=h(t,"input.mouse.preventDefaultDown",!0),this.inputMousePreventDefaultUp=h(t,"input.mouse.preventDefaultUp",!0),this.inputMousePreventDefaultMove=h(t,"input.mouse.preventDefaultMove",!0),this.inputMousePreventDefaultWheel=h(t,"input.mouse.preventDefaultWheel",!0),this.inputTouch=h(t,"input.touch",o.input.touch),this.inputTouchEventTarget=h(t,"input.touch.target",null),this.inputTouchCapture=h(t,"input.touch.capture",!0),this.inputActivePointers=h(t,"input.activePointers",1),this.inputSmoothFactor=h(t,"input.smoothFactor",0),this.inputWindowEvents=h(t,"input.windowEvents",!0),this.inputGamepad=h(t,"input.gamepad",!1),this.inputGamepadEventTarget=h(t,"input.gamepad.target",window),this.disableContextMenu=h(t,"disableContextMenu",!1),this.audio=h(t,"audio",{}),this.hideBanner=!1===h(t,"banner",null),this.hidePhaser=h(t,"banner.hidePhaser",!1),this.bannerTextColor=h(t,"banner.text","#ffffff"),this.bannerBackgroundColor=h(t,"banner.background",["#ff0000","#ffff00","#00ff00","#00ffff","#000000"]),""===this.gameTitle&&this.hidePhaser&&(this.hideBanner=!0),this.fps=h(t,"fps",null);var i=h(t,"render",null);this.pipeline=h(i,"pipeline",null,t),this.autoMobilePipeline=h(i,"autoMobilePipeline",!0,t),this.defaultPipeline=h(i,"defaultPipeline",d.MULTI_PIPELINE,t),this.antialias=h(i,"antialias",!0,t),this.antialiasGL=h(i,"antialiasGL",!0,t),this.mipmapFilter=h(i,"mipmapFilter","LINEAR",t),this.desynchronized=h(i,"desynchronized",!1,t),this.roundPixels=h(i,"roundPixels",!1,t),this.pixelArt=h(i,"pixelArt",1!==this.zoom,t),this.pixelArt&&(this.antialias=!1,this.antialiasGL=!1,this.roundPixels=!0),this.transparent=h(i,"transparent",!1,t),this.clearBeforeRender=h(i,"clearBeforeRender",!0,t),this.preserveDrawingBuffer=h(i,"preserveDrawingBuffer",!1,t),this.premultipliedAlpha=h(i,"premultipliedAlpha",!0,t),this.failIfMajorPerformanceCaveat=h(i,"failIfMajorPerformanceCaveat",!1,t),this.powerPreference=h(i,"powerPreference","default",t),this.batchSize=h(i,"batchSize",4096,t),this.maxTextures=h(i,"maxTextures",-1,t),this.maxLights=h(i,"maxLights",10,t);var s=h(t,"backgroundColor",0);this.backgroundColor=p(s),this.transparent&&(this.backgroundColor=p(0),this.backgroundColor.alpha=0),this.preBoot=h(t,"callbacks.preBoot",u),this.postBoot=h(t,"callbacks.postBoot",u),this.physics=h(t,"physics",{}),this.defaultPhysicsSystem=h(this.physics,"default",!1),this.loaderBaseURL=h(t,"loader.baseURL",""),this.loaderPath=h(t,"loader.path",""),this.loaderMaxParallelDownloads=h(t,"loader.maxParallelDownloads",o.os.android?6:32),this.loaderCrossOrigin=h(t,"loader.crossOrigin",void 0),this.loaderResponseType=h(t,"loader.responseType",""),this.loaderAsync=h(t,"loader.async",!0),this.loaderUser=h(t,"loader.user",""),this.loaderPassword=h(t,"loader.password",""),this.loaderTimeout=h(t,"loader.timeout",0),this.loaderWithCredentials=h(t,"loader.withCredentials",!1),this.loaderImageLoadType=h(t,"loader.imageLoadType","XHR"),this.loaderLocalScheme=h(t,"loader.localScheme",["file://","capacitor://"]),this.installGlobalPlugins=[],this.installScenePlugins=[];var f=h(t,"plugins",null),v=r.DefaultScene;f&&(Array.isArray(f)?this.defaultPlugins=f:l(f)&&(this.installGlobalPlugins=a(f,"global",[]),this.installScenePlugins=a(f,"scene",[]),Array.isArray(f.default)?v=f.default:Array.isArray(f.defaultMerge)&&(v=v.concat(f.defaultMerge)))),this.defaultPlugins=v;var g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg";this.defaultImage=h(t,"images.default",g+"AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg=="),this.missingImage=h(t,"images.missing",g+"CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg=="),this.whiteImage=h(t,"images.white","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAAAmkwkpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABdJREFUeNpi/P//PwMMMDEgAdwcgAADAJZuAwXJYZOzAAAAAElFTkSuQmCC"),window&&(window.FORCE_WEBGL?this.renderType=n.WEBGL:window.FORCE_CANVAS&&(this.renderType=n.CANVAS))}});t.exports=f},50150:(t,e,i)=>{var s=i(70616),n=i(61068),r=i(86459),o=i(90185);t.exports=function(t){var e=t.config;if((e.customEnvironment||e.canvas)&&e.renderType===r.AUTO)throw new Error("Must set explicit renderType in custom environment");if(!e.customEnvironment&&!e.canvas&&e.renderType!==r.HEADLESS)if(e.renderType===r.AUTO&&(e.renderType=o.webGL?r.WEBGL:r.CANVAS),e.renderType===r.WEBGL){if(!o.webGL)throw new Error("Cannot create WebGL context, aborting.")}else{if(e.renderType!==r.CANVAS)throw new Error("Unknown value for renderer type: "+e.renderType);if(!o.canvas)throw new Error("Cannot create Canvas context, aborting.")}e.antialias||n.disableSmoothing();var a,h,l=t.scale.baseSize,u=l.width,c=l.height;(e.canvas?(t.canvas=e.canvas,t.canvas.width=u,t.canvas.height=c):t.canvas=n.create(t,u,c,e.renderType),e.canvasStyle&&(t.canvas.style=e.canvasStyle),e.antialias||s.setCrisp(t.canvas),e.renderType!==r.HEADLESS)&&(a=i(91135),h=i(11857),e.renderType===r.WEBGL?t.renderer=new h(t):(t.renderer=new a(t),t.context=t.renderer.gameContext))}},77291:(t,e,i)=>{var s=i(86459);t.exports=function(t){var e=t.config;if(!e.hideBanner){var i="WebGL";e.renderType===s.CANVAS?i="Canvas":e.renderType===s.HEADLESS&&(i="Headless");var n,r=e.audio,o=t.device.audio;if(n=o.webAudio&&!r.disableWebAudio?"Web Audio":r.noAudio||!o.webAudio&&!o.audioData?"No Audio":"HTML5 Audio",t.device.browser.ie)window.console&&console.log("Phaser v"+s.VERSION+" / https://phaser.io");else{var a,h="",l=[h];if(Array.isArray(e.bannerBackgroundColor))e.bannerBackgroundColor.forEach((function(t){h=h.concat("%c "),l.push("background: "+t),a=t})),l[l.length-1]="color: "+e.bannerTextColor+"; background: "+a;else h=h.concat("%c "),l.push("color: "+e.bannerTextColor+"; background: "+e.bannerBackgroundColor);l.push("background: transparent"),e.gameTitle&&(h=h.concat(e.gameTitle),e.gameVersion&&(h=h.concat(" v"+e.gameVersion)),e.hidePhaser||(h=h.concat(" / ")));e.hidePhaser||(h=h.concat("Phaser v"+s.VERSION+" ("+i+" | "+n+")")),h=h.concat(" %c "+e.gameURL),l[0]=h,console.log.apply(console,l)}}}},15213:(t,e,i)=>{var s=i(99584),n=i(90249),r=i(43474),o=i(61068),a=i(56694),h=i(14033),l=i(85178),u=i(50150),c=i(81078),d=i(77291),p=i(77290),f=i(21546),v=i(6659),g=i(97081),m=i(69898),y=i(91963),x=i(49274),T=i(756),w=i(13553),b=i(38203),E=i(6237),S=i(26617),A=i(26493),C=i(84191),_=new a({initialize:function(t){this.config=new h(t),this.renderer=null,this.domContainer=null,this.canvas=null,this.context=null,this.isBooted=!1,this.isRunning=!1,this.events=new v,this.anims=new n(this),this.textures=new E(this),this.cache=new r(this),this.registry=new c(this,new v),this.input=new m(this,this.config),this.scene=new w(this,this.config.sceneConfig),this.device=p,this.scale=new T(this,this.config),this.sound=null,this.sound=C.create(this),this.loop=new S(this,this.config.fps),this.plugins=new x(this,this.config),this.pendingDestroy=!1,this.removeCanvas=!1,this.noReturn=!1,this.hasFocus=!1,f(this.boot.bind(this))},boot:function(){y.hasCore("EventEmitter")?(this.isBooted=!0,this.config.preBoot(this),this.scale.preBoot(),u(this),l(this),d(this),s(this.canvas,this.config.parent),this.textures.once(b.READY,this.texturesReady,this),this.events.emit(g.BOOT)):console.warn("Aborting. Core Plugins missing.")},texturesReady:function(){this.events.emit(g.READY),this.start()},start:function(){this.isRunning=!0,this.config.postBoot(this),this.renderer?this.loop.start(this.step.bind(this)):this.loop.start(this.headlessStep.bind(this)),A(this);var t=this.events;t.on(g.HIDDEN,this.onHidden,this),t.on(g.VISIBLE,this.onVisible,this),t.on(g.BLUR,this.onBlur,this),t.on(g.FOCUS,this.onFocus,this)},step:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(g.PRE_STEP,t,e),i.emit(g.STEP,t,e),this.scene.update(t,e),i.emit(g.POST_STEP,t,e);var s=this.renderer;s.preRender(),i.emit(g.PRE_RENDER,s,t,e),this.scene.render(s),s.postRender(),i.emit(g.POST_RENDER,s,t,e)},headlessStep:function(t,e){if(this.pendingDestroy)return this.runDestroy();var i=this.events;i.emit(g.PRE_STEP,t,e),i.emit(g.STEP,t,e),this.scene.update(t,e),i.emit(g.POST_STEP,t,e),this.scene.isProcessing=!1,i.emit(g.PRE_RENDER,null,t,e),i.emit(g.POST_RENDER,null,t,e)},onHidden:function(){this.loop.pause(),this.events.emit(g.PAUSE)},pause:function(){this.onHidden()},onVisible:function(){this.loop.resume(),this.events.emit(g.RESUME)},resume:function(){this.onVisible()},onBlur:function(){this.hasFocus=!1,this.loop.blur()},onFocus:function(){this.hasFocus=!0,this.loop.focus()},getFrame:function(){return this.loop.frame},getTime:function(){return this.loop.now},destroy:function(t,e){void 0===e&&(e=!1),this.pendingDestroy=!0,this.removeCanvas=t,this.noReturn=e},runDestroy:function(){this.scene.destroy(),this.events.emit(g.DESTROY),this.events.removeAllListeners(),this.renderer&&this.renderer.destroy(),this.removeCanvas&&this.canvas&&(o.remove(this.canvas),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas)),this.domContainer&&this.domContainer.parentNode.removeChild(this.domContainer),this.loop.destroy(),this.pendingDestroy=!1}});t.exports=_},26617:(t,e,i)=>{var s=i(56694),n=i(10850),r=i(72283),o=i(27385),a=new s({initialize:function(t,e){this.game=t,this.raf=new o,this.started=!1,this.running=!1,this.minFps=n(e,"min",5),this.targetFps=n(e,"target",60),this.fpsLimit=n(e,"limit",0),this.hasFpsLimit=this.fpsLimit>0,this._limitRate=this.hasFpsLimit?1e3/this.fpsLimit:0,this._min=1e3/this.minFps,this._target=1e3/this.targetFps,this.actualFps=this.targetFps,this.nextFpsUpdate=0,this.framesThisSecond=0,this.callback=r,this.forceSetTimeOut=n(e,"forceSetTimeOut",!1),this.time=0,this.startTime=0,this.lastTime=0,this.frame=0,this.inFocus=!0,this._pauseTime=0,this._coolDown=0,this.delta=0,this.deltaIndex=0,this.deltaHistory=[],this.deltaSmoothingMax=n(e,"deltaHistory",10),this.panicMax=n(e,"panicMax",120),this.rawDelta=0,this.now=0,this.smoothStep=n(e,"smoothStep",!0)},blur:function(){this.inFocus=!1},focus:function(){this.inFocus=!0,this.resetDelta()},pause:function(){this._pauseTime=window.performance.now()},resume:function(){this.resetDelta(),this.startTime+=this.time-this._pauseTime},resetDelta:function(){var t=window.performance.now();this.time=t,this.lastTime=t,this.nextFpsUpdate=t+1e3,this.framesThisSecond=0;for(var e=0;e0||!this.inFocus)&&(this._coolDown--,t=Math.min(t,this._target)),t>this._min&&(t=i[e],t=Math.min(t,this._min)),i[e]=t,this.deltaIndex++,this.deltaIndex>=s&&(this.deltaIndex=0);for(var n=0,r=0;r=this.nextFpsUpdate&&this.updateFPS(t),this.framesThisSecond++,this.delta>=this._limitRate&&(this.callback(t,this.delta),this.delta=0),this.lastTime=t,this.frame++},step:function(t){this.now=t;var e=Math.max(0,t-this.lastTime);this.rawDelta=e,this.time+=this.rawDelta,this.smoothStep&&(e=this.smoothDelta(e)),this.delta=e,t>=this.nextFpsUpdate&&this.updateFPS(t),this.framesThisSecond++,this.callback(t,e),this.lastTime=t,this.frame++},tick:function(){var t=window.performance.now();this.hasFpsLimit?this.stepLimitFPS(t):this.step(t)},sleep:function(){this.running&&(this.raf.stop(),this.running=!1)},wake:function(t){void 0===t&&(t=!1);var e=window.performance.now();if(!this.running){t&&(this.startTime+=-this.lastTime+(this.lastTime+e));var i=this.hasFpsLimit?this.stepLimitFPS.bind(this):this.step.bind(this);this.raf.start(i,this.forceSetTimeOut,this._target),this.running=!0,this.nextFpsUpdate=e+1e3,this.framesThisSecond=0,this.fpsLimitTriggered=!1,this.tick()}},getDuration:function(){return Math.round(this.lastTime-this.startTime)/1e3},getDurationMS:function(){return Math.round(this.lastTime-this.startTime)},stop:function(){return this.running=!1,this.started=!1,this.raf.stop(),this},destroy:function(){this.stop(),this.raf.destroy(),this.raf=null,this.game=null,this.callback=null}});t.exports=a},26493:(t,e,i)=>{var s=i(97081);t.exports=function(t){var e,i=t.events;if(void 0!==document.hidden)e="visibilitychange";else{["webkit","moz","ms"].forEach((function(t){void 0!==document[t+"Hidden"]&&(document.hidden=function(){return document[t+"Hidden"]},e=t+"visibilitychange")}))}e&&document.addEventListener(e,(function(t){document.hidden||"pause"===t.type?i.emit(s.HIDDEN):i.emit(s.VISIBLE)}),!1),window.onblur=function(){i.emit(s.BLUR)},window.onfocus=function(){i.emit(s.FOCUS)},window.focus&&t.config.autoFocus&&window.focus()}},41651:t=>{t.exports="blur"},5520:t=>{t.exports="boot"},51673:t=>{t.exports="contextlost"},25055:t=>{t.exports="destroy"},23767:t=>{t.exports="focus"},57564:t=>{t.exports="hidden"},38327:t=>{t.exports="pause"},43807:t=>{t.exports="postrender"},73652:t=>{t.exports="poststep"},780:t=>{t.exports="prerender"},13781:t=>{t.exports="prestep"},38247:t=>{t.exports="ready"},29129:t=>{t.exports="resume"},34994:t=>{t.exports="step"},98704:t=>{t.exports="visible"},97081:(t,e,i)=>{t.exports={BLUR:i(41651),BOOT:i(5520),CONTEXT_LOST:i(51673),DESTROY:i(25055),FOCUS:i(23767),HIDDEN:i(57564),PAUSE:i(38327),POST_RENDER:i(43807),POST_STEP:i(73652),PRE_RENDER:i(780),PRE_STEP:i(13781),READY:i(38247),RESUME:i(29129),STEP:i(34994),VISIBLE:i(98704)}},80293:(t,e,i)=>{t.exports={Config:i(14033),CreateRenderer:i(50150),DebugHeader:i(77291),Events:i(97081),TimeStep:i(26617),VisibilityHandler:i(26493)}},52780:(t,e,i)=>{var s=i(81543),n=i(61068),r=i(10850);t.exports=function(t){var e=r(t,"data",[]),i=r(t,"canvas",null),o=r(t,"palette",s),a=r(t,"pixelWidth",1),h=r(t,"pixelHeight",a),l=r(t,"resizeCanvas",!0),u=r(t,"clearCanvas",!0),c=r(t,"preRender",null),d=r(t,"postRender",null),p=Math.floor(Math.abs(e[0].length*a)),f=Math.floor(Math.abs(e.length*h));i||(i=n.create2D(this,p,f),l=!1,u=!1),l&&(i.width=p,i.height=f);var v=i.getContext("2d");u&&v.clearRect(0,0,p,f),c&&c(i,v);for(var g=0;g{t.exports={GenerateTexture:i(52780),Palettes:i(25235)}},81543:t=>{t.exports={0:"#000",1:"#9D9D9D",2:"#FFF",3:"#BE2633",4:"#E06F8B",5:"#493C2B",6:"#A46422",7:"#EB8931",8:"#F7E26B",9:"#2F484E",A:"#44891A",B:"#A3CE27",C:"#1B2632",D:"#005784",E:"#31A2F2",F:"#B2DCEF"}},75846:t=>{t.exports={0:"#000",1:"#fff",2:"#8b4131",3:"#7bbdc5",4:"#8b41ac",5:"#6aac41",6:"#3931a4",7:"#d5de73",8:"#945a20",9:"#5a4100",A:"#bd736a",B:"#525252",C:"#838383",D:"#acee8b",E:"#7b73de",F:"#acacac"}},83206:t=>{t.exports={0:"#000",1:"#2234d1",2:"#0c7e45",3:"#44aacc",4:"#8a3622",5:"#5c2e78",6:"#aa5c3d",7:"#b5b5b5",8:"#5e606e",9:"#4c81fb",A:"#6cd947",B:"#7be2f9",C:"#eb8a60",D:"#e23d69",E:"#ffd93f",F:"#fff"}},13194:t=>{t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#f5f4eb"}},50686:t=>{t.exports={0:"#000",1:"#191028",2:"#46af45",3:"#a1d685",4:"#453e78",5:"#7664fe",6:"#833129",7:"#9ec2e8",8:"#dc534b",9:"#e18d79",A:"#d6b97b",B:"#e9d8a1",C:"#216c4b",D:"#d365c8",E:"#afaab9",F:"#fff"}},25235:(t,e,i)=>{t.exports={ARNE16:i(81543),C64:i(75846),CGA:i(83206),JMP:i(13194),MSX:i(50686)}},63120:(t,e,i)=>{var s=i(56694),n=i(34631),r=i(38517),o=i(93736),a=new s({Extends:r,initialize:function(t,e,i,s){r.call(this,"CubicBezierCurve"),Array.isArray(t)&&(s=new o(t[6],t[7]),i=new o(t[4],t[5]),e=new o(t[2],t[3]),t=new o(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i,this.p3=s},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.p0,s=this.p1,r=this.p2,a=this.p3;return e.set(n(t,i.x,s.x,r.x,a.x),n(t,i.y,s.y,r.y,a.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var s=1;s{var s=i(56694),n=i(80222),r=i(74118),o=i(93736),a=new s({initialize:function(t){this.type=t,this.defaultDivisions=5,this.arcLengthDivisions=100,this.cacheArcLengths=[],this.needsUpdate=!0,this.active=!0,this._tmpVec2A=new o,this._tmpVec2B=new o},draw:function(t,e){return void 0===e&&(e=32),t.strokePoints(this.getPoints(e))},getBounds:function(t,e){t||(t=new r),void 0===e&&(e=16);var i=this.getLength();e>i&&(e=i/2);var s=Math.max(1,Math.round(i/e));return n(this.getSpacedPoints(s),t)},getDistancePoints:function(t){var e=this.getLength(),i=Math.max(1,e/t);return this.getSpacedPoints(i)},getEndPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(1,t)},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i=[],s=this.getPoint(0,this._tmpVec2A),n=0;i.push(0);for(var r=1;r<=t;r++)n+=(e=this.getPoint(r/t,this._tmpVec2B)).distance(s),i.push(n),s.copy(e);return this.cacheArcLengths=i,i},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var s=0;s<=t;s++)i.push(this.getPoint(s/t));return i},getRandomPoint:function(t){return void 0===t&&(t=new o),this.getPoint(Math.random(),t)},getSpacedPoints:function(t,e,i){void 0===i&&(i=[]),t||(t=e?this.getLength()/e:this.defaultDivisions);for(var s=0;s<=t;s++){var n=this.getUtoTmapping(s/t,null,t);i.push(this.getPoint(n))}return i},getStartPoint:function(t){return void 0===t&&(t=new o),this.getPointAt(0,t)},getTangent:function(t,e){void 0===e&&(e=new o);var i=1e-4,s=t-i,n=t+i;return s<0&&(s=0),n>1&&(n=1),this.getPoint(s,this._tmpVec2A),this.getPoint(n,e),e.subtract(this._tmpVec2A).normalize()},getTangentAt:function(t,e){var i=this.getUtoTmapping(t);return this.getTangent(i,e)},getTFromDistance:function(t,e){return t<=0?0:this.getUtoTmapping(0,t,e)},getUtoTmapping:function(t,e,i){var s,n=this.getLengths(i),r=0,o=n.length;s=e?Math.min(e,n[o-1]):t*n[o-1];for(var a,h=0,l=o-1;h<=l;)if((a=n[r=Math.floor(h+(l-h)/2)]-s)<0)h=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(n[r=l]===s)return r/(o-1);var u=n[r];return(r+(s-u)/(n[r+1]-u))/(o-1)},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()}});t.exports=a},48835:(t,e,i)=>{var s=i(56694),n=i(38517),r=i(75606),o=i(10850),a=i(23701),h=i(93736),l=new s({Extends:n,initialize:function(t,e,i,s,a,l,u,c){if("object"==typeof t){var d=t;t=o(d,"x",0),e=o(d,"y",0),i=o(d,"xRadius",0),s=o(d,"yRadius",i),a=o(d,"startAngle",0),l=o(d,"endAngle",360),u=o(d,"clockwise",!1),c=o(d,"rotation",0)}else void 0===s&&(s=i),void 0===a&&(a=0),void 0===l&&(l=360),void 0===u&&(u=!1),void 0===c&&(c=0);n.call(this,"EllipseCurve"),this.p0=new h(t,e),this._xRadius=i,this._yRadius=s,this._startAngle=r(a),this._endAngle=r(l),this._clockwise=u,this._rotation=r(c)},getStartPoint:function(t){return void 0===t&&(t=new h),this.getPoint(0,t)},getResolution:function(t){return 2*t},getPoint:function(t,e){void 0===e&&(e=new h);for(var i=2*Math.PI,s=this._endAngle-this._startAngle,n=Math.abs(s)i;)s-=i;s{var s=i(56694),n=i(38517),r=i(80222),o=i(74118),a=i(93736),h=new s({Extends:n,initialize:function(t,e){n.call(this,"LineCurve"),Array.isArray(t)&&(e=new a(t[2],t[3]),t=new a(t[0],t[1])),this.p0=t,this.p1=e,this.arcLengthDivisions=1},getBounds:function(t){return void 0===t&&(t=new o),r([this.p0,this.p1],t)},getStartPoint:function(t){return void 0===t&&(t=new a),t.copy(this.p0)},getResolution:function(t){return void 0===t&&(t=1),t},getPoint:function(t,e){return void 0===e&&(e=new a),1===t?e.copy(this.p1):(e.copy(this.p1).subtract(this.p0).scale(t).add(this.p0),e)},getPointAt:function(t,e){return this.getPoint(t,e)},getTangent:function(t,e){return void 0===e&&(e=new a),e.copy(this.p1).subtract(this.p0).normalize(),e},getUtoTmapping:function(t,e,i){var s;if(e){var n=this.getLengths(i),r=n[n.length-1];s=Math.min(e,r)/r}else s=t;return s},draw:function(t){return t.lineBetween(this.p0.x,this.p0.y,this.p1.x,this.p1.y),t},toJSON:function(){return{type:this.type,points:[this.p0.x,this.p0.y,this.p1.x,this.p1.y]}}});h.fromJSON=function(t){var e=t.points,i=new a(e[0],e[1]),s=new a(e[2],e[3]);return new h(i,s)},t.exports=h},64761:(t,e,i)=>{var s=i(56694),n=i(38517),r=i(16252),o=i(93736),a=new s({Extends:n,initialize:function(t,e,i){n.call(this,"QuadraticBezierCurve"),Array.isArray(t)&&(i=new o(t[4],t[5]),e=new o(t[2],t[3]),t=new o(t[0],t[1])),this.p0=t,this.p1=e,this.p2=i},getStartPoint:function(t){return void 0===t&&(t=new o),t.copy(this.p0)},getResolution:function(t){return t},getPoint:function(t,e){void 0===e&&(e=new o);var i=this.p0,s=this.p1,n=this.p2;return e.set(r(t,i.x,s.x,n.x),r(t,i.y,s.y,n.y))},draw:function(t,e){void 0===e&&(e=32);var i=this.getPoints(e);t.beginPath(),t.moveTo(this.p0.x,this.p0.y);for(var s=1;s{var s=i(14976),n=i(56694),r=i(38517),o=i(93736),a=new n({Extends:r,initialize:function(t){void 0===t&&(t=[]),r.call(this,"SplineCurve"),this.points=[],this.addPoints(t)},addPoints:function(t){for(var e=0;ei.length-2?i.length-1:r+1],c=i[r>i.length-3?i.length-1:r+2];return e.set(s(a,h.x,l.x,u.x,c.x),s(a,h.y,l.y,u.y,c.y))},toJSON:function(){for(var t=[],e=0;e{t.exports={Path:i(12822),MoveTo:i(53639),CubicBezier:i(63120),Curve:i(38517),Ellipse:i(48835),Line:i(58084),QuadraticBezier:i(64761),Spline:i(11956)}},53639:(t,e,i)=>{var s=i(56694),n=i(93736),r=new s({initialize:function(t,e){this.active=!1,this.p0=new n(t,e)},getPoint:function(t,e){return void 0===e&&(e=new n),e.copy(this.p0)},getPointAt:function(t,e){return this.getPoint(t,e)},getResolution:function(){return 1},getLength:function(){return 0},toJSON:function(){return{type:"MoveTo",points:[this.p0.x,this.p0.y]}}});t.exports=r},12822:(t,e,i)=>{var s=i(56694),n=i(63120),r=i(48835),o=i(61286),a=i(58084),h=i(53639),l=i(64761),u=i(74118),c=i(11956),d=i(93736),p=i(83392),f=new s({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.name="",this.curves=[],this.cacheLengths=[],this.autoClose=!1,this.startPoint=new d,this._tmpVec2A=new d,this._tmpVec2B=new d,"object"==typeof t?this.fromJSON(t):this.startPoint.set(t,e)},add:function(t){return this.curves.push(t),this},circleTo:function(t,e,i){return void 0===e&&(e=!1),this.ellipseTo(t,t,0,360,e,i)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);return t.equals(e)||this.curves.push(new a(e,t)),this},cubicBezierTo:function(t,e,i,s,r,o){var a,h,l,u=this.getEndPoint();return t instanceof d?(a=t,h=e,l=i):(a=new d(i,s),h=new d(r,o),l=new d(t,e)),this.add(new n(u,a,h,l))},quadraticBezierTo:function(t,e,i,s){var n,r,o=this.getEndPoint();return t instanceof d?(n=t,r=e):(n=new d(i,s),r=new d(t,e)),this.add(new l(o,n,r))},draw:function(t,e){for(var i=0;i=e)return this.curves[s];s++}return null},getEndPoint:function(t){return void 0===t&&(t=new d),this.curves.length>0?this.curves[this.curves.length-1].getPoint(1,t):t.copy(this.startPoint),t},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},getPoint:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),s=this.getCurveLengths(),n=0;n=i){var r=s[n]-i,o=this.curves[n],a=o.getLength(),h=0===a?0:1-r/a;return o.getPointAt(h,e)}n++}return null},getPoints:function(t){void 0===t&&(t=12);for(var e,i=[],s=0;s1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},getRandomPoint:function(t){return void 0===t&&(t=new d),this.getPoint(Math.random(),t)},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getStartPoint:function(t){return void 0===t&&(t=new d),t.copy(this.startPoint)},getTangent:function(t,e){void 0===e&&(e=new d);for(var i=t*this.getLength(),s=this.getCurveLengths(),n=0;n=i){var r=s[n]-i,o=this.curves[n],a=o.getLength(),h=0===a?0:1-r/a;return o.getTangentAt(h,e)}n++}return null},lineTo:function(t,e){t instanceof d?this._tmpVec2B.copy(t):this._tmpVec2B.set(t,e);var i=this.getEndPoint(this._tmpVec2A);return this.add(new a([i.x,i.y,this._tmpVec2B.x,this._tmpVec2B.y]))},splineTo:function(t){return t.unshift(this.getEndPoint()),this.add(new c(t))},moveTo:function(t,e){return t instanceof d?this.add(new h(t.x,t.y)):this.add(new h(t,e))},toJSON:function(){for(var t=[],e=0;e{var s=i(56694),n=i(35026),r=new s({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(n.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],s=0;s{var s=i(56694),n=i(81078),r=i(91963),o=i(7599),a=new s({Extends:n,initialize:function(t){n.call(this,t,t.sys.events),this.scene=t,this.systems=t.sys,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.start,this)},boot:function(){this.events=this.systems.events,this.events.once(o.DESTROY,this.destroy,this)},start:function(){this.events.once(o.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.systems.events.off(o.SHUTDOWN,this.shutdown,this)},destroy:function(){n.prototype.destroy.call(this),this.events.off(o.START,this.start,this),this.scene=null,this.systems=null}});r.register("DataManagerPlugin",a,"data"),t.exports=a},73569:t=>{t.exports="changedata"},15590:t=>{t.exports="changedata-"},37669:t=>{t.exports="destroy"},87090:t=>{t.exports="removedata"},90142:t=>{t.exports="setdata"},35026:(t,e,i)=>{t.exports={CHANGE_DATA:i(73569),CHANGE_DATA_KEY:i(15590),DESTROY:i(37669),REMOVE_DATA:i(87090),SET_DATA:i(90142)}},1999:(t,e,i)=>{t.exports={DataManager:i(81078),DataManagerPlugin:i(76508),Events:i(35026)}},10720:(t,e,i)=>{var s=i(1350),n={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return n;n.audioData=!!window.Audio,n.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e){var i=function(e,i){var s=t.canPlayType("audio/"+e).replace(/^no$/,"");return i?Boolean(s||t.canPlayType("audio/"+i).replace(/^no$/,"")):Boolean(s)};if(n.ogg=i('ogg; codecs="vorbis"'),n.opus=i('ogg; codecs="opus"',"opus"),n.mp3=i("mpeg"),n.wav=i("wav"),n.m4a=i("x-m4a"),n.aac=i("aac"),n.flac=i("flac","x-flac"),n.webm=i('webm; codecs="vorbis"'),""!==t.canPlayType('audio/mp4; codecs="ec-3"'))if(s.edge)n.dolby=!0;else if(s.safari&&s.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var r=parseInt(RegExp.$1,10),o=parseInt(RegExp.$2,10);(10===r&&o>=11||r>10)&&(n.dolby=!0)}}}catch(t){}return n}()},1350:(t,e,i)=>{var s,n=i(36580),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};t.exports=(s=navigator.userAgent,/Edg\/\d+/.test(s)?(r.edge=!0,r.es2019=!0):/OPR/.test(s)?(r.opera=!0,r.es2019=!0):/Chrome\/(\d+)/.test(s)&&!n.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10),r.es2019=r.chromeVersion>69):/Firefox\D+(\d+)/.test(s)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10),r.es2019=r.firefoxVersion>10):/AppleWebKit/.test(s)&&n.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(s)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+) Safari/.test(s)&&!n.windowsPhone?(r.safari=!0,r.safariVersion=parseInt(RegExp.$1,10),r.es2019=r.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(s)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(s)&&(r.silk=!0),r)},98581:(t,e,i)=>{var s,n,r,o=i(61068),a={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(a.supportNewBlendModes=(s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",n="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=o.create2D(t,6).getContext("2d",{willReadFrequently:!0});if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;o.remove(t),a.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=s+"/wCKxvRF"+n},r.src=s+"AP804Oa6"+n,!1),a.supportInverseAlpha=function(){var t=o.create2D(this,2).getContext("2d",{willReadFrequently:!0});t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1),s=i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3];return o.remove(this),s}()),a)},90185:(t,e,i)=>{var s=i(36580),n=i(1350),r=i(61068),o={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){if("function"==typeof importScripts)return o;o.canvas=!!window.CanvasRenderingContext2D;try{o.localStorage=!!localStorage.getItem}catch(t){o.localStorage=!1}o.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),o.fileSystem=!!window.requestFileSystem;var t,e,i,a=!1;return o.webGL=function(){if(window.WebGLRenderingContext)try{var t=r.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=r.create2D(this),s=i.getContext("2d",{willReadFrequently:!0}).createImageData(1,1);return a=s.data instanceof Uint8ClampedArray,r.remove(t),r.remove(i),!!e}catch(t){return!1}return!1}(),o.worker=!!window.Worker,o.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,o.getUserMedia=o.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,n.firefox&&n.firefoxVersion<21&&(o.getUserMedia=!1),!s.iOS&&(n.ie||n.firefox||n.chrome)&&(o.canvasBitBltShift=!0),(n.safari||n.mobileSafari)&&(o.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(o.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(o.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),o.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==o.littleEndian&&a,o}()},33553:t=>{var e={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"==typeof importScripts)return e;var t,i="Fullscreen",s="FullScreen",n=["request"+i,"request"+s,"webkitRequest"+i,"webkitRequest"+s,"msRequest"+i,"msRequest"+s,"mozRequest"+s,"mozRequest"+i];for(t=0;t{var s=i(1350),n={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=("function"==typeof importScripts||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(n.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(n.mspointer=!0),navigator.getGamepads&&(n.gamepads=!0),"onwheel"in window||s.ie&&"WheelEvent"in window?n.wheelEvent="wheel":"onmousewheel"in window?n.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(n.wheelEvent="DOMMouseScroll")),n)},36580:t=>{var e={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){if("function"==typeof importScripts)return e;var t=navigator.userAgent;/Windows/.test(t)?e.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(e.iOS=!0,e.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),e.iOSVersion=parseInt(RegExp.$1,10)):e.macOS=!0:/Android/.test(t)?e.android=!0:/Linux/.test(t)?e.linux=!0:/iP[ao]d|iPhone/i.test(t)?(e.iOS=!0,navigator.appVersion.match(/OS (\d+)/),e.iOSVersion=parseInt(RegExp.$1,10),e.iPhone=-1!==t.toLowerCase().indexOf("iphone"),e.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?e.kindle=!0:/CrOS/.test(t)&&(e.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(e.android=!1,e.iOS=!1,e.macOS=!1,e.windows=!0,e.windowsPhone=!0);var i=/Silk/.test(t);return(e.windows||e.macOS||e.linux&&!i||e.chromeOS)&&(e.desktop=!0),(e.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(e.desktop=!1),navigator.standalone&&(e.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(e.cordova=!0),void 0!==window.ejecta&&(e.ejecta=!0)),"undefined"!=typeof process&&process.versions&&process.versions.node&&(e.node=!0),e.node&&"object"==typeof process.versions&&(e.nodeWebkit=!!process.versions["node-webkit"],e.electron=!!process.versions.electron),/Crosswalk/.test(t)&&(e.crosswalk=!0),e.pixelRatio=window.devicePixelRatio||1,e}()},53861:t=>{var e={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return e;var t=document.createElement("video"),i=!!t.canPlayType,s=/^no$/;try{i&&(t.canPlayType('video/ogg; codecs="theora"').replace(s,"")&&(e.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(s,"")&&(e.h264=!0,e.mp4=!0),t.canPlayType("video/x-m4v").replace(s,"")&&(e.m4v=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(s,"")&&(e.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(s,"")&&(e.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(s,"")&&(e.hls=!0))}catch(t){}return e}()},77290:(t,e,i)=>{t.exports={os:i(36580),browser:i(1350),features:i(90185),input:i(95872),audio:i(10720),video:i(53861),fullscreen:i(33553),canvasFeatures:i(98581)}},65246:(t,e,i)=>{var s=new(i(56694))({initialize:function(){this._matrix=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],this.alpha=1,this._dirty=!0,this._data},set:function(t){return this._matrix=t,this._dirty=!0,this},reset:function(){var t=this._matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=1,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=1,t[13]=0,t[14]=0,t[15]=0,t[16]=0,t[17]=0,t[18]=1,t[19]=0,this._dirty=!0,this},getData:function(){if(this._dirty){var t=new Float32Array(this._matrix);t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,this._data=t,this._dirty=!1}return this._data},brightness:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t;return this.multiply([i,0,0,0,0,0,i,0,0,0,0,0,i,0,0,0,0,0,1,0],e)},saturate:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=2*t/3+1,s=-.5*(i-1);return this.multiply([i,s,s,0,0,s,i,s,0,0,s,s,i,0,0,0,0,0,1,0],e)},desaturate:function(t){return void 0===t&&(t=!1),this.saturate(-1,t)},hue:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1),t=t/180*Math.PI;var i=Math.cos(t),s=Math.sin(t),n=.213,r=.715,o=.072;return this.multiply([n+.787*i+s*-n,r+i*-r+s*-r,o+i*-o+.928*s,0,0,n+i*-n+.143*s,r+i*(1-r)+.14*s,o+i*-o+-.283*s,0,0,n+i*-n+-.787*s,r+i*-r+s*r,o+.928*i+s*o,0,0,0,0,0,1,0],e)},grayscale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=!1),this.saturate(-t,e)},blackWhite:function(t){return void 0===t&&(t=!1),this.multiply([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t)},contrast:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t+1,s=-.5*(i-1);return this.multiply([i,0,0,0,s,0,i,0,0,s,0,0,i,0,s,0,0,0,1,0],e)},negative:function(t){return void 0===t&&(t=!1),this.multiply([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],t)},desaturateLuminance:function(t){return void 0===t&&(t=!1),this.multiply([.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],t)},sepia:function(t){return void 0===t&&(t=!1),this.multiply([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t)},night:function(t,e){return void 0===t&&(t=.1),void 0===e&&(e=!1),this.multiply([-2*t,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0],e)},lsd:function(t){return void 0===t&&(t=!1),this.multiply([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},brown:function(t){return void 0===t&&(t=!1),this.multiply([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t)},vintagePinhole:function(t){return void 0===t&&(t=!1),this.multiply([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t)},kodachrome:function(t){return void 0===t&&(t=!1),this.multiply([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],t)},technicolor:function(t){return void 0===t&&(t=!1),this.multiply([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],t)},polaroid:function(t){return void 0===t&&(t=!1),this.multiply([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t)},shiftToBGR:function(t){return void 0===t&&(t=!1),this.multiply([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t)},multiply:function(t,e){e||this.reset();for(var i=this._matrix,s=[],n=0;n<20;n++)s[n]=i[n];return i[0]=s[0]*t[0]+s[1]*t[5]+s[2]*t[10]+s[3]*t[15],i[1]=s[0]*t[1]+s[1]*t[6]+s[2]*t[11]+s[3]*t[16],i[2]=s[0]*t[2]+s[1]*t[7]+s[2]*t[12]+s[3]*t[17],i[3]=s[0]*t[3]+s[1]*t[8]+s[2]*t[13]+s[3]*t[18],i[4]=s[0]*t[4]+s[1]*t[9]+s[2]*t[14]+s[3]*t[19]+s[4],i[5]=s[5]*t[0]+s[6]*t[5]+s[7]*t[10]+s[8]*t[15],i[6]=s[5]*t[1]+s[6]*t[6]+s[7]*t[11]+s[8]*t[16],i[7]=s[5]*t[2]+s[6]*t[7]+s[7]*t[12]+s[8]*t[17],i[8]=s[5]*t[3]+s[6]*t[8]+s[7]*t[13]+s[8]*t[18],i[9]=s[5]*t[4]+s[6]*t[9]+s[7]*t[14]+s[8]*t[19]+s[9],i[10]=s[10]*t[0]+s[11]*t[5]+s[12]*t[10]+s[13]*t[15],i[11]=s[10]*t[1]+s[11]*t[6]+s[12]*t[11]+s[13]*t[16],i[12]=s[10]*t[2]+s[11]*t[7]+s[12]*t[12]+s[13]*t[17],i[13]=s[10]*t[3]+s[11]*t[8]+s[12]*t[13]+s[13]*t[18],i[14]=s[10]*t[4]+s[11]*t[9]+s[12]*t[14]+s[13]*t[19]+s[14],i[15]=s[15]*t[0]+s[16]*t[5]+s[17]*t[10]+s[18]*t[15],i[16]=s[15]*t[1]+s[16]*t[6]+s[17]*t[11]+s[18]*t[16],i[17]=s[15]*t[2]+s[16]*t[7]+s[17]*t[12]+s[18]*t[17],i[18]=s[15]*t[3]+s[16]*t[8]+s[17]*t[13]+s[18]*t[18],i[19]=s[15]*t[4]+s[16]*t[9]+s[17]*t[14]+s[18]*t[19]+s[19],this._dirty=!0,this}});t.exports=s},39298:(t,e,i)=>{var s=i(56694),n=i(72283),r=new s({initialize:function(t,e,i){this._rgb=[0,0,0],this.onChangeCallback=n,this.dirty=!1,this.set(t,e,i)},set:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this._rgb=[t,e,i],this.onChange(),this},equals:function(t,e,i){var s=this._rgb;return s[0]===t&&s[1]===e&&s[2]===i},onChange:function(){this.dirty=!0;var t=this._rgb;this.onChangeCallback.call(this,t[0],t[1],t[2])},r:{get:function(){return this._rgb[0]},set:function(t){this._rgb[0]=t,this.onChange()}},g:{get:function(){return this._rgb[1]},set:function(t){this._rgb[1]=t,this.onChange()}},b:{get:function(){return this._rgb[2]},set:function(t){this._rgb[2]=t,this.onChange()}},destroy:function(){this.onChangeCallback=null}});t.exports=r},84093:t=>{t.exports={TOP_LEFT:0,TOP_CENTER:1,TOP_RIGHT:2,LEFT_TOP:3,LEFT_CENTER:4,LEFT_BOTTOM:5,CENTER:6,RIGHT_TOP:7,RIGHT_CENTER:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12}},32058:(t,e,i)=>{var s=i(97328),n=i(59994),r=i(73174),o=i(28417);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)+a),t}},85535:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(73174),o=i(74465);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)+a),t}},9605:(t,e,i)=>{var s=i(97328),n=i(70271),r=i(73174),o=i(19298);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)+a),t}},22529:(t,e,i)=>{var s=i(21843),n=i(59994),r=i(29568);t.exports=function(t,e,i,o){return void 0===i&&(i=0),void 0===o&&(o=0),s(t,n(e)+i,r(e)+o),t}},5739:(t,e,i)=>{var s=i(29568),n=i(40163),r=i(81711),o=i(74465);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)+a),t}},40327:(t,e,i)=>{var s=i(84093),n=[];n[s.BOTTOM_CENTER]=i(32058),n[s.BOTTOM_LEFT]=i(85535),n[s.BOTTOM_RIGHT]=i(9605),n[s.CENTER]=i(22529),n[s.LEFT_CENTER]=i(5739),n[s.RIGHT_CENTER]=i(27683),n[s.TOP_CENTER]=i(96439),n[s.TOP_LEFT]=i(81447),n[s.TOP_RIGHT]=i(47888),n[s.LEFT_BOTTOM]=n[s.BOTTOM_LEFT],n[s.LEFT_TOP]=n[s.TOP_LEFT],n[s.RIGHT_BOTTOM]=n[s.BOTTOM_RIGHT],n[s.RIGHT_TOP]=n[s.TOP_RIGHT];t.exports=function(t,e,i,s,r){return n[i](t,e,s,r)}},27683:(t,e,i)=>{var s=i(29568),n=i(70271),r=i(81711),o=i(19298);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)+a),t}},96439:(t,e,i)=>{var s=i(59994),n=i(47196),r=i(28417),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)-a),t}},81447:(t,e,i)=>{var s=i(40163),n=i(47196),r=i(74465),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)-i),o(t,n(e)-a),t}},47888:(t,e,i)=>{var s=i(70271),n=i(47196),r=i(19298),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)-a),t}},46997:(t,e,i)=>{t.exports={BottomCenter:i(32058),BottomLeft:i(85535),BottomRight:i(9605),Center:i(22529),LeftCenter:i(5739),QuickSet:i(40327),RightCenter:i(27683),TopCenter:i(96439),TopLeft:i(81447),TopRight:i(47888)}},93545:(t,e,i)=>{var s=i(84093),n=i(98611),r={In:i(46997),To:i(86639)};r=n(!1,r,s),t.exports=r},27118:(t,e,i)=>{var s=i(97328),n=i(59994),r=i(28417),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)+a),t}},84469:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(74465),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)-i),o(t,s(e)+a),t}},51577:(t,e,i)=>{var s=i(97328),n=i(70271),r=i(19298),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,n(e)+i),o(t,s(e)+a),t}},90271:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(73174),o=i(19298);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)+a),t}},30466:(t,e,i)=>{var s=i(29568),n=i(40163),r=i(81711),o=i(19298);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)-i),r(t,s(e)+a),t}},50087:(t,e,i)=>{var s=i(40163),n=i(47196),r=i(19298),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)-i),o(t,n(e)-a),t}},82590:(t,e,i)=>{var s=i(84093),n=[];n[s.BOTTOM_CENTER]=i(27118),n[s.BOTTOM_LEFT]=i(84469),n[s.BOTTOM_RIGHT]=i(51577),n[s.LEFT_BOTTOM]=i(90271),n[s.LEFT_CENTER]=i(30466),n[s.LEFT_TOP]=i(50087),n[s.RIGHT_BOTTOM]=i(13555),n[s.RIGHT_CENTER]=i(99049),n[s.RIGHT_TOP]=i(67788),n[s.TOP_CENTER]=i(78170),n[s.TOP_LEFT]=i(54145),n[s.TOP_RIGHT]=i(75548);t.exports=function(t,e,i,s,r){return n[i](t,e,s,r)}},13555:(t,e,i)=>{var s=i(97328),n=i(70271),r=i(73174),o=i(74465);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)+a),t}},99049:(t,e,i)=>{var s=i(29568),n=i(70271),r=i(81711),o=i(74465);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,n(e)+i),r(t,s(e)+a),t}},67788:(t,e,i)=>{var s=i(70271),n=i(47196),r=i(74465),o=i(84349);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),r(t,s(e)+i),o(t,n(e)-a),t}},78170:(t,e,i)=>{var s=i(59994),n=i(47196),r=i(73174),o=i(28417);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)-a),t}},54145:(t,e,i)=>{var s=i(40163),n=i(47196),r=i(73174),o=i(74465);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)-i),r(t,n(e)-a),t}},75548:(t,e,i)=>{var s=i(70271),n=i(47196),r=i(73174),o=i(19298);t.exports=function(t,e,i,a){return void 0===i&&(i=0),void 0===a&&(a=0),o(t,s(e)+i),r(t,n(e)-a),t}},86639:(t,e,i)=>{t.exports={BottomCenter:i(27118),BottomLeft:i(84469),BottomRight:i(51577),LeftBottom:i(90271),LeftCenter:i(30466),LeftTop:i(50087),QuickSet:i(82590),RightBottom:i(13555),RightCenter:i(99049),RightTop:i(67788),TopCenter:i(78170),TopLeft:i(54145),TopRight:i(75548)}},21843:(t,e,i)=>{var s=i(28417),n=i(81711);t.exports=function(t,e,i){return s(t,e),n(t,i)}},97328:t=>{t.exports=function(t){return t.y+t.height-t.height*t.originY}},7126:(t,e,i)=>{var s=i(97328),n=i(40163),r=i(70271),o=i(47196);t.exports=function(t,e){void 0===e&&(e={});var i=n(t),a=o(t);return e.x=i,e.y=a,e.width=r(t)-i,e.height=s(t)-a,e}},59994:t=>{t.exports=function(t){return t.x-t.width*t.originX+.5*t.width}},29568:t=>{t.exports=function(t){return t.y-t.height*t.originY+.5*t.height}},40163:t=>{t.exports=function(t){return t.x-t.width*t.originX}},52088:t=>{t.exports=function(t){return t.width*t.originX}},23379:t=>{t.exports=function(t){return t.height*t.originY}},70271:t=>{t.exports=function(t){return t.x+t.width-t.width*t.originX}},47196:t=>{t.exports=function(t){return t.y-t.height*t.originY}},73174:t=>{t.exports=function(t,e){return t.y=e-t.height+t.height*t.originY,t}},28417:t=>{t.exports=function(t,e){var i=t.width*t.originX;return t.x=e+i-.5*t.width,t}},81711:t=>{t.exports=function(t,e){var i=t.height*t.originY;return t.y=e+i-.5*t.height,t}},74465:t=>{t.exports=function(t,e){return t.x=e+t.width*t.originX,t}},19298:t=>{t.exports=function(t,e){return t.x=e-t.width+t.width*t.originX,t}},84349:t=>{t.exports=function(t,e){return t.y=e+t.height*t.originY,t}},15252:(t,e,i)=>{t.exports={CenterOn:i(21843),GetBottom:i(97328),GetBounds:i(7126),GetCenterX:i(59994),GetCenterY:i(29568),GetLeft:i(40163),GetOffsetX:i(52088),GetOffsetY:i(23379),GetRight:i(70271),GetTop:i(47196),SetBottom:i(73174),SetCenterX:i(28417),SetCenterY:i(81711),SetLeft:i(74465),SetRight:i(19298),SetTop:i(84349)}},70616:t=>{t.exports={setCrisp:function(t){return["optimizeSpeed","-moz-crisp-edges","-o-crisp-edges","-webkit-optimize-contrast","optimize-contrast","crisp-edges","pixelated"].forEach((function(e){t.style["image-rendering"]=e})),t.style.msInterpolationMode="nearest-neighbor",t},setBicubic:function(t){return t.style["image-rendering"]="auto",t.style.msInterpolationMode="bicubic",t}}},61068:(t,e,i)=>{var s,n,r,o=i(86459),a=i(8213),h=[],l=!1;t.exports=(r=function(){var t=0;return h.forEach((function(e){e.parent&&t++})),t},{create2D:function(t,e,i){return s(t,e,i,o.CANVAS)},create:s=function(t,e,i,s,r){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=o.CANVAS),void 0===r&&(r=!1);var c=n(s);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:s},s===o.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),r&&(c.parent=u),u.width=e,u.height=i,l&&s===o.CANVAS&&a.disable(u.getContext("2d")),u},createWebGL:function(t,e,i){return s(t,e,i,o.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:n=function(t){if(void 0===t&&(t=o.CANVAS),t===o.WEBGL)return null;for(var e=0;e{var e,i="";t.exports={disable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!1),t},enable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!0),t},getPrefix:e=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i{t.exports=function(t,e){return void 0===e&&(e="none"),t.style.msTouchAction=e,t.style["ms-touch-action"]=e,t.style["touch-action"]=e,t}},36505:t=>{t.exports=function(t,e){void 0===e&&(e="none");return["-webkit-","-khtml-","-moz-","-ms-",""].forEach((function(i){t.style[i+"user-select"]=e})),t.style["-webkit-touch-callout"]=e,t.style["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",t}},23514:(t,e,i)=>{t.exports={CanvasInterpolation:i(70616),CanvasPool:i(61068),Smoothing:i(8213),TouchAction:i(59271),UserSelect:i(36505)}},27119:(t,e,i)=>{var s=i(56694),n=i(22946),r=i(5657),o=i(24650),a=i(68033),h=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=255),this.r=0,this.g=0,this.b=0,this.a=255,this._h=0,this._s=0,this._v=0,this._locked=!1,this.gl=[0,0,0,1],this._color=0,this._color32=0,this._rgba="",this.setTo(t,e,i,s)},transparent:function(){return this._locked=!0,this.red=0,this.green=0,this.blue=0,this.alpha=0,this._locked=!1,this.update(!0)},setTo:function(t,e,i,s,n){return void 0===s&&(s=255),void 0===n&&(n=!0),this._locked=!0,this.red=t,this.green=e,this.blue=i,this.alpha=s,this._locked=!1,this.update(n)},setGLTo:function(t,e,i,s){return void 0===s&&(s=1),this._locked=!0,this.redGL=t,this.greenGL=e,this.blueGL=i,this.alphaGL=s,this._locked=!1,this.update(!0)},setFromRGB:function(t){return this._locked=!0,this.red=t.r,this.green=t.g,this.blue=t.b,t.hasOwnProperty("a")&&(this.alpha=t.a),this._locked=!1,this.update(!0)},setFromHSV:function(t,e,i){return o(t,e,i,this)},update:function(t){if(void 0===t&&(t=!1),this._locked)return this;var e=this.r,i=this.g,s=this.b,o=this.a;return this._color=n(e,i,s),this._color32=r(e,i,s,o),this._rgba="rgba("+e+","+i+","+s+","+o/255+")",t&&a(e,i,s,this),this},updateHSV:function(){var t=this.r,e=this.g,i=this.b;return a(t,e,i,this),this},clone:function(){return new h(this.r,this.g,this.b,this.a)},gray:function(t){return this.setTo(t,t,t)},random:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t)),s=Math.floor(t+Math.random()*(e-t)),n=Math.floor(t+Math.random()*(e-t));return this.setTo(i,s,n)},randomGray:function(t,e){void 0===t&&(t=0),void 0===e&&(e=255);var i=Math.floor(t+Math.random()*(e-t));return this.setTo(i,i,i)},saturate:function(t){return this.s+=t/100,this},desaturate:function(t){return this.s-=t/100,this},lighten:function(t){return this.v+=t/100,this},darken:function(t){return this.v-=t/100,this},brighten:function(t){var e=this.r,i=this.g,s=this.b;return e=Math.max(0,Math.min(255,e-Math.round(-t/100*255))),i=Math.max(0,Math.min(255,i-Math.round(-t/100*255))),s=Math.max(0,Math.min(255,s-Math.round(-t/100*255))),this.setTo(e,i,s)},color:{get:function(){return this._color}},color32:{get:function(){return this._color32}},rgba:{get:function(){return this._rgba}},redGL:{get:function(){return this.gl[0]},set:function(t){this.gl[0]=Math.min(Math.abs(t),1),this.r=Math.floor(255*this.gl[0]),this.update(!0)}},greenGL:{get:function(){return this.gl[1]},set:function(t){this.gl[1]=Math.min(Math.abs(t),1),this.g=Math.floor(255*this.gl[1]),this.update(!0)}},blueGL:{get:function(){return this.gl[2]},set:function(t){this.gl[2]=Math.min(Math.abs(t),1),this.b=Math.floor(255*this.gl[2]),this.update(!0)}},alphaGL:{get:function(){return this.gl[3]},set:function(t){this.gl[3]=Math.min(Math.abs(t),1),this.a=Math.floor(255*this.gl[3]),this.update()}},red:{get:function(){return this.r},set:function(t){t=Math.floor(Math.abs(t)),this.r=Math.min(t,255),this.gl[0]=t/255,this.update(!0)}},green:{get:function(){return this.g},set:function(t){t=Math.floor(Math.abs(t)),this.g=Math.min(t,255),this.gl[1]=t/255,this.update(!0)}},blue:{get:function(){return this.b},set:function(t){t=Math.floor(Math.abs(t)),this.b=Math.min(t,255),this.gl[2]=t/255,this.update(!0)}},alpha:{get:function(){return this.a},set:function(t){t=Math.floor(Math.abs(t)),this.a=Math.min(t,255),this.gl[3]=t/255,this.update()}},h:{get:function(){return this._h},set:function(t){this._h=t,o(t,this._s,this._v,this)}},s:{get:function(){return this._s},set:function(t){this._s=t,o(this._h,t,this._v,this)}},v:{get:function(){return this._v},set:function(t){this._v=t,o(this._h,this._s,t,this)}}});t.exports=h},30245:(t,e,i)=>{var s=i(22946);t.exports=function(t){void 0===t&&(t=1024);var e,i=[],n=255,r=255,o=0,a=0;for(e=0;e<=n;e++)i.push({r:r,g:e,b:a,color:s(r,e,a)});for(o=255,e=n;e>=0;e--)i.push({r:e,g:o,b:a,color:s(e,o,a)});for(r=0,e=0;e<=n;e++,o--)i.push({r:r,g:o,b:e,color:s(r,o,e)});for(o=0,a=255,e=0;e<=n;e++,a--,r++)i.push({r:r,g:o,b:a,color:s(r,o,a)});if(1024===t)return i;var h=[],l=0,u=1024/t;for(e=0;e{t.exports=function(t){var e={r:t>>16&255,g:t>>8&255,b:255&t,a:255};return t>16777215&&(e.a=t>>>24),e}},25409:t=>{t.exports=function(t){var e=t.toString(16);return 1===e.length?"0"+e:e}},22946:t=>{t.exports=function(t,e,i){return t<<16|e<<8|i}},5657:t=>{t.exports=function(t,e,i,s){return s<<24|t<<16|e<<8|i}},74777:(t,e,i)=>{var s=i(27119),n=i(59998);t.exports=function(t,e,i){var r=i,o=i,a=i;if(0!==e){var h=i<.5?i*(1+e):i+e-i*e,l=2*i-h;r=n(l,h,t+1/3),o=n(l,h,t),a=n(l,h,t-1/3)}return(new s).setGLTo(r,o,a,1)}},89263:(t,e,i)=>{var s=i(24650);t.exports=function(t,e){void 0===t&&(t=1),void 0===e&&(e=1);for(var i=[],n=0;n<=359;n++)i.push(s(n/359,t,e));return i}},24650:(t,e,i)=>{var s=i(22946);function n(t,e,i,s){var n=(t+6*e)%6,r=Math.min(n,4-n,1);return Math.round(255*(s-s*i*Math.max(0,r)))}t.exports=function(t,e,i,r){void 0===e&&(e=1),void 0===i&&(i=1);var o=n(5,t,e,i),a=n(3,t,e,i),h=n(1,t,e,i);return r?r.setTo?r.setTo(o,a,h,r.alpha,!0):(r.r=o,r.g=a,r.b=h,r.color=s(o,a,h),r):{r:o,g:a,b:h,color:s(o,a,h)}}},91487:(t,e,i)=>{var s=i(27119);t.exports=function(t){var e=new s;t=t.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,i,s){return e+e+i+i+s+s}));var i=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);if(i){var n=parseInt(i[1],16),r=parseInt(i[2],16),o=parseInt(i[3],16);e.setTo(n,r,o)}return e}},59998:t=>{t.exports=function(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}},74853:(t,e,i)=>{var s=i(27119),n=i(15978);t.exports=function(t){var e=n(t);return new s(e.r,e.g,e.b,e.a)}},15978:t=>{t.exports=function(t){return t>16777215?{a:t>>>24,r:t>>16&255,g:t>>8&255,b:255&t}:{a:255,r:t>>16&255,g:t>>8&255,b:255&t}}},53756:(t,e,i)=>{var s=i(42798),n=function(t,e,i,n,r,o,a,h){void 0===a&&(a=100),void 0===h&&(h=0);var l=h/a;return{r:s(t,n,l),g:s(e,r,l),b:s(i,o,l)}};t.exports={RGBWithRGB:n,ColorWithRGB:function(t,e,i,s,r,o){return void 0===r&&(r=100),void 0===o&&(o=0),n(t.r,t.g,t.b,e,i,s,r,o)},ColorWithColor:function(t,e,i,s){return void 0===i&&(i=100),void 0===s&&(s=0),n(t.r,t.g,t.b,e.r,e.g,e.b,i,s)}}},73904:(t,e,i)=>{var s=i(27119);t.exports=function(t){return new s(t.r,t.g,t.b,t.a)}},26841:(t,e,i)=>{var s=i(27119);t.exports=function(t){var e=new s,i=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?))?\s*\)$/.exec(t.toLowerCase());if(i){var n=parseInt(i[1],10),r=parseInt(i[2],10),o=parseInt(i[3],10),a=void 0!==i[4]?parseFloat(i[4]):1;e.setTo(n,r,o,255*a)}return e}},68033:t=>{t.exports=function(t,e,i,s){void 0===s&&(s={h:0,s:0,v:0}),t/=255,e/=255,i/=255;var n=Math.min(t,e,i),r=Math.max(t,e,i),o=r-n,a=0,h=0===r?0:o/r,l=r;return r!==n&&(r===t?a=(e-i)/o+(e{var s=i(25409);t.exports=function(t,e,i,n,r){return void 0===n&&(n=255),void 0===r&&(r="#"),"#"===r?"#"+((1<<24)+(t<<16)+(e<<8)+i).toString(16).slice(1,7):"0x"+s(n)+s(t)+s(e)+s(i)}},37243:(t,e,i)=>{var s=i(17489),n=i(27119);t.exports=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=255),new n(s(t,e),s(t,e),s(t,e))}},93222:(t,e,i)=>{var s=i(91487),n=i(74853),r=i(73904),o=i(26841);t.exports=function(t){switch(typeof t){case"string":return"rgb"===t.substr(0,3).toLowerCase()?o(t):s(t);case"number":return n(t);case"object":return r(t)}}},95509:(t,e,i)=>{var s=i(27119);s.ColorSpectrum=i(30245),s.ColorToRGBA=i(86672),s.ComponentToHex=i(25409),s.GetColor=i(22946),s.GetColor32=i(5657),s.HexStringToColor=i(91487),s.HSLToColor=i(74777),s.HSVColorWheel=i(89263),s.HSVToRGB=i(24650),s.HueToComponent=i(59998),s.IntegerToColor=i(74853),s.IntegerToRGB=i(15978),s.Interpolate=i(53756),s.ObjectToColor=i(73904),s.RandomRGB=i(37243),s.RGBStringToColor=i(26841),s.RGBToHSV=i(68033),s.RGBToString=i(4880),s.ValueToColor=i(93222),t.exports=s},24816:(t,e,i)=>{t.exports={Align:i(93545),BaseShader:i(31053),Bounds:i(15252),Canvas:i(23514),Color:i(95509),ColorMatrix:i(65246),Masks:i(93310),RGB:i(39298)}},76756:(t,e,i)=>{var s=i(56694),n=i(61286),r=new s({initialize:function(t,e,i,s,n,r){e||(e=t.sys.make.image({x:i,y:s,key:n,frame:r,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e,i)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});n.register("bitmapMask",(function(t,e,i,s,n){return new r(this.scene,t,e,i,s,n)})),t.exports=r},63037:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var s=t.gl;t.flush(),0===t.maskStack.length&&(s.enable(s.STENCIL_TEST),s.clear(s.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var s=t.gl,n=this.geometryMask,r=t.maskCount;s.colorMask(!1,!1,!1,!1),i?(s.stencilFunc(s.EQUAL,r,255),s.stencilOp(s.KEEP,s.KEEP,s.INCR)):(s.stencilFunc(s.EQUAL,r+1,255),s.stencilOp(s.KEEP,s.KEEP,s.DECR)),n.renderWebGL(t,n,e),t.flush(),s.colorMask(!0,!0,!0,!0),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),i?this.invertAlpha?s.stencilFunc(s.NOTEQUAL,r+1,255):s.stencilFunc(s.EQUAL,r+1,255):this.invertAlpha?s.stencilFunc(s.NOTEQUAL,r,255):s.stencilFunc(s.EQUAL,r,255)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;if(0===t.maskStack.length)i.mask=null,e.disable(e.STENCIL_TEST);else{var s=t.maskStack[t.maskStack.length-1];s.mask.applyStencil(t,s.camera,!1),t.currentCameraMask.mask!==s.mask?(i.mask=s.mask,i.camera=s.camera):i.mask=null}},preRenderCanvas:function(t,e,i){var s=this.geometryMask;t.currentContext.save(),s.renderCanvas(t,s,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=s},93310:(t,e,i)=>{t.exports={BitmapMask:i(76756),GeometryMask:i(63037)}},31053:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s){e&&""!==e||(e=["precision mediump float;","uniform vec2 resolution;","varying vec2 fragCoord;","void main () {"," vec2 uv = fragCoord / resolution.xy;"," gl_FragColor = vec4(uv.xyx, 1.0);","}"].join("\n")),i&&""!==i||(i=["precision mediump float;","uniform mat4 uProjectionMatrix;","uniform mat4 uViewMatrix;","uniform vec2 uResolution;","attribute vec2 inPosition;","varying vec2 fragCoord;","varying vec2 outTexCoord;","void main () {"," gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);"," fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);"," outTexCoord = vec2(inPosition.x / uResolution.x, fragCoord.y / uResolution.y);","}"].join("\n")),void 0===s&&(s=null),this.key=t,this.fragmentSrc=e,this.vertexSrc=i,this.uniforms=s}});t.exports=s},99584:t=>{t.exports=function(t,e){var i;if(e)"string"==typeof e?i=document.getElementById(e):"object"==typeof e&&1===e.nodeType&&(i=e);else if(t.parentElement||null===e)return t;return i||(i=document.body),i.appendChild(t),t}},85178:(t,e,i)=>{var s=i(99584);t.exports=function(t){var e=t.config;if(e.parent&&e.domCreateContainer){var i=document.createElement("div");i.style.cssText=["display: block;","width: "+t.scale.width+"px;","height: "+t.scale.height+"px;","padding: 0; margin: 0;","position: absolute;","overflow: hidden;","pointer-events: "+e.domPointerEvents+";","transform: scale(1);","transform-origin: left top;"].join(" "),t.domContainer=i,s(i,e.parent)}}},21546:(t,e,i)=>{var s=i(36580);t.exports=function(t){if("complete"!==document.readyState&&"interactive"!==document.readyState){var e=function(){document.removeEventListener("deviceready",e,!0),document.removeEventListener("DOMContentLoaded",e,!0),window.removeEventListener("load",e,!0),t()};document.body?s.cordova?document.addEventListener("deviceready",e,!1):(document.addEventListener("DOMContentLoaded",e,!0),window.addEventListener("load",e,!0)):window.setTimeout(e,20)}else t()}},74181:t=>{t.exports=function(t){if(!t)return window.innerHeight;var e=Math.abs(window.orientation),i={w:0,h:0},s=document.createElement("div");return s.setAttribute("style","position: fixed; height: 100vh; width: 0; top: 0"),document.documentElement.appendChild(s),i.w=90===e?s.offsetHeight:window.innerWidth,i.h=90===e?window.innerWidth:s.offsetHeight,document.documentElement.removeChild(s),s=null,90!==Math.abs(window.orientation)?i.h:i.w}},9229:(t,e,i)=>{var s=i(55301);t.exports=function(t,e){var i=window.screen,n=!!i&&(i.orientation||i.mozOrientation||i.msOrientation);return n&&"string"==typeof n.type?n.type:"string"==typeof n?n:"number"==typeof window.orientation?0===window.orientation||180===window.orientation?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE:window.matchMedia?window.matchMedia("(orientation: portrait)").matches?s.ORIENTATION.PORTRAIT:window.matchMedia("(orientation: landscape)").matches?s.ORIENTATION.LANDSCAPE:void 0:e>t?s.ORIENTATION.PORTRAIT:s.ORIENTATION.LANDSCAPE}},2893:t=>{t.exports=function(t){var e;return""!==t&&("string"==typeof t?e=document.getElementById(t):t&&1===t.nodeType&&(e=t)),e||(e=document.body),e}},89200:t=>{t.exports=function(t){var e="";try{if(window.DOMParser)e=(new DOMParser).parseFromString(t,"text/xml");else(e=new ActiveXObject("Microsoft.XMLDOM")).loadXML(t)}catch(t){e=null}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length?e:null}},55638:t=>{t.exports=function(t){t.parentNode&&t.parentNode.removeChild(t)}},27385:(t,e,i)=>{var s=i(56694),n=i(72283),r=new s({initialize:function(){this.isRunning=!1,this.callback=n,this.isSetTimeOut=!1,this.timeOutID=null,this.delay=0;var t=this;this.step=function e(i){t.callback(i),t.isRunning&&(t.timeOutID=window.requestAnimationFrame(e))},this.stepTimeout=function e(){t.isRunning&&(t.timeOutID=window.setTimeout(e,t.delay)),t.callback(window.performance.now())}},start:function(t,e,i){this.isRunning||(this.callback=t,this.isSetTimeOut=e,this.delay=i,this.isRunning=!0,this.timeOutID=e?window.setTimeout(this.stepTimeout,0):window.requestAnimationFrame(this.step))},stop:function(){this.isRunning=!1,this.isSetTimeOut?clearTimeout(this.timeOutID):window.cancelAnimationFrame(this.timeOutID)},destroy:function(){this.stop(),this.callback=n}});t.exports=r},3590:(t,e,i)=>{var s={AddToDOM:i(99584),DOMContentLoaded:i(21546),GetInnerHeight:i(74181),GetScreenOrientation:i(9229),GetTarget:i(2893),ParseXML:i(89200),RemoveFromDOM:i(55638),RequestAnimationFrame:i(27385)};t.exports=s},78491:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(91963),o=new s({Extends:n,initialize:function(){n.call(this)},shutdown:function(){this.removeAllListeners()},destroy:function(){this.removeAllListeners()}});r.register("EventEmitter",o,"events"),t.exports=o},95146:(t,e,i)=>{t.exports={EventEmitter:i(78491)}},88933:(t,e,i)=>{var s=i(95723),n=i(20494);t.exports=function(t,e,i){e.x=n(i,"x",0),e.y=n(i,"y",0),e.depth=n(i,"depth",0),e.flipX=n(i,"flipX",!1),e.flipY=n(i,"flipY",!1);var r=n(i,"scale",null);"number"==typeof r?e.setScale(r):null!==r&&(e.scaleX=n(r,"x",1),e.scaleY=n(r,"y",1));var o=n(i,"scrollFactor",null);"number"==typeof o?e.setScrollFactor(o):null!==o&&(e.scrollFactorX=n(o,"x",1),e.scrollFactorY=n(o,"y",1)),e.rotation=n(i,"rotation",0);var a=n(i,"angle",null);null!==a&&(e.angle=a),e.alpha=n(i,"alpha",1);var h=n(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=n(h,"x",.5),u=n(h,"y",.5);e.setOrigin(l,u)}return e.blendMode=n(i,"blendMode",s.NORMAL),e.visible=n(i,"visible",!0),n(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},32291:(t,e,i)=>{var s=i(20494);t.exports=function(t,e){var i=s(e,"anims",null);if(null===i)return t;if("string"==typeof i)t.anims.play(i);else if("object"==typeof i){var n=t.anims,r=s(i,"key",void 0);if(r){var o=s(i,"startFrame",void 0),a=s(i,"delay",0),h=s(i,"repeat",0),l=s(i,"repeatDelay",0),u=s(i,"yoyo",!1),c=s(i,"play",!1),d=s(i,"delayedPlay",0),p={key:r,delay:a,repeat:h,repeatDelay:l,yoyo:u,startFrame:o};c?n.play(p):d>0?n.playAfterDelay(p,d):n.load(p)}}return t}},91713:(t,e,i)=>{var s=i(56694),n=i(71207),r=i(91963),o=i(56631),a=i(7599),h=i(17922),l=new s({Extends:n,initialize:function(t){n.call(this,t),this.sortChildrenFlag=!1,this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.events.once(a.BOOT,this.boot,this),this.events.on(a.START,this.start,this)},boot:function(){this.events.once(a.DESTROY,this.destroy,this)},addChildCallback:function(t){t.displayList&&t.displayList!==this&&t.removeFromDisplayList(),t.parentContainer&&t.parentContainer.remove(t),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(o.ADDED_TO_SCENE,t,this.scene),this.events.emit(a.ADDED_TO_SCENE,t,this.scene))},removeChildCallback:function(t){this.queueDepthSort(),t.displayList=null,t.emit(o.REMOVED_FROM_SCENE,t,this.scene),this.events.emit(a.REMOVED_FROM_SCENE,t,this.scene)},start:function(){this.events.once(a.SHUTDOWN,this.shutdown,this)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(h(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},shutdown:function(){for(var t=this.list;t.length;)t[0].destroy(!0);this.events.off(a.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(a.START,this.start,this),this.scene=null,this.systems=null,this.events=null}});r.register("DisplayList",l,"displayList"),t.exports=l},89980:(t,e,i)=>{var s=i(56694),n=i(48129),r=i(81078),o=i(6659),a=i(56631),h=i(7599),l=new s({Extends:o,initialize:function(t,e){o.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(a.ADDED_TO_SCENE,this.addedToScene,this),this.on(a.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(t,e){return this.data||(this.data=new r(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new r(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new r(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new r(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return n(this)},willRender:function(t){return!(!(!this.displayList||!this.displayList.active||this.displayList.willRender(t))||l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(a.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t&&t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(a.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},99325:(t,e,i)=>{var s=i(56694),n=i(91963),r=i(7599),o=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},shutdown:function(){this.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},n.register("GameObjectCreator",o,"make"),t.exports=o},61286:(t,e,i)=>{var s=i(56694),n=i(91963),r=i(7599),o=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});o.register=function(t,e){o.prototype.hasOwnProperty(t)||(o.prototype[t]=e)},o.remove=function(t){o.prototype.hasOwnProperty(t)&&delete o.prototype[t]},n.register("GameObjectFactory",o,"add"),t.exports=o},73329:(t,e,i)=>{var s=i(69360),n=new s,r=new s,o=new s,a={camera:n,sprite:r,calc:o};t.exports=function(t,e,i){var s=n,h=r,l=o;return h.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),h.e=t.x,h.f=t.y):(h.e-=e.scrollX*t.scrollFactorX,h.f-=e.scrollY*t.scrollFactorY),s.multiply(h,l),a}},92034:(t,e,i)=>{var s=i(56694),n=i(74623),r=i(91963),o=i(7599),a=new s({Extends:n,initialize:function(t){n.call(this),this.checkQueue=!0,this.scene=t,this.systems=t.sys,t.sys.events.once(o.BOOT,this.boot,this),t.sys.events.on(o.START,this.start,this)},boot:function(){this.systems.events.once(o.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(o.PRE_UPDATE,this.update,this),t.on(o.UPDATE,this.sceneUpdate,this),t.once(o.SHUTDOWN,this.shutdown,this)},sceneUpdate:function(t,e){for(var i=this._active,s=i.length,n=0;n{t.exports=function(t,e,i,s,n,r,o,a,h,l,u,c,d,p,f){var v=i.x-e.displayOriginX+n,g=i.y-e.displayOriginY+r,m=v+i.w,y=g+i.h,x=o.getXRound(v,g,a),T=o.getYRound(v,g,a),w=o.getXRound(v,y,a),b=o.getYRound(v,y,a),E=o.getXRound(m,y,a),S=o.getYRound(m,y,a),A=o.getXRound(m,g,a),C=o.getYRound(m,g,a);t.batchQuad(e,x,T,w,b,E,S,A,C,s.u0,s.v0,s.u1,s.v1,h,l,u,c,d,p,f)}},82173:t=>{t.exports=function(t,e,i,s){if(void 0===i&&(i=!1),void 0===s)return s={local:{x:0,y:0,width:0,height:0},global:{x:0,y:0,width:0,height:0},lines:{shortest:0,longest:0,lengths:null,height:0},wrappedText:"",words:[],characters:[],scaleX:0,scaleY:0};var n,r,o,a,h=t.text,l=h.length,u=t.maxWidth,c=t.wordWrapCharCode,d=Number.MAX_VALUE,p=Number.MAX_VALUE,f=0,v=0,g=t.fontData.chars,m=t.fontData.lineHeight,y=t.letterSpacing,x=t.lineSpacing,T=0,w=0,b=0,E=null,S=t._align,A=0,C=0,_=t.fontSize/t.fontData.size,M=_*t.scaleX,R=_*t.scaleY,P=null,O=0,L=[],F=Number.MAX_VALUE,D=0,k=0,I=0,B=[],N=[],Y=null;if(u>0){for(n=0;nu||H-z>u?(G.push(V.i-1),V.cr?(G.push(V.i+V.word.length),z=0,X=null):X=V):V.cr&&(G.push(V.i+V.word.length),z=0,X=null)}for(n=G.length-1;n>=0;n--)r=h,o=G[n],a="\n",h=r.substr(0,o)+a+r.substr(o+1);s.wrappedText=h,l=h.length,B=[],Y=null}var j=0;for(n=0;nA&&(d=A),p>C&&(p=C);var q=A+E.xAdvance,Z=C+m;fD&&(D=I),ID&&(D=I),I0)for(var Q=0;Q{var s=i(31476);t.exports=function(t,e,i,n,r,o,a){var h=t.sys.textures.get(i),l=h.get(n),u=t.sys.cache.xml.get(r);if(l&&u){var c=s(u,l,o,a,h);return t.sys.cache.bitmapFont.add(e,{data:c,texture:i,frame:n,fromAtlas:!0}),!0}return!1}},39860:(t,e,i)=>{var s=i(10850);t.exports=function(t,e){var i=e.width,n=e.height,r=Math.floor(i/2),o=Math.floor(n/2),a=s(e,"chars","");if(""!==a){var h=s(e,"image",""),l=t.sys.textures.getFrame(h),u=l.cutX,c=l.cutY,d=l.source.width,p=l.source.height,f=s(e,"offset.x",0),v=s(e,"offset.y",0),g=s(e,"spacing.x",0),m=s(e,"spacing.y",0),y=s(e,"lineSpacing",0),x=s(e,"charsPerRow",null);null===x&&(x=d/i)>a.length&&(x=a.length);for(var T=f,w=v,b={retroFont:!0,font:h,size:i,lineHeight:n+y,chars:{}},E=0,S=0;S{function e(t,e){return parseInt(t.getAttribute(e),10)}t.exports=function(t,i,s,n,r){void 0===s&&(s=0),void 0===n&&(n=0);var o=i.cutX,a=i.cutY,h=i.source.width,l=i.source.height,u=i.sourceIndex,c={},d=t.getElementsByTagName("info")[0],p=t.getElementsByTagName("common")[0];c.font=d.getAttribute("face"),c.size=e(d,"size"),c.lineHeight=e(p,"lineHeight")+n,c.chars={};var f=t.getElementsByTagName("char"),v=void 0!==i&&i.trimmed;if(v)var g=i.height,m=i.width;for(var y=0;y{var s=i(66863),n=i(98611),r={Parse:i(39860)};r=n(!1,r,s),t.exports=r},66863:t=>{t.exports={TEXT_SET1:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~",TEXT_SET2:" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET3:"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ",TEXT_SET4:"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789",TEXT_SET5:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789",TEXT_SET6:"ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' ",TEXT_SET7:"AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39",TEXT_SET8:"0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET9:"ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!",TEXT_SET10:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT_SET11:"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789"}},13468:(t,e,i)=>{var s=i(44616),n=i(56694),r=i(88899),o=new n({Extends:s,Mixins:[r],initialize:function(t,e,i,n,r,o,a){s.call(this,t,e,i,n,r,o,a),this.type="DynamicBitmapText",this.scrollX=0,this.scrollY=0,this.cropWidth=0,this.cropHeight=0,this.displayCallback,this.callbackData={parent:this,color:0,tint:{topLeft:0,topRight:0,bottomLeft:0,bottomRight:0},index:0,charCode:0,x:0,y:0,scale:0,rotation:0,data:0}},setSize:function(t,e){return this.cropWidth=t,this.cropHeight=e,this},setDisplayCallback:function(t){return this.displayCallback=t,this},setScrollX:function(t){return this.scrollX=t,this},setScrollY:function(t){return this.scrollY=t,this}});t.exports=o},93438:(t,e,i)=>{var s=i(49584);t.exports=function(t,e,i,n){var r=e._text,o=r.length,a=t.currentContext;if(0!==o&&s(t,a,e,i,n)){i.addToRenderList(e);var h=e.fromAtlas?e.frame:e.texture.frames.__BASE,l=e.displayCallback,u=e.callbackData,c=e.fontData.chars,d=e.fontData.lineHeight,p=e._letterSpacing,f=0,v=0,g=0,m=null,y=0,x=0,T=0,w=0,b=0,E=0,S=null,A=0,C=e.frame.source.image,_=h.cutX,M=h.cutY,R=0,P=0,O=e._fontSize/e.fontData.size,L=e._align,F=0,D=0;e.getTextBounds(!1);var k=e._bounds.lines;1===L?D=(k.longest-k.lengths[0])/2:2===L&&(D=k.longest-k.lengths[0]),a.translate(-e.displayOriginX,-e.displayOriginY);var I=i.roundPixels;e.cropWidth>0&&e.cropHeight>0&&(a.beginPath(),a.rect(0,0,e.cropWidth,e.cropHeight),a.clip());for(var B=0;B{var s=i(13468),n=i(88933),r=i(99325),o=i(20494);r.register("dynamicBitmapText",(function(t,e){void 0===t&&(t={});var i=o(t,"font",""),r=o(t,"text",""),a=o(t,"size",!1),h=new s(this.scene,0,0,i,r,a);return void 0!==e&&(t.add=e),n(this.scene,h,t),h}))},94145:(t,e,i)=>{var s=i(13468);i(61286).register("dynamicBitmapText",(function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,n,r))}))},88899:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(16873),r=i(93438),t.exports={renderWebGL:n,renderCanvas:r}},16873:(t,e,i)=>{var s=i(73329),n=i(69360),r=i(75512),o=new n;t.exports=function(t,e,i,n){var a=e.text,h=a.length;if(0!==h){i.addToRenderList(e);var l=t.pipelines.set(e.pipeline,e),u=s(e,i,n),c=u.sprite,d=u.calc,p=o,f=e.cropWidth>0||e.cropHeight>0;f&&(l.flush(),t.pushScissor(d.tx,d.ty,e.cropWidth*d.scaleX,e.cropHeight*d.scaleY));var v,g,m=e.frame.glTexture,y=e.tintFill,x=r.getTintAppendFloatAlpha(e.tintTopLeft,i.alpha*e._alphaTL),T=r.getTintAppendFloatAlpha(e.tintTopRight,i.alpha*e._alphaTR),w=r.getTintAppendFloatAlpha(e.tintBottomLeft,i.alpha*e._alphaBL),b=r.getTintAppendFloatAlpha(e.tintBottomRight,i.alpha*e._alphaBR),E=l.setGameObject(e),S=0,A=0,C=0,_=0,M=e.letterSpacing,R=0,P=0,O=e.scrollX,L=e.scrollY,F=e.fontData,D=F.chars,k=F.lineHeight,I=e.fontSize/F.size,B=0,N=e._align,Y=0,U=0,X=e.getTextBounds(!1);e.maxWidth>0&&(h=(a=X.wrappedText).length);var z=e._bounds.lines;1===N?U=(z.longest-z.lengths[0])/2:2===N&&(U=z.longest-z.lengths[0]);var G=i.roundPixels,V=e.displayCallback,W=e.callbackData;t.pipelines.preBatch(e);for(var H=0;H{var s=i(56694),n=i(82897),r=i(64937),o=i(89980),a=i(82173),h=i(68298),l=i(31476),u=i(74118),c=i(84557),d=new s({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Texture,r.Tint,r.Transform,r.Visible,c],initialize:function(t,e,i,s,n,r,h){void 0===n&&(n=""),void 0===h&&(h=0),o.call(this,t,"BitmapText"),this.font=s;var l=this.scene.sys.cache.bitmapFont.get(s);l||console.warn("Invalid BitmapText key: "+s),this.fontData=l.data,this._text="",this._fontSize=r||this.fontData.size,this._letterSpacing=0,this._lineSpacing=0,this._align=h,this._bounds=a(),this._dirty=!0,this._maxWidth=0,this.wordWrapCharCode=32,this.charColors=[],this.dropShadowX=0,this.dropShadowY=0,this.dropShadowColor=0,this.dropShadowAlpha=.5,this.fromAtlas=l.fromAtlas,this.setTexture(l.texture,l.frame),this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.setText(n)},setLeftAlign:function(){return this._align=d.ALIGN_LEFT,this._dirty=!0,this},setCenterAlign:function(){return this._align=d.ALIGN_CENTER,this._dirty=!0,this},setRightAlign:function(){return this._align=d.ALIGN_RIGHT,this._dirty=!0,this},setFontSize:function(t){return this._fontSize=t,this._dirty=!0,this},setLetterSpacing:function(t){return void 0===t&&(t=0),this._letterSpacing=t,this._dirty=!0,this},setLineSpacing:function(t){return void 0===t&&(t=0),this.lineSpacing=t,this},setText:function(t){return t||0===t||(t=""),Array.isArray(t)&&(t=t.join("\n")),t!==this.text&&(this._text=t.toString(),this._dirty=!0,this.updateDisplayOrigin()),this},setDropShadow:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=.5),this.dropShadowX=t,this.dropShadowY=e,this.dropShadowColor=i,this.dropShadowAlpha=s,this},setCharacterTint:function(t,e,i,s,r,o,a){void 0===t&&(t=0),void 0===e&&(e=1),void 0===i&&(i=!1),void 0===s&&(s=-1),void 0===r&&(r=s,o=s,a=s);var h=this.text.length;-1===e&&(e=h),t<0&&(t=h+t),t=n(t,0,h-1);for(var l=n(t+e,t,h),u=this.charColors,c=t;c{var s=i(49584);t.exports=function(t,e,i,n){var r=e._text,o=r.length,a=t.currentContext;if(0!==o&&s(t,a,e,i,n)){i.addToRenderList(e);var h=e.fromAtlas?e.frame:e.texture.frames.__BASE,l=e.fontData.chars,u=e.fontData.lineHeight,c=e._letterSpacing,d=e._lineSpacing,p=0,f=0,v=0,g=null,m=0,y=0,x=0,T=0,w=0,b=0,E=null,S=0,A=h.source.image,C=h.cutX,_=h.cutY,M=e._fontSize/e.fontData.size,R=e._align,P=0,O=0,L=e.getTextBounds(!1);e.maxWidth>0&&(o=(r=L.wrappedText).length);var F=e._bounds.lines;1===R?O=(F.longest-F.lengths[0])/2:2===R&&(O=F.longest-F.lengths[0]),a.translate(-e.displayOriginX,-e.displayOriginY);for(var D=i.roundPixels,k=0;k{var s=i(44616),n=i(88933),r=i(99325),o=i(20494),a=i(10850);r.register("bitmapText",(function(t,e){void 0===t&&(t={});var i=a(t,"font",""),r=o(t,"text",""),h=o(t,"size",!1),l=a(t,"align",0),u=new s(this.scene,0,0,i,r,h,l);return void 0!==e&&(t.add=e),n(this.scene,u,t),u}))},21797:(t,e,i)=>{var s=i(44616);i(61286).register("bitmapText",(function(t,e,i,n,r,o){return this.displayList.add(new s(this.scene,t,e,i,n,r,o))}))},84557:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(26372),r=i(97545),t.exports={renderWebGL:n,renderCanvas:r}},26372:(t,e,i)=>{var s=i(8810),n=i(73329),r=i(75512);t.exports=function(t,e,i,o){if(0!==e._text.length){i.addToRenderList(e);var a,h,l,u=t.pipelines.set(e.pipeline,e),c=n(e,i,o).calc,d=i.roundPixels,p=i.alpha,f=e.charColors,v=e.tintFill,g=r.getTintAppendFloatAlpha,m=g(e.tintTopLeft,p*e._alphaTL),y=g(e.tintTopRight,p*e._alphaTR),x=g(e.tintBottomLeft,p*e._alphaBL),T=g(e.tintBottomRight,p*e._alphaBR),w=e.frame.glTexture,b=u.setGameObject(e),E=e.getTextBounds(!1).characters,S=e.dropShadowX,A=e.dropShadowY,C=0!==S||0!==A;if(t.pipelines.preBatch(e),C){var _=e.dropShadowColor,M=e.dropShadowAlpha,R=g(_,p*M*e._alphaTL),P=g(_,p*M*e._alphaTR),O=g(_,p*M*e._alphaBL),L=g(_,p*M*e._alphaBR);for(a=0;a{var s=i(92246),n=i(41664),r=i(56694),o=i(64937),a=i(82047),h=i(89980),l=i(71207),u=new r({Extends:h,Mixins:[o.Alpha,o.BlendMode,o.Depth,o.Mask,o.Pipeline,o.ScrollFactor,o.Size,o.Texture,o.Transform,o.Visible,s],initialize:function(t,e,i,s,n){h.call(this,t,"Blitter"),this.setTexture(s,n),this.setPosition(e,i),this.initPipeline(),this.children=new l,this.renderList=[],this.dirty=!1},create:function(t,e,i,s,r){void 0===s&&(s=!0),void 0===r&&(r=this.children.length),void 0===i?i=this.frame:i instanceof a||(i=this.texture.get(i));var o=new n(this,t,e,i,s);return this.children.addAt(o,r,!1),this.dirty=!0,o},createFromCallback:function(t,e,i,s){for(var n=this.createMultiple(e,i,s),r=0;r0},getRenderList:function(){return this.dirty&&(this.renderList=this.children.list.filter(this.childCanRender,this),this.dirty=!1),this.renderList},clear:function(){this.children.removeAll(),this.dirty=!0},preDestroy:function(){this.children.destroy(),this.renderList=[]}});t.exports=u},33177:t=>{t.exports=function(t,e,i,s){var n=e.getRenderList();if(0!==n.length){var r=t.currentContext,o=i.alpha*e.alpha;if(0!==o){i.addToRenderList(e),r.globalCompositeOperation=t.blendModes[e.blendMode],r.imageSmoothingEnabled=!e.frame.source.scaleMode;var a=e.x-i.scrollX*e.scrollFactorX,h=e.y-i.scrollY*e.scrollFactorY;r.save(),s&&s.copyToContext(r);for(var l=i.roundPixels,u=0;u0&&f.height>0&&(r.save(),r.translate(c.x+a,c.y+h),r.scale(m,y),r.drawImage(p.source.image,f.x,f.y,f.width,f.height,v,g,f.width,f.height),r.restore())):(l&&(v=Math.round(v),g=Math.round(g)),f.width>0&&f.height>0&&r.drawImage(p.source.image,f.x,f.y,f.width,f.height,v+c.x+a,g+c.y+h,f.width,f.height)))}r.restore()}}}},68452:(t,e,i)=>{var s=i(52816),n=i(88933),r=i(99325),o=i(20494);r.register("blitter",(function(t,e){void 0===t&&(t={});var i=o(t,"key",null),r=o(t,"frame",null),a=new s(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),n(this.scene,a,t),a}))},38906:(t,e,i)=>{var s=i(52816);i(61286).register("blitter",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},92246:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(89165),r=i(33177),t.exports={renderWebGL:n,renderCanvas:r}},89165:(t,e,i)=>{var s=i(69360),n=i(75512),r=new s;t.exports=function(t,e,i,s){var o=e.getRenderList(),a=i.alpha*e.alpha;if(0!==o.length&&0!==a){i.addToRenderList(e);var h=t.pipelines.set(this.pipeline,e),l=i.scrollX*e.scrollFactorX,u=i.scrollY*e.scrollFactorY,c=r.copyFrom(i.matrix);s&&(c.multiplyWithOffset(s,-l,-u),l=0,u=0);var d=e.x-l,p=e.y-u,f=-1,v=i.roundPixels;t.pipelines.preBatch(e);for(var g=0;g{var s=i(56694),n=i(82047),r=new s({initialize:function(t,e,i,s,n){this.parent=t,this.x=e,this.y=i,this.frame=s,this.data={},this.tint=16777215,this._visible=n,this._alpha=1,this.flipX=!1,this.flipY=!1,this.hasTransformComponent=!0},setFrame:function(t){return void 0===t?this.frame=this.parent.frame:t instanceof n&&t.texture===this.parent.texture?this.frame=t:this.frame=this.parent.texture.get(t),this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this},reset:function(t,e,i){return this.x=t,this.y=e,this.flipX=!1,this.flipY=!1,this._alpha=1,this._visible=!0,this.parent.dirty=!0,i&&this.setFrame(i),this},setPosition:function(t,e){return this.x=t,this.y=e,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},setVisible:function(t){return this.visible=t,this},setAlpha:function(t){return this.alpha=t,this},setTint:function(t){return this.tint=t,this},destroy:function(){this.parent.dirty=!0,this.parent.children.remove(this),this.parent=void 0,this.frame=void 0,this.data=void 0},visible:{get:function(){return this._visible},set:function(t){this.parent.dirty|=this._visible!==t,this._visible=t}},alpha:{get:function(){return this._alpha},set:function(t){this.parent.dirty|=this._alpha>0!=t>0,this._alpha=t}}});t.exports=r},97123:(t,e,i)=>{var s=i(82897),n={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,n){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=s(t,0,1),this._alphaTR=s(e,0,1),this._alphaBL=s(i,0,1),this._alphaBR=s(n,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=s(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=s(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=s(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=s(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=n},15720:(t,e,i)=>{var s=i(82897),n={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=n},69732:(t,e,i)=>{var s=i(95723),n={_blendMode:s.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=s[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=n},28284:t=>{t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},85293:t=>{var e={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var n=t;this.frame.setCropUVs(this._crop,n.x,n.y,n.width,n.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=e},14975:t=>{var e={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=e},88677:t=>{var e={fxPadding:0,setFXPadding:function(t){return void 0===t&&(t=0),this.fxPadding=t,this},onFXCopy:function(){},onFX:function(){}};t.exports=e},92972:t=>{t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},80693:(t,e,i)=>{var s=i(74118),n=i(2386),r=i(93736),o={prepareBoundsOutput:function(t,e){(void 0===e&&(e=!1),0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,n,r,o,a,h,l;if(void 0===t&&(t=new s),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),u.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),n=t.x,r=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),o=t.x,a=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),n=t.x,r=t.y,this.getBottomLeft(t),o=t.x,a=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,n,o,h),t.y=Math.min(i,r,a,l),t.width=Math.max(e,n,o,h)-t.x,t.height=Math.max(i,r,a,l)-t.y,t}};t.exports=o},39171:(t,e,i)=>{var s=i(76756),n=i(63037),r={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t,e,i,n,r){return void 0===t&&(this.texture||this.shader||this.geom)&&(t=this),new s(this.scene,t,e,i,n,r)},createGeometryMask:function(t){return void 0!==t||"Graphics"!==this.type&&!this.geom||(t=this),new n(this.scene,t)}};t.exports=r},28072:t=>{var e={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=e},54211:(t,e,i)=>{var s=i(75606),n=i(63130),r=i(10850),o=i(55303),a=i(93736),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:o.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=r(t,"from",0),t.to=r(t,"to",1);var h=n(t,"positionOnPath",!1);this.rotateToPath=n(t,"rotateToPath",!1),this.pathRotationOffset=r(t,"rotationOffset",0);var l=r(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.setTargetValue()}),this.pathOffset||(this.pathOffset=new a(this.x,this.y)),this.pathVector||(this.pathVector=new a),this.pathDelta||(this.pathDelta=new a),this.pathDelta.reset(),t.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=o.PLAYING_FORWARD,this.rotateToPath){var u=this.path.getPoint(.1);this.rotation=Math.atan2(u.y-this.y,u.x-this.x)+s(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t){var e=t.data[0],i=this.pathDelta,n=this.pathVector;if(i.copy(n).negate(),e.state===o.COMPLETE)return this.path.getPoint(e.end,n),i.add(n),n.add(this.pathOffset),void this.setPosition(n.x,n.y);if(e.state!==o.PLAYING_FORWARD&&e.state!==o.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),n),i.add(n),n.add(this.pathOffset);var r=this.x,a=this.y;this.setPosition(n.x,n.y);var h=this.x-r,l=this.y-a;if(0===h&&0===l)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(l,h)+s(this.pathRotationOffset))}}};t.exports=h},58210:(t,e,i)=>{var s=i(28699),n=i(72677),r={defaultPipeline:null,pipeline:null,hasPostPipeline:!1,postPipelines:null,pipelineData:null,initPipeline:function(t){var e=this.scene.sys.renderer;if(!e)return!1;var i=e.pipelines;if(this.postPipelines=[],this.pipelineData={},i){void 0===t&&(t=i.default);var s=i.get(t);if(s)return this.defaultPipeline=s,this.pipeline=s,!0}return!1},setPipeline:function(t,e,i){var n=this.scene.sys.renderer;if(!n)return this;var r=n.pipelines;if(r){var o=r.get(t);o&&(this.pipeline=o),e&&(this.pipelineData=i?s(e):e)}return this},setPostPipeline:function(t,e,i){var n=this.scene.sys.renderer;if(!n)return this;var r=n.pipelines;if(r){Array.isArray(t)||(t=[t]);for(var o=0;o0,this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e="string"==typeof t,i=this.postPipelines,s=[],n=0;n=0;i--){var s=e[i];("string"==typeof t&&s.name===t||"string"!=typeof t&&s instanceof t)&&(s.destroy(),n(e,i))}return this.hasPostPipeline=this.postPipelines.length>0,this},getPipelineName:function(){return this.pipeline.name}};t.exports=r},45900:t=>{var e={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=e},31654:t=>{var e={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=this.width,e.hitArea.height=this.height),this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=e},82081:(t,e,i)=>{var s=i(82047),n={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=n},21850:(t,e,i)=>{var s=i(82047),n={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var n=t;this.frame.setCropUVs(this._crop,n.x,n.y,n.width,n.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=n},58072:t=>{var e={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,i=t,s=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=s,this.tintFill=!1,this},setTintFill:function(t,e,i,s){return this.setTint(t,e,i,s),this.tintFill=!0,this},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};t.exports=e},48129:t=>{t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},56584:(t,e,i)=>{var s=i(83392),n=i(69360),r=i(64462),o=i(35786),a=i(62138),h=i(93736),l={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return a(this._rotation*s.RAD_TO_DEG)},set:function(t){this.rotation=a(t)*s.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=o(t)}},setPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=0),this.x=t,this.y=e,this.z=i,this.w=s,this},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===s&&(s=this.scene.sys.scale.height),this.x=t+Math.random()*i,this.y=e+Math.random()*s,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new n),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new n),void 0===e&&(e=new n);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);i;)e.applyITRS(i.x,i.y,i._rotation,i._scaleX,i._scaleY),e.multiply(t,t),i=i.parentContainer;return t},getLocalPoint:function(t,e,i,s){i||(i=new h),s||(s=this.scene.sys.cameras.main);var n=s.scrollX,o=s.scrollY,a=t+n*this.scrollFactorX-n,l=e+o*this.scrollFactorY-o;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(a,l,i):r(a,l,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=l},69360:(t,e,i)=>{var s=i(56694),n=i(83392),r=i(93736),o=new s({initialize:function(t,e,i,s,n,r){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=1),void 0===n&&(n=0),void 0===r&&(r=0),this.matrix=new Float32Array([t,e,i,s,n,r,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],r=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):s||r?n.TAU-(r>0?Math.acos(-s/this.scaleY):-Math.acos(s/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),s=this.matrix,n=s[0],r=s[1],o=s[2],a=s[3];return s[0]=n*i+o*e,s[1]=r*i+a*e,s[2]=n*-e+o*i,s[3]=r*-e+a*i,this},multiply:function(t,e){var i=this.matrix,s=t.matrix,n=i[0],r=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=s[0],c=s[1],d=s[2],p=s[3],f=s[4],v=s[5],g=void 0===e?i:e.matrix;return g[0]=u*n+c*o,g[1]=u*r+c*a,g[2]=d*n+p*o,g[3]=d*r+p*a,g[4]=f*n+v*o+h,g[5]=f*r+v*a+l,g},multiplyWithOffset:function(t,e,i){var s=this.matrix,n=t.matrix,r=s[0],o=s[1],a=s[2],h=s[3],l=e*r+i*a+s[4],u=e*o+i*h+s[5],c=n[0],d=n[1],p=n[2],f=n[3],v=n[4],g=n[5];return s[0]=c*r+d*a,s[1]=c*o+d*h,s[2]=p*r+f*a,s[3]=p*o+f*h,s[4]=v*r+g*a+l,s[5]=v*o+g*h+u,this},transform:function(t,e,i,s,n,r){var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*u,o[2]=i*a+s*l,o[3]=i*h+s*u,o[4]=n*a+r*l+c,o[5]=n*h+r*u+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var s=this.matrix,n=s[0],r=s[1],o=s[2],a=s[3],h=s[4],l=s[5];return i.x=t*n+e*o+h,i.y=t*r+e*a+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=e*n-i*s;return t[0]=n/a,t[1]=-i/a,t[2]=-s/a,t[3]=e/a,t[4]=(s*o-n*r)/a,t[5]=-(e*o-i*r)/a,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,s,n,r){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=s,o[4]=n,o[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],s=e[1],n=e[2],r=e[3],o=i*r-s*n;if(t.translateX=e[4],t.translateY=e[5],i||s){var a=Math.sqrt(i*i+s*s);t.rotation=s>0?Math.acos(i/a):-Math.acos(i/a),t.scaleX=a,t.scaleY=o/a}else if(n||r){var h=Math.sqrt(n*n+r*r);t.rotation=.5*Math.PI-(r>0?Math.acos(-n/h):-Math.acos(n/h)),t.scaleX=o/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,s,n){var r=this.matrix,o=Math.sin(i),a=Math.cos(i);return r[4]=t,r[5]=e,r[0]=a*s,r[1]=o*s,r[2]=-o*n,r[3]=a*n,this},applyInverse:function(t,e,i){void 0===i&&(i=new r);var s=this.matrix,n=s[0],o=s[1],a=s[2],h=s[3],l=s[4],u=s[5],c=1/(n*h+a*-o);return i.x=h*c*t+-a*c*e+(u*a-l*h)*c,i.y=n*c*e+-o*c*t+(-u*n+l*o)*c,i},setQuad:function(t,e,i,s,n,r){void 0===r&&(r=this.quad);var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return r[0]=t*a+e*l+c,r[1]=t*h+e*u+d,r[2]=t*a+s*l+c,r[3]=t*h+s*u+d,r[4]=i*a+s*l+c,r[5]=i*h+s*u+d,r[6]=i*a+e*l+c,r[7]=i*h+e*u+d,n&&r.forEach((function(t,e){r[e]=Math.round(t)})),r},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var s=this.getX(t,e);return i&&(s=Math.round(s)),s},getYRound:function(t,e,i){var s=this.getY(t,e);return i&&(s=Math.round(s)),s},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});t.exports=o},59694:t=>{var e={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=e},64937:(t,e,i)=>{t.exports={Alpha:i(97123),AlphaSingle:i(15720),BlendMode:i(69732),ComputedSize:i(28284),Crop:i(85293),Depth:i(14975),Flip:i(92972),FX:i(88677),GetBounds:i(80693),Mask:i(39171),Origin:i(28072),PathFollower:i(54211),Pipeline:i(58210),ScrollFactor:i(45900),Size:i(31654),Texture:i(82081),TextureCrop:i(21850),Tint:i(58072),ToJSON:i(48129),Transform:i(56584),TransformMatrix:i(69360),Visible:i(59694)}},70339:(t,e,i)=>{var s=i(59959),n=i(95723),r=i(56694),o=i(64937),a=i(56631),h=i(89980),l=i(74118),u=i(98524),c=i(58795),d=i(93736),p=new r({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Pipeline,o.Transform,o.Visible,u],initialize:function(t,e,i,s){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPipeline(),this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(n.SKIP_CHECK),s&&this.add(s)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,s=new l,n=!1;t.setEmpty();for(var r=0;r-1},setAll:function(t,e,i,n){return s.SetAll(this.list,t,e,i,n),this},each:function(t,e){var i,s=[null],n=this.list.slice(),r=n.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=p},13916:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var n=e.list;if(0!==n.length){var r=e.localTransform;s?(r.loadIdentity(),r.multiply(s),r.translate(e.x,e.y),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY)):r.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var o=-1!==e.blendMode;o||t.setBlendMode(0);var a=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var u=0;u{var s=i(88933),n=i(70339),r=i(99325),o=i(20494);r.register("container",(function(t,e){void 0===t&&(t={});var i=o(t,"x",0),r=o(t,"y",0),a=o(t,"children",null),h=new n(this.scene,i,r,a);return void 0!==e&&(t.add=e),s(this.scene,h,t),h}))},23400:(t,e,i)=>{var s=i(70339);i(61286).register("container",(function(t,e,i){return this.displayList.add(new s(this.scene,t,e,i))}))},98524:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(36934),r=i(13916),t.exports={renderWebGL:n,renderCanvas:r}},36934:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var n=e.list,r=n.length;if(0!==r){var o=e.localTransform;s?(o.loadIdentity(),o.multiply(s),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.pipelines.preBatch(e);var a=-1!==e.blendMode;a||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,u=e.scrollFactorY,c=0;c{t.exports=["normal","multiply","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]},38943:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(11603),o=i(89980),a=i(42911),h=i(55638),l=i(7599),u=i(51729),c=new s({Extends:o,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Origin,n.ScrollFactor,n.Transform,n.Visible,r],initialize:function(t,e,i,s,n,r){o.call(this,t,"DOMElement"),this.parent=t.sys.game.domContainer,this.cache=t.sys.cache.html,this.node,this.transformOnly=!1,this.skewX=0,this.skewY=0,this.rotate3d=new u,this.rotate3dAngle="deg",this.pointerEvents="auto",this.width=0,this.height=0,this.displayWidth=0,this.displayHeight=0,this.handler=this.dispatchNativeEvent.bind(this),this.setPosition(e,i),"string"==typeof s?"#"===s[0]?this.setElement(s.substr(1),n,r):this.createElement(s,n,r):s&&this.setElement(s,n,r),t.sys.events.on(l.SLEEP,this.handleSceneEvent,this),t.sys.events.on(l.WAKE,this.handleSceneEvent,this),t.sys.events.on(l.PRE_RENDER,this.preRender,this)},handleSceneEvent:function(t){var e=this.node,i=e.style;e&&(i.display=t.settings.visible?"block":"none")},setSkew:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.skewX=t,this.skewY=e,this},setPerspective:function(t){return this.parent.style.perspective=t+"px",this},perspective:{get:function(){return parseFloat(this.parent.style.perspective)},set:function(t){this.parent.style.perspective=t+"px"}},addListener:function(t){if(this.node){t=t.split(" ");for(var e=0;e{var s=i(2452),n=i(89980),r=i(69360),o=new r,a=new r,h=new r;t.exports=function(t,e,i,r){if(e.node){var l=e.node.style,u=e.scene.sys.settings;if(!l||!u.visible||n.RENDER_MASK!==e.renderFlags||0!==e.cameraFilter&&e.cameraFilter&i.id||e.parentContainer&&!e.parentContainer.willRender())l.display="none";else{var c=e.parentContainer,d=i.alpha*e.alpha;c&&(d*=c.alpha);var p=o,f=a,v=h,g=0,m=0,y="0%",x="0%";r?(g=e.width*e.scaleX*e.originX,m=e.height*e.scaleY*e.originY,f.applyITRS(e.x-g,e.y-m,e.rotation,e.scaleX,e.scaleY),p.copyFrom(i.matrix),p.multiplyWithOffset(r,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),f.e=e.x-g,f.f=e.y-m,p.multiply(f,v)):(g=e.width*e.originX,m=e.height*e.originY,f.applyITRS(e.x-g,e.y-m,e.rotation,e.scaleX,e.scaleY),p.copyFrom(i.matrix),y=100*e.originX+"%",x=100*e.originY+"%",f.e-=i.scrollX*e.scrollFactorX,f.f-=i.scrollY*e.scrollFactorY,p.multiply(f,v)),e.transformOnly||(l.display="block",l.opacity=d,l.zIndex=e._depth,l.pointerEvents=e.pointerEvents,l.mixBlendMode=s[e._blendMode]),l.transform=v.getCSSMatrix()+" skew("+e.skewX+"rad, "+e.skewY+"rad) rotate3d("+e.rotate3d.x+","+e.rotate3d.y+","+e.rotate3d.z+","+e.rotate3d.w+e.rotate3dAngle+")",l.transformOrigin=y+" "+x}}}},66788:(t,e,i)=>{var s=i(38943);i(61286).register("dom",(function(t,e,i,n,r){var o=new s(this.scene,t,e,i,n,r);return this.displayList.add(o),o}))},11603:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(66070),r=i(66070),t.exports={renderWebGL:n,renderCanvas:r}},65492:t=>{t.exports="addedtoscene"},98398:t=>{t.exports="destroy"},40239:t=>{t.exports="removedfromscene"},17286:t=>{t.exports="complete"},31496:t=>{t.exports="created"},89587:t=>{t.exports="error"},96342:t=>{t.exports="loop"},49614:t=>{t.exports="play"},24418:t=>{t.exports="seeked"},87318:t=>{t.exports="seeking"},61922:t=>{t.exports="stop"},13991:t=>{t.exports="timeout"},4052:t=>{t.exports="unlocked"},56631:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(65492),DESTROY:i(98398),REMOVED_FROM_SCENE:i(40239),VIDEO_COMPLETE:i(17286),VIDEO_CREATED:i(31496),VIDEO_ERROR:i(89587),VIDEO_LOOP:i(96342),VIDEO_PLAY:i(49614),VIDEO_SEEKED:i(24418),VIDEO_SEEKING:i(87318),VIDEO_STOP:i(61922),VIDEO_TIMEOUT:i(13991),VIDEO_UNLOCKED:i(4052)}},39419:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),o=i(79394),a=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.Origin,n.ScrollFactor,n.Size,n.Texture,n.Tint,n.Transform,n.Visible,o],initialize:function(t){r.call(this,t,"Extern")},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(){},render:function(){}});t.exports=a},96699:()=>{},41155:(t,e,i)=>{var s=i(39419);i(61286).register("extern",(function(){var t=new s(this.scene);return this.displayList.add(t),t}))},79394:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(81410),r=i(96699),t.exports={renderWebGL:n,renderCanvas:r}},81410:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){t.pipelines.clear();var r=s(e,i,n).calc;e.render.call(e,t,i,r),t.pipelines.rebind()}},36266:t=>{t.exports={ARC:0,BEGIN_PATH:1,CLOSE_PATH:2,FILL_RECT:3,LINE_TO:4,MOVE_TO:5,LINE_STYLE:6,FILL_STYLE:7,FILL_PATH:8,STROKE_PATH:9,FILL_TRIANGLE:10,STROKE_TRIANGLE:11,SAVE:14,RESTORE:15,TRANSLATE:16,SCALE:17,ROTATE:18,GRADIENT_FILL_STYLE:21,GRADIENT_LINE_STYLE:22}},33182:(t,e,i)=>{var s=i(51052),n=i(56694),r=i(36266),o=i(15720),a=i(69732),h=i(14975),l=i(39171),u=i(58210),c=i(45900),d=i(56584),p=i(59694),f=i(95669),v=i(89980),g=i(72632),m=i(10850),y=i(83392),x=i(60898),T=new n({Extends:v,Mixins:[o,a,h,l,u,d,p,c,x],initialize:function(t,e){var i=m(e,"x",0),s=m(e,"y",0);v.call(this,t,"Graphics"),this.setPosition(i,s),this.initPipeline(),this.displayOriginX=0,this.displayOriginY=0,this.commandBuffer=[],this.defaultFillColor=-1,this.defaultFillAlpha=1,this.defaultStrokeWidth=1,this.defaultStrokeColor=-1,this.defaultStrokeAlpha=1,this._lineWidth=1,this.setDefaultStyles(e)},setDefaultStyles:function(t){return m(t,"lineStyle",null)&&(this.defaultStrokeWidth=m(t,"lineStyle.width",1),this.defaultStrokeColor=m(t,"lineStyle.color",16777215),this.defaultStrokeAlpha=m(t,"lineStyle.alpha",1),this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha)),m(t,"fillStyle",null)&&(this.defaultFillColor=m(t,"fillStyle.color",16777215),this.defaultFillAlpha=m(t,"fillStyle.alpha",1),this.fillStyle(this.defaultFillColor,this.defaultFillAlpha)),this},lineStyle:function(t,e,i){return void 0===i&&(i=1),this.commandBuffer.push(r.LINE_STYLE,t,e,i),this._lineWidth=t,this},fillStyle:function(t,e){return void 0===e&&(e=1),this.commandBuffer.push(r.FILL_STYLE,t,e),this},fillGradientStyle:function(t,e,i,s,n,o,a,h){return void 0===n&&(n=1),void 0===o&&(o=n),void 0===a&&(a=n),void 0===h&&(h=n),this.commandBuffer.push(r.GRADIENT_FILL_STYLE,n,o,a,h,t,e,i,s),this},lineGradientStyle:function(t,e,i,s,n,o){return void 0===o&&(o=1),this.commandBuffer.push(r.GRADIENT_LINE_STYLE,t,o,e,i,s,n),this},beginPath:function(){return this.commandBuffer.push(r.BEGIN_PATH),this},closePath:function(){return this.commandBuffer.push(r.CLOSE_PATH),this},fillPath:function(){return this.commandBuffer.push(r.FILL_PATH),this},fill:function(){return this.commandBuffer.push(r.FILL_PATH),this},strokePath:function(){return this.commandBuffer.push(r.STROKE_PATH),this},stroke:function(){return this.commandBuffer.push(r.STROKE_PATH),this},fillCircleShape:function(t){return this.fillCircle(t.x,t.y,t.radius)},strokeCircleShape:function(t){return this.strokeCircle(t.x,t.y,t.radius)},fillCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,y.PI2),this.fillPath(),this},strokeCircle:function(t,e,i){return this.beginPath(),this.arc(t,e,i,0,y.PI2),this.strokePath(),this},fillRectShape:function(t){return this.fillRect(t.x,t.y,t.width,t.height)},strokeRectShape:function(t){return this.strokeRect(t.x,t.y,t.width,t.height)},fillRect:function(t,e,i,s){return this.commandBuffer.push(r.FILL_RECT,t,e,i,s),this},strokeRect:function(t,e,i,s){var n=this._lineWidth/2,r=t-n,o=t+n;return this.beginPath(),this.moveTo(t,e),this.lineTo(t,e+s),this.strokePath(),this.beginPath(),this.moveTo(t+i,e),this.lineTo(t+i,e+s),this.strokePath(),this.beginPath(),this.moveTo(r,e),this.lineTo(o+i,e),this.strokePath(),this.beginPath(),this.moveTo(r,e+s),this.lineTo(o+i,e+s),this.strokePath(),this},fillRoundedRect:function(t,e,i,s,n){void 0===n&&(n=20);var r=n,o=n,a=n,h=n;"number"!=typeof n&&(r=g(n,"tl",20),o=g(n,"tr",20),a=g(n,"bl",20),h=g(n,"br",20));var l=r>=0,u=o>=0,c=a>=0,d=h>=0;return r=Math.abs(r),o=Math.abs(o),a=Math.abs(a),h=Math.abs(h),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),u?this.arc(t+i-o,e+o,o,-y.TAU,0):this.arc(t+i,e,o,Math.PI,y.TAU,!0),this.lineTo(t+i,e+s-h),d?this.arc(t+i-h,e+s-h,h,0,y.TAU):this.arc(t+i,e+s,h,-y.TAU,Math.PI,!0),this.lineTo(t+a,e+s),c?this.arc(t+a,e+s-a,a,y.TAU,Math.PI):this.arc(t,e+s,a,0,-y.TAU,!0),this.lineTo(t,e+r),l?this.arc(t+r,e+r,r,-Math.PI,-y.TAU):this.arc(t,e,r,y.TAU,0,!0),this.fillPath(),this},strokeRoundedRect:function(t,e,i,s,n){void 0===n&&(n=20);var r=n,o=n,a=n,h=n,l=Math.min(i,s)/2;"number"!=typeof n&&(r=g(n,"tl",20),o=g(n,"tr",20),a=g(n,"bl",20),h=g(n,"br",20));var u=r>=0,c=o>=0,d=a>=0,p=h>=0;return r=Math.min(Math.abs(r),l),o=Math.min(Math.abs(o),l),a=Math.min(Math.abs(a),l),h=Math.min(Math.abs(h),l),this.beginPath(),this.moveTo(t+r,e),this.lineTo(t+i-o,e),this.moveTo(t+i-o,e),c?this.arc(t+i-o,e+o,o,-y.TAU,0):this.arc(t+i,e,o,Math.PI,y.TAU,!0),this.lineTo(t+i,e+s-h),this.moveTo(t+i,e+s-h),p?this.arc(t+i-h,e+s-h,h,0,y.TAU):this.arc(t+i,e+s,h,-y.TAU,Math.PI,!0),this.lineTo(t+a,e+s),this.moveTo(t+a,e+s),d?this.arc(t+a,e+s-a,a,y.TAU,Math.PI):this.arc(t,e+s,a,0,-y.TAU,!0),this.lineTo(t,e+r),this.moveTo(t,e+r),u?this.arc(t+r,e+r,r,-Math.PI,-y.TAU):this.arc(t,e,r,y.TAU,0,!0),this.strokePath(),this},fillPointShape:function(t,e){return this.fillPoint(t.x,t.y,e)},fillPoint:function(t,e,i){return!i||i<1?i=1:(t-=i/2,e-=i/2),this.commandBuffer.push(r.FILL_RECT,t,e,i,i),this},fillTriangleShape:function(t){return this.fillTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},strokeTriangleShape:function(t){return this.strokeTriangle(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)},fillTriangle:function(t,e,i,s,n,o){return this.commandBuffer.push(r.FILL_TRIANGLE,t,e,i,s,n,o),this},strokeTriangle:function(t,e,i,s,n,o){return this.commandBuffer.push(r.STROKE_TRIANGLE,t,e,i,s,n,o),this},strokeLineShape:function(t){return this.lineBetween(t.x1,t.y1,t.x2,t.y2)},lineBetween:function(t,e,i,s){return this.beginPath(),this.moveTo(t,e),this.lineTo(i,s),this.strokePath(),this},lineTo:function(t,e){return this.commandBuffer.push(r.LINE_TO,t,e),this},moveTo:function(t,e){return this.commandBuffer.push(r.MOVE_TO,t,e),this},strokePoints:function(t,e,i,s){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===s&&(s=t.length),this.beginPath(),this.moveTo(t[0].x,t[0].y);for(var n=1;n-1&&this.fillStyle(this.defaultFillColor,this.defaultFillAlpha),this.defaultStrokeColor>-1&&this.lineStyle(this.defaultStrokeWidth,this.defaultStrokeColor,this.defaultStrokeAlpha),this},generateTexture:function(t,e,i){var s,n,r=this.scene.sys,o=r.game.renderer;if(void 0===e&&(e=r.scale.width),void 0===i&&(i=r.scale.height),T.TargetCamera.setScene(this.scene),T.TargetCamera.setViewport(0,0,e,i),T.TargetCamera.scrollX=this.x,T.TargetCamera.scrollY=this.y,"string"==typeof t)if(r.textures.exists(t)){var a=(s=r.textures.get(t)).getSourceImage();a instanceof HTMLCanvasElement&&(n=a.getContext("2d"))}else n=(s=r.textures.createCanvas(t,e,i)).getSourceImage().getContext("2d");else t instanceof HTMLCanvasElement&&(n=t.getContext("2d"));return n&&(this.renderCanvas(o,this,T.TargetCamera,null,n,!1),s&&s.refresh()),this},preDestroy:function(){this.commandBuffer=[]}});T.TargetCamera=new s,t.exports=T},91543:(t,e,i)=>{var s=i(36266),n=i(49584);t.exports=function(t,e,i,r,o,a){var h=e.commandBuffer,l=h.length,u=o||t.currentContext;if(0!==l&&n(t,u,e,i,r)){i.addToRenderList(e);var c=1,d=1,p=0,f=0,v=1,g=0,m=0,y=0;u.beginPath();for(var x=0;x>>16,m=(65280&p)>>>8,y=255&p,u.strokeStyle="rgba("+g+","+m+","+y+","+c+")",u.lineWidth=v,x+=3;break;case s.FILL_STYLE:f=h[x+1],d=h[x+2],g=(16711680&f)>>>16,m=(65280&f)>>>8,y=255&f,u.fillStyle="rgba("+g+","+m+","+y+","+d+")",x+=2;break;case s.BEGIN_PATH:u.beginPath();break;case s.CLOSE_PATH:u.closePath();break;case s.FILL_PATH:a||u.fill();break;case s.STROKE_PATH:a||u.stroke();break;case s.FILL_RECT:a?u.rect(h[x+1],h[x+2],h[x+3],h[x+4]):u.fillRect(h[x+1],h[x+2],h[x+3],h[x+4]),x+=4;break;case s.FILL_TRIANGLE:u.beginPath(),u.moveTo(h[x+1],h[x+2]),u.lineTo(h[x+3],h[x+4]),u.lineTo(h[x+5],h[x+6]),u.closePath(),a||u.fill(),x+=6;break;case s.STROKE_TRIANGLE:u.beginPath(),u.moveTo(h[x+1],h[x+2]),u.lineTo(h[x+3],h[x+4]),u.lineTo(h[x+5],h[x+6]),u.closePath(),a||u.stroke(),x+=6;break;case s.LINE_TO:u.lineTo(h[x+1],h[x+2]),x+=2;break;case s.MOVE_TO:u.moveTo(h[x+1],h[x+2]),x+=2;break;case s.LINE_FX_TO:u.lineTo(h[x+1],h[x+2]),x+=5;break;case s.MOVE_FX_TO:u.moveTo(h[x+1],h[x+2]),x+=5;break;case s.SAVE:u.save();break;case s.RESTORE:u.restore();break;case s.TRANSLATE:u.translate(h[x+1],h[x+2]),x+=2;break;case s.SCALE:u.scale(h[x+1],h[x+2]),x+=2;break;case s.ROTATE:u.rotate(h[x+1]),x+=1;break;case s.GRADIENT_FILL_STYLE:x+=5;break;case s.GRADIENT_LINE_STYLE:x+=6}}u.restore()}}},41286:(t,e,i)=>{var s=i(99325),n=i(33182);s.register("graphics",(function(t,e){void 0===t&&(t={}),void 0!==e&&(t.add=e);var i=new n(this.scene,t);return t.add&&this.scene.sys.displayList.add(i),i}))},13122:(t,e,i)=>{var s=i(33182);i(61286).register("graphics",(function(t){return this.displayList.add(new s(this.scene,t))}))},60898:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(34429),r=i(91543),r=i(91543),t.exports={renderWebGL:n,renderCanvas:r}},34429:(t,e,i)=>{var s=i(36266),n=i(73329),r=i(69360),o=i(75512),a=function(t,e,i){this.x=t,this.y=e,this.width=i},h=function(t,e,i){this.points=[],this.pointsLength=1,this.points[0]=new a(t,e,i)},l=[],u=new r;t.exports=function(t,e,i,r){if(0!==e.commandBuffer.length){i.addToRenderList(e);var c=t.pipelines.set(e.pipeline,e);t.pipelines.preBatch(e);for(var d=n(e,i,r).calc,p=u.loadIdentity(),f=e.commandBuffer,v=i.alpha*e.alpha,g=1,m=c.fillTint,y=c.strokeTint,x=0,T=0,w=0,b=2*Math.PI,E=[],S=0,A=!0,C=null,_=o.getTintAppendFloatAlpha,M=0;M0&&(X=X%b-b):X>b?X=b:X<0&&(X=b+X%b),null===C&&(C=new h(B+Math.cos(U)*Y,N+Math.sin(U)*Y,g),E.push(C),I+=.01);I<1+G;)w=X*I+U,x=B+Math.cos(w)*Y,T=N+Math.sin(w)*Y,C.points.push(new a(x,T,g)),I+=.01;w=X+U,x=B+Math.cos(w)*Y,T=N+Math.sin(w)*Y,C.points.push(new a(x,T,g));break;case s.FILL_RECT:c.batchFillRect(f[++M],f[++M],f[++M],f[++M],p,d);break;case s.FILL_TRIANGLE:c.batchFillTriangle(f[++M],f[++M],f[++M],f[++M],f[++M],f[++M],p,d);break;case s.STROKE_TRIANGLE:c.batchStrokeTriangle(f[++M],f[++M],f[++M],f[++M],f[++M],f[++M],g,p,d);break;case s.LINE_TO:null!==C?C.points.push(new a(f[++M],f[++M],g)):(C=new h(f[++M],f[++M],g),E.push(C));break;case s.MOVE_TO:C=new h(f[++M],f[++M],g),E.push(C);break;case s.SAVE:l.push(p.copyToArray());break;case s.RESTORE:p.copyFromArray(l.pop());break;case s.TRANSLATE:B=f[++M],N=f[++M],p.translate(B,N);break;case s.SCALE:B=f[++M],N=f[++M],p.scale(B,N);break;case s.ROTATE:p.rotate(f[++M])}t.pipelines.postBatch(e)}}},59192:(t,e,i)=>{var s=i(83979),n=i(56694),r=i(56631),o=i(6659),a=i(71608),h=i(72632),l=i(10850),u=i(19256),c=i(42911),d=i(75757),p=i(58403),f=i(13747),v=new n({Extends:o,initialize:function(t,e,i){o.call(this),i?e&&!Array.isArray(e)&&(e=[e]):Array.isArray(e)?c(e[0])&&(i=e,e=null):c(e)&&(i=e,e=null),this.scene=t,this.children=new p,this.isParent=!0,this.type="Group",this.classType=h(i,"classType",f),this.name=h(i,"name",""),this.active=h(i,"active",!0),this.maxSize=h(i,"maxSize",-1),this.defaultKey=h(i,"defaultKey",null),this.defaultFrame=h(i,"defaultFrame",null),this.runChildUpdate=h(i,"runChildUpdate",!1),this.createCallback=h(i,"createCallback",null),this.removeCallback=h(i,"removeCallback",null),this.createMultipleCallback=h(i,"createMultipleCallback",null),this.internalCreateCallback=h(i,"internalCreateCallback",null),this.internalRemoveCallback=h(i,"internalRemoveCallback",null),e&&this.addMultiple(e),i&&this.createMultiple(i),this.on(r.ADDED_TO_SCENE,this.addedToScene,this),this.on(r.REMOVED_FROM_SCENE,this.removedFromScene,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},create:function(t,e,i,s,n,r){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.defaultKey),void 0===s&&(s=this.defaultFrame),void 0===n&&(n=!0),void 0===r&&(r=!0),this.isFull())return null;var o=new this.classType(this.scene,t,e,i,s);return o.addToDisplayList(this.scene.sys.displayList),o.addToUpdateList(),o.visible=n,o.setActive(r),this.add(o),o},createMultiple:function(t){if(this.isFull())return[];Array.isArray(t)||(t=[t]);var e=[];if(t[0].key)for(var i=0;i=0;u--)if((l=d[u]).active===i){if(++c===e)break}else l=null;return l?("number"==typeof n&&(l.x=n),"number"==typeof r&&(l.y=r),l):s?this.create(n,r,o,a,h):null},get:function(t,e,i,s,n){return this.getFirst(!1,!0,t,e,i,s,n)},getFirstAlive:function(t,e,i,s,n,r){return this.getFirst(!0,t,e,i,s,n,r)},getFirstDead:function(t,e,i,s,n,r){return this.getFirst(!1,t,e,i,s,n,r)},playAnimation:function(t,e){return s.PlayAnimation(this.children.entries,t,e),this},isFull:function(){return-1!==this.maxSize&&this.children.size>=this.maxSize},countActive:function(t){void 0===t&&(t=!0);for(var e=0,i=0;i{var s=i(99325),n=i(59192);s.register("group",(function(t){return new n(this.scene,null,t)}))},62598:(t,e,i)=>{var s=i(59192);i(61286).register("group",(function(t,e){return this.updateList.add(new s(this.scene,t,e))}))},1539:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),o=i(57322),a=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.Depth,n.Flip,n.FX,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.ScrollFactor,n.Size,n.TextureCrop,n.Tint,n.Transform,n.Visible,o],initialize:function(t,e,i,s,n){r.call(this,t,"Image"),this._crop=this.resetCropObject(),this.setTexture(s,n),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()}});t.exports=a},57786:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},83556:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(1539);n.register("image",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),a=new o(this.scene,0,0,i,n);return void 0!==e&&(t.add=e),s(this.scene,a,t),a}))},20927:(t,e,i)=>{var s=i(1539);i(61286).register("image",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},57322:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(59390),r=i(57786),t.exports={renderWebGL:n,renderCanvas:r}},59390:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),this.pipeline.batchSprite(e,i,s)}},48013:(t,e,i)=>{var s={Events:i(56631),DisplayList:i(91713),GameObjectCreator:i(99325),GameObjectFactory:i(61286),UpdateList:i(92034),Components:i(64937),GetCalcMatrix:i(73329),BuildGameObject:i(88933),BuildGameObjectAnimation:i(32291),GameObject:i(89980),BitmapText:i(44616),Blitter:i(52816),Bob:i(41664),Container:i(70339),DOMElement:i(38943),DynamicBitmapText:i(13468),Extern:i(39419),Graphics:i(33182),Group:i(59192),Image:i(1539),Layer:i(85305),Particles:i(27684),PathFollower:i(29598),RenderTexture:i(15996),RetroFont:i(55873),Rope:i(79968),Sprite:i(13747),Text:i(76555),GetTextSize:i(32979),MeasureText:i(27030),TextStyle:i(74744),TileSprite:i(35856),Zone:i(71030),Video:i(8630),Shape:i(91461),Arc:i(28593),Curve:i(15220),Ellipse:i(28591),Grid:i(39169),IsoBox:i(4415),IsoTriangle:i(65159),Line:i(579),Polygon:i(91249),Rectangle:i(517),Star:i(77843),Triangle:i(21873),Factories:{Blitter:i(38906),Container:i(23400),DOMElement:i(66788),DynamicBitmapText:i(94145),Extern:i(41155),Graphics:i(13122),Group:i(62598),Image:i(20927),Layer:i(17676),Particles:i(81212),PathFollower:i(19626),RenderTexture:i(29599),Rope:i(31982),Sprite:i(66135),StaticBitmapText:i(21797),Text:i(94627),TileSprite:i(20509),Zone:i(34546),Video:i(215),Arc:i(10369),Curve:i(10147),Ellipse:i(99869),Grid:i(9326),IsoBox:i(88154),IsoTriangle:i(67765),Line:i(85665),Polygon:i(88203),Rectangle:i(94355),Star:i(23962),Triangle:i(79296)},Creators:{Blitter:i(68452),Container:i(44516),DynamicBitmapText:i(67513),Graphics:i(41286),Group:i(61295),Image:i(83556),Layer:i(56378),Particles:i(765),RenderTexture:i(85692),Rope:i(96027),Sprite:i(89219),StaticBitmapText:i(95499),Text:i(75397),TileSprite:i(63950),Zone:i(24067),Video:i(65601)}};s.Shader=i(27902),s.Mesh=i(83321),s.NineSlice=i(44139),s.PointLight=i(13171),s.Factories.Shader=i(51979),s.Factories.Mesh=i(8767),s.Factories.NineSlice=i(53778),s.Factories.PointLight=i(91201),s.Creators.Shader=i(13908),s.Creators.Mesh=i(41839),s.Creators.NineSlice=i(40964),s.Creators.PointLight=i(162),s.Light=i(14455),s.LightsManager=i(26193),s.LightsPlugin=i(50296),t.exports=s},85305:(t,e,i)=>{var s=i(95723),n=i(56694),r=i(64937),o=i(48129),a=i(81078),h=i(6659),l=i(56631),u=i(71207),c=i(58010),d=i(7599),p=i(17922),f=new n({Extends:u,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Mask,r.Pipeline,r.Visible,h,c],initialize:function(t,e){u.call(this,t),h.call(this),this.scene=t,this.displayList=null,this.type="Layer",this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.systems=t.sys,this.events=t.sys.events,this.sortChildrenFlag=!1,this.addCallback=this.addChildCallback,this.removeCallback=this.removeChildCallback,this.initPipeline(),this.clearAlpha(),this.setBlendMode(s.SKIP_CHECK),e&&this.add(e),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new a(this)),this},setData:function(t,e){return this.data||(this.data=new a(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new a(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new a(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new a(this)),this.data.get(t)},setInteractive:function(){return this},disableInteractive:function(){return this},removeInteractive:function(){return this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return o(this)},willRender:function(t){return!(15!==this.renderFlags||0===this.list.length||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return i.unshift(this.displayList.getIndex(t)),i},addChildCallback:function(t){t.displayList&&t.displayList!==this&&t.removeFromDisplayList(),t.displayList||(this.queueDepthSort(),t.displayList=this,t.emit(l.ADDED_TO_SCENE,t,this.scene),this.events.emit(d.ADDED_TO_SCENE,t,this.scene))},removeChildCallback:function(t){this.queueDepthSort(),t.displayList=null,t.emit(l.REMOVED_FROM_SCENE,t,this.scene),this.events.emit(d.REMOVED_FROM_SCENE,t,this.scene)},queueDepthSort:function(){this.sortChildrenFlag=!0},depthSort:function(){this.sortChildrenFlag&&(p(this.list,this.sortByDepth),this.sortChildrenFlag=!1)},sortByDepth:function(t,e){return t._depth-e._depth},getChildren:function(){return this.list},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(l.ADDED_TO_SCENE,this,this.scene),t.events.emit(d.ADDED_TO_SCENE,this,this.scene)),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(l.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(d.REMOVED_FROM_SCENE,this,this.scene)),this},destroy:function(t){if(this.scene&&!this.ignoreDestroy){this.emit(l.DESTROY,this);for(var e=this.list;e.length;)e[0].destroy(t);this.removeAllListeners(),this.resetPostPipeline(!0),this.displayList&&(this.displayList.remove(this,!0),this.displayList.queueDepthSort()),this.data&&(this.data.destroy(),this.data=void 0),this.active=!1,this.visible=!1,this.list=void 0,this.scene=void 0,this.displayList=void 0,this.systems=void 0,this.events=void 0}}});t.exports=f},834:t=>{t.exports=function(t,e,i){var s=e.list;if(0!==s.length){e.depthSort();var n=-1!==e.blendMode;n||t.setBlendMode(0);var r=e._alpha;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var o=0;o{var s=i(88933),n=i(85305),r=i(99325),o=i(20494);r.register("layer",(function(t,e){void 0===t&&(t={});var i=o(t,"children",null),r=new n(this.scene,i);return void 0!==e&&(t.add=e),s(this.scene,r,t),r}))},17676:(t,e,i)=>{var s=i(85305);i(61286).register("layer",(function(t){return this.displayList.add(new s(this.scene,t))}))},58010:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(17576),r=i(834),t.exports={renderWebGL:n,renderCanvas:r}},17576:t=>{t.exports=function(t,e,i){var s=e.list,n=s.length;if(0!==n){e.depthSort(),t.pipelines.preBatch(e);var r=-1!==e.blendMode;r||t.setBlendMode(0);for(var o=e.alpha,a=0;a{var s=i(26673),n=i(56694),r=i(64937),o=i(39298),a=i(75512),h=new n({Extends:s,Mixins:[r.Origin,r.ScrollFactor,r.Transform,r.Visible],initialize:function(t,e,i,n,r,a,h){s.call(this,t,e,i),this.color=new o(n,r,a),this.intensity=h,this.renderFlags=15,this.cameraFilter=0,this.setScrollFactor(1,1),this.setOrigin(),this.setDisplayOrigin(i)},displayWidth:{get:function(){return this.diameter},set:function(t){this.diameter=t}},displayHeight:{get:function(){return this.diameter},set:function(t){this.diameter=t}},width:{get:function(){return this.diameter},set:function(t){this.diameter=t}},height:{get:function(){return this.diameter},set:function(t){this.diameter=t}},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setColor:function(t){var e=a.getFloatsFromUintRGB(t);return this.color.set(e[0],e[1],e[2]),this},setIntensity:function(t){return this.intensity=t,this},setRadius:function(t){return this.radius=t,this}});h.RENDER_MASK=15,t.exports=h},26193:(t,e,i)=>{var s=i(26535),n=i(56694),r=i(53996),o=i(14455),a=i(13171),h=i(39298),l=i(72677),u=i(17922),c=i(75512),d=new n({initialize:function(){this.lights=[],this.ambientColor=new h(.1,.1,.1),this.active=!1,this.maxLights=-1,this.visibleLights=0},addPointLight:function(t,e,i,s,n,r){return this.systems.displayList.add(new a(this.scene,t,e,i,s,n,r))},enable:function(){return-1===this.maxLights&&(this.maxLights=this.systems.renderer.config.maxLights),this.active=!0,this},disable:function(){return this.active=!1,this},getLights:function(t){for(var e=this.lights,i=t.worldView,n=[],o=0;othis.maxLights&&(u(n,this.sortByDistance),n=n.slice(0,this.maxLights)),this.visibleLights=n.length,n},sortByDistance:function(t,e){return t.distance>=e.distance},setAmbientColor:function(t){var e=c.getFloatsFromUintRGB(t);return this.ambientColor.set(e[0],e[1],e[2]),this},getMaxVisibleLights:function(){return this.maxLights},getLightCount:function(){return this.lights.length},addLight:function(t,e,i,s,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=128),void 0===s&&(s=16777215),void 0===n&&(n=1);var r=c.getFloatsFromUintRGB(s),a=new o(t,e,i,r[0],r[1],r[2],n);return this.lights.push(a),a},removeLight:function(t){var e=this.lights.indexOf(t);return e>=0&&l(this.lights,e),this},shutdown:function(){this.lights.length=0},destroy:function(){this.shutdown()}});t.exports=d},50296:(t,e,i)=>{var s=i(56694),n=i(26193),r=i(91963),o=i(7599),a=new s({Extends:n,initialize:function(t){this.scene=t,this.systems=t.sys,t.sys.settings.isBooted||t.sys.events.once(o.BOOT,this.boot,this),n.call(this)},boot:function(){var t=this.systems.events;t.on(o.SHUTDOWN,this.shutdown,this),t.on(o.DESTROY,this.destroy,this)},destroy:function(){this.shutdown(),this.scene=void 0,this.systems=void 0}});r.register("LightsPlugin",a,"lights"),t.exports=a},83321:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(75606),o=i(18693),a=i(89980),h=i(67623),l=i(53267),u=i(73329),c=i(16650),d=i(23464),p=i(17922),f=i(70015),v=i(85769),g=new s({Extends:a,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Mask,n.Pipeline,n.Size,n.Texture,n.Transform,n.Visible,n.ScrollFactor,d],initialize:function(t,e,i,s,n,r,o,h,l,u,d,p){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s="__WHITE"),a.call(this,t,"Mesh"),this.faces=[],this.vertices=[],this.tintFill=!1,this.debugCallback=null,this.debugGraphic=null,this.hideCCW=!0,this.modelPosition=new f,this.modelScale=new f(1,1,1),this.modelRotation=new f,this.dirtyCache=[0,0,0,0,0,0,0,0,0,0,0,0],this.transformMatrix=new c,this.viewPosition=new f,this.viewMatrix=new c,this.projectionMatrix=new c,this.totalRendered=0,this.totalFrame=0,this.ignoreDirtyCache=!1;var v=t.sys.renderer;this.setPosition(e,i),this.setTexture(s,n),this.setSize(v.width,v.height),this.initPipeline(),this.setPerspective(v.width,v.height),r&&this.addVertices(r,o,h,l,u,d,p)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},panX:function(t){return this.viewPosition.addScale(f.LEFT,t),this.dirtyCache[10]=1,this},panY:function(t){return this.viewPosition.y+=f.DOWN.y*t,this.dirtyCache[10]=1,this},panZ:function(t){return this.viewPosition.z+=t,this.dirtyCache[10]=1,this},setPerspective:function(t,e,i,s,n){return void 0===i&&(i=45),void 0===s&&(s=.01),void 0===n&&(n=1e3),this.projectionMatrix.perspective(r(i),t/e,s,n),this.dirtyCache[10]=1,this.dirtyCache[11]=0,this},setOrtho:function(t,e,i,s){return void 0===t&&(t=this.scene.sys.renderer.getAspectRatio()),void 0===e&&(e=1),void 0===i&&(i=-1e3),void 0===s&&(s=1e3),this.projectionMatrix.ortho(-t,t,-e,e,i,s),this.dirtyCache[10]=1,this.dirtyCache[11]=1,this},clear:function(){return this.faces.forEach((function(t){t.destroy()})),this.faces=[],this.vertices=[],this},addVerticesFromObj:function(t,e,i,s,n,r,o,a,h){var u,c=this.scene.sys.cache.obj.get(t);return c&&(u=l(c,this,e,i,s,n,r,o,a,h)),u&&0!==u.verts.length||console.warn("Mesh.addVerticesFromObj data empty:",t),this},sortByDepth:function(t,e){return t.depth-e.depth},depthSort:function(){return p(this.faces,this.sortByDepth),this},addVertex:function(t,e,i,s,n,r,o){var a=new v(t,e,i,s,n,r,o);return this.vertices.push(a),a},addFace:function(t,e,i){var s=new o(t,e,i);return this.faces.push(s),this.dirtyCache[9]=-1,s},addVertices:function(t,e,i,s,n,r,o){var a=h(t,e,i,s,n,r,o);return a?(this.faces=this.faces.concat(a.faces),this.vertices=this.vertices.concat(a.vertices)):console.warn("Mesh.addVertices data empty or invalid"),this.dirtyCache[9]=-1,this},getFaceCount:function(){return this.faces.length},getVertexCount:function(){return this.vertices.length},getFace:function(t){return this.faces[t]},getFaceAt:function(t,e,i){void 0===i&&(i=this.scene.sys.cameras.main);for(var s=u(this,i).calc,n=this.faces,r=[],o=0;o{t.exports=function(){}},41839:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(10850),a=i(83321);n.register("mesh",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),h=o(t,"vertices",[]),l=o(t,"uvs",[]),u=o(t,"indicies",[]),c=o(t,"containsZ",!1),d=o(t,"normals",[]),p=o(t,"colors",16777215),f=o(t,"alphas",1),v=new a(this.scene,0,0,i,n,h,l,u,c,d,p,f);return void 0!==e&&(t.add=e),s(this.scene,v,t),v}))},8767:(t,e,i)=>{var s=i(83321);i(61286).register("mesh",(function(t,e,i,n,r,o,a,h,l,u,c){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h,l,u,c))}))},23464:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(57410),r=i(6317),t.exports={renderWebGL:n,renderCanvas:r}},57410:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){var r=e.faces,o=r.length;if(0!==o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline,e),h=s(e,i,n).calc,l=a.setGameObject(e),u=a.vertexViewF32,c=a.vertexViewU32,d=a.vertexCount*a.currentShader.vertexComponentCount-1,p=e.tintFill,f=[],v=e.debugCallback,g=h.a,m=h.b,y=h.c,x=h.d,T=h.e,w=h.f,b=e.viewPosition.z,E=e.hideCCW,S=i.roundPixels,A=i.alpha*e.alpha,C=0;t.pipelines.preBatch(e);for(var _=0;_{var s=i(56694),n=i(64937),r=i(89980),o=i(94456),a=i(85769),h=new s({Extends:r,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.FX,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.ScrollFactor,n.Texture,n.Transform,n.Visible,o],initialize:function(t,e,i,s,n,o,h,l,u,c,d){void 0===o&&(o=256),void 0===h&&(h=256),void 0===l&&(l=10),void 0===u&&(u=10),void 0===c&&(c=0),void 0===d&&(d=0),r.call(this,t,"NineSlice"),this._width=o,this._height=h,this._originX=.5,this._originY=.5,this._sizeComponent=!0,this.vertices=[],this.leftWidth=l,this.rightWidth=u,this.topHeight=c,this.bottomHeight=d,this.tint=16777215,this.tintFill=!1,this.is3Slice=0===c&&0===d;for(var p=this.is3Slice?18:54,f=0;f{var s=i(88933),n=i(99325),r=i(20494),o=i(10850),a=i(44139);n.register("nineslice",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),h=o(t,"width",256),l=o(t,"height",256),u=o(t,"leftWidth",10),c=o(t,"rightWidth",10),d=o(t,"topHeight",0),p=o(t,"bottomHeight",0),f=new a(this.scene,0,0,i,n,h,l,u,c,d,p);return void 0!==e&&(t.add=e),s(this.scene,f,t),f}))},53778:(t,e,i)=>{var s=i(44139);i(61286).register("nineslice",(function(t,e,i,n,r,o,a,h,l,u){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h,l,u))}))},94456:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(27420),t.exports={renderWebGL:n,renderCanvas:r}},27420:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){var o=e.vertices,a=o.length;if(0!==a){i.addToRenderList(e);var h=t.pipelines.set(e.pipeline,e),l=s(e,i,r,!1).calc,u=h.setGameObject(e),c=h.vertexViewF32,d=h.vertexViewU32,p=h.vertexCount*h.currentShader.vertexComponentCount-1,f=i.roundPixels,v=e.tintFill,g=i.alpha*e.alpha,m=n.getTintAppendFloatAlpha(e.tint,g);t.pipelines.preBatch(e);var y=h.vertexAvailable(),x=-1;y{var s=i(56694),n=i(93025),r=i(22946),o=i(21902),a=i(4840),h=i(15978),l=new s({Extends:n,initialize:function(t){n.call(this,t,null,!1),this.active=!1,this.easeName="Linear",this.r=[],this.g=[],this.b=[]},getMethod:function(){return null===this.propertyValue?0:9},setMethods:function(){var t=this.propertyValue,e=t,i=this.defaultEmit,s=this.defaultUpdate;if(9===this.method){this.start=t[0],this.ease=o("Linear"),this.interpolation=a("linear"),i=this.easedValueEmit,s=this.easeValueUpdate,e=t[0],this.active=!0;for(var n=0;n{var s=i(17489),n=i(82897),r=i(56694),o=i(61616),a=i(21902),h=i(72632),l=i(4840),u=i(88462),c=i(1071),d=new r({initialize:function(t,e,i){void 0===i&&(i=!1),this.propertyKey=t,this.propertyValue=e,this.defaultValue=e,this.steps=0,this.counter=0,this.yoyo=!1,this.direction=0,this.start=0,this.current=0,this.end=0,this.ease=null,this.interpolation=null,this.emitOnly=i,this.onEmit=this.defaultEmit,this.onUpdate=this.defaultUpdate,this.active=!0,this.method=0,this._onEmit,this._onUpdate},loadConfig:function(t,e){void 0===t&&(t={}),e&&(this.propertyKey=e),this.propertyValue=h(t,this.propertyKey,this.defaultValue),this.method=this.getMethod(),this.setMethods(),this.emitOnly&&(this.onUpdate=this.defaultUpdate)},toJSON:function(){return JSON.stringify(this.propertyValue)},onChange:function(t){var e;switch(this.method){case 1:case 3:case 8:e=t;break;case 2:this.propertyValue.indexOf(t)>=0&&(e=t);break;case 4:var i=(this.end-this.start)/this.steps;e=u(t,i),this.counter=e;break;case 5:case 6:case 7:e=n(t,this.start,this.end);break;case 9:e=this.start[0]}return this.current=e,this},getMethod:function(){var t=this.propertyValue;if(null===t)return 0;var e=typeof t;if("number"===e)return 1;if(Array.isArray(t))return 2;if("function"===e)return 3;if("object"===e){if(this.hasBoth(t,"start","end"))return this.has(t,"steps")?4:5;if(this.hasBoth(t,"min","max"))return 6;if(this.has(t,"random"))return 7;if(this.hasEither(t,"onEmit","onUpdate"))return 8;if(this.has(t,"interpolation"))return 9}return 0},setMethods:function(){var t=this.propertyValue,e=t,i=this.defaultEmit,s=this.defaultUpdate;switch(this.method){case 1:i=this.staticValueEmit;break;case 2:i=this.randomStaticValueEmit,e=t[0];break;case 3:this._onEmit=t,i=this.proxyEmit;break;case 4:this.start=t.start,this.end=t.end,this.steps=t.steps,this.counter=this.start,this.yoyo=!!this.has(t,"yoyo")&&t.yoyo,this.direction=0,i=this.steppedEmit,e=this.start;break;case 5:this.start=t.start,this.end=t.end;var n=this.has(t,"ease")?t.ease:"Linear";this.ease=a(n,t.easeParams),i=this.has(t,"random")&&t.random?this.randomRangedValueEmit:this.easedValueEmit,s=this.easeValueUpdate,e=this.start;break;case 6:this.start=t.min,this.end=t.max,i=this.has(t,"int")&&t.int?this.randomRangedIntEmit:this.randomRangedValueEmit,e=this.start;break;case 7:var r=t.random;Array.isArray(r)&&(this.start=r[0],this.end=r[1]),i=this.randomRangedIntEmit,e=this.start;break;case 8:this._onEmit=this.has(t,"onEmit")?t.onEmit:this.defaultEmit,this._onUpdate=this.has(t,"onUpdate")?t.onUpdate:this.defaultUpdate,i=this.proxyEmit,s=this.proxyUpdate;break;case 9:this.start=t.values;var o=this.has(t,"ease")?t.ease:"Linear";this.ease=a(o,t.easeParams),this.interpolation=l(t.interpolation),i=this.easedValueEmit,s=this.easeValueUpdate,e=this.start[0]}return this.onEmit=i,this.onUpdate=s,this.current=e,this},has:function(t,e){return t.hasOwnProperty(e)},hasBoth:function(t,e,i){return t.hasOwnProperty(e)&&t.hasOwnProperty(i)},hasEither:function(t,e,i){return t.hasOwnProperty(e)||t.hasOwnProperty(i)},defaultEmit:function(t,e,i){return i},defaultUpdate:function(t,e,i,s){return s},proxyEmit:function(t,e,i){var s=this._onEmit(t,e,i);return this.current=s,s},proxyUpdate:function(t,e,i,s){var n=this._onUpdate(t,e,i,s);return this.current=n,n},staticValueEmit:function(){return this.current},staticValueUpdate:function(){return this.current},randomStaticValueEmit:function(){var t=Math.floor(Math.random()*this.propertyValue.length);return this.current=this.propertyValue[t],this.current},randomRangedValueEmit:function(t,e){var i=o(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i,t.data[e].max=this.end),this.current=i,i},randomRangedIntEmit:function(t,e){var i=s(this.start,this.end);return t&&t.data[e]&&(t.data[e].min=i,t.data[e].max=this.end),this.current=i,i},steppedEmit:function(){var t,e=this.counter,i=e,s=(this.end-this.start)/this.steps;this.yoyo?(0===this.direction?(i+=s)>=this.end&&(t=i-this.end,i=this.end-t,this.direction=1):(i-=s)<=this.start&&(t=this.start-i,i=this.start+t,this.direction=0),this.counter=i):this.counter=c(i+s,this.start,this.end);return this.current=e,e},easedValueEmit:function(t,e){if(t&&t.data[e]){var i=t.data[e];i.min=this.start,i.max=this.end}return this.current=this.start,this.start},easeValueUpdate:function(t,e,i){var s,n=t.data[e],r=this.ease(i);return s=this.interpolation?this.interpolation(this.start,r):(n.max-n.min)*r+n.min,this.current=s,s},destroy:function(){this.propertyValue=null,this.defaultValue=null,this.ease=null,this.interpolation=null,this._onEmit=null,this._onUpdate=null}});t.exports=d},87811:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(30891),o=new s({Extends:r,initialize:function(t,e,i,s,o){if("object"==typeof t){var a=t;t=n(a,"x",0),e=n(a,"y",0),i=n(a,"power",0),s=n(a,"epsilon",100),o=n(a,"gravity",50)}else void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=100),void 0===o&&(o=50);r.call(this,t,e,!0),this._gravity=o,this._power=0,this._epsilon=0,this.power=i,this.epsilon=s},update:function(t,e){var i=this.x-t.x,s=this.y-t.y,n=i*i+s*s;if(0!==n){var r=Math.sqrt(n);n{var s=i(16569),n=i(56694),r=i(75606),o=i(74118),a=i(2386),h=i(93736),l=new n({initialize:function(t){this.emitter=t,this.texture=null,this.frame=null,this.x=0,this.y=0,this.velocityX=0,this.velocityY=0,this.accelerationX=0,this.accelerationY=0,this.maxVelocityX=1e4,this.maxVelocityY=1e4,this.bounce=0,this.scaleX=1,this.scaleY=1,this.alpha=1,this.angle=0,this.rotation=0,this.tint=16777215,this.life=1e3,this.lifeCurrent=1e3,this.delayCurrent=0,this.lifeT=0,this.data={tint:{min:16777215,max:16777215},alpha:{min:1,max:1},rotate:{min:0,max:0},scaleX:{min:1,max:1},scaleY:{min:1,max:1},x:{min:0,max:0},y:{min:0,max:0},accelerationX:{min:0,max:0},accelerationY:{min:0,max:0},maxVelocityX:{min:0,max:0},maxVelocityY:{min:0,max:0},moveToX:{min:0,max:0},moveToY:{min:0,max:0},bounce:{min:0,max:0}},this.isCropped=!1,this.scene=t.scene,this.anims=new s(this),this.bounds=new o},emit:function(t,e,i,s,n,r){return this.emitter.emit(t,e,i,s,n,r)},isAlive:function(){return this.lifeCurrent>0},kill:function(){this.lifeCurrent=0},setPosition:function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e},fire:function(t,e){var i=this.emitter,s=i.ops,n=i.getAnim();if(n?this.anims.play(n):(this.frame=i.getFrame(),this.texture=this.frame.texture),!this.frame)throw new Error("Particle has no texture frame");if(i.getEmitZone(this),void 0===t?this.x+=s.x.onEmit(this,"x"):s.x.steps>0?this.x+=t+s.x.onEmit(this,"x"):this.x+=t,void 0===e?this.y+=s.y.onEmit(this,"y"):s.y.steps>0?this.y+=e+s.y.onEmit(this,"y"):this.y+=e,this.life=s.lifespan.onEmit(this,"lifespan"),this.lifeCurrent=this.life,this.lifeT=0,this.delayCurrent=s.delay.onEmit(this,"delay"),this.scaleX=s.scaleX.onEmit(this,"scaleX"),this.scaleY=s.scaleY.active?s.scaleY.onEmit(this,"scaleY"):this.scaleX,this.angle=s.rotate.onEmit(this,"rotate"),this.rotation=r(this.angle),0===this.delayCurrent&&i.getDeathZone(this))return this.lifeCurrent=0,!1;var o=s.speedX.onEmit(this,"speedX"),a=s.speedY.active?s.speedY.onEmit(this,"speedY"):o;if(i.radial){var h=r(s.angle.onEmit(this,"angle"));this.velocityX=Math.cos(h)*Math.abs(o),this.velocityY=Math.sin(h)*Math.abs(a)}else if(i.moveTo){var l=s.moveToX.onEmit(this,"moveToX"),u=s.moveToY.onEmit(this,"moveToY"),c=this.life/1e3;this.velocityX=(l-this.x)/c,this.velocityY=(u-this.y)/c}else this.velocityX=o,this.velocityY=a;return i.acceleration&&(this.accelerationX=s.accelerationX.onEmit(this,"accelerationX"),this.accelerationY=s.accelerationY.onEmit(this,"accelerationY")),this.maxVelocityX=s.maxVelocityX.onEmit(this,"maxVelocityX"),this.maxVelocityY=s.maxVelocityY.onEmit(this,"maxVelocityY"),this.bounce=s.bounce.onEmit(this,"bounce"),this.alpha=s.alpha.onEmit(this,"alpha"),s.color.active?this.tint=s.color.onEmit(this,"tint"):this.tint=s.tint.onEmit(this,"tint"),!0},computeVelocity:function(t,e,i,s,n){var r=t.ops,o=this.velocityX,a=this.velocityY,h=r.accelerationX.onUpdate(this,"accelerationX",n,this.accelerationX),l=r.accelerationY.onUpdate(this,"accelerationY",n,this.accelerationY),u=r.maxVelocityX.onUpdate(this,"maxVelocityX",n,this.maxVelocityX),c=r.maxVelocityY.onUpdate(this,"maxVelocityY",n,this.maxVelocityY);o+=t.gravityX*i,a+=t.gravityY*i,h&&(o+=h*i),l&&(a+=l*i),o>u?o=u:o<-u&&(o=-u),a>c?a=c:a<-c&&(a=-c),this.velocityX=o,this.velocityY=a;for(var d=0;de.right&&t.collideRight&&(this.x=e.right,this.velocityX*=i),this.ye.bottom&&t.collideBottom&&(this.y=e.bottom,this.velocityY*=i)},update:function(t,e,i){if(0===this.lifeCurrent)return!0;if(this.delayCurrent>0)return this.delayCurrent-=t,!1;this.anims.update(0,t);var s=this.emitter,n=s.ops,o=1-this.lifeCurrent/this.life;if(this.lifeT=o,this.x=n.x.onUpdate(this,"x",o,this.x),this.y=n.y.onUpdate(this,"y",o,this.y),s.moveTo){var a=n.moveToX.onUpdate(this,"moveToX",o,s.moveToX),h=n.moveToY.onUpdate(this,"moveToY",o,s.moveToY),l=this.lifeCurrent/1e3;this.velocityX=(a-this.x)/l,this.velocityY=(h-this.y)/l}return this.computeVelocity(s,t,e,i,o),this.x+=this.velocityX*e,this.y+=this.velocityY*e,s.bounds&&(this.bounce=n.bounce.onUpdate(this,"bounce",o,this.bounce),this.checkBounds(s)),this.scaleX=n.scaleX.onUpdate(this,"scaleX",o,this.scaleX),this.scaleY=this.scaleX,n.scaleY.active&&(this.scaleY=n.scaleY.onUpdate(this,"scaleY",o,this.scaleY)),this.angle=n.rotate.onUpdate(this,"rotate",o,this.angle),this.rotation=r(this.angle),s.getDeathZone(this)?(this.lifeCurrent=0,!0):(this.alpha=n.alpha.onUpdate(this,"alpha",o,this.alpha),n.color.active?this.tint=n.color.onUpdate(this,"color",o,this.tint):this.tint=n.tint.onUpdate(this,"tint",o,this.tint),this.lifeCurrent-=t,this.lifeCurrent<=0)},setSizeToFrame:function(){},getBounds:function(t){void 0===t&&(t=this.emitter.getWorldTransformMatrix());var e=Math.abs(t.scaleX)*this.scaleX,i=Math.abs(t.scaleY)*this.scaleY,s=this.x,n=this.y,r=this.rotation,o=this.frame.width*e/2,l=this.frame.height*i/2,u=this.bounds,c=new h(s-o,n-l),d=new h(s+o,n-l),p=new h(s-o,n+l),f=new h(s+o,n+l);return 0!==r&&(a(c,s,n,r),a(d,s,n,r),a(p,s,n,r),a(f,s,n,r)),t.transformPoint(c.x,c.y,c),t.transformPoint(d.x,d.y,d),t.transformPoint(p.x,p.y,p),t.transformPoint(f.x,f.y,f),u.x=Math.min(c.x,d.x,p.x,f.x),u.y=Math.min(c.y,d.y,p.y,f.y),u.width=Math.max(c.x,d.x,p.x,f.x)-u.x,u.height=Math.max(c.y,d.y,p.y,f.y)-u.y,u},destroy:function(){this.anims.destroy(),this.anims=null,this.emitter=null,this.texture=null,this.frame=null,this.scene=null}});t.exports=l},9216:(t,e,i)=>{var s=i(78991),n=i(56694),r=i(64937),o=i(48129),a=i(29538),h=i(69361),l=i(54213),u=i(19737),c=i(93025),d=i(40629),p=i(89980),f=i(72632),v=i(72861),g=i(87811),m=i(53523),y=i(19256),x=i(7782),T=i(71207),w=i(14655),b=i(14909),E=i(68433),S=i(74118),A=i(90205),C=i(66458),_=i(69116),M=i(17922),R=i(69360),P=i(93736),O=i(1071),L=["active","advance","blendMode","collideBottom","collideLeft","collideRight","collideTop","colorEase","deathCallback","deathCallbackScope","duration","emitCallback","emitCallbackScope","follow","frequency","gravityX","gravityY","maxAliveParticles","maxParticles","name","emitting","particleBringToTop","particleClass","radial","sortCallback","sortOrderAsc","sortProperty","stopAfter","tintFill","timeScale","trackVisible","visible"],F=["accelerationX","accelerationY","alpha","angle","bounce","color","delay","lifespan","maxVelocityX","maxVelocityY","moveToX","moveToY","quantity","rotate","scaleX","scaleY","speedX","speedY","tint","x","y"],D=new n({Extends:p,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.FX,r.Mask,r.Pipeline,r.ScrollFactor,r.Texture,r.Transform,r.Visible,_],initialize:function(t,e,i,s,n){p.call(this,t,"ParticleEmitter"),this.particleClass=b,this.ops={accelerationX:new c("accelerationX",0),accelerationY:new c("accelerationY",0),alpha:new c("alpha",1),angle:new c("angle",{min:0,max:360},!0),bounce:new c("bounce",0),color:new u("color"),delay:new c("delay",0,!0),lifespan:new c("lifespan",1e3,!0),maxVelocityX:new c("maxVelocityX",1e4),maxVelocityY:new c("maxVelocityY",1e4),moveToX:new c("moveToX",0),moveToY:new c("moveToY",0),quantity:new c("quantity",1,!0),rotate:new c("rotate",0),scaleX:new c("scaleX",1),scaleY:new c("scaleY",1),speedX:new c("speedX",0,!0),speedY:new c("speedY",0,!0),tint:new c("tint",16777215),x:new c("x",0),y:new c("y",0)},this.radial=!0,this.gravityX=0,this.gravityY=0,this.acceleration=!1,this.moveTo=!1,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.maxParticles=0,this.maxAliveParticles=0,this.stopAfter=0,this.duration=0,this.frequency=0,this.emitting=!0,this.particleBringToTop=!0,this.timeScale=1,this.emitZones=[],this.deathZones=[],this.viewBounds=null,this.bounds=null,this.collideLeft=!0,this.collideRight=!0,this.collideTop=!0,this.collideBottom=!0,this.follow=null,this.followOffset=new P,this.trackVisible=!1,this.frames=[],this.randomFrame=!0,this.frameQuantity=1,this.anims=[],this.randomAnim=!0,this.animQuantity=1,this.dead=[],this.alive=[],this.counters=new Float32Array(10),this._frameLength=0,this._animLength=0,this.skipping=!1,this.worldMatrix=new R,this.sortProperty="",this.sortOrderAsc=!0,this.sortCallback=this.depthSortCallback,this.processors=new T(this),this.tintFill=!1,this.initPipeline(),this.setPosition(e,i),this.setTexture(s),n&&this.setConfig(n)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},getProcessors:function(){return this.processors.getAll("active",!0)},setConfig:function(t){if(!t)return this;var e=0,i="",s=this.ops;for(e=0;e=this.frameQuantity&&(this.frameCounter=0,this.currentFrame=O(this.currentFrame+1,0,this._frameLength))),this.texture.get(t)},setEmitterFrame:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=1),this.randomFrame=e,this.frameQuantity=i,this.currentFrame=0;var s=typeof t;if(this.frames.length=0,Array.isArray(t))this.frames=this.frames.concat(t);else if("string"===s||"number"===s)this.frames.push(t);else if("object"===s){var n=t;(t=f(n,"frames",null))&&(this.frames=this.frames.concat(t));var r=f(n,"cycle",!1);this.randomFrame=!r,this.frameQuantity=f(n,"quantity",i)}return this._frameLength=this.frames.length,1===this._frameLength&&(this.frameQuantity=1,this.randomFrame=!1),this},getAnim:function(){var t=this.anims;if(0===t.length)return null;if(1===t.length)return t[0];if(this.randomAnim)return v(t);var e=t[this.currentAnim];return this.animCounter++,this.animCounter>=this.animQuantity&&(this.animCounter=0,this.currentAnim=O(this.currentAnim+1,0,this._animLength)),e},setAnim:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=1),this.randomAnim=e,this.animQuantity=i,this.currentAnim=0;var s=typeof t;if(this.anims.length=0,Array.isArray(t))this.anims=this.anims.concat(t);else if("string"===s)this.anims.push(t);else if("object"===s){var n=t;(t=f(n,"anims",null))&&(this.anims=this.anims.concat(t));var r=f(n,"cycle",!1);this.randomAnim=!r,this.animQuantity=f(n,"quantity",i)}return this._animLength=this.anims.length,1===this._animLength&&(this.animQuantity=1,this.randomAnim=!1),this},setRadial:function(t){return void 0===t&&(t=!0),this.radial=t,this},setParticleBounds:function(t,e,i,s){if("object"==typeof t){var n=t;t=n.x,e=n.y,i=y(n,"w")?n.w:n.width,s=y(n,"h")?n.h:n.height}return this.bounds?this.bounds.setTo(t,e,i,s):this.bounds=new S(t,e,i,s),this},setParticleSpeed:function(t,e){return void 0===e&&(e=t),this.ops.speedX.onChange(t),t===e?this.ops.speedY.active=!1:this.ops.speedY.onChange(e),this.radial=!0,this},setParticleScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.ops.scaleX.onChange(t),this.ops.scaleY.onChange(e),this},setParticleGravity:function(t,e){return this.gravityX=t,this.gravityY=e,this},setParticleAlpha:function(t){return this.ops.alpha.onChange(t),this},setParticleTint:function(t){return this.ops.tint.onChange(t),this},setEmitterAngle:function(t){return this.ops.angle.onChange(t),this},setParticleLifespan:function(t){return this.lifespan.onChange(t),this},setQuantity:function(t){return this.quantity=t,this},setFrequency:function(t,e){return this.frequency=t,this.flowCounter=t>0?t:0,e&&(this.quantity=e),this},addDeathZone:function(t){var e;Array.isArray(t)||(t=[t]);for(var i=0;i-1&&(this.zoneTotal++,this.zoneTotal>=s.total&&(this.zoneTotal=0,this.zoneIndex=O(this.zoneIndex+1,0,i)))}},getDeathZone:function(t){for(var e=this.deathZones,i=0;i=0&&(this.zoneIndex=e),this},addParticleProcessor:function(t){return this.processors.exists(t)||(t.emitter&&t.emitter.removeParticleProcessor(t),this.processors.add(t),t.emitter=this),t},removeParticleProcessor:function(t){return this.processors.exists(t)&&(this.processors.remove(t,!0),t.emitter=null),t},createGravityWell:function(t){return this.addParticleProcessor(new g(t))},reserve:function(t){var e=this.dead;if(this.maxParticles>0){var i=this.getParticleCount();i+t>this.maxParticles&&(t=this.maxParticles-(i+t))}for(var s=0;s0&&this.getParticleCount()>=this.maxParticles||this.maxAliveParticles>0&&this.getAliveParticleCount()>=this.maxAliveParticles},onParticleEmit:function(t,e){return void 0===t?(this.emitCallback=null,this.emitCallbackScope=null):"function"==typeof t&&(this.emitCallback=t,e&&(this.emitCallbackScope=e)),this},onParticleDeath:function(t,e){return void 0===t?(this.deathCallback=null,this.deathCallbackScope=null):"function"==typeof t&&(this.deathCallback=t,e&&(this.deathCallbackScope=e)),this},killAll:function(){for(var t=this.dead,e=this.alive;e.length>0;)t.push(e.pop());return this},forEachAlive:function(t,e){for(var i=this.alive,s=i.length,n=0;n0&&this.fastForward(t),this.emitting=!0,this.resetCounters(this.frequency,!0),void 0!==e&&(this.duration=Math.abs(e)),this.emit(d.START,this)),this},stop:function(t){return void 0===t&&(t=!1),this.emitting&&(this.emitting=!1,t&&this.killAll(),this.emit(d.STOP,this)),this},pause:function(){return this.active=!1,this},resume:function(){return this.active=!0,this},setSortProperty:function(t,e){return void 0===t&&(t=""),void 0===e&&(e=this.true),this.sortProperty=t,this.sortOrderAsc=e,this.sortCallback=this.depthSortCallback,this},setSortCallback:function(t){return t=""!==this.sortProperty?this.depthSortCallback:null,this.sortCallback=t,this},depthSort:function(){return M(this.alive,this.sortCallback.bind(this)),this},depthSortCallback:function(t,e){var i=this.sortProperty;return this.sortOrderAsc?t[i]-e[i]:e[i]-t[i]},flow:function(t,e,i){return void 0===e&&(e=1),this.emitting=!1,this.frequency=t,this.quantity=e,void 0!==i&&(this.stopAfter=i),this.start()},explode:function(t,e,i){this.frequency=-1,this.resetCounters(-1,!0);var s=this.emitParticle(t,e,i);return this.emit(d.EXPLODE,this,s),s},emitParticleAt:function(t,e,i){return this.emitParticle(i,t,e)},emitParticle:function(t,e,i){if(!this.atLimit()){void 0===t&&(t=this.ops.quantity.onEmit());for(var s=this.dead,n=this.stopAfter,r=this.follow?this.follow.x+this.followOffset.x:e,o=this.follow?this.follow.y+this.followOffset.y:i,a=0;a0&&(this.stopCounter++,this.stopCounter>=n))break;if(this.atLimit())break}return h}},fastForward:function(t,e){void 0===e&&(e=1e3/60);var i=0;for(this.skipping=!0;i0&&(this.worldMatrix=this.getWorldTransformMatrix());var s=this.getProcessors(),n=this.alive,r=this.dead,o=0,a=[],h=n.length;for(o=0;o0){var u=this.deathCallback,c=this.deathCallbackScope;for(o=h-1;o>=0;o--){var p=a[o];n.splice(p.index,1),r.push(p.particle),u&&u.call(c,p.particle),p.particle.setPosition()}}if(this.emitting||this.skipping){if(0===this.frequency)this.emitParticle();else if(this.frequency>0)for(this.flowCounter-=e;this.flowCounter<=0;)this.emitParticle(),this.flowCounter+=this.frequency;this.skipping||(this.duration>0&&(this.elapsed+=e,this.elapsed>=this.duration&&this.stop()),this.stopAfter>0&&this.stopCounter>=this.stopAfter&&this.stop())}else 1===this.completeFlag&&0===n.length&&(this.completeFlag=0,this.emit(d.COMPLETE,this))},overlap:function(t){for(var e=this.getWorldTransformMatrix(),i=this.alive,s=i.length,n=[],r=0;r0){var u=0;for(this.skipping=!0;u0&&x(s,t,t),s},particleX:{get:function(){return this.ops.x.current},set:function(t){this.ops.x.onChange(t)}},particleY:{get:function(){return this.ops.y.current},set:function(t){this.ops.y.onChange(t)}},accelerationX:{get:function(){return this.ops.accelerationX.current},set:function(t){this.ops.accelerationX.onChange(t)}},accelerationY:{get:function(){return this.ops.accelerationY.current},set:function(t){this.ops.accelerationY.onChange(t)}},maxVelocityX:{get:function(){return this.ops.maxVelocityX.current},set:function(t){this.ops.maxVelocityX.onChange(t)}},maxVelocityY:{get:function(){return this.ops.maxVelocityY.current},set:function(t){this.ops.maxVelocityY.onChange(t)}},speed:{get:function(){return this.ops.speedX.current},set:function(t){this.ops.speedX.onChange(t),this.ops.speedY.onChange(t)}},speedX:{get:function(){return this.ops.speedX.current},set:function(t){this.ops.speedX.onChange(t)}},speedY:{get:function(){return this.ops.speedY.current},set:function(t){this.ops.speedY.onChange(t)}},moveToX:{get:function(){return this.ops.moveToX.current},set:function(t){this.ops.moveToX.onChange(t)}},moveToY:{get:function(){return this.ops.moveToY.current},set:function(t){this.ops.moveToY.onChange(t)}},bounce:{get:function(){return this.ops.bounce.current},set:function(t){this.ops.bounce.onChange(t)}},particleScaleX:{get:function(){return this.ops.scaleX.current},set:function(t){this.ops.scaleX.onChange(t)}},particleScaleY:{get:function(){return this.ops.scaleY.current},set:function(t){this.ops.scaleY.onChange(t)}},particleColor:{get:function(){return this.ops.color.current},set:function(t){this.ops.color.onChange(t)}},colorEase:{get:function(){return this.ops.color.easeName},set:function(t){this.ops.color.setEase(t)}},particleTint:{get:function(){return this.ops.tint.current},set:function(t){this.ops.tint.onChange(t)}},particleAlpha:{get:function(){return this.ops.alpha.current},set:function(t){this.ops.alpha.onChange(t)}},lifespan:{get:function(){return this.ops.lifespan.current},set:function(t){this.ops.lifespan.onChange(t)}},particleAngle:{get:function(){return this.ops.angle.current},set:function(t){this.ops.angle.onChange(t)}},particleRotate:{get:function(){return this.ops.rotate.current},set:function(t){this.ops.rotate.onChange(t)}},quantity:{get:function(){return this.ops.quantity.current},set:function(t){this.ops.quantity.onChange(t)}},delay:{get:function(){return this.ops.delay.current},set:function(t){this.ops.delay.onChange(t)}},flowCounter:{get:function(){return this.counters[0]},set:function(t){this.counters[0]=t}},frameCounter:{get:function(){return this.counters[1]},set:function(t){this.counters[1]=t}},animCounter:{get:function(){return this.counters[2]},set:function(t){this.counters[2]=t}},elapsed:{get:function(){return this.counters[3]},set:function(t){this.counters[3]=t}},stopCounter:{get:function(){return this.counters[4]},set:function(t){this.counters[4]=t}},completeFlag:{get:function(){return this.counters[5]},set:function(t){this.counters[5]=t}},zoneIndex:{get:function(){return this.counters[6]},set:function(t){this.counters[6]=t}},zoneTotal:{get:function(){return this.counters[7]},set:function(t){this.counters[7]=t}},currentFrame:{get:function(){return this.counters[8]},set:function(t){this.counters[8]=t}},currentAnim:{get:function(){return this.counters[9]},set:function(t){this.counters[9]=t}},preDestroy:function(){var t;this.texture=null,this.frames=null,this.anims=null,this.emitCallback=null,this.emitCallbackScope=null,this.deathCallback=null,this.deathCallbackScope=null,this.emitZones=null,this.deathZones=null,this.bounds=null,this.follow=null,this.counters=null;var e=this.ops;for(t=0;t{var s=i(90205),n=i(69360),r=new n,o=new n,a=new n,h=new n;t.exports=function(t,e,i,n){var l=r,u=o,c=a,d=h;n?(d.loadIdentity(),d.multiply(n),d.translate(e.x,e.y),d.rotate(e.rotation),d.scale(e.scaleX,e.scaleY)):d.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var p=t.currentContext,f=i.roundPixels,v=i.alpha,g=e.alpha,m=e.alive,y=m.length,x=e.viewBounds;if(e.visible&&0!==y&&(!x||s(x,i.worldView))){e.sortCallback&&e.depthSort(),i.addToRenderList(e);var T=e.scrollFactorX,w=e.scrollFactorY;p.save(),p.globalCompositeOperation=t.blendModes[e.blendMode];for(var b=0;b0&&C.height>0){var _=-A.halfWidth,M=-A.halfHeight;p.globalAlpha=S,p.save(),u.setToContext(p),f&&(_=Math.round(_),M=Math.round(M)),p.imageSmoothingEnabled=!A.source.scaleMode,p.drawImage(A.source.image,C.x,C.y,C.width,C.height,_,M,C.width,C.height),p.restore()}}}p.restore()}}},765:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(72632),a=i(9216);n.register("particles",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=o(t,"config",null),h=new a(this.scene,0,0,i);return void 0!==e&&(t.add=e),s(this.scene,h,t),n&&h.setConfig(n),h}))},81212:(t,e,i)=>{var s=i(61286),n=i(9216);s.register("particles",(function(t,e,i,s){return void 0!==t&&"string"==typeof t&&console.warn("ParticleEmitterManager was removed in Phaser 3.60. See documentation for details"),this.displayList.add(new n(this.scene,t,e,i,s))}))},69116:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(10275),r=i(10456),t.exports={renderWebGL:n,renderCanvas:r}},10275:(t,e,i)=>{var s=i(90205),n=i(69360),r=i(75512),o=new n,a=new n,h=new n,l=new n;t.exports=function(t,e,i,n){var u=t.pipelines.set(e.pipeline),c=o,d=a,p=h,f=l;n?(f.loadIdentity(),f.multiply(n),f.translate(e.x,e.y),f.rotate(e.rotation),f.scale(e.scaleX,e.scaleY)):f.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var v=i.roundPixels,g=r.getTintAppendFloatAlpha,m=i.alpha,y=e.alpha,x=e.texture.glTexture;t.pipelines.preBatch(e);var T=e.alive,w=T.length,b=e.viewBounds;if(e.visible&&0!==w&&(!b||s(b,i.worldView))){e.sortCallback&&e.depthSort();var E=u.setGameObject(e,e.frame);i.addToRenderList(e);var S=e.scrollFactorX,A=e.scrollFactorY;t.setBlendMode(e.blendMode),e.mask&&(e.mask.preRenderWebGL(t,e,i),t.pipelines.set(e.pipeline));for(var C=e.tintFill,_=0;_{var s=new(i(56694))({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=!0),this.emitter,this.x=t,this.y=e,this.active=i},update:function(){},destroy:function(){this.emitter=null}});t.exports=s},76100:t=>{t.exports="complete"},26677:t=>{t.exports="deathzone"},62736:t=>{t.exports="explode"},56490:t=>{t.exports="start"},85715:t=>{t.exports="stop"},40629:(t,e,i)=>{t.exports={COMPLETE:i(76100),DEATH_ZONE:i(26677),EXPLODE:i(62736),START:i(56490),STOP:i(85715)}},27684:(t,e,i)=>{t.exports={EmitterColorOp:i(19737),EmitterOp:i(93025),Events:i(40629),GravityWell:i(87811),Particle:i(14909),ParticleEmitter:i(9216),ParticleProcessor:i(30891),Zones:i(25962)}},69361:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e){this.source=t,this.killOnEnter=e},willKill:function(t,e){var i=this.source.contains(t,e);return i&&this.killOnEnter||!i&&!this.killOnEnter}});t.exports=s},54213:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s,n,r){void 0===s&&(s=!1),void 0===n&&(n=!0),void 0===r&&(r=-1),this.source=t,this.points=[],this.quantity=e,this.stepRate=i,this.yoyo=s,this.counter=-1,this.seamless=n,this._length=0,this._direction=0,this.total=r,this.updateSource()},updateSource:function(){if(this.points=this.source.getPoints(this.quantity,this.stepRate),this.seamless){var t=this.points[0],e=this.points[this.points.length-1];t.x===e.x&&t.y===e.y&&this.points.pop()}var i=this._length;return this._length=this.points.length,this._lengththis._length&&(this.counter=this._length-1),this},changeSource:function(t){return this.source=t,this.updateSource()},getPoint:function(t){0===this._direction?(this.counter++,this.counter>=this._length&&(this.yoyo?(this._direction=1,this.counter=this._length-1):this.counter=0)):(this.counter--,-1===this.counter&&(this.yoyo?(this._direction=0,this.counter=0):this.counter=this._length-1));var e=this.points[this.counter];e&&(t.x=e.x,t.y=e.y)}});t.exports=s},68433:(t,e,i)=>{var s=i(56694),n=i(93736),r=new s({initialize:function(t){this.source=t,this._tempVec=new n,this.total=-1},getPoint:function(t){var e=this._tempVec;this.source.getRandomPoint(e),t.x=e.x,t.y=e.y}});t.exports=r},25962:(t,e,i)=>{t.exports={DeathZone:i(69361),EdgeZone:i(54213),RandomZone:i(68433)}},29598:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(13747),o=new s({Extends:r,Mixins:[n.PathFollower],initialize:function(t,e,i,s,n,o){r.call(this,t,i,s,n,o),this.path=e},preUpdate:function(t,e){this.anims.update(t,e),this.pathUpdate(t)}});t.exports=o},19626:(t,e,i)=>{var s=i(61286),n=i(29598);s.register("follower",(function(t,e,i,s,r){var o=new n(this.scene,t,e,i,s,r);return this.displayList.add(o),this.updateList.add(o),o}))},13171:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),o=i(74853),a=i(65641),h=i(71606),l=new s({Extends:r,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.Mask,n.Pipeline,n.ScrollFactor,n.Transform,n.Visible,h],initialize:function(t,e,i,s,n,h,l){void 0===s&&(s=16777215),void 0===n&&(n=128),void 0===h&&(h=1),void 0===l&&(l=.1),r.call(this,t,"PointLight"),this.initPipeline(a.POINTLIGHT_PIPELINE),this.setPosition(e,i),this.color=o(s),this.intensity=h,this.attenuation=l,this.width=2*n,this.height=2*n,this._radius=n},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this.width=2*t,this.height=2*t}},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return this._radius}},displayOriginY:{get:function(){return this._radius}}});t.exports=l},162:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(13171);n.register("pointlight",(function(t,e){void 0===t&&(t={});var i=r(t,"color",16777215),n=r(t,"radius",128),a=r(t,"intensity",1),h=r(t,"attenuation",.1),l=new o(this.scene,0,0,i,n,a,h);return void 0!==e&&(t.add=e),s(this.scene,l,t),l}))},91201:(t,e,i)=>{var s=i(61286),n=i(13171);s.register("pointlight",(function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))}))},71606:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(80590),t.exports={renderWebGL:n,renderCanvas:r}},80590:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){i.addToRenderList(e);var r=t.pipelines.set(e.pipeline),o=s(e,i,n).calc,a=e.width,h=e.height,l=-e._radius,u=-e._radius,c=l+a,d=u+h,p=o.getX(0,0),f=o.getY(0,0),v=o.getX(l,u),g=o.getY(l,u),m=o.getX(l,d),y=o.getY(l,d),x=o.getX(c,d),T=o.getY(c,d),w=o.getX(c,u),b=o.getY(c,u);t.pipelines.preBatch(e),r.batchPointLight(e,i,v,g,m,y,x,T,w,b,p,f),t.pipelines.postBatch(e)}},15996:(t,e,i)=>{var s=i(56694),n=i(845),r=i(1539),o=new s({Extends:r,initialize:function(t,e,i,s,o){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=32),void 0===o&&(o=32);var a=new n(t.sys.textures,"",s,o);r.call(this,t,e,i,a),this.type="RenderTexture",this.camera=this.texture.camera,this._saved=!1},setSize:function(t,e){this.width=t,this.height=e,this.texture.setSize(t,e),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this},resize:function(t,e){return this.setSize(t,e),this},saveTexture:function(t){var e=this.texture;return e.key=t,e.manager.addDynamicTexture(e)&&(this._saved=!0),e},fill:function(t,e,i,s,n,r){return this.texture.fill(t,e,i,s,n,r),this},clear:function(){return this.texture.clear(),this},stamp:function(t,e,i,s,n){return this.texture.stamp(t,e,i,s,n),this},erase:function(t,e,i){return this.texture.erase(t,e,i),this},draw:function(t,e,i,s,n){return this.texture.draw(t,e,i,s,n),this},drawFrame:function(t,e,i,s,n,r){return this.texture.drawFrame(t,e,i,s,n,r),this},repeat:function(t,e,i,s,n,r,o,a,h){return this.texture.repeat(t,e,i,s,n,r,o,a,h),this},beginDraw:function(){return this.texture.beginDraw(),this},batchDraw:function(t,e,i,s,n){return this.texture.batchDraw(t,e,i,s,n),this},batchDrawFrame:function(t,e,i,s,n,r){return this.texture.batchDrawFrame(t,e,i,s,n,r),this},endDraw:function(t){return this.texture.endDraw(t),this},snapshotArea:function(t,e,i,s,n,r,o){return this.texture.snapshotArea(t,e,i,s,n,r,o),this},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.width,this.height,t,e,i)},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i,"pixel")},preDestroy:function(){this._saved||this.texture.destroy()}});t.exports=o},85692:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(15996);n.register("renderTexture",(function(t,e){void 0===t&&(t={});var i=r(t,"x",0),n=r(t,"y",0),a=r(t,"width",32),h=r(t,"height",32),l=new o(this.scene,i,n,a,h);return void 0!==e&&(t.add=e),s(this.scene,l,t),l}))},29599:(t,e,i)=>{var s=i(61286),n=i(15996);s.register("renderTexture",(function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))}))},79968:(t,e,i)=>{var s=i(16569),n=i(56694),r=i(64937),o=i(89980),a=i(65641),h=i(58912),l=i(93736),u=new n({Extends:o,Mixins:[r.AlphaSingle,r.BlendMode,r.Depth,r.Flip,r.Mask,r.Pipeline,r.Size,r.Texture,r.Transform,r.Visible,r.ScrollFactor,h],initialize:function(t,e,i,n,r,h,u,c,d){void 0===n&&(n="__DEFAULT"),void 0===h&&(h=2),void 0===u&&(u=!0),o.call(this,t,"Rope"),this.anims=new s(this),this.points=h,this.vertices,this.uv,this.colors,this.alphas,this.tintFill="__DEFAULT"===n,this.dirty=!1,this.horizontal=u,this._flipX=!1,this._flipY=!1,this._perp=new l,this.debugCallback=null,this.debugGraphic=null,this.setTexture(n,r),this.setPosition(e,i),this.setSizeToFrame(),this.initPipeline(a.ROPE_PIPELINE),Array.isArray(h)&&this.resizeArrays(h.length),this.setPoints(h,c,d),this.updateVertices()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){var i=this.anims.currentFrame;this.anims.update(t,e),this.anims.currentFrame!==i&&(this.updateUVs(),this.updateVertices())},play:function(t,e,i){return this.anims.play(t,e,i),this},setDirty:function(){return this.dirty=!0,this},setHorizontal:function(t,e,i){return void 0===t&&(t=this.points.length),this.horizontal?this:(this.horizontal=!0,this.setPoints(t,e,i))},setVertical:function(t,e,i){return void 0===t&&(t=this.points.length),this.horizontal?(this.horizontal=!1,this.setPoints(t,e,i)):this},setTintFill:function(t){return void 0===t&&(t=!1),this.tintFill=t,this},setAlphas:function(t,e){var i=this.points.length;if(i<1)return this;var s,n=this.alphas;void 0===t?t=[1]:Array.isArray(t)||void 0!==e||(t=[t]);var r=0;if(void 0!==e)for(s=0;sr&&(o=t[r]),n[r]=o,t.length>r+1&&(o=t[r+1]),n[r+1]=o}return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i,s=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var n=0;if(t.length===e)for(i=0;in&&(r=t[n]),s[n]=r,t.length>n+1&&(r=t[n+1]),s[n+1]=r}return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var s,n,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,n=this.frame.width/(o-1),s=0;s{t.exports=function(){}},96027:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(10850),a=i(79968);n.register("rope",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"frame",null),h=r(t,"horizontal",!0),l=o(t,"points",void 0),u=o(t,"colors",void 0),c=o(t,"alphas",void 0),d=new a(this.scene,0,0,i,n,l,h,u,c);return void 0!==e&&(t.add=e),s(this.scene,d,t),d}))},31982:(t,e,i)=>{var s=i(79968);i(61286).register("rope",(function(t,e,i,n,r,o,a,h){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h))}))},58912:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(49489),r=i(44598),t.exports={renderWebGL:n,renderCanvas:r}},49489:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline,e),a=s(e,i,r).calc,h=e.vertices,l=e.uv,u=e.colors,c=e.alphas,d=e.alpha,p=n.getTintAppendFloatAlpha,f=i.roundPixels,v=h.length,g=Math.floor(.5*v);o.flush(),t.pipelines.preBatch(e);var m=o.setGameObject(e),y=o.vertexViewF32,x=o.vertexViewU32,T=o.vertexCount*o.currentShader.vertexComponentCount-1,w=0,b=e.tintFill;e.dirty&&e.updateVertices();for(var E=e.debugCallback,S=[],A=0;A{var s=i(56694),n=i(64937),r=i(89980),o=i(72632),a=i(98611),h=i(22440),l=i(24252),u=i(69360),c=new s({Extends:r,Mixins:[n.ComputedSize,n.Depth,n.GetBounds,n.Mask,n.Origin,n.ScrollFactor,n.Transform,n.Visible,l],initialize:function(t,e,i,s,n,o,a,h){void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=128),void 0===o&&(o=128),r.call(this,t,"Shader"),this.blendMode=-1,this.shader;var l=t.sys.renderer;this.renderer=l,this.gl=l.gl,this.vertexData=new ArrayBuffer(2*Float32Array.BYTES_PER_ELEMENT*6),this.vertexBuffer=l.createVertexBuffer(this.vertexData.byteLength,this.gl.STREAM_DRAW),this.program=null,this.bytes=new Uint8Array(this.vertexData),this.vertexViewF32=new Float32Array(this.vertexData),this._tempMatrix1=new u,this._tempMatrix2=new u,this._tempMatrix3=new u,this.viewMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.projectionMatrix=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this.uniforms={},this.pointer=null,this._rendererWidth=l.width,this._rendererHeight=l.height,this._textureCount=0,this.framebuffer=null,this.glTexture=null,this.renderToTexture=!1,this.texture=null,this.setPosition(i,s),this.setSize(n,o),this.setOrigin(.5,.5),this.setShader(e,a,h)},willRender:function(t){return!!this.renderToTexture||!(r.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},setRenderToTexture:function(t,e){if(void 0===e&&(e=!1),!this.renderToTexture){var i=this.width,s=this.height,n=this.renderer;this.glTexture=n.createTextureFromSource(null,i,s,0),this.glTexture.flipY=e,this.framebuffer=n.createFramebuffer(i,s,this.glTexture,!1),this._rendererWidth=i,this._rendererHeight=s,this.renderToTexture=!0,this.projOrtho(0,this.width,this.height,0),t&&(this.texture=this.scene.sys.textures.addGLTexture(t,this.glTexture,i,s))}return this.shader&&(n.pipelines.clear(),this.load(),this.flush(),n.pipelines.rebind()),this},setShader:function(t,e,i){if(void 0===e&&(e=[]),"string"==typeof t){var s=this.scene.sys.cache.shader;if(!s.has(t))return console.warn("Shader missing: "+t),this;this.shader=s.get(t)}else this.shader=t;var n=this.gl,r=this.renderer;this.program&&n.deleteProgram(this.program);var o=r.createProgram(this.shader.vertexSrc,this.shader.fragmentSrc);n.uniformMatrix4fv(n.getUniformLocation(o,"uViewMatrix"),!1,this.viewMatrix),n.uniformMatrix4fv(n.getUniformLocation(o,"uProjectionMatrix"),!1,this.projectionMatrix),n.uniform2f(n.getUniformLocation(o,"uResolution"),this.width,this.height),this.program=o;var h=new Date,l={resolution:{type:"2f",value:{x:this.width,y:this.height}},time:{type:"1f",value:0},mouse:{type:"2f",value:{x:this.width/2,y:this.height/2}},date:{type:"4fv",value:[h.getFullYear(),h.getMonth(),h.getDate(),60*h.getHours()*60+60*h.getMinutes()+h.getSeconds()]},sampleRate:{type:"1f",value:44100},iChannel0:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel1:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel2:{type:"sampler2D",value:null,textureData:{repeat:!0}},iChannel3:{type:"sampler2D",value:null,textureData:{repeat:!0}}};this.shader.uniforms?this.uniforms=a(!0,{},this.shader.uniforms,l):this.uniforms=l;for(var u=0;u<4;u++)e[u]&&this.setSampler2D("iChannel"+u,e[u],u,i);return this.initUniforms(),this.projOrtho(0,this._rendererWidth,this._rendererHeight,0),this},setPointer:function(t){return this.pointer=t,this},projOrtho:function(t,e,i,s){var n=1/(t-e),r=1/(i-s),o=this.projectionMatrix;o[0]=-2*n,o[5]=-2*r,o[10]=-.001,o[12]=(t+e)*n,o[13]=(s+i)*r,o[14]=-0;var a=this.program,h=this.gl;this.renderer.setProgram(a),h.uniformMatrix4fv(h.getUniformLocation(a,"uProjectionMatrix"),!1,this.projectionMatrix),this._rendererWidth=e,this._rendererHeight=i},initUniforms:function(){var t=this.gl,e=this.renderer.glFuncMap,i=this.program;for(var s in this._textureCount=0,this.uniforms){var n=this.uniforms[s],r=n.type,o=e[r];n.uniformLocation=t.getUniformLocation(i,s),"sampler2D"!==r&&(n.glMatrix=o.matrix,n.glValueLength=o.length,n.glFunc=o.func)}},setSampler2DBuffer:function(t,e,i,s,n,r){void 0===n&&(n=0),void 0===r&&(r={});var o=this.uniforms[t];return o.value=e,r.width=i,r.height=s,o.textureData=r,this._textureCount=n,this.initSampler2D(o),this},setSampler2D:function(t,e,i,s){void 0===i&&(i=0);var n=this.scene.sys.textures;if(n.exists(e)){var r=n.getFrame(e);if(r.glTexture&&r.glTexture.isRenderTexture)return this.setSampler2DBuffer(t,r.glTexture,r.width,r.height,i,s);var o=this.uniforms[t],a=r.source;o.textureKey=e,o.source=a.image,o.value=r.glTexture,a.isGLTexture&&(s||(s={}),s.width=a.width,s.height=a.height),s&&(o.textureData=s),this._textureCount=i,this.initSampler2D(o)}return this},setUniform:function(t,e){return h(this.uniforms,t,e),this},getUniform:function(t){return o(this.uniforms,t,null)},setChannel0:function(t,e){return this.setSampler2D("iChannel0",t,0,e)},setChannel1:function(t,e){return this.setSampler2D("iChannel1",t,1,e)},setChannel2:function(t,e){return this.setSampler2D("iChannel2",t,2,e)},setChannel3:function(t,e){return this.setSampler2D("iChannel3",t,3,e)},initSampler2D:function(t){if(t.value){var e=this.gl;e.activeTexture(e.TEXTURE0+this._textureCount),e.bindTexture(e.TEXTURE_2D,t.value);var i=t.textureData;if(i&&!t.value.isRenderTexture){var s=e[o(i,"magFilter","linear").toUpperCase()],n=e[o(i,"minFilter","linear").toUpperCase()],r=e[o(i,"wrapS","repeat").toUpperCase()],a=e[o(i,"wrapT","repeat").toUpperCase()],h=e[o(i,"format","rgba").toUpperCase()];if(i.repeat&&(r=e.REPEAT,a=e.REPEAT),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,!!i.flipY),i.width){var l=o(i,"width",512),u=o(i,"height",2),c=o(i,"border",0);e.texImage2D(e.TEXTURE_2D,0,h,l,u,c,h,e.UNSIGNED_BYTE,null)}else e.texImage2D(e.TEXTURE_2D,0,h,e.RGBA,e.UNSIGNED_BYTE,t.source);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,s),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,a)}this.renderer.setProgram(this.program),e.uniform1i(t.uniformLocation,this._textureCount),this._textureCount++}},syncUniforms:function(){var t,e,i,s,n,r=this.gl,o=this.uniforms,a=0;for(var h in o)i=(t=o[h]).glFunc,e=t.glValueLength,s=t.uniformLocation,null!==(n=t.value)&&(1===e?t.glMatrix?i.call(r,s,t.transpose,n):i.call(r,s,n):2===e?i.call(r,s,n.x,n.y):3===e?i.call(r,s,n.x,n.y,n.z):4===e?i.call(r,s,n.x,n.y,n.z,n.w):"sampler2D"===t.type&&(r.activeTexture(r.TEXTURE0+a),r.bindTexture(r.TEXTURE_2D,n),r.uniform1i(s,a),a++))},load:function(t){var e=this.gl,i=this.width,s=this.height,n=this.renderer,r=this.program,o=this.viewMatrix;if(!this.renderToTexture){var a=-this._displayOriginX,h=-this._displayOriginY;o[0]=t[0],o[1]=t[1],o[4]=t[2],o[5]=t[3],o[8]=t[4],o[9]=t[5],o[12]=o[0]*a+o[4]*h,o[13]=o[1]*a+o[5]*h}e.useProgram(r),e.uniformMatrix4fv(e.getUniformLocation(r,"uViewMatrix"),!1,o),e.uniform2f(e.getUniformLocation(r,"uResolution"),this.width,this.height);var l=this.uniforms,u=l.resolution;u.value.x=i,u.value.y=s,l.time.value=n.game.loop.getDuration();var c=this.pointer;if(c){var d=l.mouse,p=c.x/i,f=1-c.y/s;d.value.x=p.toFixed(2),d.value.y=f.toFixed(2)}this.syncUniforms()},flush:function(){var t=this.width,e=this.height,i=this.program,s=this.gl,n=this.vertexBuffer,r=this.renderer,o=2*Float32Array.BYTES_PER_ELEMENT;this.renderToTexture&&(r.setFramebuffer(this.framebuffer),s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT)),s.bindBuffer(s.ARRAY_BUFFER,n);var a=s.getAttribLocation(i,"inPosition");-1!==a&&(s.enableVertexAttribArray(a),s.vertexAttribPointer(a,2,s.FLOAT,!1,o,0));var h=this.vertexViewF32;h[3]=e,h[4]=t,h[5]=e,h[8]=t,h[9]=e,h[10]=t;s.bufferSubData(s.ARRAY_BUFFER,0,this.bytes.subarray(0,6*o)),s.drawArrays(s.TRIANGLES,0,6),this.renderToTexture&&r.setFramebuffer(null,!1)},setAlpha:function(){},setBlendMode:function(){},preDestroy:function(){var t=this.gl;t.deleteProgram(this.program),t.deleteBuffer(this.vertexBuffer),this.renderToTexture&&(this.renderer.deleteFramebuffer(this.framebuffer),this.texture.destroy(),this.framebuffer=null,this.glTexture=null,this.texture=null)}});t.exports=c},10612:t=>{t.exports=function(){}},13908:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(27902);n.register("shader",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=r(t,"x",0),a=r(t,"y",0),h=r(t,"width",128),l=r(t,"height",128),u=new o(this.scene,i,n,a,h,l);return void 0!==e&&(t.add=e),s(this.scene,u,t),u}))},51979:(t,e,i)=>{var s=i(27902);i(61286).register("shader",(function(t,e,i,n,r,o,a){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a))}))},24252:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(19782),r=i(10612),t.exports={renderWebGL:n,renderCanvas:r}},19782:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n){if(e.shader){if(i.addToRenderList(e),t.pipelines.clear(),e.renderToTexture)e.load(),e.flush();else{var r=s(e,i,n).calc;t.width===e._rendererWidth&&t.height===e._rendererHeight||e.projOrtho(0,t.width,t.height,0),e.load(r.matrix),e.flush()}t.pipelines.rebind()}}},19543:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n,r,o){for(var a=s.getTintAppendFloatAlpha(i.fillColor,i.fillAlpha*n),h=i.pathData,l=i.pathIndexes,u=0;u{t.exports=function(t,e,i,s){var n=i||e.fillColor,r=s||e.fillAlpha,o=(16711680&n)>>>16,a=(65280&n)>>>8,h=255&n;t.fillStyle="rgba("+o+","+a+","+h+","+r+")"}},17876:t=>{t.exports=function(t,e,i,s){var n=i||e.strokeColor,r=s||e.strokeAlpha,o=(16711680&n)>>>16,a=(65280&n)>>>8,h=255&n;t.strokeStyle="rgba("+o+","+a+","+h+","+r+")",t.lineWidth=e.lineWidth}},91461:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),o=i(88829),a=new s({Extends:r,Mixins:[n.AlphaSingle,n.BlendMode,n.Depth,n.GetBounds,n.FX,n.Mask,n.Origin,n.Pipeline,n.ScrollFactor,n.Transform,n.Visible],initialize:function(t,e,i){void 0===e&&(e="Shape"),r.call(this,t,e),this.geom=i,this.pathData=[],this.pathIndexes=[],this.fillColor=16777215,this.fillAlpha=1,this.strokeColor=16777215,this.strokeAlpha=1,this.lineWidth=1,this.isFilled=!1,this.isStroked=!1,this.closePath=!0,this._tempLine=new o,this.width=0,this.height=0,this.initPipeline()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.isFilled=!1:(this.fillColor=t,this.fillAlpha=e,this.isFilled=!0),this},setStrokeStyle:function(t,e,i){return void 0===i&&(i=1),void 0===t?this.isStroked=!1:(this.lineWidth=t,this.strokeColor=e,this.strokeAlpha=i,this.isStroked=!0),this},setClosePath:function(t){return this.closePath=t,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},preDestroy:function(){this.geom=null,this._tempLine=null,this.pathData=[],this.pathIndexes=[]},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}}});t.exports=a},50262:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n,r){var o=t.strokeTint,a=s.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*i);o.TL=a,o.TR=a,o.BL=a,o.BR=a;var h=e.pathData,l=h.length-1,u=e.lineWidth,c=u/2,d=h[0]-n,p=h[1]-r;e.closePath||(l-=2);for(var f=2;f{var s=i(2213),n=i(56694),r=i(75606),o=i(11117),a=i(26673),h=i(83392),l=i(91461),u=new n({Extends:l,Mixins:[s],initialize:function(t,e,i,s,n,r,o,h,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===n&&(n=0),void 0===r&&(r=360),void 0===o&&(o=!1),l.call(this,t,"Arc",new a(0,0,s)),this._startAngle=n,this._endAngle=r,this._anticlockwise=o,this._iterations=.01,this.setPosition(e,i);var c=2*this.geom.radius;this.setSize(c,c),void 0!==h&&this.setFillStyle(h,u),this.updateDisplayOrigin(),this.updateData()},iterations:{get:function(){return this._iterations},set:function(t){this._iterations=t,this.updateData()}},radius:{get:function(){return this.geom.radius},set:function(t){this.geom.radius=t;var e=2*t;this.setSize(e,e),this.updateDisplayOrigin(),this.updateData()}},startAngle:{get:function(){return this._startAngle},set:function(t){this._startAngle=t,this.updateData()}},endAngle:{get:function(){return this._endAngle},set:function(t){this._endAngle=t,this.updateData()}},anticlockwise:{get:function(){return this._anticlockwise},set:function(t){this._anticlockwise=t,this.updateData()}},setRadius:function(t){return this.radius=t,this},setIterations:function(t){return void 0===t&&(t=.01),this.iterations=t,this},setStartAngle:function(t,e){return this._startAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},setEndAngle:function(t,e){return this._endAngle=t,void 0!==e&&(this._anticlockwise=e),this.updateData()},updateData:function(){var t=this._iterations,e=t,i=this.geom.radius,s=r(this._startAngle),n=r(this._endAngle),a=i,l=i;n-=s,this._anticlockwise?n<-h.PI2?n=-h.PI2:n>0&&(n=-h.PI2+n%h.PI2):n>h.PI2?n=h.PI2:n<0&&(n=h.PI2+n%h.PI2);for(var u,c=[a+Math.cos(s)*i,l+Math.sin(s)*i];e<1;)u=n*e+s,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),e+=t;return u=n+s,c.push(a+Math.cos(u)*i,l+Math.sin(u)*i),c.push(a+Math.cos(s)*i,l+Math.sin(s)*i),this.pathIndexes=o(c),this.pathData=c,this}});t.exports=u},23560:(t,e,i)=>{var s=i(75606),n=i(15608),r=i(17876),o=i(49584);t.exports=function(t,e,i,a){i.addToRenderList(e);var h=t.currentContext;if(o(t,h,e,i,a)){var l=e.radius;h.beginPath(),h.arc(l-e.originX*(2*l),l-e.originY*(2*l),l,s(e._startAngle),s(e._endAngle),e.anticlockwise),e.closePath&&h.closePath(),e.isFilled&&(n(h,e),h.fill()),e.isStroked&&(r(h,e),h.stroke()),h.restore()}}},10369:(t,e,i)=>{var s=i(28593),n=i(61286);n.register("arc",(function(t,e,i,n,r,o,a,h){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a,h))})),n.register("circle",(function(t,e,i,n,r){return this.displayList.add(new s(this.scene,t,e,i,0,360,!1,n,r))}))},2213:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(58356),r=i(23560),t.exports={renderWebGL:n,renderCanvas:r}},58356:(t,e,i)=>{var s=i(73329),n=i(19543),r=i(50262);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=s(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&n(a,l,e,d,u,c),e.isStroked&&r(a,e,d,u,c),t.pipelines.postBatch(e)}},15220:(t,e,i)=>{var s=i(56694),n=i(87203),r=i(11117),o=i(74118),a=i(91461),h=new s({Extends:a,Mixins:[n],initialize:function(t,e,i,s,n,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Curve",s),this._smoothness=32,this._curveBounds=new o,this.closePath=!1,this.setPosition(e,i),void 0!==n&&this.setFillStyle(n,r),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){var t=this._curveBounds,e=this._smoothness;this.geom.getBounds(t,e),this.setSize(t.width,t.height),this.updateDisplayOrigin();for(var i=[],s=this.geom.getPoints(e),n=0;n{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX+e._curveBounds.x,l=e._displayOriginY+e._curveBounds.y,u=e.pathData,c=u.length-1,d=u[0]-h,p=u[1]-l;a.beginPath(),a.moveTo(d,p),e.closePath||(c-=2);for(var f=2;f{var s=i(61286),n=i(15220);s.register("curve",(function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))}))},87203:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(82958),r=i(4024),t.exports={renderWebGL:n,renderCanvas:r}},82958:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=n(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX+e._curveBounds.x,c=e._displayOriginY+e._curveBounds.y,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(a,l,e,d,u,c),e.isStroked&&r(a,e,d,u,c),t.pipelines.postBatch(e)}},28591:(t,e,i)=>{var s=i(56694),n=i(11117),r=i(84171),o=i(95669),a=i(91461),h=new s({Extends:a,Mixins:[r],initialize:function(t,e,i,s,n,r,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===n&&(n=128),a.call(this,t,"Ellipse",new o(s/2,n/2,s,n)),this._smoothness=64,this.setPosition(e,i),this.width=s,this.height=n,void 0!==r&&this.setFillStyle(r,h),this.updateDisplayOrigin(),this.updateData()},smoothness:{get:function(){return this._smoothness},set:function(t){this._smoothness=t,this.updateData()}},setSize:function(t,e){return this.width=t,this.height=e,this.geom.setPosition(t/2,e/2),this.geom.setSize(t,e),this.updateData()},setSmoothness:function(t){return this._smoothness=t,this.updateData()},updateData:function(){for(var t=[],e=this.geom.getPoints(this._smoothness),i=0;i{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,p=u[1]-l;a.beginPath(),a.moveTo(d,p),e.closePath||(c-=2);for(var f=2;f{var s=i(28591);i(61286).register("ellipse",(function(t,e,i,n,r,o){return this.displayList.add(new s(this.scene,t,e,i,n,r,o))}))},84171:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(17554),r=i(55881),t.exports={renderWebGL:n,renderCanvas:r}},17554:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=n(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(a,l,e,d,u,c),e.isStroked&&r(a,e,d,u,c),t.pipelines.postBatch(e)}},39169:(t,e,i)=>{var s=i(56694),n=i(91461),r=i(88059),o=new s({Extends:n,Mixins:[r],initialize:function(t,e,i,s,r,o,a,h,l,u,c){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===r&&(r=128),void 0===o&&(o=32),void 0===a&&(a=32),n.call(this,t,"Grid",null),this.cellWidth=o,this.cellHeight=a,this.showCells=!0,this.outlineFillColor=0,this.outlineFillAlpha=0,this.showOutline=!0,this.showAltCells=!1,this.altFillColor,this.altFillAlpha,this.setPosition(e,i),this.setSize(s,r),this.setFillStyle(h,l),void 0!==u&&this.setOutlineStyle(u,c),this.updateDisplayOrigin()},setFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showCells=!1:(this.fillColor=t,this.fillAlpha=e,this.showCells=!0),this},setAltFillStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showAltCells=!1:(this.altFillColor=t,this.altFillAlpha=e,this.showAltCells=!0),this},setOutlineStyle:function(t,e){return void 0===e&&(e=1),void 0===t?this.showOutline=!1:(this.outlineFillColor=t,this.outlineFillAlpha=e,this.showOutline=!0),this}});t.exports=o},95525:(t,e,i)=>{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=-e._displayOriginX,l=-e._displayOriginY,u=i.alpha*e.alpha,c=e.width,d=e.height,p=e.cellWidth,f=e.cellHeight,v=Math.ceil(c/p),g=Math.ceil(d/f),m=p,y=f,x=p-(v*p-c),T=f-(g*f-d),w=e.showCells,b=e.showAltCells,E=e.showOutline,S=0,A=0,C=0,_=0,M=0;if(E&&(m--,y--,x===p&&x--,T===f&&T--),w&&e.fillAlpha>0)for(s(a,e),A=0;A0)for(s(a,e,e.altFillColor,e.altFillAlpha*u),A=0;A0){for(n(a,e,e.outlineFillColor,e.outlineFillAlpha*u),S=1;S{var s=i(61286),n=i(39169);s.register("grid",(function(t,e,i,s,r,o,a,h,l,u){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h,l,u))}))},88059:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(50639),r=i(95525),t.exports={renderWebGL:n,renderCanvas:r}},50639:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),a=s(e,i,r);o.calcMatrix.copyFrom(a.calc).translate(-e._displayOriginX,-e._displayOriginY);var h,l,u=i.alpha*e.alpha,c=e.width,d=e.height,p=e.cellWidth,f=e.cellHeight,v=Math.ceil(c/p),g=Math.ceil(d/f),m=p,y=f,x=p-(v*p-c),T=f-(g*f-d),w=e.showCells,b=e.showAltCells,E=e.showOutline,S=0,A=0,C=0,_=0,M=0;if(E&&(m--,y--,x===p&&x--,T===f&&T--),t.pipelines.preBatch(e),w&&e.fillAlpha>0)for(h=o.fillTint,l=n.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*u),h.TL=l,h.TR=l,h.BL=l,h.BR=l,A=0;A0)for(h=o.fillTint,l=n.getTintAppendFloatAlpha(e.altFillColor,e.altFillAlpha*u),h.TL=l,h.TR=l,h.BL=l,h.BR=l,A=0;A0){var R=o.strokeTint,P=n.getTintAppendFloatAlpha(e.outlineFillColor,e.outlineFillAlpha*u);for(R.TL=P,R.TR=P,R.BL=P,R.BR=P,S=1;S{var s=i(72296),n=i(56694),r=i(91461),o=new n({Extends:r,Mixins:[s],initialize:function(t,e,i,s,n,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=48),void 0===n&&(n=32),void 0===o&&(o=15658734),void 0===a&&(a=10066329),void 0===h&&(h=13421772),r.call(this,t,"IsoBox",null),this.projection=4,this.fillTop=o,this.fillLeft=a,this.fillRight=h,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isFilled=!0,this.setPosition(e,i),this.setSize(s,n),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=o},32884:(t,e,i)=>{var s=i(15608),n=i(49584);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.currentContext;if(n(t,o,e,i,r)&&e.isFilled){var a=e.width,h=e.height,l=a/2,u=a/e.projection;e.showTop&&(s(o,e,e.fillTop),o.beginPath(),o.moveTo(-l,-h),o.lineTo(0,-u-h),o.lineTo(l,-h),o.lineTo(l,-1),o.lineTo(0,u-1),o.lineTo(-l,-1),o.lineTo(-l,-h),o.fill()),e.showLeft&&(s(o,e,e.fillLeft),o.beginPath(),o.moveTo(-l,0),o.lineTo(0,u),o.lineTo(0,u-h),o.lineTo(-l,-h),o.lineTo(-l,0),o.fill()),e.showRight&&(s(o,e,e.fillRight),o.beginPath(),o.moveTo(l,0),o.lineTo(0,u),o.lineTo(0,u-h),o.lineTo(l,-h),o.lineTo(l,0),o.fill()),o.restore()}}},88154:(t,e,i)=>{var s=i(61286),n=i(4415);s.register("isobox",(function(t,e,i,s,r,o,a){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a))}))},72296:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(33101),r=i(32884),t.exports={renderWebGL:n,renderCanvas:r}},33101:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var o,a,h,l,u,c,d,p,f,v=t.pipelines.set(e.pipeline),g=s(e,i,r),m=v.calcMatrix.copyFrom(g.calc),y=e.width,x=e.height,T=y/2,w=y/e.projection,b=i.alpha*e.alpha;e.isFilled&&(t.pipelines.preBatch(e),e.showTop&&(o=n.getTintAppendFloatAlpha(e.fillTop,b),a=m.getX(-T,-x),h=m.getY(-T,-x),l=m.getX(0,-w-x),u=m.getY(0,-w-x),c=m.getX(T,-x),d=m.getY(T,-x),p=m.getX(0,w-x),f=m.getY(0,w-x),v.batchQuad(e,a,h,l,u,c,d,p,f,0,0,1,1,o,o,o,o,2)),e.showLeft&&(o=n.getTintAppendFloatAlpha(e.fillLeft,b),a=m.getX(-T,0),h=m.getY(-T,0),l=m.getX(0,w),u=m.getY(0,w),c=m.getX(0,w-x),d=m.getY(0,w-x),p=m.getX(-T,-x),f=m.getY(-T,-x),v.batchQuad(e,a,h,l,u,c,d,p,f,0,0,1,1,o,o,o,o,2)),e.showRight&&(o=n.getTintAppendFloatAlpha(e.fillRight,b),a=m.getX(T,0),h=m.getY(T,0),l=m.getX(0,w),u=m.getY(0,w),c=m.getX(0,w-x),d=m.getY(0,w-x),p=m.getX(T,-x),f=m.getY(T,-x),v.batchQuad(e,a,h,l,u,c,d,p,f,0,0,1,1,o,o,o,o,2)),t.pipelines.postBatch(e))}},65159:(t,e,i)=>{var s=i(56694),n=i(93387),r=i(91461),o=new s({Extends:r,Mixins:[n],initialize:function(t,e,i,s,n,o,a,h,l){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=48),void 0===n&&(n=32),void 0===o&&(o=!1),void 0===a&&(a=15658734),void 0===h&&(h=10066329),void 0===l&&(l=13421772),r.call(this,t,"IsoTriangle",null),this.projection=4,this.fillTop=a,this.fillLeft=h,this.fillRight=l,this.showTop=!0,this.showLeft=!0,this.showRight=!0,this.isReversed=o,this.isFilled=!0,this.setPosition(e,i),this.setSize(s,n),this.updateDisplayOrigin()},setProjection:function(t){return this.projection=t,this},setReversed:function(t){return this.isReversed=t,this},setFaces:function(t,e,i){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===i&&(i=!0),this.showTop=t,this.showLeft=e,this.showRight=i,this},setFillStyle:function(t,e,i){return this.fillTop=t,this.fillLeft=e,this.fillRight=i,this.isFilled=!0,this}});t.exports=o},9923:(t,e,i)=>{var s=i(15608),n=i(49584);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.currentContext;if(n(t,o,e,i,r)&&e.isFilled){var a=e.width,h=e.height,l=a/2,u=a/e.projection,c=e.isReversed;e.showTop&&c&&(s(o,e,e.fillTop),o.beginPath(),o.moveTo(-l,-h),o.lineTo(0,-u-h),o.lineTo(l,-h),o.lineTo(0,u-h),o.fill()),e.showLeft&&(s(o,e,e.fillLeft),o.beginPath(),c?(o.moveTo(-l,-h),o.lineTo(0,u),o.lineTo(0,u-h)):(o.moveTo(-l,0),o.lineTo(0,u),o.lineTo(0,u-h)),o.fill()),e.showRight&&(s(o,e,e.fillRight),o.beginPath(),c?(o.moveTo(l,-h),o.lineTo(0,u),o.lineTo(0,u-h)):(o.moveTo(l,0),o.lineTo(0,u),o.lineTo(0,u-h)),o.fill()),o.restore()}}},67765:(t,e,i)=>{var s=i(61286),n=i(65159);s.register("isotriangle",(function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))}))},93387:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(54946),r=i(9923),t.exports={renderWebGL:n,renderCanvas:r}},54946:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),a=s(e,i,r),h=o.calcMatrix.copyFrom(a.calc),l=e.width,u=e.height,c=l/2,d=l/e.projection,p=e.isReversed,f=i.alpha*e.alpha;if(e.isFilled){var v,g,m,y,x,T,w;if(t.pipelines.preBatch(e),e.showTop&&p){v=n.getTintAppendFloatAlpha(e.fillTop,f),g=h.getX(-c,-u),m=h.getY(-c,-u),y=h.getX(0,-d-u),x=h.getY(0,-d-u),T=h.getX(c,-u),w=h.getY(c,-u);var b=h.getX(0,d-u),E=h.getY(0,d-u);o.batchQuad(e,g,m,y,x,T,w,b,E,0,0,1,1,v,v,v,v,2)}e.showLeft&&(v=n.getTintAppendFloatAlpha(e.fillLeft,f),p?(g=h.getX(-c,-u),m=h.getY(-c,-u),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)):(g=h.getX(-c,0),m=h.getY(-c,0),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)),o.batchTri(e,g,m,y,x,T,w,0,0,1,1,v,v,v,2)),e.showRight&&(v=n.getTintAppendFloatAlpha(e.fillRight,f),p?(g=h.getX(c,-u),m=h.getY(c,-u),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)):(g=h.getX(c,0),m=h.getY(c,0),y=h.getX(0,d),x=h.getY(0,d),T=h.getX(0,d-u),w=h.getY(0,d-u)),o.batchTri(e,g,m,y,x,T,w,0,0,1,1,v,v,v,2)),t.pipelines.postBatch(e)}}},579:(t,e,i)=>{var s=i(56694),n=i(91461),r=i(88829),o=i(52660),a=new s({Extends:n,Mixins:[o],initialize:function(t,e,i,s,o,a,h,l,u){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===o&&(o=0),void 0===a&&(a=128),void 0===h&&(h=0),n.call(this,t,"Line",new r(s,o,a,h));var c=Math.max(1,this.geom.right-this.geom.left),d=Math.max(1,this.geom.bottom-this.geom.top);this.lineWidth=1,this._startWidth=1,this._endWidth=1,this.setPosition(e,i),this.setSize(c,d),void 0!==l&&this.setStrokeStyle(1,l,u),this.updateDisplayOrigin()},setLineWidth:function(t,e){return void 0===e&&(e=t),this._startWidth=t,this._endWidth=e,this.lineWidth=t,this},setTo:function(t,e,i,s){return this.geom.setTo(t,e,i,s),this}});t.exports=a},52044:(t,e,i)=>{var s=i(17876),n=i(49584);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.currentContext;if(n(t,o,e,i,r)){var a=e._displayOriginX,h=e._displayOriginY;e.isStroked&&(s(o,e),o.beginPath(),o.moveTo(e.geom.x1-a,e.geom.y1-h),o.lineTo(e.geom.x2-a,e.geom.y2-h),o.stroke()),o.restore()}}},85665:(t,e,i)=>{var s=i(61286),n=i(579);s.register("line",(function(t,e,i,s,r,o,a,h){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h))}))},52660:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(46952),r=i(52044),t.exports={renderWebGL:n,renderCanvas:r}},46952:(t,e,i)=>{var s=i(73329),n=i(75512);t.exports=function(t,e,i,r){i.addToRenderList(e);var o=t.pipelines.set(e.pipeline),a=s(e,i,r);o.calcMatrix.copyFrom(a.calc);var h=e._displayOriginX,l=e._displayOriginY,u=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isStroked){var c=o.strokeTint,d=n.getTintAppendFloatAlpha(e.strokeColor,e.strokeAlpha*u);c.TL=d,c.TR=d,c.BL=d,c.BR=d;var p=e._startWidth,f=e._endWidth;o.batchLine(e.geom.x1-h,e.geom.y1-l,e.geom.x2-h,e.geom.y2-l,p,f,1,0,!1,a.sprite,a.camera)}t.pipelines.postBatch(e)}},91249:(t,e,i)=>{var s=i(70573),n=i(56694),r=i(11117),o=i(14045),a=i(8580),h=i(91461),l=i(18974),u=new n({Extends:h,Mixins:[s],initialize:function(t,e,i,s,n,r){void 0===e&&(e=0),void 0===i&&(i=0),h.call(this,t,"Polygon",new a(s));var l=o(this.geom);this.setPosition(e,i),this.setSize(l.width,l.height),void 0!==n&&this.setFillStyle(n,r),this.updateDisplayOrigin(),this.updateData()},smooth:function(t){void 0===t&&(t=1);for(var e=0;e{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,p=u[1]-l;a.beginPath(),a.moveTo(d,p),e.closePath||(c-=2);for(var f=2;f{var s=i(61286),n=i(91249);s.register("polygon",(function(t,e,i,s,r){return this.displayList.add(new n(this.scene,t,e,i,s,r))}))},70573:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(72841),r=i(40834),t.exports={renderWebGL:n,renderCanvas:r}},72841:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=n(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(a,l,e,d,u,c),e.isStroked&&r(a,e,d,u,c),t.pipelines.postBatch(e)}},517:(t,e,i)=>{var s=i(56694),n=i(74118),r=i(91461),o=i(37673),a=new s({Extends:r,Mixins:[o],initialize:function(t,e,i,s,o,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=128),void 0===o&&(o=128),r.call(this,t,"Rectangle",new n(0,0,s,o)),this.setPosition(e,i),this.setSize(s,o),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setSize:function(t,e){this.width=t,this.height=e,this.geom.setSize(t,e),this.updateData(),this.updateDisplayOrigin();var i=this.input;return i&&!i.customHitArea&&(i.hitArea.width=t,i.hitArea.height=e),this},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),e.getLineD(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},4091:(t,e,i)=>{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY;e.isFilled&&(s(a,e),a.fillRect(-h,-l,e.width,e.height)),e.isStroked&&(n(a,e),a.beginPath(),a.rect(-h,-l,e.width,e.height),a.stroke()),a.restore()}}},94355:(t,e,i)=>{var s=i(61286),n=i(517);s.register("rectangle",(function(t,e,i,s,r,o){return this.displayList.add(new n(this.scene,t,e,i,s,r,o))}))},37673:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(43532),r=i(4091),t.exports={renderWebGL:n,renderCanvas:r}},43532:(t,e,i)=>{var s=i(73329),n=i(50262),r=i(75512);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=s(e,i,o);a.calcMatrix.copyFrom(h.calc);var l=e._displayOriginX,u=e._displayOriginY,c=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isFilled){var d=a.fillTint,p=r.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*c);d.TL=p,d.TR=p,d.BL=p,d.BR=p,a.batchFillRect(-l,-u,e.width,e.height)}e.isStroked&&n(a,e,c,l,u),t.pipelines.postBatch(e)}},77843:(t,e,i)=>{var s=i(87956),n=i(56694),r=i(11117),o=i(91461),a=new n({Extends:o,Mixins:[s],initialize:function(t,e,i,s,n,r,a,h){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=5),void 0===n&&(n=32),void 0===r&&(r=64),o.call(this,t,"Star",null),this._points=s,this._innerRadius=n,this._outerRadius=r,this.setPosition(e,i),this.setSize(2*r,2*r),void 0!==a&&this.setFillStyle(a,h),this.updateDisplayOrigin(),this.updateData()},setPoints:function(t){return this._points=t,this.updateData()},setInnerRadius:function(t){return this._innerRadius=t,this.updateData()},setOuterRadius:function(t){return this._outerRadius=t,this.updateData()},points:{get:function(){return this._points},set:function(t){this._points=t,this.updateData()}},innerRadius:{get:function(){return this._innerRadius},set:function(t){this._innerRadius=t,this.updateData()}},outerRadius:{get:function(){return this._outerRadius},set:function(t){this._outerRadius=t,this.updateData()}},updateData:function(){var t=[],e=this._points,i=this._innerRadius,s=this._outerRadius,n=Math.PI/2*3,o=Math.PI/e,a=s,h=s;t.push(a,h+-s);for(var l=0;l{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.pathData,c=u.length-1,d=u[0]-h,p=u[1]-l;a.beginPath(),a.moveTo(d,p),e.closePath||(c-=2);for(var f=2;f{var s=i(77843);i(61286).register("star",(function(t,e,i,n,r,o,a){return this.displayList.add(new s(this.scene,t,e,i,n,r,o,a))}))},87956:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(12037),r=i(11401),t.exports={renderWebGL:n,renderCanvas:r}},12037:(t,e,i)=>{var s=i(19543),n=i(73329),r=i(50262);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=n(e,i,o),l=a.calcMatrix.copyFrom(h.calc),u=e._displayOriginX,c=e._displayOriginY,d=i.alpha*e.alpha;t.pipelines.preBatch(e),e.isFilled&&s(a,l,e,d,u,c),e.isStroked&&r(a,e,d,u,c),t.pipelines.postBatch(e)}},21873:(t,e,i)=>{var s=i(56694),n=i(91461),r=i(66349),o=i(70498),a=new s({Extends:n,Mixins:[o],initialize:function(t,e,i,s,o,a,h,l,u,c,d){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===o&&(o=128),void 0===a&&(a=64),void 0===h&&(h=0),void 0===l&&(l=128),void 0===u&&(u=128),n.call(this,t,"Triangle",new r(s,o,a,h,l,u));var p=this.geom.right-this.geom.left,f=this.geom.bottom-this.geom.top;this.setPosition(e,i),this.setSize(p,f),void 0!==c&&this.setFillStyle(c,d),this.updateDisplayOrigin(),this.updateData()},setTo:function(t,e,i,s,n,r){return this.geom.setTo(t,e,i,s,n,r),this.updateData()},updateData:function(){var t=[],e=this.geom,i=this._tempLine;return e.getLineA(i),t.push(i.x1,i.y1,i.x2,i.y2),e.getLineB(i),t.push(i.x2,i.y2),e.getLineC(i),t.push(i.x2,i.y2),this.pathData=t,this}});t.exports=a},60213:(t,e,i)=>{var s=i(15608),n=i(17876),r=i(49584);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.currentContext;if(r(t,a,e,i,o)){var h=e._displayOriginX,l=e._displayOriginY,u=e.geom.x1-h,c=e.geom.y1-l,d=e.geom.x2-h,p=e.geom.y2-l,f=e.geom.x3-h,v=e.geom.y3-l;a.beginPath(),a.moveTo(u,c),a.lineTo(d,p),a.lineTo(f,v),a.closePath(),e.isFilled&&(s(a,e),a.fill()),e.isStroked&&(n(a,e),a.stroke()),a.restore()}}},79296:(t,e,i)=>{var s=i(61286),n=i(21873);s.register("triangle",(function(t,e,i,s,r,o,a,h,l,u){return this.displayList.add(new n(this.scene,t,e,i,s,r,o,a,h,l,u))}))},70498:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(72291),r=i(60213),t.exports={renderWebGL:n,renderCanvas:r}},72291:(t,e,i)=>{var s=i(73329),n=i(50262),r=i(75512);t.exports=function(t,e,i,o){i.addToRenderList(e);var a=t.pipelines.set(e.pipeline),h=s(e,i,o);a.calcMatrix.copyFrom(h.calc);var l=e._displayOriginX,u=e._displayOriginY,c=i.alpha*e.alpha;if(t.pipelines.preBatch(e),e.isFilled){var d=a.fillTint,p=r.getTintAppendFloatAlpha(e.fillColor,e.fillAlpha*c);d.TL=p,d.TR=p,d.BL=p,d.BR=p;var f=e.geom.x1-l,v=e.geom.y1-u,g=e.geom.x2-l,m=e.geom.y2-u,y=e.geom.x3-l,x=e.geom.y3-u;a.batchFillTriangle(f,v,g,m,y,x,h.sprite,h.camera)}e.isStroked&&n(a,e,c,l,u),t.pipelines.postBatch(e)}},13747:(t,e,i)=>{var s=i(16569),n=i(56694),r=i(64937),o=i(89980),a=i(20791),h=new n({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.FX,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,a],initialize:function(t,e,i,n,r){o.call(this,t,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s(this),this.setTexture(n,r),this.setPosition(e,i),this.setSizeToFrame(),this.setOriginFromFrame(),this.initPipeline()},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},preUpdate:function(t,e){this.anims.update(t,e)},play:function(t,e){return this.anims.play(t,e)},playReverse:function(t,e){return this.anims.playReverse(t,e)},playAfterDelay:function(t,e){return this.anims.playAfterDelay(t,e)},playAfterRepeat:function(t,e){return this.anims.playAfterRepeat(t,e)},chain:function(t){return this.anims.chain(t)},stop:function(){return this.anims.stop()},stopAfterDelay:function(t){return this.anims.stopAfterDelay(t)},stopAfterRepeat:function(t){return this.anims.stopAfterRepeat(t)},stopOnFrame:function(t){return this.anims.stopOnFrame(t)},toJSON:function(){return r.ToJSON(this)},preDestroy:function(){this.anims.destroy(),this.anims=void 0}});t.exports=h},27573:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},89219:(t,e,i)=>{var s=i(88933),n=i(32291),r=i(99325),o=i(20494),a=i(13747);r.register("sprite",(function(t,e){void 0===t&&(t={});var i=o(t,"key",null),r=o(t,"frame",null),h=new a(this.scene,0,0,i,r);return void 0!==e&&(t.add=e),s(this.scene,h,t),n(h,t),h}))},66135:(t,e,i)=>{var s=i(61286),n=i(13747);s.register("sprite",(function(t,e,i,s){return this.displayList.add(new n(this.scene,t,e,i,s))}))},20791:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(21034),r=i(27573),t.exports={renderWebGL:n,renderCanvas:r}},21034:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e),e.pipeline.batchSprite(e,i,s)}},32979:t=>{t.exports=function(t,e,i){var s=t.canvas,n=t.context,r=t.style,o=[],a=0,h=i.length;r.maxLines>0&&r.maxLines1&&(d+=p*(h-1)),{width:a,height:d,lines:h,lineWidths:o,lineSpacing:p,lineHeight:c}}},27030:(t,e,i)=>{var s=i(61068);t.exports=function(t){var e=s.create(this),i=e.getContext("2d",{willReadFrequently:!0});t.syncFont(e,i);var n=i.measureText(t.testString);if("actualBoundingBoxAscent"in n){var r=n.actualBoundingBoxAscent,o=n.actualBoundingBoxDescent;return s.remove(e),{ascent:r,descent:o,fontSize:r+o}}var a=Math.ceil(n.width*t.baselineX),h=a,l=2*h;h=h*t.baselineY|0,e.width=a,e.height=l,i.fillStyle="#f00",i.fillRect(0,0,a,l),i.font=t._font,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(t.testString,0,h);var u={ascent:0,descent:0,fontSize:0},c=i.getImageData(0,0,a,l);if(!c)return u.ascent=h,u.descent=h+6,u.fontSize=u.ascent+u.descent,s.remove(e),u;var d,p,f=c.data,v=f.length,g=4*a,m=0,y=!1;for(d=0;dh;d--){for(p=0;p{var s=i(99584),n=i(61068),r=i(56694),o=i(64937),a=i(89980),h=i(32979),l=i(10850),u=i(55638),c=i(80032),d=i(74744),p=new r({Extends:a,Mixins:[o.Alpha,o.BlendMode,o.ComputedSize,o.Crop,o.Depth,o.Flip,o.FX,o.GetBounds,o.Mask,o.Origin,o.Pipeline,o.ScrollFactor,o.Tint,o.Transform,o.Visible,c],initialize:function(t,e,i,s,r){void 0===e&&(e=0),void 0===i&&(i=0),a.call(this,t,"Text"),this.renderer=t.sys.renderer,this.setPosition(e,i),this.setOrigin(0,0),this.initPipeline(),this.canvas=n.create(this),this.context=this.canvas.getContext("2d"),this.style=new d(this,r),this.autoRound=!0,this.splitRegExp=/(?:\r\n|\r|\n)/,this._text=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.width=1,this.height=1,this.lineSpacing=0,this.dirty=!1,0===this.style.resolution&&(this.style.resolution=1),this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.frame.source.resolution=this.style.resolution,this.renderer&&this.renderer.gl&&(this.renderer.deleteTexture(this.frame.source.glTexture),this.frame.source.glTexture=null),this.initRTL(),this.setText(s),r&&r.padding&&this.setPadding(r.padding),r&&r.lineSpacing&&this.setLineSpacing(r.lineSpacing)},initRTL:function(){this.style.rtl&&(this.canvas.dir="rtl",this.context.direction="rtl",this.canvas.style.display="none",s(this.canvas,this.scene.sys.canvas),this.originX=1)},runWordWrap:function(t){var e=this.style;if(e.wordWrapCallback){var i=e.wordWrapCallback.call(e.wordWrapCallbackScope,t,this);return Array.isArray(i)&&(i=i.join("\n")),i}return e.wordWrapWidth?e.wordWrapUseAdvanced?this.advancedWordWrap(t,this.context,this.style.wordWrapWidth):this.basicWordWrap(t,this.context,this.style.wordWrapWidth):t},advancedWordWrap:function(t,e,i){for(var s="",n=t.replace(/ +/gi," ").split(this.splitRegExp),r=n.length,o=0;ol){if(0===c){for(var v=p;v.length&&(v=v.slice(0,-1),!((f=e.measureText(v).width)<=l)););if(!v.length)throw new Error("wordWrapWidth < a single character");var g=d.substr(v.length);u[c]=g,h+=v}var m=u[c].length?c:c+1,y=u.slice(m).join(" ").replace(/[ \n]*$/gi,"");n.splice(o+1,0,y),r=n.length;break}h+=p,l-=f}s+=h.replace(/[ \n]*$/gi,"")+"\n"}}return s=s.replace(/[\s|\n]*$/gi,"")},basicWordWrap:function(t,e,i){for(var s="",n=t.split(this.splitRegExp),r=n.length-1,o=e.measureText(" ").width,a=0;a<=r;a++){for(var h=i,l=n[a].split(" "),u=l.length-1,c=0;c<=u;c++){var d=l[c],p=e.measureText(d).width,f=p;ch&&c>0&&(s+="\n",h=i),s+=d,c0&&(d+=l.lineSpacing*v),i.rtl)c=p-c-u.left-u.right;else if("right"===i.align)c+=o-l.lineWidths[v];else if("center"===i.align)c+=(o-l.lineWidths[v])/2;else if("justify"===i.align){if(l.lineWidths[v]/l.width>=.85){var g=l.width-l.lineWidths[v],m=e.measureText(" ").width,y=a[v].trim(),x=y.split(" ");g+=(a[v].length-y.length)*m;for(var T=Math.floor(g/m),w=0;T>0;)x[w]+=" ",w=(w+1)%(x.length-1||1),--T;a[v]=x.join(" ")}}this.autoRound&&(c=Math.round(c),d=Math.round(d)),i.strokeThickness&&(i.syncShadow(e,i.shadowStroke),e.strokeText(a[v],c,d)),i.color&&(i.syncShadow(e,i.shadowFill),e.fillText(a[v],c,d))}e.restore(),this.renderer&&this.renderer.gl&&(this.frame.source.glTexture=this.renderer.canvasToTexture(t,this.frame.source.glTexture,!0),this.frame.glTexture=this.frame.source.glTexture),this.dirty=!0;var b=this.input;return b&&!b.customHitArea&&(b.hitArea.width=this.width,b.hitArea.height=this.height),this},getTextMetrics:function(){return this.style.getTextMetrics()},text:{get:function(){return this._text},set:function(t){this.setText(t)}},toJSON:function(){var t=o.ToJSON(this),e={autoRound:this.autoRound,text:this._text,style:this.style.toJSON(),padding:{left:this.padding.left,right:this.padding.right,top:this.padding.top,bottom:this.padding.bottom}};return t.data=e,t},preDestroy:function(){this.style.rtl&&u(this.canvas),n.remove(this.canvas),this.texture.destroy()}});t.exports=p},71649:t=>{t.exports=function(t,e,i,s){0!==e.width&&0!==e.height&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,s))}},75397:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(76555);n.register("text",(function(t,e){void 0===t&&(t={});var i=r(t,"text",""),n=r(t,"style",null),a=r(t,"padding",null);null!==a&&(n.padding=a);var h=new o(this.scene,0,0,i,n);return void 0!==e&&(t.add=e),s(this.scene,h,t),h.autoRound=r(t,"autoRound",!0),h.resolution=r(t,"resolution",1),h}))},94627:(t,e,i)=>{var s=i(76555);i(61286).register("text",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},80032:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(76128),r=i(71649),t.exports={renderWebGL:n,renderCanvas:r}},74744:(t,e,i)=>{var s=i(56694),n=i(20494),r=i(10850),o=i(27030),a={fontFamily:["fontFamily","Courier"],fontSize:["fontSize","16px"],fontStyle:["fontStyle",""],backgroundColor:["backgroundColor",null],color:["color","#fff"],stroke:["stroke","#fff"],strokeThickness:["strokeThickness",0],shadowOffsetX:["shadow.offsetX",0],shadowOffsetY:["shadow.offsetY",0],shadowColor:["shadow.color","#000"],shadowBlur:["shadow.blur",0],shadowStroke:["shadow.stroke",!1],shadowFill:["shadow.fill",!1],align:["align","left"],maxLines:["maxLines",0],fixedWidth:["fixedWidth",0],fixedHeight:["fixedHeight",0],resolution:["resolution",0],rtl:["rtl",!1],testString:["testString","|MÉqgy"],baselineX:["baselineX",1.2],baselineY:["baselineY",1.4],wordWrapWidth:["wordWrap.width",null],wordWrapCallback:["wordWrap.callback",null],wordWrapCallbackScope:["wordWrap.callbackScope",null],wordWrapUseAdvanced:["wordWrap.useAdvancedWrap",!1]},h=new s({initialize:function(t,e){this.parent=t,this.fontFamily,this.fontSize,this.fontStyle,this.backgroundColor,this.color,this.stroke,this.strokeThickness,this.shadowOffsetX,this.shadowOffsetY,this.shadowColor,this.shadowBlur,this.shadowStroke,this.shadowFill,this.align,this.maxLines,this.fixedWidth,this.fixedHeight,this.resolution,this.rtl,this.testString,this.baselineX,this.baselineY,this.wordWrapWidth,this.wordWrapCallback,this.wordWrapCallbackScope,this.wordWrapUseAdvanced,this._font,this.setStyle(e,!1,!0)},setStyle:function(t,e,i){for(var s in void 0===e&&(e=!0),void 0===i&&(i=!1),t&&t.hasOwnProperty("fontSize")&&"number"==typeof t.fontSize&&(t.fontSize=t.fontSize.toString()+"px"),a){var h=i?a[s][1]:this[s];this[s]="wordWrapCallback"===s||"wordWrapCallbackScope"===s?r(t,a[s][0],h):n(t,a[s][0],h)}var l=r(t,"font",null);null!==l&&this.setFont(l,!1),this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim();var u=r(t,"fill",null);null!==u&&(this.color=u);var c=r(t,"metrics",!1);return c?this.metrics={ascent:r(c,"ascent",0),descent:r(c,"descent",0),fontSize:r(c,"fontSize",0)}:!e&&this.metrics||(this.metrics=o(this)),e?this.parent.updateText():this.parent},syncFont:function(t,e){e.font=this._font},syncStyle:function(t,e){e.textBaseline="alphabetic",e.fillStyle=this.color,e.strokeStyle=this.stroke,e.lineWidth=this.strokeThickness,e.lineCap="round",e.lineJoin="round"},syncShadow: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)},update:function(t){return t&&(this._font=[this.fontStyle,this.fontSize,this.fontFamily].join(" ").trim(),this.metrics=o(this)),this.parent.updateText()},setFont:function(t,e){void 0===e&&(e=!0);var i=t,s="",n="";if("string"!=typeof t)i=r(t,"fontFamily","Courier"),s=r(t,"fontSize","16px"),n=r(t,"fontStyle","");else{var o=t.split(" "),a=0;n=o.length>2?o[a++]:"",s=o[a++]||"16px",i=o[a++]||"Courier"}return i===this.fontFamily&&s===this.fontSize&&n===this.fontStyle||(this.fontFamily=i,this.fontSize=s,this.fontStyle=n,e&&this.update(!0)),this.parent},setFontFamily:function(t){return this.fontFamily!==t&&(this.fontFamily=t,this.update(!0)),this.parent},setFontStyle:function(t){return this.fontStyle!==t&&(this.fontStyle=t,this.update(!0)),this.parent},setFontSize:function(t){return"number"==typeof t&&(t=t.toString()+"px"),this.fontSize!==t&&(this.fontSize=t,this.update(!0)),this.parent},setTestString:function(t){return this.testString=t,this.update(!0)},setFixedSize:function(t,e){return this.fixedWidth=t,this.fixedHeight=e,t&&(this.parent.width=t),e&&(this.parent.height=e),this.update(!1)},setBackgroundColor:function(t){return this.backgroundColor=t,this.update(!1)},setFill:function(t){return this.color=t,this.update(!1)},setColor:function(t){return this.color=t,this.update(!1)},setResolution:function(t){return this.resolution=t,this.update(!1)},setStroke:function(t,e){return void 0===e&&(e=this.strokeThickness),void 0===t&&0!==this.strokeThickness?(this.strokeThickness=0,this.update(!0)):this.stroke===t&&this.strokeThickness===e||(this.stroke=t,this.strokeThickness=e,this.update(!0)),this.parent},setShadow:function(t,e,i,s,n,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i="#000"),void 0===s&&(s=0),void 0===n&&(n=!1),void 0===r&&(r=!0),this.shadowOffsetX=t,this.shadowOffsetY=e,this.shadowColor=i,this.shadowBlur=s,this.shadowStroke=n,this.shadowFill=r,this.update(!1)},setShadowOffset:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.shadowOffsetX=t,this.shadowOffsetY=e,this.update(!1)},setShadowColor:function(t){return void 0===t&&(t="#000"),this.shadowColor=t,this.update(!1)},setShadowBlur:function(t){return void 0===t&&(t=0),this.shadowBlur=t,this.update(!1)},setShadowStroke:function(t){return this.shadowStroke=t,this.update(!1)},setShadowFill:function(t){return this.shadowFill=t,this.update(!1)},setWordWrapWidth:function(t,e){return void 0===e&&(e=!1),this.wordWrapWidth=t,this.wordWrapUseAdvanced=e,this.update(!1)},setWordWrapCallback:function(t,e){return void 0===e&&(e=null),this.wordWrapCallback=t,this.wordWrapCallbackScope=e,this.update(!1)},setAlign:function(t){return void 0===t&&(t="left"),this.align=t,this.update(!1)},setMaxLines:function(t){return void 0===t&&(t=0),this.maxLines=t,this.update(!1)},getTextMetrics:function(){var t=this.metrics;return{ascent:t.ascent,descent:t.descent,fontSize:t.fontSize}},toJSON:function(){var t={};for(var e in a)t[e]=this[e];return t.metrics=this.getTextMetrics(),t},destroy:function(){this.parent=void 0}});t.exports=h},76128:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n){if(0!==e.width&&0!==e.height){i.addToRenderList(e);var r=e.frame,o=r.width,a=r.height,h=s.getTintAppendFloatAlpha,l=t.pipelines.set(e.pipeline,e),u=l.setTexture2D(r.glTexture,e);l.batchTexture(e,r.glTexture,o,a,e.x,e.y,o/e.style.resolution,a/e.style.resolution,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.displayOriginX,e.displayOriginY,0,0,o,a,h(e.tintTopLeft,i.alpha*e._alphaTL),h(e.tintTopRight,i.alpha*e._alphaTR),h(e.tintBottomLeft,i.alpha*e._alphaBL),h(e.tintBottomRight,i.alpha*e._alphaBR),e.tintFill,0,0,i,n,!1,u)}}},35856:(t,e,i)=>{var s=i(61068),n=i(56694),r=i(64937),o=i(89980),a=i(3504),h=i(8213),l=i(9271),u=i(93736),c=new n({Extends:o,Mixins:[r.Alpha,r.BlendMode,r.ComputedSize,r.Crop,r.Depth,r.Flip,r.FX,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Tint,r.Transform,r.Visible,l],initialize:function(t,e,i,n,r,h,l){var c=t.sys.renderer;o.call(this,t,"TileSprite");var d=t.sys.textures.get(h),p=d.get(l);p.source.compressionAlgorithm&&(console.warn("TileSprite cannot use compressed textures"),p=(d=t.sys.textures.get("__MISSING")).get()),n&&r?(n=Math.floor(n),r=Math.floor(r)):(n=p.width,r=p.height),this._tilePosition=new u,this._tileScale=new u(1,1),this.dirty=!1,this.renderer=c,this.canvas=s.create(this,n,r),this.context=this.canvas.getContext("2d"),this.displayTexture=d,this.displayFrame=p,this._crop=this.resetCropObject(),this.texture=t.sys.textures.addCanvas(null,this.canvas,!0),this.frame=this.texture.get(),this.potWidth=a(p.width),this.potHeight=a(p.height),this.fillCanvas=s.create2D(this,this.potWidth,this.potHeight),this.fillContext=this.fillCanvas.getContext("2d"),this.fillPattern=null,this.setPosition(e,i),this.setSize(n,r),this.setFrame(l),this.setOriginFromFrame(),this.initPipeline()},setTexture:function(t,e){return this.displayTexture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t){var e=this.displayTexture.get(t);return this.potWidth=a(e.width),this.potHeight=a(e.height),this.canvas.width=0,e.cutWidth&&e.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this.displayFrame=e,this.dirty=!0,this.updateTileTexture(),this},setTilePosition:function(t,e){return void 0!==t&&(this.tilePositionX=t),void 0!==e&&(this.tilePositionY=e),this},setTileScale:function(t,e){return void 0===t&&(t=this.tileScaleX),void 0===e&&(e=t),this.tileScaleX=t,this.tileScaleY=e,this},updateTileTexture:function(){if(this.dirty&&this.renderer){var t=this.displayFrame;if(t.source.isRenderTexture||t.source.isGLTexture)return console.warn("TileSprites can only use Image or Canvas based textures"),void(this.dirty=!1);var e=this.fillContext,i=this.fillCanvas,s=this.potWidth,n=this.potHeight;this.renderer&&this.renderer.gl||(s=t.cutWidth,n=t.cutHeight),e.clearRect(0,0,s,n),i.width=s,i.height=n,e.drawImage(t.source.image,t.cutX,t.cutY,t.cutWidth,t.cutHeight,0,0,s,n),this.renderer&&this.renderer.gl?this.fillPattern=this.renderer.canvasToTexture(i,this.fillPattern):this.fillPattern=e.createPattern(i,"repeat"),this.updateCanvas(),this.dirty=!1}},updateCanvas:function(){var t=this.canvas;if(t.width===this.width&&t.height===this.height||(t.width=this.width,t.height=this.height,this.frame.setSize(this.width,this.height),this.updateDisplayOrigin(),this.dirty=!0),!this.dirty||this.renderer&&this.renderer.gl)this.dirty=!1;else{var e=this.context;this.scene.sys.game.config.antialias||h.disable(e);var i=this._tileScale.x,s=this._tileScale.y,n=this._tilePosition.x,r=this._tilePosition.y;e.clearRect(0,0,this.width,this.height),e.save(),e.scale(i,s),e.translate(-n,-r),e.fillStyle=this.fillPattern,e.fillRect(n,r,this.width/i,this.height/s),e.restore(),this.dirty=!1}},preDestroy:function(){this.renderer&&this.renderer.gl&&this.renderer.deleteTexture(this.fillPattern),s.remove(this.canvas),s.remove(this.fillCanvas),this.fillPattern=null,this.fillContext=null,this.fillCanvas=null,this.displayTexture=null,this.displayFrame=null,this.texture.destroy(),this.renderer=null},tilePositionX:{get:function(){return this._tilePosition.x},set:function(t){this._tilePosition.x=t,this.dirty=!0}},tilePositionY:{get:function(){return this._tilePosition.y},set:function(t){this._tilePosition.y=t,this.dirty=!0}},tileScaleX:{get:function(){return this._tileScale.x},set:function(t){this._tileScale.x=t,this.dirty=!0}},tileScaleY:{get:function(){return this._tileScale.y},set:function(t){this._tileScale.y=t,this.dirty=!0}}});t.exports=c},93305:t=>{t.exports=function(t,e,i,s){e.updateCanvas(),i.addToRenderList(e),t.batchSprite(e,e.frame,i,s)}},63950:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(35856);n.register("tileSprite",(function(t,e){void 0===t&&(t={});var i=r(t,"x",0),n=r(t,"y",0),a=r(t,"width",512),h=r(t,"height",512),l=r(t,"key",""),u=r(t,"frame",""),c=new o(this.scene,i,n,a,h,l,u);return void 0!==e&&(t.add=e),s(this.scene,c,t),c}))},20509:(t,e,i)=>{var s=i(35856);i(61286).register("tileSprite",(function(t,e,i,n,r,o){return this.displayList.add(new s(this.scene,t,e,i,n,r,o))}))},9271:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(74287),r=i(93305),t.exports={renderWebGL:n,renderCanvas:r}},74287:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i,n){e.updateCanvas();var r=e.width,o=e.height;if(0!==r&&0!==o){i.addToRenderList(e);var a=s.getTintAppendFloatAlpha,h=t.pipelines.set(e.pipeline,e),l=h.setTexture2D(e.fillPattern,e);h.batchTexture(e,e.fillPattern,e.displayFrame.width*e.tileScaleX,e.displayFrame.height*e.tileScaleY,e.x,e.y,r,o,e.scaleX,e.scaleY,e.rotation,e.flipX,e.flipY,e.scrollFactorX,e.scrollFactorY,e.originX*r,e.originY*o,0,0,r,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,e.tilePositionX%e.displayFrame.width/e.displayFrame.width,e.tilePositionY%e.displayFrame.height/e.displayFrame.height,i,n,!1,l)}}},8630:(t,e,i)=>{var s=i(56694),n=i(82897),r=i(64937),o=i(56631),a=i(97081),h=i(33963),l=i(89980),u=i(76038),c=i(76583),d=i(77974),p=i(83392),f=new s({Extends:l,Mixins:[r.Alpha,r.BlendMode,r.Depth,r.Flip,r.FX,r.GetBounds,r.Mask,r.Origin,r.Pipeline,r.ScrollFactor,r.Size,r.TextureCrop,r.Tint,r.Transform,r.Visible,d],initialize:function(t,e,i,s){l.call(this,t,"Video"),this.video=null,this.videoTexture=null,this.videoTextureSource=null,this.snapshotTexture=null,this.flipY=!1,this._key=c(),this.touchLocked=!0,this.playWhenUnlocked=!1,this.retryLimit=20,this.retry=0,this.retryInterval=500,this._retryID=null,this._systemMuted=!1,this._codeMuted=!1,this._systemPaused=!1,this._codePaused=!1,this._callbacks={play:this.playHandler.bind(this),load:this.loadHandler.bind(this),error:this.loadErrorHandler.bind(this),end:this.completeHandler.bind(this),time:this.timeUpdateHandler.bind(this),seeking:this.seekingHandler.bind(this),seeked:this.seekedHandler.bind(this)},this._crop=this.resetCropObject(),this.markers={},this._markerIn=-1,this._markerOut=p.MAX_SAFE_INTEGER,this._lastUpdate=0,this._cacheKey="",this._isSeeking=!1,this.removeVideoElementOnDestroy=!1,this.setPosition(e,i),this.setSize(256,256),this.initPipeline(),s&&this.changeSource(s,!1);var n=t.sys.game.events;n.on(a.PAUSE,this.globalPause,this),n.on(a.RESUME,this.globalResume,this);var r=t.sys.sound;r&&r.on(u.GLOBAL_MUTE,this.globalMute,this)},addedToScene:function(){this.scene.sys.updateList.add(this)},removedFromScene:function(){this.scene.sys.updateList.remove(this)},play:function(t,e,i){if(this.touchLocked&&this.playWhenUnlocked||this.isPlaying())return this;var s=this.video;if(!s)return console.warn("Video not loaded"),this;void 0===t&&(t=s.loop);var n=this.scene.sys.sound;return n&&n.mute&&this.setMute(!0),isNaN(e)||(this._markerIn=e),!isNaN(i)&&i>e&&(this._markerOut=i),s.loop=t,this.createPlayPromise()},createPlayPromise:function(){var t=this.video,e=this._callbacks;this.isPlaying();var i=t.play();return void 0!==i?i.then(this.playPromiseSuccessHandler.bind(this)).catch(this.playPromiseErrorHandler.bind(this)):(t.addEventListener("playing",e.play),t.readyState<2&&(this.retry=this.retryLimit,this._retryID&&window.clearTimeout(this._retryID),this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval))),t.addEventListener("error",e.error),t.addEventListener("abort",e.error),t.addEventListener("stalled",e.error),t.addEventListener("suspend",e.error),t.addEventListener("waiting",e.error),t.addEventListener("ended",e.end),t.addEventListener("timeupdate",e.time),t.addEventListener("seeking",e.seeking),t.addEventListener("seeked",e.seeked),t.addEventListener("play",this.playHandler2.bind(this)),t.addEventListener("pause",this.pauseHandler.bind(this)),this},playHandler2:function(t){console.log("play",this._cacheKey)},pauseHandler:function(t){console.log("paused",this._cacheKey)},changeSource:function(t,e,i,s,n){void 0===e&&(e=!0),this.video&&this.stop();var r=this.scene.sys.cache.video.get(t);return r?(this.video=r,this._cacheKey=t,this._codePaused=r.paused,this._codeMuted=r.muted,this.videoTexture?(this.scene.sys.textures.remove(this._key),this.videoTexture=this.scene.sys.textures.create(this._key,r,r.videoWidth,r.videoHeight),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,r.videoWidth,r.videoHeight),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,r.videoWidth,r.videoHeight)):this.updateTexture(),r.currentTime=0,this._lastUpdate=0,e&&this.play(i,s,n)):this.video=null,this},addMarker:function(t,e,i){return!isNaN(e)&&e>=0&&!isNaN(i)&&(this.markers[t]=[e,i]),this},playMarker:function(t,e){var i=this.markers[t];return i&&this.play(e,i[0],i[1]),this},removeMarker:function(t){return delete this.markers[t],this},snapshot:function(t,e){return void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.snapshotArea(0,0,this.width,this.height,t,e)},snapshotArea:function(t,e,i,s,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===s&&(s=this.height),void 0===n&&(n=i),void 0===r&&(r=s);var o=this.video,a=this.snapshotTexture;return a?(a.setSize(n,r),o&&a.context.drawImage(o,t,e,i,s,0,0,n,r)):(a=this.scene.sys.textures.createCanvas(c(),n,r),this.snapshotTexture=a,o&&a.context.drawImage(o,t,e,i,s,0,0,n,r)),a.update()},saveSnapshotTexture:function(t){return this.snapshotTexture?this.scene.sys.textures.renameTexture(this.snapshotTexture.key,t):this.snapshotTexture=this.scene.sys.textures.createCanvas(t,this.width,this.height),this.snapshotTexture},loadURL:function(t,e,i,s){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var n=document.createElement("video");return n.controls=!1,i&&(n.muted=!0,n.defaultMuted=!0,n.setAttribute("autoplay","autoplay")),n.setAttribute("playsinline","playsinline"),n.setAttribute("preload","auto"),void 0!==s&&n.setAttribute("crossorigin",s),n.addEventListener("error",this._callbacks.error),n.addEventListener(e,this._callbacks.load),n.src=t,n.load(),this.video=n,this},loadMediaStream:function(t,e,i){void 0===e&&(e="loadeddata"),void 0===i&&(i=!1),this.video&&this.stop(),this.videoTexture&&this.scene.sys.textures.remove(this._key);var s=document.createElement("video");s.controls=!1,i&&(s.muted=!0,s.defaultMuted=!0,s.setAttribute("autoplay","autoplay")),s.setAttribute("playsinline","playsinline"),s.setAttribute("preload","auto"),s.addEventListener("error",this._callbacks.error,!0),s.addEventListener(e,this._callbacks.load,!0);try{s.srcObject=t}catch(e){s.src=window.URL.createObjectURL(t)}return s.load(),this.video=s,this},playPromiseSuccessHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn)},playPromiseErrorHandler:function(t){console.log("pp error handler",t),this.scene.sys.input.once(h.POINTER_DOWN,this.unlockHandler,this),this.touchLocked=!0,this.playWhenUnlocked=!0,this.emit(o.VIDEO_ERROR,this,t)},playHandler:function(){this._codePaused=!1,this.touchLocked=!1,this.emit(o.VIDEO_PLAY,this),this.video.removeEventListener("playing",this._callbacks.play,!0)},loadHandler:function(){this.updateTexture()},loadErrorHandler:function(t){this.stop(),this.emit(o.VIDEO_ERROR,this,t)},unlockHandler:function(){this.touchLocked=!1,this.playWhenUnlocked=!1,this.emit(o.VIDEO_UNLOCKED,this),this._markerIn>-1&&(this.video.currentTime=this._markerIn),this.createPlayPromise()},completeHandler:function(){console.log("ended"),this.emit(o.VIDEO_COMPLETE,this)},timeUpdateHandler:function(){this.video&&this.video.currentTime=this._markerOut&&(t.loop?(t.currentTime=this._markerIn,this.updateTexture(),this._lastUpdate=e,this.emit(o.VIDEO_LOOP,this)):(this.emit(o.VIDEO_COMPLETE,this),console.log("prEUp stop"),this.stop())))}},checkVideoProgress:function(){this.video.readyState>=2?this.updateTexture():(this.retry--,this.retry>0?this._retryID=window.setTimeout(this.checkVideoProgress.bind(this),this.retryInterval):this.emit(o.VIDEO_TIMEOUT,this))},updateTexture:function(){var t=this.video,e=t.videoWidth,i=t.videoHeight;if(this.videoTexture){var s=this.videoTextureSource;s.source!==t&&(s.source=t,s.width=e,s.height=i),s.update()}else this.videoTexture=this.scene.sys.textures.create(this._key,t,e,i),this.videoTextureSource=this.videoTexture.source[0],this.videoTexture.add("__BASE",0,0,0,e,i),this.setTexture(this.videoTexture),this.setSizeToFrame(),this.updateDisplayOrigin(),this.emit(o.VIDEO_CREATED,this,e,i)},getVideoKey:function(){return this._cacheKey},seekTo:function(t){var e=this.video;if(e){var i=e.duration;if(i!==1/0&&!isNaN(i)){var s=i*t;this.setCurrentTime(s)}}return this},getCurrentTime:function(){return this.video?this.video.currentTime:0},setCurrentTime:function(t){var e=this.video;if(e){if("string"==typeof t){var i=t[0],s=parseFloat(t.substr(1));"+"===i?t=e.currentTime+s:"-"===i&&(t=e.currentTime-s)}e.currentTime=t,this._lastUpdate=t}return this},isSeeking:function(){return this._isSeeking},seekingHandler:function(){this._isSeeking=!0,this.emit(o.VIDEO_SEEKING,this)},seekedHandler:function(){this._isSeeking=!1,this.emit(o.VIDEO_SEEKED,this),this.video&&this.updateTexture()},getProgress:function(){var t=this.video;if(t){var e=t.currentTime,i=t.duration;if(i!==1/0&&!isNaN(i))return e/i}return 0},getDuration:function(){return this.video?this.video.duration:0},setMute:function(t){void 0===t&&(t=!0),this._codeMuted=t;var e=this.video;return e&&(e.muted=!!this._systemMuted||t),this},isMuted:function(){return this._codeMuted},globalMute:function(t,e){this._systemMuted=e;var i=this.video;i&&(i.muted=!!this._codeMuted||e)},globalPause:function(){this._systemPaused=!0,this.video&&this.video.pause()},globalResume:function(){this._systemPaused=!1,this.video&&!this._codePaused&&this.createPlayPromise()},setPaused:function(t){void 0===t&&(t=!0);var e=this.video;return this._codePaused=t,e&&(t?e.paused||e.pause():t||e.paused&&!this._systemPaused&&this.createPlayPromise()),this},getVolume:function(){return this.video?this.video.volume:1},setVolume:function(t){return void 0===t&&(t=1),this.video&&(this.video.volume=n(t,0,1)),this},getPlaybackRate:function(){return this.video?this.video.playbackRate:1},setPlaybackRate:function(t){return this.video&&(this.video.playbackRate=t),this},getLoop:function(){return!!this.video&&this.video.loop},setLoop:function(t){return void 0===t&&(t=!0),this.video&&(this.video.loop=t),this},isPlaying:function(){return!!this.video&&!(this.video.paused||this.video.ended)},isPaused:function(){return this.video&&this.video.paused||this._codePaused||this._systemPaused},saveTexture:function(t,e){return void 0===e&&(e=!1),this.videoTexture&&this.scene.sys.textures.renameTexture(this._key,t),this._key=t,this.flipY=e,this.videoTextureSource&&this.videoTextureSource.setFlipY(e),this.videoTexture},stop:function(){var t=this.video;if(t){var e=this._callbacks;for(var i in e)t.removeEventListener(i,e[i]);t.pause()}return this._retryID&&window.clearTimeout(this._retryID),this.emit(o.VIDEO_STOP,this),this},removeVideoElement:function(){var t=this.video;if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("autoplay"),t.removeAttribute("src"),this.video=null}},preDestroy:function(){this.stop(),this.removeVideoElementOnDestroy&&this.removeVideoElement();var t=this.scene.sys.game.events;t.off(a.PAUSE,this.globalPause,this),t.off(a.RESUME,this.globalResume,this);var e=this.scene.sys.sound;e&&e.off(u.GLOBAL_MUTE,this.globalMute,this),this._retryID&&window.clearTimeout(this._retryID)}});t.exports=f},56933:t=>{t.exports=function(t,e,i,s){e.videoTexture&&(i.addToRenderList(e),t.batchSprite(e,e.frame,i,s))}},65601:(t,e,i)=>{var s=i(88933),n=i(99325),r=i(20494),o=i(8630);n.register("video",(function(t,e){void 0===t&&(t={});var i=r(t,"key",null),n=new o(this.scene,0,0,i);return void 0!==e&&(t.add=e),s(this.scene,n,t),n}))},215:(t,e,i)=>{var s=i(8630);i(61286).register("video",(function(t,e,i){return this.displayList.add(new s(this.scene,t,e,i))}))},77974:(t,e,i)=>{var s=i(72283),n=s,r=s;n=i(83572),r=i(56933),t.exports={renderWebGL:n,renderCanvas:r}},83572:t=>{t.exports=function(t,e,i,s){e.videoTexture&&(i.addToRenderList(e),e.pipeline.batchSprite(e,i,s))}},71030:(t,e,i)=>{var s=i(95723),n=i(26673),r=i(65650),o=i(56694),a=i(64937),h=i(89980),l=i(74118),u=i(94287),c=new o({Extends:h,Mixins:[a.Depth,a.GetBounds,a.Origin,a.Transform,a.ScrollFactor,a.Visible],initialize:function(t,e,i,n,r){void 0===n&&(n=1),void 0===r&&(r=n),h.call(this,t,"Zone"),this.setPosition(e,i),this.width=n,this.height=r,this.blendMode=s.NORMAL,this.updateDisplayOrigin()},displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e,i){void 0===i&&(i=!0),this.width=t,this.height=e,this.updateDisplayOrigin();var s=this.input;return i&&s&&!s.customHitArea&&(s.hitArea.width=t,s.hitArea.height=e),this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this},setCircleDropZone:function(t){return this.setDropZone(new n(0,0,t),r)},setRectangleDropZone:function(t,e){return this.setDropZone(new l(0,0,t,e),u)},setDropZone:function(t,e){return this.input||this.setInteractive(t,e,!0),this},setAlpha:function(){},setBlendMode:function(){},renderCanvas:function(t,e,i){i.addToRenderList(e)},renderWebGL:function(t,e,i){i.addToRenderList(e)}});t.exports=c},24067:(t,e,i)=>{var s=i(99325),n=i(20494),r=i(71030);s.register("zone",(function(t){var e=n(t,"x",0),i=n(t,"y",0),s=n(t,"width",1),o=n(t,"height",s);return new r(this.scene,e,i,s,o)}))},34546:(t,e,i)=>{var s=i(71030);i(61286).register("zone",(function(t,e,i,n){return this.displayList.add(new s(this.scene,t,e,i,n))}))},95847:t=>{t.exports=function(t){return t.radius>0?Math.PI*t.radius*t.radius:0}},26673:(t,e,i)=>{var s=i(56694),n=i(65650),r=i(94026),o=i(62941),a=i(52394),h=i(30977),l=new s({initialize:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.type=a.CIRCLE,this.x=t,this.y=e,this._radius=i,this._diameter=2*i},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i){return this.x=t,this.y=e,this._radius=i,this._diameter=2*i,this},setEmpty:function(){return this._radius=0,this._diameter=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},isEmpty:function(){return this._radius<=0},radius:{get:function(){return this._radius},set:function(t){this._radius=t,this._diameter=2*t}},diameter:{get:function(){return this._diameter},set:function(t){this._diameter=t,this._radius=.5*t}},left:{get:function(){return this.x-this._radius},set:function(t){this.x=t+this._radius}},right:{get:function(){return this.x+this._radius},set:function(t){this.x=t-this._radius}},top:{get:function(){return this.y-this._radius},set:function(t){this.y=t+this._radius}},bottom:{get:function(){return this.y+this._radius},set:function(t){this.y=t-this._radius}}});t.exports=l},37964:t=>{t.exports=function(t){return Math.PI*t.radius*2}},72233:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x+t.radius*Math.cos(e),i.y=t.y+t.radius*Math.sin(e),i}},61761:(t,e,i)=>{var s=i(26673);t.exports=function(t){return new s(t.x,t.y,t.radius)}},65650:t=>{t.exports=function(t,e,i){return t.radius>0&&e>=t.left&&e<=t.right&&i>=t.top&&i<=t.bottom&&(t.x-e)*(t.x-e)+(t.y-i)*(t.y-i)<=t.radius*t.radius}},39187:(t,e,i)=>{var s=i(65650);t.exports=function(t,e){return s(t,e.x,e.y)}},58672:(t,e,i)=>{var s=i(65650);t.exports=function(t,e){return s(t,e.x,e.y)&&s(t,e.right,e.y)&&s(t,e.x,e.bottom)&&s(t,e.right,e.bottom)}},42997:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y,t.radius)}},94894:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.radius===e.radius}},48027:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.left,e.y=t.top,e.width=t.diameter,e.height=t.diameter,e}},94026:(t,e,i)=>{var s=i(72233),n=i(91806),r=i(83392),o=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=n(e,0,r.PI2);return s(t,a,i)}},62941:(t,e,i)=>{var s=i(37964),n=i(72233),r=i(91806),o=i(83392);t.exports=function(t,e,i,a){void 0===a&&(a=[]),!e&&i>0&&(e=s(t)/i);for(var h=0;h{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},88665:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},30977:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=2*Math.PI*Math.random(),n=Math.random()+Math.random(),r=n>1?2-n:n,o=r*Math.cos(i),a=r*Math.sin(i);return e.x=t.x+o*t.radius,e.y=t.y+a*t.radius,e}},6112:(t,e,i)=>{var s=i(26673);s.Area=i(95847),s.Circumference=i(37964),s.CircumferencePoint=i(72233),s.Clone=i(61761),s.Contains=i(65650),s.ContainsPoint=i(39187),s.ContainsRect=i(58672),s.CopyFrom=i(42997),s.Equals=i(94894),s.GetBounds=i(48027),s.GetPoint=i(94026),s.GetPoints=i(62941),s.Offset=i(34585),s.OffsetPoint=i(88665),s.Random=i(30977),t.exports=s},52394:t=>{t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},58605:t=>{t.exports=function(t){return t.isEmpty()?0:t.getMajorRadius()*t.getMinorRadius()*Math.PI}},39507:t=>{t.exports=function(t){var e=t.width/2,i=t.height/2,s=Math.pow(e-i,2)/Math.pow(e+i,2);return Math.PI*(e+i)*(1+3*s/(10+Math.sqrt(4-3*s)))}},86998:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.width/2,r=t.height/2;return i.x=t.x+n*Math.cos(e),i.y=t.y+r*Math.sin(e),i}},81773:(t,e,i)=>{var s=i(95669);t.exports=function(t){return new s(t.x,t.y,t.width,t.height)}},72313:t=>{t.exports=function(t,e,i){if(t.width<=0||t.height<=0)return!1;var s=(e-t.x)/t.width,n=(i-t.y)/t.height;return(s*=s)+(n*=n)<.25}},34368:(t,e,i)=>{var s=i(72313);t.exports=function(t,e){return s(t,e.x,e.y)}},71431:(t,e,i)=>{var s=i(72313);t.exports=function(t,e){return s(t,e.x,e.y)&&s(t,e.right,e.y)&&s(t,e.x,e.bottom)&&s(t,e.right,e.bottom)}},75459:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},95669:(t,e,i)=>{var s=i(56694),n=i(72313),r=i(95340),o=i(54978),a=i(52394),h=i(72006),l=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=a.ELLIPSE,this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return h(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.width=0,this.height=0,this},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getMinorRadius:function(){return Math.min(this.width,this.height)/2},getMajorRadius:function(){return Math.max(this.width,this.height)/2},left:{get:function(){return this.x-this.width/2},set:function(t){this.x=t+this.width/2}},right:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},top:{get:function(){return this.y-this.height/2},set:function(t){this.y=t+this.height/2}},bottom:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=l},98068:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},72897:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.left,e.y=t.top,e.width=t.width,e.height=t.height,e}},95340:(t,e,i)=>{var s=i(86998),n=i(91806),r=i(83392),o=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new o);var a=n(e,0,r.PI2);return s(t,a,i)}},54978:(t,e,i)=>{var s=i(39507),n=i(86998),r=i(91806),o=i(83392);t.exports=function(t,e,i,a){void 0===a&&(a=[]),!e&&i>0&&(e=s(t)/i);for(var h=0;h{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},36233:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},72006:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random()*Math.PI*2,n=Math.sqrt(Math.random());return e.x=t.x+n*Math.cos(i)*t.width/2,e.y=t.y+n*Math.sin(i)*t.height/2,e}},40652:(t,e,i)=>{var s=i(95669);s.Area=i(58605),s.Circumference=i(39507),s.CircumferencePoint=i(86998),s.Clone=i(81773),s.Contains=i(72313),s.ContainsPoint=i(34368),s.ContainsRect=i(71431),s.CopyFrom=i(75459),s.Equals=i(98068),s.GetBounds=i(72897),s.GetPoint=i(95340),s.GetPoints=i(54978),s.Offset=i(77951),s.OffsetPoint=i(36233),s.Random=i(72006),t.exports=s},84068:(t,e,i)=>{var s=i(52394),n=i(98611),r={Circle:i(6112),Ellipse:i(40652),Intersects:i(7563),Line:i(28482),Mesh:i(14293),Point:i(63472),Polygon:i(44359),Rectangle:i(66658),Triangle:i(87619)};r=n(!1,r,s),t.exports=r},22184:(t,e,i)=>{var s=i(53996);t.exports=function(t,e){return s(t.x,t.y,e.x,e.y)<=t.radius+e.radius}},26535:t=>{t.exports=function(t,e){var i=e.width/2,s=e.height/2,n=Math.abs(t.x-e.x-i),r=Math.abs(t.y-e.y-s),o=i+t.radius,a=s+t.radius;if(n>o||r>a)return!1;if(n<=i||r<=s)return!0;var h=n-i,l=r-s;return h*h+l*l<=t.radius*t.radius}},71145:(t,e,i)=>{var s=i(79967),n=i(22184);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r,o,a,h,l=t.x,u=t.y,c=t.radius,d=e.x,p=e.y,f=e.radius;if(u===p)0===(a=(o=-2*p)*o-4*(r=1)*(d*d+(h=(f*f-c*c-d*d+l*l)/(2*(l-d)))*h-2*d*h+p*p-f*f))?i.push(new s(h,-o/(2*r))):a>0&&(i.push(new s(h,(-o+Math.sqrt(a))/(2*r))),i.push(new s(h,(-o-Math.sqrt(a))/(2*r))));else{var v=(l-d)/(u-p),g=(f*f-c*c-d*d+l*l-p*p+u*u)/(2*(u-p));0===(a=(o=2*u*v-2*g*v-2*l)*o-4*(r=v*v+1)*(l*l+u*u+g*g-c*c-2*u*g))?(h=-o/(2*r),i.push(new s(h,g-h*v))):a>0&&(h=(-o+Math.sqrt(a))/(2*r),i.push(new s(h,g-h*v)),h=(-o-Math.sqrt(a))/(2*r),i.push(new s(h,g-h*v)))}}return i}},62508:(t,e,i)=>{var s=i(26111),n=i(26535);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC(),h=e.getLineD();s(r,t,i),s(o,t,i),s(a,t,i),s(h,t,i)}return i}},26111:(t,e,i)=>{var s=i(79967),n=i(61472);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r,o,a=t.x1,h=t.y1,l=t.x2,u=t.y2,c=e.x,d=e.y,p=e.radius,f=l-a,v=u-h,g=a-c,m=h-d,y=f*f+v*v,x=2*(f*g+v*m),T=x*x-4*y*(g*g+m*m-p*p);if(0===T){var w=-x/(2*y);r=a+w*f,o=h+w*v,w>=0&&w<=1&&i.push(new s(r,o))}else if(T>0){var b=(-x-Math.sqrt(T))/(2*y);r=a+b*f,o=h+b*v,b>=0&&b<=1&&i.push(new s(r,o));var E=(-x+Math.sqrt(T))/(2*y);r=a+E*f,o=h+E*v,E>=0&&E<=1&&i.push(new s(r,o))}}return i}},96537:(t,e,i)=>{var s=i(70015);t.exports=function(t,e,i,n){void 0===i&&(i=!1);var r,o,a,h=t.x1,l=t.y1,u=t.x2,c=t.y2,d=e.x1,p=e.y1,f=u-h,v=c-l,g=e.x2-d,m=e.y2-p,y=f*m-v*g;if(0===y)return null;if(i){if((o=(d+g*(r=(f*(p-l)+v*(h-d))/(g*v-m*f))-h)/f)<0||r<0||r>1)return null;a=o}else{if(o=((l-p)*f-(h-d)*v)/y,(r=((d-h)*m-(p-l)*g)/y)<0||r>1||o<0||o>1)return null;a=r}return void 0===n&&(n=new s),n.set(h+f*a,l+v*a,a)}},17647:(t,e,i)=>{var s=i(96537),n=i(88829),r=i(70015),o=new n,a=new r;t.exports=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=new r);var h=!1;n.set(),a.set();for(var l=e[0],u=1;u{var s=i(70015),n=i(51729),r=i(17647),o=new s;t.exports=function(t,e,i,s){void 0===s&&(s=new n),Array.isArray(e)||(e=[e]);var a=!1;s.set(),o.set();for(var h=0;h{var s=i(79967),n=i(25227),r=i(47910);t.exports=function(t,e,i){if(void 0===i&&(i=[]),r(t,e))for(var o=e.getLineA(),a=e.getLineB(),h=e.getLineC(),l=e.getLineD(),u=[new s,new s,new s,new s],c=[n(o,t,u[0]),n(a,t,u[1]),n(h,t,u[2]),n(l,t,u[3])],d=0;d<4;d++)c[d]&&i.push(u[d]);return i}},7449:(t,e,i)=>{var s=i(51729),n=i(68439),r=new(i(88829));function o(t,e,i,o,a){var h=Math.cos(t),l=Math.sin(t);r.setTo(e,i,e+h,i+l);var u=n(r,o,!0);u&&a.push(new s(u.x,u.y,t,u.w))}function a(t,e){return t.z-e.z}t.exports=function(t,e,i){Array.isArray(i)||(i=[i]);for(var s=[],n=[],r=0;r{var s=i(74118),n=i(90205);t.exports=function(t,e,i){return void 0===i&&(i=new s),n(t,e)&&(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y),i}},1946:(t,e,i)=>{var s=i(9569),n=i(90205);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC(),h=t.getLineD();s(r,e,i),s(o,e,i),s(a,e,i),s(h,e,i)}return i}},34211:(t,e,i)=>{var s=i(20370),n=i(9569);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();n(r,t,i),n(o,t,i),n(a,t,i)}return i}},80511:(t,e,i)=>{var s=i(26111),n=i(48411);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e)){var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();s(r,e,i),s(o,e,i),s(a,e,i)}return i}},31343:(t,e,i)=>{var s=i(79967),n=i(86117),r=i(25227);t.exports=function(t,e,i){if(void 0===i&&(i=[]),n(t,e))for(var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=[new s,new s,new s],u=[r(o,e,l[0]),r(a,e,l[1]),r(h,e,l[2])],c=0;c<3;c++)u[c]&&i.push(l[c]);return i}},70534:(t,e,i)=>{var s=i(23589),n=i(31343);t.exports=function(t,e,i){if(void 0===i&&(i=[]),s(t,e)){var r=e.getLineA(),o=e.getLineB(),a=e.getLineC();n(t,r,i),n(t,o,i),n(t,a,i)}return i}},61472:(t,e,i)=>{var s=i(65650),n=new(i(79967));t.exports=function(t,e,i){if(void 0===i&&(i=n),s(e,t.x1,t.y1))return i.x=t.x1,i.y=t.y1,!0;if(s(e,t.x2,t.y2))return i.x=t.x2,i.y=t.y2,!0;var r=t.x2-t.x1,o=t.y2-t.y1,a=e.x-t.x1,h=e.y-t.y1,l=r*r+o*o,u=r,c=o;if(l>0){var d=(a*r+h*o)/l;u*=d,c*=d}return i.x=t.x1+u,i.y=t.y1+c,u*u+c*c<=l&&u*r+c*o>=0&&s(e,i.x,i.y)}},25227:t=>{t.exports=function(t,e,i){var s=t.x1,n=t.y1,r=t.x2,o=t.y2,a=e.x1,h=e.y1,l=e.x2,u=e.y2;if(s===r&&n===o||a===l&&h===u)return!1;var c=(u-h)*(r-s)-(l-a)*(o-n);if(0===c)return!1;var d=((l-a)*(n-h)-(u-h)*(s-a))/c,p=((r-s)*(n-h)-(o-n)*(s-a))/c;return!(d<0||d>1||p<0||p>1)&&(i&&(i.x=s+d*(r-s),i.y=n+d*(o-n)),!0)}},47910:t=>{t.exports=function(t,e){var i=t.x1,s=t.y1,n=t.x2,r=t.y2,o=e.x,a=e.y,h=e.right,l=e.bottom,u=0;if(i>=o&&i<=h&&s>=a&&s<=l||n>=o&&n<=h&&r>=a&&r<=l)return!0;if(i=o){if((u=s+(r-s)*(o-i)/(n-i))>a&&u<=l)return!0}else if(i>h&&n<=h&&(u=s+(r-s)*(h-i)/(n-i))>=a&&u<=l)return!0;if(s=a){if((u=i+(n-i)*(a-s)/(r-s))>=o&&u<=h)return!0}else if(s>l&&r<=l&&(u=i+(n-i)*(l-s)/(r-s))>=o&&u<=h)return!0;return!1}},34426:t=>{t.exports=function(t,e,i){void 0===i&&(i=1);var s=e.x1,n=e.y1,r=e.x2,o=e.y2,a=t.x,h=t.y,l=(r-s)*(r-s)+(o-n)*(o-n);if(0===l)return!1;var u=((a-s)*(r-s)+(h-n)*(o-n))/l;if(u<0)return Math.sqrt((s-a)*(s-a)+(n-h)*(n-h))<=i;if(u>=0&&u<=1){var c=((n-h)*(r-s)-(s-a)*(o-n))/l;return Math.abs(c)*Math.sqrt(l)<=i}return Math.sqrt((r-a)*(r-a)+(o-h)*(o-h))<=i}},81414:(t,e,i)=>{var s=i(34426);t.exports=function(t,e){if(!s(t,e))return!1;var i=Math.min(e.x1,e.x2),n=Math.max(e.x1,e.x2),r=Math.min(e.y1,e.y2),o=Math.max(e.y1,e.y2);return t.x>=i&&t.x<=n&&t.y>=r&&t.y<=o}},90205:t=>{t.exports=function(t,e){return!(t.width<=0||t.height<=0||e.width<=0||e.height<=0)&&!(t.righte.right||t.y>e.bottom)}},20370:(t,e,i)=>{var s=i(25227),n=i(94287),r=i(86875),o=i(87279);t.exports=function(t,e){if(e.left>t.right||e.rightt.bottom||e.bottom0}},8786:t=>{t.exports=function(t,e,i,s,n,r){return void 0===r&&(r=0),!(e>t.right+r||it.bottom+r||n{var s=i(61472),n=i(60689);t.exports=function(t,e){return!(t.left>e.right||t.righte.bottom||t.bottom{var s=i(25227);t.exports=function(t,e){return!(!t.contains(e.x1,e.y1)&&!t.contains(e.x2,e.y2))||(!!s(t.getLineA(),e)||(!!s(t.getLineB(),e)||!!s(t.getLineC(),e)))}},23589:(t,e,i)=>{var s=i(86875),n=i(18680),r=i(25227);t.exports=function(t,e){if(t.left>e.right||t.righte.bottom||t.bottom0||(c=n(e),(d=s(t,c,!0)).length>0)}},7563:(t,e,i)=>{t.exports={CircleToCircle:i(22184),CircleToRectangle:i(26535),GetCircleToCircle:i(71145),GetCircleToRectangle:i(62508),GetLineToCircle:i(26111),GetLineToLine:i(96537),GetLineToPoints:i(17647),GetLineToPolygon:i(68439),GetLineToRectangle:i(9569),GetRaysFromPointToPolygon:i(7449),GetRectangleIntersection:i(82931),GetRectangleToRectangle:i(1946),GetRectangleToTriangle:i(34211),GetTriangleToCircle:i(80511),GetTriangleToLine:i(31343),GetTriangleToTriangle:i(70534),LineToCircle:i(61472),LineToLine:i(25227),LineToRectangle:i(47910),PointToLine:i(34426),PointToLineSegment:i(81414),RectangleToRectangle:i(90205),RectangleToTriangle:i(20370),RectangleToValues:i(8786),TriangleToCircle:i(48411),TriangleToLine:i(86117),TriangleToTriangle:i(23589)}},50599:t=>{t.exports=function(t){return Math.atan2(t.y2-t.y1,t.x2-t.x1)}},58813:t=>{t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=[]);var s=Math.round(t.x1),n=Math.round(t.y1),r=Math.round(t.x2),o=Math.round(t.y2),a=Math.abs(r-s),h=Math.abs(o-n),l=s-h&&(c-=h,s+=l),p{t.exports=function(t,e,i){var s=e-(t.x1+t.x2)/2,n=i-(t.y1+t.y2)/2;return t.x1+=s,t.y1+=n,t.x2+=s,t.y2+=n,t}},26718:(t,e,i)=>{var s=i(88829);t.exports=function(t){return new s(t.x1,t.y1,t.x2,t.y2)}},88930:t=>{t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2)}},90656:t=>{t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2}},30897:(t,e,i)=>{var s=i(16028);t.exports=function(t,e,i){void 0===i&&(i=e);var n=s(t),r=t.x2-t.x1,o=t.y2-t.y1;return e&&(t.x1=t.x1-r/n*e,t.y1=t.y1-o/n*e),i&&(t.x2=t.x2+r/n*i,t.y2=t.y2+o/n*i),t}},30684:(t,e,i)=>{var s=i(92951),n=i(21902),r=i(79967);t.exports=function(t,e,i,o,a){void 0===o&&(o=0),void 0===a&&(a=[]);var h,l,u=[],c=t.x1,d=t.y1,p=t.x2-c,f=t.y2-d,v=n(e,a),g=i-1;for(h=0;h0){var m=u[0],y=[m];for(h=1;h=o&&(y.push(x),m=x)}var T=u[u.length-1];return s(m,T){var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=(t.x1+t.x2)/2,e.y=(t.y1+t.y2)/2,e}},11222:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.x1,r=t.y1,o=t.x2,a=t.y2,h=(o-n)*(o-n)+(a-r)*(a-r);if(0===h)return i;var l=((e.x-n)*(o-n)+(e.y-r)*(a-r))/h;return i.x=n+l*(o-n),i.y=r+l*(a-r),i}},7377:(t,e,i)=>{var s=i(83392),n=i(50599),r=i(79967);t.exports=function(t,e){void 0===e&&(e=new r);var i=n(t)-s.TAU;return e.x=Math.cos(i),e.y=Math.sin(i),e}},66464:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},8570:(t,e,i)=>{var s=i(16028),n=i(79967);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(e=s(t)/i);for(var o=t.x1,a=t.y1,h=t.x2,l=t.y2,u=0;u{t.exports=function(t,e){var i=t.x1,s=t.y1,n=t.x2,r=t.y2,o=(n-i)*(n-i)+(r-s)*(r-s);if(0===o)return!1;var a=((s-e.y)*(n-i)-(i-e.x)*(r-s))/o;return Math.abs(a)*Math.sqrt(o)}},82996:t=>{t.exports=function(t){return Math.abs(t.y1-t.y2)}},16028:t=>{t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},88829:(t,e,i)=>{var s=i(56694),n=i(66464),r=i(8570),o=i(52394),a=i(74077),h=i(93736),l=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=o.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=s},getPoint:function(t,e){return n(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},73273:(t,e,i)=>{var s=i(83392),n=i(1071),r=i(50599);t.exports=function(t){var e=r(t)-s.TAU;return n(e,-Math.PI,Math.PI)}},96936:(t,e,i)=>{var s=i(83392),n=i(50599);t.exports=function(t){return Math.cos(n(t)-s.TAU)}},43581:(t,e,i)=>{var s=i(83392),n=i(50599);t.exports=function(t){return Math.sin(n(t)-s.TAU)}},13990:t=>{t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t}},1298:t=>{t.exports=function(t){return-(t.x2-t.x1)/(t.y2-t.y1)}},74077:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},30473:(t,e,i)=>{var s=i(50599),n=i(73273);t.exports=function(t,e){return 2*n(e)-Math.PI-s(t)}},25968:(t,e,i)=>{var s=i(1809);t.exports=function(t,e){var i=(t.x1+t.x2)/2,n=(t.y1+t.y2)/2;return s(t,i,n,e)}},24296:(t,e,i)=>{var s=i(1809);t.exports=function(t,e,i){return s(t,e.x,e.y,i)}},1809:t=>{t.exports=function(t,e,i,s){var n=Math.cos(s),r=Math.sin(s),o=t.x1-e,a=t.y1-i;return t.x1=o*n-a*r+e,t.y1=o*r+a*n+i,o=t.x2-e,a=t.y2-i,t.x2=o*n-a*r+e,t.y2=o*r+a*n+i,t}},88171:t=>{t.exports=function(t,e,i,s,n){return t.x1=e,t.y1=i,t.x2=e+Math.cos(s)*n,t.y2=i+Math.sin(s)*n,t}},82797:t=>{t.exports=function(t){return(t.y2-t.y1)/(t.x2-t.x1)}},41067:t=>{t.exports=function(t){return Math.abs(t.x1-t.x2)}},28482:(t,e,i)=>{var s=i(88829);s.Angle=i(50599),s.BresenhamPoints=i(58813),s.CenterOn=i(88513),s.Clone=i(26718),s.CopyFrom=i(88930),s.Equals=i(90656),s.Extend=i(30897),s.GetEasedPoints=i(30684),s.GetMidPoint=i(20487),s.GetNearestPoint=i(11222),s.GetNormal=i(7377),s.GetPoint=i(66464),s.GetPoints=i(8570),s.GetShortestDistance=i(65269),s.Height=i(82996),s.Length=i(16028),s.NormalAngle=i(73273),s.NormalX=i(96936),s.NormalY=i(43581),s.Offset=i(13990),s.PerpSlope=i(1298),s.Random=i(74077),s.ReflectAngle=i(30473),s.Rotate=i(25968),s.RotateAroundPoint=i(24296),s.RotateAroundXY=i(1809),s.SetToAngle=i(88171),s.Slope=i(82797),s.Width=i(41067),t.exports=s},18693:(t,e,i)=>{var s=i(56694),n=i(74118),r=i(93736);function o(t,e,i,s){var n=t-i,r=e-s,o=n*n+r*r;return Math.sqrt(o)}var a=new s({initialize:function(t,e,i){this.vertex1=t,this.vertex2=e,this.vertex3=i,this.bounds=new n,this._inCenter=new r},getInCenter:function(t){void 0===t&&(t=!0);var e,i,s,n,r,a,h=this.vertex1,l=this.vertex2,u=this.vertex3;t?(e=h.x,i=h.y,s=l.x,n=l.y,r=u.x,a=u.y):(e=h.vx,i=h.vy,s=l.vx,n=l.vy,r=u.vx,a=u.vy);var c=o(r,a,s,n),d=o(e,i,r,a),p=o(s,n,e,i),f=c+d+p;return this._inCenter.set((e*c+s*d+r*p)/f,(i*c+n*d+a*p)/f)},contains:function(t,e,i){var s=this.vertex1,n=this.vertex2,r=this.vertex3,o=s.vx,a=s.vy,h=n.vx,l=n.vy,u=r.vx,c=r.vy;if(i){var d=i.a,p=i.b,f=i.c,v=i.d,g=i.e,m=i.f;o=s.vx*d+s.vy*f+g,a=s.vx*p+s.vy*v+m,h=n.vx*d+n.vy*f+g,l=n.vx*p+n.vy*v+m,u=r.vx*d+r.vy*f+g,c=r.vx*p+r.vy*v+m}var y=u-o,x=c-a,T=h-o,w=l-a,b=t-o,E=e-a,S=y*y+x*x,A=y*T+x*w,C=y*b+x*E,_=T*T+w*w,M=T*b+w*E,R=S*_-A*A,P=0===R?0:1/R,O=(_*C-A*M)*P,L=(S*M-A*C)*P;return O>=0&&L>=0&&O+L<1},isCounterClockwise:function(t){var e=this.vertex1,i=this.vertex2,s=this.vertex3,n=(i.vx-e.vx)*(s.vy-e.vy)-(i.vy-e.vy)*(s.vx-e.vx);return t<=0?n>=0:n<0},load:function(t,e,i,s,n){return i=this.vertex1.load(t,e,i,s,n),i=this.vertex2.load(t,e,i,s,n),i=this.vertex3.load(t,e,i,s,n)},transformCoordinatesLocal:function(t,e,i,s){return this.vertex1.transformCoordinatesLocal(t,e,i,s),this.vertex2.transformCoordinatesLocal(t,e,i,s),this.vertex3.transformCoordinatesLocal(t,e,i,s),this},updateBounds:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3,s=this.bounds;return s.x=Math.min(t.vx,e.vx,i.vx),s.y=Math.min(t.vy,e.vy,i.vy),s.width=Math.max(t.vx,e.vx,i.vx)-s.x,s.height=Math.max(t.vy,e.vy,i.vy)-s.y,this},isInView:function(t,e,i,s,n,r,o,a,h,l,u){this.update(s,n,r,o,a,h,l,u);var c=this.vertex1,d=this.vertex2,p=this.vertex3;if(c.ta<=0&&d.ta<=0&&p.ta<=0)return!1;if(e&&!this.isCounterClockwise(i))return!1;var f=this.bounds;f.x=Math.min(c.tx,d.tx,p.tx),f.y=Math.min(c.ty,d.ty,p.ty),f.width=Math.max(c.tx,d.tx,p.tx)-f.x,f.height=Math.max(c.ty,d.ty,p.ty)-f.y;var v=t.x+t.width,g=t.y+t.height;return!(f.width<=0||f.height<=0||t.width<=0||t.height<=0)&&!(f.rightv||f.y>g)},update:function(t,e,i,s,n,r,o,a){return this.vertex1.update(e,i,s,n,r,o,a,t),this.vertex2.update(e,i,s,n,r,o,a,t),this.vertex3.update(e,i,s,n,r,o,a,t),this},translate:function(t,e){void 0===e&&(e=0);var i=this.vertex1,s=this.vertex2,n=this.vertex3;return i.x+=t,i.y+=e,s.x+=t,s.y+=e,n.x+=t,n.y+=e,this},x:{get:function(){return this.getInCenter().x},set:function(t){var e=this.getInCenter();this.translate(t-e.x,0)}},y:{get:function(){return this.getInCenter().y},set:function(t){var e=this.getInCenter();this.translate(0,t-e.y)}},alpha:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.alpha+e.alpha+i.alpha)/3},set:function(t){this.vertex1.alpha=t,this.vertex2.alpha=t,this.vertex3.alpha=t}},depth:{get:function(){var t=this.vertex1,e=this.vertex2,i=this.vertex3;return(t.vz+e.vz+i.vz)/3}},destroy:function(){this.vertex1=null,this.vertex2=null,this.vertex3=null}});t.exports=a},99425:(t,e,i)=>{var s=i(18693),n=i(72632),r=i(16650),o=i(70015),a=i(85769),h=new o,l=new o,u=new r;t.exports=function(t){var e=n(t,"mesh"),i=n(t,"texture",null),r=n(t,"frame"),o=n(t,"width",1),c=n(t,"height",o),d=n(t,"widthSegments",1),p=n(t,"heightSegments",d),f=n(t,"x",0),v=n(t,"y",0),g=n(t,"z",0),m=n(t,"rotateX",0),y=n(t,"rotateY",0),x=n(t,"rotateZ",0),T=n(t,"zIsUp",!0),w=n(t,"isOrtho",!!e&&e.dirtyCache[11]),b=n(t,"colors",[16777215]),E=n(t,"alphas",[1]),S=n(t,"tile",!1),A=n(t,"flipY",!1),C=n(t,"width",null),_={faces:[],verts:[]};if(h.set(f,v,g),l.set(m,y,x),u.fromRotationXYTranslation(l,h,T),!i&&e)i=e.texture;else if(e&&"string"==typeof i)i=e.scene.sys.textures.get(i);else if(!i)return _;var M=i.get(r);!C&&w&&i&&e&&(o=M.width/e.height,c=M.height/e.height);var R,P,O=o/2,L=c/2,F=Math.floor(d),D=Math.floor(p),k=F+1,I=D+1,B=o/F,N=c/D,Y=[],U=[],X=0,z=1,G=0,V=1;M&&(X=M.u0,z=M.u1,A?(G=M.v1,V=M.v0):(G=M.v0,V=M.v1));var W=z-X,H=V-G;for(P=0;P{var s=i(18693),n=i(16650),r=i(70015),o=i(85769),a=new r,h=new r,l=new n;t.exports=function(t,e,i,n,r,u,c,d,p,f){void 0===i&&(i=1),void 0===n&&(n=0),void 0===r&&(r=0),void 0===u&&(u=0),void 0===c&&(c=0),void 0===d&&(d=0),void 0===p&&(p=0),void 0===f&&(f=!0);var v={faces:[],verts:[]},g=t.materials;a.set(n,r,u),h.set(c,d,p),l.fromRotationXYTranslation(h,a,f);for(var m=0;m{var s=i(18693),n=i(85769);t.exports=function(t,e,i,r,o,a,h,l){if(void 0===r&&(r=!1),void 0===a&&(a=16777215),void 0===h&&(h=1),void 0===l&&(l=!1),t.length===e.length||r){var u,c,d,p,f,v,g,m,y,x,T,w={faces:[],vertices:[]},b=r?3:2,E=Array.isArray(a),S=Array.isArray(h);if(Array.isArray(i)&&i.length>0)for(u=0;u{var e=!0,i="untitled",s="",n="";function r(t){var e=t.indexOf("#");return e>-1?t.substring(0,e):t}function o(t){return 0===t.models.length&&t.models.push({faces:[],name:i,textureCoords:[],vertexNormals:[],vertices:[]}),s="",t.models[t.models.length-1]}function a(t,e){var n=t.length>=2?t[1]:i;e.models.push({faces:[],name:n,textureCoords:[],vertexNormals:[],vertices:[]}),s=""}function h(t){2===t.length&&(s=t[1])}function l(t,e){var i=t.length,s=i>=2?parseFloat(t[1]):0,n=i>=3?parseFloat(t[2]):0,r=i>=4?parseFloat(t[3]):0;o(e).vertices.push({x:s,y:n,z:r})}function u(t,i){var s=t.length,n=s>=2?parseFloat(t[1]):0,r=s>=3?parseFloat(t[2]):0,a=s>=4?parseFloat(t[3]):0;isNaN(n)&&(n=0),isNaN(r)&&(r=0),isNaN(a)&&(a=0),e&&(r=1-r),o(i).textureCoords.push({u:n,v:r,w:a})}function c(t,e){var i=t.length,s=i>=2?parseFloat(t[1]):0,n=i>=3?parseFloat(t[2]):0,r=i>=4?parseFloat(t[3]):0;o(e).vertexNormals.push({x:s,y:n,z:r})}function d(t,e){var i=t.length-1;if(!(i<3)){for(var r={group:s,material:n,vertices:[]},a=0;a3)){var u=0,c=0,d=0;u=parseInt(h[0],10),l>1&&""!==h[1]&&(c=parseInt(h[1],10)),l>2&&(d=parseInt(h[2],10)),0!==u&&(u<0&&(u=o(e).vertices.length+1+u),c-=1,u-=1,d-=1,r.vertices.push({textureCoordsIndex:c,vertexIndex:u,vertexNormalIndex:d}))}}o(e).faces.push(r)}}function p(t,e){t.length>=2&&e.materialLibraries.push(t[1])}function f(t){t.length>=2&&(n=t[1])}t.exports=function(t,i){void 0===i&&(i=!0),e=i;var o={materials:{},materialLibraries:[],models:[]};s="",n="";for(var v=t.split("\n"),g=0;g{var s=i(22946);t.exports=function(t){for(var e={},i=t.split("\n"),n="",r=0;r=2?Math.floor(255*a[2]):h,u=a.length>=3?Math.floor(255*a[3]):h;e[n]=s(h,l,u)}}}return e}},15313:t=>{t.exports=function(t,e,i,s){var n,r;if(void 0===i&&void 0===s){var o=t.getInCenter();n=o.x,r=o.y}var a=Math.cos(e),h=Math.sin(e),l=t.vertex1,u=t.vertex2,c=t.vertex3,d=l.x-n,p=l.y-r;l.set(d*a-p*h+n,d*h+p*a+r),d=u.x-n,p=u.y-r,u.set(d*a-p*h+n,d*h+p*a+r),d=c.x-n,p=c.y-r,c.set(d*a-p*h+n,d*h+p*a+r)}},85769:(t,e,i)=>{var s=i(56694),n=i(75512),r=i(70015),o=new s({Extends:r,initialize:function(t,e,i,s,n,o,a,h,l,u){void 0===o&&(o=16777215),void 0===a&&(a=1),void 0===h&&(h=0),void 0===l&&(l=0),void 0===u&&(u=0),r.call(this,t,e,i),this.vx=0,this.vy=0,this.vz=0,this.nx=h,this.ny=l,this.nz=u,this.u=s,this.v=n,this.color=o,this.alpha=a,this.tx=0,this.ty=0,this.ta=0},setUVs:function(t,e){return this.u=t,this.v=e,this},transformCoordinatesLocal:function(t,e,i,s){var n=this.x,r=this.y,o=this.z,a=t.val,h=n*a[0]+r*a[4]+o*a[8]+a[12],l=n*a[1]+r*a[5]+o*a[9]+a[13],u=n*a[2]+r*a[6]+o*a[10]+a[14],c=n*a[3]+r*a[7]+o*a[11]+a[15];this.vx=h/c*e,this.vy=-l/c*i,this.vz=s<=0?u/c:-u/c},resize:function(t,e,i,s,n,r){return this.x=t,this.y=e,this.vx=this.x*i,this.vy=-this.y*s,this.vz=0,n<.5?this.vx+=i*(.5-n):n>.5&&(this.vx-=i*(n-.5)),r<.5?this.vy+=s*(.5-r):r>.5&&(this.vy-=s*(r-.5)),this},update:function(t,e,i,s,n,r,o,a){var h=this.vx*t+this.vy*i+n,l=this.vx*e+this.vy*s+r;return o&&(h=Math.round(h),l=Math.round(l)),this.tx=h,this.ty=l,this.ta=this.alpha*a,this},load:function(t,e,i,s,r){return t[++i]=this.tx,t[++i]=this.ty,t[++i]=this.u,t[++i]=this.v,t[++i]=s,t[++i]=r,e[++i]=n.getTintAppendFloatAlpha(this.color,this.ta),i}});t.exports=o},14293:(t,e,i)=>{var s={Face:i(18693),GenerateGridVerts:i(99425),GenerateObjVerts:i(53267),GenerateVerts:i(67623),ParseObj:i(27291),ParseObjMaterial:i(76799),RotateFace:i(15313),Vertex:i(85769)};t.exports=s},77601:t=>{t.exports=function(t){return t.setTo(Math.ceil(t.x),Math.ceil(t.y))}},38933:(t,e,i)=>{var s=i(79967);t.exports=function(t){return new s(t.x,t.y)}},47103:t=>{t.exports=function(t,e){return e.setTo(t.x,t.y)}},13625:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y}},12536:t=>{t.exports=function(t){return t.setTo(Math.floor(t.x),Math.floor(t.y))}},54205:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){if(void 0===e&&(e=new s),!Array.isArray(t))throw new Error("GetCentroid points argument must be an array");var i=t.length;if(i<1)throw new Error("GetCentroid points array must not be empty");if(1===i)e.x=t[0].x,e.y=t[0].y;else{for(var n=0;n{t.exports=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)}},82712:t=>{t.exports=function(t){return t.x*t.x+t.y*t.y}},20052:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){void 0===e&&(e=new s);for(var i=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY,a=0;ai&&(i=h.x),h.xr&&(r=h.y),h.y{var s=i(79967);t.exports=function(t,e,i,n){return void 0===i&&(i=0),void 0===n&&(n=new s),n.x=t.x+(e.x-t.x)*i,n.y=t.y+(e.y-t.y)*i,n}},42397:t=>{t.exports=function(t){return t.setTo(t.y,t.x)}},59464:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.setTo(-t.x,-t.y)}},79967:(t,e,i)=>{var s=i(56694),n=i(52394),r=new s({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=n.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=r},53581:(t,e,i)=>{var s=i(79967),n=i(82712);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=(t.x*e.x+t.y*e.y)/n(e);return 0!==r&&(i.x=r*e.x,i.y=r*e.y),i}},50817:(t,e,i)=>{var s=i(79967);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=t.x*e.x+t.y*e.y;return 0!==n&&(i.x=n*e.x,i.y=n*e.y),i}},40525:(t,e,i)=>{var s=i(50083);t.exports=function(t,e){if(0!==t.x||0!==t.y){var i=s(t);t.x/=i,t.y/=i}return t.x*=e,t.y*=e,t}},63472:(t,e,i)=>{var s=i(79967);s.Ceil=i(77601),s.Clone=i(38933),s.CopyFrom=i(47103),s.Equals=i(13625),s.Floor=i(12536),s.GetCentroid=i(54205),s.GetMagnitude=i(50083),s.GetMagnitudeSq=i(82712),s.GetRectangleFromPoints=i(20052),s.Interpolate=i(77154),s.Invert=i(42397),s.Negative=i(59464),s.Project=i(53581),s.ProjectUnit=i(50817),s.SetMagnitude=i(40525),t.exports=s},19631:(t,e,i)=>{var s=i(8580);t.exports=function(t){return new s(t.points)}},45604:t=>{t.exports=function(t,e,i){for(var s=!1,n=-1,r=t.points.length-1;++n{var s=i(45604);t.exports=function(t,e){return s(t,e.x,e.y)}},11117:t=>{"use strict";function e(t,e,s){s=s||2;var r,o,a,h,c,d,f,v=e&&e.length,g=v?e[0]*s:t.length,m=i(t,0,g,s,!0),y=[];if(!m||m.next===m.prev)return y;if(v&&(m=function(t,e,s,n){var r,o,a,h=[];for(r=0,o=e.length;r80*s){r=a=t[0],o=h=t[1];for(var x=s;xa&&(a=c),d>h&&(h=d);f=0!==(f=Math.max(a-r,h-o))?32767/f:0}return n(m,y,s,r,o,f,0),y}function i(t,e,i,s,n){var r,o;if(n===C(t,e,i,s)>0)for(r=e;r=e;r-=s)o=E(r,t[r],t[r+1],o);return o&&m(o,o.next)&&(S(o),o=o.next),o}function s(t,e){if(!t)return t;e||(e=t);var i,s=t;do{if(i=!1,s.steiner||!m(s,s.next)&&0!==g(s.prev,s,s.next))s=s.next;else{if(S(s),(s=e=s.prev)===s.next)break;i=!0}}while(i||s!==e);return e}function n(t,e,i,l,u,c,p){if(t){!p&&c&&function(t,e,i,s){var n=t;do{0===n.z&&(n.z=d(n.x,n.y,e,i,s)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,i,s,n,r,o,a,h,l=1;do{for(i=t,t=null,r=null,o=0;i;){for(o++,s=i,a=0,e=0;e0||h>0&&s;)0!==a&&(0===h||!s||i.z<=s.z)?(n=i,i=i.nextZ,a--):(n=s,s=s.nextZ,h--),r?r.nextZ=n:t=n,n.prevZ=r,r=n;i=s}r.nextZ=null,l*=2}while(o>1)}(n)}(t,l,u,c);for(var f,v,g=t;t.prev!==t.next;)if(f=t.prev,v=t.next,c?o(t,l,u,c):r(t))e.push(f.i/i|0),e.push(t.i/i|0),e.push(v.i/i|0),S(t),t=v.next,g=v.next;else if((t=v)===g){p?1===p?n(t=a(s(t),e,i),e,i,l,u,c,2):2===p&&h(t,e,i,l,u,c):n(s(t),e,i,l,u,c,1);break}}}function r(t){var e=t.prev,i=t,s=t.next;if(g(e,i,s)>=0)return!1;for(var n=e.x,r=i.x,o=s.x,a=e.y,h=i.y,l=s.y,u=nr?n>o?n:o:r>o?r:o,p=a>h?a>l?a:l:h>l?h:l,v=s.next;v!==e;){if(v.x>=u&&v.x<=d&&v.y>=c&&v.y<=p&&f(n,a,r,h,o,l,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function o(t,e,i,s){var n=t.prev,r=t,o=t.next;if(g(n,r,o)>=0)return!1;for(var a=n.x,h=r.x,l=o.x,u=n.y,c=r.y,p=o.y,v=ah?a>l?a:l:h>l?h:l,x=u>c?u>p?u:p:c>p?c:p,T=d(v,m,e,i,s),w=d(y,x,e,i,s),b=t.prevZ,E=t.nextZ;b&&b.z>=T&&E&&E.z<=w;){if(b.x>=v&&b.x<=y&&b.y>=m&&b.y<=x&&b!==n&&b!==o&&f(a,u,h,c,l,p,b.x,b.y)&&g(b.prev,b,b.next)>=0)return!1;if(b=b.prevZ,E.x>=v&&E.x<=y&&E.y>=m&&E.y<=x&&E!==n&&E!==o&&f(a,u,h,c,l,p,E.x,E.y)&&g(E.prev,E,E.next)>=0)return!1;E=E.nextZ}for(;b&&b.z>=T;){if(b.x>=v&&b.x<=y&&b.y>=m&&b.y<=x&&b!==n&&b!==o&&f(a,u,h,c,l,p,b.x,b.y)&&g(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;E&&E.z<=w;){if(E.x>=v&&E.x<=y&&E.y>=m&&E.y<=x&&E!==n&&E!==o&&f(a,u,h,c,l,p,E.x,E.y)&&g(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function a(t,e,i){var n=t;do{var r=n.prev,o=n.next.next;!m(r,o)&&y(r,n,n.next,o)&&w(r,o)&&w(o,r)&&(e.push(r.i/i|0),e.push(n.i/i|0),e.push(o.i/i|0),S(n),S(n.next),n=t=o),n=n.next}while(n!==t);return s(n)}function h(t,e,i,r,o,a){var h=t;do{for(var l=h.next.next;l!==h.prev;){if(h.i!==l.i&&v(h,l)){var u=b(h,l);return h=s(h,h.next),u=s(u,u.next),n(h,e,i,r,o,a,0),void n(u,e,i,r,o,a,0)}l=l.next}h=h.next}while(h!==t)}function l(t,e){return t.x-e.x}function u(t,e){var i=function(t,e){var i,s=e,n=t.x,r=t.y,o=-1/0;do{if(r<=s.y&&r>=s.next.y&&s.next.y!==s.y){var a=s.x+(r-s.y)*(s.next.x-s.x)/(s.next.y-s.y);if(a<=n&&a>o&&(o=a,i=s.x=s.x&&s.x>=u&&n!==s.x&&f(ri.x||s.x===i.x&&c(i,s)))&&(i=s,p=h)),s=s.next}while(s!==l);return i}(t,e);if(!i)return e;var n=b(i,t);return s(n,n.next),s(i,i.next)}function c(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function d(t,e,i,s,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-i)*n|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-s)*n|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,i=t;do{(e.x=(t-o)*(r-a)&&(t-o)*(s-a)>=(i-o)*(e-a)&&(i-o)*(r-a)>=(n-o)*(s-a)}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&y(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&(w(t,e)&&w(e,t)&&function(t,e){var i=t,s=!1,n=(t.x+e.x)/2,r=(t.y+e.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&n<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(s=!s),i=i.next}while(i!==t);return s}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||m(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function m(t,e){return t.x===e.x&&t.y===e.y}function y(t,e,i,s){var n=T(g(t,e,i)),r=T(g(t,e,s)),o=T(g(i,s,t)),a=T(g(i,s,e));return n!==r&&o!==a||(!(0!==n||!x(t,i,e))||(!(0!==r||!x(t,s,e))||(!(0!==o||!x(i,t,s))||!(0!==a||!x(i,e,s)))))}function x(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function T(t){return t>0?1:t<0?-1:0}function w(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function b(t,e){var i=new A(t.i,t.x,t.y),s=new A(e.i,e.x,e.y),n=t.next,r=e.prev;return t.next=e,e.prev=t,i.next=n,n.prev=i,s.next=i,i.prev=s,r.next=s,s.prev=r,s}function E(t,e,i,s){var n=new A(t,e,i);return s?(n.next=s.next,n.prev=s,s.next.prev=n,s.next=n):(n.prev=n,n.next=n),n}function S(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function A(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function C(t,e,i,s){for(var n=0,r=e,o=i-s;r0&&(s+=t[n-1].length,i.holes.push(s))}return i},t.exports=e},14045:(t,e,i)=>{var s=i(74118);t.exports=function(t,e){void 0===e&&(e=new s);for(var i,n=1/0,r=1/0,o=-n,a=-r,h=0;h{t.exports=function(t,e){void 0===e&&(e=[]);for(var i=0;i{var s=i(16028),n=i(88829),r=i(5159);t.exports=function(t,e,i,o){void 0===o&&(o=[]);var a=t.points,h=r(t);!e&&i>0&&(e=h/i);for(var l=0;lc+g)){var m=v.getPoint((u-c)/g);o.push(m);break}c+=g}return o}},5159:(t,e,i)=>{var s=i(16028),n=i(88829);t.exports=function(t){for(var e=t.points,i=0,r=0;r{var s=i(56694),n=i(45604),r=i(89294),o=i(52394),a=new s({initialize:function(t){this.type=o.POLYGON,this.area=0,this.points=[],t&&this.setTo(t)},contains:function(t,e){return n(this,t,e)},setTo:function(t){if(this.area=0,this.points=[],"string"==typeof t&&(t=t.split(" ")),!Array.isArray(t))return this;for(var e,i=Number.MAX_VALUE,s=0;s{t.exports=function(t){return t.points.reverse(),t}},95874:t=>{function e(t,e,i){var s=e.x,n=e.y,r=i.x-s,o=i.y-n;if(0!==r||0!==o){var a=((t.x-s)*r+(t.y-n)*o)/(r*r+o*o);a>1?(s=i.x,n=i.y):a>0&&(s+=r*a,n+=o*a)}return(r=t.x-s)*r+(o=t.y-n)*o}function i(t,s,n,r,o){for(var a,h=r,l=s+1;lh&&(a=l,h=u)}h>r&&(a-s>1&&i(t,s,a,r,o),o.push(t[a]),n-a>1&&i(t,a,n,r,o))}function s(t,e){var s=t.length-1,n=[t[0]];return i(t,0,s,e,n),n.push(t[s]),n}t.exports=function(t,e,i){void 0===e&&(e=1),void 0===i&&(i=!1);var n=t.points;if(n.length>2){var r=e*e;i||(n=function(t,e){for(var i,s,n,r,o,a=t[0],h=[a],l=1,u=t.length;le&&(h.push(i),a=i);return a!==i&&h.push(i),h}(n,r)),t.setTo(s(n,r))}return t}},18974:t=>{var e=function(t,e){return t[0]=e[0],t[1]=e[1],t};t.exports=function(t){var i,s=[],n=t.points;for(i=0;i0&&r.push(e([0,0],s[0])),i=0;i1&&r.push(e([0,0],s[s.length-1])),t.setTo(r)}},23490:t=>{t.exports=function(t,e,i){for(var s=t.points,n=0;n{var s=i(8580);s.Clone=i(19631),s.Contains=i(45604),s.ContainsPoint=i(87289),s.Earcut=i(11117),s.GetAABB=i(14045),s.GetNumberArray=i(98286),s.GetPoints=i(89294),s.Perimeter=i(5159),s.Reverse=i(32244),s.Simplify=i(95874),s.Smooth=i(18974),s.Translate=i(23490),t.exports=s},1653:t=>{t.exports=function(t){return t.width*t.height}},33943:t=>{t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t}},58662:t=>{t.exports=function(t){return t.x=Math.ceil(t.x),t.y=Math.ceil(t.y),t.width=Math.ceil(t.width),t.height=Math.ceil(t.height),t}},79993:t=>{t.exports=function(t,e,i){return t.x=e-t.width/2,t.y=i-t.height/2,t}},81572:(t,e,i)=>{var s=i(74118);t.exports=function(t){return new s(t.x,t.y,t.width,t.height)}},94287:t=>{t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i)}},28687:(t,e,i)=>{var s=i(94287);t.exports=function(t,e){return s(t,e.x,e.y)}},73222:t=>{t.exports=function(t,e){return!(e.width*e.height>t.width*t.height)&&(e.x>t.x&&e.xt.x&&e.rightt.y&&e.yt.y&&e.bottom{t.exports=function(t,e){return e.setTo(t.x,t.y,t.width,t.height)}},87279:t=>{t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x,y:t.y}),e.push({x:t.right,y:t.y}),e.push({x:t.right,y:t.bottom}),e.push({x:t.x,y:t.bottom}),e}},19989:t=>{t.exports=function(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}},92628:(t,e,i)=>{var s=i(6700);t.exports=function(t,e){var i=s(t);return i{var s=i(6700);t.exports=function(t,e){var i=s(t);return i>s(e)?t.setSize(e.height*i,e.height):t.setSize(e.width,e.width/i),t.setPosition(e.centerX-t.width/2,e.centerY-t.height/2)}},71356:t=>{t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t}},21687:t=>{t.exports=function(t){return t.x=Math.floor(t.x),t.y=Math.floor(t.y),t.width=Math.floor(t.width),t.height=Math.floor(t.height),t}},80222:(t,e,i)=>{var s=i(74118),n=i(83392);t.exports=function(t,e){if(void 0===e&&(e=new s),0===t.length)return e;for(var i,r,o,a=Number.MAX_VALUE,h=Number.MAX_VALUE,l=n.MIN_SAFE_INTEGER,u=n.MIN_SAFE_INTEGER,c=0;c{var s=i(74118);t.exports=function(t,e,i,n,r){return void 0===r&&(r=new s),r.setTo(Math.min(t,i),Math.min(e,n),Math.abs(t-i),Math.abs(e-n))}},6700:t=>{t.exports=function(t){return 0===t.height?NaN:t.width/t.height}},35242:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.centerX,e.y=t.centerY,e}},47698:(t,e,i)=>{var s=i(85876),n=i(79967);t.exports=function(t,e,i){if(void 0===i&&(i=new n),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=s(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},54932:(t,e,i)=>{var s=i(47698),n=i(85876);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(e=n(t)/i);for(var o=0;o{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.width,e.y=t.height,e}},7782:(t,e,i)=>{var s=i(79993);t.exports=function(t,e,i){var n=t.centerX,r=t.centerY;return t.setSize(t.width+2*e,t.height+2*i),s(t,n,r)}},66217:(t,e,i)=>{var s=i(74118),n=i(90205);t.exports=function(t,e,i){return void 0===i&&(i=new s),n(t,e)?(i.x=Math.max(t.x,e.x),i.y=Math.max(t.y,e.y),i.width=Math.min(t.right,e.right)-i.x,i.height=Math.min(t.bottom,e.bottom)-i.y):i.setEmpty(),i}},40053:(t,e,i)=>{var s=i(85876),n=i(79967);t.exports=function(t,e,i,r){if(void 0===r&&(r=[]),!e&&!i)return r;e?i=Math.round(s(t)/e):e=s(t)/i;for(var o=t.x,a=t.y,h=0,l=0;l=t.right&&(h=1,a+=o-t.right,o=t.right);break;case 1:(a+=e)>=t.bottom&&(h=2,o-=a-t.bottom,a=t.bottom);break;case 2:(o-=e)<=t.left&&(h=3,a-=t.left-o,o=t.left);break;case 3:(a-=e)<=t.top&&(h=0,a=t.top)}return r}},86673:t=>{t.exports=function(t,e){for(var i=t.x,s=t.right,n=t.y,r=t.bottom,o=0;o{t.exports=function(t,e){var i=Math.min(t.x,e.x),s=Math.max(t.right,e.right);t.x=i,t.width=s-i;var n=Math.min(t.y,e.y),r=Math.max(t.bottom,e.bottom);return t.y=n,t.height=r-n,t}},44755:t=>{t.exports=function(t,e,i){var s=Math.min(t.x,e),n=Math.max(t.right,e);t.x=s,t.width=n-s;var r=Math.min(t.y,i),o=Math.max(t.bottom,i);return t.y=r,t.height=o-r,t}},74466:t=>{t.exports=function(t,e,i){return t.x+=e,t.y+=i,t}},55946:t=>{t.exports=function(t,e){return t.x+=e.x,t.y+=e.y,t}},97474:t=>{t.exports=function(t,e){return t.xe.x&&t.ye.y}},85876:t=>{t.exports=function(t){return 2*(t.width+t.height)}},20243:(t,e,i)=>{var s=i(79967),n=i(75606);t.exports=function(t,e,i){void 0===i&&(i=new s),e=n(e);var r=Math.sin(e),o=Math.cos(e),a=o>0?t.width/2:t.width/-2,h=r>0?t.height/2:t.height/-2;return Math.abs(a*r){var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},97691:(t,e,i)=>{var s=i(17489),n=i(73222),r=i(79967);t.exports=function(t,e,i){if(void 0===i&&(i=new r),n(t,e))switch(s(0,3)){case 0:i.x=t.x+Math.random()*(e.right-t.x),i.y=t.y+Math.random()*(e.top-t.y);break;case 1:i.x=e.x+Math.random()*(t.right-e.x),i.y=e.bottom+Math.random()*(t.bottom-e.bottom);break;case 2:i.x=t.x+Math.random()*(e.x-t.x),i.y=e.y+Math.random()*(t.bottom-e.y);break;case 3:i.x=e.right+Math.random()*(t.right-e.right),i.y=t.y+Math.random()*(e.bottom-t.y)}return i}},74118:(t,e,i)=>{var s=i(56694),n=i(94287),r=i(47698),o=i(54932),a=i(52394),h=i(88829),l=i(30001),u=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=a.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},51828:t=>{t.exports=function(t,e){return t.width===e.width&&t.height===e.height}},5691:t=>{t.exports=function(t,e,i){return void 0===i&&(i=e),t.width*=e,t.height*=i,t}},58795:(t,e,i)=>{var s=i(74118);t.exports=function(t,e,i){void 0===i&&(i=new s);var n=Math.min(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.right,e.right)-n,a=Math.max(t.bottom,e.bottom)-r;return i.setTo(n,r,o,a)}},66658:(t,e,i)=>{var s=i(74118);s.Area=i(1653),s.Ceil=i(33943),s.CeilAll=i(58662),s.CenterOn=i(79993),s.Clone=i(81572),s.Contains=i(94287),s.ContainsPoint=i(28687),s.ContainsRect=i(73222),s.CopyFrom=i(29538),s.Decompose=i(87279),s.Equals=i(19989),s.FitInside=i(92628),s.FitOutside=i(85028),s.Floor=i(71356),s.FloorAll=i(21687),s.FromPoints=i(80222),s.FromXY=i(75785),s.GetAspectRatio=i(6700),s.GetCenter=i(35242),s.GetPoint=i(47698),s.GetPoints=i(54932),s.GetSize=i(31591),s.Inflate=i(7782),s.Intersection=i(66217),s.MarchingAnts=i(40053),s.MergePoints=i(86673),s.MergeRect=i(14655),s.MergeXY=i(44755),s.Offset=i(74466),s.OffsetPoint=i(55946),s.Overlaps=i(97474),s.Perimeter=i(85876),s.PerimeterPoint=i(20243),s.Random=i(30001),s.RandomOutside=i(97691),s.SameDimensions=i(51828),s.Scale=i(5691),s.Union=i(58795),t.exports=s},19108:t=>{t.exports=function(t){var e=t.x1,i=t.y1,s=t.x2,n=t.y2,r=t.x3,o=t.y3;return Math.abs(((r-e)*(n-i)-(s-e)*(o-i))/2)}},41199:(t,e,i)=>{var s=i(66349);t.exports=function(t,e,i){var n=i*(Math.sqrt(3)/2);return new s(t,e,t+i/2,e+n,t-i/2,e+n)}},88730:(t,e,i)=>{var s=i(11117),n=i(66349);t.exports=function(t,e,i,r,o){void 0===e&&(e=null),void 0===i&&(i=1),void 0===r&&(r=1),void 0===o&&(o=[]);for(var a,h,l,u,c,d,p,f,v,g=s(t,e),m=0;m{var s=i(66349);t.exports=function(t,e,i,n){return void 0===n&&(n=i),new s(t,e,t,e-n,t+i,e)}},1882:(t,e,i)=>{var s=i(56595),n=i(9640);t.exports=function(t,e,i,r){void 0===r&&(r=s);var o=r(t),a=e-o.x,h=i-o.y;return n(t,a,h)}},56595:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=(t.x1+t.x2+t.x3)/3,e.y=(t.y1+t.y2+t.y3)/3,e}},91835:(t,e,i)=>{var s=i(93736);function n(t,e,i,s){return t*s-e*i}t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x3,r=t.y3,o=t.x1-i,a=t.y1-r,h=t.x2-i,l=t.y2-r,u=2*n(o,a,h,l),c=n(a,o*o+a*a,l,h*h+l*l),d=n(o,o*o+a*a,h,h*h+l*l);return e.x=i-c/u,e.y=r+d/u,e}},97073:(t,e,i)=>{var s=i(26673);t.exports=function(t,e){void 0===e&&(e=new s);var i,n,r=t.x1,o=t.y1,a=t.x2,h=t.y2,l=t.x3,u=t.y3,c=a-r,d=h-o,p=l-r,f=u-o,v=c*(r+a)+d*(o+h),g=p*(r+l)+f*(o+u),m=2*(c*(u-h)-d*(l-a));if(Math.abs(m)<1e-6){var y=Math.min(r,a,l),x=Math.min(o,h,u);i=.5*(Math.max(r,a,l)-y),n=.5*(Math.max(o,h,u)-x),e.x=y+i,e.y=x+n,e.radius=Math.sqrt(i*i+n*n)}else e.x=(f*v-d*g)/m,e.y=(c*g-p*v)/m,i=e.x-r,n=e.y-o,e.radius=Math.sqrt(i*i+n*n);return e}},75974:(t,e,i)=>{var s=i(66349);t.exports=function(t){return new s(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},60689:t=>{t.exports=function(t,e,i){var s=t.x3-t.x1,n=t.y3-t.y1,r=t.x2-t.x1,o=t.y2-t.y1,a=e-t.x1,h=i-t.y1,l=s*s+n*n,u=s*r+n*o,c=s*a+n*h,d=r*r+o*o,p=r*a+o*h,f=l*d-u*u,v=0===f?0:1/f,g=(d*c-u*p)*v,m=(l*p-u*c)*v;return g>=0&&m>=0&&g+m<1}},86875:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=!1),void 0===s&&(s=[]);for(var n,r,o,a,h,l,u=t.x3-t.x1,c=t.y3-t.y1,d=t.x2-t.x1,p=t.y2-t.y1,f=u*u+c*c,v=u*d+c*p,g=d*d+p*p,m=f*g-v*v,y=0===m?0:1/m,x=t.x1,T=t.y1,w=0;w=0&&r>=0&&n+r<1&&(s.push({x:e[w].x,y:e[w].y}),i)));w++);return s}},51532:(t,e,i)=>{var s=i(60689);t.exports=function(t,e){return s(t,e.x,e.y)}},42538:t=>{t.exports=function(t,e){return e.setTo(t.x1,t.y1,t.x2,t.y2,t.x3,t.y3)}},18680:t=>{t.exports=function(t,e){return void 0===e&&(e=[]),e.push({x:t.x1,y:t.y1}),e.push({x:t.x2,y:t.y2}),e.push({x:t.x3,y:t.y3}),e}},29977:t=>{t.exports=function(t,e){return t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2&&t.x3===e.x3&&t.y3===e.y3}},56088:(t,e,i)=>{var s=i(79967),n=i(16028);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=t.getLineA(),o=t.getLineB(),a=t.getLineC();if(e<=0||e>=1)return i.x=r.x1,i.y=r.y1,i;var h=n(r),l=n(o),u=n(a),c=(h+l+u)*e,d=0;return ch+l?(d=(c-=h+l)/u,i.x=a.x1+(a.x2-a.x1)*d,i.y=a.y1+(a.y2-a.y1)*d):(d=(c-=h)/l,i.x=o.x1+(o.x2-o.x1)*d,i.y=o.y1+(o.y2-o.y1)*d),i}},24402:(t,e,i)=>{var s=i(16028),n=i(79967);t.exports=function(t,e,i,r){void 0===r&&(r=[]);var o=t.getLineA(),a=t.getLineB(),h=t.getLineC(),l=s(o),u=s(a),c=s(h),d=l+u+c;!e&&i>0&&(e=d/i);for(var p=0;pl+u?(v=(f-=l+u)/c,g.x=h.x1+(h.x2-h.x1)*v,g.y=h.y1+(h.y2-h.y1)*v):(v=(f-=l)/u,g.x=a.x1+(a.x2-a.x1)*v,g.y=a.y1+(a.y2-a.y1)*v),r.push(g)}return r}},83648:(t,e,i)=>{var s=i(79967);function n(t,e,i,s){var n=t-i,r=e-s,o=n*n+r*r;return Math.sqrt(o)}t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x1,r=t.y1,o=t.x2,a=t.y2,h=t.x3,l=t.y3,u=n(h,l,o,a),c=n(i,r,h,l),d=n(o,a,i,r),p=u+c+d;return e.x=(i*u+o*c+h*d)/p,e.y=(r*u+a*c+l*d)/p,e}},9640:t=>{t.exports=function(t,e,i){return t.x1+=e,t.y1+=i,t.x2+=e,t.y2+=i,t.x3+=e,t.y3+=i,t}},95290:(t,e,i)=>{var s=i(16028);t.exports=function(t){var e=t.getLineA(),i=t.getLineB(),n=t.getLineC();return s(e)+s(i)+s(n)}},99761:(t,e,i)=>{var s=i(79967);t.exports=function(t,e){void 0===e&&(e=new s);var i=t.x2-t.x1,n=t.y2-t.y1,r=t.x3-t.x1,o=t.y3-t.y1,a=Math.random(),h=Math.random();return a+h>=1&&(a=1-a,h=1-h),e.x=t.x1+(i*a+r*h),e.y=t.y1+(n*a+o*h),e}},21934:(t,e,i)=>{var s=i(19211),n=i(83648);t.exports=function(t,e){var i=n(t);return s(t,i.x,i.y,e)}},68454:(t,e,i)=>{var s=i(19211);t.exports=function(t,e,i){return s(t,e.x,e.y,i)}},19211:t=>{t.exports=function(t,e,i,s){var n=Math.cos(s),r=Math.sin(s),o=t.x1-e,a=t.y1-i;return t.x1=o*n-a*r+e,t.y1=o*r+a*n+i,o=t.x2-e,a=t.y2-i,t.x2=o*n-a*r+e,t.y2=o*r+a*n+i,o=t.x3-e,a=t.y3-i,t.x3=o*n-a*r+e,t.y3=o*r+a*n+i,t}},66349:(t,e,i)=>{var s=i(56694),n=i(60689),r=i(56088),o=i(24402),a=i(52394),h=i(88829),l=i(99761),u=new s({initialize:function(t,e,i,s,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=0),this.type=a.TRIANGLE,this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.x3=n,this.y3=r},contains:function(t,e){return n(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,s,n,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this.x3=n,this.y3=r,this},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x1,this.y1,this.x2,this.y2),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.x2,this.y2,this.x3,this.y3),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.x3,this.y3,this.x1,this.y1),t},left:{get:function(){return Math.min(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1<=this.x2&&this.x1<=this.x3?this.x1-t:this.x2<=this.x1&&this.x2<=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},right:{get:function(){return Math.max(this.x1,this.x2,this.x3)},set:function(t){var e=0;e=this.x1>=this.x2&&this.x1>=this.x3?this.x1-t:this.x2>=this.x1&&this.x2>=this.x3?this.x2-t:this.x3-t,this.x1-=e,this.x2-=e,this.x3-=e}},top:{get:function(){return Math.min(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1<=this.y2&&this.y1<=this.y3?this.y1-t:this.y2<=this.y1&&this.y2<=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}},bottom:{get:function(){return Math.max(this.y1,this.y2,this.y3)},set:function(t){var e=0;e=this.y1>=this.y2&&this.y1>=this.y3?this.y1-t:this.y2>=this.y1&&this.y2>=this.y3?this.y2-t:this.y3-t,this.y1-=e,this.y2-=e,this.y3-=e}}});t.exports=u},87619:(t,e,i)=>{var s=i(66349);s.Area=i(19108),s.BuildEquilateral=i(41199),s.BuildFromPolygon=i(88730),s.BuildRight=i(3635),s.CenterOn=i(1882),s.Centroid=i(56595),s.CircumCenter=i(91835),s.CircumCircle=i(97073),s.Clone=i(75974),s.Contains=i(60689),s.ContainsArray=i(86875),s.ContainsPoint=i(51532),s.CopyFrom=i(42538),s.Decompose=i(18680),s.Equals=i(29977),s.GetPoint=i(56088),s.GetPoints=i(24402),s.InCenter=i(83648),s.Perimeter=i(95290),s.Offset=i(9640),s.Random=i(99761),s.Rotate=i(21934),s.RotateAroundPoint=i(68454),s.RotateAroundXY=i(19211),t.exports=s},27395:t=>{t.exports=function(t,e,i){return{gameObject:t,enabled:!0,draggable:!1,dropZone:!1,cursor:!1,target:null,camera:null,hitArea:e,hitAreaCallback:i,hitAreaDebug:null,customHitArea:!1,localX:0,localY:0,dragState:0,dragStartX:0,dragStartY:0,dragStartXGlobal:0,dragStartYGlobal:0,dragX:0,dragY:0}}},18104:t=>{t.exports=function(t,e){return function(i,s,n,r){var o=t.getPixelAlpha(s,n,r.texture.key,r.frame.name);return o&&o>=e}}},69898:(t,e,i)=>{var s=i(56694),n=i(72687),r=i(6659),o=i(33963),a=i(97081),h=i(71064),l=i(7905),u=i(40398),c=i(37579),d=i(69360),p=i(64462),f=new s({initialize:function(t,e){this.game=t,this.scaleManager,this.canvas,this.config=e,this.enabled=!0,this.events=new r,this.isOver=!0,this.defaultCursor="",this.keyboard=e.inputKeyboard?new h(this):null,this.mouse=e.inputMouse?new l(this):null,this.touch=e.inputTouch?new c(this):null,this.pointers=[],this.pointersTotal=e.inputActivePointers,e.inputTouch&&1===this.pointersTotal&&(this.pointersTotal=2);for(var i=0;i<=this.pointersTotal;i++){var s=new u(this,i);s.smoothFactor=e.inputSmoothFactor,this.pointers.push(s)}this.mousePointer=e.inputMouse?this.pointers[0]:null,this.activePointer=this.pointers[0],this.globalTopOnly=!0,this.time=0,this._tempPoint={x:0,y:0},this._tempHitTest=[],this._tempMatrix=new d,this._tempMatrix2=new d,this._tempSkip=!1,this.mousePointerContainer=[this.mousePointer],t.events.once(a.BOOT,this.boot,this)},boot:function(){var t=this.game,e=t.events;this.canvas=t.canvas,this.scaleManager=t.scale,this.events.emit(o.MANAGER_BOOT),e.on(a.PRE_RENDER,this.preRender,this),e.once(a.DESTROY,this.destroy,this)},setCanvasOver:function(t){this.isOver=!0,this.events.emit(o.GAME_OVER,t)},setCanvasOut:function(t){this.isOver=!1,this.events.emit(o.GAME_OUT,t)},preRender:function(){var t=this.game.loop.now,e=this.game.loop.delta,i=this.game.scene.getScenes(!0,!0);this.time=t,this.events.emit(o.MANAGER_UPDATE);for(var s=0;s10&&(t=10-this.pointersTotal);for(var i=0;i{var s=i(26673),n=i(65650),r=i(56694),o=i(72687),a=i(27395),h=i(18104),l=i(53996),u=i(95669),c=i(72313),d=i(33963),p=i(6659),f=i(72632),v=i(52394),g=i(63399),m=i(42911),y=i(91963),x=i(74118),T=i(94287),w=i(7599),b=i(66349),E=i(60689),S=new r({Extends:p,initialize:function(t){p.call(this),this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.manager=t.sys.game.input,this.pluginEvents=new p,this.enabled=!0,this.displayList,this.cameras,g.install(this),this.mouse=this.manager.mouse,this.topOnly=!0,this.pollRate=-1,this._pollTimer=0;var e={cancelled:!1};this._eventContainer={stopPropagation:function(){e.cancelled=!0}},this._eventData=e,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this._temp=[],this._tempZones=[],this._list=[],this._pendingInsertion=[],this._pendingRemoval=[],this._draggable=[],this._drag={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._dragState=[],this._over={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[],8:[],9:[],10:[]},this._validTypes=["onDown","onUp","onOver","onOut","onMove","onDragStart","onDrag","onDragEnd","onDragEnter","onDragLeave","onDragOver","onDrop"],this._updatedThisFrame=!1,t.sys.events.once(w.BOOT,this.boot,this),t.sys.events.on(w.START,this.start,this)},boot:function(){this.cameras=this.systems.cameras,this.displayList=this.systems.displayList,this.systems.events.once(w.DESTROY,this.destroy,this),this.pluginEvents.emit(d.BOOT)},start:function(){var t=this.systems.events;t.on(w.TRANSITION_START,this.transitionIn,this),t.on(w.TRANSITION_OUT,this.transitionOut,this),t.on(w.TRANSITION_COMPLETE,this.transitionComplete,this),t.on(w.PRE_UPDATE,this.preUpdate,this),t.once(w.SHUTDOWN,this.shutdown,this),this.manager.events.on(d.GAME_OUT,this.onGameOut,this),this.manager.events.on(d.GAME_OVER,this.onGameOver,this),this.enabled=!0,this._dragState=[0,0,0,0,0,0,0,0,0,0],this.pluginEvents.emit(d.START)},onGameOver:function(t){this.isActive()&&this.emit(d.GAME_OVER,t.timeStamp,t)},onGameOut:function(t){this.isActive()&&this.emit(d.GAME_OUT,t.timeStamp,t)},preUpdate:function(){this.pluginEvents.emit(d.PRE_UPDATE);var t=this._pendingRemoval,e=this._pendingInsertion,i=t.length,s=e.length;if(0!==i||0!==s){for(var n=this._list,r=0;r-1&&(n.splice(a,1),this.clear(o,!0))}this._pendingRemoval.length=0,this._list=n.concat(e.splice(0))}},isActive:function(){return this.enabled&&this.scene.sys.canInput()},updatePoll:function(t,e){if(!this.isActive())return!1;if(this.pluginEvents.emit(d.UPDATE,t,e),this._updatedThisFrame)return this._updatedThisFrame=!1,!1;var i,s=this.manager,n=s.pointers,r=s.pointersTotal;for(i=0;i0){if(this._pollTimer-=e,!(this._pollTimer<0))return!1;this._pollTimer=this.pollRate}var a=!1;for(i=0;i0&&(a=!0)}return a},update:function(t,e){if(!this.isActive())return!1;for(var i=e.length,s=!1,n=0;n0&&(s=!0)}return this._updatedThisFrame=!0,s},clear:function(t,e){void 0===e&&(e=!1),this.disable(t);var i=t.input;i&&(this.removeDebug(t),i.gameObject=void 0,i.target=void 0,i.hitArea=void 0,i.hitAreaCallback=void 0,i.callbackContext=void 0,t.input=null),e||this.queueForRemoval(t);var s=this._draggable.indexOf(t);return s>-1&&this._draggable.splice(s,1),t},disable:function(t){var e=t.input;e&&(e.enabled=!1,e.dragState=0);var i=this._temp,s=this._drag,n=this._over,r=this.manager,o=i.indexOf(t);o>-1&&i.splice(o,1);for(var a=0;a-1&&s[a].splice(o,1),(o=n[a].indexOf(t))>-1&&(n[a].splice(o,1),r.resetCursor(e));return this},enable:function(t,e,i,s){return void 0===s&&(s=!1),t.input?t.input.enabled=!0:this.setHitArea(t,e,i),t.input&&s&&!t.input.dropZone&&(t.input.dropZone=s),this},hitTestPointer:function(t){for(var e=this.cameras.getCamerasBelowPointer(t),i=0;i0)return t.camera=s,n}return t.camera=e[0],[]},processDownEvents:function(t){var e=0,i=this._temp,s=this._eventData,n=this._eventContainer;s.cancelled=!1;for(var r=!1,o=0;o0&&l(t.x,t.y,t.downX,t.downY)>=n||s>0&&e>=t.downTime+s)&&(i=!0),i)return this.setDragState(t,3),this.processDragStartList(t)},processDragStartList:function(t){if(3!==this.getDragState(t))return 0;for(var e=this._drag[t.id],i=0;i1&&(this.sortGameObjects(i,t),this.topOnly&&i.splice(1)),this._drag[t.id]=i,0===this.dragDistanceThreshold&&0===this.dragTimeThreshold?(this.setDragState(t,3),this.processDragStartList(t)):(this.setDragState(t,2),0))},processDragMoveEvent:function(t){if(2===this.getDragState(t)&&this.processDragThresholdEvent(t,this.manager.game.loop.now),4!==this.getDragState(t))return 0;for(var e=this._tempZones,i=this._drag[t.id],s=0;s0?(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):(o.emit(d.GAMEOBJECT_DRAG_LEAVE,t,h),this.emit(d.DRAG_LEAVE,t,o,h),e[0]?(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h)):a.target=null)}else!h&&e[0]&&(a.target=e[0],h=a.target,o.emit(d.GAMEOBJECT_DRAG_ENTER,t,h),this.emit(d.DRAG_ENTER,t,o,h));if(o.parentContainer){var u=t.worldX-a.dragStartXGlobal,c=t.worldY-a.dragStartYGlobal,p=o.getParentRotation(),f=u*Math.cos(p)+c*Math.sin(p),v=c*Math.cos(p)-u*Math.sin(p);f*=1/o.parentContainer.scaleX,v*=1/o.parentContainer.scaleY,n=f+a.dragStartX,r=v+a.dragStartY}else n=t.worldX-a.dragX,r=t.worldY-a.dragY;o.emit(d.GAMEOBJECT_DRAG,t,n,r),this.emit(d.DRAG,t,o,n,r)}return i.length},processDragUpEvent:function(t){for(var e=this._drag[t.id],i=0;i0){var r=this.manager,o=this._eventData,a=this._eventContainer;o.cancelled=!1;for(var h=!1,l=0;l0){var n=this.manager,r=this._eventData,o=this._eventContainer;r.cancelled=!1;var a=!1;this.sortGameObjects(e,t);for(var h=0;h0){for(this.sortGameObjects(n,t),e=0;e0){for(this.sortGameObjects(r,t),e=0;e-1&&this._draggable.splice(n,1)}return this},makePixelPerfect:function(t){void 0===t&&(t=1);var e=this.systems.textures;return h(e,t)},setHitArea:function(t,e,i){if(void 0===e)return this.setHitAreaFromTexture(t);Array.isArray(t)||(t=[t]);var s=!1,n=!1,r=!1,o=!1,h=!1,l=!0;if(m(e)){var u=e;e=f(u,"hitArea",null),i=f(u,"hitAreaCallback",null),s=f(u,"draggable",!1),n=f(u,"dropZone",!1),r=f(u,"cursor",!1),o=f(u,"useHandCursor",!1),h=f(u,"pixelPerfect",!1);var c=f(u,"alphaTolerance",1);h&&(e={},i=this.makePixelPerfect(c)),e&&i||(this.setHitAreaFromTexture(t),l=!1)}else"function"!=typeof e||i||(i=e,e={});for(var d=0;d{var s=i(10850),n={},r={register:function(t,e,i,s,r){n[t]={plugin:e,mapping:i,settingsKey:s,configKey:r}},getPlugin:function(t){return n[t]},install:function(t){var e=t.scene.sys,i=e.settings.input,r=e.game.config;for(var o in n){var a=n[o].plugin,h=n[o].mapping,l=n[o].settingsKey,u=n[o].configKey;s(i,l,r[u])&&(t[h]=new a(t))}},remove:function(t){n.hasOwnProperty(t)&&delete n[t]}};t.exports=r},40398:(t,e,i)=>{var s=i(90447),n=i(56694),r=i(53996),o=i(88456),a=i(44521),h=i(93736),l=i(36580),u=new n({initialize:function(t,e){this.manager=t,this.id=e,this.event,this.downElement,this.upElement,this.camera=null,this.button=0,this.buttons=0,this.position=new h,this.prevPosition=new h,this.midPoint=new h(-1,-1),this.velocity=new h,this.angle=0,this.distance=0,this.smoothFactor=0,this.motionFactor=.2,this.worldX=0,this.worldY=0,this.moveTime=0,this.downX=0,this.downY=0,this.downTime=0,this.upX=0,this.upY=0,this.upTime=0,this.primaryDown=!1,this.isDown=!1,this.wasTouch=!1,this.wasCanceled=!1,this.movementX=0,this.movementY=0,this.identifier=0,this.pointerId=null,this.active=0===e,this.locked=!1,this.deltaX=0,this.deltaY=0,this.deltaZ=0},updateWorldPoint:function(t){var e=t.getWorldPoint(this.x,this.y);return this.worldX=e.x,this.worldY=e.y,this},positionToCamera:function(t,e){return t.getWorldPoint(this.x,this.y,e)},updateMotion:function(){var t=this.position.x,e=this.position.y,i=this.midPoint.x,n=this.midPoint.y;if(t!==i||e!==n){var r=a(this.motionFactor,i,t),h=a(this.motionFactor,n,e);o(r,t,.1)&&(r=t),o(h,e,.1)&&(h=e),this.midPoint.set(r,h);var l=t-r,u=e-h;this.velocity.set(l,u),this.angle=s(r,h,t,e),this.distance=Math.sqrt(l*l+u*u)}},up:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!1,this.upX=this.x,this.upY=this.y),0===this.buttons&&(this.isDown=!1,this.upTime=t.timeStamp,this.wasTouch=!1)},down:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.button=t.button,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),0===t.button&&(this.primaryDown=!0,this.downX=this.x,this.downY=this.y),l.macOS&&t.ctrlKey&&(this.buttons=2,this.primaryDown=!1),this.isDown||(this.isDown=!0,this.downTime=t.timeStamp),this.wasTouch=!1},move:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.locked&&(this.movementX=t.movementX||t.mozMovementX||t.webkitMovementX||0,this.movementY=t.movementY||t.mozMovementY||t.webkitMovementY||0),this.moveTime=t.timeStamp,this.wasTouch=!1},wheel:function(t){"buttons"in t&&(this.buttons=t.buttons),this.event=t,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.deltaX=t.deltaX,this.deltaY=t.deltaY,this.deltaZ=t.deltaZ,this.wasTouch=!1},touchstart:function(t,e){t.pointerId&&(this.pointerId=t.pointerId),this.identifier=t.identifier,this.target=t.target,this.active=!0,this.buttons=1,this.event=e,this.downElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!0,this.downX=this.x,this.downY=this.y,this.downTime=e.timeStamp,this.isDown=!0,this.wasTouch=!0,this.wasCanceled=!1,this.updateMotion()},touchmove:function(t,e){this.event=e,this.manager.transformPointer(this,t.pageX,t.pageY,!0),this.moveTime=e.timeStamp,this.wasTouch=!0,this.updateMotion()},touchend:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!1,this.active=!1,this.updateMotion()},touchcancel:function(t,e){this.buttons=0,this.event=e,this.upElement=t.target,this.manager.transformPointer(this,t.pageX,t.pageY,!1),this.primaryDown=!1,this.upX=this.x,this.upY=this.y,this.upTime=e.timeStamp,this.isDown=!1,this.wasTouch=!0,this.wasCanceled=!0,this.active=!1},noButtonDown:function(){return 0===this.buttons},leftButtonDown:function(){return!!(1&this.buttons)},rightButtonDown:function(){return!!(2&this.buttons)},middleButtonDown:function(){return!!(4&this.buttons)},backButtonDown:function(){return!!(8&this.buttons)},forwardButtonDown:function(){return!!(16&this.buttons)},leftButtonReleased:function(){return 0===this.button&&!this.isDown},rightButtonReleased:function(){return 2===this.button&&!this.isDown},middleButtonReleased:function(){return 1===this.button&&!this.isDown},backButtonReleased:function(){return 3===this.button&&!this.isDown},forwardButtonReleased:function(){return 4===this.button&&!this.isDown},getDistance:function(){return this.isDown?r(this.downX,this.downY,this.x,this.y):r(this.downX,this.downY,this.upX,this.upY)},getDistanceX:function(){return this.isDown?Math.abs(this.downX-this.x):Math.abs(this.downX-this.upX)},getDistanceY:function(){return this.isDown?Math.abs(this.downY-this.y):Math.abs(this.downY-this.upY)},getDuration:function(){return this.isDown?this.manager.time-this.downTime:this.upTime-this.downTime},getAngle:function(){return this.isDown?s(this.downX,this.downY,this.x,this.y):s(this.downX,this.downY,this.upX,this.upY)},getInterpolatedPosition:function(t,e){void 0===t&&(t=10),void 0===e&&(e=[]);for(var i=this.prevPosition.x,s=this.prevPosition.y,n=this.position.x,r=this.position.y,o=0;o{t.exports={MOUSE_DOWN:0,MOUSE_MOVE:1,MOUSE_UP:2,TOUCH_START:3,TOUCH_MOVE:4,TOUCH_END:5,POINTER_LOCK_CHANGE:6,TOUCH_CANCEL:7,MOUSE_WHEEL:8}},14874:t=>{t.exports="boot"},54168:t=>{t.exports="destroy"},526:t=>{t.exports="dragend"},81623:t=>{t.exports="dragenter"},94472:t=>{t.exports="drag"},9304:t=>{t.exports="dragleave"},34265:t=>{t.exports="dragover"},50151:t=>{t.exports="dragstart"},98134:t=>{t.exports="drop"},56773:t=>{t.exports="gameobjectdown"},45824:t=>{t.exports="dragend"},39578:t=>{t.exports="dragenter"},72072:t=>{t.exports="drag"},82569:t=>{t.exports="dragleave"},70833:t=>{t.exports="dragover"},81442:t=>{t.exports="dragstart"},32936:t=>{t.exports="drop"},99658:t=>{t.exports="gameobjectmove"},60515:t=>{t.exports="gameobjectout"},55254:t=>{t.exports="gameobjectover"},34782:t=>{t.exports="pointerdown"},41769:t=>{t.exports="pointermove"},65588:t=>{t.exports="pointerout"},61640:t=>{t.exports="pointerover"},49342:t=>{t.exports="pointerup"},82662:t=>{t.exports="wheel"},13058:t=>{t.exports="gameobjectup"},52426:t=>{t.exports="gameobjectwheel"},78072:t=>{t.exports="gameout"},1545:t=>{t.exports="gameover"},67137:t=>{t.exports="boot"},27678:t=>{t.exports="process"},22257:t=>{t.exports="update"},90379:t=>{t.exports="pointerlockchange"},88909:t=>{t.exports="pointerdown"},36548:t=>{t.exports="pointerdownoutside"},18483:t=>{t.exports="pointermove"},22355:t=>{t.exports="pointerout"},7997:t=>{t.exports="pointerover"},66318:t=>{t.exports="pointerup"},94812:t=>{t.exports="pointerupoutside"},37310:t=>{t.exports="wheel"},24196:t=>{t.exports="preupdate"},27053:t=>{t.exports="shutdown"},29413:t=>{t.exports="start"},25165:t=>{t.exports="update"},33963:(t,e,i)=>{t.exports={BOOT:i(14874),DESTROY:i(54168),DRAG_END:i(526),DRAG_ENTER:i(81623),DRAG:i(94472),DRAG_LEAVE:i(9304),DRAG_OVER:i(34265),DRAG_START:i(50151),DROP:i(98134),GAME_OUT:i(78072),GAME_OVER:i(1545),GAMEOBJECT_DOWN:i(56773),GAMEOBJECT_DRAG_END:i(45824),GAMEOBJECT_DRAG_ENTER:i(39578),GAMEOBJECT_DRAG:i(72072),GAMEOBJECT_DRAG_LEAVE:i(82569),GAMEOBJECT_DRAG_OVER:i(70833),GAMEOBJECT_DRAG_START:i(81442),GAMEOBJECT_DROP:i(32936),GAMEOBJECT_MOVE:i(99658),GAMEOBJECT_OUT:i(60515),GAMEOBJECT_OVER:i(55254),GAMEOBJECT_POINTER_DOWN:i(34782),GAMEOBJECT_POINTER_MOVE:i(41769),GAMEOBJECT_POINTER_OUT:i(65588),GAMEOBJECT_POINTER_OVER:i(61640),GAMEOBJECT_POINTER_UP:i(49342),GAMEOBJECT_POINTER_WHEEL:i(82662),GAMEOBJECT_UP:i(13058),GAMEOBJECT_WHEEL:i(52426),MANAGER_BOOT:i(67137),MANAGER_PROCESS:i(27678),MANAGER_UPDATE:i(22257),POINTER_DOWN:i(88909),POINTER_DOWN_OUTSIDE:i(36548),POINTER_MOVE:i(18483),POINTER_OUT:i(22355),POINTER_OVER:i(7997),POINTER_UP:i(66318),POINTER_UP_OUTSIDE:i(94812),POINTER_WHEEL:i(37310),POINTERLOCK_CHANGE:i(90379),PRE_UPDATE:i(24196),SHUTDOWN:i(27053),START:i(29413),UPDATE:i(25165)}},70848:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e){this.pad=t,this.events=t.events,this.index=e,this.value=0,this.threshold=.1},update:function(t){this.value=t},getValue:function(){return Math.abs(this.value){var s=i(56694),n=i(43200),r=new s({initialize:function(t,e){this.pad=t,this.events=t.manager,this.index=e,this.value=0,this.threshold=1,this.pressed=!1},update:function(t){this.value=t;var e=this.pad,i=this.index;t>=this.threshold?this.pressed||(this.pressed=!0,this.events.emit(n.BUTTON_DOWN,e,this,t),this.pad.emit(n.GAMEPAD_BUTTON_DOWN,i,t,this)):this.pressed&&(this.pressed=!1,this.events.emit(n.BUTTON_UP,e,this,t),this.pad.emit(n.GAMEPAD_BUTTON_UP,i,t,this))},destroy:function(){this.pad=null,this.events=null}});t.exports=r},75956:(t,e,i)=>{var s=i(70848),n=i(21274),r=i(56694),o=i(6659),a=i(93736),h=new r({Extends:o,initialize:function(t,e){o.call(this),this.manager=t,this.pad=e,this.id=e.id,this.index=e.index;for(var i=[],r=0;r=2&&(this.leftStick.set(r[0].getValue(),r[1].getValue()),n>=4&&this.rightStick.set(r[2].getValue(),r[3].getValue()))}},destroy:function(){var t;for(this.removeAllListeners(),this.manager=null,this.pad=null,t=0;t{var s=i(56694),n=i(6659),r=i(43200),o=i(75956),a=i(10850),h=i(63399),l=i(33963),u=new s({Extends:n,initialize:function(t){n.call(this),this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.enabled=!0,this.target,this.gamepads=[],this.queue=[],this.onGamepadHandler,this._pad1,this._pad2,this._pad3,this._pad4,t.pluginEvents.once(l.BOOT,this.boot,this),t.pluginEvents.on(l.START,this.start,this)},boot:function(){var t=this.scene.sys.game,e=this.settings.input,i=t.config;this.enabled=a(e,"gamepad",i.inputGamepad)&&t.device.input.gamepads,this.target=a(e,"gamepad.target",i.inputGamepadEventTarget),this.sceneInputPlugin.pluginEvents.once(l.DESTROY,this.destroy,this)},start:function(){this.enabled&&(this.startListeners(),this.refreshPads()),this.sceneInputPlugin.pluginEvents.once(l.SHUTDOWN,this.shutdown,this)},isActive:function(){return this.enabled&&this.scene.sys.isActive()},startListeners:function(){var t=this,e=this.target,i=function(e){!e.defaultPrevented&&t.isActive()&&(t.refreshPads(),t.queue.push(e))};this.onGamepadHandler=i,e.addEventListener("gamepadconnected",i,!1),e.addEventListener("gamepaddisconnected",i,!1),this.sceneInputPlugin.pluginEvents.on(l.UPDATE,this.update,this)},stopListeners:function(){this.target.removeEventListener("gamepadconnected",this.onGamepadHandler),this.target.removeEventListener("gamepaddisconnected",this.onGamepadHandler),this.sceneInputPlugin.pluginEvents.off(l.UPDATE,this.update);for(var t=0;t{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SELECT:8,START:9,B:0,A:1,Y:2,X:3,LEFT_SHOULDER:4,RIGHT_SHOULDER:5}},74982:t=>{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,SHARE:8,OPTIONS:9,PS:16,TOUCHBAR:17,X:0,CIRCLE:1,SQUARE:2,TRIANGLE:3,L1:4,R1:5,L2:6,R2:7,L3:10,R3:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},43247:t=>{t.exports={UP:12,DOWN:13,LEFT:14,RIGHT:15,MENU:16,A:0,B:1,X:2,Y:3,LB:4,RB:5,LT:6,RT:7,BACK:8,START:9,LS:10,RS:11,LEFT_STICK_H:0,LEFT_STICK_V:1,RIGHT_STICK_H:2,RIGHT_STICK_V:3}},4898:(t,e,i)=>{t.exports={DUALSHOCK_4:i(74982),SNES_USB:i(33171),XBOX_360:i(43247)}},17344:t=>{t.exports="down"},36635:t=>{t.exports="up"},85724:t=>{t.exports="connected"},55832:t=>{t.exports="disconnected"},772:t=>{t.exports="down"},33608:t=>{t.exports="up"},43200:(t,e,i)=>{t.exports={BUTTON_DOWN:i(17344),BUTTON_UP:i(36635),CONNECTED:i(85724),DISCONNECTED:i(55832),GAMEPAD_BUTTON_DOWN:i(772),GAMEPAD_BUTTON_UP:i(33608)}},92636:(t,e,i)=>{t.exports={Axis:i(70848),Button:i(21274),Events:i(43200),Gamepad:i(75956),GamepadPlugin:i(1379),Configs:i(4898)}},20873:(t,e,i)=>{var s=i(72687),n=i(98611),r={CreatePixelPerfectHandler:i(18104),CreateInteractiveObject:i(27395),Events:i(33963),Gamepad:i(92636),InputManager:i(69898),InputPlugin:i(12499),InputPluginCache:i(63399),Keyboard:i(28388),Mouse:i(11343),Pointer:i(40398),Touch:i(77423)};r=n(!1,r,s),t.exports=r},71064:(t,e,i)=>{var s=i(66458),n=i(56694),r=i(97081),o=i(33963),a=i(11873),h=i(72283),l=new n({initialize:function(t){this.manager=t,this.queue=[],this.preventDefault=!0,this.captures=[],this.enabled=!1,this.target,this.onKeyDown=h,this.onKeyUp=h,t.events.once(o.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputKeyboard,this.target=t.inputKeyboardEventTarget,this.addCapture(t.inputKeyboardCapture),!this.target&&window&&(this.target=window),this.enabled&&this.target&&this.startListeners(),this.manager.game.events.on(r.POST_STEP,this.postUpdate,this)},startListeners:function(){var t=this;this.onKeyDown=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}},this.onKeyUp=function(e){if(!e.defaultPrevented&&t.enabled&&t.manager){t.queue.push(e),t.manager.events.emit(o.MANAGER_PROCESS);var i=e.altKey||e.ctrlKey||e.shiftKey||e.metaKey;t.preventDefault&&!i&&t.captures.indexOf(e.keyCode)>-1&&e.preventDefault()}};var e=this.target;e&&(e.addEventListener("keydown",this.onKeyDown,!1),e.addEventListener("keyup",this.onKeyUp,!1),this.enabled=!0)},stopListeners:function(){var t=this.target;t.removeEventListener("keydown",this.onKeyDown,!1),t.removeEventListener("keyup",this.onKeyUp,!1),this.enabled=!1},postUpdate:function(){this.queue=[]},addCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},removeCapture:function(t){"string"==typeof t&&(t=t.split(",")),Array.isArray(t)||(t=[t]);for(var e=this.captures,i=0;i0},clearCaptures:function(){this.captures=[],this.preventDefault=!1},destroy:function(){this.stopListeners(),this.clearCaptures(),this.queue=[],this.manager.game.events.off(r.POST_RENDER,this.postUpdate,this),this.target=null,this.enabled=!1,this.manager=null}});t.exports=l},89666:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(94030),o=i(97081),a=i(10850),h=i(33963),l=i(63399),u=i(50165),c=i(11873),d=i(95625),p=i(48044),f=i(7599),v=i(84314),g=new s({Extends:n,initialize:function(t){n.call(this),this.game=t.systems.game,this.scene=t.scene,this.settings=this.scene.sys.settings,this.sceneInputPlugin=t,this.manager=t.manager.keyboard,this.enabled=!0,this.keys=[],this.combos=[],this.prevCode=null,this.prevTime=0,this.prevType=null,t.pluginEvents.once(h.BOOT,this.boot,this),t.pluginEvents.on(h.START,this.start,this)},boot:function(){var t=this.settings.input;this.enabled=a(t,"keyboard",!0);var e=a(t,"keyboard.capture",null);e&&this.addCaptures(e),this.sceneInputPlugin.pluginEvents.once(h.DESTROY,this.destroy,this)},start:function(){this.sceneInputPlugin.manager.events.on(h.MANAGER_PROCESS,this.update,this),this.sceneInputPlugin.pluginEvents.once(h.SHUTDOWN,this.shutdown,this),this.game.events.on(o.BLUR,this.resetKeys,this),this.scene.sys.events.on(f.PAUSE,this.resetKeys,this),this.scene.sys.events.on(f.SLEEP,this.resetKeys,this)},isActive:function(){return this.enabled&&this.scene.sys.canInput()},addCapture:function(t){return this.manager.addCapture(t),this},removeCapture:function(t){return this.manager.removeCapture(t),this},getCaptures:function(){return this.manager.captures},enableGlobalCapture:function(){return this.manager.preventDefault=!0,this},disableGlobalCapture:function(){return this.manager.preventDefault=!1,this},clearCaptures:function(){return this.manager.clearCaptures(),this},createCursorKeys:function(){return this.addKeys({up:c.UP,down:c.DOWN,left:c.LEFT,right:c.RIGHT,space:c.SPACE,shift:c.SHIFT})},addKeys:function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var s={};if("string"==typeof t){t=t.split(",");for(var n=0;n-1?s[n]=t:s[t.keyCode]=t,e&&this.addCapture(t.keyCode),t.setEmitOnRepeat(i),t}return"string"==typeof t&&(t=c[t.toUpperCase()]),s[t]||(s[t]=new u(this,t),e&&this.addCapture(t),s[t].setEmitOnRepeat(i)),s[t]},removeKey:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var s,n=this.keys;if(t instanceof u){var r=n.indexOf(t);r>-1&&(s=this.keys[r],this.keys[r]=void 0)}else"string"==typeof t&&(t=c[t.toUpperCase()]);return n[t]&&(s=n[t],n[t]=void 0),s&&(s.plugin=null,i&&this.removeCapture(s.keyCode),e&&s.destroy()),this},removeAllKeys:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);for(var i=this.keys,s=0;st._tick)return t._tick=i,!0}return!1},update:function(){var t=this.manager.queue,e=t.length;if(this.isActive()&&0!==e)for(var i=this.keys,s=0;s{t.exports=function(t,e){return e.timeLastMatched=t.timeStamp,e.index++,e.index===e.size||(e.current=e.keyCodes[e.index],!1)}},95625:(t,e,i)=>{var s=i(56694),n=i(94030),r=i(72632),o=i(2544),a=i(88754),h=new s({initialize:function(t,e,i){if(void 0===i&&(i={}),e.length<2)return!1;this.manager=t,this.enabled=!0,this.keyCodes=[];for(var s=0;s{var s=i(60258);t.exports=function(t,e){if(e.matched)return!0;var i=!1,n=!1;if(t.keyCode===e.current)if(e.index>0&&e.maxKeyDelay>0){var r=e.timeLastMatched+e.maxKeyDelay;t.timeStamp<=r&&(n=!0,i=s(t,e))}else n=!0,i=s(t,e);return!n&&e.resetOnWrongKey&&(e.index=0,e.current=e.keyCodes[0]),i&&(e.timeLastMatched=t.timeStamp,e.matched=!0,e.timeMatched=t.timeStamp),i}},88754:t=>{t.exports=function(t){return t.current=t.keyCodes[0],t.index=0,t.timeLastMatched=0,t.matched=!1,t.timeMatched=0,t}},5044:t=>{t.exports="keydown"},40813:t=>{t.exports="keyup"},89319:t=>{t.exports="keycombomatch"},43267:t=>{t.exports="down"},78595:t=>{t.exports="keydown-"},30056:t=>{t.exports="keyup-"},81939:t=>{t.exports="up"},94030:(t,e,i)=>{t.exports={ANY_KEY_DOWN:i(5044),ANY_KEY_UP:i(40813),COMBO_MATCH:i(89319),DOWN:i(43267),KEY_DOWN:i(78595),KEY_UP:i(30056),UP:i(81939)}},28388:(t,e,i)=>{t.exports={Events:i(94030),KeyboardManager:i(71064),KeyboardPlugin:i(89666),Key:i(50165),KeyCodes:i(11873),KeyCombo:i(95625),AdvanceKeyCombo:i(60258),ProcessKeyCombo:i(2544),ResetKeyCombo:i(88754),JustDown:i(42460),JustUp:i(53162),DownDuration:i(64964),UpDuration:i(70331)}},64964:t=>{t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeDown;return t.isDown&&i{t.exports=function(t){return!!t._justDown&&(t._justDown=!1,!0)}},53162:t=>{t.exports=function(t){return!!t._justUp&&(t._justUp=!1,!0)}},50165:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(94030),o=new s({Extends:n,initialize:function(t,e){n.call(this),this.plugin=t,this.keyCode=e,this.originalEvent=void 0,this.enabled=!0,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.location=0,this.timeDown=0,this.duration=0,this.timeUp=0,this.emitOnRepeat=!1,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1},setEmitOnRepeat:function(t){return this.emitOnRepeat=t,this},onDown:function(t){this.originalEvent=t,this.enabled&&(this.altKey=t.altKey,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.metaKey=t.metaKey,this.location=t.location,this.repeats++,this.isDown?this.emitOnRepeat&&this.emit(r.DOWN,this,t):(this.isDown=!0,this.isUp=!1,this.timeDown=t.timeStamp,this.duration=0,this._justDown=!0,this._justUp=!1,this.emit(r.DOWN,this,t)))},onUp:function(t){this.originalEvent=t,this.enabled&&(this.isDown=!1,this.isUp=!0,this.timeUp=t.timeStamp,this.duration=this.timeUp-this.timeDown,this.repeats=0,this._justDown=!1,this._justUp=!0,this._tick=-1,this.emit(r.UP,this,t))},reset:function(){return this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.metaKey=!1,this.timeDown=0,this.duration=0,this.timeUp=0,this.repeats=0,this._justDown=!1,this._justUp=!1,this._tick=-1,this},getDuration:function(){return this.isDown?this.plugin.game.loop.time-this.timeDown:0},destroy:function(){this.removeAllListeners(),this.originalEvent=null,this.plugin=null}});t.exports=o},11873:t=>{t.exports={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:42,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,NUMPAD_ZERO:96,NUMPAD_ONE:97,NUMPAD_TWO:98,NUMPAD_THREE:99,NUMPAD_FOUR:100,NUMPAD_FIVE:101,NUMPAD_SIX:102,NUMPAD_SEVEN:103,NUMPAD_EIGHT:104,NUMPAD_NINE:105,NUMPAD_ADD:107,NUMPAD_SUBTRACT:109,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,PLUS:187,COMMA:188,MINUS:189,PERIOD:190,FORWARD_SLASH:191,BACK_SLASH:220,QUOTES:222,BACKTICK:192,OPEN_BRACKET:219,CLOSED_BRACKET:221,SEMICOLON_FIREFOX:59,COLON:58,COMMA_FIREFOX_WINDOWS:60,COMMA_FIREFOX:62,BRACKET_RIGHT_FIREFOX:174,BRACKET_LEFT_FIREFOX:175}},48044:(t,e,i)=>{var s=i(11873),n={};for(var r in s)n[s[r]]=r;t.exports=n},70331:t=>{t.exports=function(t,e){void 0===e&&(e=50);var i=t.plugin.game.loop.time-t.timeUp;return t.isUp&&i{var s=i(56694),n=i(90185),r=i(33963),o=i(72283),a=new s({initialize:function(t){this.manager=t,this.preventDefaultDown=!0,this.preventDefaultUp=!0,this.preventDefaultMove=!0,this.preventDefaultWheel=!1,this.enabled=!1,this.target,this.locked=!1,this.onMouseMove=o,this.onMouseDown=o,this.onMouseUp=o,this.onMouseDownWindow=o,this.onMouseUpWindow=o,this.onMouseOver=o,this.onMouseOut=o,this.onMouseWheel=o,this.pointerLockChange=o,this.isTop=!0,t.events.once(r.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputMouse,this.target=t.inputMouseEventTarget,this.passive=t.inputMousePassive,this.preventDefaultDown=t.inputMousePreventDefaultDown,this.preventDefaultUp=t.inputMousePreventDefaultUp,this.preventDefaultMove=t.inputMousePreventDefaultMove,this.preventDefaultWheel=t.inputMousePreventDefaultWheel,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",(function(t){return t.preventDefault(),!1})),this},requestPointerLock:function(){if(n.pointerLock){var t=this.target;t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock,t.requestPointerLock()}},releasePointerLock:function(){n.pointerLock&&(document.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock,document.exitPointerLock())},startListeners:function(){var t=this.target;if(t){var e=this,i=this.manager,s=i.canvas,r=window&&window.focus&&i.game.config.autoFocus;this.onMouseMove=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseMove(t),e.preventDefaultMove&&t.preventDefault())},this.onMouseDown=function(t){r&&window.focus(),!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseDown(t),e.preventDefaultDown&&t.target===s&&t.preventDefault())},this.onMouseDownWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onMouseDown(t)},this.onMouseUp=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onMouseUp(t),e.preventDefaultUp&&t.target===s&&t.preventDefault())},this.onMouseUpWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onMouseUp(t)},this.onMouseOver=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOver(t)},this.onMouseOut=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.setCanvasOut(t)},this.onMouseWheel=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onMouseWheel(t),e.preventDefaultWheel&&t.target===s&&t.preventDefault()};var o={passive:!0};if(t.addEventListener("mousemove",this.onMouseMove),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("mouseover",this.onMouseOver,o),t.addEventListener("mouseout",this.onMouseOut,o),this.preventDefaultWheel?t.addEventListener("wheel",this.onMouseWheel,{passive:!1}):t.addEventListener("wheel",this.onMouseWheel,o),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("mousedown",this.onMouseDownWindow,o),window.top.addEventListener("mouseup",this.onMouseUpWindow,o)}catch(t){window.addEventListener("mousedown",this.onMouseDownWindow,o),window.addEventListener("mouseup",this.onMouseUpWindow,o),this.isTop=!1}n.pointerLock&&(this.pointerLockChange=function(t){var s=e.target;e.locked=document.pointerLockElement===s||document.mozPointerLockElement===s||document.webkitPointerLockElement===s,i.onPointerLockChange(t)},document.addEventListener("pointerlockchange",this.pointerLockChange,!0),document.addEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.addEventListener("webkitpointerlockchange",this.pointerLockChange,!0)),this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mousedown",this.onMouseDown),t.removeEventListener("mouseup",this.onMouseUp),t.removeEventListener("mouseover",this.onMouseOver),t.removeEventListener("mouseout",this.onMouseOut),window&&((t=this.isTop?window.top:window).removeEventListener("mousedown",this.onMouseDownWindow),t.removeEventListener("mouseup",this.onMouseUpWindow)),n.pointerLock&&(document.removeEventListener("pointerlockchange",this.pointerLockChange,!0),document.removeEventListener("mozpointerlockchange",this.pointerLockChange,!0),document.removeEventListener("webkitpointerlockchange",this.pointerLockChange,!0))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=a},11343:(t,e,i)=>{t.exports={MouseManager:i(7905)}},37579:(t,e,i)=>{var s=i(56694),n=i(33963),r=i(72283),o=new s({initialize:function(t){this.manager=t,this.capture=!0,this.enabled=!1,this.target,this.onTouchStart=r,this.onTouchStartWindow=r,this.onTouchMove=r,this.onTouchEnd=r,this.onTouchEndWindow=r,this.onTouchCancel=r,this.onTouchCancelWindow=r,this.isTop=!0,t.events.once(n.MANAGER_BOOT,this.boot,this)},boot:function(){var t=this.manager.config;this.enabled=t.inputTouch,this.target=t.inputTouchEventTarget,this.capture=t.inputTouchCapture,this.target?"string"==typeof this.target&&(this.target=document.getElementById(this.target)):this.target=this.manager.game.canvas,t.disableContextMenu&&this.disableContextMenu(),this.enabled&&this.target&&this.startListeners()},disableContextMenu:function(){return this.target.addEventListener("contextmenu",(function(t){return t.preventDefault(),!1})),this},startListeners:function(){var t=this.target;if(t){var e=this,i=this.manager,s=i.canvas,n=window&&window.focus&&i.game.config.autoFocus;this.onTouchMove=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchMove(t),e.capture&&t.cancelable&&t.preventDefault())},this.onTouchStart=function(t){n&&window.focus(),!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchStart(t),e.capture&&t.cancelable&&t.target===s&&t.preventDefault())},this.onTouchStartWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onTouchStart(t)},this.onTouchEnd=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchEnd(t),e.capture&&t.cancelable&&t.target===s&&t.preventDefault())},this.onTouchEndWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&t.target!==s&&i.onTouchEnd(t)},this.onTouchCancel=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&(i.onTouchCancel(t),e.capture&&t.preventDefault())},this.onTouchCancelWindow=function(t){!t.defaultPrevented&&e.enabled&&i&&i.enabled&&i.onTouchCancel(t)};var r=this.capture,o={passive:!0},a={passive:!1};if(t.addEventListener("touchstart",this.onTouchStart,r?a:o),t.addEventListener("touchmove",this.onTouchMove,r?a:o),t.addEventListener("touchend",this.onTouchEnd,r?a:o),t.addEventListener("touchcancel",this.onTouchCancel,r?a:o),window&&i.game.config.inputWindowEvents)try{window.top.addEventListener("touchstart",this.onTouchStartWindow,a),window.top.addEventListener("touchend",this.onTouchEndWindow,a),window.top.addEventListener("touchcancel",this.onTouchCancelWindow,a)}catch(t){window.addEventListener("touchstart",this.onTouchStartWindow,a),window.addEventListener("touchend",this.onTouchEndWindow,a),window.addEventListener("touchcancel",this.onTouchCancelWindow,a),this.isTop=!1}this.enabled=!0}},stopListeners:function(){var t=this.target;t.removeEventListener("touchstart",this.onTouchStart),t.removeEventListener("touchmove",this.onTouchMove),t.removeEventListener("touchend",this.onTouchEnd),t.removeEventListener("touchcancel",this.onTouchCancel),window&&((t=this.isTop?window.top:window).removeEventListener("touchstart",this.onTouchStartWindow),t.removeEventListener("touchend",this.onTouchEndWindow),t.removeEventListener("touchcancel",this.onTouchCancelWindow))},destroy:function(){this.stopListeners(),this.target=null,this.enabled=!1,this.manager=null}});t.exports=o},77423:(t,e,i)=>{t.exports={TouchManager:i(37579)}},98035:(t,e,i)=>{var s=i(56694),n=i(12117),r=i(683),o=i(72632),a=i(30750),h=i(43531),l=i(88490),u=i(33868),c=new s({initialize:function(t,e){if(this.loader=t,this.cache=o(e,"cache",!1),this.type=o(e,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=o(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.key)throw new Error("Invalid File key: "+this.key);var s=o(e,"url");void 0===s?s=t.path+i+"."+o(e,"extension",""):"string"!=typeof s||s.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(s=t.path+s),this.url=s,this.src="",this.xhrSettings=u(o(e,"responseType",void 0)),o(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,o(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?n.FILE_POPULATED:n.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=o(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===n.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=n.FILE_LOADING,this.src=a(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&this.loader.localSchemes.some((function(e){return 0===t.responseURL.indexOf(e)}))&&0===e.target.status,s=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(s=!1),this.state=n.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,s)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(r.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=n.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=n.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=n.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(t){if(this.state!==n.FILE_PENDING_DESTROY){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(r.FILE_COMPLETE,e,i,t),this.loader.emit(r.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this),this.state=n.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var s=new FileReader;s.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+s.result.split(",")[1]},s.onerror=t.onerror,s.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},76846:t=>{var e={},i={install:function(t){for(var i in e)t[i]=e[i]},register:function(t,i){e[t]=i},destroy:function(){e={}}};t.exports=i},30750:t=>{t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},67285:(t,e,i)=>{var s=i(56694),n=i(12117),r=i(58403),o=i(6659),a=i(683),h=i(76846),l=i(72632),u=i(10850),c=i(91963),d=i(7599),p=i(33868),f=new s({Extends:o,initialize:function(t){o.call(this);var e=t.sys.game.config,i=t.sys.settings.loader;this.scene=t,this.systems=t.sys,this.cacheManager=t.sys.cache,this.textureManager=t.sys.textures,this.sceneManager=t.sys.game.scene,h.install(this),this.prefix="",this.path="",this.baseURL="",this.setBaseURL(l(i,"baseURL",e.loaderBaseURL)),this.setPath(l(i,"path",e.loaderPath)),this.setPrefix(l(i,"prefix",e.loaderPrefix)),this.maxParallelDownloads=l(i,"maxParallelDownloads",e.loaderMaxParallelDownloads),this.xhr=p(l(i,"responseType",e.loaderResponseType),l(i,"async",e.loaderAsync),l(i,"user",e.loaderUser),l(i,"password",e.loaderPassword),l(i,"timeout",e.loaderTimeout),l(i,"withCredentials",e.loaderWithCredentials)),this.crossOrigin=l(i,"crossOrigin",e.loaderCrossOrigin),this.imageLoadType=l(i,"imageLoadType",e.loaderImageLoadType),this.localSchemes=l(i,"localScheme",e.loaderLocalScheme),this.totalToLoad=0,this.progress=0,this.list=new r,this.inflight=new r,this.queue=new r,this._deleteQueue=new r,this.totalFailed=0,this.totalComplete=0,this.state=n.LOADER_IDLE,this.multiKeyIndex=0,t.sys.events.once(d.BOOT,this.boot,this),t.sys.events.on(d.START,this.pluginStart,this)},boot:function(){this.systems.events.once(d.DESTROY,this.destroy,this)},pluginStart:function(){this.systems.events.once(d.SHUTDOWN,this.shutdown,this)},setBaseURL:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.baseURL=t,this},setPath:function(t){return void 0===t&&(t=""),""!==t&&"/"!==t.substr(-1)&&(t=t.concat("/")),this.path=t,this},setPrefix:function(t){return void 0===t&&(t=""),this.prefix=t,this},setCORS:function(t){return this.crossOrigin=t,this},addFile:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e0},isLoading:function(){return this.state===n.LOADER_LOADING||this.state===n.LOADER_PROCESSING},isReady:function(){return this.state===n.LOADER_IDLE||this.state===n.LOADER_COMPLETE},start:function(){this.isReady()&&(this.progress=0,this.totalFailed=0,this.totalComplete=0,this.totalToLoad=this.list.size,this.emit(a.START,this),0===this.list.size?this.loadComplete():(this.state=n.LOADER_LOADING,this.inflight.clear(),this.queue.clear(),this.updateProgress(),this.checkLoadQueue(),this.systems.events.on(d.UPDATE,this.update,this)))},updateProgress:function(){this.progress=1-(this.list.size+this.inflight.size)/this.totalToLoad,this.emit(a.PROGRESS,this.progress)},update:function(){this.state===n.LOADER_LOADING&&this.list.size>0&&this.inflight.size{var s=i(98611),n=i(33868);t.exports=function(t,e){var i=void 0===t?n():s({},t);if(e)for(var r in e)void 0!==e[r]&&(i[r]=e[r]);return i}},45176:(t,e,i)=>{var s=i(56694),n=i(12117),r=i(683),o=new s({initialize:function(t,e,i,s){var r=[];s.forEach((function(t){t&&r.push(t)})),this.loader=t,this.type=e,this.key=i,this.multiKeyIndex=t.multiKeyIndex++,this.files=r,this.state=n.FILE_PENDING,this.complete=!1,this.pending=r.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var o=0;o{var s=i(43531);t.exports=function(t,e){var i=s(e,t.xhrSettings),n=new XMLHttpRequest;if(n.open("GET",t.src,i.async,i.user,i.password),n.responseType=t.xhrSettings.responseType,n.timeout=i.timeout,i.headers)for(var r in i.headers)n.setRequestHeader(r,i.headers[r]);return i.header&&i.headerValue&&n.setRequestHeader(i.header,i.headerValue),i.requestedWith&&n.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&n.overrideMimeType(i.overrideMimeType),i.withCredentials&&(n.withCredentials=!0),n.onload=t.onLoad.bind(t,n),n.onerror=t.onError.bind(t,n),n.onprogress=t.onProgress.bind(t),n.send(),n}},33868:t=>{t.exports=function(t,e,i,s,n,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===s&&(s=""),void 0===n&&(n=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:s,timeout:n,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},12117:t=>{t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20}},7398:t=>{t.exports="addfile"},52187:t=>{t.exports="complete"},36627:t=>{t.exports="filecomplete"},81925:t=>{t.exports="filecomplete-"},29774:t=>{t.exports="loaderror"},20943:t=>{t.exports="load"},74693:t=>{t.exports="fileprogress"},71176:t=>{t.exports="postprocess"},88984:t=>{t.exports="progress"},72753:t=>{t.exports="start"},683:(t,e,i)=>{t.exports={ADD:i(7398),COMPLETE:i(52187),FILE_COMPLETE:i(36627),FILE_KEY_COMPLETE:i(81925),FILE_LOAD_ERROR:i(29774),FILE_LOAD:i(20943),FILE_PROGRESS:i(74693),POST_PROCESS:i(71176),PROGRESS:i(88984),START:i(72753)}},46468:(t,e,i)=>{var s=i(56694),n=i(76846),r=i(70806),o=i(683),a=new s({Extends:r,initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.type="animationJSON"},onProcess:function(){this.loader.once(o.POST_PROCESS,this.onLoadComplete,this),r.prototype.onProcess.call(this)},onLoadComplete:function(){this.loader.systems.anims.fromJSON(this.data)}});n.register("animation",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(70806),l=i(45176),u=new s({Extends:l,initialize:function(t,e,i,s,n,u){var c,d;if(a(e)){var p=e;e=r(p,"key"),c=new o(t,{key:e,url:r(p,"textureURL"),extension:r(p,"textureExtension","png"),normalMap:r(p,"normalMap"),xhrSettings:r(p,"textureXhrSettings")}),d=new h(t,{key:e,url:r(p,"atlasURL"),extension:r(p,"atlasExtension","json"),xhrSettings:r(p,"atlasXhrSettings")})}else c=new o(t,e,i,n),d=new h(t,e,s,u);c.linkFile?l.call(this,t,"atlasjson",e,[c,d,c.linkFile]):l.call(this,t,"atlasjson",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),e.addToCache(),this.complete=!0}}});n.register("aseprite",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(70806),l=i(45176),u=new s({Extends:l,initialize:function(t,e,i,s,n,u){var c,d;if(a(e)){var p=e;e=r(p,"key"),c=new o(t,{key:e,url:r(p,"textureURL"),extension:r(p,"textureExtension","png"),normalMap:r(p,"normalMap"),xhrSettings:r(p,"textureXhrSettings")}),d=new h(t,{key:e,url:r(p,"atlasURL"),extension:r(p,"atlasExtension","json"),xhrSettings:r(p,"atlasXhrSettings")})}else c=new o(t,e,i,n),d=new h(t,e,s,u);c.linkFile?l.call(this,t,"atlasjson",e,[c,d,c.linkFile]):l.call(this,t,"atlasjson",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlas(t.key,t.data,e.data,i),this.complete=!0}}});n.register("atlas",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(45176),l=i(15297),u=new s({Extends:h,initialize:function(t,e,i,s,n,u){var c,d;if(a(e)){var p=e;e=r(p,"key"),c=new o(t,{key:e,url:r(p,"textureURL"),extension:r(p,"textureExtension","png"),normalMap:r(p,"normalMap"),xhrSettings:r(p,"textureXhrSettings")}),d=new l(t,{key:e,url:r(p,"atlasURL"),extension:r(p,"atlasExtension","xml"),xhrSettings:r(p,"atlasXhrSettings")})}else c=new o(t,e,i,n),d=new l(t,e,s,u);c.linkFile?h.call(this,t,"atlasxml",e,[c,d,c.linkFile]):h.call(this,t,"atlasxml",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addAtlasXML(t.key,t.data,e.data,i),this.complete=!0}}});n.register("atlasXML",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(30929),l=i(42911),u=new s({Extends:r,initialize:function(t,e,i,s,n){if(l(e)){var o=e;e=a(o,"key"),s=a(o,"xhrSettings"),n=a(o,"context",n)}var h={type:"audio",cache:t.cacheManager.audio,extension:i.type,responseType:"arraybuffer",key:e,url:i.url,xhrSettings:s,config:{context:n}};r.call(this,t,h)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this;this.config.context.decodeAudioData(this.xhrLoader.response,(function(e){t.data=e,t.onProcessComplete()}),(function(e){console.error("Error decoding audio: "+t.key+" - ",e?e.message:null),t.onProcessError()})),this.config.context=null}});u.create=function(t,e,i,s,n){var r=t.systems.game,o=r.config.audio,c=r.device.audio;l(e)&&(i=a(e,"url",[]),s=a(e,"config",{}));var d=u.getAudioURL(r,i);return d?c.webAudio&&!o.disableWebAudio?new u(t,e,d,n,r.sound.context):new h(t,e,d,s):null},u.getAudioURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i{var s=i(67448),n=i(56694),r=i(76846),o=i(72632),a=i(42911),h=i(70806),l=i(45176),u=new n({Extends:l,initialize:function(t,e,i,n,r,u,c){if(a(e)){var d=e;e=o(d,"key"),i=o(d,"jsonURL"),n=o(d,"audioURL"),r=o(d,"audioConfig"),u=o(d,"audioXhrSettings"),c=o(d,"jsonXhrSettings")}var p;if(n){var f=s.create(t,e,n,r,u);f&&(p=new h(t,e,i,c),l.call(this,t,"audiosprite",e,[f,p]),this.config.resourceLoad=!1)}else p=new h(t,e,i,c),l.call(this,t,"audiosprite",e,[p]),this.config.resourceLoad=!0,this.config.audioConfig=r,this.config.audioXhrSettings=u},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,this.config.resourceLoad&&"json"===t.type&&t.data.hasOwnProperty("resources"))){var e=t.data.resources,i=o(this.config,"audioConfig"),n=o(this.config,"audioXhrSettings"),r=s.create(this.loader,t.key,e,i,n);r&&(this.addToMultiFile(r),this.loader.addFile(r))}},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache(),e.addToCache(),this.complete=!0}}});r.register("audioSprite",(function(t,e,i,s,n,r){var o,a=this.systems.game,h=a.config.audio,l=a.device.audio;if(h&&h.noAudio||!l.webAudio&&!l.audioData)return this;if(Array.isArray(t))for(var c=0;c{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n){var o="bin";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),s=a(l,"xhrSettings"),o=a(l,"extension",o),n=a(l,"dataType",n)}var u={type:"binary",cache:t.cacheManager.binary,extension:o,responseType:"arraybuffer",key:e,url:i,xhrSettings:s,config:{dataType:n}};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this.config.dataType;this.data=t?new t(this.xhrLoader.response):this.xhrLoader.response,this.onProcessComplete()}});o.register("binary",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(45176),l=i(31476),u=i(15297),c=new s({Extends:h,initialize:function(t,e,i,s,n,l){var c,d;if(a(e)){var p=e;e=r(p,"key"),c=new o(t,{key:e,url:r(p,"textureURL"),extension:r(p,"textureExtension","png"),normalMap:r(p,"normalMap"),xhrSettings:r(p,"textureXhrSettings")}),d=new u(t,{key:e,url:r(p,"fontDataURL"),extension:r(p,"fontDataExtension","xml"),xhrSettings:r(p,"fontDataXhrSettings")})}else c=new o(t,e,i,n),d=new u(t,e,s,l);c.linkFile?h.call(this,t,"bitmapfont",e,[c,d,c.linkFile]):h.call(this,t,"bitmapfont",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1];t.addToCache();var i=t.cache.get(t.key),s=l(e.data,t.cache.getFrame(t.key),0,0,i);this.loader.cacheManager.bitmapFont.add(t.key,{data:s,texture:t.key,frame:null}),this.complete=!0}}});n.register("bitmapFont",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="css";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var l={type:"script",cache:!1,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=document.createElement("style"),this.data.defer=!1,this.data.innerHTML=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});o.register("css",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(73152),n=i(40612),r=i(56694),o=i(76846),a=i(72632),h=i(42927),l=i(42911),u=i(70806),c=i(67409),d=i(30657),p=i(80802),f=i(45176),v=i(24904),g=new r({Extends:f,initialize:function(t,e,i,s){if(i.multiAtlasURL){var r=new u(t,{key:e,url:i.multiAtlasURL,xhrSettings:s,config:i});f.call(this,t,"texture",e,[r])}else{var o=i.textureURL.substr(i.textureURL.length-3);i.type||(i.type="ktx"===o.toLowerCase()?"KTX":"PVR");var a=new n(t,{key:e,url:i.textureURL,extension:o,xhrSettings:s,config:i});if(i.atlasURL){var h=new u(t,{key:e,url:i.atlasURL,xhrSettings:s,config:i});f.call(this,t,"texture",e,[a,h])}else f.call(this,t,"texture",e,[a])}this.config=i},onFileComplete:function(t){if(-1!==this.files.indexOf(t)){if(this.pending--,!this.config.multiAtlasURL)return;if("json"===t.type&&t.data.hasOwnProperty("textures")){var e=t.data.textures,i=this.config,s=this.loader,r=s.baseURL,o=s.path,h=s.prefix,l=a(i,"multiBaseURL",this.baseURL),u=a(i,"multiPath",this.path),c=a(i,"prefix",this.prefix),d=a(i,"textureXhrSettings");l&&s.setBaseURL(l),u&&s.setPath(u),c&&s.setPrefix(c);for(var p=0;p{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=i(31053),u=new s({Extends:r,initialize:function(t,e,i,s,n){var o="glsl";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),s=a(l,"shaderType","fragment"),n=a(l,"xhrSettings"),o=a(l,"extension",o)}else void 0===s&&(s="fragment");var u={type:"glsl",cache:t.cacheManager.shader,extension:o,responseType:"text",key:e,url:i,config:{shaderType:s},xhrSettings:n};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.split("\n"),e=this.extractBlock(t,0);if(e)for(;e;){var i=this.getShaderName(e.header),s=this.getShaderType(e.header),n=this.getShaderUniforms(e.header),r=e.shader;if(this.cache.has(i)){var o=this.cache.get(i);"fragment"===s?o.fragmentSrc=r:o.vertexSrc=r,o.uniforms||(o.uniforms=n)}else"fragment"===s?this.cache.add(i,new l(i,r,"",n)):this.cache.add(i,new l(i,"",r,n));e=this.extractBlock(t,e.offset)}else"fragment"===this.config.shaderType?this.cache.add(this.key,new l(this.key,this.data)):this.cache.add(this.key,new l(this.key,"",this.data))},getShaderName:function(t){for(var e=0;e{var s=i(56694),n=i(683),r=i(98035),o=i(72632),a=i(30750),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){if(h(e)){var n=e;e=o(n,"key"),s=o(n,"config",s)}var a={type:"audio",cache:t.cacheManager.audio,extension:i.type,key:e,url:i.url,config:s};r.call(this,t,a),this.locked="ontouchstart"in window,this.loaded=!1,this.filesLoaded=0,this.filesTotal=0},onLoad:function(){this.loaded||(this.loaded=!0,this.loader.nextFile(this,!0))},onError:function(){for(var t=0;t{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="html";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var l={type:"text",cache:t.cacheManager.html,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("html",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n,o){void 0===s&&(s=512),void 0===n&&(n=512);var l="html";if(h(e)){var u=e;e=a(u,"key"),i=a(u,"url"),o=a(u,"xhrSettings"),l=a(u,"extension",l),s=a(u,"width",s),n=a(u,"height",n)}var c={type:"html",cache:t.textureManager,extension:l,responseType:"text",key:e,url:i,xhrSettings:o,config:{width:s,height:n}};r.call(this,t,c)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this.config.width,e=this.config.height,i=[];i.push(''),i.push(''),i.push(''),i.push(this.xhrLoader.responseText),i.push(""),i.push(""),i.push("");var s=[i.join("\n")],o=this;try{var a=new window.Blob(s,{type:"image/svg+xml;charset=utf-8"})}catch(t){return o.state=n.FILE_ERRORED,void o.onProcessComplete()}this.data=new Image,this.data.crossOrigin=this.crossOrigin,this.data.onload=function(){r.revokeObjectURL(o.data),o.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(o.data),o.onProcessError()},r.createObjectURL(this.data,a,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});o.register("htmlTexture",(function(t,e,i,s,n){if(Array.isArray(t))for(var r=0;r{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=i(30750),u=new s({Extends:r,initialize:function t(e,i,s,n,o){var l,u="png";if(h(i)){var c=i;i=a(c,"key"),s=a(c,"url"),l=a(c,"normalMap"),n=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"frameConfig")}Array.isArray(s)&&(l=s[1],s=s[0]);var d={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:s,xhrSettings:n,config:o};if(r.call(this,e,d),l){var p=new t(e,this.key,l,n,o);p.type="normalMap",this.setLink(p),e.addFile(p)}this.useImageElementLoad="HTMLImageElement"===e.imageLoadType,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){r.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(t.data),t.onProcessError()},r.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=n.FILE_PROCESSING,t===n.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){if(this.state=n.FILE_LOADING,this.src=l(this,this.loader.baseURL),0===this.src.indexOf("data:"))console.warn("Local data URIs are not supported: "+this.key);else{this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=n.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src}},addToCache:function(){var t=this.linkFile;t?t.state>=n.FILE_COMPLETE&&("normalMap"===this.type?this.cache.addImage(this.key,t.data,this.data):this.cache.addImage(this.key,this.data,t.data)):this.cache.addImage(this.key,this.data)}});o.register("image",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(10850),l=i(42911),u=new s({Extends:r,initialize:function(t,e,i,s,o){var u="json";if(l(e)){var c=e;e=a(c,"key"),i=a(c,"url"),s=a(c,"xhrSettings"),u=a(c,"extension",u),o=a(c,"dataKey",o)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:s,config:o};r.call(this,t,d),l(i)&&(this.data=o?h(i,o):i,this.state=n.FILE_POPULATED)},onProcess:function(){if(this.state!==n.FILE_POPULATED){this.state=n.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});o.register("json",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(70806),l=i(45176),u=new s({Extends:l,initialize:function(t,e,i,s,n,o,u){if(a(e)){var c=e;e=r(c,"key"),i=r(c,"url",!1)?r(c,"url"):r(c,"atlasURL"),o=r(c,"xhrSettings"),s=r(c,"path"),n=r(c,"baseURL"),u=r(c,"textureXhrSettings")}var d=new h(t,e,i,o);l.call(this,t,"multiatlas",e,[d]),this.config.path=s,this.config.baseURL=n,this.config.textureXhrSettings=u},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"json"===t.type&&t.data.hasOwnProperty("textures"))){var e=t.data.textures,i=this.config,s=this.loader,n=s.baseURL,a=s.path,h=s.prefix,l=r(i,"baseURL",this.baseURL),u=r(i,"path",this.path),c=r(i,"prefix",this.prefix),d=r(i,"textureXhrSettings");s.setBaseURL(l),s.setPath(u),s.setPrefix(c);for(var p=0;p{var s=i(56694),n=i(76846),r=i(72632),o=i(42911),a=i(45176),h=i(55188),l=new s({Extends:a,initialize:function(t,e,i,s){var n="js",l=[];if(o(e)){var u=e;e=r(u,"key"),i=r(u,"url"),s=r(u,"xhrSettings"),n=r(u,"extension",n)}Array.isArray(i)||(i=[i]);for(var c=0;c{var s=i(56694),n=i(76846),r=i(72632),o=i(42911),a=i(45176),h=i(27291),l=i(76799),u=i(86897),c=new s({Extends:a,initialize:function(t,e,i,s,n,h){var l,c,d=t.cacheManager.obj;if(o(e)){var p=e;e=r(p,"key"),l=new u(t,{key:e,type:"obj",cache:d,url:r(p,"url"),extension:r(p,"extension","obj"),xhrSettings:r(p,"xhrSettings"),config:{flipUV:r(p,"flipUV",n)}}),(s=r(p,"matURL"))&&(c=new u(t,{key:e,type:"mat",cache:d,url:s,extension:r(p,"matExtension","mat"),xhrSettings:r(p,"xhrSettings")}))}else l=new u(t,{key:e,url:i,type:"obj",cache:d,extension:"obj",xhrSettings:h,config:{flipUV:n}}),s&&(c=new u(t,{key:e,url:s,type:"mat",cache:d,extension:"mat",xhrSettings:h}));a.call(this,t,"obj",e,[l,c])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=h(t.data,t.config.flipUV);e&&(i.materials=l(e.data)),t.cache.add(t.key,i),this.complete=!0}}});n.register("obj",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(12117),r=i(76846),o=i(70806),a=new s({Extends:o,initialize:function(t,e,i,s,n){o.call(this,t,e,i,s,n),this.type="packfile"},onProcess:function(){if(this.state!==n.FILE_POPULATED&&(this.state=n.FILE_PROCESSING,this.data=JSON.parse(this.xhrLoader.responseText)),this.data.hasOwnProperty("files")&&this.config){var t={};t[this.config]=this.data,this.data=t}this.loader.addPack(this.data,this.config),this.onProcessComplete()}});r.register("pack",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,o,l){var u="js";if(h(e)){var c=e;e=a(c,"key"),i=a(c,"url"),l=a(c,"xhrSettings"),u=a(c,"extension",u),s=a(c,"start"),o=a(c,"mapping")}var d={type:"plugin",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:l,config:{start:s,mapping:o}};r.call(this,t,d),"function"==typeof i&&(this.data=i,this.state=n.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=a(e,"start",!1),s=a(e,"mapping",null);if(this.state===n.FILE_POPULATED)t.install(this.key,this.data,i,s);else{this.state=n.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data);var r=t.install(this.key,window[this.key],i,s);(i||s)&&(this.loader.systems[s]=r,this.loader.scene[s]=r)}this.onProcessComplete()}});o.register("plugin",(function(t,e,i,s,n){if(Array.isArray(t))for(var r=0;r{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n){var o="svg";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),s=a(l,"svgConfig",{}),n=a(l,"xhrSettings"),o=a(l,"extension",o)}var u={type:"svg",cache:t.textureManager,extension:o,responseType:"text",key:e,url:i,xhrSettings:n,config:{width:a(s,"width"),height:a(s,"height"),scale:a(s,"scale")}};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING;var t=this.xhrLoader.responseText,e=[t],i=this.config.width,s=this.config.height,o=this.config.scale;t:if(i&&s||o){var a=(new DOMParser).parseFromString(t,"text/xml").getElementsByTagName("svg")[0],h=a.hasAttribute("viewBox"),l=parseFloat(a.getAttribute("width")),u=parseFloat(a.getAttribute("height"));if(!h&&l&&u)a.setAttribute("viewBox","0 0 "+l+" "+u);else if(h&&!l&&!u){var c=a.getAttribute("viewBox").split(/\s+|,/);l=c[2],u=c[3]}if(o){if(!l||!u)break t;i=l*o,s=u*o}a.setAttribute("width",i.toString()+"px"),a.setAttribute("height",s.toString()+"px"),e=[(new XMLSerializer).serializeToString(a)]}try{var d=new window.Blob(e,{type:"image/svg+xml;charset=utf-8"})}catch(t){return void this.onProcessError()}this.data=new Image,this.data.crossOrigin=this.crossOrigin;var p=this,f=!1;this.data.onload=function(){f||r.revokeObjectURL(p.data),p.onProcessComplete()},this.data.onerror=function(){f?p.onProcessError():(f=!0,r.revokeObjectURL(p.data),p.data.src="data:image/svg+xml,"+encodeURIComponent(e.join("")))},r.createObjectURL(this.data,d,"image/svg+xml")},addToCache:function(){this.cache.addImage(this.key,this.data)}});o.register("svg",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="js";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var l={type:"text",extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t=this.data.concat("(function(){\nreturn new "+this.key+"();\n}).call(this);"),e=eval;this.loader.sceneManager.add(this.key,e(t)),this.complete=!0}});o.register("sceneFile",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,o,l){var u="js";if(h(e)){var c=e;e=a(c,"key"),i=a(c,"url"),l=a(c,"xhrSettings"),u=a(c,"extension",u),s=a(c,"systemKey"),o=a(c,"sceneKey")}var d={type:"scenePlugin",cache:!1,extension:u,responseType:"text",key:e,url:i,xhrSettings:l,config:{systemKey:s,sceneKey:o}};r.call(this,t,d),"function"==typeof i&&(this.data=i,this.state=n.FILE_POPULATED)},onProcess:function(){var t=this.loader.systems.plugins,e=this.config,i=this.key,s=a(e,"systemKey",i),r=a(e,"sceneKey",i);this.state===n.FILE_POPULATED?t.installScenePlugin(s,this.data,r,this.loader.scene,!0):(this.state=n.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),t.installScenePlugin(s,window[this.key],r,this.loader.scene,!0)),this.onProcessComplete()}});o.register("scenePlugin",(function(t,e,i,s,n){if(Array.isArray(t))for(var r=0;r{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s,n){var o="js";if(h(e)){var l=e;e=a(l,"key"),i=a(l,"url"),s=a(l,"type","script"),n=a(l,"xhrSettings"),o=a(l,"extension",o)}else void 0===s&&(s="script");var u={type:s,cache:!1,extension:o,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,u)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=document.createElement("script"),this.data.language="javascript",this.data.type="text/javascript",this.data.defer=!1,this.data.text=this.xhrLoader.responseText,document.head.appendChild(this.data),this.onProcessComplete()}});o.register("script",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(76846),r=i(42927),o=new s({Extends:r,initialize:function(t,e,i,s,n){r.call(this,t,e,i,n,s),this.type="spritesheet"},addToCache:function(){this.cache.addSpriteSheet(this.key,this.data,this.config)}});n.register("spritesheet",(function(t,e,i,s){if(Array.isArray(t))for(var n=0;n{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=new s({Extends:r,initialize:function(t,e,i,s){var n="text",o="txt",l=t.cacheManager.text;if(h(e)){var u=e;e=a(u,"key"),i=a(u,"url"),s=a(u,"xhrSettings"),o=a(u,"extension",o),n=a(u,"type",n),l=a(u,"cache",l)}var c={type:n,cache:l,extension:o,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,c)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});o.register("text",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=i(93560),u=new s({Extends:r,initialize:function(t,e,i,s){var n="csv";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var u={type:"tilemapCSV",cache:t.cacheManager.tilemap,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,u),this.tilemapFormat=l.CSV},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()},addToCache:function(){var t={format:this.tilemapFormat,data:this.data};this.cache.add(this.key,t)}});o.register("tilemapCSV",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(76846),r=i(70806),o=i(93560),a=new s({Extends:r,initialize:function(t,e,i,s){r.call(this,t,e,i,s),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:o.WELTMEISTER,data:this.data};this.cache.add(this.key,t)}});n.register("tilemapImpact",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(76846),r=i(70806),o=i(93560),a=new s({Extends:r,initialize:function(t,e,i,s){r.call(this,t,e,i,s),this.type="tilemapJSON",this.cache=t.cacheManager.tilemap},addToCache:function(){var t={format:o.TILED_JSON,data:this.data};this.cache.add(this.key,t)}});n.register("tilemapTiledJSON",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(56694),n=i(76846),r=i(72632),o=i(42927),a=i(42911),h=i(45176),l=i(86897),u=new s({Extends:h,initialize:function(t,e,i,s,n,u){var c,d;if(a(e)){var p=e;e=r(p,"key"),c=new o(t,{key:e,url:r(p,"textureURL"),extension:r(p,"textureExtension","png"),normalMap:r(p,"normalMap"),xhrSettings:r(p,"textureXhrSettings")}),d=new l(t,{key:e,url:r(p,"atlasURL"),extension:r(p,"atlasExtension","txt"),xhrSettings:r(p,"atlasXhrSettings")})}else c=new o(t,e,i,n),d=new l(t,e,s,u);c.linkFile?h.call(this,t,"unityatlas",e,[c,d,c.linkFile]):h.call(this,t,"unityatlas",e,[c,d])},addToCache:function(){if(this.isReadyToProcess()){var t=this.files[0],e=this.files[1],i=this.files[2]?this.files[2].data:null;this.loader.textureManager.addUnityAtlas(t.key,t.data,e.data,i),this.complete=!0}}});n.register("unityAtlas",(function(t,e,i,s,n){var r;if(Array.isArray(t))for(var o=0;o{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(30750),h=i(72632),l=i(42911),u=new s({Extends:r,initialize:function(t,e,i,s,n,o,a){void 0===s&&(s="loadeddata"),void 0===n&&(n=!1),void 0===o&&(o=!1),"loadeddata"!==s&&"canplay"!==s&&"canplaythrough"!==s&&(s="loadeddata");var h={type:"video",cache:t.cacheManager.video,extension:i.type,responseType:"blob",key:e,url:i.url,xhrSettings:a,config:{loadEvent:s,asBlob:n,noAudio:o}};this.onLoadCallback=this.onVideoLoadHandler.bind(this),this.onErrorCallback=this.onVideoErrorHandler.bind(this),r.call(this,t,h)},onProcess:function(){if(this.state=n.FILE_PROCESSING,this.config.asBlob){var t=this.createVideoElement();this.data=t;var e=this;this.data.onloadeddata=function(){e.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(e.data),e.onProcessError()},r.createObjectURL(t,this.xhrLoader.response,""),t.load()}else this.onProcessComplete()},createVideoElement:function(){var t=document.createElement("video");return t.controls=!1,t.crossOrigin=this.loader.crossOrigin,this.config.noAudio&&(t.muted=!0,t.defaultMuted=!0,t.setAttribute("autoplay","autoplay")),t.setAttribute("playsinline","playsinline"),t.setAttribute("preload","auto"),t},onVideoLoadHandler:function(t){var e=t.target;e.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),e.removeEventListener("error",this.onErrorCallback,!0),this.data=e,this.resetXHR(),this.loader.nextFile(this,!0)},onVideoErrorHandler:function(t){var e=t.target;e&&(e.removeEventListener(this.config.loadEvent,this.onLoadCallback,!0),e.removeEventListener("error",this.onErrorCallback,!0)),this.resetXHR(),this.loader.nextFile(this,!1)},load:function(){var t=this.config.loadEvent;if(this.config.asBlob)r.prototype.load.call(this);else{this.percentComplete=0;var e=this.createVideoElement();e.addEventListener(t,this.onLoadCallback,!0),e.addEventListener("error",this.onErrorCallback,!0),e.src=a(this,this.loader.baseURL),e.load()}}});u.create=function(t,e,i,s,n,r,o){var a=t.systems.game;l(e)&&(i=h(e,"url",[]),s=h(e,"loadEvent","loadeddata"),n=h(e,"asBlob",!1),r=h(e,"noAudio",!1),o=h(e,"xhrSettings"),e=h(e,"key"));var c=u.getVideoURL(a,i);if(c)return new u(t,e,c,s,n,r,o)},u.getVideoURL=function(t,e){Array.isArray(e)||(e=[e]);for(var i=0;i{var s=i(56694),n=i(12117),r=i(98035),o=i(76846),a=i(72632),h=i(42911),l=i(89200),u=new s({Extends:r,initialize:function(t,e,i,s){var n="xml";if(h(e)){var o=e;e=a(o,"key"),i=a(o,"url"),s=a(o,"xhrSettings"),n=a(o,"extension",n)}var l={type:"xml",cache:t.cacheManager.xml,extension:n,responseType:"text",key:e,url:i,xhrSettings:s};r.call(this,t,l)},onProcess:function(){this.state=n.FILE_PROCESSING,this.data=l(this.xhrLoader.responseText),this.data?this.onProcessComplete():this.onProcessError()}});o.register("xml",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{t.exports={AnimationJSONFile:i(46468),AsepriteFile:i(31648),AtlasJSONFile:i(73152),AtlasXMLFile:i(24616),AudioFile:i(67448),AudioSpriteFile:i(66109),BinaryFile:i(40612),BitmapFontFile:i(54565),CompressedTextureFile:i(47375),CSSFile:i(99898),GLSLFile:i(46568),HTML5AudioFile:i(30929),HTMLFile:i(77459),HTMLTextureFile:i(9755),ImageFile:i(42927),JSONFile:i(70806),MultiAtlasFile:i(80802),MultiScriptFile:i(39034),OBJFile:i(85527),PackFile:i(3616),PluginFile:i(12217),SceneFile:i(95171),ScenePluginFile:i(82458),ScriptFile:i(55188),SpriteSheetFile:i(33536),SVGFile:i(4474),TextFile:i(86897),TilemapCSVFile:i(58673),TilemapImpactFile:i(98896),TilemapJSONFile:i(50563),UnityAtlasFile:i(82857),VideoFile:i(22833),XMLFile:i(15297)}},95695:(t,e,i)=>{var s=i(12117),n=i(98611),r={Events:i(683),FileTypes:i(34034),File:i(98035),FileTypesManager:i(76846),GetURL:i(30750),LoaderPlugin:i(67285),MergeXHRSettings:i(43531),MultiFile:i(45176),XHRLoader:i(88490),XHRSettings:i(33868)};r=n(!1,r,s),t.exports=r},26042:t=>{t.exports=function(t){for(var e=0,i=0;i{var s=i(8034);t.exports=function(t,e){return s(t)/s(e)/s(t-e)}},17489:t=>{t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},14976:t=>{t.exports=function(t,e,i,s,n){var r=.5*(s-e),o=.5*(n-i),a=t*t;return(2*i-2*s+r+o)*(t*a)+(-3*i+3*s-2*r-o)*a+r*t+i}},89129:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.ceil(t*s)/s}},82897:t=>{t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},75606:(t,e,i)=>{var s=i(83392);t.exports=function(t){return t*s.DEG_TO_RAD}},767:t=>{t.exports=function(t,e){return Math.abs(t-e)}},9849:(t,e,i)=>{var s=i(82897),n=i(56694),r=i(16650),o=i(72283),a=new r,h=new n({initialize:function t(e,i,s,n){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=t.DefaultOrder),this._x=e,this._y=i,this._z=s,this._order=n,this.onChangeCallback=o},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,s){return void 0===s&&(s=this._order),this._x=t,this._y=e,this._z=i,this._order=s,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),a.fromQuat(t),this.setFromRotationMatrix(a,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var n=t.val,r=n[0],o=n[4],a=n[8],h=n[1],l=n[5],u=n[9],c=n[2],d=n[6],p=n[10],f=0,v=0,g=0,m=.99999;switch(e){case"XYZ":v=Math.asin(s(a,-1,1)),Math.abs(a){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},61616:t=>{t.exports=function(t,e){return Math.random()*(e-t)+t}},60679:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.floor(t*s)/s}},91806:(t,e,i)=>{var s=i(82897);t.exports=function(t,e,i){return(i-e)*(t=s(t,0,1))+e}},79366:t=>{t.exports=function(t,e){return t/e/1e3}},43776:t=>{t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},58442:t=>{t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},42798:t=>{t.exports=function(t,e,i){return(e-t)*i+t}},61072:t=>{t.exports=function(t,e,i){return void 0===i&&(i=0),t.clone().lerp(e,i)}},5341:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new s(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=s,this},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,c=-l*n+o*a,d=h*n-r*a,p=e*u+i*c+s*d;return p?(p=1/p,t[0]=u*p,t[1]=(-l*i+s*h)*p,t[2]=(o*i-s*r)*p,t[3]=c*p,t[4]=(l*e-s*a)*p,t[5]=(-o*e+s*n)*p,t[6]=d*p,t[7]=(-h*e+i*a)*p,t[8]=(r*e-i*n)*p,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=r*l-o*h,t[1]=s*h-i*l,t[2]=i*o-s*r,t[3]=o*a-n*l,t[4]=e*l-s*a,t[5]=s*n-e*o,t[6]=n*h-r*a,t[7]=i*a-e*h,t[8]=e*r-i*n,this},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*r-o*h)+i*(-l*n+o*a)+s*(h*n-r*a)},multiply:function(t){var e=this.val,i=e[0],s=e[1],n=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],p=c[1],f=c[2],v=c[3],g=c[4],m=c[5],y=c[6],x=c[7],T=c[8];return e[0]=d*i+p*r+f*h,e[1]=d*s+p*o+f*l,e[2]=d*n+p*a+f*u,e[3]=v*i+g*r+m*h,e[4]=v*s+g*o+m*l,e[5]=v*n+g*a+m*u,e[6]=y*i+x*r+T*h,e[7]=y*s+x*o+T*l,e[8]=y*n+x*a+T*u,this},translate:function(t){var e=this.val,i=t.x,s=t.y;return e[6]=i*e[0]+s*e[3]+e[6],e[7]=i*e[1]+s*e[4]+e[7],e[8]=i*e[2]+s*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],s=e[1],n=e[2],r=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*s+h*o,e[2]=l*n+h*a,e[3]=l*r-h*i,e[4]=l*o-h*s,e[5]=l*a-h*n,this},scale:function(t){var e=this.val,i=t.x,s=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=s*e[3],e[4]=s*e[4],e[5]=s*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,s=t.z,n=t.w,r=e+e,o=i+i,a=s+s,h=e*r,l=e*o,u=e*a,c=i*o,d=i*a,p=s*a,f=n*r,v=n*o,g=n*a,m=this.val;return m[0]=1-(c+p),m[3]=l+g,m[6]=u-v,m[1]=l-g,m[4]=1-(h+p),m[7]=d+f,m[2]=u+v,m[5]=d-f,m[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,s=e[0],n=e[1],r=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],p=e[10],f=e[11],v=e[12],g=e[13],m=e[14],y=e[15],x=s*h-n*a,T=s*l-r*a,w=s*u-o*a,b=n*l-r*h,E=n*u-o*h,S=r*u-o*l,A=c*g-d*v,C=c*m-p*v,_=c*y-f*v,M=d*m-p*g,R=d*y-f*g,P=p*y-f*m,O=x*P-T*R+w*M+b*_-E*C+S*A;return O?(O=1/O,i[0]=(h*P-l*R+u*M)*O,i[1]=(l*_-a*P-u*C)*O,i[2]=(a*R-h*_+u*A)*O,i[3]=(r*R-n*P-o*M)*O,i[4]=(s*P-r*_+o*C)*O,i[5]=(n*_-s*R-o*A)*O,i[6]=(g*S-m*E+y*b)*O,i[7]=(m*w-v*S-y*T)*O,i[8]=(v*E-g*w+y*x)*O,this):null}});t.exports=s},16650:(t,e,i)=>{var s=i(56694),n=i(70015),r=1e-6,o=new s({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new o(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,s,n,r,o,a,h,l,u,c,d,p,f,v){var g=this.val;return g[0]=t,g[1]=e,g[2]=i,g[3]=s,g[4]=n,g[5]=r,g[6]=o,g[7]=a,g[8]=h,g[9]=l,g[10]=u,g[11]=c,g[12]=d,g[13]=p,g[14]=f,g[15]=v,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var s=a.fromQuat(i).val,n=e.x,r=e.y,o=e.z;return this.setValues(s[0]*n,s[1]*n,s[2]*n,0,s[4]*r,s[5]*r,s[6]*r,0,s[8]*o,s[9]*o,s[10]*o,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var s=this.val;return s[12]=t,s[13]=e,s[14]=i,this},scaling:function(t,e,i){this.zero();var s=this.val;return s[0]=t,s[5]=e,s[10]=i,s[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[3],n=t[6],r=t[7],o=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=n,t[11]=t[14],t[12]=s,t[13]=r,t[14]=o,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],p=t[12],f=t[13],v=t[14],g=t[15],m=e*o-i*r,y=e*a-s*r,x=e*h-n*r,T=i*a-s*o,w=i*h-n*o,b=s*h-n*a,E=l*f-u*p,S=l*v-c*p,A=l*g-d*p,C=u*v-c*f,_=u*g-d*f,M=c*g-d*v,R=m*M-y*_+x*C+T*A-w*S+b*E;return R?(R=1/R,this.setValues((o*M-a*_+h*C)*R,(s*_-i*M-n*C)*R,(f*b-v*w+g*T)*R,(c*w-u*b-d*T)*R,(a*A-r*M-h*S)*R,(e*M-s*A+n*S)*R,(v*x-p*b-g*y)*R,(l*b-c*x+d*y)*R,(r*_-o*A+h*E)*R,(i*A-e*_-n*E)*R,(p*w-f*x+g*m)*R,(u*x-l*w-d*m)*R,(o*S-r*C-a*E)*R,(e*C-i*S+s*E)*R,(f*y-p*T-v*m)*R,(l*T-u*y+c*m)*R)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],p=t[12],f=t[13],v=t[14],g=t[15];return this.setValues(o*(c*g-d*v)-u*(a*g-h*v)+f*(a*d-h*c),-(i*(c*g-d*v)-u*(s*g-n*v)+f*(s*d-n*c)),i*(a*g-h*v)-o*(s*g-n*v)+f*(s*h-n*a),-(i*(a*d-h*c)-o*(s*d-n*c)+u*(s*h-n*a)),-(r*(c*g-d*v)-l*(a*g-h*v)+p*(a*d-h*c)),e*(c*g-d*v)-l*(s*g-n*v)+p*(s*d-n*c),-(e*(a*g-h*v)-r*(s*g-n*v)+p*(s*h-n*a)),e*(a*d-h*c)-r*(s*d-n*c)+l*(s*h-n*a),r*(u*g-d*f)-l*(o*g-h*f)+p*(o*d-h*u),-(e*(u*g-d*f)-l*(i*g-n*f)+p*(i*d-n*u)),e*(o*g-h*f)-r*(i*g-n*f)+p*(i*h-n*o),-(e*(o*d-h*u)-r*(i*d-n*u)+l*(i*h-n*o)),-(r*(u*v-c*f)-l*(o*v-a*f)+p*(o*c-a*u)),e*(u*v-c*f)-l*(i*v-s*f)+p*(i*c-s*u),-(e*(o*v-a*f)-r*(i*v-s*f)+p*(i*a-s*o)),e*(o*c-a*u)-r*(i*c-s*u)+l*(i*a-s*o))},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],p=t[12],f=t[13],v=t[14],g=t[15];return(e*o-i*r)*(c*g-d*v)-(e*a-s*r)*(u*g-d*f)+(e*h-n*r)*(u*v-c*f)+(i*a-s*o)*(l*g-d*p)-(i*h-n*o)*(l*v-c*p)+(s*h-n*a)*(l*f-u*p)},multiply:function(t){var e=this.val,i=e[0],s=e[1],n=e[2],r=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],p=e[11],f=e[12],v=e[13],g=e[14],m=e[15],y=t.val,x=y[0],T=y[1],w=y[2],b=y[3];return e[0]=x*i+T*o+w*u+b*f,e[1]=x*s+T*a+w*c+b*v,e[2]=x*n+T*h+w*d+b*g,e[3]=x*r+T*l+w*p+b*m,x=y[4],T=y[5],w=y[6],b=y[7],e[4]=x*i+T*o+w*u+b*f,e[5]=x*s+T*a+w*c+b*v,e[6]=x*n+T*h+w*d+b*g,e[7]=x*r+T*l+w*p+b*m,x=y[8],T=y[9],w=y[10],b=y[11],e[8]=x*i+T*o+w*u+b*f,e[9]=x*s+T*a+w*c+b*v,e[10]=x*n+T*h+w*d+b*g,e[11]=x*r+T*l+w*p+b*m,x=y[12],T=y[13],w=y[14],b=y[15],e[12]=x*i+T*o+w*u+b*f,e[13]=x*s+T*a+w*c+b*v,e[14]=x*n+T*h+w*d+b*g,e[15]=x*r+T*l+w*p+b*m,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,s=e.val,n=i[0],r=i[4],o=i[8],a=i[12],h=i[1],l=i[5],u=i[9],c=i[13],d=i[2],p=i[6],f=i[10],v=i[14],g=i[3],m=i[7],y=i[11],x=i[15],T=s[0],w=s[4],b=s[8],E=s[12],S=s[1],A=s[5],C=s[9],_=s[13],M=s[2],R=s[6],P=s[10],O=s[14],L=s[3],F=s[7],D=s[11],k=s[15];return this.setValues(n*T+r*S+o*M+a*L,h*T+l*S+u*M+c*L,d*T+p*S+f*M+v*L,g*T+m*S+y*M+x*L,n*w+r*A+o*R+a*F,h*w+l*A+u*R+c*F,d*w+p*A+f*R+v*F,g*w+m*A+y*R+x*F,n*b+r*C+o*P+a*D,h*b+l*C+u*P+c*D,d*b+p*C+f*P+v*D,g*b+m*C+y*P+x*D,n*E+r*_+o*O+a*k,h*E+l*_+u*O+c*k,d*E+p*_+f*O+v*k,g*E+m*_+y*O+x*k)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var s=this.val;return s[12]=s[0]*t+s[4]*e+s[8]*i+s[12],s[13]=s[1]*t+s[5]*e+s[9]*i+s[13],s[14]=s[2]*t+s[6]*e+s[10]*i+s[14],s[15]=s[3]*t+s[7]*e+s[11]*i+s[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var s=this.val;return s[0]=s[0]*t,s[1]=s[1]*t,s[2]=s[2]*t,s[3]=s[3]*t,s[4]=s[4]*e,s[5]=s[5]*e,s[6]=s[6]*e,s[7]=s[7]*e,s[8]=s[8]*i,s[9]=s[9]*i,s[10]=s[10]*i,s[11]=s[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),s=Math.sin(e),n=1-i,r=t.x,o=t.y,a=t.z,h=n*r,l=n*o;return this.setValues(h*r+i,h*o-s*a,h*a+s*o,0,h*o+s*a,l*o+i,l*a-s*r,0,h*a-s*o,l*a+s*r,n*a*a+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,s=e.x,n=e.y,o=e.z,a=Math.sqrt(s*s+n*n+o*o);if(Math.abs(a){t.exports=function(t,e,i){return Math.min(t+e,i)}},37394:t=>{t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort((function(t,e){return t-e}));var i=Math.floor(e/2);return e%2==0?(t[i]+t[i-1])/2:t[i]}},17259:t=>{t.exports=function(t,e,i){return Math.max(t-e,i)}},61820:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=e+1);var n=(t-e)/(i-e);return n>1?void 0!==s?(n=(s-t)/(s-i))<0&&(n=0):n=1:n<0&&(n=0),n}},75003:(t,e,i)=>{var s=i(56694),n=i(5341),r=i(72283),o=i(70015),a=1e-6,h=new Int8Array([1,2,0]),l=new Float32Array([0,0,0]),u=new o(1,0,0),c=new o(0,1,0),d=new o,p=new n,f=new s({initialize:function(t,e,i,s){this.onChangeCallback=r,this.set(t,e,i,s)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,s,n){return void 0===n&&(n=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=s||0),n&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,n=t*t+e*e+i*i+s*s;return n>0&&(n=1/Math.sqrt(n),this._x=t*n,this._y=e*n,this._z=i*n,this._w=s*n),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,n=this.z,r=this.w;return this.set(i+e*(t.x-i),s+e*(t.y-s),n+e*(t.z-n),r+e*(t.w-r))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(d.copy(u).cross(t).length().999999?this.set(0,0,0,1):(d.copy(t).cross(e),this._x=d.x,this._y=d.y,this._z=d.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var s=p.val;return s[0]=e.x,s[3]=e.y,s[6]=e.z,s[1]=i.x,s[4]=i.y,s[7]=i.z,s[2]=-t.x,s[5]=-t.y,s[8]=-t.z,this.fromMat3(p).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,s=this.z,n=this.w,r=t.x,o=t.y,a=t.z,h=t.w;return this.set(e*h+n*r+i*a-s*o,i*h+n*o+s*r-e*a,s*h+n*a+e*o-i*r,n*h-e*r-i*o-s*a)},slerp:function(t,e){var i=this.x,s=this.y,n=this.z,r=this.w,o=t.x,h=t.y,l=t.z,u=t.w,c=i*o+s*h+n*l+r*u;c<0&&(c=-c,o=-o,h=-h,l=-l,u=-u);var d=1-e,p=e;if(1-c>a){var f=Math.acos(c),v=Math.sin(f);d=Math.sin((1-e)*f)/v,p=Math.sin(e*f)/v}return this.set(d*i+p*o,d*s+p*h,d*n+p*l,d*r+p*u)},invert:function(){var t=this.x,e=this.y,i=this.z,s=this.w,n=t*t+e*e+i*i+s*s,r=n?1/n:0;return this.set(-t*r,-e*r,-i*r,s*r)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,n=this.w,r=Math.sin(t),o=Math.cos(t);return this.set(e*o+n*r,i*o+s*r,s*o-i*r,n*o-e*r)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,n=this.w,r=Math.sin(t),o=Math.cos(t);return this.set(e*o-s*r,i*o+n*r,s*o+e*r,n*o-i*r)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,n=this.w,r=Math.sin(t),o=Math.cos(t);return this.set(e*o+i*r,i*o-e*r,s*o+n*r,n*o-s*r)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,s=t.y/2,n=t.z/2,r=Math.cos(i),o=Math.cos(s),a=Math.cos(n),h=Math.sin(i),l=Math.sin(s),u=Math.sin(n);switch(t.order){case"XYZ":this.set(h*o*a+r*l*u,r*l*a-h*o*u,r*o*u+h*l*a,r*o*a-h*l*u,e);break;case"YXZ":this.set(h*o*a+r*l*u,r*l*a-h*o*u,r*o*u-h*l*a,r*o*a+h*l*u,e);break;case"ZXY":this.set(h*o*a-r*l*u,r*l*a+h*o*u,r*o*u+h*l*a,r*o*a-h*l*u,e);break;case"ZYX":this.set(h*o*a-r*l*u,r*l*a+h*o*u,r*o*u-h*l*a,r*o*a+h*l*u,e);break;case"YZX":this.set(h*o*a+r*l*u,r*l*a+h*o*u,r*o*u-h*l*a,r*o*a-h*l*u,e);break;case"XZY":this.set(h*o*a-r*l*u,r*l*a-h*o*u,r*o*u+h*l*a,r*o*a+h*l*u,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,s=i[0],n=i[4],r=i[8],o=i[1],a=i[5],h=i[9],l=i[2],u=i[6],c=i[10],d=s+a+c;return d>0?(e=.5/Math.sqrt(d+1),this.set((u-h)*e,(r-l)*e,(o-n)*e,.25/e)):s>a&&s>c?(e=2*Math.sqrt(1+s-a-c),this.set(.25*e,(n+o)/e,(r+l)/e,(u-h)/e)):a>c?(e=2*Math.sqrt(1+a-s-c),this.set((n+o)/e,.25*e,(h+u)/e,(r-l)/e)):(e=2*Math.sqrt(1+c-s-a),this.set((r+l)/e,(h+u)/e,.25*e,(o-n)/e)),this},fromMat3:function(t){var e,i=t.val,s=i[0]+i[4]+i[8];if(s>0)e=Math.sqrt(s+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var n=0;i[4]>i[0]&&(n=1),i[8]>i[3*n+n]&&(n=2);var r=h[n],o=h[r];e=Math.sqrt(i[3*n+n]-i[3*r+r]-i[3*o+o]+1),l[n]=.5*e,e=.5/e,l[r]=(i[3*r+n]+i[3*n+r])*e,l[o]=(i[3*o+n]+i[3*n+o])*e,this._x=l[0],this._y=l[1],this._z=l[2],this._w=(i[3*o+r]-i[3*r+o])*e}return this.onChangeCallback(this),this}});t.exports=f},23701:(t,e,i)=>{var s=i(83392);t.exports=function(t){return t*s.RAD_TO_DEG}},16906:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},52417:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,s=2*Math.random()-1,n=Math.sqrt(1-s*s)*e;return t.x=Math.cos(i)*n,t.y=Math.sin(i)*n,t.z=s*e,t}},17915:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},52257:t=>{t.exports=function(t,e){var i=t.x,s=t.y;return t.x=i*Math.cos(e)-s*Math.sin(e),t.y=i*Math.sin(e)+s*Math.cos(e),t}},2386:t=>{t.exports=function(t,e,i,s){var n=Math.cos(s),r=Math.sin(s),o=t.x-e,a=t.y-i;return t.x=o*n-a*r+e,t.y=o*r+a*n+i,t}},72395:t=>{t.exports=function(t,e,i,s,n){var r=s+Math.atan2(t.y-i,t.x-e);return t.x=e+n*Math.cos(r),t.y=i+n*Math.sin(r),t}},41061:t=>{t.exports=function(t,e,i,s,n){return t.x=e+n*Math.cos(s),t.y=i+n*Math.sin(s),t}},93709:(t,e,i)=>{var s=i(70015),n=i(16650),r=i(75003),o=new n,a=new r,h=new s;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},67233:t=>{t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},64333:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.round(t*s)/s}},59533:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=1),s*=Math.PI/t;for(var n=[],r=[],o=0;o{t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},87736:t=>{t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},55805:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n){void 0===n&&(n=new s);var r=0,o=0;return t>0&&t<=e*i&&(r=t>e-1?t-(o=Math.floor(t/e))*e:t),n.set(r,o)}},64462:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,o,a,h){void 0===h&&(h=new s);var l=Math.sin(r),u=Math.cos(r),c=u*o,d=l*o,p=-l*a,f=u*a,v=1/(c*f+p*-d);return h.x=f*v*t+-p*v*e+(n*p-i*f)*v,h.y=c*v*e+-d*v*t+(-n*c+i*d)*v,h}},93736:(t,e,i)=>{var s=i(56694),n=i(88456),r=new s({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new r(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return n(this.x,t.x,e)&&n(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this},transformMat3:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[3]*i+s[6],this.y=s[1]*e+s[4]*i+s[7],this},transformMat4:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[4]*i+s[12],this.y=s[1]*e+s[5]*i+s[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)},project:function(t){var e=this.dot(t)/t.dot(t);return this.copy(t).scale(e)}});r.ZERO=new r,r.RIGHT=new r(1,0),r.LEFT=new r(-1,0),r.UP=new r(0,-1),r.DOWN=new r(0,1),r.ONE=new r(1,1),t.exports=r},70015:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new s(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var i=t.x,s=t.y,n=t.z,r=e.x,o=e.y,a=e.z;return this.x=s*a-n*o,this.y=n*r-i*a,this.z=i*o-s*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return Math.sqrt(e*e+i*i+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return e*e+i*i+s*s},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,s=t*t+e*e+i*i;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,s=this.z,n=t.x,r=t.y,o=t.z;return this.x=i*o-s*r,this.y=s*n-e*o,this.z=e*r-i*n,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,n=this.z;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=n+e*(t.z-n),this},applyMatrix3:function(t){var e=this.x,i=this.y,s=this.z,n=t.val;return this.x=n[0]*e+n[3]*i+n[6]*s,this.y=n[1]*e+n[4]*i+n[7]*s,this.z=n[2]*e+n[5]*i+n[8]*s,this},applyMatrix4:function(t){var e=this.x,i=this.y,s=this.z,n=t.val,r=1/(n[3]*e+n[7]*i+n[11]*s+n[15]);return this.x=(n[0]*e+n[4]*i+n[8]*s+n[12])*r,this.y=(n[1]*e+n[5]*i+n[9]*s+n[13])*r,this.z=(n[2]*e+n[6]*i+n[10]*s+n[14])*r,this},transformMat3:function(t){var e=this.x,i=this.y,s=this.z,n=t.val;return this.x=e*n[0]+i*n[3]+s*n[6],this.y=e*n[1]+i*n[4]+s*n[7],this.z=e*n[2]+i*n[5]+s*n[8],this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,n=t.val;return this.x=n[0]*e+n[4]*i+n[8]*s+n[12],this.y=n[1]*e+n[5]*i+n[9]*s+n[13],this.z=n[2]*e+n[6]*i+n[10]*s+n[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,s=this.z,n=t.val,r=e*n[0]+i*n[4]+s*n[8]+n[12],o=e*n[1]+i*n[5]+s*n[9]+n[13],a=e*n[2]+i*n[6]+s*n[10]+n[14],h=e*n[3]+i*n[7]+s*n[11]+n[15];return this.x=r/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,n=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*s-o*i,l=a*i+o*e-n*s,u=a*s+n*i-r*e,c=-n*e-r*i-o*s;return this.x=h*a+c*-n+l*-o-u*-r,this.y=l*a+c*-r+u*-n-h*-o,this.z=u*a+c*-o+h*-r-l*-n,this},project:function(t){var e=this.x,i=this.y,s=this.z,n=t.val,r=n[0],o=n[1],a=n[2],h=n[3],l=n[4],u=n[5],c=n[6],d=n[7],p=n[8],f=n[9],v=n[10],g=n[11],m=n[12],y=n[13],x=n[14],T=1/(e*h+i*d+s*g+n[15]);return this.x=(e*r+i*l+s*p+m)*T,this.y=(e*o+i*u+s*f+y)*T,this.z=(e*a+i*c+s*v+x)*T,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,s=t.y,n=t.z,r=t.w,o=this.x-i,a=r-this.y-1-s,h=this.z;return this.x=2*o/n-1,this.y=2*a/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});s.ZERO=new s,s.RIGHT=new s(1,0,0),s.LEFT=new s(-1,0,0),s.UP=new s(0,-1,0),s.DOWN=new s(0,1,0),s.FORWARD=new s(0,0,1),s.BACK=new s(0,0,-1),s.ONE=new s(1,1,1),t.exports=s},51729:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0)},clone:function(){return new s(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,s){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,n=t*t+e*e+i*i+s*s;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n,this.w=s*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,n=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=n+e*(t.z-n),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,n=t.w-this.w||0;return Math.sqrt(e*e+i*i+s*s+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,n=t.w-this.w||0;return e*e+i*i+s*s+n*n},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,n=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*s+r[12]*n,this.y=r[1]*e+r[5]*i+r[9]*s+r[13]*n,this.z=r[2]*e+r[6]*i+r[10]*s+r[14]*n,this.w=r[3]*e+r[7]*i+r[11]*s+r[15]*n,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,n=t.x,r=t.y,o=t.z,a=t.w,h=a*e+r*s-o*i,l=a*i+o*e-n*s,u=a*s+n*i-r*e,c=-n*e-r*i-o*s;return this.x=h*a+c*-n+l*-o-u*-r,this.y=l*a+c*-r+u*-n-h*-o,this.z=u*a+c*-o+h*-r-l*-n,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});s.prototype.sub=s.prototype.subtract,s.prototype.mul=s.prototype.multiply,s.prototype.div=s.prototype.divide,s.prototype.dist=s.prototype.distance,s.prototype.distSq=s.prototype.distanceSq,s.prototype.len=s.prototype.length,s.prototype.lenSq=s.prototype.lengthSq,t.exports=s},9557:t=>{t.exports=function(t,e,i){return Math.abs(t-e)<=i}},1071:t=>{t.exports=function(t,e,i){var s=i-e;return e+((t-e)%s+s)%s}},90447:t=>{t.exports=function(t,e,i,s){return Math.atan2(s-e,i-t)}},94240:t=>{t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},84066:t=>{t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},9678:t=>{t.exports=function(t,e,i,s){return Math.atan2(i-t,s-e)}},76861:(t,e,i)=>{var s=i(83392);t.exports=function(t){return t>Math.PI&&(t-=s.PI2),Math.abs(((t+s.TAU)%s.PI2-s.PI2)%s.PI2)}},37570:t=>{t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},87597:(t,e,i)=>{var s=i(61616);t.exports=function(){return s(-Math.PI,Math.PI)}},74493:(t,e,i)=>{var s=i(61616);t.exports=function(){return s(-180,180)}},19049:(t,e,i)=>{var s=i(37570);t.exports=function(t){return s(t+Math.PI)}},90612:(t,e,i)=>{var s=i(83392);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=s.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e{t.exports=function(t,e){var i=e-t;return 0===i?0:i-360*Math.floor((i- -180)/360)}},35786:(t,e,i)=>{var s=i(1071);t.exports=function(t){return s(t,-Math.PI,Math.PI)}},62138:(t,e,i)=>{var s=i(1071);t.exports=function(t){return s(t,-180,180)}},22153:(t,e,i)=>{t.exports={Between:i(90447),BetweenPoints:i(94240),BetweenPointsY:i(84066),BetweenY:i(9678),CounterClockwise:i(76861),Normalize:i(37570),Random:i(87597),RandomDegrees:i(74493),Reverse:i(19049),RotateTo:i(90612),ShortestBetween:i(93954),Wrap:i(35786),WrapDegrees:i(62138)}},83392:t=>{var e={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=e},53996:t=>{t.exports=function(t,e,i,s){var n=t-i,r=e-s;return Math.sqrt(n*n+r*r)}},92951:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return Math.sqrt(i*i+s*s)}},12161:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return i*i+s*s}},38057:t=>{t.exports=function(t,e,i,s){return Math.max(Math.abs(t-i),Math.abs(e-s))}},33297:t=>{t.exports=function(t,e,i,s,n){return void 0===n&&(n=2),Math.sqrt(Math.pow(i-t,n)+Math.pow(s-e,n))}},90366:t=>{t.exports=function(t,e,i,s){return Math.abs(t-i)+Math.abs(e-s)}},35032:t=>{t.exports=function(t,e,i,s){var n=t-i,r=e-s;return n*n+r*r}},10130:(t,e,i)=>{t.exports={Between:i(53996),BetweenPoints:i(92951),BetweenPointsSquared:i(12161),Chebyshev:i(38057),Power:i(33297),Snake:i(90366),Squared:i(35032)}},35060:(t,e,i)=>{var s=i(25265),n=i(57428),r=i(73214),o=i(71778),a=i(36468),h=i(88258),l=i(52910),u=i(67799),c=i(74083),d=i(92284),p=i(28035),f=i(8754);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:p.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:s.Out,Bounce:n.Out,Stepped:f,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":p.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":s.In,"Bounce.easeIn":n.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":p.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":s.Out,"Bounce.easeOut":n.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":p.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":s.InOut,"Bounce.easeInOut":n.InOut}},25860:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},45264:t=>{t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},36699:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},25265:(t,e,i)=>{t.exports={In:i(25860),Out:i(36699),InOut:i(45264)}},62191:t=>{t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},24799:t=>{t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},60819:t=>{t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},57428:(t,e,i)=>{t.exports={In:i(62191),Out:i(60819),InOut:i(24799)}},86855:t=>{t.exports=function(t){return 1-Math.sqrt(1-t*t)}},7280:t=>{t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},18058:t=>{t.exports=function(t){return Math.sqrt(1- --t*t)}},73214:(t,e,i)=>{t.exports={In:i(86855),Out:i(18058),InOut:i(7280)}},91532:t=>{t.exports=function(t){return t*t*t}},63180:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},16518:t=>{t.exports=function(t){return--t*t*t+1}},71778:(t,e,i)=>{t.exports={In:i(91532),Out:i(16518),InOut:i(63180)}},24729:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)}},50325:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*.5+1}},84074:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-s)*(2*Math.PI)/i)+1}},36468:(t,e,i)=>{t.exports={In:i(24729),Out:i(84074),InOut:i(50325)}},95638:t=>{t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},10357:t=>{t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},14894:t=>{t.exports=function(t){return 1-Math.pow(2,-10*t)}},88258:(t,e,i)=>{t.exports={In:i(95638),Out:i(14894),InOut:i(10357)}},33063:(t,e,i)=>{t.exports={Back:i(25265),Bounce:i(57428),Circular:i(73214),Cubic:i(71778),Elastic:i(36468),Expo:i(88258),Linear:i(52910),Quadratic:i(67799),Quartic:i(74083),Quintic:i(92284),Sine:i(28035),Stepped:i(8754)}},43927:t=>{t.exports=function(t){return t}},52910:(t,e,i)=>{t.exports=i(43927)},77471:t=>{t.exports=function(t){return t*t}},83863:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},44383:t=>{t.exports=function(t){return t*(2-t)}},67799:(t,e,i)=>{t.exports={In:i(77471),Out:i(44383),InOut:i(83863)}},48311:t=>{t.exports=function(t){return t*t*t*t}},55248:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},23135:t=>{t.exports=function(t){return 1- --t*t*t*t}},74083:(t,e,i)=>{t.exports={In:i(48311),Out:i(23135),InOut:i(55248)}},7313:t=>{t.exports=function(t){return t*t*t*t*t}},98759:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},26670:t=>{t.exports=function(t){return--t*t*t*t*t+1}},92284:(t,e,i)=>{t.exports={In:i(7313),Out:i(26670),InOut:i(98759)}},52929:t=>{t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},66333:t=>{t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},37255:t=>{t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},28035:(t,e,i)=>{t.exports={In:i(52929),Out:i(37255),InOut:i(66333)}},52770:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},8754:(t,e,i)=>{t.exports=i(52770)},17247:t=>{t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},88456:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},41935:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},54726:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t{t.exports={Ceil:i(17247),Equal:i(88456),Floor:i(61824),GreaterThan:i(41935),LessThan:i(54726)}},5923:(t,e,i)=>{var s=i(83392),n=i(98611),r={Angle:i(22153),Distance:i(10130),Easing:i(33063),Fuzzy:i(52778),Interpolation:i(48528),Pow2:i(73773),Snap:i(23679),RandomDataGenerator:i(81429),Average:i(26042),Bernstein:i(22824),Between:i(17489),CatmullRom:i(14976),CeilTo:i(89129),Clamp:i(82897),DegToRad:i(75606),Difference:i(767),Euler:i(9849),Factorial:i(8034),FloatBetween:i(61616),FloorTo:i(60679),FromPercent:i(91806),GetSpeed:i(79366),IsEven:i(43776),IsEvenStrict:i(58442),Linear:i(42798),LinearXY:i(61072),MaxAdd:i(69635),Median:i(37394),MinSub:i(17259),Percent:i(61820),RadToDeg:i(23701),RandomXY:i(16906),RandomXYZ:i(52417),RandomXYZW:i(17915),Rotate:i(52257),RotateAround:i(2386),RotateAroundDistance:i(72395),RotateTo:i(41061),RoundAwayFromZero:i(67233),RoundTo:i(64333),SinCosTableGenerator:i(59533),SmootherStep:i(87736),SmoothStep:i(5514),ToXY:i(55805),TransformXY:i(64462),Within:i(9557),Wrap:i(1071),Vector2:i(93736),Vector3:i(70015),Vector4:i(51729),Matrix3:i(5341),Matrix4:i(16650),Quaternion:i(75003),RotateVec3:i(93709)};r=n(!1,r,s),t.exports=r},63210:(t,e,i)=>{var s=i(22824);t.exports=function(t,e){for(var i=0,n=t.length-1,r=0;r<=n;r++)i+=Math.pow(1-e,n-r)*Math.pow(e,r)*t[r]*s(n,r);return i}},88332:(t,e,i)=>{var s=i(14976);t.exports=function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n);return t[0]===t[i]?(e<0&&(r=Math.floor(n=i*(1+e))),s(n-r,t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i])):e<0?t[0]-(s(-n,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(s(n-i,t[i],t[i],t[i-1],t[i-1])-t[i]):s(n-r,t[r?r-1:0],t[r],t[i{t.exports=function(t,e,i,s,n){return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,s)+function(t,e){return t*t*t*e}(t,n)}},47614:(t,e,i)=>{var s=i(42798);t.exports=function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n);return e<0?s(t[0],t[1],n):e>1?s(t[i],t[i-1],i-n):s(t[r],t[r+1>i?i:r+1],n-r)}},16252:t=>{t.exports=function(t,e,i,s){return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,s)}},44521:(t,e,i)=>{var s=i(5514);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},45507:(t,e,i)=>{var s=i(87736);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},48528:(t,e,i)=>{t.exports={Bezier:i(63210),CatmullRom:i(88332),CubicBezier:i(34631),Linear:i(47614),QuadraticBezier:i(16252),SmoothStep:i(44521),SmootherStep:i(45507)}},3504:t=>{t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<{t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},2018:t=>{t.exports=function(t){return t>0&&0==(t&t-1)}},73773:(t,e,i)=>{t.exports={GetNext:i(3504),IsSize:i(28621),IsValue:i(2018)}},81429:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),s=t[i];t[i]=t[e],t[e]=s}return t}});t.exports=s},82127:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),s?(i+t)/e:i+t)}},84314:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),s?(i+t)/e:i+t)}},88462:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),s?(i+t)/e:i+t)}},23679:(t,e,i)=>{t.exports={Ceil:i(82127),Floor:i(84314),To:i(88462)}},92491:(t,e,i)=>{var s=i(86459),n=i(98611),r={Actions:i(83979),Animations:i(13517),BlendModes:i(95723),Cache:i(45820),Cameras:i(44143),Core:i(80293),Class:i(56694),Create:i(84106),Curves:i(73962),Data:i(1999),Display:i(24816),DOM:i(3590),Events:i(95146),Game:i(15213),GameObjects:i(48013),Geom:i(84068),Input:i(20873),Loader:i(95695),Math:i(5923),Physics:i(53954),Plugins:i(45615),Renderer:i(42069),Scale:i(86754),ScaleModes:i(27394),Scene:i(87157),Scenes:i(20436),Structs:i(20010),Textures:i(87499),Tilemaps:i(52678),Time:i(97121),Tweens:i(75193),Utils:i(22178)};r.Sound=i(56751),r=n(!1,r,s),t.exports=r,i.g.Phaser=r},62832:(t,e,i)=>{var s=i(56694),n=i(7864),r=i(1539),o=new s({Extends:r,Mixins:[n.Acceleration,n.Angular,n.Bounce,n.Debug,n.Drag,n.Enable,n.Friction,n.Gravity,n.Immovable,n.Mass,n.Pushable,n.Size,n.Velocity],initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.body=null}});t.exports=o},66150:(t,e,i)=>{var s=i(56694),n=i(75606),r=i(53996),o=i(35032),a=i(99523),h=i(72632),l=i(30657),u=i(2732),c=i(15147),d=i(91963),p=i(7599),f=i(93736),v=i(85233),g=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,t.sys.events.once(p.BOOT,this.boot,this),t.sys.events.on(p.START,this.start,this)},boot:function(){this.world=new v(this.scene,this.config),this.add=new a(this.world),this.systems.events.once(p.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new v(this.scene,this.config),this.add=new a(this.world));var t=this.systems.events;h(this.config,"customUpdate",!1)||t.on(p.UPDATE,this.world.update,this.world),t.on(p.POST_UPDATE,this.world.postUpdate,this.world),t.once(p.SHUTDOWN,this.shutdown,this)},enableUpdate:function(){this.systems.events.on(p.UPDATE,this.world.update,this.world)},disableUpdate:function(){this.systems.events.off(p.UPDATE,this.world.update,this.world)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return l(h(e,"arcade",{}),h(t,"arcade",{}))},overlap:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.world.collideObjects(t,e,i,s,n,!0)},collide:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.world.collideObjects(t,e,i,s,n,!1)},collideTiles:function(t,e,i,s,n){return this.world.collideTiles(t,e,i,s,n)},overlapTiles:function(t,e,i,s,n){return this.world.overlapTiles(t,e,i,s,n)},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},accelerateTo:function(t,e,i,s,n,r){void 0===s&&(s=60);var o=Math.atan2(i-t.y,e-t.x);return t.body.acceleration.setToPolar(o,s),void 0!==n&&void 0!==r&&t.body.maxVelocity.set(n,r),o},accelerateToObject:function(t,e,i,s,n){return this.accelerateTo(t,e.x,e.y,i,s,n)},closest:function(t,e){e||(e=this.world.bodies.entries);for(var i=Number.MAX_VALUE,s=null,n=t.x,r=t.y,a=e.length,h=0;hi&&(s=l,i=c)}}return s},moveTo:function(t,e,i,s,n){void 0===s&&(s=60),void 0===n&&(n=0);var o=Math.atan2(i-t.y,e-t.x);return n>0&&(s=r(t.x,t.y,e,i)/(n/1e3)),t.body.velocity.setToPolar(o,s),o},moveToObject:function(t,e,i,s){return this.moveTo(t,e.x,e.y,i,s)},velocityFromAngle:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new f),i.setToPolar(n(t),e)},velocityFromRotation:function(t,e,i){return void 0===e&&(e=60),void 0===i&&(i=new f),i.setToPolar(t,e)},overlapRect:function(t,e,i,s,n,r){return c(this.world,t,e,i,s,n,r)},overlapCirc:function(t,e,i,s,n){return u(this.world,t,e,i,s,n)},shutdown:function(){if(this.world){var t=this.systems.events;t.off(p.UPDATE,this.world.update,this.world),t.off(p.POST_UPDATE,this.world.postUpdate,this.world),t.off(p.SHUTDOWN,this.shutdown,this),this.add.destroy(),this.world.destroy(),this.add=null,this.world=null}},destroy:function(){this.shutdown(),this.scene.sys.events.off(p.START,this.start,this),this.scene=null,this.systems=null}});d.register("ArcadePhysics",g,"arcadePhysics"),t.exports=g},25084:(t,e,i)=>{var s=i(56694),n=i(7864),r=i(13747),o=new s({Extends:r,Mixins:[n.Acceleration,n.Angular,n.Bounce,n.Debug,n.Drag,n.Enable,n.Friction,n.Gravity,n.Immovable,n.Mass,n.Pushable,n.Size,n.Velocity],initialize:function(t,e,i,s,n){r.call(this,t,e,i,s,n),this.body=null}});t.exports=o},97602:(t,e,i)=>{var s=i(56694),n=i(47401),r=i(27037),o=i(23701),a=i(74118),h=i(94287),l=i(93736),u=new s({initialize:function(t,e){var i=64,s=64,r=void 0!==e;r&&e.displayWidth&&(i=e.displayWidth,s=e.displayHeight),r||(e={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=t,this.gameObject=r?e:void 0,this.isBody=!0,this.transform={x:e.x,y:e.y,rotation:e.angle,scaleX:e.scaleX,scaleY:e.scaleY,displayOriginX:e.displayOriginX,displayOriginY:e.displayOriginY},this.debugShowBody=t.defaults.debugShowBody,this.debugShowVelocity=t.defaults.debugShowVelocity,this.debugBodyColor=t.defaults.bodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new l,this.position=new l(e.x-e.scaleX*e.displayOriginX,e.y-e.scaleY*e.displayOriginY),this.prev=this.position.clone(),this.prevFrame=this.position.clone(),this.allowRotation=!0,this.rotation=e.angle,this.preRotation=e.angle,this.width=i,this.height=s,this.sourceWidth=i,this.sourceHeight=s,e.frame&&(this.sourceWidth=e.frame.realWidth,this.sourceHeight=e.frame.realHeight),this.halfWidth=Math.abs(i/2),this.halfHeight=Math.abs(s/2),this.center=new l(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=new l,this.newVelocity=new l,this.deltaMax=new l,this.acceleration=new l,this.allowDrag=!0,this.drag=new l,this.allowGravity=!0,this.gravity=new l,this.bounce=new l,this.worldBounce=null,this.customBoundsRectangle=t.bounds,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.maxVelocity=new l(1e4,1e4),this.maxSpeed=-1,this.friction=new l(1,0),this.useDamping=!1,this.angularVelocity=0,this.angularAcceleration=0,this.angularDrag=0,this.maxAngular=1e3,this.mass=1,this.angle=0,this.speed=0,this.facing=n.FACING_NONE,this.immovable=!1,this.pushable=!0,this.moves=!0,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.syncBounds=!1,this.physicsType=n.DYNAMIC_BODY,this._sx=e.scaleX,this._sy=e.scaleY,this._dx=0,this._dy=0,this._tx=0,this._ty=0,this._bounds=new a},updateBounds:function(){var t=this.gameObject,e=this.transform;if(t.parentContainer){var i=t.getWorldTransformMatrix(this.world._tempMatrix,this.world._tempMatrix2);e.x=i.tx,e.y=i.ty,e.rotation=o(i.rotation),e.scaleX=i.scaleX,e.scaleY=i.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY}else e.x=t.x,e.y=t.y,e.rotation=t.angle,e.scaleX=t.scaleX,e.scaleY=t.scaleY,e.displayOriginX=t.displayOriginX,e.displayOriginY=t.displayOriginY;var s=!1;if(this.syncBounds){var n=t.getBounds(this._bounds);this.width=n.width,this.height=n.height,s=!0}else{var r=Math.abs(e.scaleX),a=Math.abs(e.scaleY);this._sx===r&&this._sy===a||(this.width=this.sourceWidth*r,this.height=this.sourceHeight*a,this._sx=r,this._sy=a,s=!0)}s&&(this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter())},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},updateFromGameObject:function(){this.updateBounds();var t=this.transform;this.position.x=t.x+t.scaleX*(this.offset.x-t.displayOriginX),this.position.y=t.y+t.scaleY*(this.offset.y-t.displayOriginY),this.updateCenter()},resetFlags:function(t){void 0===t&&(t=!1);var e=this.wasTouching,i=this.touching,s=this.blocked;t?(e.none=!0,e.up=!1,e.down=!1,e.left=!1,e.right=!1):(e.none=i.none,e.up=i.up,e.down=i.down,e.left=i.left,e.right=i.right),i.none=!0,i.up=!1,i.down=!1,i.left=!1,i.right=!1,s.none=!0,s.up=!1,s.down=!1,s.left=!1,s.right=!1,this.overlapR=0,this.overlapX=0,this.overlapY=0,this.embedded=!1},preUpdate:function(t,e){t&&this.resetFlags(),this.gameObject&&this.updateFromGameObject(),this.rotation=this.transform.rotation,this.preRotation=this.rotation,this.moves&&(this.prev.x=this.position.x,this.prev.y=this.position.y,this.prevFrame.x=this.position.x,this.prevFrame.y=this.position.y),t&&this.update(e)},update:function(t){if(this.prev.x=this.position.x,this.prev.y=this.position.y,this.moves){this.world.updateMotion(this,t);var e=this.velocity.x,i=this.velocity.y;this.newVelocity.set(e*t,i*t),this.position.add(this.newVelocity),this.updateCenter(),this.angle=Math.atan2(i,e),this.speed=Math.sqrt(e*e+i*i),this.collideWorldBounds&&this.checkWorldBounds()&&this.onWorldBounds&&this.world.emit(r.WORLD_BOUNDS,this,this.blocked.up,this.blocked.down,this.blocked.left,this.blocked.right)}this._dx=this.position.x-this.prev.x,this._dy=this.position.y-this.prev.y},postUpdate:function(){var t=this.position.x-this.prevFrame.x,e=this.position.y-this.prevFrame.y,i=this.gameObject;if(this.moves){var s=this.deltaMax.x,r=this.deltaMax.y;0!==s&&0!==t&&(t<0&&t<-s?t=-s:t>0&&t>s&&(t=s)),0!==r&&0!==e&&(e<0&&e<-r?e=-r:e>0&&e>r&&(e=r)),i&&(i.x+=t,i.y+=e)}t<0?this.facing=n.FACING_LEFT:t>0&&(this.facing=n.FACING_RIGHT),e<0?this.facing=n.FACING_UP:e>0&&(this.facing=n.FACING_DOWN),this.allowRotation&&i&&(i.angle+=this.deltaZ()),this._tx=t,this._ty=e},setBoundsRectangle:function(t){return this.customBoundsRectangle=t||this.world.bounds,this},checkWorldBounds:function(){var t=this.position,e=this.customBoundsRectangle,i=this.world.checkCollision,s=this.worldBounce?-this.worldBounce.x:-this.bounce.x,n=this.worldBounce?-this.worldBounce.y:-this.bounce.y,r=!1;return t.xe.right&&i.right&&(t.x=e.right-this.width,this.velocity.x*=s,this.blocked.right=!0,r=!0),t.ye.bottom&&i.down&&(t.y=e.bottom-this.height,this.velocity.y*=n,this.blocked.down=!0,r=!0),r&&(this.blocked.none=!1,this.updateCenter()),r},setOffset:function(t,e){return void 0===e&&(e=t),this.offset.set(t,e),this},setGameObject:function(t,e){return void 0===e&&(e=!0),this.world.remove(this),this.gameObject&&this.gameObject.body&&(this.gameObject.body=null),this.gameObject=t,t.body&&(t.body=this),this.setSize(),this.world.add(this),this.enable=e,this},setSize:function(t,e,i){void 0===i&&(i=!0);var s=this.gameObject;if(s&&(!t&&s.frame&&(t=s.frame.realWidth),!e&&s.frame&&(e=s.frame.realHeight)),this.sourceWidth=t,this.sourceHeight=e,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.updateCenter(),i&&s&&s.getCenter){var n=(s.width-t)/2,r=(s.height-e)/2;this.offset.set(n,r)}return this.isCircle=!1,this.radius=0,this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.isCircle=!0,this.radius=t,this.sourceWidth=2*t,this.sourceHeight=2*t,this.width=this.sourceWidth*this._sx,this.height=this.sourceHeight*this._sy,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter()):this.isCircle=!1,this},reset:function(t,e){this.stop();var i=this.gameObject;i&&(i.setPosition(t,e),this.rotation=i.angle,this.preRotation=i.angle);var s=this.position;i&&i.getTopLeft?i.getTopLeft(s):s.set(t,e),this.prev.copy(s),this.prevFrame.copy(s),i&&this.updateBounds(),this.updateCenter(),this.collideWorldBounds&&this.checkWorldBounds(),this.resetFlags(!0)},stop:function(){return this.velocity.set(0),this.acceleration.set(0),this.speed=0,this.angularVelocity=0,this.angularAcceleration=0,this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?this.radius>0&&t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom&&(this.center.x-t)*(this.center.x-t)+(this.center.y-e)*(this.center.y-e)<=this.radius*this.radius:h(this,t,e)},onFloor:function(){return this.blocked.down},onCeiling:function(){return this.blocked.up},onWall:function(){return this.blocked.left||this.blocked.right},deltaAbsX:function(){return this._dx>0?this._dx:-this._dx},deltaAbsY:function(){return this._dy>0?this._dy:-this._dy},deltaX:function(){return this._dx},deltaY:function(){return this._dy},deltaXFinal:function(){return this._tx},deltaYFinal:function(){return this._ty},deltaZ:function(){return this.rotation-this.preRotation},destroy:function(){this.enable=!1,this.world&&this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,s=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor),this.isCircle?t.strokeCircle(i,s,this.width/2):(this.checkCollision.up&&t.lineBetween(e.x,e.y,e.x+this.width,e.y),this.checkCollision.right&&t.lineBetween(e.x+this.width,e.y,e.x+this.width,e.y+this.height),this.checkCollision.down&&t.lineBetween(e.x,e.y+this.height,e.x+this.width,e.y+this.height),this.checkCollision.left&&t.lineBetween(e.x,e.y,e.x,e.y+this.height))),this.debugShowVelocity&&(t.lineStyle(t.defaultStrokeWidth,this.world.defaults.velocityDebugColor,1),t.lineBetween(i,s,i+this.velocity.x/2,s+this.velocity.y/2))},willDrawDebug:function(){return this.debugShowBody||this.debugShowVelocity},setCollideWorldBounds:function(t,e,i,s){void 0===t&&(t=!0),this.collideWorldBounds=t;var n=void 0!==e,r=void 0!==i;return(n||r)&&(this.worldBounce||(this.worldBounce=new l),n&&(this.worldBounce.x=e),r&&(this.worldBounce.y=i)),void 0!==s&&(this.onWorldBounds=s),this},setVelocity:function(t,e){return this.velocity.set(t,e),t=this.velocity.x,e=this.velocity.y,this.speed=Math.sqrt(t*t+e*e),this},setVelocityX:function(t){return this.setVelocity(t,this.velocity.y)},setVelocityY:function(t){return this.setVelocity(this.velocity.x,t)},setMaxVelocity:function(t,e){return this.maxVelocity.set(t,e),this},setMaxVelocityX:function(t){return this.maxVelocity.x=t,this},setMaxVelocityY:function(t){return this.maxVelocity.y=t,this},setMaxSpeed:function(t){return this.maxSpeed=t,this},setBounce:function(t,e){return this.bounce.set(t,e),this},setBounceX:function(t){return this.bounce.x=t,this},setBounceY:function(t){return this.bounce.y=t,this},setAcceleration:function(t,e){return this.acceleration.set(t,e),this},setAccelerationX:function(t){return this.acceleration.x=t,this},setAccelerationY:function(t){return this.acceleration.y=t,this},setAllowDrag:function(t){return void 0===t&&(t=!0),this.allowDrag=t,this},setAllowGravity:function(t){return void 0===t&&(t=!0),this.allowGravity=t,this},setAllowRotation:function(t){return void 0===t&&(t=!0),this.allowRotation=t,this},setDrag:function(t,e){return this.drag.set(t,e),this},setDamping:function(t){return this.useDamping=t,this},setDragX:function(t){return this.drag.x=t,this},setDragY:function(t){return this.drag.y=t,this},setGravity:function(t,e){return this.gravity.set(t,e),this},setGravityX:function(t){return this.gravity.x=t,this},setGravityY:function(t){return this.gravity.y=t,this},setFriction:function(t,e){return this.friction.set(t,e),this},setFrictionX:function(t){return this.friction.x=t,this},setFrictionY:function(t){return this.friction.y=t,this},setAngularVelocity:function(t){return this.angularVelocity=t,this},setAngularAcceleration:function(t){return this.angularAcceleration=t,this},setAngularDrag:function(t){return this.angularDrag=t,this},setMass:function(t){return this.mass=t,this},setImmovable:function(t){return void 0===t&&(t=!0),this.immovable=t,this},setEnable:function(t){return void 0===t&&(t=!0),this.enable=t,this},processX:function(t,e,i,s){this.x+=t,this.updateCenter(),null!==e&&(this.velocity.x=e);var n=this.blocked;i&&(n.left=!0),s&&(n.right=!0)},processY:function(t,e,i,s){this.y+=t,this.updateCenter(),null!==e&&(this.velocity.y=e);var n=this.blocked;i&&(n.up=!0),s&&(n.down=!0)},x:{get:function(){return this.position.x},set:function(t){this.position.x=t}},y:{get:function(){return this.position.y},set:function(t){this.position.y=t}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=u},3909:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s,n,r,o){this.world=t,this.name="",this.active=!0,this.overlapOnly=e,this.object1=i,this.object2=s,this.collideCallback=n,this.processCallback=r,this.callbackContext=o},setName:function(t){return this.name=t,this},update:function(){this.world.collideObjects(this.object1,this.object2,this.collideCallback,this.processCallback,this.callbackContext,this.overlapOnly)},destroy:function(){this.world.removeCollider(this),this.active=!1,this.world=null,this.object1=null,this.object2=null,this.collideCallback=null,this.processCallback=null,this.callbackContext=null}});t.exports=s},99523:(t,e,i)=>{var s=i(62832),n=i(25084),r=i(97602),o=i(56694),a=i(47401),h=i(10481),l=i(66634),u=i(46346),c=new o({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},collider:function(t,e,i,s,n){return this.world.addCollider(t,e,i,s,n)},overlap:function(t,e,i,s,n){return this.world.addOverlap(t,e,i,s,n)},existing:function(t,e){var i=e?a.STATIC_BODY:a.DYNAMIC_BODY;return this.world.enableBody(t,i),t},staticImage:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.world.enableBody(r,a.STATIC_BODY),r},image:function(t,e,i,n){var r=new s(this.scene,t,e,i,n);return this.sys.displayList.add(r),this.world.enableBody(r,a.DYNAMIC_BODY),r},staticSprite:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,a.STATIC_BODY),r},sprite:function(t,e,i,s){var r=new n(this.scene,t,e,i,s);return this.sys.displayList.add(r),this.sys.updateList.add(r),this.world.enableBody(r,a.DYNAMIC_BODY),r},staticGroup:function(t,e){return this.sys.updateList.add(new u(this.world,this.world.scene,t,e))},group:function(t,e){return this.sys.updateList.add(new h(this.world,this.world.scene,t,e))},body:function(t,e,i,s){var n=new r(this.world);return n.position.set(t,e),i&&s&&n.setSize(i,s),this.world.add(n,a.DYNAMIC_BODY),n},staticBody:function(t,e,i,s){var n=new l(this.world);return n.position.set(t,e),i&&s&&n.setSize(i,s),this.world.add(n,a.STATIC_BODY),n},destroy:function(){this.world=null,this.scene=null,this.sys=null}});t.exports=c},75671:(t,e,i)=>{var s=i(47401);t.exports=function(t,e,i,n){var r=0,o=t.deltaAbsX()+e.deltaAbsX()+n;return 0===t._dx&&0===e._dx?(t.embedded=!0,e.embedded=!0):t._dx>e._dx?(r=t.right-e.x)>o&&!i||!1===t.checkCollision.right||!1===e.checkCollision.left?r=0:(t.touching.none=!1,t.touching.right=!0,e.touching.none=!1,e.touching.left=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.right=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.left=!0)):t._dxo&&!i||!1===t.checkCollision.left||!1===e.checkCollision.right?r=0:(t.touching.none=!1,t.touching.left=!0,e.touching.none=!1,e.touching.right=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.left=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.right=!0))),t.overlapX=r,e.overlapX=r,r}},66185:(t,e,i)=>{var s=i(47401);t.exports=function(t,e,i,n){var r=0,o=t.deltaAbsY()+e.deltaAbsY()+n;return 0===t._dy&&0===e._dy?(t.embedded=!0,e.embedded=!0):t._dy>e._dy?(r=t.bottom-e.y)>o&&!i||!1===t.checkCollision.down||!1===e.checkCollision.up?r=0:(t.touching.none=!1,t.touching.down=!0,e.touching.none=!1,e.touching.up=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.down=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.up=!0)):t._dyo&&!i||!1===t.checkCollision.up||!1===e.checkCollision.down?r=0:(t.touching.none=!1,t.touching.up=!0,e.touching.none=!1,e.touching.down=!0,e.physicsType!==s.STATIC_BODY||i||(t.blocked.none=!1,t.blocked.up=!0),t.physicsType!==s.STATIC_BODY||i||(e.blocked.none=!1,e.blocked.down=!0))),t.overlapY=r,e.overlapY=r,r}},10481:(t,e,i)=>{var s=i(25084),n=i(56694),r=i(47401),o=i(72632),a=i(59192),h=i(42911),l=new n({Extends:a,initialize:function(t,e,i,n){if(i||n)if(h(i))n=i,i=null,n.internalCreateCallback=this.createCallbackHandler,n.internalRemoveCallback=this.removeCallbackHandler;else if(Array.isArray(i)&&h(i[0])){n=i[0];var l=this;i.forEach((function(t){t.internalCreateCallback=l.createCallbackHandler,t.internalRemoveCallback=l.removeCallbackHandler})),i=null}else n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};else n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler};this.world=t,n.classType=o(n,"classType",s),this.physicsType=r.DYNAMIC_BODY,this.defaults={setCollideWorldBounds:o(n,"collideWorldBounds",!1),setBoundsRectangle:o(n,"customBoundsRectangle",null),setAccelerationX:o(n,"accelerationX",0),setAccelerationY:o(n,"accelerationY",0),setAllowDrag:o(n,"allowDrag",!0),setAllowGravity:o(n,"allowGravity",!0),setAllowRotation:o(n,"allowRotation",!0),setDamping:o(n,"useDamping",!1),setBounceX:o(n,"bounceX",0),setBounceY:o(n,"bounceY",0),setDragX:o(n,"dragX",0),setDragY:o(n,"dragY",0),setEnable:o(n,"enable",!0),setGravityX:o(n,"gravityX",0),setGravityY:o(n,"gravityY",0),setFrictionX:o(n,"frictionX",0),setFrictionY:o(n,"frictionY",0),setMaxSpeed:o(n,"maxSpeed",-1),setMaxVelocityX:o(n,"maxVelocityX",1e4),setMaxVelocityY:o(n,"maxVelocityY",1e4),setVelocityX:o(n,"velocityX",0),setVelocityY:o(n,"velocityY",0),setAngularVelocity:o(n,"angularVelocity",0),setAngularAcceleration:o(n,"angularAcceleration",0),setAngularDrag:o(n,"angularDrag",0),setMass:o(n,"mass",1),setImmovable:o(n,"immovable",!1)},a.call(this,e,i,n),this.type="PhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,r.DYNAMIC_BODY);var e=t.body;for(var i in this.defaults)e[i](this.defaults[i])},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},setVelocity:function(t,e,i){void 0===i&&(i=0);for(var s=this.getChildren(),n=0;n{var e,i,s,n,r,o,a,h,l,u,c,d,p,f,v,g,m,y=function(){return u&&v&&i.blocked.right?(e.processX(-m,a,!1,!0),1):l&&g&&i.blocked.left?(e.processX(m,a,!0),1):p&&g&&e.blocked.right?(i.processX(-m,h,!1,!0),2):d&&v&&e.blocked.left?(i.processX(m,h,!0),2):0},x=function(t){if(s&&n)m*=.5,0===t||3===t?(e.processX(m,r),i.processX(-m,o)):(e.processX(-m,r),i.processX(m,o));else if(s&&!n)0===t||3===t?e.processX(m,a,!0):e.processX(-m,a,!1,!0);else if(!s&&n)0===t||3===t?i.processX(-m,h,!1,!0):i.processX(m,h,!0);else{var v=.5*m;0===t?f?(e.processX(m,0,!0),i.processX(0,null,!1,!0)):p?(e.processX(v,0,!0),i.processX(-v,0,!1,!0)):(e.processX(v,i.velocity.x,!0),i.processX(-v,null,!1,!0)):1===t?c?(e.processX(0,null,!1,!0),i.processX(m,0,!0)):u?(e.processX(-v,0,!1,!0),i.processX(v,0,!0)):(e.processX(-v,null,!1,!0),i.processX(v,e.velocity.x,!0)):2===t?f?(e.processX(-m,0,!1,!0),i.processX(0,null,!0)):d?(e.processX(-v,0,!1,!0),i.processX(v,0,!0)):(e.processX(-v,i.velocity.x,!1,!0),i.processX(v,null,!0)):3===t&&(c?(e.processX(0,null,!0),i.processX(-m,0,!1,!0)):l?(e.processX(v,0,!0),i.processX(-v,0,!1,!0)):(e.processX(v,i.velocity.y,!0),i.processX(-v,null,!1,!0)))}return!0};t.exports={BlockCheck:y,Check:function(){var t=e.velocity.x,s=i.velocity.x,n=Math.sqrt(s*s*i.mass/e.mass)*(s>0?1:-1),a=Math.sqrt(t*t*e.mass/i.mass)*(t>0?1:-1),h=.5*(n+a);return a-=h,r=h+(n-=h)*e.bounce.x,o=h+a*i.bounce.x,l&&g?x(0):d&&v?x(1):u&&v?x(2):!(!p||!g)&&x(3)},Set:function(t,r,o){i=r;var x=(e=t).velocity.x,T=i.velocity.x;return s=e.pushable,l=e._dx<0,u=e._dx>0,c=0===e._dx,v=Math.abs(e.right-i.x)<=Math.abs(i.right-e.x),a=T-x*e.bounce.x,n=i.pushable,d=i._dx<0,p=i._dx>0,f=0===i._dx,g=!v,h=x-T*i.bounce.x,m=Math.abs(o),y()},Run:x,RunImmovableBody1:function(t){1===t?i.velocity.x=0:v?i.processX(m,h,!0):i.processX(-m,h,!1,!0),e.moves&&(i.y+=(e.y-e.prev.y)*e.friction.y,i._dy=i.y-i.prev.y)},RunImmovableBody2:function(t){2===t?e.velocity.x=0:g?e.processX(m,a,!0):e.processX(-m,a,!1,!0),i.moves&&(e.y+=(i.y-i.prev.y)*i.friction.y,e._dy=e.y-e.prev.y)}}},67050:t=>{var e,i,s,n,r,o,a,h,l,u,c,d,p,f,v,g,m,y=function(){return u&&v&&i.blocked.down?(e.processY(-m,a,!1,!0),1):l&&g&&i.blocked.up?(e.processY(m,a,!0),1):p&&g&&e.blocked.down?(i.processY(-m,h,!1,!0),2):d&&v&&e.blocked.up?(i.processY(m,h,!0),2):0},x=function(t){if(s&&n)m*=.5,0===t||3===t?(e.processY(m,r),i.processY(-m,o)):(e.processY(-m,r),i.processY(m,o));else if(s&&!n)0===t||3===t?e.processY(m,a,!0):e.processY(-m,a,!1,!0);else if(!s&&n)0===t||3===t?i.processY(-m,h,!1,!0):i.processY(m,h,!0);else{var v=.5*m;0===t?f?(e.processY(m,0,!0),i.processY(0,null,!1,!0)):p?(e.processY(v,0,!0),i.processY(-v,0,!1,!0)):(e.processY(v,i.velocity.y,!0),i.processY(-v,null,!1,!0)):1===t?c?(e.processY(0,null,!1,!0),i.processY(m,0,!0)):u?(e.processY(-v,0,!1,!0),i.processY(v,0,!0)):(e.processY(-v,null,!1,!0),i.processY(v,e.velocity.y,!0)):2===t?f?(e.processY(-m,0,!1,!0),i.processY(0,null,!0)):d?(e.processY(-v,0,!1,!0),i.processY(v,0,!0)):(e.processY(-v,i.velocity.y,!1,!0),i.processY(v,null,!0)):3===t&&(c?(e.processY(0,null,!0),i.processY(-m,0,!1,!0)):l?(e.processY(v,0,!0),i.processY(-v,0,!1,!0)):(e.processY(v,i.velocity.y,!0),i.processY(-v,null,!1,!0)))}return!0};t.exports={BlockCheck:y,Check:function(){var t=e.velocity.y,s=i.velocity.y,n=Math.sqrt(s*s*i.mass/e.mass)*(s>0?1:-1),a=Math.sqrt(t*t*e.mass/i.mass)*(t>0?1:-1),h=.5*(n+a);return a-=h,r=h+(n-=h)*e.bounce.y,o=h+a*i.bounce.y,l&&g?x(0):d&&v?x(1):u&&v?x(2):!(!p||!g)&&x(3)},Set:function(t,r,o){i=r;var x=(e=t).velocity.y,T=i.velocity.y;return s=e.pushable,l=e._dy<0,u=e._dy>0,c=0===e._dy,v=Math.abs(e.bottom-i.y)<=Math.abs(i.bottom-e.y),a=T-x*e.bounce.y,n=i.pushable,d=i._dy<0,p=i._dy>0,f=0===i._dy,g=!v,h=x-T*i.bounce.y,m=Math.abs(o),y()},Run:x,RunImmovableBody1:function(t){1===t?i.velocity.y=0:v?i.processY(m,h,!0):i.processY(-m,h,!1,!0),e.moves&&(i.x+=(e.x-e.prev.x)*e.friction.x,i._dx=i.x-i.prev.x)},RunImmovableBody2:function(t){2===t?e.velocity.y=0:g?e.processY(m,a,!0):e.processY(-m,a,!1,!0),i.moves&&(e.x+=(i.x-i.prev.x)*i.friction.x,e._dx=e.x-e.prev.x)}}},61777:(t,e,i)=>{var s=i(75671),n=i(22916);t.exports=function(t,e,i,r,o){void 0===o&&(o=s(t,e,i,r));var a=t.immovable,h=e.immovable;if(i||0===o||a&&h||t.customSeparateX||e.customSeparateX)return 0!==o||t.embedded&&e.embedded;var l=n.Set(t,e,o);return a||h?(a?n.RunImmovableBody1(l):h&&n.RunImmovableBody2(l),!0):l>0||n.Check()}},25299:(t,e,i)=>{var s=i(66185),n=i(67050);t.exports=function(t,e,i,r,o){void 0===o&&(o=s(t,e,i,r));var a=t.immovable,h=e.immovable;if(i||0===o||a&&h||t.customSeparateY||e.customSeparateY)return 0!==o||t.embedded&&e.embedded;var l=n.Set(t,e,o);return a||h?(a?n.RunImmovableBody1(l):h&&n.RunImmovableBody2(l),!0):l>0||n.Check()}},66634:(t,e,i)=>{var s=i(65650),n=i(56694),r=i(47401),o=i(94287),a=i(93736),h=new n({initialize:function(t,e){var i=64,s=64,n=void 0!==e;n&&e.displayWidth&&(i=e.displayWidth,s=e.displayHeight),n||(e={x:0,y:0,angle:0,rotation:0,scaleX:1,scaleY:1,displayOriginX:0,displayOriginY:0}),this.world=t,this.gameObject=n?e:void 0,this.isBody=!0,this.debugShowBody=t.defaults.debugShowStaticBody,this.debugBodyColor=t.defaults.staticBodyDebugColor,this.enable=!0,this.isCircle=!1,this.radius=0,this.offset=new a,this.position=new a(e.x-i*e.originX,e.y-s*e.originY),this.width=i,this.height=s,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center=new a(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.velocity=a.ZERO,this.allowGravity=!1,this.gravity=a.ZERO,this.bounce=a.ZERO,this.onWorldBounds=!1,this.onCollide=!1,this.onOverlap=!1,this.mass=1,this.immovable=!0,this.pushable=!1,this.customSeparateX=!1,this.customSeparateY=!1,this.overlapX=0,this.overlapY=0,this.overlapR=0,this.embedded=!1,this.collideWorldBounds=!1,this.checkCollision={none:!1,up:!0,down:!0,left:!0,right:!0},this.touching={none:!0,up:!1,down:!1,left:!1,right:!1},this.wasTouching={none:!0,up:!1,down:!1,left:!1,right:!1},this.blocked={none:!0,up:!1,down:!1,left:!1,right:!1},this.physicsType=r.STATIC_BODY,this._dx=0,this._dy=0},setGameObject:function(t,e){return t&&t!==this.gameObject&&(this.gameObject.body=null,t.body=this,this.gameObject=t),e&&this.updateFromGameObject(),this},updateFromGameObject:function(){this.world.staticTree.remove(this);var t=this.gameObject;return t.getTopLeft(this.position),this.width=t.displayWidth,this.height=t.displayHeight,this.halfWidth=Math.abs(this.width/2),this.halfHeight=Math.abs(this.height/2),this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight),this.world.staticTree.insert(this),this},setOffset:function(t,e){return void 0===e&&(e=t),this.world.staticTree.remove(this),this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(t,e),this.position.x+=this.offset.x,this.position.y+=this.offset.y,this.updateCenter(),this.world.staticTree.insert(this),this},setSize:function(t,e,i){void 0===i&&(i=!0);var s=this.gameObject;if(!t&&s.frame&&(t=s.frame.realWidth),!e&&s.frame&&(e=s.frame.realHeight),this.world.staticTree.remove(this),this.width=t,this.height=e,this.halfWidth=Math.floor(t/2),this.halfHeight=Math.floor(e/2),i&&s.getCenter){var n=s.displayWidth/2,r=s.displayHeight/2;this.position.x-=this.offset.x,this.position.y-=this.offset.y,this.offset.set(n-this.halfWidth,r-this.halfHeight),this.position.x+=this.offset.x,this.position.y+=this.offset.y}return this.updateCenter(),this.isCircle=!1,this.radius=0,this.world.staticTree.insert(this),this},setCircle:function(t,e,i){return void 0===e&&(e=this.offset.x),void 0===i&&(i=this.offset.y),t>0?(this.world.staticTree.remove(this),this.isCircle=!0,this.radius=t,this.width=2*t,this.height=2*t,this.halfWidth=Math.floor(this.width/2),this.halfHeight=Math.floor(this.height/2),this.offset.set(e,i),this.updateCenter(),this.world.staticTree.insert(this)):this.isCircle=!1,this},updateCenter:function(){this.center.set(this.position.x+this.halfWidth,this.position.y+this.halfHeight)},reset:function(t,e){var i=this.gameObject;void 0===t&&(t=i.x),void 0===e&&(e=i.y),this.world.staticTree.remove(this),i.setPosition(t,e),i.getTopLeft(this.position),this.updateCenter(),this.world.staticTree.insert(this)},stop:function(){return this},getBounds:function(t){return t.x=this.x,t.y=this.y,t.right=this.right,t.bottom=this.bottom,t},hitTest:function(t,e){return this.isCircle?s(this,t,e):o(this,t,e)},postUpdate:function(){},deltaAbsX:function(){return 0},deltaAbsY:function(){return 0},deltaX:function(){return 0},deltaY:function(){return 0},deltaZ:function(){return 0},destroy:function(){this.enable=!1,this.world.pendingDestroy.set(this)},drawDebug:function(t){var e=this.position,i=e.x+this.halfWidth,s=e.y+this.halfHeight;this.debugShowBody&&(t.lineStyle(t.defaultStrokeWidth,this.debugBodyColor,1),this.isCircle?t.strokeCircle(i,s,this.width/2):t.strokeRect(e.x,e.y,this.width,this.height))},willDrawDebug:function(){return this.debugShowBody},setMass:function(t){return t<=0&&(t=.1),this.mass=t,this},x:{get:function(){return this.position.x},set:function(t){this.world.staticTree.remove(this),this.position.x=t,this.world.staticTree.insert(this)}},y:{get:function(){return this.position.y},set:function(t){this.world.staticTree.remove(this),this.position.y=t,this.world.staticTree.insert(this)}},left:{get:function(){return this.position.x}},right:{get:function(){return this.position.x+this.width}},top:{get:function(){return this.position.y}},bottom:{get:function(){return this.position.y+this.height}}});t.exports=h},46346:(t,e,i)=>{var s=i(25084),n=i(56694),r=i(47401),o=i(72632),a=i(59192),h=i(42911),l=new n({Extends:a,initialize:function(t,e,i,n){i||n?h(i)?(n=i,i=null,n.internalCreateCallback=this.createCallbackHandler,n.internalRemoveCallback=this.removeCallbackHandler,n.createMultipleCallback=this.createMultipleCallbackHandler,n.classType=o(n,"classType",s)):Array.isArray(i)&&h(i[0])?(n=i,i=null,n.forEach((function(t){t.internalCreateCallback=this.createCallbackHandler,t.internalRemoveCallback=this.removeCallbackHandler,t.createMultipleCallback=this.createMultipleCallbackHandler,t.classType=o(t,"classType",s)}))):n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler}:n={internalCreateCallback:this.createCallbackHandler,internalRemoveCallback:this.removeCallbackHandler,createMultipleCallback:this.createMultipleCallbackHandler,classType:s},this.world=t,this.physicsType=r.STATIC_BODY,a.call(this,e,i,n),this.type="StaticPhysicsGroup"},createCallbackHandler:function(t){t.body||this.world.enableBody(t,r.STATIC_BODY)},removeCallbackHandler:function(t){t.body&&this.world.disableBody(t)},createMultipleCallbackHandler:function(){this.refresh()},refresh:function(){for(var t=this.children.entries,e=0;e{var s=i(94240),n=i(97602),r=i(82897),o=i(56694),a=i(3909),h=i(47401),l=i(53996),u=i(92951),c=i(6659),d=i(27037),p=i(88456),f=i(41935),v=i(54726),g=i(75671),m=i(66185),y=i(44662),x=i(10850),T=i(83392),w=i(74623),b=i(25163),E=i(74118),S=i(68687),A=i(27354),C=i(61777),_=i(25299),M=i(58403),R=i(66634),P=i(28808),O=i(69360),L=i(93736),F=i(1071),D=new o({Extends:c,initialize:function(t,e){c.call(this),this.scene=t,this.bodies=new M,this.staticBodies=new M,this.pendingDestroy=new M,this.colliders=new w,this.gravity=new L(x(e,"gravity.x",0),x(e,"gravity.y",0)),this.bounds=new E(x(e,"x",0),x(e,"y",0),x(e,"width",t.sys.scale.width),x(e,"height",t.sys.scale.height)),this.checkCollision={up:x(e,"checkCollision.up",!0),down:x(e,"checkCollision.down",!0),left:x(e,"checkCollision.left",!0),right:x(e,"checkCollision.right",!0)},this.fps=x(e,"fps",60),this.fixedStep=x(e,"fixedStep",!0),this._elapsed=0,this._frameTime=1/this.fps,this._frameTimeMS=1e3*this._frameTime,this.stepsLastFrame=0,this.timeScale=x(e,"timeScale",1),this.OVERLAP_BIAS=x(e,"overlapBias",4),this.TILE_BIAS=x(e,"tileBias",16),this.forceX=x(e,"forceX",!1),this.isPaused=x(e,"isPaused",!1),this._total=0,this.drawDebug=x(e,"debug",!1),this.debugGraphic,this.defaults={debugShowBody:x(e,"debugShowBody",!0),debugShowStaticBody:x(e,"debugShowStaticBody",!0),debugShowVelocity:x(e,"debugShowVelocity",!0),bodyDebugColor:x(e,"debugBodyColor",16711935),staticBodyDebugColor:x(e,"debugStaticBodyColor",255),velocityDebugColor:x(e,"debugVelocityColor",65280)},this.maxEntries=x(e,"maxEntries",16),this.useTree=x(e,"useTree",!0),this.tree=new S(this.maxEntries),this.staticTree=new S(this.maxEntries),this.treeMinMax={minX:0,minY:0,maxX:0,maxY:0},this._tempMatrix=new O,this._tempMatrix2=new O,this.tileFilterOptions={isColliding:!0,isNotEmpty:!0,hasInterestingFace:!0},this.drawDebug&&this.createDebugGraphic()},enable:function(t,e){void 0===e&&(e=h.DYNAMIC_BODY),Array.isArray(t)||(t=[t]);for(var i=0;i=r;for(this.fixedStep||(n=.001*e,a=!0,this._elapsed=0),i=0;i=r;)this._elapsed-=r,this.step(n)}},step:function(t){var e,i,s=this.bodies.entries,n=s.length;for(e=0;e0){var l=this.tree,u=this.staticTree;for(s=(i=a.entries).length,t=0;t-1&&t.velocity.length()>d&&(t.velocity.normalize().scale(d),c=d),t.speed=c},separate:function(t,e,i,s,n){var r,o,a=!1,h=!0;if(!t.enable||!e.enable||t.checkCollision.none||e.checkCollision.none||!this.intersects(t,e))return a;if(i&&!1===i.call(s,t.gameObject,e.gameObject))return a;if(t.isCircle||e.isCircle){var l=this.separateCircle(t,e,n);l.result?(a=!0,h=!1):(r=l.x,o=l.y,h=!0)}if(h){var u=!1,c=!1,p=this.OVERLAP_BIAS;n?(u=C(t,e,n,p,r),c=_(t,e,n,p,o)):this.forceX||Math.abs(this.gravity.y+t.gravity.y)S&&(f=l(y,x,S,E)-w):x>A&&(yS&&(f=l(y,x,S,A)-w)),f*=-1}else f=t.halfWidth+e.halfWidth-u(o,a);t.overlapR=f,e.overlapR=f;var C=s(o,a),_=(f+T.EPSILON)*Math.cos(C),M=(f+T.EPSILON)*Math.sin(C);console.log("overlap",f,"xy",_,M);var R={overlap:f,result:!1,x:_,y:M};if(i&&(!v||v&&0!==f))return R.result=!0,R;if(!v&&0===f||h&&c||t.customSeparateX||e.customSeparateX)return R.x=void 0,R.y=void 0,R;var P=!t.pushable&&!e.pushable;if(v){var O=o.x-a.x,L=o.y-a.y,F=Math.sqrt(Math.pow(O,2)+Math.pow(L,2)),D=(a.x-o.x)/F||0,k=(a.y-o.y)/F||0,I=2*(d.x*D+d.y*k-p.x*D-p.y*k)/(t.mass+e.mass);(h||c)&&(I*=2),console.log("circ vel",d,p,"p",I,"nxy",D,k),h||(d.x=d.x-I/t.mass*D,d.y=d.y-I/t.mass*k,d.multiply(t.bounce),console.log("body1",d,"y",t.y)),c||(p.x=p.x+I/e.mass*D,p.y=p.y+I/e.mass*k,p.multiply(e.bounce),console.log("body2",p,"y",e.y)),h||c||(_*=.5,M*=.5),h||(t.x-=_,t.y-=M,t.updateCenter(),console.log("body1 sep",t.y)),c||(e.x+=_,e.y+=M,e.updateCenter()),R.result=!0}else!h||t.pushable||P?(t.x-=_,t.y-=M,t.updateCenter()):(!c||e.pushable||P)&&(e.x+=_,e.y+=M,e.updateCenter()),R.x=void 0,R.y=void 0;return R},intersects:function(t,e){return t!==e&&(t.isCircle||e.isCircle?t.isCircle?e.isCircle?u(t.center,e.center)<=t.halfWidth+e.halfWidth:this.circleBodyIntersects(t,e):this.circleBodyIntersects(e,t):!(t.right<=e.left||t.bottom<=e.top||t.left>=e.right||t.top>=e.bottom))},circleBodyIntersects:function(t,e){var i=r(t.center.x,e.left,e.right),s=r(t.center.y,e.top,e.bottom);return(t.center.x-i)*(t.center.x-i)+(t.center.y-s)*(t.center.y-s)<=t.halfWidth*t.halfWidth},overlap:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.collideObjects(t,e,i,s,n,!0)},collide:function(t,e,i,s,n){return void 0===i&&(i=null),void 0===s&&(s=null),void 0===n&&(n=i),this.collideObjects(t,e,i,s,n,!1)},collideObjects:function(t,e,i,s,n,r){var o,a;!t.isParent||void 0!==t.physicsType&&void 0!==e&&t!==e||(t=t.children.entries),e&&e.isParent&&void 0===e.physicsType&&(e=e.children.entries);var h=Array.isArray(t),l=Array.isArray(e);if(this._total=0,h||l)if(!h&&l)for(o=0;o0},collideHandler:function(t,e,i,s,n,r){if(void 0===e&&t.isParent)return this.collideGroupVsGroup(t,t,i,s,n,r);if(!t||!e)return!1;if(t.body||t.isBody){if(e.body||e.isBody)return this.collideSpriteVsSprite(t,e,i,s,n,r);if(e.isParent)return this.collideSpriteVsGroup(t,e,i,s,n,r);if(e.isTilemap)return this.collideSpriteVsTilemapLayer(t,e,i,s,n,r)}else if(t.isParent){if(e.body||e.isBody)return this.collideSpriteVsGroup(e,t,i,s,n,r);if(e.isParent)return this.collideGroupVsGroup(t,e,i,s,n,r);if(e.isTilemap)return this.collideGroupVsTilemapLayer(t,e,i,s,n,r)}else if(t.isTilemap){if(e.body||e.isBody)return this.collideSpriteVsTilemapLayer(e,t,i,s,n,r);if(e.isParent)return this.collideGroupVsTilemapLayer(e,t,i,s,n,r)}},collideSpriteVsSprite:function(t,e,i,s,n,r){var o=t.isBody?t:t.body,a=e.isBody?e:e.body;return!(!o||!a)&&(this.separate(o,a,s,n,r)&&(i&&i.call(n,t,e),this._total++),!0)},collideSpriteVsGroup:function(t,e,i,s,n,r){var o,a,l,u=t.isBody?t:t.body;if(0!==e.length&&u&&u.enable&&!u.checkCollision.none)if(this.useTree||e.physicsType===h.STATIC_BODY){var c=this.treeMinMax;c.minX=u.left,c.minY=u.top,c.maxX=u.right,c.maxY=u.bottom;var d=e.physicsType===h.DYNAMIC_BODY?this.tree.search(c):this.staticTree.search(c);for(a=d.length,o=0;oc.baseTileWidth){var d=(c.tileWidth-c.baseTileWidth)*e.scaleX;a-=d,l+=d}c.tileHeight>c.baseTileHeight&&(u+=(c.tileHeight-c.baseTileHeight)*e.scaleY);var p=r?null:this.tileFilterOptions,f=y(a,h,l,u,p,e.scene.cameras.main,e.layer);return 0!==f.length&&this.collideSpriteVsTilesHandler(t,f,i,s,n,r,!0)},collideSpriteVsTilesHandler:function(t,e,i,s,n,r,o){for(var a,h,l=t.isBody?t:t.body,u={left:0,right:0,top:0,bottom:0},c=!1,p=0;p{t.exports={setAcceleration:function(t,e){return this.body.acceleration.set(t,e),this},setAccelerationX:function(t){return this.body.acceleration.x=t,this},setAccelerationY:function(t){return this.body.acceleration.y=t,this}}},29257:t=>{t.exports={setAngularVelocity:function(t){return this.body.angularVelocity=t,this},setAngularAcceleration:function(t){return this.body.angularAcceleration=t,this},setAngularDrag:function(t){return this.body.angularDrag=t,this}}},62122:t=>{t.exports={setBounce:function(t,e){return this.body.bounce.set(t,e),this},setBounceX:function(t){return this.body.bounce.x=t,this},setBounceY:function(t){return this.body.bounce.y=t,this},setCollideWorldBounds:function(t,e,i,s){return this.body.setCollideWorldBounds(t,e,i,s),this}}},99803:t=>{t.exports={setDebug:function(t,e,i){return this.debugShowBody=t,this.debugShowVelocity=e,this.debugBodyColor=i,this},setDebugBodyColor:function(t){return this.body.debugBodyColor=t,this},debugShowBody:{get:function(){return this.body.debugShowBody},set:function(t){this.body.debugShowBody=t}},debugShowVelocity:{get:function(){return this.body.debugShowVelocity},set:function(t){this.body.debugShowVelocity=t}},debugBodyColor:{get:function(){return this.body.debugBodyColor},set:function(t){this.body.debugBodyColor=t}}}},87145:t=>{t.exports={setDrag:function(t,e){return this.body.drag.set(t,e),this},setDragX:function(t){return this.body.drag.x=t,this},setDragY:function(t){return this.body.drag.y=t,this},setDamping:function(t){return this.body.useDamping=t,this}}},96174:t=>{var e={enableBody:function(t,e,i,s,n){return t&&this.body.reset(e,i),s&&(this.body.gameObject.active=!0),n&&(this.body.gameObject.visible=!0),this.body.enable=!0,this},disableBody:function(t,e){return void 0===t&&(t=!1),void 0===e&&(e=!1),this.body.stop(),this.body.enable=!1,t&&(this.body.gameObject.active=!1),e&&(this.body.gameObject.visible=!1),this},refreshBody:function(){return this.body.updateFromGameObject(),this}};t.exports=e},51702:t=>{t.exports={setFriction:function(t,e){return this.body.friction.set(t,e),this},setFrictionX:function(t){return this.body.friction.x=t,this},setFrictionY:function(t){return this.body.friction.y=t,this}}},25578:t=>{t.exports={setGravity:function(t,e){return this.body.gravity.set(t,e),this},setGravityX:function(t){return this.body.gravity.x=t,this},setGravityY:function(t){return this.body.gravity.y=t,this}}},72029:t=>{var e={setImmovable:function(t){return void 0===t&&(t=!0),this.body.immovable=t,this}};t.exports=e},34566:t=>{t.exports={setMass:function(t){return this.body.mass=t,this}}},2732:(t,e,i)=>{var s=i(15147),n=i(26673),r=i(22184),o=i(26535);t.exports=function(t,e,i,a,h,l){var u=s(t,e-a,i-a,2*a,2*a,h,l);if(0===u.length)return u;for(var c=new n(e,i,a),d=new n,p=[],f=0;f{t.exports=function(t,e,i,s,n,r,o){void 0===r&&(r=!0),void 0===o&&(o=!1);var a=[],h=[],l=t.treeMinMax;if(l.minX=e,l.minY=i,l.maxX=e+s,l.maxY=i+n,o&&(h=t.staticTree.search(l)),r&&t.useTree)a=t.tree.search(l);else if(r){var u=t.bodies,c={position:{x:e,y:i},left:e,top:i,right:e+s,bottom:i+n,isCircle:!1},d=t.intersects;u.iterate((function(t){d(t,c)&&a.push(t)}))}return h.concat(a)}},57527:t=>{var e={setPushable:function(t){return void 0===t&&(t=!0),this.body.pushable=t,this}};t.exports=e},77687:t=>{t.exports={setOffset:function(t,e){return this.body.setOffset(t,e),this},setSize:function(t,e,i){return this.body.setSize(t,e,i),this},setBodySize:function(t,e,i){return this.body.setSize(t,e,i),this},setCircle:function(t,e,i){return this.body.setCircle(t,e,i),this}}},66536:t=>{t.exports={setVelocity:function(t,e){return this.body.setVelocity(t,e),this},setVelocityX:function(t){return this.body.setVelocityX(t),this},setVelocityY:function(t){return this.body.setVelocityY(t),this},setMaxVelocity:function(t,e){return this.body.maxVelocity.set(t,e),this}}},7864:(t,e,i)=>{t.exports={Acceleration:i(5321),Angular:i(29257),Bounce:i(62122),Debug:i(99803),Drag:i(87145),Enable:i(96174),Friction:i(51702),Gravity:i(25578),Immovable:i(72029),Mass:i(34566),OverlapCirc:i(2732),OverlapRect:i(15147),Pushable:i(57527),Size:i(77687),Velocity:i(66536)}},47401:t=>{t.exports={DYNAMIC_BODY:0,STATIC_BODY:1,GROUP:2,TILEMAPLAYER:3,FACING_NONE:10,FACING_UP:11,FACING_DOWN:12,FACING_LEFT:13,FACING_RIGHT:14}},22346:t=>{t.exports="collide"},95092:t=>{t.exports="overlap"},15775:t=>{t.exports="pause"},74142:t=>{t.exports="resume"},22825:t=>{t.exports="tilecollide"},10851:t=>{t.exports="tileoverlap"},7543:t=>{t.exports="worldbounds"},1487:t=>{t.exports="worldstep"},27037:(t,e,i)=>{t.exports={COLLIDE:i(22346),OVERLAP:i(95092),PAUSE:i(15775),RESUME:i(74142),TILE_COLLIDE:i(22825),TILE_OVERLAP:i(10851),WORLD_BOUNDS:i(7543),WORLD_STEP:i(1487)}},39977:(t,e,i)=>{var s=i(47401),n=i(98611),r={ArcadePhysics:i(66150),Body:i(97602),Collider:i(3909),Components:i(7864),Events:i(27037),Factory:i(99523),GetOverlapX:i(75671),GetOverlapY:i(66185),SeparateX:i(61777),SeparateY:i(25299),Group:i(10481),Image:i(62832),Sprite:i(25084),StaticBody:i(66634),StaticGroup:i(46346),Tilemap:i(8413),World:i(85233)};r=n(!1,r,s),t.exports=r},25163:t=>{t.exports=function(t,e){return t.collisionCallback?!t.collisionCallback.call(t.collisionCallbackContext,e,t):!t.layer.callbacks[t.index]||!t.layer.callbacks[t.index].callback.call(t.layer.callbacks[t.index].callbackContext,e,t)}},98209:t=>{t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.left=!0):e>0&&(t.blocked.none=!1,t.blocked.right=!0),t.position.x-=e,t.updateCenter(),0===t.bounce.x?t.velocity.x=0:t.velocity.x=-t.velocity.x*t.bounce.x}},72792:t=>{t.exports=function(t,e){e<0?(t.blocked.none=!1,t.blocked.up=!0):e>0&&(t.blocked.none=!1,t.blocked.down=!0),t.position.y-=e,t.updateCenter(),0===t.bounce.y?t.velocity.y=0:t.velocity.y=-t.velocity.y*t.bounce.y}},27354:(t,e,i)=>{var s=i(14405),n=i(52926),r=i(28808);t.exports=function(t,e,i,o,a,h,l){var u=o.left,c=o.top,d=o.right,p=o.bottom,f=i.faceLeft||i.faceRight,v=i.faceTop||i.faceBottom;if(l||(f=!0,v=!0),!f&&!v)return!1;var g=0,m=0,y=0,x=1;if(e.deltaAbsX()>e.deltaAbsY()?y=-1:e.deltaAbsX(){var s=i(98209);t.exports=function(t,e,i,n,r,o){var a=0,h=e.faceLeft,l=e.faceRight,u=e.collideLeft,c=e.collideRight;return o||(h=!0,l=!0,u=!0,c=!0),t.deltaX()<0&&c&&t.checkCollision.left?l&&t.x0&&u&&t.checkCollision.right&&h&&t.right>i&&(a=t.right-i)>r&&(a=0),0!==a&&(t.customSeparateX?t.overlapX=a:s(t,a)),a}},52926:(t,e,i)=>{var s=i(72792);t.exports=function(t,e,i,n,r,o){var a=0,h=e.faceTop,l=e.faceBottom,u=e.collideUp,c=e.collideDown;return o||(h=!0,l=!0,u=!0,c=!0),t.deltaY()<0&&c&&t.checkCollision.up?l&&t.y0&&u&&t.checkCollision.down&&h&&t.bottom>i&&(a=t.bottom-i)>r&&(a=0),0!==a&&(t.customSeparateY?t.overlapY=a:s(t,a)),a}},28808:t=>{t.exports=function(t,e){return!(e.right<=t.left||e.bottom<=t.top||e.position.x>=t.right||e.position.y>=t.bottom)}},8413:(t,e,i)=>{var s={ProcessTileCallbacks:i(25163),ProcessTileSeparationX:i(98209),ProcessTileSeparationY:i(72792),SeparateTile:i(27354),TileCheckX:i(14405),TileCheckY:i(52926),TileIntersectsBody:i(28808)};t.exports=s},53954:(t,e,i)=>{t.exports={Arcade:i(39977),Matter:i(45949)}},63568:(t,e,i)=>{var s=i(56694),n=i(93736),r=new s({initialize:function(){this.boundsCenter=new n,this.centerDiff=new n},parseBody:function(t){if(!(t=t.hasOwnProperty("body")?t.body:t).hasOwnProperty("bounds")||!t.hasOwnProperty("centerOfMass"))return!1;var e=this.boundsCenter,i=this.centerDiff,s=t.bounds.max.x-t.bounds.min.x,n=t.bounds.max.y-t.bounds.min.y,r=s*t.centerOfMass.x,o=n*t.centerOfMass.y;return e.set(s/2,n/2),i.set(r-e.x,o-e.y),!0},getTopLeft:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e+s.x+r.x,i+s.y+r.y)}return!1},getTopCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e+r.x,i+s.y+r.y)}return!1},getTopRight:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e-(s.x-r.x),i+s.y+r.y)}return!1},getLeftCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e+s.x+r.x,i+r.y)}return!1},getCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.centerDiff;return new n(e+s.x,i+s.y)}return!1},getRightCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e-(s.x-r.x),i+r.y)}return!1},getBottomLeft:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e+s.x+r.x,i-(s.y-r.y))}return!1},getBottomCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e+r.x,i-(s.y-r.y))}return!1},getBottomRight:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var s=this.boundsCenter,r=this.centerDiff;return new n(e-(s.x-r.x),i-(s.y-r.y))}return!1}});t.exports=r},18171:(t,e,i)=>{var s=i(16929);s.Body=i(84125),s.Composite=i(11299),s.World=i(72005),s.Collision=i(63454),s.Detector=i(13657),s.Pairs=i(91327),s.Pair=i(70584),s.Query=i(13390),s.Resolver=i(44272),s.Constraint=i(52838),s.Common=i(68758),s.Engine=i(45775),s.Events=i(39073),s.Sleeping=i(22806),s.Plugin=i(84474),s.Bodies=i(68516),s.Composites=i(56643),s.Axes=i(50658),s.Bounds=i(84091),s.Svg=i(92765),s.Vector=i(10438),s.Vertices=i(39745),s.World.add=s.Composite.add,s.World.remove=s.Composite.remove,s.World.addComposite=s.Composite.addComposite,s.World.addBody=s.Composite.addBody,s.World.addConstraint=s.Composite.addConstraint,s.World.clear=s.Composite.clear,t.exports=s},72653:(t,e,i)=>{var s=i(68516),n=i(56694),r=i(56643),o=i(52838),a=i(92765),h=i(3860),l=i(7030),u=i(73658),c=i(84720),d=i(10998),p=i(72829),f=i(88596),v=i(39745),g=new n({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},rectangle:function(t,e,i,n,r){var o=s.rectangle(t,e,i,n,r);return this.world.add(o),o},trapezoid:function(t,e,i,n,r,o){var a=s.trapezoid(t,e,i,n,r,o);return this.world.add(a),a},circle:function(t,e,i,n,r){var o=s.circle(t,e,i,n,r);return this.world.add(o),o},polygon:function(t,e,i,n,r){var o=s.polygon(t,e,i,n,r);return this.world.add(o),o},fromVertices:function(t,e,i,n,r,o,a){"string"==typeof i&&(i=v.fromPath(i));var h=s.fromVertices(t,e,i,n,r,o,a);return this.world.add(h),h},fromPhysicsEditor:function(t,e,i,s,n){void 0===n&&(n=!0);var r=d.parseBody(t,e,i,s);return n&&!this.world.has(r)&&this.world.add(r),r},fromSVG:function(t,e,i,n,r,o){void 0===n&&(n=1),void 0===r&&(r={}),void 0===o&&(o=!0);for(var h=i.getElementsByTagName("path"),l=[],u=0;u{var s=i(74527),n=i(72632),r=i(93736);t.exports=function(t,e,i,o){void 0===i&&(i={}),void 0===o&&(o=!0);var a=e.x,h=e.y;if(e.body={temp:!0,position:{x:a,y:h}},[s.Bounce,s.Collision,s.Force,s.Friction,s.Gravity,s.Mass,s.Sensor,s.SetBody,s.Sleep,s.Static,s.Transform,s.Velocity].forEach((function(t){for(var i in t)(s=t[i]).get&&"function"==typeof s.get||s.set&&"function"==typeof s.set?Object.defineProperty(e,i,{get:t[i].get,set:t[i].set}):Object.defineProperty(e,i,{value:t[i]});var s})),e.world=t,e._tempVec2=new r(a,h),i.hasOwnProperty("type")&&"body"===i.type)e.setExistingBody(i,o);else{var l=n(i,"shape",null);l||(l="rectangle"),i.addToWorld=o,e.setBody(l,i)}return e}},7030:(t,e,i)=>{var s=i(56694),n=i(74527),r=i(89980),o=i(72632),a=i(1539),h=i(58210),l=i(93736),u=new s({Extends:a,Mixins:[n.Bounce,n.Collision,n.Force,n.Friction,n.Gravity,n.Mass,n.Sensor,n.SetBody,n.Sleep,n.Static,n.Transform,n.Velocity,h],initialize:function(t,e,i,s,n,a){r.call(this,t.scene,"Image"),this._crop=this.resetCropObject(),this.setTexture(s,n),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new l(e,i);var h=o(a,"shape",null);h?this.setBody(h,a):this.setRectangle(this.width,this.height,a),this.setPosition(e,i),this.initPipeline()}});t.exports=u},50583:(t,e,i)=>{var s=i(84093),n=i(50658),r=i(68516),o=i(84125),a=i(63568),h=i(84091),l=i(56694),u=i(63454),c=i(68758),d=i(11299),p=i(56643),f=i(52838),v=i(13657),g=i(53996),m=i(72653),y=i(72632),x=i(10850),T=i(1675),w=i(80391),b=i(16929),E=i(44097),S=i(30657),A=i(70584),C=i(91327),_=i(84474),M=i(91963),R=i(13390),P=i(44272),O=i(7599),L=i(92765),F=i(10438),D=i(39745),k=i(31468);c.setDecomp(i(81084));var I=new l({initialize:function(t){this.scene=t,this.systems=t.sys,this.config=this.getConfig(),this.world,this.add,this.bodyBounds,this.body=o,this.composite=d,this.collision=u,this.detector=v,this.pair=A,this.pairs=C,this.query=R,this.resolver=P,this.constraint=f,this.bodies=r,this.composites=p,this.axes=n,this.bounds=h,this.svg=L,this.vector=F,this.vertices=D,this.verts=D,this._tempVec2=F.create(),x(this.config,"plugins.collisionevents",!0)&&this.enableCollisionEventsPlugin(),x(this.config,"plugins.attractors",!1)&&this.enableAttractorPlugin(),x(this.config,"plugins.wrap",!1)&&this.enableWrapPlugin(),P._restingThresh=x(this.config,"restingThresh",4),P._restingThreshTangent=x(this.config,"restingThreshTangent",6),P._positionDampen=x(this.config,"positionDampen",.9),P._positionWarming=x(this.config,"positionWarming",.8),P._frictionNormalMultiplier=x(this.config,"frictionNormalMultiplier",5),t.sys.events.once(O.BOOT,this.boot,this),t.sys.events.on(O.START,this.start,this)},boot:function(){this.world=new k(this.scene,this.config),this.add=new m(this.world),this.bodyBounds=new a,this.systems.events.once(O.DESTROY,this.destroy,this)},start:function(){this.world||(this.world=new k(this.scene,this.config),this.add=new m(this.world));var t=this.systems.events;t.on(O.UPDATE,this.world.update,this.world),t.on(O.POST_UPDATE,this.world.postUpdate,this.world),t.once(O.SHUTDOWN,this.shutdown,this)},getConfig:function(){var t=this.systems.game.config.physics,e=this.systems.settings.physics;return S(y(e,"matter",{}),y(t,"matter",{}))},enableAttractorPlugin:function(){return _.register(T),_.use(b,T),this},enableWrapPlugin:function(){return _.register(E),_.use(b,E),this},enableCollisionEventsPlugin:function(){return _.register(w),_.use(b,w),this},pause:function(){return this.world.pause()},resume:function(){return this.world.resume()},set60Hz:function(){return this.world.getDelta=this.world.update60Hz,this.world.autoUpdate=!0,this},set30Hz:function(){return this.world.getDelta=this.world.update30Hz,this.world.autoUpdate=!0,this},step:function(t,e){this.world.step(t,e)},containsPoint:function(t,e,i){t=this.getMatterBodies(t);var s=F.create(e,i);return R.point(t,s).length>0},intersectPoint:function(t,e,i){i=this.getMatterBodies(i);var s=F.create(t,e),n=[];return R.point(i,s).forEach((function(t){-1===n.indexOf(t)&&n.push(t)})),n},intersectRect:function(t,e,i,s,n,r){void 0===n&&(n=!1),r=this.getMatterBodies(r);var o={min:{x:t,y:e},max:{x:t+i,y:e+s}},a=[];return R.region(r,o,n).forEach((function(t){-1===a.indexOf(t)&&a.push(t)})),a},intersectRay:function(t,e,i,s,n,r){void 0===n&&(n=1),r=this.getMatterBodies(r);for(var o=[],a=R.ray(r,F.create(t,e),F.create(i,s),n),h=0;h{var s=i(16569),n=i(56694),r=i(74527),o=i(89980),a=i(72632),h=i(58210),l=i(13747),u=i(93736),c=new n({Extends:l,Mixins:[r.Bounce,r.Collision,r.Force,r.Friction,r.Gravity,r.Mass,r.Sensor,r.SetBody,r.Sleep,r.Static,r.Transform,r.Velocity,h],initialize:function(t,e,i,n,r,h){o.call(this,t.scene,"Sprite"),this._crop=this.resetCropObject(),this.anims=new s(this),this.setTexture(n,r),this.setSizeToFrame(),this.setOrigin(),this.world=t,this._tempVec2=new u(e,i);var l=a(h,"shape",null);l?this.setBody(l,h):this.setRectangle(this.width,this.height,h),this.setPosition(e,i),this.initPipeline()}});t.exports=c},84720:(t,e,i)=>{var s=i(68516),n=i(84125),r=i(56694),o=i(74527),a=i(6659),h=i(72632),l=i(19256),u=i(39745),c=new r({Extends:a,Mixins:[o.Bounce,o.Collision,o.Friction,o.Gravity,o.Mass,o.Sensor,o.Sleep,o.Static],initialize:function(t,e,i){a.call(this),this.tile=e,this.world=t,e.physics.matterBody&&e.physics.matterBody.destroy(),e.physics.matterBody=this;var s=h(i,"body",null),n=h(i,"addToWorld",!0);if(s)this.setBody(s,n);else{var r=e.getCollisionGroup();h(r,"objects",[]).length>0?this.setFromTileCollision(i):this.setFromTileRectangle(i)}},setFromTileRectangle:function(t){void 0===t&&(t={}),l(t,"isStatic")||(t.isStatic=!0),l(t,"addToWorld")||(t.addToWorld=!0);var e=this.tile.getBounds(),i=e.x+e.width/2,n=e.y+e.height/2,r=s.rectangle(i,n,e.width,e.height,t);return this.setBody(r,t.addToWorld),this},setFromTileCollision:function(t){void 0===t&&(t={}),l(t,"isStatic")||(t.isStatic=!0),l(t,"addToWorld")||(t.addToWorld=!0);for(var e=this.tile.tilemapLayer.scaleX,i=this.tile.tilemapLayer.scaleY,r=this.tile.getLeft(),o=this.tile.getTop(),a=this.tile.getCollisionGroup(),c=h(a,"objects",[]),d=[],p=0;p1&&(t.parts=d,this.setBody(n.create(t),t.addToWorld)),this},setBody:function(t,e){return void 0===e&&(e=!0),this.body&&this.removeBody(),this.body=t,this.body.gameObject=this,e&&this.world.add(this.body),this},removeBody:function(){return this.body&&(this.world.remove(this.body),this.body.gameObject=void 0,this.body=void 0),this},destroy:function(){this.removeBody(),this.tile.physics.matterBody=void 0,this.removeAllListeners()}});t.exports=c},10998:(t,e,i)=>{var s=i(68516),n=i(84125),r=i(68758),o=i(72632),a=i(39745),h={parseBody:function(t,e,i,s){void 0===s&&(s={});for(var a=o(i,"fixtures",[]),h=[],l=0;l{var s=i(68516),n=i(84125),r={parseBody:function(t,e,i,r){var o;void 0===r&&(r={});var a=i.vertices;if(1===a.length)r.vertices=a[0],o=n.create(r),s.flagCoincidentParts(o.parts);else{for(var h=[],l=0;l{var s=i(84091),n=i(56694),r=i(11299),o=i(52838),a=i(13657),h=i(35416),l=i(33963),u=i(30657),c=i(22806),d=i(93736),p=i(39745),f=new n({initialize:function(t,e,i){void 0===i&&(i={});this.scene=t,this.world=e,this.camera=null,this.pointer=null,this.active=!0,this.position=new d,this.body=null,this.part=null,this.constraint=o.create(u(i,{label:"Pointer Constraint",pointA:{x:0,y:0},pointB:{x:0,y:0},length:.01,stiffness:.1,angularStiffness:1,collisionFilter:{category:1,mask:4294967295,group:0}})),this.world.on(h.BEFORE_UPDATE,this.update,this),t.sys.input.on(l.POINTER_DOWN,this.onDown,this),t.sys.input.on(l.POINTER_UP,this.onUp,this)},onDown:function(t){this.pointer||(this.pointer=t,this.camera=t.camera)},onUp:function(t){t===this.pointer&&(this.pointer=null)},getBody:function(t){var e=this.position,i=this.constraint;this.camera.getWorldPoint(t.x,t.y,e);for(var n=r.allBodies(this.world.localWorld),o=0;o1?1:0;n{var s=i(68516),n=i(84125),r=i(56694),o=i(68758),a=i(11299),h=i(45775),l=i(6659),u=i(35416),c=i(72632),d=i(10850),p=i(84125),f=i(39073),v=i(84720),g=i(72005),m=i(10438),y=new r({Extends:l,initialize:function(t,e){l.call(this),this.scene=t,this.engine=h.create(e),this.localWorld=this.engine.world;var i=d(e,"gravity",null);i?this.setGravity(i.x,i.y,i.scale):!1===i&&this.setGravity(0,0,0),this.walls={left:null,right:null,top:null,bottom:null},this.enabled=d(e,"enabled",!0),this.correction=d(e,"correction",1),this.getDelta=d(e,"getDelta",this.update60Hz);var s=c(e,"runner",{}),n=c(s,"fps",!1),r=c(s,"fps",60),o=c(s,"delta",1e3/r),a=c(s,"deltaMin",1e3/r),u=c(s,"deltaMax",1e3/(.5*r));n||(r=1e3/o),this.runner={fps:r,correction:c(s,"correction",1),deltaSampleSize:c(s,"deltaSampleSize",60),counterTimestamp:0,frameCounter:0,deltaHistory:[],timePrev:null,timeScalePrev:1,frameRequestId:null,isFixed:c(s,"isFixed",!1),delta:o,deltaMin:a,deltaMax:u},this.autoUpdate=d(e,"autoUpdate",!0);var p=d(e,"debug",!1);if(this.drawDebug="object"==typeof p||p,this.debugGraphic,this.debugConfig={showAxes:c(p,"showAxes",!1),showAngleIndicator:c(p,"showAngleIndicator",!1),angleColor:c(p,"angleColor",15208787),showBroadphase:c(p,"showBroadphase",!1),broadphaseColor:c(p,"broadphaseColor",16757760),showBounds:c(p,"showBounds",!1),boundsColor:c(p,"boundsColor",16777215),showVelocity:c(p,"showVelocity",!1),velocityColor:c(p,"velocityColor",44783),showCollisions:c(p,"showCollisions",!1),collisionColor:c(p,"collisionColor",16094476),showSeparations:c(p,"showSeparations",!1),separationColor:c(p,"separationColor",16753920),showBody:c(p,"showBody",!0),showStaticBody:c(p,"showStaticBody",!0),showInternalEdges:c(p,"showInternalEdges",!1),renderFill:c(p,"renderFill",!1),renderLine:c(p,"renderLine",!0),fillColor:c(p,"fillColor",1075465),fillOpacity:c(p,"fillOpacity",1),lineColor:c(p,"lineColor",2678297),lineOpacity:c(p,"lineOpacity",1),lineThickness:c(p,"lineThickness",1),staticFillColor:c(p,"staticFillColor",857979),staticLineColor:c(p,"staticLineColor",1255396),showSleeping:c(p,"showSleeping",!1),staticBodySleepOpacity:c(p,"staticBodySleepOpacity",.7),sleepFillColor:c(p,"sleepFillColor",4605510),sleepLineColor:c(p,"sleepLineColor",10066585),showSensors:c(p,"showSensors",!0),sensorFillColor:c(p,"sensorFillColor",857979),sensorLineColor:c(p,"sensorLineColor",1255396),showPositions:c(p,"showPositions",!0),positionSize:c(p,"positionSize",4),positionColor:c(p,"positionColor",14697178),showJoint:c(p,"showJoint",!0),jointColor:c(p,"jointColor",14737474),jointLineOpacity:c(p,"jointLineOpacity",1),jointLineThickness:c(p,"jointLineThickness",2),pinSize:c(p,"pinSize",4),pinColor:c(p,"pinColor",4382944),springColor:c(p,"springColor",14697184),anchorColor:c(p,"anchorColor",15724527),anchorSize:c(p,"anchorSize",4),showConvexHulls:c(p,"showConvexHulls",!1),hullColor:c(p,"hullColor",14091216)},this.drawDebug&&this.createDebugGraphic(),this.setEventsProxy(),c(e,"setBounds",!1)){var f=e.setBounds;if("boolean"==typeof f)this.setBounds();else{var v=c(f,"x",0),g=c(f,"y",0),m=c(f,"width",t.sys.scale.width),y=c(f,"height",t.sys.scale.height),x=c(f,"thickness",64),T=c(f,"left",!0),w=c(f,"right",!0),b=c(f,"top",!0),E=c(f,"bottom",!0);this.setBounds(v,g,m,y,x,T,w,b,E)}}},setCompositeRenderStyle:function(t){var e,i,s,n=t.bodies,r=t.constraints,o=t.composites;for(e=0;e0&&(i=n[0].bodyA,s=n[0].bodyB),t.emit(u.COLLISION_START,e,i,s)})),f.on(e,"collisionActive",(function(e){var i,s,n=e.pairs;n.length>0&&(i=n[0].bodyA,s=n[0].bodyB),t.emit(u.COLLISION_ACTIVE,e,i,s)})),f.on(e,"collisionEnd",(function(e){var i,s,n=e.pairs;n.length>0&&(i=n[0].bodyA,s=n[0].bodyB),t.emit(u.COLLISION_END,e,i,s)}))},setBounds:function(t,e,i,s,n,r,o,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===s&&(s=this.scene.sys.scale.height),void 0===n&&(n=64),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===a&&(a=!0),void 0===h&&(h=!0),this.updateWall(r,"left",t-n,e-n,n,s+2*n),this.updateWall(o,"right",t+i,e-n,n,s+2*n),this.updateWall(a,"top",t,e-n,i,n),this.updateWall(h,"bottom",t,e+s,i,n),this},updateWall:function(t,e,i,s,n,r){var o=this.walls[e];t?(o&&g.remove(this.localWorld,o),i+=n/2,s+=r/2,this.walls[e]=this.create(i,s,n,r,{isStatic:!0,friction:0,frictionStatic:0})):(o&&g.remove(this.localWorld,o),this.walls[e]=null)},createDebugGraphic:function(){var t=this.scene.sys.add.graphics({x:0,y:0});return t.setDepth(Number.MAX_VALUE),this.debugGraphic=t,this.drawDebug=!0,t},disableGravity:function(){return this.localWorld.gravity.x=0,this.localWorld.gravity.y=0,this.localWorld.gravity.scale=0,this},setGravity:function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=1),this.localWorld.gravity.x=t,this.localWorld.gravity.y=e,void 0!==i&&(this.localWorld.gravity.scale=i),this},create:function(t,e,i,n,r){var o=s.rectangle(t,e,i,n,r);return g.add(this.localWorld,o),o},add:function(t){return g.add(this.localWorld,t),this},remove:function(t,e){Array.isArray(t)||(t=[t]);for(var i=0;is.deltaMax?s.deltaMax:e)/s.delta,s.delta=e),0!==s.timeScalePrev&&(r*=n.timeScale/s.timeScalePrev),0===n.timeScale&&(r=0),s.timeScalePrev=n.timeScale,s.correction=r,s.frameCounter+=1,t-s.counterTimestamp>=1e3&&(s.fps=s.frameCounter*((t-s.counterTimestamp)/1e3),s.counterTimestamp=t,s.frameCounter=0),h.update(i,e,r)}},step:function(t,e){h.update(this.engine,t,e)},update60Hz:function(){return 1e3/60},update30Hz:function(){return 1e3/30},has:function(t){var e=t.hasOwnProperty("body")?t.body:t;return null!==a.get(this.localWorld,e.id,e.type)},getAllBodies:function(){return a.allBodies(this.localWorld)},getAllConstraints:function(){return a.allConstraints(this.localWorld)},getAllComposites:function(){return a.allComposites(this.localWorld)},postUpdate:function(){if(this.drawDebug){var t=this.debugConfig,e=this.engine,i=this.debugGraphic,s=a.allBodies(this.localWorld);this.debugGraphic.clear(),t.showBroadphase&&e.broadphase.controller&&this.renderGrid(e.broadphase,i,t.broadphaseColor,.5),t.showBounds&&this.renderBodyBounds(s,i,t.boundsColor,.5),(t.showBody||t.showStaticBody)&&this.renderBodies(s),t.showJoint&&this.renderJoints(),(t.showAxes||t.showAngleIndicator)&&this.renderBodyAxes(s,i,t.showAxes,t.angleColor,.5),t.showVelocity&&this.renderBodyVelocity(s,i,t.velocityColor,1,2),t.showSeparations&&this.renderSeparations(e.pairs.list,i,t.separationColor),t.showCollisions&&this.renderCollisions(e.pairs.list,i,t.collisionColor)}},renderGrid:function(t,e,i,s){e.lineStyle(1,i,s);for(var n=o.keys(t.buckets),r=0;r0){var l=h[0].vertex.x,u=h[0].vertex.y;2===h.length&&(l=(h[0].vertex.x+h[1].vertex.x)/2,u=(h[0].vertex.y+h[1].vertex.y)/2),a.bodyB===a.supports[0].body||a.bodyA.isStatic?e.lineBetween(l-8*a.normal.x,u-8*a.normal.y,l,u):e.lineBetween(l+8*a.normal.x,u+8*a.normal.y,l,u)}}return this},renderBodyBounds:function(t,e,i,s){e.lineStyle(1,i,s);for(var n=0;n1?1:0;h1?1:0;a1?1:0;a1&&this.renderConvexHull(v,e,p,y)}}},renderBody:function(t,e,i,s,n,r,o,a){void 0===s&&(s=null),void 0===n&&(n=null),void 0===r&&(r=1),void 0===o&&(o=null),void 0===a&&(a=null);for(var h=this.debugConfig,l=h.sensorFillColor,u=h.sensorLineColor,c=t.parts,d=c.length,p=d>1?1:0;p1){var n=t.vertices;e.lineStyle(s,i),e.beginPath(),e.moveTo(n[0].x,n[0].y);for(var r=1;r0&&(e.fillStyle(a),e.fillCircle(u.x,u.y,h),e.fillCircle(c.x,c.y,h)),this},resetCollisionIDs:function(){return n._nextCollidingGroupId=1,n._nextNonCollidingGroupId=-1,n._nextCategory=1,this},shutdown:function(){f.off(this.engine),this.removeAllListeners(),g.clear(this.localWorld,!1),h.clear(this.engine),this.drawDebug&&this.debugGraphic.destroy()},destroy:function(){this.shutdown()}});t.exports=y},95349:t=>{t.exports={setBounce:function(t){return this.body.restitution=t,this}}},70679:t=>{var e={setCollisionCategory:function(t){return this.body.collisionFilter.category=t,this},setCollisionGroup:function(t){return this.body.collisionFilter.group=t,this},setCollidesWith:function(t){var e=0;if(Array.isArray(t))for(var i=0;i{var s=i(84125),n={applyForce:function(t){return this._tempVec2.set(this.body.position.x,this.body.position.y),s.applyForce(this.body,this._tempVec2,t),this},applyForceFrom:function(t,e){return s.applyForce(this.body,t,e),this},thrust:function(t){var e=this.body.angle;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),s.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustLeft:function(t){var e=this.body.angle-Math.PI/2;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),s.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustRight:function(t){var e=this.body.angle+Math.PI/2;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),s.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this},thrustBack:function(t){var e=this.body.angle-Math.PI;return this._tempVec2.set(t*Math.cos(e),t*Math.sin(e)),s.applyForce(this.body,{x:this.body.position.x,y:this.body.position.y},this._tempVec2),this}};t.exports=n},74015:t=>{var e={setFriction:function(t,e,i){return this.body.friction=t,void 0!==e&&(this.body.frictionAir=e),void 0!==i&&(this.body.frictionStatic=i),this},setFrictionAir:function(t){return this.body.frictionAir=t,this},setFrictionStatic:function(t){return this.body.frictionStatic=t,this}};t.exports=e},11535:t=>{t.exports={setIgnoreGravity:function(t){return this.body.ignoreGravity=t,this}}},74497:(t,e,i)=>{var s=i(84125),n=i(93736),r={setMass:function(t){return s.setMass(this.body,t),this},setDensity:function(t){return s.setDensity(this.body,t),this},centerOfMass:{get:function(){return new n(this.body.centerOfMass.x,this.body.centerOfMass.y)}}};t.exports=r},75529:t=>{t.exports={setSensor:function(t){return this.body.isSensor=t,this},isSensor:function(){return this.body.isSensor}}},64024:(t,e,i)=>{var s=i(68516),n=i(84125),r=i(88456),o=i(72632),a=i(10998),h=i(72829),l=i(39745),u={setRectangle:function(t,e,i){return this.setBody({type:"rectangle",width:t,height:e},i)},setCircle:function(t,e){return this.setBody({type:"circle",radius:t},e)},setPolygon:function(t,e,i){return this.setBody({type:"polygon",sides:e,radius:t},i)},setTrapezoid:function(t,e,i,s){return this.setBody({type:"trapezoid",width:t,height:e,slope:i},s)},setExistingBody:function(t,e){void 0===e&&(e=!0),this.body&&this.world.remove(this.body,!0),this.body=t;for(var i=0;i{var s=i(35416),n=i(22806),r=i(39073),o={setToSleep:function(){return n.set(this.body,!0),this},setAwake:function(){return n.set(this.body,!1),this},setSleepThreshold:function(t){return void 0===t&&(t=60),this.body.sleepThreshold=t,this},setSleepEvents:function(t,e){return this.setSleepStartEvent(t),this.setSleepEndEvent(e),this},setSleepStartEvent:function(t){if(t){var e=this.world;r.on(this.body,"sleepStart",(function(t){e.emit(s.SLEEP_START,t,this)}))}else r.off(this.body,"sleepStart");return this},setSleepEndEvent:function(t){if(t){var e=this.world;r.on(this.body,"sleepEnd",(function(t){e.emit(s.SLEEP_END,t,this)}))}else r.off(this.body,"sleepEnd");return this}};t.exports=o},82884:(t,e,i)=>{var s=i(84125),n={setStatic:function(t){return s.setStatic(this.body,t),this},isStatic:function(){return this.body.isStatic}};t.exports=n},4753:(t,e,i)=>{var s=i(84125),n=i(83392),r=i(35786),o=i(62138),a={x:{get:function(){return this.body.position.x},set:function(t){this._tempVec2.set(t,this.y),s.setPosition(this.body,this._tempVec2)}},y:{get:function(){return this.body.position.y},set:function(t){this._tempVec2.set(this.x,t),s.setPosition(this.body,this._tempVec2)}},scaleX:{get:function(){return this._scaleX},set:function(t){var e=1/this._scaleX,i=1/this._scaleY;this._scaleX=t,0===this._scaleX?this.renderFlags&=-5:this.renderFlags|=4,s.scale(this.body,e,i),s.scale(this.body,t,this._scaleY)}},scaleY:{get:function(){return this._scaleY},set:function(t){var e=1/this._scaleX,i=1/this._scaleY;this._scaleY=t,0===this._scaleY?this.renderFlags&=-5:this.renderFlags|=4,s.scale(this.body,e,i),s.scale(this.body,this._scaleX,t)}},angle:{get:function(){return o(this.body.angle*n.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this.body.angle},set:function(t){this._rotation=r(t),s.setAngle(this.body,this._rotation)}},setPosition:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this._tempVec2.set(t,e),s.setPosition(this.body,this._tempVec2),this},setRotation:function(t){return void 0===t&&(t=0),this._rotation=r(t),s.setAngle(this.body,t),this},setFixedRotation:function(){return s.setInertia(this.body,1/0),this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,s.setAngle(this.body,this.rotation),this},setScale:function(t,e,i){void 0===t&&(t=1),void 0===e&&(e=t);var n=1/this._scaleX,r=1/this._scaleY;return this._scaleX=t,this._scaleY=e,s.scale(this.body,n,r,i),s.scale(this.body,t,e,i),this}};t.exports=a},37268:(t,e,i)=>{var s=i(84125),n={setAngularVelocity:function(t){return s.setAngularVelocity(this.body,t),this},setVelocityX:function(t){return this._tempVec2.set(t,this.body.velocity.y),s.setVelocity(this.body,this._tempVec2),this},setVelocityY:function(t){return this._tempVec2.set(this.body.velocity.x,t),s.setVelocity(this.body,this._tempVec2),this},setVelocity:function(t,e){return this._tempVec2.set(t,e),s.setVelocity(this.body,this._tempVec2),this}};t.exports=n},74527:(t,e,i)=>{t.exports={Bounce:i(95349),Collision:i(70679),Force:i(77178),Friction:i(74015),Gravity:i(11535),Mass:i(74497),Sensor:i(75529),SetBody:i(64024),Sleep:i(25106),Static:i(82884),Transform:i(4753),Velocity:i(37268)}},63201:t=>{t.exports="afteradd"},30474:t=>{t.exports="afterremove"},44822:t=>{t.exports="afterupdate"},88820:t=>{t.exports="beforeadd"},94849:t=>{t.exports="beforeremove"},6391:t=>{t.exports="beforeupdate"},96738:t=>{t.exports="collisionactive"},7916:t=>{t.exports="collisionend"},59529:t=>{t.exports="collisionstart"},10219:t=>{t.exports="dragend"},183:t=>{t.exports="drag"},39143:t=>{t.exports="dragstart"},16483:t=>{t.exports="pause"},35806:t=>{t.exports="resume"},22106:t=>{t.exports="sleepend"},5803:t=>{t.exports="sleepstart"},35416:(t,e,i)=>{t.exports={AFTER_ADD:i(63201),AFTER_REMOVE:i(30474),AFTER_UPDATE:i(44822),BEFORE_ADD:i(88820),BEFORE_REMOVE:i(94849),BEFORE_UPDATE:i(6391),COLLISION_ACTIVE:i(96738),COLLISION_END:i(7916),COLLISION_START:i(59529),DRAG_END:i(10219),DRAG:i(183),DRAG_START:i(39143),PAUSE:i(16483),RESUME:i(35806),SLEEP_END:i(22106),SLEEP_START:i(5803)}},45949:(t,e,i)=>{t.exports={BodyBounds:i(63568),Components:i(74527),Events:i(35416),Factory:i(72653),MatterGameObject:i(3860),Image:i(7030),Matter:i(18171),MatterPhysics:i(50583),PolyDecomp:i(81084),Sprite:i(73658),TileBody:i(84720),PhysicsEditorParser:i(10998),PhysicsJSONParser:i(72829),PointerConstraint:i(88596),World:i(31468)}},84125:(t,e,i)=>{var s={};t.exports=s;var n=i(39745),r=i(10438),o=i(22806),a=i(68758),h=i(84091),l=i(50658);!function(){s._inertiaScale=4,s._nextCollidingGroupId=1,s._nextNonCollidingGroupId=-1,s._nextCategory=1,s.create=function(e){var i={id:a.nextId(),type:"body",label:"Body",parts:[],plugin:{},angle:0,vertices:null,position:{x:0,y:0},force:{x:0,y:0},torque:0,positionImpulse:{x:0,y:0},constraintImpulse:{x:0,y:0,angle:0},totalContacts:0,speed:0,angularSpeed:0,velocity:{x:0,y:0},angularVelocity:0,isSensor:!1,isStatic:!1,isSleeping:!1,motion:0,sleepThreshold:60,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,collisionFilter:{category:1,mask:4294967295,group:0},slop:.05,timeScale:1,events:null,bounds:null,chamfer:null,circleRadius:0,positionPrev:null,anglePrev:0,parent:null,axes:null,area:0,mass:0,inverseMass:0,inertia:0,inverseInertia:0,_original:null,render:{visible:!0,opacity:1,sprite:{xOffset:0,yOffset:0},fillColor:null,fillOpacity:null,lineColor:null,lineOpacity:null,lineThickness:null},gameObject:null,scale:{x:1,y:1},centerOfMass:{x:0,y:0},centerOffset:{x:0,y:0},gravityScale:{x:1,y:1},ignoreGravity:!1,ignorePointer:!1,onCollideCallback:null,onCollideEndCallback:null,onCollideActiveCallback:null,onCollideWith:{}};!e.hasOwnProperty("position")&&e.hasOwnProperty("vertices")?e.position=n.centre(e.vertices):e.hasOwnProperty("vertices")||(i.vertices=n.fromPath("L 0 0 L 40 0 L 40 40 L 0 40"));var s=a.extend(i,e);return t(s,e),s.setOnCollideWith=function(t,e){return e?this.onCollideWith[t.id]=e:delete this.onCollideWith[t.id],this},s},s.nextGroup=function(t){return t?s._nextNonCollidingGroupId--:s._nextCollidingGroupId++},s.nextCategory=function(){return s._nextCategory=s._nextCategory<<1,s._nextCategory};var t=function(t,e){e=e||{},s.set(t,{bounds:t.bounds||h.create(t.vertices),positionPrev:t.positionPrev||r.clone(t.position),anglePrev:t.anglePrev||t.angle,vertices:t.vertices,parts:t.parts||[t],isStatic:t.isStatic,isSleeping:t.isSleeping,parent:t.parent||t});var i=t.bounds;if(n.rotate(t.vertices,t.angle,t.position),l.rotate(t.axes,t.angle),h.update(i,t.vertices,t.velocity),s.set(t,{axes:e.axes||t.axes,area:e.area||t.area,mass:e.mass||t.mass,inertia:e.inertia||t.inertia}),1===t.parts.length){var o=t.centerOfMass,a=t.centerOffset,u=i.max.x-i.min.x,c=i.max.y-i.min.y;o.x=-(i.min.x-t.position.x)/u,o.y=-(i.min.y-t.position.y)/c,a.x=u*o.x,a.y=c*o.y}};s.set=function(t,e,i){var n;for(n in"string"==typeof e&&(n=e,(e={})[n]=i),e)if(Object.prototype.hasOwnProperty.call(e,n))switch(i=e[n],n){case"isStatic":s.setStatic(t,i);break;case"isSleeping":o.set(t,i);break;case"mass":s.setMass(t,i);break;case"density":s.setDensity(t,i);break;case"inertia":s.setInertia(t,i);break;case"vertices":s.setVertices(t,i);break;case"position":s.setPosition(t,i);break;case"angle":s.setAngle(t,i);break;case"velocity":s.setVelocity(t,i);break;case"angularVelocity":s.setAngularVelocity(t,i);break;case"parts":s.setParts(t,i);break;case"centre":s.setCentre(t,i);break;default:t[n]=i}},s.setStatic=function(t,e){for(var i=0;i0&&r.rotateAbout(o.position,i,t.position,o.position)}},s.setVelocity=function(t,e){t.positionPrev.x=t.position.x-e.x,t.positionPrev.y=t.position.y-e.y,t.velocity.x=e.x,t.velocity.y=e.y,t.speed=r.magnitude(t.velocity)},s.setAngularVelocity=function(t,e){t.anglePrev=t.angle-e,t.angularVelocity=e,t.angularSpeed=Math.abs(t.angularVelocity)},s.translate=function(t,e){s.setPosition(t,r.add(t.position,e))},s.rotate=function(t,e,i){if(i){var n=Math.cos(e),r=Math.sin(e),o=t.position.x-i.x,a=t.position.y-i.y;s.setPosition(t,{x:i.x+(o*n-a*r),y:i.y+(o*r+a*n)}),s.setAngle(t,t.angle+e)}else s.setAngle(t,t.angle+e)},s.scale=function(t,e,i,r){var o=0,a=0;r=r||t.position;for(var u=0;u0&&(o+=c.area,a+=c.inertia),c.position.x=r.x+(c.position.x-r.x)*e,c.position.y=r.y+(c.position.y-r.y)*i,h.update(c.bounds,c.vertices,t.velocity)}t.parts.length>1&&(t.area=o,t.isStatic||(s.setMass(t,t.density*o),s.setInertia(t,a))),t.circleRadius&&(e===i?t.circleRadius*=e:t.circleRadius=null)},s.update=function(t,e,i,s){var o=Math.pow(e*i*t.timeScale,2),a=1-t.frictionAir*i*t.timeScale,u=t.position.x-t.positionPrev.x,c=t.position.y-t.positionPrev.y;t.velocity.x=u*a*s+t.force.x/t.mass*o,t.velocity.y=c*a*s+t.force.y/t.mass*o,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.position.x+=t.velocity.x,t.position.y+=t.velocity.y,t.angularVelocity=(t.angle-t.anglePrev)*a*s+t.torque/t.inertia*o,t.anglePrev=t.angle,t.angle+=t.angularVelocity,t.speed=r.magnitude(t.velocity),t.angularSpeed=Math.abs(t.angularVelocity);for(var d=0;d0&&(p.position.x+=t.velocity.x,p.position.y+=t.velocity.y),0!==t.angularVelocity&&(n.rotate(p.vertices,t.angularVelocity,t.position),l.rotate(p.axes,t.angularVelocity),d>0&&r.rotateAbout(p.position,t.angularVelocity,t.position,p.position)),h.update(p.bounds,p.vertices,t.velocity)}},s.applyForce=function(t,e,i){t.force.x+=i.x,t.force.y+=i.y;var s=e.x-t.position.x,n=e.y-t.position.y;t.torque+=s*i.y-n*i.x},s._totalProperties=function(t){for(var e={mass:0,area:0,inertia:0,centre:{x:0,y:0}},i=1===t.parts.length?0:1;i{var s={};t.exports=s;var n=i(39073),r=i(68758),o=i(84091),a=i(84125);s.create=function(t){return r.extend({id:r.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{},cache:{allBodies:null,allConstraints:null,allComposites:null}},t)},s.setModified=function(t,e,i,r){if(n.trigger(t,"compositeModified",t),t.isModified=e,e&&t.cache&&(t.cache.allBodies=null,t.cache.allConstraints=null,t.cache.allComposites=null),i&&t.parent&&s.setModified(t.parent,e,i,r),r)for(var o=0;o{var s={};t.exports=s;var n=i(11299);s.create=n.create,s.add=n.add,s.remove=n.remove,s.clear=n.clear,s.addComposite=n.addComposite,s.addBody=n.addBody,s.addConstraint=n.addConstraint},63454:(t,e,i)=>{var s={};t.exports=s;var n,r,o,a=i(39745),h=i(70584);n=[],r={overlap:0,axis:null},o={overlap:0,axis:null},s.create=function(t,e){return{pair:null,collided:!1,bodyA:t,bodyB:e,parentA:t.parent,parentB:e.parent,depth:0,normal:{x:0,y:0},tangent:{x:0,y:0},penetration:{x:0,y:0},supports:[]}},s.collides=function(t,e,i){if(s._overlapAxes(r,t.vertices,e.vertices,t.axes),r.overlap<=0)return null;if(s._overlapAxes(o,e.vertices,t.vertices,e.axes),o.overlap<=0)return null;var n,l,u=i&&i.table[h.id(t,e)];u?n=u.collision:((n=s.create(t,e)).collided=!0,n.bodyA=t.idS?S=a:aA?A=a:an?n=o:o{var e={};t.exports=e,e.create=function(t){return{vertex:t,normalImpulse:0,tangentImpulse:0}}},13657:(t,e,i)=>{var s={};t.exports=s;var n=i(68758),r=i(63454);s.create=function(t){return n.extend({bodies:[],pairs:null},t)},s.setBodies=function(t,e){t.bodies=e.slice(0)},s.clear=function(t){t.bodies=[]},s.collisions=function(t){var e,i,n=[],o=t.pairs,a=t.bodies,h=a.length,l=s.canCollide,u=r.collides;for(a.sort(s._compareBoundsX),e=0;ep)break;if(!(f<_.min.y||v>_.max.y)&&(!g||!x.isStatic&&!x.isSleeping)&&l(c.collisionFilter,x.collisionFilter)){var T=x.parts.length;if(y&&1===T)(A=u(c,x,o))&&n.push(A);else for(var w=T>1?1:0,b=m>1?1:0;b_.max.x||d.max.x<_.min.x||d.max.y<_.min.y||d.min.y>_.max.y||(A=u(E,C,o))&&n.push(A)}}}}return n},s.canCollide=function(t,e){return t.group===e.group&&0!==t.group?t.group>0:0!=(t.mask&e.category)&&0!=(e.mask&t.category)},s._compareBoundsX=function(t,e){return t.bounds.min.x-e.bounds.min.x}},70584:(t,e,i)=>{var s={};t.exports=s;var n=i(17319);s.create=function(t,e){var i=t.bodyA,n=t.bodyB,r={id:s.id(i,n),bodyA:i,bodyB:n,collision:t,contacts:[],activeContacts:[],separation:0,isActive:!0,confirmedActive:!0,isSensor:i.isSensor||n.isSensor,timeCreated:e,timeUpdated:e,inverseMass:0,friction:0,frictionStatic:0,restitution:0,slop:0};return s.update(r,t,e),r},s.update=function(t,e,i){var s=t.contacts,r=e.supports,o=t.activeContacts,a=e.parentA,h=e.parentB,l=a.vertices.length;t.isActive=!0,t.timeUpdated=i,t.collision=e,t.separation=e.depth,t.inverseMass=a.inverseMass+h.inverseMass,t.friction=a.frictionh.frictionStatic?a.frictionStatic:h.frictionStatic,t.restitution=a.restitution>h.restitution?a.restitution:h.restitution,t.slop=a.slop>h.slop?a.slop:h.slop,e.pair=t,o.length=0;for(var u=0;u{var s={};t.exports=s;var n=i(70584),r=i(68758);s.create=function(t){return r.extend({table:{},list:[],collisionStart:[],collisionActive:[],collisionEnd:[]},t)},s.update=function(t,e,i){var s,r,o,a,h=t.list,l=h.length,u=t.table,c=e.length,d=t.collisionStart,p=t.collisionEnd,f=t.collisionActive;for(d.length=0,p.length=0,f.length=0,a=0;a{var s={};t.exports=s;var n=i(10438),r=i(63454),o=i(84091),a=i(68516),h=i(39745);s.collides=function(t,e){for(var i=[],s=e.length,n=t.bounds,a=r.collides,h=o.overlaps,l=0;l{var s={};t.exports=s;var n=i(39745),r=i(84091);s._restingThresh=4,s._restingThreshTangent=6,s._positionDampen=.9,s._positionWarming=.8,s._frictionNormalMultiplier=5,s.preSolvePosition=function(t){var e,i,s,n=t.length;for(e=0;ez||-Y>z?(n=Y>0?Y:-Y,(i=p.friction*(Y>0?1:-1)*a)<-n?i=-n:i>n&&(i=n)):(i=Y,n=c);var G=P*T-O*x,V=L*T-F*x,W=A/(C+v.inverseInertia*G*G+g.inverseInertia*V*V),H=(1+p.restitution)*N*W;if(i*=W,N*N>h&&N<0)M.normalImpulse=0;else{var j=M.normalImpulse;M.normalImpulse+=H,M.normalImpulse=Math.min(M.normalImpulse,0),H=M.normalImpulse-j}if(Y*Y>u)M.tangentImpulse=0;else{var K=M.tangentImpulse;M.tangentImpulse+=i,M.tangentImpulse<-n&&(M.tangentImpulse=-n),M.tangentImpulse>n&&(M.tangentImpulse=n),i=M.tangentImpulse-K}var q=x*H+w*i,Z=T*H+b*i;v.isStatic||v.isSleeping||(v.positionPrev.x+=q*v.inverseMass,v.positionPrev.y+=Z*v.inverseMass,v.anglePrev+=(P*Z-O*q)*v.inverseInertia),g.isStatic||g.isSleeping||(g.positionPrev.x-=q*g.inverseMass,g.positionPrev.y-=Z*g.inverseMass,g.anglePrev-=(L*Z-F*q)*g.inverseInertia)}}}}},52838:(t,e,i)=>{var s={};t.exports=s;var n=i(39745),r=i(10438),o=i(22806),a=i(84091),h=i(50658),l=i(68758);s._warming=.4,s._torqueDampen=1,s._minLength=1e-6,s.create=function(t){var e=t;e.bodyA&&!e.pointA&&(e.pointA={x:0,y:0}),e.bodyB&&!e.pointB&&(e.pointB={x:0,y:0});var i=e.bodyA?r.add(e.bodyA.position,e.pointA):e.pointA,s=e.bodyB?r.add(e.bodyB.position,e.pointB):e.pointB,n=r.magnitude(r.sub(i,s));e.length=void 0!==e.length?e.length:n,e.id=e.id||l.nextId(),e.label=e.label||"Constraint",e.type="constraint",e.stiffness=e.stiffness||(e.length>0?1:.7),e.damping=e.damping||0,e.angularStiffness=e.angularStiffness||0,e.angleA=e.bodyA?e.bodyA.angle:e.angleA,e.angleB=e.bodyB?e.bodyB.angle:e.angleB,e.plugin={};var o={visible:!0,type:"line",anchors:!0,lineColor:null,lineOpacity:null,lineThickness:null,pinSize:null,anchorColor:null,anchorSize:null};return 0===e.length&&e.stiffness>.1?(o.type="pin",o.anchors=!1):e.stiffness<.9&&(o.type="spring"),e.render=l.extend(o,e.render),e},s.preSolveAll=function(t){for(var e=0;e0&&(c.position.x+=l.x,c.position.y+=l.y),0!==l.angle&&(n.rotate(c.vertices,l.angle,i.position),h.rotate(c.axes,l.angle),u>0&&r.rotateAbout(c.position,l.angle,i.position,c.position)),a.update(c.bounds,c.vertices,i.velocity)}l.angle*=s._warming,l.x*=s._warming,l.y*=s._warming}}},s.pointAWorld=function(t){return{x:(t.bodyA?t.bodyA.position.x:0)+(t.pointA?t.pointA.x:0),y:(t.bodyA?t.bodyA.position.y:0)+(t.pointA?t.pointA.y:0)}},s.pointBWorld=function(t){return{x:(t.bodyB?t.bodyB.position.x:0)+(t.pointB?t.pointB.x:0),y:(t.bodyB?t.bodyB.position.y:0)+(t.pointB?t.pointB.y:0)}}},68758:(t,e,i)=>{var s={};t.exports=s,function(){s._nextId=0,s._seed=0,s._nowStartTime=+new Date,s._warnedOnce={},s._decomp=null,s.extend=function(t,e){var i,n;"boolean"==typeof e?(i=2,n=e):(i=1,n=!0);for(var r=i;r0;e--){var i=Math.floor(s.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t},s.choose=function(t){return t[Math.floor(s.random()*t.length)]},s.isElement=function(t){return"undefined"!=typeof HTMLElement?t instanceof HTMLElement:!!(t&&t.nodeType&&t.nodeName)},s.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},s.isFunction=function(t){return"function"==typeof t},s.isPlainObject=function(t){return"object"==typeof t&&t.constructor===Object},s.isString=function(t){return"[object String]"===toString.call(t)},s.clamp=function(t,e,i){return ti?i:t},s.sign=function(t){return t<0?-1:1},s.now=function(){if("undefined"!=typeof window&&window.performance){if(window.performance.now)return window.performance.now();if(window.performance.webkitNow)return window.performance.webkitNow()}return Date.now?Date.now():new Date-s._nowStartTime},s.random=function(e,i){return i=void 0!==i?i:1,(e=void 0!==e?e:0)+t()*(i-e)};var t=function(){return s._seed=(9301*s._seed+49297)%233280,s._seed/233280};s.colorToNumber=function(t){return 3==(t=t.replace("#","")).length&&(t=t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)),parseInt(t,16)},s.logLevel=1,s.log=function(){console&&s.logLevel>0&&s.logLevel<=3&&console.log.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},s.info=function(){console&&s.logLevel>0&&s.logLevel<=2&&console.info.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},s.warn=function(){console&&s.logLevel>0&&s.logLevel<=3&&console.warn.apply(console,["matter-js:"].concat(Array.prototype.slice.call(arguments)))},s.warnOnce=function(){var t=Array.prototype.slice.call(arguments).join(" ");s._warnedOnce[t]||(s.warn(t),s._warnedOnce[t]=!0)},s.deprecated=function(t,e,i){t[e]=s.chain((function(){s.warnOnce("🔅 deprecated 🔅",i)}),t[e])},s.nextId=function(){return s._nextId++},s.indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var i=0;i{var s={};t.exports=s;var n=i(22806),r=i(44272),o=i(13657),a=i(91327),h=i(39073),l=i(11299),u=i(52838),c=i(68758),d=i(84125);s.create=function(t){t=t||{};var e=c.extend({positionIterations:6,velocityIterations:4,constraintIterations:2,enableSleeping:!1,events:[],plugin:{},gravity:{x:0,y:1,scale:.001},timing:{timestamp:0,timeScale:1,lastDelta:0,lastElapsed:0}},t);return e.world=t.world||l.create({label:"World"}),e.pairs=t.pairs||a.create(),e.detector=t.detector||o.create(),e.grid={buckets:[]},e.world.gravity=e.gravity,e.broadphase=e.grid,e.metrics={},e},s.update=function(t,e,i){var d=c.now();e=e||1e3/60,i=i||1;var p,f=t.world,v=t.detector,g=t.pairs,m=t.timing,y=m.timestamp;m.timestamp+=e*m.timeScale,m.lastDelta=e*m.timeScale;var x={timestamp:m.timestamp};h.trigger(t,"beforeUpdate",x);var T=l.allBodies(f),w=l.allConstraints(f);for(f.isModified&&o.setBodies(v,T),f.isModified&&l.setModified(f,!1,!1,!0),t.enableSleeping&&n.update(T,m.timeScale),s._bodiesApplyGravity(T,t.gravity),s._bodiesUpdate(T,e,m.timeScale,i,f.bounds),u.preSolveAll(T),p=0;p0&&h.trigger(t,"collisionStart",{pairs:g.collisionStart}),r.preSolvePosition(g.list),p=0;p0&&h.trigger(t,"collisionActive",{pairs:g.collisionActive}),g.collisionEnd.length>0&&h.trigger(t,"collisionEnd",{pairs:g.collisionEnd}),s._bodiesClearForces(T),h.trigger(t,"afterUpdate",x),t.timing.lastElapsed=c.now()-d,t},s.merge=function(t,e){if(c.extend(t,e),e.world){t.world=e.world,s.clear(t);for(var i=l.allBodies(t.world),r=0;r{var s={};t.exports=s;var n=i(68758);s.on=function(t,e,i){for(var s,n=e.split(" "),r=0;r0){i||(i={}),s=e.split(" ");for(var l=0;l{var s={};t.exports=s;var n=i(84474),r=i(68758);s.name="matter-js",s.version="0.18.0",s.uses=[],s.used=[],s.use=function(){n.use(s,Array.prototype.slice.call(arguments))},s.before=function(t,e){return t=t.replace(/^Matter./,""),r.chainPathBefore(s,t,e)},s.after=function(t,e){return t=t.replace(/^Matter./,""),r.chainPathAfter(s,t,e)}},84474:(t,e,i)=>{var s={};t.exports=s;var n=i(68758);s._registry={},s.register=function(t){if(s.isPlugin(t)||n.warn("Plugin.register:",s.toString(t),"does not implement all required fields."),t.name in s._registry){var e=s._registry[t.name],i=s.versionParse(t.version).number,r=s.versionParse(e.version).number;i>r?(n.warn("Plugin.register:",s.toString(e),"was upgraded to",s.toString(t)),s._registry[t.name]=t):i-1},s.isFor=function(t,e){var i=t.for&&s.dependencyParse(t.for);return!t.for||e.name===i.name&&s.versionSatisfies(e.version,i.range)},s.use=function(t,e){if(t.uses=(t.uses||[]).concat(e||[]),0!==t.uses.length){for(var i=s.dependencies(t),r=n.topologicalSort(i),o=[],a=0;a0&&!h.silent&&n.info(o.join(" "))}else n.warn("Plugin.use:",s.toString(t),"does not specify any dependencies to install.")},s.dependencies=function(t,e){var i=s.dependencyParse(t),r=i.name;if(!(r in(e=e||{}))){t=s.resolve(t)||t,e[r]=n.map(t.uses||[],(function(e){s.isPlugin(e)&&s.register(e);var r=s.dependencyParse(e),o=s.resolve(e);return o&&!s.versionSatisfies(o.version,r.range)?(n.warn("Plugin.dependencies:",s.toString(o),"does not satisfy",s.toString(r),"used by",s.toString(i)+"."),o._warned=!0,t._warned=!0):o||(n.warn("Plugin.dependencies:",s.toString(e),"used by",s.toString(i),"could not be resolved."),t._warned=!0),r.name}));for(var o=0;o=|>)?\s*((\d+)\.(\d+)\.(\d+))(-[0-9A-Za-z-+]+)?$/;e.test(t)||n.warn("Plugin.versionParse:",t,"is not a valid version or range.");var i=e.exec(t),s=Number(i[4]),r=Number(i[5]),o=Number(i[6]);return{isRange:Boolean(i[1]||i[2]),version:i[3],range:t,operator:i[1]||i[2]||"",major:s,minor:r,patch:o,parts:[s,r,o],prerelease:i[7],number:1e8*s+1e4*r+o}},s.versionSatisfies=function(t,e){e=e||"*";var i=s.versionParse(e),n=s.versionParse(t);if(i.isRange){if("*"===i.operator||"*"===t)return!0;if(">"===i.operator)return n.number>i.number;if(">="===i.operator)return n.number>=i.number;if("~"===i.operator)return n.major===i.major&&n.minor===i.minor&&n.patch>=i.patch;if("^"===i.operator)return i.major>0?n.major===i.major&&n.number>=i.number:i.minor>0?n.minor===i.minor&&n.patch>=i.patch:n.patch===i.patch}return t===e||"*"===t}},22806:(t,e,i)=>{var s={};t.exports=s;var n=i(39073);s._motionWakeThreshold=.18,s._motionSleepThreshold=.08,s._minBias=.9,s.update=function(t,e){for(var i=e*e*e,n=0;n0&&r.motion=r.sleepThreshold&&s.set(r,!0)):r.sleepCounter>0&&(r.sleepCounter-=1)}else s.set(r,!1)}},s.afterCollisions=function(t,e){for(var i=e*e*e,n=0;ns._motionWakeThreshold*i&&s.set(l,!1)}}}},s.set=function(t,e){var i=t.isSleeping;e?(t.isSleeping=!0,t.sleepCounter=t.sleepThreshold,t.positionImpulse.x=0,t.positionImpulse.y=0,t.positionPrev.x=t.position.x,t.positionPrev.y=t.position.y,t.anglePrev=t.angle,t.speed=0,t.angularSpeed=0,t.motion=0,i||n.trigger(t,"sleepStart")):(t.isSleeping=!1,t.sleepCounter=0,i&&n.trigger(t,"sleepEnd"))}},68516:(t,e,i)=>{var s={};t.exports=s;var n=i(39745),r=i(68758),o=i(84125),a=i(84091),h=i(10438);s.rectangle=function(t,e,i,s,a){a=a||{};var h={label:"Rectangle Body",position:{x:t,y:e},vertices:n.fromPath("L 0 0 L "+i+" 0 L "+i+" "+s+" L 0 "+s)};if(a.chamfer){var l=a.chamfer;h.vertices=n.chamfer(h.vertices,l.radius,l.quality,l.qualityMin,l.qualityMax),delete a.chamfer}return o.create(r.extend({},h,a))},s.trapezoid=function(t,e,i,s,a,h){h=h||{};var l,u=i*(a*=.5),c=u+(1-2*a)*i,d=c+u;l=a<.5?"L 0 0 L "+u+" "+-s+" L "+c+" "+-s+" L "+d+" 0":"L 0 0 L "+c+" "+-s+" L "+d+" 0";var p={label:"Trapezoid Body",position:{x:t,y:e},vertices:n.fromPath(l)};if(h.chamfer){var f=h.chamfer;p.vertices=n.chamfer(p.vertices,f.radius,f.quality,f.qualityMin,f.qualityMax),delete h.chamfer}return o.create(r.extend({},p,h))},s.circle=function(t,e,i,n,o){n=n||{};var a={label:"Circle Body",circleRadius:i};o=o||25;var h=Math.ceil(Math.max(10,Math.min(o,i)));return h%2==1&&(h+=1),s.polygon(t,e,h,i,r.extend({},a,n))},s.polygon=function(t,e,i,a,h){if(h=h||{},i<3)return s.circle(t,e,a,h);for(var l=2*Math.PI/i,u="",c=.5*l,d=0;d0&&n.area(b)1?(p=o.create(r.extend({parts:f.slice(0)},a)),o.setPosition(p,{x:t,y:e}),p):f[0]},s.flagCoincidentParts=function(t,e){void 0===e&&(e=5);for(var i=0;i{var s={};t.exports=s;var n=i(11299),r=i(52838),o=i(68758),a=i(84125),h=i(68516),l=o.deprecated;s.stack=function(t,e,i,s,r,o,h){for(var l,u=n.create({label:"Stack"}),c=t,d=e,p=0,f=0;fv&&(v=y),a.translate(m,{x:.5*x,y:.5*y}),c=m.bounds.max.x+r,n.addBody(u,m),l=m,p+=1}else c+=r}d+=v+o,c=t}return u},s.chain=function(t,e,i,s,a,h){for(var l=t.bodies,u=1;u0)for(l=0;l0&&(d=p[l-1+(h-1)*e],n.addConstraint(t,r.create(o.extend({bodyA:d,bodyB:c},a)))),s&&ld||o<(l=d-l)||o>i-1-l))return 1===c&&a.translate(u,{x:(o+(i%2==1?1:-1))*p,y:0}),h(t+(u?o*p:0)+o*r,s,o,l,u,c)}))},s.newtonsCradle=function(t,e,i,s,o){for(var a=n.create({label:"Newtons Cradle"}),l=0;l{var s={};t.exports=s;var n=i(10438),r=i(68758);s.fromVertices=function(t){for(var e={},i=0;i{var e={};t.exports=e,e.create=function(t){var i={min:{x:0,y:0},max:{x:0,y:0}};return t&&e.update(i,t),i},e.update=function(t,e,i){t.min.x=1/0,t.max.x=-1/0,t.min.y=1/0,t.max.y=-1/0;for(var s=0;st.max.x&&(t.max.x=n.x),n.xt.max.y&&(t.max.y=n.y),n.y0?t.max.x+=i.x:t.min.x+=i.x,i.y>0?t.max.y+=i.y:t.min.y+=i.y)},e.contains=function(t,e){return e.x>=t.min.x&&e.x<=t.max.x&&e.y>=t.min.y&&e.y<=t.max.y},e.overlaps=function(t,e){return t.min.x<=e.max.x&&t.max.x>=e.min.x&&t.max.y>=e.min.y&&t.min.y<=e.max.y},e.translate=function(t,e){t.min.x+=e.x,t.max.x+=e.x,t.min.y+=e.y,t.max.y+=e.y},e.shift=function(t,e){var i=t.max.x-t.min.x,s=t.max.y-t.min.y;t.min.x=e.x,t.max.x=e.x+i,t.min.y=e.y,t.max.y=e.y+s}},92765:(t,e,i)=>{var s={};t.exports=s;i(84091);var n=i(68758);s.pathToVertices=function(t,e){"undefined"==typeof window||"SVGPathSeg"in window||n.warn("Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.");var i,r,o,a,h,l,u,c,d,p,f,v=[],g=0,m=0,y=0;e=e||15;var x=function(t,e,i){var s=i%2==1&&i>1;if(!d||t!=d.x||e!=d.y){d&&s?(p=d.x,f=d.y):(p=0,f=0);var n={x:p+t,y:f+e};!s&&d||(d=n),v.push(n),m=p+t,y=f+e}},T=function(t){var e=t.pathSegTypeAsLetter.toUpperCase();if("Z"!==e){switch(e){case"M":case"L":case"T":case"C":case"S":case"Q":m=t.x,y=t.y;break;case"H":m=t.x;break;case"V":y=t.y}x(m,y,t.pathSegType)}};for(s._svgPathToAbsolute(t),o=t.getTotalLength(),l=[],i=0;i{var e={};t.exports=e,e.create=function(t,e){return{x:t||0,y:e||0}},e.clone=function(t){return{x:t.x,y:t.y}},e.magnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.magnitudeSquared=function(t){return t.x*t.x+t.y*t.y},e.rotate=function(t,e,i){var s=Math.cos(e),n=Math.sin(e);i||(i={});var r=t.x*s-t.y*n;return i.y=t.x*n+t.y*s,i.x=r,i},e.rotateAbout=function(t,e,i,s){var n=Math.cos(e),r=Math.sin(e);s||(s={});var o=i.x+((t.x-i.x)*n-(t.y-i.y)*r);return s.y=i.y+((t.x-i.x)*r+(t.y-i.y)*n),s.x=o,s},e.normalise=function(t){var i=e.magnitude(t);return 0===i?{x:0,y:0}:{x:t.x/i,y:t.y/i}},e.dot=function(t,e){return t.x*e.x+t.y*e.y},e.cross=function(t,e){return t.x*e.y-t.y*e.x},e.cross3=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(e.y-t.y)*(i.x-t.x)},e.add=function(t,e,i){return i||(i={}),i.x=t.x+e.x,i.y=t.y+e.y,i},e.sub=function(t,e,i){return i||(i={}),i.x=t.x-e.x,i.y=t.y-e.y,i},e.mult=function(t,e){return{x:t.x*e,y:t.y*e}},e.div=function(t,e){return{x:t.x/e,y:t.y/e}},e.perp=function(t,e){return{x:(e=!0===e?-1:1)*-t.y,y:e*t.x}},e.neg=function(t){return{x:-t.x,y:-t.y}},e.angle=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)},e._temp=[e.create(),e.create(),e.create(),e.create(),e.create(),e.create()]},39745:(t,e,i)=>{var s={};t.exports=s;var n=i(10438),r=i(68758);s.create=function(t,e){for(var i=[],s=0;s0)return!1;o=i}return!0},s.scale=function(t,e,i,r){if(1===e&&1===i)return t;var o,a;r=r||s.centre(t);for(var h=0;h=0?h-1:t.length-1],u=t[h],c=t[(h+1)%t.length],d=e[h0&&(r|=2),3===r)return!1;return 0!==r||null},s.hull=function(t){var e,i,s=[],r=[];for((t=t.slice(0)).sort((function(t,e){var i=t.x-e.x;return 0!==i?i:t.y-e.y})),i=0;i=2&&n.cross3(r[r.length-2],r[r.length-1],e)<=0;)r.pop();r.push(e)}for(i=t.length-1;i>=0;i-=1){for(e=t[i];s.length>=2&&n.cross3(s[s.length-2],s[s.length-1],e)<=0;)s.pop();s.push(e)}return s.pop(),r.pop(),s.concat(r)}},1675:(t,e,i)=>{var s=i(18171),n={name:"matter-attractors",version:"0.1.7",for:"matter-js@^0.18.0",silent:!0,install:function(t){t.after("Body.create",(function(){n.Body.init(this)})),t.before("Engine.update",(function(t){n.Engine.update(t)}))},Body:{init:function(t){t.plugin.attractors=t.plugin.attractors||[]}},Engine:{update:function(t){for(var e=s.Composite.allBodies(t.world),i=0;i0)for(var o=0;o{t.exports={name:"matter-collision-events",version:"0.1.6",for:"matter-js@^0.18.0",silent:!0,install:function(t){t.after("Engine.create",(function(){t.Events.on(this,"collisionStart",(function(e){e.pairs.map((function(e){var i=e.bodyA,s=e.bodyB;i.gameObject&&i.gameObject.emit("collide",i,s,e),s.gameObject&&s.gameObject.emit("collide",s,i,e),t.Events.trigger(i,"onCollide",{pair:e}),t.Events.trigger(s,"onCollide",{pair:e}),i.onCollideCallback&&i.onCollideCallback(e),s.onCollideCallback&&s.onCollideCallback(e),i.onCollideWith[s.id]&&i.onCollideWith[s.id](s,e),s.onCollideWith[i.id]&&s.onCollideWith[i.id](i,e)}))})),t.Events.on(this,"collisionActive",(function(e){e.pairs.map((function(e){var i=e.bodyA,s=e.bodyB;i.gameObject&&i.gameObject.emit("collideActive",i,s,e),s.gameObject&&s.gameObject.emit("collideActive",s,i,e),t.Events.trigger(i,"onCollideActive",{pair:e}),t.Events.trigger(s,"onCollideActive",{pair:e}),i.onCollideActiveCallback&&i.onCollideActiveCallback(e),s.onCollideActiveCallback&&s.onCollideActiveCallback(e)}))})),t.Events.on(this,"collisionEnd",(function(e){e.pairs.map((function(e){var i=e.bodyA,s=e.bodyB;i.gameObject&&i.gameObject.emit("collideEnd",i,s,e),s.gameObject&&s.gameObject.emit("collideEnd",s,i,e),t.Events.trigger(i,"onCollideEnd",{pair:e}),t.Events.trigger(s,"onCollideEnd",{pair:e}),i.onCollideEndCallback&&i.onCollideEndCallback(e),s.onCollideEndCallback&&s.onCollideEndCallback(e)}))}))}))}}},44097:(t,e,i)=>{var s=i(18171),n={name:"matter-wrap",version:"0.1.4",for:"matter-js@^0.18.0",silent:!0,install:function(t){t.after("Engine.update",(function(){n.Engine.update(this)}))},Engine:{update:function(t){for(var e=t.world,i=s.Composite.allBodies(e),r=s.Composite.allComposites(e),o=0;oe.max.x?i=e.min.x-t.max.x:t.max.xe.max.y?s=e.min.y-t.max.y:t.max.y{function e(t,e,i){i=i||0;var s,n,r,o,a,h,l,u=[0,0];return s=t[1][1]-t[0][1],n=t[0][0]-t[1][0],r=s*t[0][0]+n*t[0][1],o=e[1][1]-e[0][1],a=e[0][0]-e[1][0],h=o*e[0][0]+a*e[0][1],E(l=s*a-o*n,0,i)||(u[0]=(a*r-n*h)/l,u[1]=(s*h-o*r)/l),u}function i(t,e,i,s){var n=e[0]-t[0],r=e[1]-t[1],o=s[0]-i[0],a=s[1]-i[1];if(o*r-a*n==0)return!1;var h=(n*(i[1]-t[1])+r*(t[0]-i[0]))/(o*r-a*n),l=(o*(t[1]-i[1])+a*(i[0]-t[0]))/(a*n-o*r);return h>=0&&h<=1&&l>=0&&l<=1}function s(t,e,i){return(e[0]-t[0])*(i[1]-t[1])-(i[0]-t[0])*(e[1]-t[1])}function n(t,e,i){return s(t,e,i)>0}function r(t,e,i){return s(t,e,i)>=0}function o(t,e,i){return s(t,e,i)<0}function a(t,e,i){return s(t,e,i)<=0}t.exports={decomp:function(t){var e=T(t);return e.length>0?w(t,e):[t]},quickDecomp:function t(e,i,s,h,l,u,v){u=u||100,v=v||0,l=l||25,i=void 0!==i?i:[],s=s||[],h=h||[];var g=[0,0],m=[0,0],x=[0,0],T=0,w=0,E=0,S=0,A=0,C=0,_=0,M=[],R=[],P=e,O=e;if(O.length<3)return i;if(++v>u)return console.warn("quickDecomp: max level ("+u+") reached."),i;for(var L=0;LA&&(A+=e.length),S=Number.MAX_VALUE,A3&&s>=0;--s)u(d(t,s-1),d(t,s),d(t,s+1),e)&&(t.splice(s%t.length,1),i++);return i},removeDuplicatePoints:function(t,e){for(var i=t.length-1;i>=1;--i)for(var s=t[i],n=i-1;n>=0;--n)S(s,t[n],e)&&t.splice(i,1)},makeCCW:function(t){for(var e=0,i=t,s=1;si[e][0])&&(e=s);return!n(d(t,e-1),d(t,e),d(t,e+1))&&(function(t){for(var e=[],i=t.length,s=0;s!==i;s++)e.push(t.pop());for(s=0;s!==i;s++)t[s]=e[s]}(t),!0)}};var h=[],l=[];function u(t,e,i,n){if(n){var r=h,o=l;r[0]=e[0]-t[0],r[1]=e[1]-t[1],o[0]=i[0]-e[0],o[1]=i[1]-e[1];var a=r[0]*o[0]+r[1]*o[1],u=Math.sqrt(r[0]*r[0]+r[1]*r[1]),c=Math.sqrt(o[0]*o[0]+o[1]*o[1]);return Math.acos(a/(u*c)){var s=new(i(56694))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=s},18360:t=>{t.exports={Global:["game","anims","cache","plugins","registry","scale","sound","textures","renderer"],CoreScene:["EventEmitter","CameraManager","GameObjectCreator","GameObjectFactory","ScenePlugin","DisplayList","UpdateList"],DefaultScene:["Clock","DataManagerPlugin","InputPlugin","Loader","TweenManager","LightsPlugin"]}},91963:t=>{var e={},i={},s={register:function(t,i,s,n){void 0===n&&(n=!1),e[t]={plugin:i,mapping:s,custom:n}},registerCustom:function(t,e,s,n){i[t]={plugin:e,mapping:s,data:n}},hasCore:function(t){return e.hasOwnProperty(t)},hasCustom:function(t){return i.hasOwnProperty(t)},getCore:function(t){return e[t]},getCustom:function(t){return i[t]},getCustomClass:function(t){return i.hasOwnProperty(t)?i[t].plugin:null},remove:function(t){e.hasOwnProperty(t)&&delete e[t]},removeCustom:function(t){i.hasOwnProperty(t)&&delete i[t]},destroyCorePlugins:function(){for(var t in e)e.hasOwnProperty(t)&&delete e[t]},destroyCustomPlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]}};t.exports=s},49274:(t,e,i)=>{var s=i(56694),n=i(97081),r=i(6659),o=i(76846),a=i(99325),h=i(61286),l=i(72632),u=i(91963),c=i(66458),d=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.plugins=[],this.scenePlugins=[],this._pendingGlobal=[],this._pendingScene=[],t.isBooted?this.boot():t.events.once(n.BOOT,this.boot,this)},boot:function(){var t,e,i,s,r,o,a,h=this.game.config,u=h.installGlobalPlugins;for(u=u.concat(this._pendingGlobal),t=0;t{var s=i(88257),n=i(56694),r=i(7599),o=new n({Extends:s,initialize:function(t,e,i){s.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,t.sys.events.once(r.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=o},45615:(t,e,i)=>{t.exports={BasePlugin:i(88257),DefaultPlugins:i(18360),PluginCache:i(91963),PluginManager:i(49274),ScenePlugin:i(39283)}},95723:t=>{t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},27394:t=>{t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},91135:(t,e,i)=>{var s=i(89787),n=i(61840),r=i(56694),o=i(86459),a=i(6659),h=i(81044),l=i(32834),u=i(40444),c=i(38203),d=i(69360),p=new r({Extends:a,initialize:function(t){a.call(this);var e=t.config;this.config={clearBeforeRender:e.clearBeforeRender,backgroundColor:e.backgroundColor,antialias:e.antialias,roundPixels:e.roundPixels},this.game=t,this.type=o.CANVAS,this.drawCount=0,this.width=0,this.height=0,this.gameCanvas=t.canvas;var i={alpha:t.config.transparent,desynchronized:t.config.desynchronized,willReadFrequently:!1};this.gameContext=e.context?e.context:this.gameCanvas.getContext("2d",i),this.currentContext=this.gameContext,this.antialias=t.config.antialias,this.blendModes=l(),this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92},this._tempMatrix1=new d,this._tempMatrix2=new d,this._tempMatrix3=new d,this.isBooted=!1,this.init()},init:function(){this.game.textures.once(c.READY,this.boot,this)},boot:function(){var t=this.game,e=t.scale.baseSize;this.width=e.width,this.height=e.height,this.isBooted=!0,t.scale.on(u.RESIZE,this.onResize,this),this.resize(e.width,e.height)},onResize:function(t,e){e.width===this.width&&e.height===this.height||this.resize(e.width,e.height)},resize:function(t,e){this.width=t,this.height=e,this.emit(h.RESIZE,t,e)},resetTransform:function(){this.currentContext.setTransform(1,0,0,1,0,0)},setBlendMode:function(t){return this.currentContext.globalCompositeOperation=t,this},setContext:function(t){return this.currentContext=t||this.gameContext,this},setAlpha:function(t){return this.currentContext.globalAlpha=t,this},preRender:function(){var t=this.gameContext,e=this.config,i=this.width,s=this.height;t.globalAlpha=1,t.globalCompositeOperation="source-over",t.setTransform(1,0,0,1,0,0),e.clearBeforeRender&&(t.clearRect(0,0,i,s),e.transparent||(t.fillStyle=e.backgroundColor.rgba,t.fillRect(0,0,i,s))),t.save(),this.drawCount=0,this.emit(h.PRE_RENDER)},render:function(t,e,i){var n=e.length;this.emit(h.RENDER,t,i);var r=i.x,o=i.y,a=i.width,l=i.height,u=i.renderToTexture?i.context:t.sys.context;u.save(),this.game.scene.customViewports&&(u.beginPath(),u.rect(r,o,a,l),u.clip()),i.emit(s.PRE_RENDER,i),this.currentContext=u;var c=i.mask;c&&c.preRenderCanvas(this,null,i._maskCamera),i.transparent||(u.fillStyle=i.backgroundColor.rgba,u.fillRect(r,o,a,l)),u.globalAlpha=i.alpha,u.globalCompositeOperation="source-over",this.drawCount+=n,i.renderToTexture&&i.emit(s.PRE_RENDER,i),i.matrix.copyToContext(u);for(var d=0;d=0?m=-(m+c):m<0&&(m=Math.abs(m)-c)),t.flipY&&(y>=0?y=-(y+d):y<0&&(y=Math.abs(y)-d))}var T=1,w=1;t.flipX&&(p||(m+=-e.realWidth+2*v),T=-1),t.flipY&&(p||(y+=-e.realHeight+2*g),w=-1);var b=t.x,E=t.y;i.roundPixels&&(b=Math.floor(b),E=Math.floor(E)),a.applyITRS(b,E,t.rotation,t.scaleX*T,t.scaleY*w),o.copyFrom(i.matrix),s?(o.multiplyWithOffset(s,-i.scrollX*t.scrollFactorX,-i.scrollY*t.scrollFactorY),a.e=b,a.f=E):(a.e-=i.scrollX*t.scrollFactorX,a.f-=i.scrollY*t.scrollFactorY),o.multiply(a),i.roundPixels&&(o.e=Math.round(o.e),o.f=Math.round(o.f)),r.save(),o.setToContext(r),r.globalCompositeOperation=this.blendModes[t.blendMode],r.globalAlpha=n,r.imageSmoothingEnabled=!e.source.scaleMode,t.mask&&t.mask.preRenderCanvas(this,t,i),c>0&&d>0&&r.drawImage(e.source.image,l,u,c,d,m,y,c/f,d/f),t.mask&&t.mask.postRenderCanvas(this,t,i),r.restore()}},destroy:function(){this.removeAllListeners(),this.game=null,this.gameCanvas=null,this.gameContext=null}});t.exports=p},6046:(t,e,i)=>{t.exports={CanvasRenderer:i(91135),GetBlendModes:i(32834),SetTransform:i(49584)}},32834:(t,e,i)=>{var s=i(95723),n=i(98581);t.exports=function(){var t=[],e=n.supportNewBlendModes,i="source-over";return t[s.NORMAL]=i,t[s.ADD]="lighter",t[s.MULTIPLY]=e?"multiply":i,t[s.SCREEN]=e?"screen":i,t[s.OVERLAY]=e?"overlay":i,t[s.DARKEN]=e?"darken":i,t[s.LIGHTEN]=e?"lighten":i,t[s.COLOR_DODGE]=e?"color-dodge":i,t[s.COLOR_BURN]=e?"color-burn":i,t[s.HARD_LIGHT]=e?"hard-light":i,t[s.SOFT_LIGHT]=e?"soft-light":i,t[s.DIFFERENCE]=e?"difference":i,t[s.EXCLUSION]=e?"exclusion":i,t[s.HUE]=e?"hue":i,t[s.SATURATION]=e?"saturation":i,t[s.COLOR]=e?"color":i,t[s.LUMINOSITY]=e?"luminosity":i,t[s.ERASE]="destination-out",t[s.SOURCE_IN]="source-in",t[s.SOURCE_OUT]="source-out",t[s.SOURCE_ATOP]="source-atop",t[s.DESTINATION_OVER]="destination-over",t[s.DESTINATION_IN]="destination-in",t[s.DESTINATION_OUT]="destination-out",t[s.DESTINATION_ATOP]="destination-atop",t[s.LIGHTER]="lighter",t[s.COPY]="copy",t[s.XOR]="xor",t}},49584:(t,e,i)=>{var s=i(73329);t.exports=function(t,e,i,n,r){var o=n.alpha*i.alpha;if(o<=0)return!1;var a=s(i,n,r).calc;return e.globalCompositeOperation=t.blendModes[i.blendMode],e.globalAlpha=o,e.save(),a.setToContext(e),e.imageSmoothingEnabled=i.frame?!i.frame.source.scaleMode:t.antialias,!0}},70936:t=>{t.exports="postrender"},99298:t=>{t.exports="prerender"},7743:t=>{t.exports="render"},99519:t=>{t.exports="resize"},81044:(t,e,i)=>{t.exports={POST_RENDER:i(70936),PRE_RENDER:i(99298),RENDER:i(7743),RESIZE:i(99519)}},42069:(t,e,i)=>{t.exports={Canvas:i(6046),Events:i(81044),Snapshot:i(95528),WebGL:i(55478)}},61840:(t,e,i)=>{var s=i(61068),n=i(27119),r=i(72632);t.exports=function(t,e){var i=r(e,"callback"),o=r(e,"type","image/png"),a=r(e,"encoder",.92),h=Math.abs(Math.round(r(e,"x",0))),l=Math.abs(Math.round(r(e,"y",0))),u=Math.floor(r(e,"width",t.width)),c=Math.floor(r(e,"height",t.height));if(r(e,"getPixel",!1)){var d=t.getContext("2d").getImageData(h,l,1,1).data;i.call(null,new n(d[0],d[1],d[2],d[3]))}else if(0!==h||0!==l||u!==t.width||c!==t.height){var p=s.createWebGL(this,u,c),f=p.getContext("2d");u>0&&c>0&&f.drawImage(t,h,l,u,c,0,0,u,c);var v=new Image;v.onerror=function(){i.call(null),s.remove(p)},v.onload=function(){i.call(null,v),s.remove(p)},v.src=p.toDataURL(o,a)}else{var g=new Image;g.onerror=function(){i.call(null)},g.onload=function(){i.call(null,g)},g.src=t.toDataURL(o,a)}}},1217:(t,e,i)=>{var s=i(61068),n=i(27119),r=i(72632);t.exports=function(t,e){var i=t,o=r(e,"callback"),a=r(e,"type","image/png"),h=r(e,"encoder",.92),l=Math.abs(Math.round(r(e,"x",0))),u=Math.abs(Math.round(r(e,"y",0))),c=r(e,"getPixel",!1),d=r(e,"isFramebuffer",!1),p=d?r(e,"bufferWidth",1):i.drawingBufferWidth,f=d?r(e,"bufferHeight",1):i.drawingBufferHeight;if(c){var v=new Uint8Array(4),g=d?u:f-u;i.readPixels(l,g,1,1,i.RGBA,i.UNSIGNED_BYTE,v),o.call(null,new n(v[0],v[1],v[2],v[3]))}else{var m=Math.floor(r(e,"width",p)),y=Math.floor(r(e,"height",f)),x=m*y*4,T=new Uint8Array(x);i.readPixels(l,f-u-y,m,y,i.RGBA,i.UNSIGNED_BYTE,T);for(var w=s.createWebGL(this,m,y),b=w.getContext("2d",{willReadFrequently:!0}),E=b.getImageData(0,0,m,y),S=E.data,A=0;A{t.exports={Canvas:i(61840),WebGL:i(1217)}},35217:(t,e,i)=>{var s=i(56694),n=i(65641),r=i(33885),o=i(77290),a=i(72632),h=i(37410),l=i(82127),u=i(5583),c=i(66901),d=i(71264),p=i(77310),f=i(10919),v=i(21213),g=i(51212),m=i(60848),y=new s({initialize:function(t){this.game=t.game,this.renderer=t,this.classes=new r([[n.UTILITY_PIPELINE,m],[n.MULTI_PIPELINE,p],[n.BITMAPMASK_PIPELINE,u],[n.SINGLE_PIPELINE,g],[n.ROPE_PIPELINE,v],[n.LIGHT_PIPELINE,c],[n.POINTLIGHT_PIPELINE,f],[n.MOBILE_PIPELINE,d]]),this.postPipelineClasses=new r,this.pipelines=new r,this.default=null,this.current=null,this.previous=null,this.MULTI_PIPELINE=null,this.BITMAPMASK_PIPELINE=null,this.UTILITY_PIPELINE=null,this.MOBILE_PIPELINE=null,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderTargets=[],this.maxDimension=0,this.frameInc=32,this.targetIndex=0},boot:function(t,e,i){var s=this.renderer,r=this.renderTargets;this.frameInc=Math.floor(a(t,"frameInc",32));for(var l,u,c=s.width,d=s.height,p=Math.min(c,d),f=Math.ceil(p/this.frameInc),v=1;v=0;i--){var s=e[i];s.active&&s.preBatch(t)}}},postBatch:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;i=0;i--){var s=e[i];s.active&&s.preBatch(t)}}},postBatchCamera:function(t){if(t.hasPostPipeline){this.flush();for(var e=t.postPipelines,i=0;ithis.maxDimension)return this.targetIndex=e.length-3,e[this.targetIndex];var i=3*(l(t,this.frameInc,0,!0)-1);return this.targetIndex=i,e[i]},getSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+1]},getAltSwapRenderTarget:function(){return this.renderTargets[this.targetIndex+2]},destroy:function(){this.flush(),this.classes.clear(),this.postPipelineClasses.clear(),this.pipelines.clear(),this.renderer=null,this.game=null,this.classes=null,this.postPipelineClasses=null,this.pipelines=null,this.default=null,this.current=null,this.previous=null}});t.exports=y},37410:(t,e,i)=>{var s=i(56694),n=i(81044),r=new s({initialize:function(t,e,i,s,n,r,o){void 0===s&&(s=1),void 0===n&&(n=0),void 0===r&&(r=!0),void 0===o&&(o=!1),this.renderer=t,this.framebuffer=null,this.texture=null,this.width=0,this.height=0,this.scale=s,this.minFilter=n,this.autoClear=r,this.autoResize=!1,this.resize(e,i),o&&this.setAutoResize(!0)},setAutoResize:function(t){return t&&!this.autoResize?(this.renderer.on(n.RESIZE,this.resize,this),this.autoResize=!0):!t&&this.autoResize&&(this.renderer.off(n.RESIZE,this.resize,this),this.autoResize=!1),this},resize:function(t,e){var i=t*this.scale,s=e*this.scale;if(i!==this.width||s!==this.height){var n=this.renderer;n.deleteFramebuffer(this.framebuffer),n.deleteTexture(this.texture),t*=this.scale,e*=this.scale,(t=Math.round(t))<=0&&(t=1),(e=Math.round(e))<=0&&(e=1),this.texture=n.createTextureFromSource(null,t,e,this.minFilter,!0),this.framebuffer=n.createFramebuffer(t,e,this.texture,!0),this.width=t,this.height=e}return this},bind:function(t,e,i){if(void 0===t&&(t=!1),t&&this.renderer.flush(),e&&i&&this.resize(e,i),this.renderer.pushFramebuffer(this.framebuffer,!1,!1,!1),t&&this.adjustViewport(),this.autoClear){var s=this.renderer.gl;s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT)}},adjustViewport:function(){var t=this.renderer.gl;t.viewport(0,0,this.width,this.height),t.disable(t.SCISSOR_TEST)},clear:function(){var t=this.renderer,e=t.gl;t.pushFramebuffer(this.framebuffer),e.disable(e.SCISSOR_TEST),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),t.popFramebuffer(),t.resetScissor()},unbind:function(t){void 0===t&&(t=!1);var e=this.renderer;return t&&e.flush(),e.popFramebuffer()},destroy:function(){var t=this.renderer;t.deleteFramebuffer(this.framebuffer),t.deleteTexture(this.texture),t.off(n.RESIZE,this.resize,this),this.renderer=null,this.framebuffer=null,this.texture=null}});t.exports=r},75512:t=>{t.exports={getTintFromFloats:function(t,e,i,s){return((255&(255*s|0))<<24|(255&(255*t|0))<<16|(255&(255*e|0))<<8|255&(255*i|0))>>>0},getTintAppendFloatAlpha:function(t,e){return((255&(255*e|0))<<24|t)>>>0},getTintAppendFloatAlphaAndSwap:function(t,e){return((255&(255*e|0))<<24|(255&(0|t))<<16|(255&(t>>8|0))<<8|255&(t>>16|0))>>>0},getFloatsFromUintRGB:function(t){return[(255&(t>>16|0))/255,(255&(t>>8|0))/255,(255&(0|t))/255]},checkShaderMax:function(t,e){var i=Math.min(16,t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS));return e&&-1!==e?Math.min(i,e):i},parseFragmentShaderMaxTextures:function(t,e){if(!t)return"";for(var i="",s=0;s0&&(i+="\n\telse "),s{var s=i(56694),n=i(28699),r=i(6659),o=i(18970),a=i(72632),h=i(16650),l=i(81044),u=i(37410),c=i(75512),d=i(71305),p=new s({Extends:r,initialize:function(t){r.call(this);var e=t.game,i=e.renderer,s=i.gl;this.name=a(t,"name","WebGLPipeline"),this.game=e,this.renderer=i,this.manager,this.gl=s,this.view=e.canvas,this.width=0,this.height=0,this.vertexCount=0,this.vertexCapacity=0,this.vertexData,this.vertexBuffer,this.activeBuffer,this.topology=a(t,"topology",s.TRIANGLES),this.bytes,this.vertexViewF32,this.vertexViewU32,this.active=!0,this.forceZero=a(t,"forceZero",!1),this.hasBooted=!1,this.isPostFX=!1,this.isSpriteFX=!1,this.renderTargets=[],this.currentRenderTarget,this.shaders=[],this.currentShader,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.config=t,this.glReset=!1,this.batch=[],this.currentBatch=null,this.currentTexture=null,this.currentUnit=0,this.activeTextures=[]},boot:function(){var t,e=this.gl,i=this.config,s=this.renderer;this.isPostFX||(this.projectionMatrix=(new h).identity());var n=this.renderTargets,r=a(i,"renderTarget",!1);"boolean"==typeof r&&r&&(r=1);var c=s.width,d=s.height;if("number"==typeof r)for(t=0;tx&&(x=y[t].vertexSize);var T=a(i,"batchSize",s.config.batchSize);this.vertexCapacity=6*T;var w=new ArrayBuffer(this.vertexCapacity*x);this.vertexData=w,this.bytes=new Uint8Array(w),this.vertexViewF32=new Float32Array(w),this.vertexViewU32=new Uint32Array(w);var b=a(i,"vertices",null);for(b?(this.vertexViewF32.set(b),this.vertexBuffer=s.createVertexBuffer(w,e.STATIC_DRAW)):this.vertexBuffer=s.createVertexBuffer(w.byteLength,e.DYNAMIC_DRAW),this.setVertexBuffer(),t=y.length-1;t>=0;t--)y[t].rebind();this.hasBooted=!0,s.on(l.RESIZE,this.resize,this),s.on(l.PRE_RENDER,this.onPreRender,this),s.on(l.RENDER,this.onRender,this),s.on(l.POST_RENDER,this.onPostRender,this),this.emit(o.BOOT,this),this.onBoot()},onBoot:function(){},onResize:function(){},setShader:function(t,e,i){var s=this.renderer;t===this.currentShader&&s.currentProgram===this.currentShader.program||(this.flush(),this.setVertexBuffer(i)&&!e&&(e=!0),t.bind(e,!1),this.currentShader=t);return this},getShaderByName:function(t){for(var e=this.shaders,i=0;ithis.vertexCapacity},vertexAvailable:function(){return this.vertexCapacity-this.vertexCount},resize:function(t,e){t===this.width&&e===this.height||this.flush(),this.width=t,this.height=e;for(var i=this.renderTargets,s=0;s=0;i--){var s=e[i].rebind();t&&s!==t||(this.currentShader=s)}return this.activeTextures.length=0,this.emit(o.REBIND,this.currentShader),this.onActive(this.currentShader),this.onRebind(),this.glReset=!1,this},setVertexBuffer:function(t){if(void 0===t&&(t=this.vertexBuffer),t!==this.activeBuffer){var e=this.gl;return this.gl.bindBuffer(e.ARRAY_BUFFER,t),this.activeBuffer=t,!0}return!1},preBatch:function(t){return this.currentRenderTarget&&this.currentRenderTarget.bind(),this.onPreBatch(t),this},postBatch:function(t){return this.onDraw(this.currentRenderTarget),this.onPostBatch(t),this},onDraw:function(){},unbind:function(){this.currentRenderTarget&&this.currentRenderTarget.unbind()},flush:function(t){if(void 0===t&&(t=!1),this.vertexCount>0){this.emit(o.BEFORE_FLUSH,this,t),this.onBeforeFlush(t);var e=this.gl,i=this.vertexCount,s=this.currentShader.vertexSize,n=this.topology;if(this.active){var r,a,h;this.setVertexBuffer(),i===this.vertexCapacity?e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.DYNAMIC_DRAW):e.bufferSubData(e.ARRAY_BUFFER,0,this.bytes.subarray(0,i*s));var l=this.batch,u=this.activeTextures;if(this.forceZero)for(u[0]||e.activeTexture(e.TEXTURE0),r=0;r{var s=i(66458),n=i(89787),r=i(56694),o=i(86459),a=i(6659),h=i(81044),l=i(28621),u=i(16650),c=i(72283),d=i(35217),p=i(37410),f=i(40444),v=i(38203),g=i(75512),m=i(1217),y=!1,x=new r({Extends:a,initialize:function(t){a.call(this);var e=t.config,i={alpha:e.transparent,desynchronized:e.desynchronized,depth:!1,antialias:e.antialiasGL,premultipliedAlpha:e.premultipliedAlpha,stencil:!0,failIfMajorPerformanceCaveat:e.failIfMajorPerformanceCaveat,powerPreference:e.powerPreference,preserveDrawingBuffer:e.preserveDrawingBuffer,willReadFrequently:!1};this.config={clearBeforeRender:e.clearBeforeRender,antialias:e.antialias,backgroundColor:e.backgroundColor,contextCreation:i,roundPixels:e.roundPixels,maxTextures:e.maxTextures,maxTextureSize:e.maxTextureSize,batchSize:e.batchSize,maxLights:e.maxLights,mipmapFilter:e.mipmapFilter},this.game=t,this.type=o.WEBGL,this.pipelines=null,this.width=0,this.height=0,this.canvas=t.canvas,this.blendModes=[],this.contextLost=!1,this.snapshotState={x:0,y:0,width:1,height:1,getPixel:!1,callback:null,type:"image/png",encoder:.92,isFramebuffer:!1,bufferWidth:0,bufferHeight:0},this.maxTextures=0,this.textureIndexes,this.currentFramebuffer=null,this.fboStack=[],this.currentProgram=null,this.currentBlendMode=1/0,this.currentScissorEnabled=!1,this.currentScissor=null,this.scissorStack=[],this.contextLostHandler=c,this.contextRestoredHandler=c,this.gl=null,this.supportedExtensions=null,this.instancedArraysExtension=null,this.vaoExtension=null,this.extensions={},this.glFormats,this.compression,this.drawingBufferHeight=0,this.blankTexture=null,this.whiteTexture=null,this.maskCount=0,this.maskStack=[],this.currentMask={mask:null,camera:null},this.currentCameraMask={mask:null,camera:null},this.glFuncMap=null,this.currentType="",this.newType=!1,this.nextTypeMatch=!1,this.finalType=!1,this.mipmapFilter=null,this.defaultScissor=[0,0,0,0],this.isBooted=!1,this.renderTarget=null,this.projectionMatrix,this.projectionWidth=0,this.projectionHeight=0,this.maskSource=null,this.maskTarget=null,this.spector=null,this._debugCapture=!1,this.init(this.config)},init:function(t){var e,i=this.game,s=this.canvas,n=t.backgroundColor;if(!(e=i.config.context?i.config.context:s.getContext("webgl",t.contextCreation)||s.getContext("experimental-webgl",t.contextCreation))||e.isContextLost())throw this.contextLost=!0,new Error("WebGL unsupported");this.gl=e;var r=this;this.contextLostHandler=function(t){r.contextLost=!0,console&&console.warn("WebGL Context lost. Renderer disabled"),t.preventDefault()},s.addEventListener("webglcontextlost",this.contextLostHandler,!1),i.context=e;for(var a=0;a<=27;a++)this.blendModes.push({func:[e.ONE,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_ADD});this.blendModes[1].func=[e.ONE,e.DST_ALPHA],this.blendModes[2].func=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA],this.blendModes[3].func=[e.ONE,e.ONE_MINUS_SRC_COLOR],this.blendModes[17]={func:[e.ZERO,e.ONE_MINUS_SRC_ALPHA],equation:e.FUNC_REVERSE_SUBTRACT},this.glFormats=[e.BYTE,e.SHORT,e.UNSIGNED_BYTE,e.UNSIGNED_SHORT,e.FLOAT],this.glFuncMap={mat2:{func:e.uniformMatrix2fv,length:1,matrix:!0},mat3:{func:e.uniformMatrix3fv,length:1,matrix:!0},mat4:{func:e.uniformMatrix4fv,length:1,matrix:!0},"1f":{func:e.uniform1f,length:1},"1fv":{func:e.uniform1fv,length:1},"1i":{func:e.uniform1i,length:1},"1iv":{func:e.uniform1iv,length:1},"2f":{func:e.uniform2f,length:2},"2fv":{func:e.uniform2fv,length:1},"2i":{func:e.uniform2i,length:2},"2iv":{func:e.uniform2iv,length:1},"3f":{func:e.uniform3f,length:3},"3fv":{func:e.uniform3fv,length:1},"3i":{func:e.uniform3i,length:3},"3iv":{func:e.uniform3iv,length:1},"4f":{func:e.uniform4f,length:4},"4fv":{func:e.uniform4fv,length:1},"4i":{func:e.uniform4i,length:4},"4iv":{func:e.uniform4iv,length:1}};var h=e.getSupportedExtensions();t.maxTextures&&-1!==t.maxTextures||(t.maxTextures=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),t.maxTextureSize||(t.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE)),this.compression=this.getCompressedTextures(),this.supportedExtensions=h;var l="ANGLE_instanced_arrays";this.instancedArraysExtension=h.indexOf(l)>-1?e.getExtension(l):null;var c="OES_vertex_array_object";this.vaoExtension=h.indexOf(c)>-1?e.getExtension(c):null,e.disable(e.DEPTH_TEST),e.disable(e.CULL_FACE),e.enable(e.BLEND),e.clearColor(n.redGL,n.greenGL,n.blueGL,n.alphaGL),this.mipmapFilter=e[t.mipmapFilter],this.maxTextures=g.checkShaderMax(e,t.maxTextures),this.textureIndexes=[];for(var p=0;p0&&s>0;if(o&&a){var h=o[0],l=o[1],u=o[2],c=o[3];a=h!==t||l!==e||u!==i||c!==s}a&&(this.flush(),r.scissor(t,n-e-s,i,s))},resetScissor:function(){var t=this.gl;t.enable(t.SCISSOR_TEST);var e=this.currentScissor;if(e){var i=e[0],s=e[1],n=e[2],r=e[3];n>0&&r>0&&t.scissor(i,this.drawingBufferHeight-s-r,n,r)}},popScissor:function(){var t=this.scissorStack;t.pop();var e=t[t.length-1];e&&this.setScissor(e[0],e[1],e[2],e[3]),this.currentScissor=e},hasActiveStencilMask:function(){var t=this.currentMask.mask,e=this.currentCameraMask.mask;return t&&t.isStencil||e&&e.isStencil},resetViewport:function(){var t=this.gl;t.viewport(0,0,this.width,this.height),this.drawingBufferHeight=t.drawingBufferHeight},setBlendMode:function(t,e){void 0===e&&(e=!1);var i=this.gl,s=this.blendModes[t];return!!(e||t!==o.BlendModes.SKIP_CHECK&&this.currentBlendMode!==t)&&(this.flush(),i.enable(i.BLEND),i.blendEquation(s.equation),s.func.length>2?i.blendFuncSeparate(s.func[0],s.func[1],s.func[2],s.func[3]):i.blendFunc(s.func[0],s.func[1]),this.currentBlendMode=t,!0)},addBlendMode:function(t,e){return this.blendModes.push({func:t,equation:e})-1},updateBlendMode:function(t,e,i){return this.blendModes[t]&&(this.blendModes[t].func=e,i&&(this.blendModes[t].equation=i)),this},removeBlendMode:function(t){return t>17&&this.blendModes[t]&&this.blendModes.splice(t,1),this},pushFramebuffer:function(t,e,i){return t===this.currentFramebuffer?this:(this.fboStack.push(t),this.setFramebuffer(t,e,i))},setFramebuffer:function(t,e,i){if(void 0===e&&(e=!1),void 0===i&&(i=!0),t===this.currentFramebuffer)return this;var s=this.gl,n=this.width,r=this.height;return t&&t.renderTexture&&i?(n=t.renderTexture.width,r=t.renderTexture.height):this.flush(),s.bindFramebuffer(s.FRAMEBUFFER,t),i&&s.viewport(0,0,n,r),e&&(t?(this.drawingBufferHeight=r,this.pushScissor(0,0,n,r)):(this.drawingBufferHeight=this.height,this.popScissor())),this.currentFramebuffer=t,this},popFramebuffer:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!0);var i=this.fboStack;i.pop();var s=i[i.length-1];return s||(s=null),this.setFramebuffer(s,t,e),s},setProgram:function(t){return t!==this.currentProgram&&(this.flush(),this.gl.useProgram(t),this.currentProgram=t,!0)},resetProgram:function(){return this.gl.useProgram(this.currentProgram),this},createTextureFromSource:function(t,e,i,s,n){void 0===n&&(n=!1);var r=this.gl,a=r.NEAREST,h=r.NEAREST,u=r.CLAMP_TO_EDGE;e=t?t.width:e,i=t?t.height:i;var c=l(e,i);return c&&!n&&(u=r.REPEAT),s===o.ScaleModes.LINEAR&&this.config.antialias&&(a=c?this.mipmapFilter:r.LINEAR,h=r.LINEAR),t&&t.compressed&&(a=r.LINEAR,h=r.LINEAR),t||"number"!=typeof e||"number"!=typeof i?this.createTexture2D(0,a,h,u,u,r.RGBA,t):this.createTexture2D(0,a,h,u,u,r.RGBA,null,e,i)},createTexture2D:function(t,e,i,s,n,r,o,a,h,u,c,d){u=null==u||u,void 0===c&&(c=!1),void 0===d&&(d=!1);var p=this.gl,f=p.createTexture();p.activeTexture(p.TEXTURE0);var v=p.getParameter(p.TEXTURE_BINDING_2D);p.bindTexture(p.TEXTURE_2D,f),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,e),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,i),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,n),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,s),p.pixelStorei(p.UNPACK_PREMULTIPLY_ALPHA_WEBGL,u),d&&p.pixelStorei(p.UNPACK_FLIP_Y_WEBGL,!0);var g=!1;if(null==o)p.texImage2D(p.TEXTURE_2D,t,r,a,h,0,r,p.UNSIGNED_BYTE,null),g=l(a,h);else if(o.compressed){a=o.width,h=o.height,g=o.generateMipmap;for(var m=0;m0)&&this.pipelines.setMulti().drawFillRect(e,i,s,r,g.getTintFromFloats(o.blueGL,o.greenGL,o.redGL,1),o.alphaGL)},getCurrentStencilMask:function(){var t=null,e=this.maskStack,i=this.currentCameraMask;return e.length>0?t=e[e.length-1]:i.mask&&i.mask.isStencil&&(t=i),t},postRenderCamera:function(t){var e=t.flashEffect,i=t.fadeEffect;if(e.isRunning||i.isRunning||i.isComplete){var s=this.pipelines.setMulti();e.postRenderWebGL(s,g.getTintFromFloats),i.postRenderWebGL(s,g.getTintFromFloats)}t.dirty=!1,this.popScissor(),t.mask&&(this.currentCameraMask.mask=null,t.mask.postRenderWebGL(this,t._maskCamera)),this.pipelines.postBatchCamera(t),t.emit(n.POST_RENDER,t)},preRender:function(){if(!this.contextLost){var t=this.gl;if(t.bindFramebuffer(t.FRAMEBUFFER,null),this.config.clearBeforeRender){var e=this.config.backgroundColor;t.clearColor(e.redGL,e.greenGL,e.blueGL,e.alphaGL),t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT|t.STENCIL_BUFFER_BIT)}t.enable(t.SCISSOR_TEST),this.currentScissor=this.defaultScissor,this.scissorStack.length=0,this.scissorStack.push(this.currentScissor),this.game.scene.customViewports&&t.scissor(0,this.drawingBufferHeight-this.height,this.width,this.height),this.currentMask.mask=null,this.currentCameraMask.mask=null,this.maskStack.length=0,this.emit(h.PRE_RENDER)}},render:function(t,e,i){if(!this.contextLost){var s=e.length;if(this.emit(h.RENDER,t,i),this.preRenderCamera(i),0===s)return this.setBlendMode(o.BlendModes.NORMAL),void this.postRenderCamera(i);this.currentType="";for(var n=this.currentMask,r=0;r0&&r>0){s.activeTexture(s.TEXTURE0);var o=s.getParameter(s.TEXTURE_BINDING_2D);s.bindTexture(s.TEXTURE_2D,e),i&&s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,!0),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,t),e.width=n,e.height=r,o&&s.bindTexture(s.TEXTURE_2D,o)}return e},createVideoTexture:function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var s=this.gl,n=s.NEAREST,r=s.NEAREST,o=t.videoWidth,a=t.videoHeight,h=s.CLAMP_TO_EDGE,u=l(o,a);return!e&&u&&(h=s.REPEAT),this.config.antialias&&(n=u?this.mipmapFilter:s.LINEAR,r=s.LINEAR),this.createTexture2D(0,n,r,h,h,s.RGBA,t,o,a,!0,!0,i)},updateVideoTexture:function(t,e,i){void 0===i&&(i=!1);var s=this.gl,n=t.videoWidth,r=t.videoHeight;if(n>0&&r>0){s.activeTexture(s.TEXTURE0);var o=s.getParameter(s.TEXTURE_BINDING_2D);s.bindTexture(s.TEXTURE_2D,e),s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,i),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,t),e.width=n,e.height=r,o&&s.bindTexture(s.TEXTURE_2D,o)}return e},setTextureFilter:function(t,e){var i=this.gl,s=[i.LINEAR,i.NEAREST][e];i.activeTexture(i.TEXTURE0);var n=i.getParameter(i.TEXTURE_BINDING_2D);return i.bindTexture(i.TEXTURE_2D,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,s),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,s),n&&i.bindTexture(i.TEXTURE_2D,n),this},getMaxTextureSize:function(){return this.config.maxTextureSize},destroy:function(){this.canvas.removeEventListener("webglcontextlost",this.contextLostHandler,!1),this.maskTarget.destroy(),this.maskSource.destroy(),this.pipelines.destroy(),this.removeAllListeners(),this.fboStack=[],this.maskStack=[],this.extensions={},this.textureIndexes=[],this.gl=null,this.game=null,this.canvas=null,this.contextLost=!0,this.currentMask=null,this.currentCameraMask=null}});t.exports=x},71305:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(71402),o=new s({initialize:function(t,e,i,s,n){this.pipeline=t,this.name=e,this.renderer=t.renderer,this.gl=this.renderer.gl,this.fragSrc=s,this.vertSrc=i,this.program=this.renderer.createProgram(i,s),this.attributes,this.vertexComponentCount=0,this.vertexSize=0,this.uniforms={},this.createAttributes(n),this.createUniforms()},createAttributes:function(t){var e=0,i=0,s=[];this.vertexComponentCount=0;for(var o=0;o=0?(e.enableVertexAttribArray(p),e.vertexAttribPointer(p,a,h,d,i,l),o.enabled=!0,o.location=p):-1!==p&&e.disableVertexAttribArray(p)}else u?e.vertexAttribPointer(c,a,h,d,i,l):!u&&c>-1&&(e.disableVertexAttribArray(c),o.location=-1)}return this},createUniforms:function(){var t,e,i,s=this.gl,n=this.program,r=this.uniforms,o=s.getProgramParameter(n,s.ACTIVE_UNIFORMS);for(t=0;t0&&(e=e.substr(0,h),r.hasOwnProperty(e)||null!==(i=s.getUniformLocation(n,e))&&(r[e]={name:e,location:i,value1:null,value2:null,value3:null,value4:null}))}}return this},hasUniform:function(t){return this.uniforms.hasOwnProperty(t)},resetUniform:function(t){var e=this.uniforms[t];return e&&(e.value1=null,e.value2=null,e.value3=null,e.value4=null),this},setUniform1:function(t,e,i,s){var n=this.uniforms[e];return n?((s||n.value1!==i)&&(n.value1=i,this.renderer.setProgram(this.program),t.call(this.gl,n.location,i),this.pipeline.currentShader=this),this):this},setUniform2:function(t,e,i,s,n){var r=this.uniforms[e];return r?((n||r.value1!==i||r.value2!==s)&&(r.value1=i,r.value2=s,this.renderer.setProgram(this.program),t.call(this.gl,r.location,i,s),this.pipeline.currentShader=this),this):this},setUniform3:function(t,e,i,s,n,r){var o=this.uniforms[e];return o?((r||o.value1!==i||o.value2!==s||o.value3!==n)&&(o.value1=i,o.value2=s,o.value3=n,this.renderer.setProgram(this.program),t.call(this.gl,o.location,i,s,n),this.pipeline.currentShader=this),this):this},setUniform4:function(t,e,i,s,n,r,o){var a=this.uniforms[e];return a?((o||a.value1!==i||a.value2!==s||a.value3!==n||a.value4!==r)&&(a.value1=i,a.value2=s,a.value3=n,a.value4=r,this.renderer.setProgram(this.program),t.call(this.gl,a.location,i,s,n,r),this.pipeline.currentShader=this),this):this},setBoolean:function(t,e){return this.setUniform1(this.gl.uniform1i,t,Number(e))},set1f:function(t,e){return this.setUniform1(this.gl.uniform1f,t,e)},set2f:function(t,e,i){return this.setUniform2(this.gl.uniform2f,t,e,i)},set3f:function(t,e,i,s){return this.setUniform3(this.gl.uniform3f,t,e,i,s)},set4f:function(t,e,i,s,n){return this.setUniform4(this.gl.uniform4f,t,e,i,s,n)},set1fv:function(t,e){return this.setUniform1(this.gl.uniform1fv,t,e,!0)},set2fv:function(t,e){return this.setUniform1(this.gl.uniform2fv,t,e,!0)},set3fv:function(t,e){return this.setUniform1(this.gl.uniform3fv,t,e,!0)},set4fv:function(t,e){return this.setUniform1(this.gl.uniform4fv,t,e,!0)},set1iv:function(t,e){return this.setUniform1(this.gl.uniform1iv,t,e,!0)},set2iv:function(t,e){return this.setUniform1(this.gl.uniform2iv,t,e,!0)},set3iv:function(t,e){return this.setUniform1(this.gl.uniform3iv,t,e,!0)},set4iv:function(t,e){return this.setUniform1(this.gl.uniform4iv,t,e,!0)},set1i:function(t,e){return this.setUniform1(this.gl.uniform1i,t,e)},set2i:function(t,e,i){return this.setUniform2(this.gl.uniform2i,t,e,i)},set3i:function(t,e,i,s){return this.setUniform3(this.gl.uniform3i,t,e,i,s)},set4i:function(t,e,i,s,n){return this.setUniform4(this.gl.uniform4i,t,e,i,s,n)},setMatrix2fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix2fv,t,e,i,!0)},setMatrix3fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix3fv,t,e,i,!0)},setMatrix4fv:function(t,e,i){return this.setUniform2(this.gl.uniformMatrix4fv,t,e,i,!0)},createProgram:function(t,e){void 0===t&&(t=this.vertSrc),void 0===e&&(e=this.fragSrc);var i=this.gl;return this.program&&i.deleteProgram(this.program),this.vertSrc=t,this.fragSrc=e,this.program=this.renderer.createProgram(t,e),this.createUniforms(),this.rebind()},destroy:function(){this.gl.deleteProgram(this.program),this.pipeline=null,this.renderer=null,this.gl=null,this.program=null,this.attributes=null,this.uniforms=null}});t.exports=o},71402:t=>{t.exports={BYTE:{enum:5120,size:1},UNSIGNED_BYTE:{enum:5121,size:1},SHORT:{enum:5122,size:2},UNSIGNED_SHORT:{enum:5123,size:2},INT:{enum:5124,size:4},UNSIGNED_INT:{enum:5125,size:4},FLOAT:{enum:5126,size:4}}},55478:(t,e,i)=>{var s=i(71402),n=i(98611),r={PipelineManager:i(35217),Pipelines:i(62253),RenderTarget:i(37410),Utils:i(75512),WebGLPipeline:i(44775),WebGLRenderer:i(11857),WebGLShader:i(71305)};r=n(!1,r,s),t.exports=r},5583:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(91679),o=i(89053),a=i(71402),h=i(44775),l=new s({Extends:h,initialize:function(t){t.fragShader=n(t,"fragShader",r),t.vertShader=n(t,"vertShader",o),t.batchSize=n(t,"batchSize",1),t.vertices=n(t,"vertices",[-1,1,-1,-7,7,1]),t.attributes=n(t,"attributes",[{name:"inPosition",size:2,type:a.FLOAT}]),h.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0),this.set1i("uMaskSampler",1)},resize:function(t,e){h.prototype.resize.call(this,t,e),this.set2f("uResolution",t,e)},beginMask:function(t,e,i){this.renderer.beginBitmapMask(t,i)},endMask:function(t,e,i){var s=this.gl,n=this.renderer,r=t.bitmapMask;r&&s&&(n.drawBitmapMask(r,e,this),i&&this.set2f("uResolution",i.width,i.height),this.set1i("uInvertMaskAlpha",t.invertAlpha),s.drawArrays(this.topology,0,3),i&&this.set2f("uResolution",this.width,this.height),s.bindTexture(s.TEXTURE_2D,null))}});t.exports=l},66901:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(65045),o=i(77310),a=i(69360),h=i(93736),l=i(44775),u=new s({Extends:o,initialize:function(t){var e=n(t,"fragShader",r);t.fragShader=e.replace("%LIGHT_COUNT%",t.game.renderer.config.maxLights),o.call(this,t),this.inverseRotationMatrix=new Float32Array([1,0,0,0,1,0,0,0,1]),this.defaultNormalMap,this.currentNormalMap,this.lightsActive=!0,this.tempVec2=new h,this._tempMatrix=new a,this._tempMatrix2=new a},boot:function(){l.prototype.boot.call(this);var t=this.gl,e=t.createTexture();t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,e),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([127,127,255,255])),this.defaultNormalMap={glTexture:e}},onRender:function(t,e){var i=t.sys.lights;if(this.lightsActive=!1,i&&i.active){var s,n=i.getLights(e),r=n.length;this.lightsActive=!0;var o=this.renderer.height,a=e.matrix,h=this.tempVec2;for(this.set1i("uMainSampler",0),this.set1i("uNormSampler",1),this.set2f("uResolution",this.width/2,this.height/2),this.set4f("uCamera",e.x,e.y,e.rotation,e.zoom),this.set3f("uAmbientLightColor",i.ambientColor.r,i.ambientColor.g,i.ambientColor.b),this.set1i("uLightCount",r),s=0;s0&&this.flush();var e=this.inverseRotationMatrix;if(t){var i=-t,s=Math.cos(i),n=Math.sin(i);e[1]=n,e[3]=-n,e[0]=e[4]=s}else e[0]=e[4]=1,e[1]=e[3]=0;this.setMatrix3fv("uInverseRotationMatrix",!1,e),this.currentNormalMapRotation=t}},setTexture2D:function(t,e){var i=this.renderer;void 0===t&&(t=i.whiteTexture);var s=this.getNormalMap(e);this.isNewNormalMap(t,s)&&(this.flush(),this.createBatch(t),this.addTextureToBatch(s),this.currentNormalMap=s);var n=0;e&&e.parentContainer?n=e.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2).rotationNormalized:e&&(n=e.rotation);return this.setNormalMapRotation(n),0},setGameObject:function(t,e){void 0===e&&(e=t.frame);var i=e.glTexture,s=this.getNormalMap(t);if(this.isNewNormalMap(i,s)&&(this.flush(),this.createBatch(i),this.addTextureToBatch(s),this.currentNormalMap=s),t.parentContainer){var n=t.getWorldTransformMatrix(this._tempMatrix,this._tempMatrix2);this.setNormalMapRotation(n.rotationNormalized)}else this.setNormalMapRotation(t.rotation);return 0},isNewNormalMap:function(t,e){return this.currentTexture!==t||this.currentNormalMap!==e},getNormalMap:function(t){var e;return t?t.displayTexture?e=t.displayTexture.dataSource[t.displayFrame.sourceIndex]:t.texture?e=t.texture.dataSource[t.frame.sourceIndex]:t.tileset&&(e=Array.isArray(t.tileset)?t.tileset[0].image.dataSource[0]:t.tileset.image.dataSource[0]):e=this.defaultNormalMap,e||(e=this.defaultNormalMap),e.glTexture},batchSprite:function(t,e,i){this.lightsActive&&o.prototype.batchSprite.call(this,t,e,i)},batchTexture:function(t,e,i,s,n,r,a,h,l,u,c,d,p,f,v,g,m,y,x,T,w,b,E,S,A,C,_,M,R,P,O,L){this.lightsActive&&o.prototype.batchTexture.call(this,t,e,i,s,n,r,a,h,l,u,c,d,p,f,v,g,m,y,x,T,w,b,E,S,A,C,_,M,R,P,O,L)},batchTextureFrame:function(t,e,i,s,n,r,a){this.lightsActive&&o.prototype.batchTextureFrame.call(this,t,e,i,s,n,r,a)}});t.exports=u},71264:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(77310),o=i(85060),a=i(18166),h=i(71402),l=i(44775),u=new s({Extends:r,initialize:function(t){t.fragShader=n(t,"fragShader",o),t.vertShader=n(t,"vertShader",a),t.attributes=n(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:h.UNSIGNED_BYTE,normalized:!0}]),t.forceZero=!0,r.call(this,t)},boot:function(){l.prototype.boot.call(this),this.set1i("uMainSampler",0)}});t.exports=u},77310:(t,e,i)=>{var s=i(56694),n=i(11117),r=i(72632),o=i(53787),a=i(15968),h=i(69360),l=i(75512),u=i(71402),c=i(44775),d=new s({Extends:c,initialize:function(t){var e=t.game.renderer,i=r(t,"fragShader",o);t.fragShader=l.parseFragmentShaderMaxTextures(i,e.maxTextures),t.vertShader=r(t,"vertShader",a),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2},{name:"inTexId"},{name:"inTintEffect"},{name:"inTint",size:4,type:u.UNSIGNED_BYTE,normalized:!0}]),c.call(this,t),this._tempMatrix1=new h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.calcMatrix=new h,this.tempTriangle=[{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0},{x:0,y:0,width:0}],this.strokeTint={TL:0,TR:0,BL:0,BR:0},this.fillTint={TL:0,TR:0,BL:0,BR:0},this.currentFrame={u0:0,v0:0,u1:1,v1:1},this.firstQuad=[0,0,0,0,0],this.prevQuad=[0,0,0,0,0],this.polygonCache=[]},boot:function(){c.prototype.boot.call(this),this.currentShader.set1iv("uMainSampler",this.renderer.textureIndexes)},batchSprite:function(t,e,i){this.manager.set(this,t);var s=this._tempMatrix1,n=this._tempMatrix2,r=this._tempMatrix3,o=t.frame,a=o.glTexture,h=o.u0,u=o.v0,c=o.u1,d=o.v1,p=o.x,f=o.y,v=o.cutWidth,g=o.cutHeight,m=o.customPivot,y=t.displayOriginX,x=t.displayOriginY,T=-y+p,w=-x+f;if(t.isCropped){var b=t._crop;b.flipX===t.flipX&&b.flipY===t.flipY||o.updateCropUVs(b,t.flipX,t.flipY),h=b.u0,u=b.v0,c=b.u1,d=b.v1,v=b.width,g=b.height,T=-y+(p=b.x),w=-x+(f=b.y)}var E=1,S=1;t.flipX&&(m||(T+=-o.realWidth+2*y),E=-1),(t.flipY||o.source.isGLTexture&&!a.flipY)&&(m||(w+=-o.realHeight+2*x),S=-1);var A=t.x,C=t.y;e.roundPixels&&(A=Math.floor(A),C=Math.floor(C)),n.applyITRS(A,C,t.rotation,t.scaleX*E,t.scaleY*S),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),n.e=A,n.f=C):(n.e-=e.scrollX*t.scrollFactorX,n.f-=e.scrollY*t.scrollFactorY),s.multiply(n,r);var _=r.setQuad(T,w,T+v,w+g,!1),M=l.getTintAppendFloatAlpha,R=e.alpha,P=M(t.tintTopLeft,R*t._alphaTL),O=M(t.tintTopRight,R*t._alphaTR),L=M(t.tintBottomLeft,R*t._alphaBL),F=M(t.tintBottomRight,R*t._alphaBR);this.shouldFlush(6)&&this.flush();var D=this.setGameObject(t,o);this.manager.preBatch(t),this.batchQuad(t,_[0],_[1],_[2],_[3],_[4],_[5],_[6],_[7],h,u,c,d,P,O,L,F,t.tintFill,a,D),this.manager.postBatch(t)},batchTexture:function(t,e,i,s,n,r,o,a,h,l,u,c,d,p,f,v,g,m,y,x,T,w,b,E,S,A,C,_,M,R,P,O){this.manager.set(this,t);var L=this._tempMatrix1,F=this._tempMatrix2,D=this._tempMatrix3,k=m/i+C,I=y/s+_,B=(m+x)/i+C,N=(y+T)/s+_,Y=o,U=a,X=-v,z=-g;if(t.isCropped){var G=t._crop,V=G.width,W=G.height;Y=V,U=W,o=V,a=W;var H=m=G.x,j=y=G.y;c&&(H=x-G.x-V),d&&(j=T-G.y-W),k=H/i+C,I=j/s+_,B=(H+V)/i+C,N=(j+W)/s+_,X=-v+m,z=-g+y}c&&(Y*=-1,X+=o),(d^=!P&&e.isRenderTexture?1:0)&&(U*=-1,z+=a),M.roundPixels&&(n=Math.floor(n),r=Math.floor(r)),F.applyITRS(n,r,u,h,l),L.copyFrom(M.matrix),R?(L.multiplyWithOffset(R,-M.scrollX*p,-M.scrollY*f),F.e=n,F.f=r):(F.e-=M.scrollX*p,F.f-=M.scrollY*f),L.multiply(F,D);var K=D.setQuad(X,z,X+Y,z+U,!1);void 0===O&&(O=this.setTexture2D(e)),t&&this.manager.preBatch(t),this.batchQuad(t,K[0],K[1],K[2],K[3],K[4],K[5],K[6],K[7],k,I,B,N,w,b,E,S,A,e,O),t&&this.manager.postBatch(t)},batchTextureFrame:function(t,e,i,s,n,r,o){this.manager.set(this);var a=this._tempMatrix1.copyFrom(r),h=this._tempMatrix2;o?a.multiply(o,h):h=a;var u=h.setQuad(e,i,e+t.width,i+t.height,!1),c=this.setTexture2D(t.source.glTexture);s=l.getTintAppendFloatAlpha(s,n),this.batchQuad(null,u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],t.u0,t.v0,t.u1,t.v1,s,s,s,s,0,t.glTexture,c)},batchFillRect:function(t,e,i,s,n,r){this.renderer.pipelines.set(this);var o=this.calcMatrix;r&&r.multiply(n,o);var a=o.setQuad(t,e,t+i,e+s,!1),h=this.fillTint;this.batchQuad(null,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],0,0,1,1,h.TL,h.TR,h.BL,h.BR,2)},batchFillTriangle:function(t,e,i,s,n,r,o,a){this.renderer.pipelines.set(this);var h=this.calcMatrix;a&&a.multiply(o,h);var l=h.getX(t,e),u=h.getY(t,e),c=h.getX(i,s),d=h.getY(i,s),p=h.getX(n,r),f=h.getY(n,r),v=this.fillTint;this.batchTri(null,l,u,c,d,p,f,0,0,1,1,v.TL,v.TR,v.BL,2)},batchStrokeTriangle:function(t,e,i,s,n,r,o,a,h){var l=this.tempTriangle;l[0].x=t,l[0].y=e,l[0].width=o,l[1].x=i,l[1].y=s,l[1].width=o,l[2].x=n,l[2].y=r,l[2].width=o,l[3].x=t,l[3].y=e,l[3].width=o,this.batchStrokePath(l,o,!1,a,h)},batchFillPath:function(t,e,i){this.renderer.pipelines.set(this);var s=this.calcMatrix;i&&i.multiply(e,s);for(var r,o,a=t.length,h=this.polygonCache,l=this.fillTint.TL,u=this.fillTint.TR,c=this.fillTint.BL,d=0;d0&&U[4]?this.batchQuad(null,F,D,R,P,U[0],U[1],U[2],U[3],0,0,1,1,I,B,N,Y,2):(X[0]=F,X[1]=D,X[2]=R,X[3]=P,X[4]=1),h&&X[4]?this.batchQuad(null,_,M,O,L,X[0],X[1],X[2],X[3],0,0,1,1,I,B,N,Y,2):(U[0]=_,U[1]=M,U[2]=O,U[3]=L,U[4]=1)}}},destroy:function(){return this._tempMatrix1.destroy(),this._tempMatrix2.destroy(),this._tempMatrix3.destroy(),this._tempMatrix1=null,this._tempMatrix1=null,this._tempMatrix1=null,c.prototype.destroy.call(this),this}});t.exports=d},10919:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(83327),o=i(54677),a=i(44775),h=new s({Extends:a,initialize:function(t){t.vertShader=n(t,"vertShader",o),t.fragShader=n(t,"fragShader",r),t.attributes=n(t,"attributes",[{name:"inPosition",size:2},{name:"inLightPosition",size:2},{name:"inLightRadius"},{name:"inLightAttenuation"},{name:"inLightColor",size:4}]),a.call(this,t)},onRender:function(t,e){this.set2f("uResolution",this.width,this.height),this.set1f("uCameraZoom",e.zoom)},batchPointLight:function(t,e,i,s,n,r,o,a,h,l,u,c){var d=t.color,p=t.intensity,f=t.radius,v=t.attenuation,g=d.r*p,m=d.g*p,y=d.b*p,x=e.alpha*t.alpha;this.shouldFlush(6)&&this.flush(),this.currentBatch||this.setTexture2D(),this.batchLightVert(i,s,u,c,f,v,g,m,y,x),this.batchLightVert(n,r,u,c,f,v,g,m,y,x),this.batchLightVert(o,a,u,c,f,v,g,m,y,x),this.batchLightVert(i,s,u,c,f,v,g,m,y,x),this.batchLightVert(o,a,u,c,f,v,g,m,y,x),this.batchLightVert(h,l,u,c,f,v,g,m,y,x),this.currentBatch.count=this.vertexCount-this.currentBatch.start},batchLightVert:function(t,e,i,s,n,r,o,a,h,l){var u=this.vertexViewF32,c=this.vertexCount*this.currentShader.vertexComponentCount-1;u[++c]=t,u[++c]=e,u[++c]=i,u[++c]=s,u[++c]=n,u[++c]=r,u[++c]=o,u[++c]=a,u[++c]=h,u[++c]=l,this.vertexCount++}});t.exports=h},80486:(t,e,i)=>{var s=i(56694),n=i(65246),r=i(72632),o=i(12569),a=i(99365),h=i(44775),l=new s({Extends:h,initialize:function(t){t.renderTarget=r(t,"renderTarget",1),t.fragShader=r(t,"fragShader",o),t.vertShader=r(t,"vertShader",a),t.attributes=r(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.batchSize=1,t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],h.call(this,t),this.isPostFX=!0,this.gameObject,this.colorMatrix=new n,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){h.prototype.boot.call(this);var t=this.manager.UTILITY_PIPELINE;this.fullFrame1=t.fullFrame1,this.fullFrame2=t.fullFrame2,this.halfFrame1=t.halfFrame1,this.halfFrame2=t.halfFrame2,this.set1i("uMainSampler",0)},onDraw:function(t){this.bindAndDraw(t)},copyFrame:function(t,e,i,s,n){this.manager.copyFrame(t,e,i,s,n)},copyToGame:function(t){this.manager.copyToGame(t)},drawFrame:function(t,e,i){this.manager.drawFrame(t,e,i,this.colorMatrix)},blendFrames:function(t,e,i,s,n){this.manager.blendFrames(t,e,i,s,n)},blendFramesAdditive:function(t,e,i,s,n){this.manager.blendFramesAdditive(t,e,i,s,n)},clearFrame:function(t,e){this.manager.clearFrame(t,e)},blitFrame:function(t,e,i,s,n,r){this.manager.blitFrame(t,e,i,s,n,r)},copyFrameRect:function(t,e,i,s,n,r,o,a){this.manager.copyFrameRect(t,e,i,s,n,r,o,a)},bindAndDraw:function(t,e,i,s,n){void 0===i&&(i=!0),void 0===s&&(s=!0);var r=this.gl,o=this.renderer;this.bind(n),this.set1i("uMainSampler",0),e?(r.viewport(0,0,e.width,e.height),r.bindFramebuffer(r.FRAMEBUFFER,e.framebuffer),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.texture,0),i&&(s?r.clearColor(0,0,0,0):r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT))):(o.popFramebuffer(!1,!1,!1),o.currentFramebuffer||r.viewport(0,0,o.width,o.height)),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,t.texture),r.bufferData(r.ARRAY_BUFFER,this.vertexData,r.STATIC_DRAW),r.drawArrays(r.TRIANGLES,0,6),e&&(r.bindTexture(r.TEXTURE_2D,null),r.bindFramebuffer(r.FRAMEBUFFER,null))}});t.exports=l},21213:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(77310),o=new s({Extends:r,initialize:function(t){t.topology=5,t.batchSize=n(t,"batchSize",256),r.call(this,t)}});t.exports=o},51212:(t,e,i)=>{var s=i(56694),n=i(72632),r=i(77310),o=i(85060),a=i(18166),h=i(44775),l=new s({Extends:r,initialize:function(t){t.fragShader=n(t,"fragShader",o),t.vertShader=n(t,"vertShader",a),t.forceZero=!0,r.call(this,t)},boot:function(){h.prototype.boot.call(this),this.set1i("uMainSampler",0)}});t.exports=l},38964:(t,e,i)=>{var s=i(95723),n=i(79993),r=i(56694),o=i(72632),a=i(77310),h=i(12569),l=i(74118),u=i(37410),c=i(85060),d=i(18166),p=i(44775),f=new r({Extends:a,initialize:function(t){var e=o(t,"fragShader",h),i=o(t,"vertShader",d),s=o(t,"drawShader",h),n=[{name:"DrawSprite",fragShader:c,vertShader:d},{name:"CopySprite",fragShader:e,vertShader:i},{name:"DrawGame",fragShader:s,vertShader:d}],r=o(t,"shaders",[]);t.shaders=n.concat(r),t.vertShader||(t.vertShader=i),t.batchSize=1,a.call(this,t),this.isSpriteFX=!0,this.customMainSampler=null,this.drawSpriteShader,this.copyShader,this.gameShader,this.quadVertexData,this.quadVertexBuffer,this.quadVertexViewF32,this.spriteBounds=new l,this.targetBounds=new l,this.fsTarget,this.tempSprite,this.renderer.isBooted&&(this.manager=this.renderer.pipelines,this.boot())},boot:function(){p.prototype.boot.call(this);var t=this.shaders,e=this.renderer;this.drawSpriteShader=t[0],this.copyShader=t[1],this.gameShader=t[2],this.fsTarget=new u(e,e.width,e.height,1,0,!0,!0),this.renderTargets=this.manager.renderTargets.concat(this.fsTarget);var i=new ArrayBuffer(168);this.quadVertexData=i,this.quadVertexViewF32=new Float32Array(i),this.quadVertexBuffer=e.createVertexBuffer(i,this.gl.STATIC_DRAW),this.onResize(e.width,e.height),this.currentShader=this.copyShader},onResize:function(t,e){var i=this.quadVertexViewF32;i[1]=e,i[22]=e,i[14]=t,i[28]=t,i[35]=t,i[36]=e},batchQuad:function(t,e,i,s,r,o,a,h,l,u,c,d,p,f,v,g,m,y,x){var T=Math.min(e,s,o,h),w=Math.min(i,r,a,l),b=Math.max(e,s,o,h)-T,E=Math.max(i,r,a,l)-w,S=this.spriteBounds.setTo(T,w,b,E),A=t?t.fxPadding:0,C=b+2*A,_=E+2*A,M=Math.abs(Math.max(C,_)),R=this.manager.getRenderTarget(M),P=this.targetBounds.setTo(0,0,R.width,R.height);n(P,S.centerX,S.centerY),this.tempSprite=t;var O=this.gl,L=this.renderer;this.setShader(this.drawSpriteShader),this.set1i("uMainSampler",0),this.flipProjectionMatrix(!0),t&&(this.onDrawSprite(t,R),t.onFX(this));var F=this.fsTarget;return this.flush(),O.viewport(0,0,L.width,L.height),O.bindFramebuffer(O.FRAMEBUFFER,F.framebuffer),O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,F.texture,0),O.clearColor(0,0,0,0),O.clear(O.COLOR_BUFFER_BIT),this.setTexture2D(x),this.batchVert(e,i,u,c,0,y,f),this.batchVert(s,r,u,p,0,y,g),this.batchVert(o,a,d,p,0,y,m),this.batchVert(e,i,u,c,0,y,f),this.batchVert(o,a,d,p,0,y,m),this.batchVert(h,l,d,c,0,y,v),this.flush(),this.flipProjectionMatrix(!1),O.activeTexture(O.TEXTURE0),O.bindTexture(O.TEXTURE_2D,R.texture),O.copyTexSubImage2D(O.TEXTURE_2D,0,0,0,P.x,P.y,P.width,P.height),O.bindFramebuffer(O.FRAMEBUFFER,null),O.bindTexture(O.TEXTURE_2D,null),this.onBatch(t),this.currentShader=this.copyShader,this.onDraw(R,this.manager.getSwapRenderTarget(),this.manager.getAltSwapRenderTarget()),!0},onDrawSprite:function(){},onCopySprite:function(){},copySprite:function(t,e,i,n,r,o){void 0===i&&(i=!0),void 0===n&&(n=!0),void 0===r&&(r=!1),void 0===o&&(o=this.copyShader);var a=this.gl,h=this.tempSprite;this.currentShader=o;var l=this.setVertexBuffer(this.quadVertexBuffer);if(o.bind(l,!1),this.set1i("uMainSampler",0),h.onFXCopy(this),this.onCopySprite(t,e,h),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,t.texture),t.height>e.height)a.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e);else{var u=e.height-t.height;a.viewport(0,u,t.width,t.height),this.resetUVs()}if(a.bindFramebuffer(a.FRAMEBUFFER,e.framebuffer),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,e.texture,0),i&&(a.clearColor(0,0,0,Number(!n)),a.clear(a.COLOR_BUFFER_BIT)),r){var c=this.renderer.currentBlendMode;this.renderer.setBlendMode(s.ERASE)}a.bufferData(a.ARRAY_BUFFER,this.quadVertexData,a.STATIC_DRAW),a.drawArrays(a.TRIANGLES,0,6),r&&this.renderer.setBlendMode(c),a.bindFramebuffer(a.FRAMEBUFFER,null)},blendFrames:function(t,e,i,s,n){this.manager.blendFrames(t,e,i,s,n)},blendFramesAdditive:function(t,e,i,s,n){this.manager.blendFramesAdditive(t,e,i,s,n)},drawToGame:function(t){this.currentShader=null,this.setShader(this.copyShader),this.bindAndDraw(t)},copyToGame:function(t){this.currentShader=null,this.setShader(this.gameShader),this.bindAndDraw(t)},bindAndDraw:function(t){var e=this.gl,i=this.renderer;this.set1i("uMainSampler",0),i.popFramebuffer(!1,!1,!1),i.currentFramebuffer||e.viewport(0,0,i.width,i.height),this.customMainSampler?this.setTexture2D(this.customMainSampler):this.setTexture2D(t.texture);var s=this._tempMatrix1.loadIdentity(),n=this.targetBounds.x,r=this.targetBounds.y,o=n+t.width,a=r+t.height,h=s.getX(n,r),l=s.getX(n,a),u=s.getX(o,a),c=s.getX(o,r),d=s.getY(n,r),p=s.getY(n,a),f=s.getY(o,a),v=s.getY(o,r);this.batchVert(h,d,0,0,0,0,16777215),this.batchVert(l,p,0,1,0,0,16777215),this.batchVert(u,f,1,1,0,0,16777215),this.batchVert(h,d,0,0,0,0,16777215),this.batchVert(u,f,1,1,0,0,16777215),this.batchVert(c,v,1,0,0,0,16777215),this.flush(),this.tempSprite=null},onDraw:function(t){this.drawToGame(t)},setUVs:function(t,e,i,s,n,r,o,a){var h=this.quadVertexViewF32;h[2]=t,h[3]=e,h[9]=i,h[10]=s,h[16]=n,h[17]=r,h[23]=t,h[24]=e,h[30]=n,h[31]=r,h[37]=o,h[38]=a},setTargetUVs:function(t,e){var i=e.height/t.height;i=i>.5?.5-(i-.5):.5-i+.5,this.setUVs(0,i,0,1+i,1,1+i,1,i)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)},destroy:function(){return this.gl.deleteBuffer(this.quadVertexBuffer),this.drawSpriteShader=null,this.copyShader=null,this.gameShader=null,this.quadVertexData=null,this.quadVertexBuffer=null,this.quadVertexViewF32=null,this.fsTarget=null,this.tempSprite=null,a.prototype.destroy.call(this),this}});t.exports=f},60848:(t,e,i)=>{var s=i(2529),n=i(95723),r=i(56694),o=i(65246),a=i(37486),h=i(79060),l=i(72632),u=i(98921),c=i(99365),d=i(44775),p=new r({Extends:d,initialize:function(t){t.renderTarget=l(t,"renderTarget",[{scale:1},{scale:1},{scale:.5},{scale:.5}]),t.vertShader=l(t,"vertShader",c),t.shaders=l(t,"shaders",[{name:"Copy",fragShader:h},{name:"AddBlend",fragShader:s},{name:"LinearBlend",fragShader:u},{name:"ColorMatrix",fragShader:a}]),t.attributes=l(t,"attributes",[{name:"inPosition",size:2},{name:"inTexCoord",size:2}]),t.vertices=[-1,-1,0,0,-1,1,0,1,1,1,1,1,-1,-1,0,0,1,1,1,1,1,-1,1,0],t.batchSize=1,d.call(this,t),this.colorMatrix=new o,this.copyShader,this.addShader,this.linearShader,this.colorMatrixShader,this.fullFrame1,this.fullFrame2,this.halfFrame1,this.halfFrame2},boot:function(){d.prototype.boot.call(this);var t=this.shaders,e=this.renderTargets;this.copyShader=t[0],this.addShader=t[1],this.linearShader=t[2],this.colorMatrixShader=t[3],this.fullFrame1=e[0],this.fullFrame2=e[1],this.halfFrame1=e[2],this.halfFrame2=e[3]},copyFrame:function(t,e,i,s,n){void 0===i&&(i=1),void 0===s&&(s=!0),void 0===n&&(n=!0);var r=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,t.texture),e?(r.viewport(0,0,e.width,e.height),r.bindFramebuffer(r.FRAMEBUFFER,e.framebuffer),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e.texture,0)):r.viewport(0,0,t.width,t.height),s&&(n?r.clearColor(0,0,0,0):r.clearColor(0,0,0,1),r.clear(r.COLOR_BUFFER_BIT)),r.bufferData(r.ARRAY_BUFFER,this.vertexData,r.STATIC_DRAW),r.drawArrays(r.TRIANGLES,0,6),r.bindFramebuffer(r.FRAMEBUFFER,null),r.bindTexture(r.TEXTURE_2D,null)},blitFrame:function(t,e,i,s,r,o,a){void 0===i&&(i=1),void 0===s&&(s=!0),void 0===r&&(r=!0),void 0===o&&(o=!1),void 0===a&&(a=!1);var h=this.gl;if(this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",i),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,t.texture),t.height>e.height)h.viewport(0,0,t.width,t.height),this.setTargetUVs(t,e);else{var l=e.height-t.height;h.viewport(0,l,t.width,t.height)}if(h.bindFramebuffer(h.FRAMEBUFFER,e.framebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,e.texture,0),s&&(r?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),o){var u=this.renderer.currentBlendMode;this.renderer.setBlendMode(n.ERASE)}a&&this.flipY(),h.bufferData(h.ARRAY_BUFFER,this.vertexData,h.STATIC_DRAW),h.drawArrays(h.TRIANGLES,0,6),o&&this.renderer.setBlendMode(u),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null),this.resetUVs()},copyFrameRect:function(t,e,i,s,n,r,o,a){void 0===o&&(o=!0),void 0===a&&(a=!0);var h=this.gl;h.bindFramebuffer(h.FRAMEBUFFER,t.framebuffer),h.framebufferTexture2D(h.FRAMEBUFFER,h.COLOR_ATTACHMENT0,h.TEXTURE_2D,t.texture,0),o&&(a?h.clearColor(0,0,0,0):h.clearColor(0,0,0,1),h.clear(h.COLOR_BUFFER_BIT)),h.activeTexture(h.TEXTURE0),h.bindTexture(h.TEXTURE_2D,e.texture),h.copyTexSubImage2D(h.TEXTURE_2D,0,0,0,i,s,n,r),h.bindFramebuffer(h.FRAMEBUFFER,null),h.bindTexture(h.TEXTURE_2D,null)},copyToGame:function(t){var e=this.gl;this.setShader(this.copyShader),this.set1i("uMainSampler",0),this.set1f("uBrightness",1),this.renderer.popFramebuffer(),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,t.texture),e.bufferData(e.ARRAY_BUFFER,this.vertexData,e.STATIC_DRAW),e.drawArrays(e.TRIANGLES,0,6)},drawFrame:function(t,e,i,s){void 0===i&&(i=!0),void 0===s&&(s=this.colorMatrix);var n=this.gl;this.setShader(this.colorMatrixShader),this.set1i("uMainSampler",0),this.set1fv("uColorMatrix",s.getData()),this.set1f("uAlpha",s.alpha),n.activeTexture(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,t.texture),e?(n.viewport(0,0,e.width,e.height),n.bindFramebuffer(n.FRAMEBUFFER,e.framebuffer),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e.texture,0)):n.viewport(0,0,t.width,t.height),i?n.clearColor(0,0,0,0):n.clearColor(0,0,0,1),n.clear(n.COLOR_BUFFER_BIT),n.bufferData(n.ARRAY_BUFFER,this.vertexData,n.STATIC_DRAW),n.drawArrays(n.TRIANGLES,0,6),n.bindFramebuffer(n.FRAMEBUFFER,null),n.bindTexture(n.TEXTURE_2D,null)},blendFrames:function(t,e,i,s,n,r){void 0===s&&(s=1),void 0===n&&(n=!0),void 0===r&&(r=this.linearShader);var o=this.gl;this.setShader(r),this.set1i("uMainSampler1",0),this.set1i("uMainSampler2",1),this.set1f("uStrength",s),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,t.texture),o.activeTexture(o.TEXTURE1),o.bindTexture(o.TEXTURE_2D,e.texture),i?(o.bindFramebuffer(o.FRAMEBUFFER,i.framebuffer),o.framebufferTexture2D(o.FRAMEBUFFER,o.COLOR_ATTACHMENT0,o.TEXTURE_2D,i.texture,0),o.viewport(0,0,i.width,i.height)):o.viewport(0,0,t.width,t.height),n?o.clearColor(0,0,0,0):o.clearColor(0,0,0,1),o.clear(o.COLOR_BUFFER_BIT),o.bufferData(o.ARRAY_BUFFER,this.vertexData,o.STATIC_DRAW),o.drawArrays(o.TRIANGLES,0,6),o.bindFramebuffer(o.FRAMEBUFFER,null),o.bindTexture(o.TEXTURE_2D,null)},blendFramesAdditive:function(t,e,i,s,n){this.blendFrames(t,e,i,s,n,this.addShader)},clearFrame:function(t,e){void 0===e&&(e=!0);var i=this.gl;i.viewport(0,0,t.width,t.height),i.bindFramebuffer(i.FRAMEBUFFER,t.framebuffer),e?i.clearColor(0,0,0,0):i.clearColor(0,0,0,1),i.clear(i.COLOR_BUFFER_BIT);var s=this.renderer.currentFramebuffer;i.bindFramebuffer(i.FRAMEBUFFER,s)},setUVs:function(t,e,i,s,n,r,o,a){var h=this.vertexViewF32;h[2]=t,h[3]=e,h[6]=i,h[7]=s,h[10]=n,h[11]=r,h[14]=t,h[15]=e,h[18]=n,h[19]=r,h[22]=o,h[23]=a},setTargetUVs:function(t,e){var i=e.height/t.height;i=i>.5?.5-(i-.5):.5-i+.5,this.setUVs(0,i,0,1+i,1,1+i,1,i)},flipX:function(){this.setUVs(1,0,1,1,0,1,0,0)},flipY:function(){this.setUVs(0,1,0,0,1,0,1,1)},resetUVs:function(){this.setUVs(0,0,0,1,1,1,1,0)}});t.exports=p},65641:t=>{t.exports={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",POINTLIGHT_PIPELINE:"PointLightPipeline",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline",GRAPHICS_PIPELINE:"GraphicsPipeline",POSTFX_PIPELINE:"PostFXPipeline",UTILITY_PIPELINE:"UtilityPipeline",MOBILE_PIPELINE:"MobilePipeline"}},68726:t=>{t.exports="pipelineafterflush"},67186:t=>{t.exports="pipelinebeforeflush"},22709:t=>{t.exports="pipelinebind"},74469:t=>{t.exports="pipelineboot"},93953:t=>{t.exports="pipelinedestroy"},51687:t=>{t.exports="pipelinerebind"},25034:t=>{t.exports="pipelineresize"},18970:(t,e,i)=>{t.exports={AFTER_FLUSH:i(68726),BEFORE_FLUSH:i(67186),BIND:i(22709),BOOT:i(74469),DESTROY:i(93953),REBIND:i(51687),RESIZE:i(25034)}},62253:(t,e,i)=>{var s=i(65641),n=i(98611),r={BitmapMaskPipeline:i(5583),Events:i(18970),LightPipeline:i(66901),MobilePipeline:i(71264),MultiPipeline:i(77310),PointLightPipeline:i(10919),PostFXPipeline:i(80486),RopePipeline:i(21213),SinglePipeline:i(51212),SpriteFXPipeline:i(38964),UtilityPipeline:i(60848)};r=n(!1,r,s),t.exports=r},2529:t=>{t.exports=["#define SHADER_NAME PHASER_ADD_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = frame1 + frame2 * uStrength;","}",""].join("\n")},91679:t=>{t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uMaskSampler;","uniform bool uInvertMaskAlpha;","","void main ()","{"," vec2 uv = gl_FragCoord.xy / uResolution;",""," vec4 mainColor = texture2D(uMainSampler, uv);"," vec4 maskColor = texture2D(uMaskSampler, uv);",""," if (!uInvertMaskAlpha)"," {"," mainColor *= maskColor.a;"," }"," else"," {"," mainColor *= (1.0 - maskColor.a);"," }",""," gl_FragColor = mainColor;","}",""].join("\n")},89053:t=>{t.exports=["#define SHADER_NAME PHASER_BITMAP_MASK_VS","","precision mediump float;","","attribute vec2 inPosition;","","void main ()","{"," gl_Position = vec4(inPosition, 0.0, 1.0);","}",""].join("\n")},37486:t=>{t.exports=["#define SHADER_NAME PHASER_COLORMATRIX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uColorMatrix[20];","uniform float uAlpha;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 c = texture2D(uMainSampler, outTexCoord);",""," if (uAlpha == 0.0)"," {"," gl_FragColor = c;",""," return;"," }",""," if (c.a > 0.0)"," {"," c.rgb /= c.a;"," }",""," vec4 result;",""," result.r = (uColorMatrix[0] * c.r) + (uColorMatrix[1] * c.g) + (uColorMatrix[2] * c.b) + (uColorMatrix[3] * c.a) + uColorMatrix[4];"," result.g = (uColorMatrix[5] * c.r) + (uColorMatrix[6] * c.g) + (uColorMatrix[7] * c.b) + (uColorMatrix[8] * c.a) + uColorMatrix[9];"," result.b = (uColorMatrix[10] * c.r) + (uColorMatrix[11] * c.g) + (uColorMatrix[12] * c.b) + (uColorMatrix[13] * c.a) + uColorMatrix[14];"," result.a = (uColorMatrix[15] * c.r) + (uColorMatrix[16] * c.g) + (uColorMatrix[17] * c.b) + (uColorMatrix[18] * c.a) + uColorMatrix[19];",""," vec3 rgb = mix(c.rgb, result.rgb, uAlpha);",""," rgb *= result.a;",""," gl_FragColor = vec4(rgb, result.a);","}",""].join("\n")},79060:t=>{t.exports=["#define SHADER_NAME PHASER_COPY_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","uniform float uBrightness;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord) * uBrightness;","}",""].join("\n")},65045:t=>{t.exports=["#define SHADER_NAME PHASER_LIGHT_FS","","precision mediump float;","","struct Light","{"," vec2 position;"," vec3 color;"," float intensity;"," float radius;","};","","const int kMaxLights = %LIGHT_COUNT%;","","uniform vec4 uCamera; /* x, y, rotation, zoom */","uniform vec2 uResolution;","uniform sampler2D uMainSampler;","uniform sampler2D uNormSampler;","uniform vec3 uAmbientLightColor;","uniform Light uLights[kMaxLights];","uniform mat3 uInverseRotationMatrix;","uniform int uLightCount;","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec3 finalColor = vec3(0.0, 0.0, 0.0);",""," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," vec3 normalMap = texture2D(uNormSampler, outTexCoord).rgb;"," vec3 normal = normalize(uInverseRotationMatrix * vec3(normalMap * 2.0 - 1.0));"," vec2 res = vec2(min(uResolution.x, uResolution.y)) * uCamera.w;",""," for (int index = 0; index < kMaxLights; ++index)"," {"," if (index < uLightCount)"," {"," Light light = uLights[index];"," vec3 lightDir = vec3((light.position.xy / res) - (gl_FragCoord.xy / res), 0.1);"," vec3 lightNormal = normalize(lightDir);"," float distToSurf = length(lightDir) * uCamera.w;"," float diffuseFactor = max(dot(normal, lightNormal), 0.0);"," float radius = (light.radius / res.x * uCamera.w) * uCamera.w;"," float attenuation = clamp(1.0 - distToSurf * distToSurf / (radius * radius), 0.0, 1.0);"," vec3 diffuse = light.color * diffuseFactor;"," finalColor += (attenuation * diffuse) * light.intensity;"," }"," }",""," vec4 colorOutput = vec4(uAmbientLightColor + finalColor, 1.0);",""," gl_FragColor = color * vec4(colorOutput.rgb * colorOutput.a, colorOutput.a);","}",""].join("\n")},98921:t=>{t.exports=["#define SHADER_NAME PHASER_LINEAR_BLEND_FS","","precision mediump float;","","uniform sampler2D uMainSampler1;","uniform sampler2D uMainSampler2;","uniform float uStrength;","","varying vec2 outTexCoord;","","void main ()","{"," vec4 frame1 = texture2D(uMainSampler1, outTexCoord);"," vec4 frame2 = texture2D(uMainSampler2, outTexCoord);",""," gl_FragColor = mix(frame1, frame2 * uStrength, 0.5);","}",""].join("\n")},53787:t=>{t.exports=["#define SHADER_NAME PHASER_MULTI_FS","","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","","uniform sampler2D uMainSampler[%count%];","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec4 texture;",""," %forloop%",""," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},15968:t=>{t.exports=["#define SHADER_NAME PHASER_MULTI_VS","","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTexId;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTexId = inTexId;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join("\n")},83327:t=>{t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_FS","","precision mediump float;","","uniform vec2 uResolution;","uniform float uCameraZoom;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," vec2 center = (lightPosition.xy + 1.0) * (uResolution.xy * 0.5);",""," float distToSurf = length(center - gl_FragCoord.xy);",""," float radius = 1.0 - distToSurf / (lightRadius * uCameraZoom);",""," float intensity = smoothstep(0.0, 1.0, radius * lightAttenuation);",""," vec4 color = vec4(intensity, intensity, intensity, 0.0) * lightColor;",""," gl_FragColor = vec4(color.rgb * lightColor.a, color.a);","}",""].join("\n")},54677:t=>{t.exports=["#define SHADER_NAME PHASER_POINTLIGHT_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inLightPosition;","attribute vec4 inLightColor;","attribute float inLightRadius;","attribute float inLightAttenuation;","","varying vec4 lightPosition;","varying vec4 lightColor;","varying float lightRadius;","varying float lightAttenuation;","","void main ()","{"," lightColor = inLightColor;"," lightRadius = inLightRadius;"," lightAttenuation = inLightAttenuation;"," lightPosition = uProjectionMatrix * vec4(inLightPosition, 1.0, 1.0);",""," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);","}",""].join("\n")},12569:t=>{t.exports=["#define SHADER_NAME PHASER_POSTFX_FS","","precision mediump float;","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","","void main ()","{"," gl_FragColor = texture2D(uMainSampler, outTexCoord);","}",""].join("\n")},99365:t=>{t.exports=["#define SHADER_NAME PHASER_QUAD_VS","","precision mediump float;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","","varying vec2 outFragCoord;","varying vec2 outTexCoord;","","void main ()","{"," outFragCoord = inPosition.xy * 0.5 + 0.5;"," outTexCoord = inTexCoord;",""," gl_Position = vec4(inPosition, 0, 1);","}",""].join("\n")},85060:t=>{t.exports=["#define SHADER_NAME PHASER_SINGLE_FS","","#ifdef GL_FRAGMENT_PRECISION_HIGH","precision highp float;","#else","precision mediump float;","#endif","","uniform sampler2D uMainSampler;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," vec4 texture = texture2D(uMainSampler, outTexCoord);"," vec4 texel = vec4(outTint.bgr * outTint.a, outTint.a);",""," // Multiply texture tint"," vec4 color = texture * texel;",""," if (outTintEffect == 1.0)"," {"," // Solid color + texture alpha"," color.rgb = mix(texture.rgb, outTint.bgr * outTint.a, texture.a);"," }"," else if (outTintEffect == 2.0)"," {"," // Solid color, no texture"," color = texel;"," }",""," gl_FragColor = color;","}",""].join("\n")},18166:t=>{t.exports=["#define SHADER_NAME PHASER_SINGLE_VS","","precision mediump float;","","uniform mat4 uProjectionMatrix;","","attribute vec2 inPosition;","attribute vec2 inTexCoord;","attribute float inTexId;","attribute float inTintEffect;","attribute vec4 inTint;","","varying vec2 outTexCoord;","varying float outTintEffect;","varying vec4 outTint;","","void main ()","{"," gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);",""," outTexCoord = inTexCoord;"," outTint = inTint;"," outTintEffect = inTintEffect;","}",""].join("\n")},756:(t,e,i)=>{var s=i(55301),n=i(56694),r=i(6659),o=i(40444),a=i(97081),h=i(74181),l=i(2893),u=i(9229),c=i(72283),d=i(74118),p=i(90881),f=i(84314),v=i(93736),g=i(47751),m=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.canvas,this.canvasBounds=new d,this.parent=null,this.parentIsWindow=!1,this.parentSize=new p,this.gameSize=new p,this.baseSize=new p,this.displaySize=new p,this.scaleMode=s.SCALE_MODE.NONE,this.zoom=1,this._resetZoom=!1,this.displayScale=new v(1,1),this.autoRound=!1,this.autoCenter=s.CENTER.NO_CENTER,this.orientation=s.ORIENTATION.LANDSCAPE,this.fullscreen,this.fullscreenTarget=null,this._createdFullscreenTarget=!1,this.dirty=!1,this.resizeInterval=500,this._lastCheck=0,this._checkOrientation=!1,this.domlisteners={orientationChange:c,windowResize:c,fullScreenChange:c,fullScreenError:c}},preBoot:function(){this.parseConfig(this.game.config),this.game.events.once(a.BOOT,this.boot,this)},boot:function(){var t=this.game;this.canvas=t.canvas,this.fullscreen=t.device.fullscreen,this.scaleMode!==s.SCALE_MODE.RESIZE&&this.displaySize.setAspectMode(this.scaleMode),this.scaleMode===s.SCALE_MODE.NONE?this.resize(this.width,this.height):(this.getParentBounds(),this.parentSize.width>0&&this.parentSize.height>0&&this.displaySize.setParent(this.parentSize),this.refresh()),t.events.on(a.PRE_STEP,this.step,this),t.events.once(a.READY,this.refresh,this),t.events.once(a.DESTROY,this.destroy,this),this.startListeners()},parseConfig:function(t){this.getParent(t),this.getParentBounds();var e=t.width,i=t.height,n=t.scaleMode,r=t.zoom,o=t.autoRound;if("string"==typeof e){var a=this.parentSize.width;0===a&&(a=window.innerWidth);var h=parseInt(e,10)/100;e=Math.floor(a*h)}if("string"==typeof i){var l=this.parentSize.height;0===l&&(l=window.innerHeight);var c=parseInt(i,10)/100;i=Math.floor(l*c)}this.scaleMode=n,this.autoRound=o,this.autoCenter=t.autoCenter,this.resizeInterval=t.resizeInterval,o&&(e=Math.floor(e),i=Math.floor(i)),this.gameSize.setSize(e,i),r===s.ZOOM.MAX_ZOOM&&(r=this.getMaxZoom()),this.zoom=r,1!==r&&(this._resetZoom=!0),this.baseSize.setSize(e,i),o&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),t.minWidth>0&&this.displaySize.setMin(t.minWidth*r,t.minHeight*r),t.maxWidth>0&&this.displaySize.setMax(t.maxWidth*r,t.maxHeight*r),this.displaySize.setSize(e,i),this.orientation=u(e,i)},getParent:function(t){var e=t.parent;if(null!==e){if(this.parent=l(e),this.parentIsWindow=this.parent===document.body,t.expandParent&&t.scaleMode!==s.SCALE_MODE.NONE){var i=this.parent.getBoundingClientRect();(this.parentIsWindow||0===i.height)&&(document.documentElement.style.height="100%",document.body.style.height="100%",i=this.parent.getBoundingClientRect(),this.parentIsWindow||0!==i.height||(this.parent.style.overflow="hidden",this.parent.style.width="100%",this.parent.style.height="100%"))}t.fullscreenTarget&&!this.fullscreenTarget&&(this.fullscreenTarget=l(t.fullscreenTarget))}},getParentBounds:function(){if(!this.parent)return!1;var t=this.parentSize,e=this.parent.getBoundingClientRect();this.parentIsWindow&&this.game.device.os.iOS&&(e.height=h(!0));var i=e.width,s=e.height;if(t.width!==i||t.height!==s)return t.setSize(i,s),!0;if(this.canvas){var n=this.canvasBounds,r=this.canvas.getBoundingClientRect();if(r.x!==n.x||r.y!==n.y)return!0}return!1},lockOrientation:function(t){var e=screen.lockOrientation||screen.mozLockOrientation||screen.msLockOrientation;return!!e&&e.call(screen,t)},setParentSize:function(t,e){return this.parentSize.setSize(t,e),this.refresh()},setGameSize:function(t,e){var i=this.autoRound;i&&(t=Math.floor(t),e=Math.floor(e));var s=this.width,n=this.height;return this.gameSize.resize(t,e),this.baseSize.resize(t,e),i&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setAspectRatio(t/e),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height,this.refresh(s,n)},resize:function(t,e){var i=this.zoom,s=this.autoRound;s&&(t=Math.floor(t),e=Math.floor(e));var n=this.width,r=this.height;this.gameSize.resize(t,e),this.baseSize.resize(t,e),s&&(this.baseSize.width=Math.floor(this.baseSize.width),this.baseSize.height=Math.floor(this.baseSize.height)),this.displaySize.setSize(t*i,e*i),this.canvas.width=this.baseSize.width,this.canvas.height=this.baseSize.height;var o=this.canvas.style,a=t*i,h=e*i;return s&&(a=Math.floor(a),h=Math.floor(h)),a===t&&h===e||(o.width=a+"px",o.height=h+"px"),this.refresh(n,r)},setZoom:function(t){return this.zoom=t,this._resetZoom=!0,this.refresh()},setMaxZoom:function(){return this.zoom=this.getMaxZoom(),this._resetZoom=!0,this.refresh()},refresh:function(t,e){void 0===t&&(t=this.width),void 0===e&&(e=this.height),this.updateScale(),this.updateBounds(),this.updateOrientation(),this.displayScale.set(this.baseSize.width/this.canvasBounds.width,this.baseSize.height/this.canvasBounds.height);var i=this.game.domContainer;if(i){this.baseSize.setCSS(i);var s=this.canvas.style,n=i.style;n.transform="scale("+this.displaySize.width/this.baseSize.width+","+this.displaySize.height/this.baseSize.height+")",n.marginLeft=s.marginLeft,n.marginTop=s.marginTop}return this.emit(o.RESIZE,this.gameSize,this.baseSize,this.displaySize,t,e),this},updateOrientation:function(){if(this._checkOrientation){this._checkOrientation=!1;var t=u(this.width,this.height);t!==this.orientation&&(this.orientation=t,this.emit(o.ORIENTATION_CHANGE,t))}},updateScale:function(){var t,e,i=this.canvas.style,n=this.gameSize.width,r=this.gameSize.height,o=this.zoom,a=this.autoRound;this.scaleMode===s.SCALE_MODE.NONE?(this.displaySize.setSize(n*o,r*o),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),this._resetZoom&&(i.width=t+"px",i.height=e+"px",this._resetZoom=!1)):this.scaleMode===s.SCALE_MODE.RESIZE?(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),this.gameSize.setSize(this.displaySize.width,this.displaySize.height),this.baseSize.setSize(this.displaySize.width,this.displaySize.height),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),this.canvas.width=t,this.canvas.height=e):(this.displaySize.setSize(this.parentSize.width,this.parentSize.height),t=this.displaySize.width,e=this.displaySize.height,a&&(t=Math.floor(t),e=Math.floor(e)),i.width=t+"px",i.height=e+"px"),this.getParentBounds(),this.updateCenter()},getMaxZoom:function(){var t=f(this.parentSize.width,this.gameSize.width,0,!0),e=f(this.parentSize.height,this.gameSize.height,0,!0);return Math.max(Math.min(t,e),1)},updateCenter:function(){var t=this.autoCenter;if(t!==s.CENTER.NO_CENTER){var e=this.canvas,i=e.style,n=e.getBoundingClientRect(),r=n.width,o=n.height,a=Math.floor((this.parentSize.width-r)/2),h=Math.floor((this.parentSize.height-o)/2);t===s.CENTER.CENTER_HORIZONTALLY?h=0:t===s.CENTER.CENTER_VERTICALLY&&(a=0),i.marginLeft=a+"px",i.marginTop=h+"px"}},updateBounds:function(){var t=this.canvasBounds,e=this.canvas.getBoundingClientRect();t.x=e.left+(window.pageXOffset||0)-(document.documentElement.clientLeft||0),t.y=e.top+(window.pageYOffset||0)-(document.documentElement.clientTop||0),t.width=e.width,t.height=e.height},transformX:function(t){return(t-this.canvasBounds.left)*this.displayScale.x},transformY:function(t){return(t-this.canvasBounds.top)*this.displayScale.y},startFullscreen:function(t){void 0===t&&(t={navigationUI:"hide"});var e=this.fullscreen;if(e.available){if(!e.active){var i=this.getFullscreenTarget();e.keyboard?i[e.request](Element.ALLOW_KEYBOARD_INPUT):i[e.request](t)}}else this.emit(o.FULLSCREEN_UNSUPPORTED)},fullscreenSuccessHandler:function(){this.getParentBounds(),this.refresh(),this.emit(o.ENTER_FULLSCREEN)},fullscreenErrorHandler:function(t){this.removeFullscreenTarget(),this.emit(o.FULLSCREEN_FAILED,t)},getFullscreenTarget:function(){if(!this.fullscreenTarget){var t=document.createElement("div");t.style.margin="0",t.style.padding="0",t.style.width="100%",t.style.height="100%",this.fullscreenTarget=t,this._createdFullscreenTarget=!0}this._createdFullscreenTarget&&(this.canvas.parentNode.insertBefore(this.fullscreenTarget,this.canvas),this.fullscreenTarget.appendChild(this.canvas));return this.fullscreenTarget},removeFullscreenTarget:function(){if(this._createdFullscreenTarget){var t=this.fullscreenTarget;if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(this.canvas,t),e.removeChild(t)}}},stopFullscreen:function(){var t=this.fullscreen;if(!t.available)return this.emit(o.FULLSCREEN_UNSUPPORTED),!1;t.active&&document[t.cancel](),this.removeFullscreenTarget(),this.getParentBounds(),this.emit(o.LEAVE_FULLSCREEN),this.refresh()},toggleFullscreen:function(t){this.fullscreen.active?this.stopFullscreen():this.startFullscreen(t)},startListeners:function(){var t=this,e=this.domlisteners;if(e.orientationChange=function(){t.updateBounds(),t._checkOrientation=!0,t.dirty=!0},e.windowResize=function(){t.updateBounds(),t.dirty=!0},window.addEventListener("orientationchange",e.orientationChange,!1),window.addEventListener("resize",e.windowResize,!1),this.fullscreen.available){e.fullScreenChange=function(e){return t.onFullScreenChange(e)},e.fullScreenError=function(e){return t.onFullScreenError(e)};["webkit","moz",""].forEach((function(t){document.addEventListener(t+"fullscreenchange",e.fullScreenChange,!1),document.addEventListener(t+"fullscreenerror",e.fullScreenError,!1)})),document.addEventListener("MSFullscreenChange",e.fullScreenChange,!1),document.addEventListener("MSFullscreenError",e.fullScreenError,!1)}},onFullScreenChange:function(){document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.mozFullScreenElement?this.fullscreenSuccessHandler():this.stopFullscreen()},onFullScreenError:function(){this.removeFullscreenTarget()},getViewPort:function(t,e){t instanceof g||(e=t,t=void 0),void 0===e&&(e=new d);var i,s,n=this.baseSize,r=this.parentSize,o=this.canvasBounds,a=this.displayScale,h=o.x>=0?0:-o.x*a.x,l=o.y>=0?0:-o.y*a.y;return i=r.width>=o.width?n.width:n.width-(o.width-r.width)*a.x,s=r.height>=o.height?n.height:n.height-(o.height-r.height)*a.y,e.setTo(h,l,i,s),t&&(e.width/=t.zoomX,e.height/=t.zoomY,e.centerX=t.centerX+t.scrollX,e.centerY=t.centerY+t.scrollY),e},step:function(t,e){this.parent&&(this._lastCheck+=e,(this.dirty||this._lastCheck>this.resizeInterval)&&(this.getParentBounds()&&this.refresh(),this.dirty=!1,this._lastCheck=0))},stopListeners:function(){var t=this.domlisteners;window.removeEventListener("orientationchange",t.orientationChange,!1),window.removeEventListener("resize",t.windowResize,!1);["webkit","moz",""].forEach((function(e){document.removeEventListener(e+"fullscreenchange",t.fullScreenChange,!1),document.removeEventListener(e+"fullscreenerror",t.fullScreenError,!1)})),document.removeEventListener("MSFullscreenChange",t.fullScreenChange,!1),document.removeEventListener("MSFullscreenError",t.fullScreenError,!1)},destroy:function(){this.removeAllListeners(),this.stopListeners(),this.game=null,this.canvas=null,this.canvasBounds=null,this.parent=null,this.fullscreenTarget=null,this.parentSize.destroy(),this.gameSize.destroy(),this.baseSize.destroy(),this.displaySize.destroy()},isFullscreen:{get:function(){return this.fullscreen.active}},width:{get:function(){return this.gameSize.width}},height:{get:function(){return this.gameSize.height}},isPortrait:{get:function(){return this.orientation===s.ORIENTATION.PORTRAIT}},isLandscape:{get:function(){return this.orientation===s.ORIENTATION.LANDSCAPE}},isGamePortrait:{get:function(){return this.height>this.width}},isGameLandscape:{get:function(){return this.width>this.height}}});t.exports=m},35098:t=>{t.exports={NO_CENTER:0,CENTER_BOTH:1,CENTER_HORIZONTALLY:2,CENTER_VERTICALLY:3}},53539:t=>{t.exports={LANDSCAPE:"landscape-primary",PORTRAIT:"portrait-primary"}},12637:t=>{t.exports={NONE:0,WIDTH_CONTROLS_HEIGHT:1,HEIGHT_CONTROLS_WIDTH:2,FIT:3,ENVELOP:4,RESIZE:5}},10217:t=>{t.exports={NO_ZOOM:1,ZOOM_2X:2,ZOOM_4X:4,MAX_ZOOM:-1}},55301:(t,e,i)=>{var s={CENTER:i(35098),ORIENTATION:i(53539),SCALE_MODE:i(12637),ZOOM:i(10217)};t.exports=s},82085:t=>{t.exports="enterfullscreen"},11826:t=>{t.exports="fullscreenfailed"},56691:t=>{t.exports="fullscreenunsupported"},34739:t=>{t.exports="leavefullscreen"},26681:t=>{t.exports="orientationchange"},11428:t=>{t.exports="resize"},40444:(t,e,i)=>{t.exports={ENTER_FULLSCREEN:i(82085),FULLSCREEN_FAILED:i(11826),FULLSCREEN_UNSUPPORTED:i(56691),LEAVE_FULLSCREEN:i(34739),ORIENTATION_CHANGE:i(26681),RESIZE:i(11428)}},86754:(t,e,i)=>{var s=i(98611),n=i(55301),r={Center:i(35098),Events:i(40444),Orientation:i(53539),ScaleManager:i(756),ScaleModes:i(12637),Zoom:i(10217)};r=s(!1,r,n.CENTER),r=s(!1,r,n.ORIENTATION),r=s(!1,r,n.SCALE_MODE),r=s(!1,r,n.ZOOM),t.exports=r},47736:(t,e,i)=>{var s=i(72632),n=i(40587);t.exports=function(t){var e=t.game.config.defaultPhysicsSystem,i=s(t.settings,"physics",!1);if(e||i){var r=[];if(e&&r.push(n(e+"Physics")),i)for(var o in i)o=n(o.concat("Physics")),-1===r.indexOf(o)&&r.push(o);return r}}},91088:(t,e,i)=>{var s=i(72632);t.exports=function(t){var e=t.plugins.getDefaultScenePlugins(),i=s(t.settings,"plugins",!1);return Array.isArray(i)?i:e||[]}},90415:t=>{t.exports={game:"game",renderer:"renderer",anims:"anims",cache:"cache",plugins:"plugins",registry:"registry",scale:"scale",sound:"sound",textures:"textures",events:"events",cameras:"cameras",add:"add",make:"make",scenePlugin:"scene",displayList:"children",lights:"lights",data:"data",input:"input",load:"load",time:"time",tweens:"tweens",arcadePhysics:"physics",impactPhysics:"impact",matterPhysics:"matter"}},87157:(t,e,i)=>{var s=i(56694),n=i(63946),r=new s({initialize:function(t){this.sys=new n(this,t),this.game,this.anims,this.cache,this.registry,this.sound,this.textures,this.events,this.cameras,this.add,this.make,this.scene,this.children,this.lights,this.data,this.input,this.load,this.time,this.tweens,this.physics,this.matter,this.scale,this.plugins,this.renderer},update:function(){}});t.exports=r},13553:(t,e,i)=>{var s=i(56694),n=i(92980),r=i(7599),o=i(97081),a=i(10850),h=i(683),l=i(72283),u=i(87157),c=i(63946),d=new s({initialize:function(t,e){if(this.game=t,this.keys={},this.scenes=[],this._pending=[],this._start=[],this._queue=[],this._data={},this.isProcessing=!1,this.isBooted=!1,this.customViewports=0,this.systemScene,e){Array.isArray(e)||(e=[e]);for(var i=0;i-1&&(delete this.keys[s],this.scenes.splice(i,1),this._start.indexOf(s)>-1&&(i=this._start.indexOf(s),this._start.splice(i,1)),e.sys.destroy())}return this},bootScene:function(t){var e,i=t.sys,s=i.settings;i.sceneUpdate=l,t.init&&(t.init.call(t,s.data),s.status=n.INIT,s.isTransition&&i.events.emit(r.TRANSITION_INIT,s.transitionFrom,s.transitionDuration)),i.load&&(e=i.load).reset(),e&&t.preload?(t.preload.call(t),s.status=n.LOADING,e.once(h.COMPLETE,this.loadComplete,this),e.start()):this.create(t)},loadComplete:function(t){this.game.sound&&this.game.sound.onBlurPausedSounds&&this.game.sound.unlock(),this.create(t.scene)},payloadComplete:function(t){this.bootScene(t.scene)},update:function(t,e){this.processQueue(),this.isProcessing=!0;for(var i=this.scenes.length-1;i>=0;i--){var s=this.scenes[i].sys;s.settings.status>n.START&&s.settings.status<=n.RUNNING&&s.step(t,e),s.scenePlugin._target&&s.scenePlugin.step(t,e)}},render:function(t){for(var e=0;e=n.LOADING&&i.settings.status=n.START&&o<=n.CREATING)return this;if(o>=n.RUNNING&&o<=n.SLEEPING)r.shutdown(),r.sceneUpdate=l,r.start(e);else if(r.sceneUpdate=l,r.start(e),r.load&&(s=r.load),s&&r.settings.hasOwnProperty("pack")&&(s.reset(),s.addPack({payload:r.settings.pack})))return r.settings.status=n.LOADING,s.once(h.COMPLETE,this.payloadComplete,this),s.start(),this;return this.bootScene(i),this},stop:function(t,e){var i=this.getScene(t);if(i&&!i.sys.isTransitioning()&&i.sys.settings.status!==n.SHUTDOWN){var s=i.sys.load;s.off(h.COMPLETE,this.loadComplete,this),s.off(h.COMPLETE,this.payloadComplete,this),i.sys.shutdown(e)}return this},switch:function(t,e){var i=this.getScene(t),s=this.getScene(e);return i&&s&&i!==s&&(this.sleep(t),this.isSleeping(e)?this.wake(e):this.start(e)),this},getAt:function(t){return this.scenes[t]},getIndex:function(t){var e=this.getScene(t);return this.scenes.indexOf(e)},bringToTop:function(t){if(this.isProcessing)this._queue.push({op:"bringToTop",keyA:t,keyB:null});else{var e=this.getIndex(t);if(-1!==e&&e0){var i=this.getScene(t);this.scenes.splice(e,1),this.scenes.unshift(i)}}return this},moveDown:function(t){if(this.isProcessing)this._queue.push({op:"moveDown",keyA:t,keyB:null});else{var e=this.getIndex(t);if(e>0){var i=e-1,s=this.getScene(t),n=this.getAt(i);this.scenes[e]=n,this.scenes[i]=s}}return this},moveUp:function(t){if(this.isProcessing)this._queue.push({op:"moveUp",keyA:t,keyB:null});else{var e=this.getIndex(t);if(ei),0,n)}}return this},moveBelow:function(t,e){if(t===e)return this;if(this.isProcessing)this._queue.push({op:"moveBelow",keyA:t,keyB:e});else{var i=this.getIndex(t),s=this.getIndex(e);if(-1!==i&&-1!==s&&s>i){var n=this.getAt(s);this.scenes.splice(s,1),0===i?this.scenes.unshift(n):this.scenes.splice(i-(s{var s=i(82897),n=i(56694),r=i(7599),o=i(72632),a=i(91963),h=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.settings=t.sys.settings,this.key=t.sys.settings.key,this.manager=t.sys.game.scene,this.transitionProgress=0,this._elapsed=0,this._target=null,this._duration=0,this._onUpdate,this._onUpdateScope,this._willSleep=!1,this._willRemove=!1,t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.pluginStart,this)},boot:function(){this.systems.events.once(r.DESTROY,this.destroy,this)},pluginStart:function(){this._target=null,this.systems.events.once(r.SHUTDOWN,this.shutdown,this)},start:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",this.key),this.manager.queueOp("start",t,e),this},restart:function(t){var e=this.key;return this.manager.queueOp("stop",e),this.manager.queueOp("start",e,t),this},transition:function(t){void 0===t&&(t={});var e=o(t,"target",!1),i=this.manager.getScene(e);if(!e||!this.checkValidTransition(i))return!1;var s=o(t,"duration",1e3);this._elapsed=0,this._target=i,this._duration=s,this._willSleep=o(t,"sleep",!1),this._willRemove=o(t,"remove",!1);var n=o(t,"onUpdate",null);n&&(this._onUpdate=n,this._onUpdateScope=o(t,"onUpdateScope",this.scene));var a=o(t,"allowInput",!1);this.settings.transitionAllowInput=a;var h=i.sys.settings;h.isTransition=!0,h.transitionFrom=this.scene,h.transitionDuration=s,h.transitionAllowInput=a,o(t,"moveAbove",!1)?this.manager.moveAbove(this.key,e):o(t,"moveBelow",!1)&&this.manager.moveBelow(this.key,e),i.sys.isSleeping()?i.sys.wake(o(t,"data")):this.manager.start(e,o(t,"data"));var l=o(t,"onStart",null),u=o(t,"onStartScope",this.scene);return l&&l.call(u,this.scene,i,s),this.systems.events.emit(r.TRANSITION_OUT,i,s),!0},checkValidTransition:function(t){return!(!t||t.sys.isActive()||t.sys.isTransitioning()||t===this.scene||this.systems.isTransitioning())},step:function(t,e){this._elapsed+=e,this.transitionProgress=s(this._elapsed/this._duration,0,1),this._onUpdate&&this._onUpdate.call(this._onUpdateScope,this.transitionProgress),this._elapsed>=this._duration&&this.transitionComplete()},transitionComplete:function(){var t=this._target.sys,e=this._target.sys.settings;t.events.emit(r.TRANSITION_COMPLETE,this.scene),e.isTransition=!1,e.transitionFrom=null,this._duration=0,this._target=null,this._onUpdate=null,this._onUpdateScope=null,this._willRemove?this.manager.remove(this.key):this._willSleep?this.systems.sleep():this.manager.stop(this.key)},add:function(t,e,i,s){return this.manager.add(t,e,i,s)},launch:function(t,e){return t&&t!==this.key&&this.manager.queueOp("start",t,e),this},run:function(t,e){return t&&t!==this.key&&this.manager.queueOp("run",t,e),this},pause:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("pause",t,e),this},resume:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("resume",t,e),this},sleep:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("sleep",t,e),this},wake:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("wake",t,e),this},switch:function(t){return t!==this.key&&this.manager.queueOp("switch",this.key,t),this},stop:function(t,e){return void 0===t&&(t=this.key),this.manager.queueOp("stop",t,e),this},setActive:function(t,e,i){void 0===e&&(e=this.key);var s=this.manager.getScene(e);return s&&s.sys.setActive(t,i),this},setVisible:function(t,e){void 0===e&&(e=this.key);var i=this.manager.getScene(e);return i&&i.sys.setVisible(t),this},isSleeping:function(t){return void 0===t&&(t=this.key),this.manager.isSleeping(t)},isActive:function(t){return void 0===t&&(t=this.key),this.manager.isActive(t)},isPaused:function(t){return void 0===t&&(t=this.key),this.manager.isPaused(t)},isVisible:function(t){return void 0===t&&(t=this.key),this.manager.isVisible(t)},swapPosition:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.swapPosition(t,e),this},moveAbove:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveAbove(t,e),this},moveBelow:function(t,e){return void 0===e&&(e=this.key),t!==e&&this.manager.moveBelow(t,e),this},remove:function(t){return void 0===t&&(t=this.key),this.manager.remove(t),this},moveUp:function(t){return void 0===t&&(t=this.key),this.manager.moveUp(t),this},moveDown:function(t){return void 0===t&&(t=this.key),this.manager.moveDown(t),this},bringToTop:function(t){return void 0===t&&(t=this.key),this.manager.bringToTop(t),this},sendToBack:function(t){return void 0===t&&(t=this.key),this.manager.sendToBack(t),this},get:function(t){return this.manager.getScene(t)},getStatus:function(t){var e=this.manager.getScene(t);if(e)return e.sys.getStatus()},getIndex:function(t){return void 0===t&&(t=this.key),this.manager.getIndex(t)},shutdown:function(){var t=this.systems.events;t.off(r.SHUTDOWN,this.shutdown,this),t.off(r.TRANSITION_OUT)},destroy:function(){this.shutdown(),this.scene.sys.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.settings=null,this.manager=null}});a.register("ScenePlugin",h,"scenePlugin"),t.exports=h},36765:(t,e,i)=>{var s=i(92980),n=i(10850),r=i(30657),o=i(90415),a={create:function(t){return"string"==typeof t?t={key:t}:void 0===t&&(t={}),{status:s.PENDING,key:n(t,"key",""),active:n(t,"active",!1),visible:n(t,"visible",!0),isBooted:!1,isTransition:!1,transitionFrom:null,transitionDuration:0,transitionAllowInput:!0,data:{},pack:n(t,"pack",!1),cameras:n(t,"cameras",null),map:n(t,"map",r(o,n(t,"mapAdd",{}))),physics:n(t,"physics",{}),loader:n(t,"loader",{}),plugins:n(t,"plugins",!1),input:n(t,"input",{})}}};t.exports=a},63946:(t,e,i)=>{var s=i(56694),n=i(92980),r=i(18360),o=i(7599),a=i(47736),h=i(91088),l=i(72283),u=i(36765),c=new s({initialize:function(t,e){this.scene=t,this.game,this.renderer,this.config=e,this.settings=u.create(e),this.canvas,this.context,this.anims,this.cache,this.plugins,this.registry,this.scale,this.sound,this.textures,this.add,this.cameras,this.displayList,this.events,this.make,this.scenePlugin,this.updateList,this.sceneUpdate=l},init:function(t){this.settings.status=n.INIT,this.sceneUpdate=l,this.game=t,this.renderer=t.renderer,this.canvas=t.canvas,this.context=t.context;var e=t.plugins;this.plugins=e,e.addToScene(this,r.Global,[r.CoreScene,h(this),a(this)]),this.events.emit(o.BOOT,this),this.settings.isBooted=!0},step:function(t,e){var i=this.events;i.emit(o.PRE_UPDATE,t,e),i.emit(o.UPDATE,t,e),this.sceneUpdate.call(this.scene,t,e),i.emit(o.POST_UPDATE,t,e)},render:function(t){var e=this.displayList;e.depthSort(),this.events.emit(o.PRE_RENDER,t),this.cameras.render(t,e),this.events.emit(o.RENDER,t)},queueDepthSort:function(){this.displayList.queueDepthSort()},depthSort:function(){this.displayList.depthSort()},pause:function(t){var e=this.settings,i=this.getStatus();return i!==n.CREATING&&i!==n.RUNNING?console.warn("Cannot pause non-running Scene",e.key):this.settings.active&&(e.status=n.PAUSED,e.active=!1,this.events.emit(o.PAUSE,this,t)),this},resume:function(t){var e=this.events,i=this.settings;return this.settings.active||(i.status=n.RUNNING,i.active=!0,e.emit(o.RESUME,this,t)),this},sleep:function(t){var e=this.settings,i=this.getStatus();return i!==n.CREATING&&i!==n.RUNNING?console.warn("Cannot sleep non-running Scene",e.key):(e.status=n.SLEEPING,e.active=!1,e.visible=!1,this.events.emit(o.SLEEP,this,t)),this},wake:function(t){var e=this.events,i=this.settings;return i.status=n.RUNNING,i.active=!0,i.visible=!0,e.emit(o.WAKE,this,t),i.isTransition&&e.emit(o.TRANSITION_WAKE,i.transitionFrom,i.transitionDuration),this},getData:function(){return this.settings.data},getStatus:function(){return this.settings.status},canInput:function(){var t=this.settings.status;return t>n.PENDING&&t<=n.RUNNING},isSleeping:function(){return this.settings.status===n.SLEEPING},isActive:function(){return this.settings.status===n.RUNNING},isPaused:function(){return this.settings.status===n.PAUSED},isTransitioning:function(){return this.settings.isTransition||null!==this.scenePlugin._target},isTransitionOut:function(){return null!==this.scenePlugin._target&&this.scenePlugin._duration>0},isTransitionIn:function(){return this.settings.isTransition},isVisible:function(){return this.settings.visible},setVisible:function(t){return this.settings.visible=t,this},setActive:function(t,e){return t?this.resume(e):this.pause(e)},start:function(t){var e=this.events,i=this.settings;t&&(i.data=t),i.status=n.START,i.active=!0,i.visible=!0,e.emit(o.START,this),e.emit(o.READY,this,t)},shutdown:function(t){var e=this.events,i=this.settings;e.off(o.TRANSITION_INIT),e.off(o.TRANSITION_START),e.off(o.TRANSITION_COMPLETE),e.off(o.TRANSITION_OUT),i.status=n.SHUTDOWN,i.active=!1,i.visible=!1,e.emit(o.SHUTDOWN,this,t)},destroy:function(){var t=this.events,e=this.settings;e.status=n.DESTROYED,e.active=!1,e.visible=!1,t.emit(o.DESTROY,this),t.removeAllListeners();for(var i=["scene","game","anims","cache","plugins","registry","sound","textures","add","camera","displayList","events","make","scenePlugin","updateList"],s=0;s{t.exports={PENDING:0,INIT:1,START:2,LOADING:3,CREATING:4,RUNNING:5,PAUSED:6,SLEEPING:7,SHUTDOWN:8,DESTROYED:9}},31803:t=>{t.exports="addedtoscene"},94817:t=>{t.exports="boot"},28977:t=>{t.exports="create"},91959:t=>{t.exports="destroy"},363:t=>{t.exports="pause"},15643:t=>{t.exports="postupdate"},17058:t=>{t.exports="prerender"},77125:t=>{t.exports="preupdate"},76018:t=>{t.exports="ready"},28620:t=>{t.exports="removedfromscene"},41538:t=>{t.exports="render"},34268:t=>{t.exports="resume"},2342:t=>{t.exports="shutdown"},96541:t=>{t.exports="sleep"},74244:t=>{t.exports="start"},17046:t=>{t.exports="transitioncomplete"},13637:t=>{t.exports="transitioninit"},14733:t=>{t.exports="transitionout"},33899:t=>{t.exports="transitionstart"},52418:t=>{t.exports="transitionwake"},31735:t=>{t.exports="update"},8470:t=>{t.exports="wake"},7599:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(31803),BOOT:i(94817),CREATE:i(28977),DESTROY:i(91959),PAUSE:i(363),POST_UPDATE:i(15643),PRE_RENDER:i(17058),PRE_UPDATE:i(77125),READY:i(76018),REMOVED_FROM_SCENE:i(28620),RENDER:i(41538),RESUME:i(34268),SHUTDOWN:i(2342),SLEEP:i(96541),START:i(74244),TRANSITION_COMPLETE:i(17046),TRANSITION_INIT:i(13637),TRANSITION_OUT:i(14733),TRANSITION_START:i(33899),TRANSITION_WAKE:i(52418),UPDATE:i(31735),WAKE:i(8470)}},20436:(t,e,i)=>{var s=i(92980),n=i(98611),r={Events:i(7599),GetPhysicsPlugins:i(47736),GetScenePlugins:i(91088),SceneManager:i(13553),ScenePlugin:i(64051),Settings:i(36765),Systems:i(63946)};r=n(!1,r,s),t.exports=r},25798:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(76038),o=i(98611),a=i(72283),h=new s({Extends:n,initialize:function(t,e,i){n.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=this.duration||0,this.totalDuration=this.totalDuration||0,this.config={mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},this.currentConfig=this.config,this.config=o(this.config,i),this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(console.error("addMarker "+t.name+" already exists in Sound"),!1):(t=o(!0,{name:"",start:0,duration:this.totalDuration-(t.start||0),config:{mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0}},t),this.markers[t.name]=t,!0))},updateMarker:function(t){return!(!t||!t.name||"string"!=typeof t.name)&&(this.markers[t.name]?(this.markers[t.name]=o(!0,this.markers[t.name],t),!0):(console.warn("Audio Marker: "+t.name+" missing in Sound: "+this.key),!1))},removeMarker:function(t){var e=this.markers[t];return e?(this.markers[t]=null,e):null},play:function(t,e){if(void 0===t&&(t=""),"object"==typeof t&&(e=t,t=""),"string"!=typeof t)return!1;if(t){if(!this.markers[t])return console.warn("Marker: "+t+" missing in Sound: "+this.key),!1;this.currentMarker=this.markers[t],this.currentConfig=this.currentMarker.config,this.duration=this.currentMarker.duration}else this.currentMarker=null,this.currentConfig=this.config,this.duration=this.totalDuration;return this.resetConfig(),this.currentConfig=o(this.currentConfig,e),this.isPlaying=!0,this.isPaused=!1,!0},pause:function(){return!(this.isPaused||!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!0,!0)},resume:function(){return!(!this.isPaused||this.isPlaying)&&(this.isPlaying=!0,this.isPaused=!1,!0)},stop:function(){return!(!this.isPaused&&!this.isPlaying)&&(this.isPlaying=!1,this.isPaused=!1,this.resetConfig(),!0)},applyConfig:function(){this.mute=this.currentConfig.mute,this.volume=this.currentConfig.volume,this.rate=this.currentConfig.rate,this.detune=this.currentConfig.detune,this.loop=this.currentConfig.loop,this.pan=this.currentConfig.pan},resetConfig:function(){this.currentConfig.seek=0,this.currentConfig.delay=0},update:a,calculateRate:function(){var t=this.currentConfig.detune+this.manager.detune,e=Math.pow(1.0005777895065548,t);this.totalRate=this.currentConfig.rate*this.manager.rate*e},destroy:function(){this.pendingRemove||(this.emit(r.DESTROY,this),this.removeAllListeners(),this.pendingRemove=!0,this.manager=null,this.config=null,this.currentConfig=null,this.markers=null,this.currentMarker=null)}});t.exports=h},12486:(t,e,i)=>{var s=i(56694),n=i(32742),r=i(6659),o=i(76038),a=i(97081),h=i(72283),l=i(71608),u=i(51463),c=new s({Extends:r,initialize:function(t){r.call(this),this.game=t,this.jsonCache=t.cache.json,this.sounds=[],this.mute=!1,this.volume=1,this.pauseOnBlur=!0,this._rate=1,this._detune=0,this.locked=this.locked||!1,this.unlocked=!1,t.events.on(a.BLUR,this.onGameBlur,this),t.events.on(a.FOCUS,this.onGameFocus,this),t.events.on(a.PRE_STEP,this.update,this),t.events.once(a.DESTROY,this.destroy,this)},add:h,addAudioSprite:function(t,e){void 0===e&&(e={});var i=this.add(t,e);for(var s in i.spritemap=this.jsonCache.get(t).spritemap,i.spritemap)if(i.spritemap.hasOwnProperty(s)){var r=n(e),o=i.spritemap[s];r.loop=!!o.hasOwnProperty("loop")&&o.loop,i.addMarker({name:s,start:o.start,duration:o.end-o.start,config:r})}return i},get:function(t){return u(this.sounds,"key",t)},getAll:function(t){return t?l(this.sounds,"key",t):l(this.sounds)},getAllPlaying:function(){return l(this.sounds,"isPlaying",!0)},play:function(t,e){var i=this.add(t);return i.once(o.COMPLETE,i.destroy,i),e?e.name?(i.addMarker(e),i.play(e.name)):i.play(e):i.play()},playAudioSprite:function(t,e,i){var s=this.addAudioSprite(t);return s.once(o.COMPLETE,s.destroy,s),s.play(e,i)},remove:function(t){var e=this.sounds.indexOf(t);return-1!==e&&(t.destroy(),this.sounds.splice(e,1),!0)},removeAll:function(){this.sounds.forEach((function(t){t.destroy()})),this.sounds.length=0},removeByKey:function(t){for(var e=0,i=this.sounds.length-1;i>=0;i--){var s=this.sounds[i];s.key===t&&(s.destroy(),this.sounds.splice(i,1),e++)}return e},pauseAll:function(){this.forEachActiveSound((function(t){t.pause()})),this.emit(o.PAUSE_ALL,this)},resumeAll:function(){this.forEachActiveSound((function(t){t.resume()})),this.emit(o.RESUME_ALL,this)},stopAll:function(){this.forEachActiveSound((function(t){t.stop()})),this.emit(o.STOP_ALL,this)},stopByKey:function(t){var e=0;return this.getAll(t).forEach((function(t){t.stop()&&e++})),e},unlock:h,onBlur:h,onFocus:h,onGameBlur:function(){this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.pauseOnBlur&&this.onFocus()},update:function(t,e){this.unlocked&&(this.unlocked=!1,this.locked=!1,this.emit(o.UNLOCKED,this));for(var i=this.sounds.length-1;i>=0;i--)this.sounds[i].pendingRemove&&this.sounds.splice(i,1);this.sounds.forEach((function(i){i.update(t,e)}))},destroy:function(){this.game.events.off(a.BLUR,this.onGameBlur,this),this.game.events.off(a.FOCUS,this.onGameFocus,this),this.game.events.off(a.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),this.sounds.length=0,this.sounds=null,this.game=null},forEachActiveSound:function(t,e){var i=this;this.sounds.forEach((function(s,n){s&&!s.pendingRemove&&t.call(e||i,s,n,i.sounds)}))},setRate:function(t){return this.rate=t,this},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.forEachActiveSound((function(t){t.calculateRate()})),this.emit(o.GLOBAL_RATE,this,t)}},setDetune:function(t){return this.detune=t,this},detune:{get:function(){return this._detune},set:function(t){this._detune=t,this.forEachActiveSound((function(t){t.calculateRate()})),this.emit(o.GLOBAL_DETUNE,this,t)}}});t.exports=c},84191:(t,e,i)=>{var s=i(27622),n=i(17546),r=i(55491),o={create:function(t){var e=t.config.audio,i=t.device.audio;return e.noAudio||!i.webAudio&&!i.audioData?new n(t):i.webAudio&&!e.disableWebAudio?new r(t):new s(t)}};t.exports=o},77578:t=>{t.exports="complete"},19679:t=>{t.exports="decodedall"},56951:t=>{t.exports="decoded"},16436:t=>{t.exports="destroy"},55154:t=>{t.exports="detune"},57818:t=>{t.exports="detune"},57890:t=>{t.exports="mute"},83022:t=>{t.exports="rate"},99170:t=>{t.exports="volume"},64289:t=>{t.exports="looped"},67214:t=>{t.exports="loop"},53128:t=>{t.exports="mute"},73078:t=>{t.exports="pan"},76763:t=>{t.exports="pauseall"},88426:t=>{t.exports="pause"},13765:t=>{t.exports="play"},80291:t=>{t.exports="rate"},11124:t=>{t.exports="resumeall"},55382:t=>{t.exports="resume"},71157:t=>{t.exports="seek"},31776:t=>{t.exports="stopall"},39450:t=>{t.exports="stop"},21939:t=>{t.exports="unlocked"},33019:t=>{t.exports="volume"},76038:(t,e,i)=>{t.exports={COMPLETE:i(77578),DECODED:i(56951),DECODED_ALL:i(19679),DESTROY:i(16436),DETUNE:i(55154),GLOBAL_DETUNE:i(57818),GLOBAL_MUTE:i(57890),GLOBAL_RATE:i(83022),GLOBAL_VOLUME:i(99170),LOOP:i(67214),LOOPED:i(64289),MUTE:i(53128),PAN:i(73078),PAUSE_ALL:i(76763),PAUSE:i(88426),PLAY:i(13765),RATE:i(80291),RESUME_ALL:i(11124),RESUME:i(55382),SEEK:i(71157),STOP_ALL:i(31776),STOP:i(39450),UNLOCKED:i(21939),VOLUME:i(33019)}},34350:(t,e,i)=>{var s=i(25798),n=i(56694),r=i(76038),o=i(82897),a=new n({Extends:s,initialize:function(t,e,i){if(void 0===i&&(i={}),this.tags=t.game.cache.audio.get(e),!this.tags)throw new Error('No cached audio asset with key "'+e);this.audio=null,this.startTime=0,this.previousTime=0,this.duration=this.tags[0].duration,this.totalDuration=this.tags[0].duration,s.call(this,t,e,i)},play:function(t,e){return!this.manager.isLocked(this,"play",[t,e])&&(!!s.prototype.play.call(this,t,e)&&(!!this.pickAndPlayAudioTag()&&(this.emit(r.PLAY,this),!0)))},pause:function(){return!this.manager.isLocked(this,"pause")&&(!(this.startTime>0)&&(!!s.prototype.pause.call(this)&&(this.currentConfig.seek=this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0),this.stopAndReleaseAudioTag(),this.emit(r.PAUSE,this),!0)))},resume:function(){return!this.manager.isLocked(this,"resume")&&(!(this.startTime>0)&&(!!s.prototype.resume.call(this)&&(!!this.pickAndPlayAudioTag()&&(this.emit(r.RESUME,this),!0))))},stop:function(){return!this.manager.isLocked(this,"stop")&&(!!s.prototype.stop.call(this)&&(this.stopAndReleaseAudioTag(),this.emit(r.STOP,this),!0))},pickAndPlayAudioTag:function(){if(!this.pickAudioTag())return this.reset(),!1;var t=this.currentConfig.seek,e=this.currentConfig.delay,i=(this.currentMarker?this.currentMarker.start:0)+t;return this.previousTime=i,this.audio.currentTime=i,this.applyConfig(),0===e?(this.startTime=0,this.audio.paused&&this.playCatchPromise()):(this.startTime=window.performance.now()+1e3*e,this.audio.paused||this.audio.pause()),this.resetConfig(),!0},pickAudioTag:function(){if(this.audio)return!0;for(var t=0;t0)this.startTime=i-this.manager.loopEndOffset?(this.audio.currentTime=e+Math.max(0,s-i),s=this.audio.currentTime):s=i)return this.reset(),this.stopAndReleaseAudioTag(),void this.emit(r.COMPLETE,this);this.previousTime=s}},destroy:function(){s.prototype.destroy.call(this),this.tags=null,this.audio&&this.stopAndReleaseAudioTag()},updateMute:function(){this.audio&&(this.audio.muted=this.currentConfig.mute||this.manager.mute)},updateVolume:function(){this.audio&&(this.audio.volume=o(this.currentConfig.volume*this.manager.volume,0,1))},calculateRate:function(){s.prototype.calculateRate.call(this),this.audio&&(this.audio.playbackRate=this.totalRate)},mute:{get:function(){return this.currentConfig.mute},set:function(t){this.currentConfig.mute=t,this.manager.isLocked(this,"mute",t)||(this.updateMute(),this.emit(r.MUTE,this,t))}},setMute:function(t){return this.mute=t,this},volume:{get:function(){return this.currentConfig.volume},set:function(t){this.currentConfig.volume=t,this.manager.isLocked(this,"volume",t)||(this.updateVolume(),this.emit(r.VOLUME,this,t))}},setVolume:function(t){return this.volume=t,this},rate:{get:function(){return this.currentConfig.rate},set:function(t){this.currentConfig.rate=t,this.manager.isLocked(this,r.RATE,t)||(this.calculateRate(),this.emit(r.RATE,this,t))}},setRate:function(t){return this.rate=t,this},detune:{get:function(){return this.currentConfig.detune},set:function(t){this.currentConfig.detune=t,this.manager.isLocked(this,r.DETUNE,t)||(this.calculateRate(),this.emit(r.DETUNE,this,t))}},setDetune:function(t){return this.detune=t,this},seek:{get:function(){return this.isPlaying?this.audio.currentTime-(this.currentMarker?this.currentMarker.start:0):this.isPaused?this.currentConfig.seek:0},set:function(t){this.manager.isLocked(this,"seek",t)||this.startTime>0||(this.isPlaying||this.isPaused)&&(t=Math.min(Math.max(0,t),this.duration),this.isPlaying?(this.previousTime=t,this.audio.currentTime=t):this.isPaused&&(this.currentConfig.seek=t),this.emit(r.SEEK,this,t))}},setSeek:function(t){return this.seek=t,this},loop:{get:function(){return this.currentConfig.loop},set:function(t){this.currentConfig.loop=t,this.manager.isLocked(this,"loop",t)||(this.audio&&(this.audio.loop=t),this.emit(r.LOOP,this,t))}},setLoop:function(t){return this.loop=t,this},pan:{get:function(){return this.currentConfig.pan},set:function(t){this.currentConfig.pan=t,this.emit(r.PAN,this,t)}},setPan:function(t){return this.pan=t,this}});t.exports=a},27622:(t,e,i)=>{var s=i(12486),n=i(56694),r=i(76038),o=i(34350),a=new n({Extends:s,initialize:function(t){this.override=!0,this.audioPlayDelay=.1,this.loopEndOffset=.05,this.onBlurPausedSounds=[],this.locked="ontouchstart"in window,this.lockedActionsQueue=this.locked?[]:null,this._mute=!1,this._volume=1,s.call(this,t)},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},unlock:function(){this.locked=!1;var t=this;if(this.game.cache.audio.entries.each((function(e,i){for(var s=0;s{t.exports={SoundManagerCreator:i(84191),Events:i(76038),BaseSound:i(25798),BaseSoundManager:i(12486),WebAudioSound:i(96008),WebAudioSoundManager:i(55491),HTML5AudioSound:i(34350),HTML5AudioSoundManager:i(27622),NoAudioSound:i(38662),NoAudioSoundManager:i(17546)}},38662:(t,e,i)=>{var s=i(25798),n=i(56694),r=i(6659),o=i(98611),a=i(72283),h=function(){return!1},l=function(){return null},u=function(){return this},c=new n({Extends:r,initialize:function(t,e,i){void 0===i&&(i={}),r.call(this),this.manager=t,this.key=e,this.isPlaying=!1,this.isPaused=!1,this.totalRate=1,this.duration=0,this.totalDuration=0,this.config=o({mute:!1,volume:1,rate:1,detune:0,seek:0,loop:!1,delay:0,pan:0},i),this.currentConfig=this.config,this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.seek=0,this.loop=!1,this.pan=0,this.markers={},this.currentMarker=null,this.pendingRemove=!1},addMarker:h,updateMarker:h,removeMarker:l,play:h,pause:h,resume:h,stop:h,setMute:u,setVolume:u,setRate:u,setDetune:u,setSeek:u,setLoop:u,setPan:u,applyConfig:l,resetConfig:l,update:a,calculateRate:l,destroy:function(){s.prototype.destroy.call(this)}});t.exports=c},17546:(t,e,i)=>{var s=i(12486),n=i(56694),r=i(6659),o=i(38662),a=i(72283),h=new n({Extends:r,initialize:function(t){r.call(this),this.game=t,this.sounds=[],this.mute=!1,this.volume=1,this.rate=1,this.detune=0,this.pauseOnBlur=!0,this.locked=!1},add:function(t,e){var i=new o(this,t,e);return this.sounds.push(i),i},addAudioSprite:function(t,e){var i=this.add(t,e);return i.spritemap={},i},get:function(t){return s.prototype.get.call(this,t)},getAll:function(t){return s.prototype.getAll.call(this,t)},play:function(t,e){return!1},playAudioSprite:function(t,e,i){return!1},remove:function(t){return s.prototype.remove.call(this,t)},removeAll:function(){return s.prototype.removeAll.call(this)},removeByKey:function(t){return s.prototype.removeByKey.call(this,t)},stopByKey:function(t){return s.prototype.stopByKey.call(this,t)},onBlur:a,onFocus:a,onGameBlur:a,onGameFocus:a,pauseAll:a,resumeAll:a,stopAll:a,update:a,setRate:a,setDetune:a,setMute:a,setVolume:a,unlock:a,forEachActiveSound:function(t,e){s.prototype.forEachActiveSound.call(this,t,e)},destroy:function(){s.prototype.destroy.call(this)}});t.exports=h},96008:(t,e,i)=>{var s=i(25798),n=i(56694),r=i(76038),o=new n({Extends:s,initialize:function(t,e,i){if(void 0===i&&(i={}),this.audioBuffer=t.game.cache.audio.get(e),!this.audioBuffer)throw new Error('Audio key "'+e+'" missing from cache');this.source=null,this.loopSource=null,this.muteNode=t.context.createGain(),this.volumeNode=t.context.createGain(),this.pannerNode=null,this.playTime=0,this.startTime=0,this.loopTime=0,this.rateUpdates=[],this.hasEnded=!1,this.hasLooped=!1,this.muteNode.connect(this.volumeNode),t.context.createStereoPanner?(this.pannerNode=t.context.createStereoPanner(),this.volumeNode.connect(this.pannerNode),this.pannerNode.connect(t.destination)):this.volumeNode.connect(t.destination),this.duration=this.audioBuffer.duration,this.totalDuration=this.audioBuffer.duration,s.call(this,t,e,i)},play:function(t,e){return!!s.prototype.play.call(this,t,e)&&(this.stopAndRemoveBufferSource(),this.createAndStartBufferSource(),this.emit(r.PLAY,this),!0)},pause:function(){return!(this.manager.context.currentTime{var s=i(82329),n=i(12486),r=i(56694),o=i(76038),a=i(97081),h=i(96008),l=new r({Extends:n,initialize:function(t){this.context=this.createAudioContext(t),this.masterMuteNode=this.context.createGain(),this.masterVolumeNode=this.context.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(this.context.destination),this.destination=this.masterMuteNode,this.locked="suspended"===this.context.state&&("ontouchstart"in window||"onclick"in window),n.call(this,t),this.locked&&t.isBooted?this.unlock():t.events.once(a.BOOT,this.unlock,this)},createAudioContext:function(t){var e=t.config.audio;return e.context?(e.context.resume(),e.context):window.hasOwnProperty("AudioContext")?new AudioContext:window.hasOwnProperty("webkitAudioContext")?new window.webkitAudioContext:void 0},setAudioContext:function(t){return this.context&&this.context.close(),this.masterMuteNode&&this.masterMuteNode.disconnect(),this.masterVolumeNode&&this.masterVolumeNode.disconnect(),this.context=t,this.masterMuteNode=t.createGain(),this.masterVolumeNode=t.createGain(),this.masterMuteNode.connect(this.masterVolumeNode),this.masterVolumeNode.connect(t.destination),this.destination=this.masterMuteNode,this},add:function(t,e){var i=new h(this,t,e);return this.sounds.push(i),i},decodeAudio:function(t,e){var i;i=Array.isArray(t)?t:[{key:t,data:e}];for(var n=this.game.cache.audio,r=i.length,a=0;a{var s=i(59959),n=i(56694),r=i(72283),o=i(17922),a=new n({initialize:function(t){this.parent=t,this.list=[],this.position=0,this.addCallback=r,this.removeCallback=r,this._sortKey=""},add:function(t,e){return e?s.Add(this.list,t):s.Add(this.list,t,0,this.addCallback,this)},addAt:function(t,e,i){return i?s.AddAt(this.list,t,e):s.AddAt(this.list,t,e,0,this.addCallback,this)},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(t,e){return t?(void 0===e&&(e=function(e,i){return e[t]-i[t]}),o(this.list,e),this):this},getByName:function(t){return s.GetFirst(this.list,"name",t)},getRandom:function(t,e){return s.GetRandom(this.list,t,e)},getFirst:function(t,e,i,n){return s.GetFirst(this.list,t,e,i,n)},getAll:function(t,e,i,n){return s.GetAll(this.list,t,e,i,n)},count:function(t,e){return s.CountAllMatching(this.list,t,e)},swap:function(t,e){s.Swap(this.list,t,e)},moveTo:function(t,e){return s.MoveTo(this.list,t,e)},moveAbove:function(t,e){return s.MoveAbove(this.list,t,e)},moveBelow:function(t,e){return s.MoveBelow(this.list,t,e)},remove:function(t,e){return e?s.Remove(this.list,t):s.Remove(this.list,t,this.removeCallback,this)},removeAt:function(t,e){return e?s.RemoveAt(this.list,t):s.RemoveAt(this.list,t,this.removeCallback,this)},removeBetween:function(t,e,i){return i?s.RemoveBetween(this.list,t,e):s.RemoveBetween(this.list,t,e,this.removeCallback,this)},removeAll:function(t){for(var e=this.list.length;e--;)this.remove(this.list[e],t);return this},bringToTop:function(t){return s.BringToTop(this.list,t)},sendToBack:function(t){return s.SendToBack(this.list,t)},moveUp:function(t){return s.MoveUp(this.list,t),t},moveDown:function(t){return s.MoveDown(this.list,t),t},reverse:function(){return this.list.reverse(),this},shuffle:function(){return s.Shuffle(this.list),this},replace:function(t,e){return s.Replace(this.list,t,e)},exists:function(t){return this.list.indexOf(t)>-1},setAll:function(t,e,i,n){return s.SetAll(this.list,t,e,i,n),this},each:function(t,e){for(var i=[null],s=2;s0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}}});t.exports=a},33885:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){if(this.entries={},this.size=0,Array.isArray(t))for(var e=0;e{var s=i(56694),n=i(6659),r=i(36716),o=new s({Extends:n,initialize:function(){n.call(this),this._pending=[],this._active=[],this._destroy=[],this._toProcess=0,this.checkQueue=!1},isActive:function(t){return this._active.indexOf(t)>-1},isPending:function(t){return this._toProcess>0&&this._pending.indexOf(t)>-1},isDestroying:function(t){return this._destroy.indexOf(t)>-1},add:function(t){return this.checkQueue&&this.isActive()&&!this.isDestroying()||this.isPending()||(this._pending.push(t),this._toProcess++),t},remove:function(t){if(this.isPending(t)){var e=this._pending,i=e.indexOf(t);-1!==i&&e.splice(i,1)}else this.isActive(t)&&(this._destroy.push(t),this._toProcess++);return t},removeAll:function(){for(var t=this._active,e=this._destroy,i=t.length;i--;)e.push(t[i]),this._toProcess++;return this},update:function(){if(0===this._toProcess)return this._active;var t,e,i=this._destroy,s=this._active;for(t=0;t{var s=i(53466);function n(t){if(!(this instanceof n))return new n(t,[".left",".top",".right",".bottom"]);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}function r(t,e,i){if(!i)return e.indexOf(t);for(var s=0;s=t.minX&&e.maxY>=t.minY}function v(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(t,e,i,n,r){for(var o,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=n||(o=e+Math.ceil((i-e)/n/2)*n,s(t,o,e,i,r),a.push(e,o,o,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],s=this.toBBox;if(!f(t,e))return i;for(var n,r,o,a,h=[];e;){for(n=0,r=e.children.length;n=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},_split:function(t,e){var i=t[e],s=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,s);var r=this._chooseSplitIndex(i,n,s),a=v(i.children.splice(r,i.children.length-r));a.height=i.height,a.leaf=i.leaf,o(i,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=v([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var s,n,r,o,h,l,u,d,p,f,v,g,m,y;for(l=u=1/0,s=e;s<=i-e;s++)n=a(t,0,s,this.toBBox),r=a(t,s,i,this.toBBox),p=n,f=r,v=void 0,g=void 0,m=void 0,y=void 0,v=Math.max(p.minX,f.minX),g=Math.max(p.minY,f.minY),m=Math.min(p.maxX,f.maxX),y=Math.min(p.maxY,f.maxY),o=Math.max(0,m-v)*Math.max(0,y-g),h=c(n)+c(r),o=e;n--)r=t.children[n],h(u,t.leaf?o(r):r),c+=d(u);return c},_adjustParentBBoxes:function(t,e,i){for(var s=i;s>=0;s--)h(e[s],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():o(t[i],this.toBBox)},compareMinX:function(t,e){return t.left-e.left},compareMinY:function(t,e){return t.top-e.top},toBBox:function(t){return{minX:t.left,minY:t.top,maxX:t.right,maxY:t.bottom}}},t.exports=n},58403:(t,e,i)=>{var s=new(i(56694))({initialize:function(t){if(this.entries=[],Array.isArray(t))for(var e=0;e-1&&this.entries.splice(e,1),this},dump:function(){console.group("Set");for(var t=0;t-1},union:function(t){var e=new s;return t.entries.forEach((function(t){e.set(t)})),this.entries.forEach((function(t){e.set(t)})),e},intersect:function(t){var e=new s;return this.entries.forEach((function(i){t.contains(i)&&e.set(i)})),e},difference:function(t){var e=new s;return this.entries.forEach((function(i){t.contains(i)||e.set(i)})),e},size:{get:function(){return this.entries.length},set:function(t){return t{var s=i(82897),n=i(56694),r=i(84314),o=i(93736),a=new n({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=null),this._width=t,this._height=e,this._parent=s,this.aspectMode=i,this.aspectRatio=0===e?1:t/e,this.minWidth=0,this.minHeight=0,this.maxWidth=Number.MAX_VALUE,this.maxHeight=Number.MAX_VALUE,this.snapTo=new o},setAspectMode:function(t){return void 0===t&&(t=0),this.aspectMode=t,this.setSize(this._width,this._height)},setSnap:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.snapTo.set(t,e),this.setSize(this._width,this._height)},setParent:function(t){return this._parent=t,this.setSize(this._width,this._height)},setMin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.minWidth=s(t,0,this.maxWidth),this.minHeight=s(e,0,this.maxHeight),this.setSize(this._width,this._height)},setMax:function(t,e){return void 0===t&&(t=Number.MAX_VALUE),void 0===e&&(e=t),this.maxWidth=s(t,this.minWidth,Number.MAX_VALUE),this.maxHeight=s(e,this.minHeight,Number.MAX_VALUE),this.setSize(this._width,this._height)},setSize:function(t,e){switch(void 0===t&&(t=0),void 0===e&&(e=t),this.aspectMode){case a.NONE:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height;break;case a.WIDTH_CONTROLS_HEIGHT:this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(this._width*(1/this.aspectRatio),!1);break;case a.HEIGHT_CONTROLS_WIDTH:this._height=this.getNewHeight(r(e,this.snapTo.y)),this._width=this.getNewWidth(this._height*this.aspectRatio,!1);break;case a.FIT:this.constrain(t,e,!0);break;case a.ENVELOP:this.constrain(t,e,!1)}return this},setAspectRatio:function(t){return this.aspectRatio=t,this.setSize(this._width,this._height)},resize:function(t,e){return this._width=this.getNewWidth(r(t,this.snapTo.x)),this._height=this.getNewHeight(r(e,this.snapTo.y)),this.aspectRatio=0===this._height?1:this._width/this._height,this},getNewWidth:function(t,e){return void 0===e&&(e=!0),t=s(t,this.minWidth,this.maxWidth),e&&this._parent&&t>this._parent.width&&(t=Math.max(this.minWidth,this._parent.width)),t},getNewHeight:function(t,e){return void 0===e&&(e=!0),t=s(t,this.minHeight,this.maxHeight),e&&this._parent&&t>this._parent.height&&(t=Math.max(this.minHeight,this._parent.height)),t},constrain:function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=!0),t=this.getNewWidth(t),e=this.getNewHeight(e);var s=this.snapTo,n=0===e?1:t/e;return i&&this.aspectRatio>n||!i&&this.aspectRatio0&&(t=(e=r(e,s.y))*this.aspectRatio)):(i&&this.aspectRation)&&(t=(e=r(e,s.y))*this.aspectRatio,s.x>0&&(e=(t=r(t,s.x))*(1/this.aspectRatio))),this._width=t,this._height=e,this},fitTo:function(t,e){return this.constrain(t,e,!0)},envelop:function(t,e){return this.constrain(t,e,!1)},setWidth:function(t){return this.setSize(t,this._height)},setHeight:function(t){return this.setSize(this._width,t)},toString:function(){return"[{ Size (width="+this._width+" height="+this._height+" aspectRatio="+this.aspectRatio+" aspectMode="+this.aspectMode+") }]"},setCSS:function(t){t&&t.style&&(t.style.width=this._width+"px",t.style.height=this._height+"px")},copy:function(t){return t.setAspectMode(this.aspectMode),t.aspectRatio=this.aspectRatio,t.setSize(this.width,this.height)},destroy:function(){this._parent=null,this.snapTo=null},width:{get:function(){return this._width},set:function(t){this.setSize(t,this._height)}},height:{get:function(){return this._height},set:function(t){this.setSize(this._width,t)}}});a.NONE=0,a.WIDTH_CONTROLS_HEIGHT=1,a.HEIGHT_CONTROLS_WIDTH=2,a.FIT=3,a.ENVELOP=4,t.exports=a},94160:t=>{t.exports="add"},95393:t=>{t.exports="remove"},36716:(t,e,i)=>{t.exports={PROCESS_QUEUE_ADD:i(94160),PROCESS_QUEUE_REMOVE:i(95393)}},20010:(t,e,i)=>{t.exports={Events:i(36716),List:i(71207),Map:i(33885),ProcessQueue:i(74623),RTree:i(68687),Set:i(58403),Size:i(90881)}},17487:(t,e,i)=>{var s=i(56694),n=i(82897),r=i(27119),o=i(86459),a=i(28621),h=i(31673),l=new s({Extends:h,initialize:function(t,e,i,s,n){h.call(this,t,e,i,s,n),this.add("__BASE",0,0,0,s,n),this._source=this.frames.__BASE.source,this.canvas=this._source.image,this.context=this.canvas.getContext("2d",{willReadFrequently:!0}),this.width=s,this.height=n,this.imageData=this.context.getImageData(0,0,s,n),this.data=null,this.imageData&&(this.data=this.imageData.data),this.pixels=null,this.buffer,this.data&&(this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data)},update:function(){return this.imageData=this.context.getImageData(0,0,this.width,this.height),this.data=this.imageData.data,this.imageData.data.buffer?(this.buffer=this.imageData.data.buffer,this.pixels=new Uint32Array(this.buffer)):window.ArrayBuffer?(this.buffer=new ArrayBuffer(this.imageData.data.length),this.pixels=new Uint32Array(this.buffer)):this.pixels=this.imageData.data,this.manager.game.config.renderType===o.WEBGL&&this.refresh(),this},draw:function(t,e,i){return this.context.drawImage(i,t,e),this.update()},drawFrame:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0);var n=this.manager.getFrame(t,e);if(n){var r=n.canvasData,o=n.cutWidth,a=n.cutHeight,h=n.source.resolution;return this.context.drawImage(n.source.image,r.x,r.y,o,a,i,s,o/h,a/h),this.update()}return this},setPixel:function(t,e,i,s,n,r){if(void 0===r&&(r=255),t=Math.abs(Math.floor(t)),e=Math.abs(Math.floor(e)),this.getIndex(t,e)>-1){var o=this.context.getImageData(t,e,1,1);o.data[0]=i,o.data[1]=s,o.data[2]=n,o.data[3]=r,this.context.putImageData(o,t,e)}return this},putData:function(t,e,i,s,n,r,o){return void 0===s&&(s=0),void 0===n&&(n=0),void 0===r&&(r=t.width),void 0===o&&(o=t.height),this.context.putImageData(t,e,i,s,n,r,o),this},getData:function(t,e,i,s){return t=n(Math.floor(t),0,this.width-1),e=n(Math.floor(e),0,this.height-1),i=n(i,1,this.width-t),s=n(s,1,this.height-e),this.context.getImageData(t,e,i,s)},getPixel:function(t,e,i){i||(i=new r);var s=this.getIndex(t,e);if(s>-1){var n=this.data,o=n[s+0],a=n[s+1],h=n[s+2],l=n[s+3];i.setTo(o,a,h,l)}return i},getPixels:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.width),void 0===s&&(s=i),t=Math.abs(Math.round(t)),e=Math.abs(Math.round(e));for(var o=n(t,0,this.width),a=n(t+i,0,this.width),h=n(e,0,this.height),l=n(e+s,0,this.height),u=new r,c=[],d=h;d{var s=i(95723),n=i(51052),r=i(61068),o=i(56694),a=i(86459),h=i(82047),l=i(72632),u=i(65641),c=i(37410),d=i(31673),p=i(75512),f=new o({Extends:d,initialize:function(t,e,i,s){void 0===i&&(i=256),void 0===s&&(s=256),this.type="DynamicTexture";var o=t.game.renderer,h=o&&o.type===a.CANVAS,l=h?r.create2D(this,i,s):[this];d.call(this,t,e,l,i,s),this.add("__BASE",0,0,0,i,s),this.renderer=o,this.isDrawing=!1,this.canvas=h?l:null,this.context=h?l.getContext("2d"):null,this.dirty=!1,this.isSpriteTexture=!0,this._eraseMode=!1,this.camera=new n(0,0,i,s).setScene(t.game.scene.systemScene,!1),this.renderTarget=h?null:new c(o,i,s,1,0,!1),this.pipeline=h?null:o.pipelines.get(u.SINGLE_PIPELINE),this.setSize(i,s)},setSize:function(t,e){void 0===e&&(e=t);var i=this.get(),s=i.source;if(t!==this.width||e!==this.height){this.canvas&&(this.canvas.width=t,this.canvas.height=e);var n=this.renderTarget;n&&(n.resize(t,e),i.glTexture=n.texture,s.isRenderTexture=!0,s.isGLTexture=!0,s.glTexture=n.texture,s.glTexture.flipY=!0),this.camera.setSize(t,e),s.width=t,s.height=e,i.setSize(t,e),this.width=t,this.height=e}else{var r=this.getSourceImage();i.cutX+t>r.width&&(t=r.width-i.cutX),i.cutY+e>r.height&&(e=r.height-i.cutY),i.setSize(t,e,i.cutX,i.cutY)}return this},setIsSpriteTexture:function(t){return this.isSpriteTexture=t,this},fill:function(t,e,i,s,n,r){var o=this.camera,a=this.renderer;void 0===e&&(e=1),void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=this.width),void 0===r&&(r=this.height);var h=t>>16&255,l=t>>8&255,u=255&t,c=this.renderTarget;if(o.preRender(),c){c.bind(!0);var d=this.pipeline.manager.set(this.pipeline),f=a.width/c.width,v=a.height/c.height;d.drawFillRect(i*f,s*v,n*f,r*v,p.getTintFromFloats(u/255,l/255,h/255,1),e),c.unbind(!0)}else{var g=this.context;a.setContext(g),g.globalCompositeOperation="source-over",g.fillStyle="rgba("+h+","+l+","+u+","+e+")",g.fillRect(i,s,n,r),a.setContext()}return this.dirty=!0,this},clear:function(){if(this.dirty){var t=this.context,e=this.renderTarget;e?e.clear():t&&(t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,this.width,this.height),t.restore()),this.dirty=!1}return this},stamp:function(t,e,i,s,n){void 0===i&&(i=0),void 0===s&&(s=0);var r=l(n,"alpha",1),o=l(n,"tint",16777215),a=l(n,"angle",0),h=l(n,"rotation",0),u=l(n,"scale",1),c=l(n,"scaleX",u),d=l(n,"scaleY",u),p=l(n,"originX",.5),f=l(n,"originY",.5),v=l(n,"blendMode",0),g=l(n,"erase",!1),m=this.manager.resetStamp(r,o);return m.setAngle(0),0!==a?m.setAngle(a):0!==h&&m.setRotation(h),m.setScale(c,d),m.setTexture(t,e),m.setOrigin(p,f),m.setBlendMode(v),g&&(this._eraseMode=!0),this.draw(m,i,s),g&&(this._eraseMode=!1),this},erase:function(t,e,i){return this._eraseMode=!0,this.draw(t,e,i),this._eraseMode=!1,this},draw:function(t,e,i,s,n){return this.beginDraw(),this.batchDraw(t,e,i,s,n),this.endDraw(),this},drawFrame:function(t,e,i,s,n,r){return this.beginDraw(),this.batchDrawFrame(t,e,i,s,n,r),this.endDraw(),this},repeat:function(t,e,i,s,n,r,o,a,l){if(void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=this.width),void 0===r&&(r=this.height),void 0===o&&(o=1),void 0===a&&(a=16777215),void 0===l&&(l=!1),!(e=t instanceof h?t:this.manager.getFrame(t,e)))return this;var u=this.manager.resetStamp(o,a);u.setFrame(e),u.setOrigin(0);var c=e.width,d=e.height;n=Math.floor(n),r=Math.floor(r);var p=Math.ceil(n/c),f=Math.ceil(r/d),v=p*c-n,g=f*d-r;v>0&&(v=c-v),g>0&&(g=d-g),i<0&&(p+=Math.ceil(Math.abs(i)/c)),s<0&&(f+=Math.ceil(Math.abs(s)/d));var m=i,y=s,x=!1,T=this.manager.stampCrop.setTo(0,0,c,d);l||this.beginDraw();for(var w=0;w0&&b===p-1&&(x=!0,T.width=v),g>0&&w===f-1&&(x=!0,T.height=g),x&&u.setCrop(T),this.batchGameObject(u,m,y),u.isCropped=!1,T.setTo(0,0,c,d)),m+=c;m=i,y+=d}return l||this.endDraw(),this},beginDraw:function(){if(!this.isDrawing){var t=this.camera,e=this.renderer,i=this.renderTarget;t.preRender(),i?e.beginCapture(i.width,i.height):e.setContext(this.context),this.isDrawing=!0}return this},batchDraw:function(t,e,i,s,n){return Array.isArray(t)||(t=[t]),this.batchList(t,e,i,s,n),this},batchDrawFrame:function(t,e,i,s,n,r){void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=1),void 0===r&&(r=16777215);var o=this.manager.getFrame(t,e);return o&&(this.renderTarget?this.pipeline.batchTextureFrame(o,i,s,r,n,this.camera.matrix,null):this.batchTextureFrame(o,i,s,n,r)),this},endDraw:function(t){if(void 0===t&&(t=this._eraseMode),this.isDrawing){var e=this.renderer,i=this.renderTarget;if(i){var s=e.endCapture();e.pipelines.setUtility().blitFrame(s,i,1,!1,!1,t,this.isSpriteTexture),e.resetScissor(),e.resetViewport()}else e.setContext();this.dirty=!0,this.isDrawing=!1}return this},batchList:function(t,e,i,s,n){var r=t.length;if(0!==r)for(var o=0;o0&&a.height>0&&o.drawImage(h,a.x,a.y,a.width,a.height,e,i,a.width,a.height),o.restore()}},snapshotArea:function(t,e,i,s,n,r,o){return this.renderTarget?this.renderer.snapshotFramebuffer(this.renderTarget.framebuffer,this.width,this.height,n,!1,t,e,i,s,r,o):this.renderer.snapshotCanvas(this.canvas,n,!1,t,e,i,s,r,o),this},snapshot:function(t,e,i){return this.snapshotArea(0,0,this.width,this.height,t,e,i)},snapshotPixel:function(t,e,i){return this.snapshotArea(t,e,1,1,i,"pixel")},renderWebGL:function(t,e,i,s){var n=this.manager.resetStamp();n.setTexture(this),n.setOrigin(0),n.renderWebGL(t,n,i,s)},renderCanvas:function(){},preDestroy:function(){r.remove(this.canvas),this.renderTarget&&this.renderTarget.destroy(),this.camera.destroy(),this.stamp.destroy(),this.canvas=null,this.context=null,this.renderer=null,this.scene=null}});t.exports=f},82047:(t,e,i)=>{var s=i(56694),n=i(82897),r=i(98611),o=new s({initialize:function(t,e,i,s,n,r,o){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(r,o,s,n)},setSize:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0),this.cutX=i,this.cutY=s,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var n=this.data,r=n.cut;r.x=i,r.y=s,r.w=t,r.h=e,r.r=i+t,r.b=s+e,n.sourceSize.w=t,n.sourceSize.h=e,n.spriteSourceSize.w=t,n.spriteSourceSize.h=e,n.radius=.5*Math.sqrt(t*t+e*e);var o=n.drawImage;return o.x=i,o.y=s,o.width=t,o.height=e,this.updateUVs()},setTrim:function(t,e,i,s,n,r){var o=this.data,a=o.spriteSourceSize;return o.trim=!0,o.sourceSize.w=t,o.sourceSize.h=e,a.x=i,a.y=s,a.w=n,a.h=r,a.r=i+n,a.b=s+r,this.x=i,this.y=s,this.width=n,this.height=r,this.halfWidth=.5*n,this.halfHeight=.5*r,this.centerX=Math.floor(n/2),this.centerY=Math.floor(r/2),this.updateUVs()},setCropUVs:function(t,e,i,s,r,o,a){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,p=this.realHeight,f=h+(e=n(e,0,d)),v=l+(i=n(i,0,p)),g=s=n(s,0,d-e),m=r=n(r,0,p-i),y=this.data;if(y.trim){var x=y.spriteSourceSize,T=e+(s=n(s,0,u-e)),w=i+(r=n(r,0,c-i));if(!(x.rT||x.y>w)){var b=Math.max(x.x,e),E=Math.max(x.y,i),S=Math.min(x.r,T)-b,A=Math.min(x.b,w)-E;g=S,m=A,f=o?h+(u-(b-x.x)-S):h+(b-x.x),v=a?l+(c-(E-x.y)-A):l+(E-x.y),e=b,i=E,s=S,r=A}else f=0,v=0,g=0,m=0}else o&&(f=h+(u-e-s)),a&&(v=l+(c-i-r));var C=this.source.width,_=this.source.height;return t.u0=Math.max(0,f/C),t.v0=Math.max(0,v/_),t.u1=Math.min(1,(f+g)/C),t.v1=Math.min(1,(v+m)/_),t.x=e,t.y=i,t.cx=f,t.cy=v,t.cw=g,t.ch=m,t.width=s,t.height=r,t.flipX=o,t.flipY=a,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,s,n,r){var o=this.data.drawImage;return o.width=t,o.height=e,this.u0=i,this.v0=s,this.u1=n,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,s=this.cutHeight,n=this.data.drawImage;n.width=i,n.height=s;var r=this.source.width,o=this.source.height;return this.u0=t/r,this.v0=e/o,this.u1=(t+i)/r,this.v1=(e+s)/o,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new o(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=r(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=o},31673:(t,e,i)=>{var s=i(56694),n=i(82047),r=i(32547),o='Texture "%s" has no frame "%s"',a=new s({initialize:function(t,e,i,s,n){Array.isArray(i)||(i=[i]),this.manager=t,this.key=e,this.source=[],this.dataSource=[],this.frames={},this.customData={},this.firstFrame="__BASE",this.frameTotal=0;for(var o=0;o{var s=i(61068),n=i(17487),r=i(56694),o=i(27119),a=i(86459),h=i(845),l=i(6659),u=i(38203),c=i(82047),d=i(97081),p=i(52780),f=i(10850),v=i(1539),g=i(42911),m=i(69150),y=i(74118),x=i(31673),T=new r({Extends:l,initialize:function(t){l.call(this),this.game=t,this.name="TextureManager",this.list={},this._tempCanvas=s.create2D(this),this._tempContext=this._tempCanvas.getContext("2d",{willReadFrequently:!0}),this._pending=0,this.stamp,this.stampCrop=new y,this.silentWarnings=!1,t.events.once(d.BOOT,this.boot,this)},boot:function(){this._pending=3,this.on(u.LOAD,this.updatePending,this),this.on(u.ERROR,this.updatePending,this);var t=this.game.config;this.addBase64("__DEFAULT",t.defaultImage),this.addBase64("__MISSING",t.missingImage),this.addBase64("__WHITE",t.whiteImage),this.game.events.once(d.DESTROY,this.destroy,this)},updatePending:function(){this._pending--,0===this._pending&&(this.off(u.LOAD),this.off(u.ERROR),this.emit(u.READY),this.stamp=new v(this.game.scene.systemScene).setOrigin(0))},checkKey:function(t){return!this.exists(t)||(this.silentWarnings||console.error("Texture key already in use: "+t),!1)},remove:function(t){if("string"==typeof t){if(!this.exists(t))return this.silentWarnings||console.warn("No texture found matching key: "+t),this;t=this.get(t)}return this.list.hasOwnProperty(t.key)&&(t.destroy(),this.emit(u.REMOVE,t.key),this.emit(u.REMOVE_KEY+t.key)),this},removeKey:function(t){return this.list.hasOwnProperty(t)&&delete this.list[t],this},addBase64:function(t,e){if(this.checkKey(t)){var i=this,s=new Image;s.onerror=function(){i.emit(u.ERROR,t)},s.onload=function(){var e=i.create(t,s);m.Image(e,0),i.emit(u.ADD,t,e),i.emit(u.ADD_KEY+t,e),i.emit(u.LOAD,t,e)},s.src=e}return this},getBase64:function(t,e,i,n){void 0===i&&(i="image/png"),void 0===n&&(n=.92);var r="",o=this.getFrame(t,e);if(o&&(o.source.isRenderTexture||o.source.isGLTexture))this.silentWarnings||console.warn("Cannot getBase64 from WebGL Texture");else if(o){var a=o.canvasData,h=s.create2D(this,a.width,a.height),l=h.getContext("2d");a.width>0&&a.height>0&&l.drawImage(o.source.image,a.x,a.y,a.width,a.height,0,0,a.width,a.height),r=h.toDataURL(i,n),s.remove(h)}return r},addImage:function(t,e,i){var s=null;return this.checkKey(t)&&(s=this.create(t,e),m.Image(s,0),i&&s.setDataSource(i),this.emit(u.ADD,t,s),this.emit(u.ADD_KEY+t,s)),s},addGLTexture:function(t,e,i,s){var n=null;return this.checkKey(t)&&(void 0===i&&(i=e.width),void 0===s&&(s=e.height),(n=this.create(t,e,i,s)).add("__BASE",0,0,0,i,s),this.emit(u.ADD,t,n),this.emit(u.ADD_KEY+t,n)),n},addCompressedTexture:function(t,e,i){var s=null;if(this.checkKey(t)){if((s=this.create(t,e)).add("__BASE",0,0,0,e.width,e.height),i)if(Array.isArray(i))for(var n=0;n=r.x&&t=r.y&&e=r.x&&t=r.y&&e{var s=i(61068),n=i(56694),r=i(28621),o=i(27394),a=new n({initialize:function(t,e,i,s,n){void 0===n&&(n=!1);var a=t.manager.game;this.renderer=a.renderer,this.texture=t,this.source=e,this.image=e.compressed?null:e,this.compressionAlgorithm=e.compressed?e.format:null,this.resolution=1,this.width=i||e.naturalWidth||e.videoWidth||e.width||0,this.height=s||e.naturalHeight||e.videoHeight||e.height||0,this.scaleMode=o.DEFAULT,this.isCanvas=e instanceof HTMLCanvasElement,this.isVideo=window.hasOwnProperty("HTMLVideoElement")&&e instanceof HTMLVideoElement,this.isRenderTexture="RenderTexture"===e.type||"DynamicTexture"===e.type,this.isGLTexture=window.hasOwnProperty("WebGLTexture")&&e instanceof WebGLTexture,this.isPowerOf2=r(this.width,this.height),this.glTexture=null,this.flipY=n,this.init(a)},init:function(t){var e=this.renderer;if(e){var i=this.source;if(e.gl){var s=this.image,n=this.flipY,r=this.width,o=this.height,a=this.scaleMode;this.isCanvas?this.glTexture=e.createCanvasTexture(s,!1,n):this.isVideo?this.glTexture=e.createVideoTexture(s,!1,n):this.isRenderTexture?this.glTexture=e.createTextureFromSource(null,r,o,a):this.isGLTexture?this.glTexture=i:this.compressionAlgorithm?this.glTexture=e.createTextureFromSource(i):this.glTexture=e.createTextureFromSource(s,r,o,a)}else this.isRenderTexture&&(this.image=i.canvas)}t.config.antialias||this.setFilter(1)},setFilter:function(t){this.renderer.gl&&this.renderer.setTextureFilter(this.glTexture,t),this.scaleMode=t},setFlipY:function(t){return void 0===t&&(t=!0),this.flipY=t,this},update:function(){var t=this.renderer,e=this.image,i=this.flipY,s=t.gl;s&&this.isCanvas?this.glTexture=t.updateCanvasTexture(e,this.glTexture,i):s&&this.isVideo&&(this.glTexture=t.updateVideoTexture(e,this.glTexture,i))},destroy:function(){this.glTexture&&this.renderer.deleteTexture(this.glTexture,!0),this.isCanvas&&s.remove(this.image),this.renderer=null,this.texture=null,this.source=null,this.image=null,this.glTexture=null}});t.exports=a},65154:t=>{t.exports={LINEAR:0,NEAREST:1}},49644:t=>{t.exports="addtexture"},29569:t=>{t.exports="addtexture-"},60079:t=>{t.exports="onerror"},72665:t=>{t.exports="onload"},93006:t=>{t.exports="ready"},69018:t=>{t.exports="removetexture"},85549:t=>{t.exports="removetexture-"},38203:(t,e,i)=>{t.exports={ADD:i(49644),ADD_KEY:i(29569),ERROR:i(60079),LOAD:i(72665),READY:i(93006),REMOVE:i(69018),REMOVE_KEY:i(85549)}},87499:(t,e,i)=>{var s=i(98611),n=i(65154),r={CanvasTexture:i(17487),DynamicTexture:i(845),Events:i(38203),FilterMode:n,Frame:i(82047),Parsers:i(69150),Texture:i(31673),TextureManager:i(6237),TextureSource:i(32547)};r=s(!1,r,n),t.exports=r},35082:t=>{t.exports=function(t,e,i){if(i.getElementsByTagName("TextureAtlas")){var s=t.source[e];t.add("__BASE",e,0,0,s.width,s.height);for(var n,r=i.getElementsByTagName("SubTexture"),o=0;o{t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},21560:t=>{t.exports=function(t,e){var i=t.source[e];return t.add("__BASE",e,0,0,i.width,i.height),t}},64423:(t,e,i)=>{var s=i(32742);t.exports=function(t,e,i){if(i.frames||i.textures){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);for(var r,o=Array.isArray(i.textures)?i.textures[e].frames:i.frames,a=0;a{var s=i(32742);t.exports=function(t,e,i){if(i.frames){var n=t.source[e];t.add("__BASE",e,0,0,n.width,n.height);var r,o=i.frames;for(var a in o)if(o.hasOwnProperty(a)){var h=o[a];if(r=t.add(a,e,h.frame.x,h.frame.y,h.frame.w,h.frame.h)){h.trimmed&&r.setTrim(h.sourceSize.w,h.sourceSize.h,h.spriteSourceSize.x,h.spriteSourceSize.y,h.spriteSourceSize.w,h.spriteSourceSize.h),h.rotated&&(r.rotated=!0,r.updateUVsInverted());var l=h.anchor||h.pivot;l&&(r.customPivot=!0,r.pivotX=l.x,r.pivotY=l.y),r.customData=s(h)}else console.warn("Invalid atlas json, frame already exists: "+a)}for(var u in i)"frames"!==u&&(Array.isArray(i[u])?t.customData[u]=i[u].slice(0):t.customData[u]=i[u]);return t}console.warn("Invalid Texture Atlas JSON Hash given, missing 'frames' Object")}},67409:t=>{t.exports=function(t){var e,i=[171,75,84,88,32,49,49,187,13,10,26,10],s=new Uint8Array(t,0,12);for(e=0;e>1),v=Math.max(1,v>>1),p+=g}return{mipmaps:d,width:h,height:l,internalFormat:a,compressed:!0,generateMipmap:!1}}console.warn("KTXParser - Only compressed formats supported")}},24904:t=>{function e(t,e,i,s,n,r,o){return void 0===o&&(o=16),Math.floor((t+i)/n)*Math.floor((e+s)/r)*o}function i(t,e){return(t=Math.max(t,16))*(e=Math.max(e,8))/4}function s(t,e){return(t=Math.max(t,8))*(e=Math.max(e,8))/2}function n(t,i){return e(t,i,3,3,4,4,8)}function r(t,i){return e(t,i,3,3,4,4)}var o={0:{sizeFunc:i,glFormat:35841},1:{sizeFunc:i,glFormat:35843},2:{sizeFunc:s,glFormat:35840},3:{sizeFunc:s,glFormat:35842},6:{sizeFunc:n,glFormat:36196},7:{sizeFunc:n,glFormat:33776},8:{sizeFunc:r,glFormat:33777},9:{sizeFunc:r,glFormat:33778},11:{sizeFunc:r,glFormat:33779},22:{sizeFunc:n,glFormat:37492},23:{sizeFunc:r,glFormat:37496},24:{sizeFunc:n,glFormat:37494},25:{sizeFunc:n,glFormat:37488},26:{sizeFunc:r,glFormat:37490},27:{sizeFunc:r,glFormat:37808},28:{sizeFunc:function(t,i){return e(t,i,4,3,5,4)},glFormat:37809},29:{sizeFunc:function(t,i){return e(t,i,4,4,5,5)},glFormat:37810},30:{sizeFunc:function(t,i){return e(t,i,5,4,6,5)},glFormat:37811},31:{sizeFunc:function(t,i){return e(t,i,5,5,6,6)},glFormat:37812},32:{sizeFunc:function(t,i){return e(t,i,7,4,8,5)},glFormat:37813},33:{sizeFunc:function(t,i){return e(t,i,7,5,8,6)},glFormat:37814},34:{sizeFunc:function(t,i){return e(t,i,7,7,8,8)},glFormat:37815},35:{sizeFunc:function(t,i){return e(t,i,9,4,10,5)},glFormat:37816},36:{sizeFunc:function(t,i){return e(t,i,9,5,10,6)},glFormat:37817},37:{sizeFunc:function(t,i){return e(t,i,9,7,10,8)},glFormat:37818},38:{sizeFunc:function(t,i){return e(t,i,9,9,10,10)},glFormat:37819},39:{sizeFunc:function(t,i){return e(t,i,11,9,12,10)},glFormat:37820},40:{sizeFunc:function(t,i){return e(t,i,11,11,12,12)},glFormat:37821}};t.exports=function(t){for(var e=new Uint32Array(t,0,13),i=e[2],s=o[i].glFormat,n=o[i].sizeFunc,r=e[11],a=e[7],h=e[6],l=52+e[12],u=new Uint8Array(t,l),c=new Array(r),d=0,p=a,f=h,v=0;v>1),f=Math.max(1,f>>1),d+=g}return{mipmaps:c,width:a,height:h,internalFormat:s,compressed:!0,generateMipmap:!1}}},6143:(t,e,i)=>{var s=i(72632);t.exports=function(t,e,i,n,r,o,a){var h=s(a,"frameWidth",null),l=s(a,"frameHeight",h);if(null===h)throw new Error("TextureManager.SpriteSheet: Invalid frameWidth given.");var u=t.source[e];t.add("__BASE",e,0,0,u.width,u.height);var c=s(a,"startFrame",0),d=s(a,"endFrame",-1),p=s(a,"margin",0),f=s(a,"spacing",0),v=Math.floor((r-p+f)/(h+f))*Math.floor((o-p+f)/(l+f));0===v&&console.warn("SpriteSheet frame dimensions will result in zero frames for texture:",t.key),(c>v||c<-v)&&(c=0),c<0&&(c=v+c),(-1===d||d>v||dr&&(y=b-r),E>o&&(x=E-o),w>=c&&w<=d&&(t.add(T,e,i+g,n+m,h-y,l-x),T++),(g+=h+f)+h>r&&(g=p,m+=l+f)}return t}},20030:(t,e,i)=>{var s=i(72632);t.exports=function(t,e,i){var n=s(i,"frameWidth",null),r=s(i,"frameHeight",n);if(!n)throw new Error("TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.");var o=t.source[0];t.add("__BASE",0,0,0,o.width,o.height);var a,h=s(i,"startFrame",0),l=s(i,"endFrame",-1),u=s(i,"margin",0),c=s(i,"spacing",0),d=e.cutX,p=e.cutY,f=e.cutWidth,v=e.cutHeight,g=e.realWidth,m=e.realHeight,y=Math.floor((g-u+c)/(n+c)),x=Math.floor((m-u+c)/(r+c)),T=y*x,w=e.x,b=n-w,E=n-(g-f-w),S=e.y,A=r-S,C=r-(m-v-S);(h>T||h<-T)&&(h=0),h<0&&(h=T+h),-1!==l&&(T=h+(l+1));for(var _=u,M=u,R=0,P=e.sourceIndex,O=0;O{var e=0,i=function(t,i,s,n){var r=e-n.y-n.height;t.add(s,i,n.x,r,n.width,n.height)};t.exports=function(t,s,n){var r=t.source[s];t.add("__BASE",s,0,0,r.width,r.height),e=r.height;for(var o=n.split("\n"),a=/^[ ]*(- )*(\w+)+[: ]+(.*)/,h="",l="",u={x:0,y:0,width:0,height:0},c=0;c{t.exports={AtlasXML:i(35082),Canvas:i(83332),Image:i(21560),JSONArray:i(64423),JSONHash:i(17264),KTXParser:i(67409),PVRParser:i(24904),SpriteSheet:i(6143),SpriteSheetFromAtlas:i(20030),UnityYAML:i(89187)}},93560:t=>{t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},97042:(t,e,i)=>{var s=new(i(56694))({initialize:function(t,e,i,s,n,r,o){(void 0===i||i<=0)&&(i=32),(void 0===s||s<=0)&&(s=32),void 0===n&&(n=0),void 0===r&&(r=0),this.name=t,this.firstgid=0|e,this.imageWidth=0|i,this.imageHeight=0|s,this.imageMargin=0|n,this.imageSpacing=0|r,this.properties=o||{},this.images=[],this.total=0},containsImageIndex:function(t){return t>=this.firstgid&&t{var s=new(i(56694))({initialize:function(t){if(this.gids=[],void 0!==t)for(var e=0;e{var s=i(93560),n=i(16586),r=i(90715),o=i(89797);t.exports=function(t,e,i,a,h,l,u,c){void 0===i&&(i=32),void 0===a&&(a=32),void 0===h&&(h=10),void 0===l&&(l=10),void 0===c&&(c=!1);var d=null;if(Array.isArray(u))d=r(void 0!==e?e:"map",s.ARRAY_2D,u,i,a,c);else if(void 0!==e){var p=t.cache.tilemap.get(e);p?d=r(e,p.format,p.data,i,a,c):console.warn("No map data found for key "+e)}return null===d&&(d=new n({tileWidth:i,tileHeight:a,width:h,height:l})),new o(t,d)}},29633:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(12920),o=i(28699),a=i(66658),h=new s({Mixins:[n.Alpha,n.Flip,n.Visible],initialize:function(t,e,i,s,n,r,o,a){this.layer=t,this.index=e,this.x=i,this.y=s,this.width=n,this.height=r,this.right,this.bottom,this.baseWidth=void 0!==o?o:n,this.baseHeight=void 0!==a?a:r,this.pixelX=0,this.pixelY=0,this.updatePixelXY(),this.properties={},this.rotation=0,this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceLeft=!1,this.faceRight=!1,this.faceTop=!1,this.faceBottom=!1,this.collisionCallback=void 0,this.collisionCallbackContext=this,this.tint=16777215,this.physics={}},containsPoint:function(t,e){return!(tthis.right||e>this.bottom)},copy:function(t){return this.index=t.index,this.alpha=t.alpha,this.properties=o(t.properties),this.visible=t.visible,this.setFlip(t.flipX,t.flipY),this.tint=t.tint,this.rotation=t.rotation,this.collideUp=t.collideUp,this.collideDown=t.collideDown,this.collideLeft=t.collideLeft,this.collideRight=t.collideRight,this.collisionCallback=t.collisionCallback,this.collisionCallbackContext=t.collisionCallbackContext,this},getCollisionGroup:function(){return this.tileset?this.tileset.getTileCollisionGroup(this.index):null},getTileData:function(){return this.tileset?this.tileset.getTileData(this.index):null},getLeft:function(t){var e=this.tilemapLayer;return e?e.tileToWorldXY(this.x,this.y,void 0,t).x:this.x*this.baseWidth},getRight:function(t){var e=this.tilemapLayer;return e?this.getLeft(t)+this.width*e.scaleX:this.getLeft(t)+this.width},getTop:function(t){var e=this.tilemapLayer;return e?e.tileToWorldXY(this.x,this.y,void 0,t).y:this.y*this.baseWidth-(this.height-this.baseHeight)},getBottom:function(t){var e=this.tilemapLayer;return e?this.getTop(t)+this.height*e.scaleY:this.getTop(t)+this.height},getBounds:function(t,e){return void 0===e&&(e=new a),e.x=this.getLeft(t),e.y=this.getTop(t),e.width=this.getRight(t)-e.x,e.height=this.getBottom(t)-e.y,e},getCenterX:function(t){return(this.getLeft(t)+this.getRight(t))/2},getCenterY:function(t){return(this.getTop(t)+this.getBottom(t))/2},intersects:function(t,e,i,s){return!(i<=this.pixelX||s<=this.pixelY||t>=this.right||e>=this.bottom)},isInteresting:function(t,e){return t&&e?this.canCollide||this.hasInterestingFace:t?this.collides:!!e&&this.hasInterestingFace},resetCollision:function(t){(void 0===t&&(t=!0),this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,t)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},resetFaces:function(){return this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1,this},setCollision:function(t,e,i,s,n){(void 0===e&&(e=t),void 0===i&&(i=t),void 0===s&&(s=t),void 0===n&&(n=!0),this.collideLeft=t,this.collideRight=e,this.collideUp=i,this.collideDown=s,this.faceLeft=t,this.faceRight=e,this.faceTop=i,this.faceBottom=s,n)&&(this.tilemapLayer&&this.tilemapLayer.calculateFacesAt(this.x,this.y));return this},setCollisionCallback:function(t,e){return null===t?(this.collisionCallback=void 0,this.collisionCallbackContext=void 0):(this.collisionCallback=t,this.collisionCallbackContext=e),this},setSize:function(t,e,i,s){return void 0!==t&&(this.width=t),void 0!==e&&(this.height=e),void 0!==i&&(this.baseWidth=i),void 0!==s&&(this.baseHeight=s),this.updatePixelXY(),this},updatePixelXY:function(){var t=this.layer.orientation;if(t===r.ORTHOGONAL)this.pixelX=this.x*this.baseWidth,this.pixelY=this.y*this.baseHeight;else if(t===r.ISOMETRIC)this.pixelX=(this.x-this.y)*this.baseWidth*.5,this.pixelY=(this.x+this.y)*this.baseHeight*.5;else if(t===r.STAGGERED)this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*(this.baseHeight/2);else if(t===r.HEXAGONAL){var e=this.layer.hexSideLength,i=(this.baseHeight-e)/2+e;this.pixelX=this.x*this.baseWidth+this.y%2*(this.baseWidth/2),this.pixelY=this.y*i}return this.right=this.pixelX+this.baseWidth,this.bottom=this.pixelY+this.baseHeight,this},destroy:function(){this.collisionCallback=void 0,this.collisionCallbackContext=void 0,this.properties=void 0},canCollide:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown||void 0!==this.collisionCallback}},collides:{get:function(){return this.collideLeft||this.collideRight||this.collideUp||this.collideDown}},hasInterestingFace:{get:function(){return this.faceTop||this.faceBottom||this.faceLeft||this.faceRight}},tileset:{get:function(){var t=this.layer.tilemapLayer;if(t){var e=t.gidMap[this.index];if(e)return e}return null}},tilemapLayer:{get:function(){return this.layer.tilemapLayer}},tilemap:{get:function(){var t=this.tilemapLayer;return t?t.tilemap:null}}});t.exports=h},89797:(t,e,i)=>{var s=i(56694),n=i(75606),r=i(93560),o=i(72632),a=i(94990),h=i(46422),l=i(12920),u=i(52257),c=i(72677),d=i(13747),p=i(29633),f=i(5047),v=i(87177),g=i(47975),m=new s({initialize:function(t,e){this.scene=t,this.tileWidth=e.tileWidth,this.tileHeight=e.tileHeight,this.width=e.width,this.height=e.height,this.orientation=e.orientation,this.renderOrder=e.renderOrder,this.format=e.format,this.version=e.version,this.properties=e.properties,this.widthInPixels=e.widthInPixels,this.heightInPixels=e.heightInPixels,this.imageCollections=e.imageCollections,this.images=e.images,this.layers=e.layers,this.tilesets=e.tilesets,this.objects=e.objects,this.currentLayerIndex=0,this.hexSideLength=e.hexSideLength;var i=this.orientation;this._convert={WorldToTileXY:f.GetWorldToTileXYFunction(i),WorldToTileX:f.GetWorldToTileXFunction(i),WorldToTileY:f.GetWorldToTileYFunction(i),TileToWorldXY:f.GetTileToWorldXYFunction(i),TileToWorldX:f.GetTileToWorldXFunction(i),TileToWorldY:f.GetTileToWorldYFunction(i),GetTileCorners:f.GetTileCornersFunction(i)}},setRenderOrder:function(t){var e=["right-down","left-down","right-up","left-up"];return"number"==typeof t&&(t=e[t]),e.indexOf(t)>-1&&(this.renderOrder=t),this},addTilesetImage:function(t,e,i,s,n,o,a){if(void 0===t)return null;if(null==e&&(e=t),!this.scene.sys.textures.exists(e))return console.warn("Invalid Tileset Image: "+e),null;var h=this.scene.sys.textures.get(e),l=this.getTilesetIndex(t);if(null===l&&this.format===r.TILED_JSON)return console.warn("No data found for Tileset: "+t),null;var u=this.tilesets[l];return u?(u.setTileSize(i,s),u.setSpacing(n,o),u.setImage(h),u):(void 0===i&&(i=this.tileWidth),void 0===s&&(s=this.tileHeight),void 0===n&&(n=0),void 0===o&&(o=0),void 0===a&&(a=0),(u=new g(t,a,i,s,n,o)).setImage(h),this.tilesets.push(u),u)},copy:function(t,e,i,s,n,r,o,a){return null!==(a=this.getLayer(a))?(f.Copy(t,e,i,s,n,r,o,a),this):null},createBlankLayer:function(t,e,i,s,n,r,o,h){if(void 0===i&&(i=0),void 0===s&&(s=0),void 0===n&&(n=this.width),void 0===r&&(r=this.height),void 0===o&&(o=this.tileWidth),void 0===h&&(h=this.tileHeight),null!==this.getLayerIndex(t))return console.warn("Invalid Tilemap Layer ID: "+t),null;for(var l,u=new a({name:t,tileWidth:o,tileHeight:h,width:n,height:r,orientation:this.orientation}),c=0;c-1&&this.putTileAt(e,r.x,r.y,i,r.tilemapLayer)}return s},removeTileAt:function(t,e,i,s,n){return void 0===i&&(i=!0),void 0===s&&(s=!0),null===(n=this.getLayer(n))?null:f.RemoveTileAt(t,e,i,s,n)},removeTileAtWorldXY:function(t,e,i,s,n,r){return void 0===i&&(i=!0),void 0===s&&(s=!0),null===(r=this.getLayer(r))?null:f.RemoveTileAtWorldXY(t,e,i,s,n,r)},renderDebug:function(t,e,i){return null===(i=this.getLayer(i))?null:(this.orientation===l.ORTHOGONAL&&f.RenderDebug(t,e,i),this)},renderDebugFull:function(t,e){for(var i=this.layers,s=0;s{var s=i(99325),n=i(15043);s.register("tilemap",(function(t){var e=void 0!==t?t:{};return n(this.scene,e.key,e.tileWidth,e.tileHeight,e.width,e.height,e.data,e.insertNull)}))},37940:(t,e,i)=>{var s=i(61286),n=i(15043);s.register("tilemap",(function(t,e,i,s,r,o,a){return null===t&&(t=void 0),null===e&&(e=void 0),null===i&&(i=void 0),null===s&&(s=void 0),null===r&&(r=void 0),n(this.scene,t,e,i,s,r,o,a)}))},87177:(t,e,i)=>{var s=i(56694),n=i(64937),r=i(89980),o=i(5047),a=i(96193),h=i(93736),l=new s({Extends:r,Mixins:[n.Alpha,n.BlendMode,n.ComputedSize,n.Depth,n.Flip,n.GetBounds,n.Mask,n.Origin,n.Pipeline,n.Transform,n.Visible,n.ScrollFactor,a],initialize:function(t,e,i,s,n,a){r.call(this,t,"TilemapLayer"),this.isTilemap=!0,this.tilemap=e,this.layerIndex=i,this.layer=e.layers[i],this.layer.tilemapLayer=this,this.tileset=[],this.tilesDrawn=0,this.tilesTotal=this.layer.width*this.layer.height,this.culledTiles=[],this.skipCull=!1,this.cullPaddingX=1,this.cullPaddingY=1,this.cullCallback=o.GetCullTilesFunction(this.layer.orientation),this._renderOrder=0,this.gidMap=[],this.tempVec=new h,this.setTilesets(s),this.setAlpha(this.layer.alpha),this.setPosition(n,a),this.setOrigin(0,0),this.setSize(e.tileWidth*this.layer.width,e.tileHeight*this.layer.height),this.initPipeline()},setTilesets:function(t){var e=[],i=[],s=this.tilemap;Array.isArray(t)||(t=[t]);for(var n=0;n=0&&t<4&&(this._renderOrder=t),this},calculateFacesAt:function(t,e){return o.CalculateFacesAt(t,e,this.layer),this},calculateFacesWithin:function(t,e,i,s){return o.CalculateFacesWithin(t,e,i,s,this.layer),this},createFromTiles:function(t,e,i,s,n){return o.CreateFromTiles(t,e,i,s,n,this.layer)},cull:function(t){return this.cullCallback(this.layer,t,this.culledTiles,this._renderOrder)},copy:function(t,e,i,s,n,r,a){return o.Copy(t,e,i,s,n,r,a,this.layer),this},fill:function(t,e,i,s,n,r){return o.Fill(t,e,i,s,n,r,this.layer),this},filterTiles:function(t,e,i,s,n,r,a){return o.FilterTiles(t,e,i,s,n,r,a,this.layer)},findByIndex:function(t,e,i){return o.FindByIndex(t,e,i,this.layer)},findTile:function(t,e,i,s,n,r,a){return o.FindTile(t,e,i,s,n,r,a,this.layer)},forEachTile:function(t,e,i,s,n,r,a){return o.ForEachTile(t,e,i,s,n,r,a,this.layer),this},setTint:function(t,e,i,s,n,r){void 0===t&&(t=16777215);return this.forEachTile((function(e){e.tint=t}),this,e,i,s,n,r)},getTileAt:function(t,e,i){return o.GetTileAt(t,e,i,this.layer)},getTileAtWorldXY:function(t,e,i,s){return o.GetTileAtWorldXY(t,e,i,s,this.layer)},getIsoTileAtWorldXY:function(t,e,i,s,n){void 0===i&&(i=!0);var r=this.tempVec;return o.IsometricWorldToTileXY(t,e,!0,r,n,this.layer,i),this.getTileAt(r.x,r.y,s)},getTilesWithin:function(t,e,i,s,n){return o.GetTilesWithin(t,e,i,s,n,this.layer)},getTilesWithinShape:function(t,e,i){return o.GetTilesWithinShape(t,e,i,this.layer)},getTilesWithinWorldXY:function(t,e,i,s,n,r){return o.GetTilesWithinWorldXY(t,e,i,s,n,r,this.layer)},hasTileAt:function(t,e){return o.HasTileAt(t,e,this.layer)},hasTileAtWorldXY:function(t,e,i){return o.HasTileAtWorldXY(t,e,i,this.layer)},putTileAt:function(t,e,i,s){return o.PutTileAt(t,e,i,s,this.layer)},putTileAtWorldXY:function(t,e,i,s,n){return o.PutTileAtWorldXY(t,e,i,s,n,this.layer)},putTilesAt:function(t,e,i,s){return o.PutTilesAt(t,e,i,s,this.layer),this},randomize:function(t,e,i,s,n){return o.Randomize(t,e,i,s,n,this.layer),this},removeTileAt:function(t,e,i,s){return o.RemoveTileAt(t,e,i,s,this.layer)},removeTileAtWorldXY:function(t,e,i,s,n){return o.RemoveTileAtWorldXY(t,e,i,s,n,this.layer)},renderDebug:function(t,e){return o.RenderDebug(t,e,this.layer),this},replaceByIndex:function(t,e,i,s,n,r){return o.ReplaceByIndex(t,e,i,s,n,r,this.layer),this},setSkipCull:function(t){return void 0===t&&(t=!0),this.skipCull=t,this},setCullPadding:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=1),this.cullPaddingX=t,this.cullPaddingY=e,this},setCollision:function(t,e,i,s){return o.SetCollision(t,e,i,this.layer,s),this},setCollisionBetween:function(t,e,i,s){return o.SetCollisionBetween(t,e,i,s,this.layer),this},setCollisionByProperty:function(t,e,i){return o.SetCollisionByProperty(t,e,i,this.layer),this},setCollisionByExclusion:function(t,e,i){return o.SetCollisionByExclusion(t,e,i,this.layer),this},setCollisionFromCollisionGroup:function(t,e){return o.SetCollisionFromCollisionGroup(t,e,this.layer),this},setTileIndexCallback:function(t,e,i){return o.SetTileIndexCallback(t,e,i,this.layer),this},setTileLocationCallback:function(t,e,i,s,n,r){return o.SetTileLocationCallback(t,e,i,s,n,r,this.layer),this},shuffle:function(t,e,i,s){return o.Shuffle(t,e,i,s,this.layer),this},swapByIndex:function(t,e,i,s,n,r){return o.SwapByIndex(t,e,i,s,n,r,this.layer),this},tileToWorldX:function(t,e){return this.tilemap.tileToWorldX(t,e,this)},tileToWorldY:function(t,e){return this.tilemap.tileToWorldY(t,e,this)},tileToWorldXY:function(t,e,i,s){return this.tilemap.tileToWorldXY(t,e,i,s,this)},getTileCorners:function(t,e,i){return this.tilemap.getTileCorners(t,e,i,this)},weightedRandomize:function(t,e,i,s,n){return o.WeightedRandomize(e,i,s,n,t,this.layer),this},worldToTileX:function(t,e,i){return this.tilemap.worldToTileX(t,e,i,this)},worldToTileY:function(t,e,i){return this.tilemap.worldToTileY(t,e,i,this)},worldToTileXY:function(t,e,i,s,n){return this.tilemap.worldToTileXY(t,e,i,s,n,this)},destroy:function(t){void 0===t&&(t=!0),this.tilemap&&(this.layer.tilemapLayer===this&&(this.layer.tilemapLayer=void 0),t&&this.tilemap.removeLayer(this),this.tilemap=void 0,this.layer=void 0,this.culledTiles.length=0,this.cullCallback=null,this.gidMap=[],this.tileset=[],r.prototype.destroy.call(this))}});t.exports=l},17394:(t,e,i)=>{var s=i(69360),n=new s,r=new s,o=new s;t.exports=function(t,e,i,s){var a=e.cull(i),h=a.length,l=i.alpha*e.alpha;if(!(0===h||l<=0)){var u=n,c=r,d=o;c.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),u.copyFrom(i.matrix);var p=t.currentContext,f=e.gidMap;p.save(),s?(u.multiplyWithOffset(s,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),c.e=e.x,c.f=e.y,u.multiply(c,d),d.copyToContext(p)):(c.e-=i.scrollX*e.scrollFactorX,c.f-=i.scrollY*e.scrollFactorY,c.copyToContext(p)),(!t.antialias||e.scaleX>1||e.scaleY>1)&&(p.imageSmoothingEnabled=!1);for(var v=0;v{var s=i(72283),n=s,r=s;n=i(51395),r=i(17394),t.exports={renderWebGL:n,renderCanvas:r}},51395:(t,e,i)=>{var s=i(75512);t.exports=function(t,e,i){var n=e.cull(i),r=n.length,o=i.alpha*e.alpha;if(!(0===r||o<=0)){var a=e.gidMap,h=t.pipelines.set(e.pipeline,e),l=s.getTintAppendFloatAlpha,u=e.scrollFactorX,c=e.scrollFactorY,d=e.x,p=e.y,f=e.scaleX,v=e.scaleY;t.pipelines.preBatch(e);for(var g=0;g{var s=i(56694),n=i(93736),r=new s({initialize:function(t,e,i,s,r,o,a,h,l){(void 0===i||i<=0)&&(i=32),(void 0===s||s<=0)&&(s=32),void 0===r&&(r=0),void 0===o&&(o=0),void 0===a&&(a={}),void 0===h&&(h={}),this.name=t,this.firstgid=e,this.tileWidth=i,this.tileHeight=s,this.tileMargin=r,this.tileSpacing=o,this.tileProperties=a,this.tileData=h,this.tileOffset=new n,void 0!==l&&this.tileOffset.set(l.x,l.y),this.image=null,this.glTexture=null,this.rows=0,this.columns=0,this.total=0,this.texCoordinates=[]},getTileProperties:function(t){return this.containsTileIndex(t)?this.tileProperties[t-this.firstgid]:null},getTileData:function(t){return this.containsTileIndex(t)?this.tileData[t-this.firstgid]:null},getTileCollisionGroup:function(t){var e=this.getTileData(t);return e&&e.objectgroup?e.objectgroup:null},containsTileIndex:function(t){return t>=this.firstgid&&t{var s=i(15494);t.exports=function(t,e,i){var n=s(t,e,!0,i),r=s(t,e-1,!0,i),o=s(t,e+1,!0,i),a=s(t-1,e,!0,i),h=s(t+1,e,!0,i),l=n&&n.collides;return l&&(n.faceTop=!0,n.faceBottom=!0,n.faceLeft=!0,n.faceRight=!0),r&&r.collides&&(l&&(n.faceTop=!1),r.faceBottom=!l),o&&o.collides&&(l&&(n.faceBottom=!1),o.faceTop=!l),a&&a.collides&&(l&&(n.faceLeft=!1),a.faceRight=!l),h&&h.collides&&(l&&(n.faceRight=!1),h.faceLeft=!l),n&&!n.collides&&n.resetFaces(),n}},60386:(t,e,i)=>{var s=i(15494),n=i(50811);t.exports=function(t,e,i,r,o){for(var a=null,h=null,l=null,u=null,c=n(t,e,i,r,null,o),d=0;d{var s=new(i(93736));t.exports=function(t,e,i,n){var r=i.tilemapLayer,o=r.cullPaddingX,a=r.cullPaddingY,h=r.tilemap.tileToWorldXY(t,e,s,n,r);return h.x>n.worldView.x+r.scaleX*i.tileWidth*(-o-.5)&&h.xn.worldView.y+r.scaleY*i.tileHeight*(-a-1)&&h.y{var s=i(60386),n=i(50811),r=i(62839),o=i(29633);t.exports=function(t,e,i,a,h,l,u,c){void 0===u&&(u=!0);var d=n(t,e,i,a,null,c),p=[];d.forEach((function(t){var e=new o(t.layer,t.index,t.x,t.y,t.width,t.height,t.baseWidth,t.baseHeight);e.copy(t),p.push(e)}));for(var f=h-t,v=l-e,g=0;g{var s=i(50811),n=i(51202);t.exports=function(t,e,i,r,o,a){i||(i={}),Array.isArray(t)||(t=[t]);var h=a.tilemapLayer;r||(r=h.scene),o||(o=r.cameras.main);var l,u=s(0,0,a.width,a.height,null,a),c=[];for(l=0;l{var s=i(74118),n=i(82127),r=i(84314),o=new s;t.exports=function(t,e){var i=t.tilemapLayer.tilemap,s=t.tilemapLayer,a=Math.floor(i.tileWidth*s.scaleX),h=Math.floor(i.tileHeight*s.scaleY),l=r(e.worldView.x-s.x,a,0,!0)-s.cullPaddingX,u=n(e.worldView.right-s.x,a,0,!0)+s.cullPaddingX,c=r(e.worldView.y-s.y,h,0,!0)-s.cullPaddingY,d=n(e.worldView.bottom-s.y,h,0,!0)+s.cullPaddingY;return o.setTo(l,c,u-l,d-c)}},381:(t,e,i)=>{var s=i(71586),n=i(6987);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var o=t.tilemapLayer,a=s(t,e);return(o.skipCull||1!==o.scrollFactorX||1!==o.scrollFactorY)&&(a.left=0,a.right=t.width,a.top=0,a.bottom=t.height),n(t,a,r,i),i}},97734:(t,e,i)=>{var s=i(50811),n=i(60386),r=i(68234);t.exports=function(t,e,i,o,a,h,l){for(var u=-1!==l.collideIndexes.indexOf(t),c=s(e,i,o,a,null,l),d=0;d{var s=i(50811);t.exports=function(t,e,i,n,r,o,a,h){return s(i,n,r,o,a,h).filter(t,e)}},37982:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=0),void 0===i&&(i=!1);var n,r,o,a=0;if(i){for(r=s.height-1;r>=0;r--)for(n=s.width-1;n>=0;n--)if((o=s.data[r][n])&&o.index===t){if(a===e)return o;a+=1}}else for(r=0;r{var s=i(50811);t.exports=function(t,e,i,n,r,o,a,h){return s(i,n,r,o,a,h).find(t,e)||null}},80916:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,n,r,o,a,h){s(i,n,r,o,a,h).forEach(t,e)}},31493:(t,e,i)=>{var s=i(12920),n=i(381),r=i(37524),o=i(20887),a=i(72283),h=i(19242);t.exports=function(t){return t===s.ORTHOGONAL?n:t===s.HEXAGONAL?r:t===s.STAGGERED?h:t===s.ISOMETRIC?o:a}},15494:(t,e,i)=>{var s=i(62839);t.exports=function(t,e,i,n){if(void 0===i&&(i=!1),s(t,e,n)){var r=n.data[e][t]||null;return r?-1===r.index?i?r:null:r:null}return null}},24640:(t,e,i)=>{var s=i(15494),n=new(i(93736));t.exports=function(t,e,i,r,o){return o.tilemapLayer.worldToTileXY(t,e,!0,n,r),s(n.x,n.y,i,o)}},48495:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n){var r=n.baseTileWidth,o=n.baseTileHeight,a=n.tilemapLayer,h=0,l=0;a&&(i||(i=a.scene.cameras.main),h=a.x+i.scrollX*(1-a.scrollFactorX),l=a.y+i.scrollY*(1-a.scrollFactorY),r*=a.scaleX,o*=a.scaleY);var u=h+t*r,c=l+e*o;return[new s(u,c),new s(u+r,c),new s(u+r,c+o),new s(u,c+o)]}},7160:(t,e,i)=>{var s=i(12920),n=i(63634),r=i(72283),o=i(48495);t.exports=function(t){return t===s.ORTHOGONAL?o:t===s.ISOMETRIC?r:t===s.HEXAGONAL?n:(s.STAGGERED,r)}},16884:(t,e,i)=>{var s=i(12920),n=i(72283),r=i(44150);t.exports=function(t){return t===s.ORTHOGONAL?r:n}},68182:(t,e,i)=>{var s=i(12920),n=i(21715),r=i(21808),o=i(72283),a=i(33388),h=i(46836);t.exports=function(t){return t===s.ORTHOGONAL?h:t===s.ISOMETRIC?r:t===s.HEXAGONAL?n:t===s.STAGGERED?a:o}},3752:(t,e,i)=>{var s=i(12920),n=i(72283),r=i(84132),o=i(42477);t.exports=function(t){return t===s.ORTHOGONAL?o:t===s.STAGGERED?r:n}},50811:(t,e,i)=>{var s=i(72632);t.exports=function(t,e,i,n,r,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=o.width),void 0===n&&(n=o.height),r||(r={});var a=s(r,"isNotEmpty",!1),h=s(r,"isColliding",!1),l=s(r,"hasInterestingFace",!1);t<0&&(i+=t,t=0),e<0&&(n+=e,e=0),t+i>o.width&&(i=Math.max(o.width-t,0)),e+n>o.height&&(n=Math.max(o.height-e,0));for(var u=[],c=e;c{var s=i(84068),n=i(50811),r=i(7563),o=i(72283),a=i(93736),h=function(t,e){return r.RectangleToTriangle(e,t)},l=new a,u=new a,c=new a;t.exports=function(t,e,i,a){if(void 0===t)return[];var d=o;t instanceof s.Circle?d=r.CircleToRectangle:t instanceof s.Rectangle?d=r.RectangleToRectangle:t instanceof s.Triangle?d=h:t instanceof s.Line&&(d=r.LineToRectangle),a.tilemapLayer.worldToTileXY(t.left,t.top,!0,u,i);var p=u.x,f=u.y;a.tilemapLayer.worldToTileXY(t.right,t.bottom,!1,c,i);var v=Math.ceil(c.x),g=Math.ceil(c.y),m=Math.max(v-p,1),y=Math.max(g-f,1),x=n(p,f,m,y,e,a),T=a.tileWidth,w=a.tileHeight;a.tilemapLayer&&(T*=a.tilemapLayer.scaleX,w*=a.tilemapLayer.scaleY);for(var b=[],E=new s.Rectangle(0,0,T,w),S=0;S{var s=i(50811),n=i(93736),r=new n,o=new n;t.exports=function(t,e,i,n,a,h,l){var u=l.tilemapLayer.tilemap._convert.WorldToTileXY;u(t,e,!0,r,h,l);var c=r.x,d=r.y;u(t+i,e+n,!1,o,h,l);var p=Math.ceil(o.x),f=Math.ceil(o.y);return s(c,d,p-c,f-d,a,l)}},29296:(t,e,i)=>{var s=i(12920),n=i(10618),r=i(806);t.exports=function(t){return t===s.ORTHOGONAL?r:n}},32688:(t,e,i)=>{var s=i(12920),n=i(11516),r=i(18750),o=i(72283),a=i(90562),h=i(45676);t.exports=function(t){return t===s.ORTHOGONAL?h:t===s.ISOMETRIC?r:t===s.HEXAGONAL?n:t===s.STAGGERED?a:o}},74326:(t,e,i)=>{var s=i(12920),n=i(10618),r=i(3689),o=i(70520);t.exports=function(t){return t===s.ORTHOGONAL?o:t===s.STAGGERED?r:n}},46598:(t,e,i)=>{var s=i(62839);t.exports=function(t,e,i){if(s(t,e,i)){var n=i.data[e][t];return null!==n&&n.index>-1}return!1}},28654:(t,e,i)=>{var s=i(46598),n=new(i(93736));t.exports=function(t,e,i,r){r.tilemapLayer.worldToTileXY(t,e,!0,n,i);var o=n.x,a=n.y;return s(o,a,r)}},6358:(t,e,i)=>{var s=i(82127),n=i(84314);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,r=t.tilemapLayer,o=Math.floor(i.tileWidth*r.scaleX),a=Math.floor(i.tileHeight*r.scaleY),h=t.hexSideLength,l=(a-h)/2+h;return{left:n(e.worldView.x-r.x,o,0,!0)-r.cullPaddingX,right:s(e.worldView.right-r.x,o,0,!0)+r.cullPaddingX,top:n(e.worldView.y-r.y,l,0,!0)-r.cullPaddingY,bottom:s(e.worldView.bottom-r.y,l,0,!0)+r.cullPaddingY}}},37524:(t,e,i)=>{var s=i(6358),n=i(6987);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var o=t.tilemapLayer;if(!o.skipCull&&1===o.scrollFactorX&&1===o.scrollFactorY){var a=s(t,e);n(t,a,r,i)}return i}},63634:(t,e,i)=>{var s=i(21715),n=i(93736),r=new n;t.exports=function(t,e,i,o){var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(a*=l.scaleX,h*=l.scaleY);for(var u=s(t,e,r,i,o),c=[],d=.5773502691896257*a,p=h/2,f=0;f<6;f++){var v=2*Math.PI*(.5-f)/6;c.push(new n(u.x+d*Math.cos(v),u.y+p*Math.sin(v)))}return c}},21715:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){i||(i=new s);var o=r.baseTileWidth,a=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(n||(n=h.scene.cameras.main),l=h.x+n.scrollX*(1-h.scrollFactorX),u=h.y+n.scrollY*(1-h.scrollFactorY),o*=h.scaleX,a*=h.scaleY);var c=a/2,d=l+o*t+o,p=u+1.5*e*c+c;return e%2==0&&(d-=o/2),i.set(d,p)}},11516:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,o){n||(n=new s);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(r||(r=l.scene.cameras.main),t-=l.x+r.scrollX*(1-l.scrollFactorX),e-=l.y+r.scrollY*(1-l.scrollFactorY),a*=l.scaleX,h*=l.scaleY);var u=.5773502691896257,c=h/2,d=(t-a/2)/(u*a),p=(e-c)/c,f=u*d+-.3333333333333333*p,v=0*d+.6666666666666666*p,g=-f-v,m=Math.round(f),y=Math.round(v),x=Math.round(g),T=Math.abs(m-f),w=Math.abs(y-v),b=Math.abs(x-g);T>w&&T>b?m=-y-x:w>b&&(y=-m-x);var E=y,S=E%2==0?y/2+m:y/2+m-.5;return n.set(S,E)}},62839:t=>{t.exports=function(t,e,i){return t>=0&&t=0&&e{var s=i(13125);t.exports=function(t,e,i,n){void 0===i&&(i=[]),void 0===n&&(n=0),i.length=0;var r,o,a,h=t.tilemapLayer,l=t.data,u=t.width,c=t.height,d=u,p=c;if(!h.skipCull)if(0===n){for(o=0;o=0;r--)if(s(r,o,t,e)){if(!(a=l[o][r])||-1===a.index||!a.visible||0===a.alpha)continue;i.push(a)}}else if(2===n){for(o=p;o>=0;o--)for(r=0;l[o]&&r=0;o--)for(r=d;l[o]&&r>=0;r--)if(s(r,o,t,e)){if(!(a=l[o][r])||-1===a.index||!a.visible||0===a.alpha)continue;i.push(a)}return h.tilesDrawn=i.length,h.tilesTotal=u*c,i}},21808:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){i||(i=new s);var o=r.baseTileWidth,a=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(n||(n=h.scene.cameras.main),l=h.x+n.scrollX*(1-h.scrollFactorX),o*=h.scaleX,u=h.y+n.scrollY*(1-h.scrollFactorY),a*=h.scaleY);var c=l+o/2*(t-e),d=u+(t+e)*(a/2);return i.set(c,d)}},18750:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,o,a){n||(n=new s);var h=o.baseTileWidth,l=o.baseTileHeight,u=o.tilemapLayer;u&&(r||(r=u.scene.cameras.main),e-=u.y+r.scrollY*(1-u.scrollFactorY),l*=u.scaleY,t-=u.x+r.scrollX*(1-u.scrollFactorX),h*=u.scaleX);var c=h/2,d=l/2;a||(e-=l);var p=.5*((t-=c)/c+e/d),f=.5*(-t/c+e/d);return i&&(p=Math.floor(p),f=Math.floor(f)),n.set(p,f)}},29003:(t,e,i)=>{var s=i(29633),n=i(62839),r=i(92839),o=i(68234),a=i(14556);t.exports=function(t,e,i,h,l){if(void 0===h&&(h=!0),!n(e,i,l))return null;var u,c=l.data[i][e],d=c&&c.collides;t instanceof s?(null===l.data[i][e]&&(l.data[i][e]=new s(l,t.index,e,i,l.tileWidth,l.tileHeight)),l.data[i][e].copy(t)):(u=t,null===l.data[i][e]?l.data[i][e]=new s(l,u,e,i,l.tileWidth,l.tileHeight):l.data[i][e].index=u);var p=l.data[i][e],f=-1!==l.collideIndexes.indexOf(p.index),v=a(l.tilemapLayer.tilemap)[u=t instanceof s?t.index:t][2],g=l.tilemapLayer.tileset[v];return p.width=g.tileWidth,p.height=g.tileHeight,o(p,f),h&&d!==p.collides&&r(e,i,l),p}},48565:(t,e,i)=>{var s=i(29003),n=new(i(93736));t.exports=function(t,e,i,r,o,a){return a.tilemapLayer.worldToTileXY(e,i,!0,n,o,a),s(t,n.x,n.y,r,a)}},56547:(t,e,i)=>{var s=i(60386),n=i(29003);t.exports=function(t,e,i,r,o){if(void 0===r&&(r=!0),!Array.isArray(t))return null;Array.isArray(t[0])||(t=[t]);for(var a=t.length,h=t[0].length,l=0;l{var s=i(50811),n=i(72861);t.exports=function(t,e,i,r,o,a){var h,l=s(t,e,i,r,{},a);if(!o)for(o=[],h=0;h{var s=i(29633),n=i(62839),r=i(92839);t.exports=function(t,e,i,o,a){if(void 0===i&&(i=!0),void 0===o&&(o=!0),!n(t,e,a))return null;var h=a.data[e][t];return h?(a.data[e][t]=i?null:new s(a,-1,t,e,a.tileWidth,a.tileHeight),o&&h&&h.collides&&r(t,e,a),h):null}},17384:(t,e,i)=>{var s=i(929),n=new(i(93736));t.exports=function(t,e,i,r,o,a){return a.tilemapLayer.worldToTileXY(t,e,!0,n,o,a),s(n.x,n.y,i,r,a)}},93763:(t,e,i)=>{var s=i(50811),n=i(95509),r=new n(105,210,231,150),o=new n(243,134,48,200),a=new n(40,39,37,150);t.exports=function(t,e,i){void 0===e&&(e={});var n=void 0!==e.tileColor?e.tileColor:r,h=void 0!==e.collidingTileColor?e.collidingTileColor:o,l=void 0!==e.faceColor?e.faceColor:a,u=s(0,0,i.width,i.height,null,i);t.translateCanvas(i.tilemapLayer.x,i.tilemapLayer.y),t.scaleCanvas(i.tilemapLayer.scaleX,i.tilemapLayer.scaleY);for(var c=0;c{var s=i(50811);t.exports=function(t,e,i,n,r,o,a){for(var h=s(i,n,r,o,null,a),l=0;l{t.exports=function(t,e,i,s){var n,r,o,a=t.data,h=t.width,l=t.height,u=t.tilemapLayer,c=Math.max(0,e.left),d=Math.min(h,e.right),p=Math.max(0,e.top),f=Math.min(l,e.bottom);if(0===i)for(r=p;r=c;n--)(o=a[r][n])&&-1!==o.index&&o.visible&&0!==o.alpha&&s.push(o);else if(2===i)for(r=f;r>=p;r--)for(n=c;a[r]&&n=p;r--)for(n=d;a[r]&&n>=c;n--)(o=a[r][n])&&-1!==o.index&&o.visible&&0!==o.alpha&&s.push(o);return u.tilesDrawn=s.length,u.tilesTotal=h*l,s}},51710:(t,e,i)=>{var s=i(68234),n=i(60386),r=i(91181);t.exports=function(t,e,i,o,a){void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===a&&(a=!0),Array.isArray(t)||(t=[t]);for(var h=0;h{var s=i(68234),n=i(60386),r=i(91181);t.exports=function(t,e,i,o,a,h){if(void 0===i&&(i=!0),void 0===o&&(o=!0),void 0===h&&(h=!0),!(t>e)){for(var l=t;l<=e;l++)r(l,i,a);if(h)for(var u=0;u=t&&d.index<=e&&s(d,i)}o&&n(0,0,a.width,a.height,a)}}},33158:(t,e,i)=>{var s=i(68234),n=i(60386),r=i(91181);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0),Array.isArray(t)||(t=[t]);for(var a=0;a{var s=i(68234),n=i(60386),r=i(19256);t.exports=function(t,e,i,o){void 0===e&&(e=!0),void 0===i&&(i=!0);for(var a=0;a{var s=i(68234),n=i(60386);t.exports=function(t,e,i){void 0===t&&(t=!0),void 0===e&&(e=!0);for(var r=0;r0&&s(a,t)}}e&&n(0,0,i.width,i.height,i)}},91181:t=>{t.exports=function(t,e,i){var s=i.collideIndexes.indexOf(t);e&&-1===s?i.collideIndexes.push(t):e||-1===s||i.collideIndexes.splice(s,1)}},68234:t=>{t.exports=function(t,e){e?t.setCollision(!0,!0,!0,!0,!1):t.resetCollision(!1)}},11628:t=>{t.exports=function(t,e,i,s){if("number"==typeof t)s.callbacks[t]=null!==e?{callback:e,callbackContext:i}:void 0;else for(var n=0,r=t.length;n{var s=i(50811);t.exports=function(t,e,i,n,r,o,a){for(var h=s(t,e,i,n,null,a),l=0;l{var s=i(50811),n=i(18592);t.exports=function(t,e,i,r,o){var a=s(t,e,i,r,null,o),h=a.map((function(t){return t.index}));n(h);for(var l=0;l{var s=i(82127),n=i(84314);t.exports=function(t,e){var i=t.tilemapLayer.tilemap,r=t.tilemapLayer,o=Math.floor(i.tileWidth*r.scaleX),a=Math.floor(i.tileHeight*r.scaleY);return{left:n(e.worldView.x-r.x,o,0,!0)-r.cullPaddingX,right:s(e.worldView.right-r.x,o,0,!0)+r.cullPaddingX,top:n(e.worldView.y-r.y,a/2,0,!0)-r.cullPaddingY,bottom:s(e.worldView.bottom-r.y,a/2,0,!0)+r.cullPaddingY}}},19242:(t,e,i)=>{var s=i(53945),n=i(6987);t.exports=function(t,e,i,r){void 0===i&&(i=[]),void 0===r&&(r=0),i.length=0;var o=t.tilemapLayer;if(!o.skipCull&&1===o.scrollFactorX&&1===o.scrollFactorY){var a=s(t,e);n(t,a,r,i)}return i}},33388:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r){i||(i=new s);var o=r.baseTileWidth,a=r.baseTileHeight,h=r.tilemapLayer,l=0,u=0;h&&(n||(n=h.scene.cameras.main),l=h.x+n.scrollX*(1-h.scrollFactorX),o*=h.scaleX,u=h.y+n.scrollY*(1-h.scrollFactorY),a*=h.scaleY);var c=l+t*o+e%2*(o/2),d=u+e*(a/2);return i.set(c,d)}},84132:t=>{t.exports=function(t,e,i){var s=i.baseTileHeight,n=i.tilemapLayer,r=0;return n&&(void 0===e&&(e=n.scene.cameras.main),r=n.y+e.scrollY*(1-n.scrollFactorY),s*=n.scaleY),r+t*(s/2)+s}},90562:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,o){n||(n=new s);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(r||(r=l.scene.cameras.main),e-=l.y+r.scrollY*(1-l.scrollFactorY),h*=l.scaleY,t-=l.x+r.scrollX*(1-l.scrollFactorX),a*=l.scaleX);var u=i?Math.floor(e/(h/2)):e/(h/2),c=i?Math.floor((t+u%2*.5*a)/a):(t+u%2*.5*a)/a;return n.set(c,u)}},3689:t=>{t.exports=function(t,e,i,s){var n=s.baseTileHeight,r=s.tilemapLayer;return r&&(i||(i=r.scene.cameras.main),t-=r.y+i.scrollY*(1-r.scrollFactorY),n*=r.scaleY),e?Math.floor(t/(n/2)):t/(n/2)}},55217:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,n,r,o,a){for(var h=s(i,n,r,o,null,a),l=0;l{t.exports=function(t,e,i){var s=i.baseTileWidth,n=i.tilemapLayer,r=0;return n&&(e||(e=n.scene.cameras.main),r=n.x+e.scrollX*(1-n.scrollFactorX),s*=n.scaleX),r+t*s}},46836:(t,e,i)=>{var s=i(44150),n=i(42477),r=i(93736);t.exports=function(t,e,i,o,a){return i||(i=new r(0,0)),i.x=s(t,o,a),i.y=n(e,o,a),i}},42477:t=>{t.exports=function(t,e,i){var s=i.baseTileHeight,n=i.tilemapLayer,r=0;return n&&(e||(e=n.scene.cameras.main),r=n.y+e.scrollY*(1-n.scrollFactorY),s*=n.scaleY),r+t*s}},39677:(t,e,i)=>{var s=i(50811);t.exports=function(t,e,i,n,r,o){if(r){var a,h=s(t,e,i,n,null,o),l=0;for(a=0;a{var s=i(45676),n=new(i(93736));t.exports=function(t,e,i,r){return s(t,0,e,n,i,r),n.x}},45676:(t,e,i)=>{var s=i(93736);t.exports=function(t,e,i,n,r,o){void 0===i&&(i=!0),n||(n=new s);var a=o.baseTileWidth,h=o.baseTileHeight,l=o.tilemapLayer;l&&(r||(r=l.scene.cameras.main),t-=l.x+r.scrollX*(1-l.scrollFactorX),e-=l.y+r.scrollY*(1-l.scrollFactorY),a*=l.scaleX,h*=l.scaleY);var u=t/a,c=e/h;return i&&(u=Math.floor(u),c=Math.floor(c)),n.set(u,c)}},70520:(t,e,i)=>{var s=i(45676),n=new(i(93736));t.exports=function(t,e,i,r){return s(0,t,e,n,i,r),n.y}},5047:(t,e,i)=>{t.exports={CalculateFacesAt:i(92839),CalculateFacesWithin:i(60386),CheckIsoBounds:i(13125),Copy:i(17347),CreateFromTiles:i(93604),CullBounds:i(71586),CullTiles:i(381),Fill:i(97734),FilterTiles:i(63555),FindByIndex:i(37982),FindTile:i(48297),ForEachTile:i(80916),GetCullTilesFunction:i(31493),GetTileAt:i(15494),GetTileAtWorldXY:i(24640),GetTileCorners:i(48495),GetTileCornersFunction:i(7160),GetTilesWithin:i(50811),GetTilesWithinShape:i(31674),GetTilesWithinWorldXY:i(44662),GetTileToWorldXFunction:i(16884),GetTileToWorldXYFunction:i(68182),GetTileToWorldYFunction:i(3752),GetWorldToTileXFunction:i(29296),GetWorldToTileXYFunction:i(32688),GetWorldToTileYFunction:i(74326),HasTileAt:i(46598),HasTileAtWorldXY:i(28654),HexagonalCullBounds:i(6358),HexagonalCullTiles:i(37524),HexagonalGetTileCorners:i(63634),HexagonalTileToWorldXY:i(21715),HexagonalWorldToTileXY:i(11516),IsInLayerBounds:i(62839),IsometricCullTiles:i(20887),IsometricTileToWorldXY:i(21808),IsometricWorldToTileXY:i(18750),PutTileAt:i(29003),PutTileAtWorldXY:i(48565),PutTilesAt:i(56547),Randomize:i(91180),RemoveTileAt:i(929),RemoveTileAtWorldXY:i(17384),RenderDebug:i(93763),ReplaceByIndex:i(51202),RunCull:i(6987),SetCollision:i(51710),SetCollisionBetween:i(15216),SetCollisionByExclusion:i(33158),SetCollisionByProperty:i(4180),SetCollisionFromCollisionGroup:i(18625),SetLayerCollisionIndex:i(91181),SetTileCollision:i(68234),SetTileIndexCallback:i(11628),SetTileLocationCallback:i(72732),Shuffle:i(34397),StaggeredCullBounds:i(53945),StaggeredCullTiles:i(19242),StaggeredTileToWorldXY:i(33388),StaggeredTileToWorldY:i(84132),StaggeredWorldToTileXY:i(90562),StaggeredWorldToTileY:i(3689),SwapByIndex:i(55217),TileToWorldX:i(44150),TileToWorldXY:i(46836),TileToWorldY:i(42477),WeightedRandomize:i(39677),WorldToTileX:i(806),WorldToTileXY:i(45676),WorldToTileY:i(70520)}},12920:t=>{t.exports={ORTHOGONAL:0,ISOMETRIC:1,STAGGERED:2,HEXAGONAL:3}},84758:(t,e,i)=>{var s={ORIENTATION:i(12920)};t.exports=s},52678:(t,e,i)=>{var s=i(98611),n=i(84758),r={Components:i(5047),Parsers:i(34124),Formats:i(93560),ImageCollection:i(97042),ParseToTilemap:i(15043),Tile:i(29633),Tilemap:i(89797),TilemapCreator:i(4843),TilemapFactory:i(37940),Tileset:i(47975),TilemapLayer:i(87177),Orientation:i(12920),LayerData:i(94990),MapData:i(16586),ObjectLayer:i(15256)};r=s(!1,r,n.ORIENTATION),t.exports=r},94990:(t,e,i)=>{var s=i(56694),n=i(12920),r=i(72632),o=new s({initialize:function(t){void 0===t&&(t={}),this.name=r(t,"name","layer"),this.x=r(t,"x",0),this.y=r(t,"y",0),this.width=r(t,"width",0),this.height=r(t,"height",0),this.tileWidth=r(t,"tileWidth",0),this.tileHeight=r(t,"tileHeight",0),this.baseTileWidth=r(t,"baseTileWidth",this.tileWidth),this.baseTileHeight=r(t,"baseTileHeight",this.tileHeight),this.orientation=r(t,"orientation",n.ORTHOGONAL),this.widthInPixels=r(t,"widthInPixels",this.width*this.baseTileWidth),this.heightInPixels=r(t,"heightInPixels",this.height*this.baseTileHeight),this.alpha=r(t,"alpha",1),this.visible=r(t,"visible",!0),this.properties=r(t,"properties",[]),this.indexes=r(t,"indexes",[]),this.collideIndexes=r(t,"collideIndexes",[]),this.callbacks=r(t,"callbacks",[]),this.bodies=r(t,"bodies",[]),this.data=r(t,"data",[]),this.tilemapLayer=r(t,"tilemapLayer",null),this.hexSideLength=r(t,"hexSideLength",0)}});t.exports=o},16586:(t,e,i)=>{var s=i(56694),n=i(12920),r=i(72632),o=new s({initialize:function(t){void 0===t&&(t={}),this.name=r(t,"name","map"),this.width=r(t,"width",0),this.height=r(t,"height",0),this.infinite=r(t,"infinite",!1),this.tileWidth=r(t,"tileWidth",0),this.tileHeight=r(t,"tileHeight",0),this.widthInPixels=r(t,"widthInPixels",this.width*this.tileWidth),this.heightInPixels=r(t,"heightInPixels",this.height*this.tileHeight),this.format=r(t,"format",null),this.orientation=r(t,"orientation",n.ORTHOGONAL),this.renderOrder=r(t,"renderOrder","right-down"),this.version=r(t,"version","1"),this.properties=r(t,"properties",{}),this.layers=r(t,"layers",[]),this.images=r(t,"images",[]),this.objects=r(t,"objects",[]),Array.isArray(this.objects)||(this.objects=[]),this.collision=r(t,"collision",{}),this.tilesets=r(t,"tilesets",[]),this.imageCollections=r(t,"imageCollections",[]),this.tiles=r(t,"tiles",[]),this.hexSideLength=r(t,"hexSideLength",0),this.staggerAxis=r(t,"staggerAxis","y"),this.staggerIndex=r(t,"staggerIndex","odd")}});t.exports=o},15256:(t,e,i)=>{var s=i(56694),n=i(72632),r=new s({initialize:function(t){void 0===t&&(t={}),this.name=n(t,"name","object layer"),this.opacity=n(t,"opacity",1),this.properties=n(t,"properties",{}),this.propertyTypes=n(t,"propertytypes",{}),this.type=n(t,"type","objectgroup"),this.visible=n(t,"visible",!0),this.objects=n(t,"objects",[]),Array.isArray(this.objects)||(this.objects=[])}});t.exports=r},21394:(t,e,i)=>{var s=i(12920);t.exports=function(t){return"isometric"===(t=t.toLowerCase())?s.ISOMETRIC:"staggered"===t?s.STAGGERED:"hexagonal"===t?s.HEXAGONAL:s.ORTHOGONAL}},90715:(t,e,i)=>{var s=i(93560),n=i(84346),r=i(96097),o=i(2378),a=i(44909);t.exports=function(t,e,i,h,l,u){var c;switch(e){case s.ARRAY_2D:c=n(t,i,h,l,u);break;case s.CSV:c=r(t,i,h,l,u);break;case s.TILED_JSON:c=o(t,i,u);break;case s.WELTMEISTER:c=a(t,i,u);break;default:console.warn("Unrecognized tilemap data format: "+e),c=null}return c}},84346:(t,e,i)=>{var s=i(93560),n=i(94990),r=i(16586),o=i(29633);t.exports=function(t,e,i,a,h){for(var l=new n({tileWidth:i,tileHeight:a}),u=new r({name:t,tileWidth:i,tileHeight:a,format:s.ARRAY_2D,layers:[l]}),c=[],d=e.length,p=0,f=0;f{var s=i(93560),n=i(84346);t.exports=function(t,e,i,r,o){var a=e.trim().split("\n").map((function(t){return t.split(",")})),h=n(t,a,i,r,o);return h.format=s.CSV,h}},30951:(t,e,i)=>{var s=i(94990),n=i(29633);t.exports=function(t,e){for(var i=[],r=0;r-1?new n(a,p,c,u,o.tilesize,o.tilesize):e?null:new n(a,-1,c,u,o.tilesize,o.tilesize),h.push(d)}l.push(h),h=[]}a.data=l,i.push(a)}return i}},47488:(t,e,i)=>{var s=i(47975);t.exports=function(t){for(var e=[],i=[],n=0;n{var s=i(93560),n=i(16586),r=i(30951),o=i(47488);t.exports=function(t,e,i){if(0===e.layer.length)return console.warn("No layers found in the Weltmeister map: "+t),null;for(var a=0,h=0,l=0;la&&(a=e.layer[l].width),e.layer[l].height>h&&(h=e.layer[l].height);var u=new n({width:a,height:h,name:t,tileWidth:e.layer[0].tilesize,tileHeight:e.layer[0].tilesize,format:s.WELTMEISTER});return u.layers=r(e,i),u.tilesets=o(e),u}},24507:(t,e,i)=>{t.exports={ParseTileLayers:i(30951),ParseTilesets:i(47488),ParseWeltmeister:i(44909)}},34124:(t,e,i)=>{t.exports={FromOrientationString:i(21394),Parse:i(90715),Parse2DArray:i(84346),ParseCSV:i(96097),Impact:i(24507),Tiled:i(50044)}},48646:(t,e,i)=>{var s=i(98611);t.exports=function(t){for(var e,i,n,r,o,a=0;a{t.exports=function(t){for(var e=window.atob(t),i=e.length,s=new Array(i/4),n=0;n>>0;return s}},14556:(t,e,i)=>{var s=i(47975);t.exports=function(t){var e,i,n=[];for(e=0;e{var s=i(72632);t.exports=function(t,e,i){if(!e)return{i:0,layers:t.layers,name:"",opacity:1,visible:!0,x:0,y:0};var n=e.x+s(e,"startx",0)*t.tilewidth+s(e,"offsetx",0),r=e.y+s(e,"starty",0)*t.tileheight+s(e,"offsety",0);return{i:0,layers:e.layers,name:i.name+e.name+"/",opacity:i.opacity*e.opacity,visible:i.visible&&e.visible,x:i.x+n,y:i.y+r}}},8847:t=>{var e=2147483648,i=1073741824,s=536870912;t.exports=function(t){var n=Boolean(t&e),r=Boolean(t&i),o=Boolean(t&s);t&=536870911;var a=0,h=!1;return n&&r&&o?(a=Math.PI/2,h=!0):n&&r&&!o?(a=Math.PI,h=!1):n&&!r&&o?(a=Math.PI/2,h=!1):!n||r||o?!n&&r&&o?(a=3*Math.PI/2,h=!1):n||!r||o?n||r||!o?n||r||o||(a=0,h=!1):(a=3*Math.PI/2,h=!0):(a=Math.PI,h=!0):(a=0,h=!0),{gid:t,flippedHorizontal:n,flippedVertical:r,flippedAntiDiagonal:o,rotation:a,flipped:h}}},78339:(t,e,i)=>{var s=i(72632),n=i(92044);t.exports=function(t){for(var e=[],i=[],r=n(t);r.i0;)if(r.i>=r.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}r=i.pop()}else{var o=r.layers[r.i];if(r.i++,"imagelayer"===o.type){var a=s(o,"offsetx",0)+s(o,"startx",0),h=s(o,"offsety",0)+s(o,"starty",0);e.push({name:r.name+o.name,image:o.image,x:r.x+a+o.x,y:r.y+h+o.y,alpha:r.opacity*o.opacity,visible:r.visible&&o.visible,properties:s(o,"properties",{})})}else if("group"===o.type){var l=n(t,o,r);i.push(r),r=l}}return e}},2378:(t,e,i)=>{var s=i(48646),n=i(14556),r=i(12920),o=i(28699),a=i(93560),h=i(21394),l=i(16586),u=i(78339),c=i(61136),d=i(95925),p=i(93392);t.exports=function(t,e,i){var f=o(e),v=new l({width:f.width,height:f.height,name:t,tileWidth:f.tilewidth,tileHeight:f.tileheight,orientation:h(f.orientation),format:a.TILED_JSON,version:f.version,properties:f.properties,renderOrder:f.renderorder,infinite:f.infinite});v.orientation===r.HEXAGONAL&&(v.hexSideLength=f.hexsidelength,v.staggerAxis=f.staggeraxis,v.staggerIndex=f.staggerindex),v.layers=d(f,i),v.images=u(f);var g=p(f);return v.tilesets=g.tilesets,v.imageCollections=g.imageCollections,v.objects=c(f),v.tiles=n(v),s(v),v}},4281:(t,e,i)=>{var s=i(28820),n=i(8847),r=function(t){return{x:t.x,y:t.y}},o=["id","name","type","rotation","properties","visible","x","y","width","height"];t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=0);var a=s(t,o);if(a.x+=e,a.y+=i,t.gid){var h=n(t.gid);a.gid=h.gid,a.flippedHorizontal=h.flippedHorizontal,a.flippedVertical=h.flippedVertical,a.flippedAntiDiagonal=h.flippedAntiDiagonal}else t.polyline?a.polyline=t.polyline.map(r):t.polygon?a.polygon=t.polygon.map(r):t.ellipse?a.ellipse=t.ellipse:t.text?a.text=t.text:t.point?a.point=!0:a.rectangle=!0;return a}},61136:(t,e,i)=>{var s=i(72632),n=i(4281),r=i(15256),o=i(92044);t.exports=function(t){for(var e=[],i=[],a=o(t);a.i0;)if(a.i>=a.layers.length){if(i.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}a=i.pop()}else{var h=a.layers[a.i];if(a.i++,h.opacity*=a.opacity,h.visible=a.visible&&h.visible,"objectgroup"===h.type){h.name=a.name+h.name;for(var l=a.x+s(h,"startx",0)+s(h,"offsetx",0),u=a.y+s(h,"starty",0)+s(h,"offsety",0),c=[],d=0;d{var s=i(43908),n=i(12920),r=i(92044),o=i(21394),a=i(72632),h=i(94990),l=i(8847),u=i(29633);t.exports=function(t,e){for(var i=a(t,"infinite",!1),c=[],d=[],p=r(t);p.i0;)if(p.i>=p.layers.length){if(d.length<1){console.warn("TilemapParser.parseTiledJSON - Invalid layer group hierarchy");break}p=d.pop()}else{var f=p.layers[p.i];if(p.i++,"tilelayer"===f.type)if(f.compression)console.warn("TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer '"+f.name+"'");else{if(f.encoding&&"base64"===f.encoding){if(f.chunks)for(var v=0;v0?((y=new u(g,m.gid,L,F,t.tilewidth,t.tileheight)).rotation=m.rotation,y.flipX=m.flipped,T[F][L]=y):(x=e?null:new u(g,-1,L,F,t.tilewidth,t.tileheight),T[F][L]=x),++w===C.width&&(R++,w=0)}}else{(g=new h({name:p.name+f.name,x:p.x+a(f,"offsetx",0)+f.x,y:p.y+a(f,"offsety",0)+f.y,width:f.width,height:f.height,tileWidth:t.tilewidth,tileHeight:t.tileheight,alpha:p.opacity*f.opacity,visible:p.visible&&f.visible,properties:a(f,"properties",[]),orientation:o(t.orientation)})).orientation===n.HEXAGONAL&&(g.hexSideLength=t.hexsidelength);for(var D=[],k=0,I=f.data.length;k0?((y=new u(g,m.gid,w,T.length,t.tilewidth,t.tileheight)).rotation=m.rotation,y.flipX=m.flipped,D.push(y)):(x=e?null:new u(g,-1,w,T.length,t.tilewidth,t.tileheight),D.push(x)),++w===f.width&&(T.push(D),w=0,D=[])}g.data=T,c.push(g)}else if("group"===f.type){var B=r(t,f,p);d.push(p),p=B}}return c}},93392:(t,e,i)=>{var s=i(47975),n=i(97042),r=i(4281),o=i(39642);t.exports=function(t){for(var e,i=[],a=[],h=null,l=0;l1){var d=void 0,p=void 0;if(Array.isArray(u.tiles)){d=d||{},p=p||{};for(var f=0;f{t.exports=function(t,e){for(var i=0;i0){var r,o,a,h={},l={};if(Array.isArray(s.edgecolors))for(r=0;r{t.exports={AssignTileProperties:i(48646),Base64Decode:i(43908),BuildTilesetIndex:i(14556),CreateGroupLayer:i(92044),ParseGID:i(8847),ParseImageLayers:i(78339),ParseJSONTiled:i(2378),ParseObject:i(4281),ParseObjectLayers:i(61136),ParseTileLayers:i(95925),ParseTilesets:i(93392)}},73779:(t,e,i)=>{var s=i(56694),n=i(91963),r=i(7599),o=i(57911),a=i(66458),h=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.now=0,this.timeScale=1,this.paused=!1,this._active=[],this._pendingInsertion=[],this._pendingRemoval=[],t.sys.events.once(r.BOOT,this.boot,this),t.sys.events.on(r.START,this.start,this)},boot:function(){this.now=this.systems.game.loop.time,this.systems.events.once(r.DESTROY,this.destroy,this)},start:function(){var t=this.systems.events;t.on(r.PRE_UPDATE,this.preUpdate,this),t.on(r.UPDATE,this.update,this),t.once(r.SHUTDOWN,this.shutdown,this)},addEvent:function(t){var e;return t instanceof o?(e=t,this.removeEvent(e),e.elapsed=e.startAt,e.hasDispatched=!1,e.repeatCount=-1===e.repeat||e.loop?999999999999:e.repeat):e=new o(t),this._pendingInsertion.push(e),e},delayedCall:function(t,e,i,s){return this.addEvent({delay:t,callback:e,args:i,callbackScope:s})},clearPendingEvents:function(){return this._pendingInsertion=[],this},removeEvent:function(t){Array.isArray(t)||(t=[t]);for(var e=0;e-1&&this._active.splice(n,1),s.destroy()}for(i=0;i=s.delay)){var n=s.elapsed-s.delay;if(s.elapsed=s.delay,!s.hasDispatched&&s.callback&&(s.hasDispatched=!0,s.callback.apply(s.callbackScope,s.args)),s.repeatCount>0){if(s.repeatCount--,n>=s.delay)for(;n>=s.delay&&s.repeatCount>0;)s.callback&&s.callback.apply(s.callbackScope,s.args),n-=s.delay,s.repeatCount--;s.elapsed=n,s.hasDispatched=!1}else s.hasDispatched&&this._pendingRemoval.push(s)}}}},shutdown:function(){var t;for(t=0;t{var s=i(56694),n=i(72632),r=new s({initialize:function(t){this.delay=0,this.repeat=0,this.repeatCount=0,this.loop=!1,this.callback,this.callbackScope,this.args,this.timeScale=1,this.startAt=0,this.elapsed=0,this.paused=!1,this.hasDispatched=!1,this.reset(t)},reset:function(t){if(this.delay=n(t,"delay",0),this.repeat=n(t,"repeat",0),this.loop=n(t,"loop",!1),this.callback=n(t,"callback",void 0),this.callbackScope=n(t,"callbackScope",this.callback),this.args=n(t,"args",[]),this.timeScale=n(t,"timeScale",1),this.startAt=n(t,"startAt",0),this.paused=n(t,"paused",!1),this.elapsed=this.startAt,this.hasDispatched=!1,this.repeatCount=-1===this.repeat||this.loop?999999999999:this.repeat,0===this.delay&&(this.repeat>0||this.loop))throw new Error("TimerEvent infinite loop created via zero delay");return this},getProgress:function(){return this.elapsed/this.delay},getOverallProgress:function(){if(this.repeat>0){var t=this.delay+this.delay*this.repeat;return(this.elapsed+this.delay*(this.repeat-this.repeatCount))/t}return this.getProgress()},getRepeatCount:function(){return this.repeatCount},getElapsed:function(){return this.elapsed},getElapsedSeconds:function(){return.001*this.elapsed},getRemaining:function(){return this.delay-this.elapsed},getRemainingSeconds:function(){return.001*this.getRemaining()},getOverallRemaining:function(){return this.delay*(1+this.repeatCount)-this.elapsed},getOverallRemainingSeconds:function(){return.001*this.getOverallRemaining()},remove:function(t){void 0===t&&(t=!1),this.elapsed=this.delay,this.hasDispatched=!t,this.repeatCount=0},destroy:function(){this.callback=void 0,this.callbackScope=void 0,this.args=[]}});t.exports=r},97121:(t,e,i)=>{t.exports={Clock:i(73779),TimerEvent:i(57911)}},64532:(t,e,i)=>{var s=i(66458),n=i(56694),r=i(5454),o=i(68710),a=i(91963),h=i(7599),l=i(91944),u=i(39366),c=i(68061),d=i(45641),p=i(56034),f=new n({initialize:function(t){this.scene=t,this.events=t.sys.events,this.timeScale=1,this.paused=!1,this.processing=!1,this.tweens=[],this.time=0,this.startTime=0,this.nextTime=0,this.prevTime=0,this.maxLag=500,this.lagSkip=33,this.gap=1e3/240,this.events.once(h.BOOT,this.boot,this),this.events.on(h.START,this.start,this)},boot:function(){this.events.once(h.DESTROY,this.destroy,this)},start:function(){this.timeScale=1,this.paused=!1,this.startTime=Date.now(),this.prevTime=this.startTime,this.nextTime=this.gap,this.events.on(h.UPDATE,this.update,this),this.events.once(h.SHUTDOWN,this.shutdown,this)},create:function(t){Array.isArray(t)||(t=[t]);for(var e=[],i=0;i-1},existing:function(t){return this.has(t)||this.tweens.push(t.reset()),this},addCounter:function(t){var e=o(this,t);return this.tweens.push(e.reset()),e},stagger:function(t,e){return l(t,e)},setLagSmooth:function(t,e){return void 0===t&&(t=1/1e-8),void 0===e&&(e=0),this.maxLag=t,this.lagSkip=Math.min(e,this.maxLag),this},setFps:function(t){return void 0===t&&(t=240),this.gap=1e3/t,this.nextTime=1e3*this.time+this.gap,this},getDelta:function(t){var e=Date.now()-this.prevTime;e>this.maxLag&&(this.startTime+=e-this.lagSkip),this.prevTime+=e;var i=this.prevTime-this.startTime,s=i-this.nextTime,n=i-1e3*this.time;return s>0||t?(i/=1e3,this.time=i,this.nextTime+=s+(s>=this.gap?4:this.gap-s)):n=0,n},tick:function(){return this.step(!0),this},update:function(){this.paused||this.step(!1)},step:function(t){void 0===t&&(t=!1);var e=this.getDelta(t);if(!(e<=0)){var i,s;this.processing=!0;var n=[],r=this.tweens;for(i=0;i0){for(i=0;i-1&&(s.isPendingRemove()||s.isDestroyed())&&(r.splice(a,1),s.destroy())}n.length=0}this.processing=!1}},remove:function(t){return this.processing?t.setPendingRemoveState():(s(this.tweens,t),t.setRemovedState()),this},reset:function(t){return this.existing(t),t.seek(),t.setActiveState(),this},makeActive:function(t){return this.existing(t),t.setActiveState(),this},each:function(t,e){var i,s=[null];for(i=1;i{t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},21902:(t,e,i)=>{var s=i(35060),n=i(40587);t.exports=function(t,e){var i=s.Power0;if("string"==typeof t)if(s.hasOwnProperty(t))i=s[t];else{var r="";if(t.indexOf(".")){var o=(r=t.substring(t.indexOf(".")+1)).toLowerCase();"in"===o?r="easeIn":"out"===o?r="easeOut":"inout"===o&&(r="easeInOut")}t=n(t.substring(0,t.indexOf(".")+1)+r),s.hasOwnProperty(t)&&(i=s[t])}else"function"==typeof t&&(i=t);if(!e)return i;var a=e.slice(0);return a.unshift(0),function(t){return a[0]=t,i.apply(this,a)}}},4840:(t,e,i)=>{var s=i(63210),n=i(88332),r={bezier:s,catmull:n,catmullrom:n,linear:i(47614)};t.exports=function(t){if(null===t)return null;var e=r.linear;return"string"==typeof t?r.hasOwnProperty(t)&&(e=r[t]):"function"==typeof t&&(e=t),e}},28348:t=>{t.exports=function(t,e,i){var s;t.hasOwnProperty(e)?s="function"===typeof t[e]?function(i,s,n,r,o,a){return t[e](i,s,n,r,o,a)}:function(){return t[e]}:s="function"==typeof i?i:function(){return i};return s}},92407:(t,e,i)=>{var s=i(53709);t.exports=function(t){var e,i=[];if(t.hasOwnProperty("props"))for(e in t.props)"_"!==e.substring(0,1)&&i.push({key:e,value:t.props[e]});else for(e in t)-1===s.indexOf(e)&&"_"!==e.substring(0,1)&&i.push({key:e,value:t[e]});return i}},65868:(t,e,i)=>{var s=i(10850);t.exports=function(t){var e=s(t,"targets",null);return null===e||("function"==typeof e&&(e=e.call()),Array.isArray(e)||(e=[e])),e}},9744:(t,e,i)=>{var s=i(17489),n=i(61616);function r(t){return!!t.getActive&&"function"==typeof t.getActive}function o(t){return!!t.getStart&&"function"==typeof t.getStart}function a(t){return!!t.getEnd&&"function"==typeof t.getEnd}var h=function(t,e){var i,l,u=function(t,e,i){return i},c=function(t,e,i){return i},d=null,p=typeof e;if("number"===p)u=function(){return e};else if(Array.isArray(e))c=function(){return e[0]},u=function(){return e[e.length-1]};else if("string"===p){var f=e.toLowerCase(),v="random"===f.substring(0,6),g="int"===f.substring(0,3);if(v||g){var m=f.indexOf("("),y=f.indexOf(")"),x=f.indexOf(",");if(!(m&&y&&x))throw new Error("invalid random() format");var T=parseFloat(f.substring(m+1,x)),w=parseFloat(f.substring(x+1,y));u=v?function(){return n(T,w)}:function(){return s(T,w)}}else{f=f[0];var b=parseFloat(e.substr(2));switch(f){case"+":u=function(t,e,i){return i+b};break;case"-":u=function(t,e,i){return i-b};break;case"*":u=function(t,e,i){return i*b};break;case"/":u=function(t,e,i){return i/b};break;default:u=function(){return parseFloat(e)}}}}else if("function"===p)u=e;else if("object"===p)if(o(l=e)||a(l)||r(l))r(e)&&(d=e.getActive),a(e)&&(u=e.getEnd),o(e)&&(c=e.getStart);else if(e.hasOwnProperty("value"))i=h(t,e.value);else{var E=e.hasOwnProperty("to"),S=e.hasOwnProperty("from"),A=e.hasOwnProperty("start");if(E&&(S||A)){if(i=h(t,e.to),A){var C=h(t,e.start);i.getActive=C.getEnd}if(S){var _=h(t,e.from);i.getStart=_.getEnd}}}return i||(i={getActive:d,getEnd:u,getStart:c}),i};t.exports=h},68710:(t,e,i)=>{var s=i(502),n=i(99730),r=i(20494),o=i(63130),a=i(21902),h=i(28348),l=i(10850),u=i(9744),c=i(72066),d=i(39366);t.exports=function(t,e,i){if(e instanceof d)return e.parent=t,e;i=void 0===i?n:c(n,i);var p=l(e,"from",0),f=l(e,"to",1),v=[{value:p}],g=l(e,"delay",i.delay),m=l(e,"easeParams",i.easeParams),y=l(e,"ease",i.ease),x=u("value",f),T=new d(t,v),w=T.add(0,"value",x.getEnd,x.getStart,x.getActive,a(l(e,"ease",y),l(e,"easeParams",m)),h(e,"delay",g),l(e,"duration",i.duration),o(e,"yoyo",i.yoyo),l(e,"hold",i.hold),l(e,"repeat",i.repeat),l(e,"repeatDelay",i.repeatDelay),!1,!1);w.start=p,w.current=p,T.completeDelay=r(e,"completeDelay",0),T.loop=Math.round(r(e,"loop",0)),T.loopDelay=Math.round(r(e,"loopDelay",0)),T.paused=o(e,"paused",!1),T.persist=o(e,"persist",!1),T.callbackScope=l(e,"callbackScope",T);for(var b=s.TYPES,E=0;E{var s=i(21902),n=i(10850),r=i(83392);t.exports=function(t,e){var i;void 0===e&&(e={});var o=n(e,"start",0),a=n(e,"ease",null),h=n(e,"grid",null),l=n(e,"from",0),u="first"===l,c="center"===l,d="last"===l,p="number"==typeof l,f=Array.isArray(t),v=f?parseFloat(t[0]):parseFloat(t),g=f?parseFloat(t[1]):0,m=Math.max(v,g);if(f&&(o+=v),h){var y=h[0],x=h[1],T=0,w=0,b=0,E=0,S=[];d?(T=y-1,w=x-1):p?(T=l%y,w=Math.floor(l/y)):c&&(T=(y-1)/2,w=(x-1)/2);for(var A=r.MIN_SAFE_INTEGER,C=0;CA&&(A=M),S[C][_]=M}}}var R=a?s(a):null;return i=h?function(t,e,i,s){var n,r=0,a=s%y,h=Math.floor(s/y);if(a>=0&&a=0&&h{var s=i(502),n=i(99730),r=i(20494),o=i(63130),a=i(21902),h=i(4840),l=i(28348),u=i(92407),c=i(65868),d=i(10850),p=i(9744),f=i(72066),v=i(39366);t.exports=function(t,e,i){if(e instanceof v)return e.parent=t,e;i=void 0===i?n:f(n,i);var g=c(e);!g&&i.targets&&(g=i.targets);for(var m=u(e),y=d(e,"delay",i.delay),x=d(e,"duration",i.duration),T=d(e,"easeParams",i.easeParams),w=d(e,"ease",i.ease),b=d(e,"hold",i.hold),E=d(e,"repeat",i.repeat),S=d(e,"repeatDelay",i.repeatDelay),A=o(e,"yoyo",i.yoyo),C=o(e,"flipX",i.flipX),_=o(e,"flipY",i.flipY),M=d(e,"interpolation",i.interpolation),R=function(t,e,i,s){if("texture"===i){var n=s,r=void 0;Array.isArray(s)?(n=s[0],r=s[1]):s.hasOwnProperty("value")?(n=s.value,Array.isArray(s.value)?(n=s.value[0],r=s.value[1]):"string"==typeof s.value&&(n=s.value)):"string"==typeof s&&(n=s),t.addFrame(e,n,r,l(s,"delay",y),d(s,"duration",x),d(s,"hold",b),d(s,"repeat",E),d(s,"repeatDelay",S),o(s,"flipX",C),o(s,"flipY",_))}else{var u=p(i,s),c=h(d(s,"interpolation",M));t.add(e,i,u.getEnd,u.getStart,u.getActive,a(d(s,"ease",w),d(s,"easeParams",T)),l(s,"delay",y),d(s,"duration",x),o(s,"yoyo",A),d(s,"hold",b),d(s,"repeat",E),d(s,"repeatDelay",S),o(s,"flipX",C),o(s,"flipY",_),c,c?s:null)}},P=new v(t,g),O=0;O{var s=i(502),n=i(20494),r=i(63130),o=i(65868),a=i(10850),h=i(68061),l=i(45641);t.exports=function(t,e){if(e instanceof l)return e.parent=t,e;var i,u=new l(t);u.startDelay=a(e,"delay",0),u.completeDelay=n(e,"completeDelay",0),u.loop=Math.round(n(e,"loop",a(e,"repeat",0))),u.loopDelay=Math.round(n(e,"loopDelay",a(e,"repeatDelay",0))),u.paused=r(e,"paused",!1),u.persist=r(e,"persist",!0),u.callbackScope=a(e,"callbackScope",u);var c=s.TYPES;for(i=0;i{t.exports={GetBoolean:i(63130),GetEaseFunction:i(21902),GetInterpolationFunction:i(4840),GetNewValue:i(28348),GetProps:i(92407),GetTargets:i(65868),GetValueOp:i(9744),NumberTweenBuilder:i(68710),StaggerBuilder:i(91944),TweenBuilder:i(68061)}},5570:t=>{t.exports="active"},6383:t=>{t.exports="complete"},72582:t=>{t.exports="loop"},90281:t=>{t.exports="pause"},80803:t=>{t.exports="repeat"},13640:t=>{t.exports="resume"},10472:t=>{t.exports="start"},5379:t=>{t.exports="stop"},43449:t=>{t.exports="update"},61541:t=>{t.exports="yoyo"},54272:(t,e,i)=>{t.exports={TWEEN_ACTIVE:i(5570),TWEEN_COMPLETE:i(6383),TWEEN_LOOP:i(72582),TWEEN_PAUSE:i(90281),TWEEN_RESUME:i(13640),TWEEN_REPEAT:i(80803),TWEEN_START:i(10472),TWEEN_STOP:i(5379),TWEEN_UPDATE:i(43449),TWEEN_YOYO:i(61541)}},75193:(t,e,i)=>{var s={States:i(55303),Builders:i(79619),Events:i(54272),TweenManager:i(64532),Tween:i(39366),TweenData:i(15718),TweenFrameData:i(96490),BaseTween:i(502),TweenChain:i(45641)};t.exports=s},502:(t,e,i)=>{var s=i(56694),n=i(6659),r=i(54272),o=i(55303),a=new s({Extends:n,initialize:function(t){n.call(this),this.parent=t,this.data=[],this.totalData=0,this.startDelay=0,this.hasStarted=!1,this.timeScale=1,this.loop=0,this.loopDelay=0,this.loopCounter=0,this.completeDelay=0,this.countdown=0,this.state=o.PENDING,this.paused=!1,this.callbacks={onActive:null,onComplete:null,onLoop:null,onPause:null,onRepeat:null,onResume:null,onStart:null,onStop:null,onUpdate:null,onYoyo:null},this.callbackScope,this.persist=!1},setTimeScale:function(t){return this.timeScale=t,this},getTimeScale:function(){return this.timeScale},isPlaying:function(){return!this.paused&&this.isActive()},isPaused:function(){return this.paused},pause:function(){return this.paused||(this.paused=!0,this.dispatchEvent(r.TWEEN_PAUSE,"onPause")),this},resume:function(){return this.paused&&(this.paused=!1,this.dispatchEvent(r.TWEEN_RESUME,"onResume")),this},makeActive:function(){this.parent.makeActive(this),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive")},onCompleteHandler:function(){this.setPendingRemoveState(),this.dispatchEvent(r.TWEEN_COMPLETE,"onComplete")},complete:function(t){return void 0===t&&(t=0),t?(this.setCompleteDelayState(),this.countdown=t):this.onCompleteHandler(),this},completeAfterLoop:function(t){return void 0===t&&(t=0),this.loopCounter>t&&(this.loopCounter=t),this},remove:function(){return this.parent.remove(this),this},stop:function(){return this.isRemoved()||this.isPendingRemove()||this.isDestroyed()||(this.dispatchEvent(r.TWEEN_STOP,"onStop"),this.setPendingRemoveState()),this},updateLoopCountdown:function(t){this.countdown-=t,this.countdown<=0&&(this.setActiveState(),this.dispatchEvent(r.TWEEN_LOOP,"onLoop"))},updateStartCountdown:function(t){return this.countdown-=t,this.countdown<=0&&(this.hasStarted=!0,this.setActiveState(),this.dispatchEvent(r.TWEEN_START,"onStart"),t=0),t},updateCompleteDelay:function(t){this.countdown-=t,this.countdown<=0&&this.onCompleteHandler()},setCallback:function(t,e,i){return void 0===i&&(i=[]),this.callbacks.hasOwnProperty(t)&&(this.callbacks[t]={func:e,params:i}),this},setPendingState:function(){this.state=o.PENDING},setActiveState:function(){this.state=o.ACTIVE},setLoopDelayState:function(){this.state=o.LOOP_DELAY},setCompleteDelayState:function(){this.state=o.COMPLETE_DELAY},setStartDelayState:function(){this.state=o.START_DELAY,this.countdown=this.startDelay,this.hasStarted=!1},setPendingRemoveState:function(){this.state=o.PENDING_REMOVE},setRemovedState:function(){this.state=o.REMOVED},setFinishedState:function(){this.state=o.FINISHED},setDestroyedState:function(){this.state=o.DESTROYED},isPending:function(){return this.state===o.PENDING},isActive:function(){return this.state===o.ACTIVE},isLoopDelayed:function(){return this.state===o.LOOP_DELAY},isCompleteDelayed:function(){return this.state===o.COMPLETE_DELAY},isStartDelayed:function(){return this.state===o.START_DELAY},isPendingRemove:function(){return this.state===o.PENDING_REMOVE},isRemoved:function(){return this.state===o.REMOVED},isFinished:function(){return this.state===o.FINISHED},isDestroyed:function(){return this.state===o.DESTROYED},destroy:function(){this.data&&this.data.forEach((function(t){t.destroy()})),this.removeAllListeners(),this.callbacks=null,this.data=null,this.parent=null,this.setDestroyedState()}});a.TYPES=["onActive","onComplete","onLoop","onPause","onRepeat","onResume","onStart","onStop","onUpdate","onYoyo"],t.exports=a},65521:(t,e,i)=>{var s=i(56694),n=i(54272),r=i(55303),o=new s({initialize:function(t,e,i,s,n,r,o,a,h,l){this.tween=t,this.targetIndex=e,this.duration=s,this.totalDuration=0,this.delay=0,this.getDelay=i,this.yoyo=n,this.hold=r,this.repeat=o,this.repeatDelay=a,this.repeatCounter=0,this.flipX=h,this.flipY=l,this.progress=0,this.elapsed=0,this.state=0,this.isCountdown=!1},getTarget:function(){return this.tween.targets[this.targetIndex]},setTargetValue:function(t){void 0===t&&(t=this.current),this.tween.targets[this.targetIndex][this.key]=t},setCreatedState:function(){this.state=r.CREATED,this.isCountdown=!1},setDelayState:function(){this.state=r.DELAY,this.isCountdown=!0},setPendingRenderState:function(){this.state=r.PENDING_RENDER,this.isCountdown=!1},setPlayingForwardState:function(){this.state=r.PLAYING_FORWARD,this.isCountdown=!1},setPlayingBackwardState:function(){this.state=r.PLAYING_BACKWARD,this.isCountdown=!1},setHoldState:function(){this.state=r.HOLD_DELAY,this.isCountdown=!0},setRepeatState:function(){this.state=r.REPEAT_DELAY,this.isCountdown=!0},setCompleteState:function(){this.state=r.COMPLETE,this.isCountdown=!1},isCreated:function(){return this.state===r.CREATED},isDelayed:function(){return this.state===r.DELAY},isPendingRender:function(){return this.state===r.PENDING_RENDER},isPlayingForward:function(){return this.state===r.PLAYING_FORWARD},isPlayingBackward:function(){return this.state===r.PLAYING_BACKWARD},isHolding:function(){return this.state===r.HOLD_DELAY},isRepeating:function(){return this.state===r.REPEAT_DELAY},isComplete:function(){return this.state===r.COMPLETE},setStateFromEnd:function(t){this.yoyo?this.onRepeat(t,!0,!0):this.repeatCounter>0?this.onRepeat(t,!0,!1):this.setCompleteState()},setStateFromStart:function(t){this.repeatCounter>0?this.onRepeat(t,!1):this.setCompleteState()},reset:function(){var t=this.tween,e=t.totalTargets,i=this.targetIndex,s=t.targets[i],n=this.key;this.progress=0,this.elapsed=0,this.delay=this.getDelay(s,n,0,i,e,t),this.repeatCounter=-1===this.repeat?r.MAX:this.repeat,this.setPendingRenderState();var o=this.duration+this.hold;this.yoyo&&(o+=this.duration);var a=o+this.repeatDelay;this.totalDuration=this.delay+o,-1===this.repeat?(this.totalDuration+=a*r.MAX,t.isInfinite=!0):this.repeat>0&&(this.totalDuration+=a*this.repeat),this.totalDuration>t.duration&&(t.duration=this.totalDuration),this.delay0&&(this.elapsed=this.delay,this.setDelayState())},onRepeat:function(t,e,i){var s=this.tween,r=s.totalTargets,o=this.targetIndex,a=s.targets[o],h=this.key,l="texture"!==h;if(this.elapsed=t,this.progress=t/this.duration,this.flipX&&a.toggleFlipX(),this.flipY&&a.toggleFlipY(),l&&(e||i)&&(this.start=this.getStartValue(a,h,this.start,o,r,s)),i)return this.setPlayingBackwardState(),void this.dispatchEvent(n.TWEEN_YOYO,"onYoyo");this.repeatCounter--,l&&(this.end=this.getEndValue(a,h,this.start,o,r,s)),this.repeatDelay>0?(this.elapsed=this.repeatDelay-t,l&&(this.current=this.start,a[h]=this.current),this.setRepeatState()):(this.setPlayingForwardState(),this.dispatchEvent(n.TWEEN_REPEAT,"onRepeat"))},destroy:function(){this.tween=null,this.getDelay=null,this.setCompleteState()}});t.exports=o},99730:t=>{t.exports={targets:null,delay:0,duration:1e3,ease:"Power0",easeParams:null,hold:0,repeat:0,repeatDelay:0,yoyo:!1,flipX:!1,flipY:!1,persist:!1,interpolation:null}},53709:t=>{t.exports=["callbackScope","completeDelay","delay","duration","ease","easeParams","flipX","flipY","hold","interpolation","loop","loopDelay","onActive","onActiveParams","onComplete","onCompleteParams","onLoop","onLoopParams","onPause","onPauseParams","onRepeat","onRepeatParams","onResume","onResumeParams","onStart","onStartParams","onStop","onStopParams","onUpdate","onUpdateParams","onYoyo","onYoyoParams","paused","persist","props","repeat","repeatDelay","targets","yoyo"]},39366:(t,e,i)=>{var s=i(502),n=i(56694),r=i(54272),o=i(99325),a=i(61286),h=i(83392),l=i(55303),u=i(15718),c=i(96490),d=new n({Extends:s,initialize:function(t,e){s.call(this,t),this.targets=e,this.totalTargets=e.length,this.isSeeking=!1,this.isInfinite=!1,this.elapsed=0,this.totalElapsed=0,this.duration=0,this.progress=0,this.totalDuration=0,this.totalProgress=0},add:function(t,e,i,s,n,r,o,a,h,l,c,d,p,f,v,g){var m=new u(this,t,e,i,s,n,r,o,a,h,l,c,d,p,f,v,g);return this.totalData=this.data.push(m),m},addFrame:function(t,e,i,s,n,r,o,a,h,l){var u=new c(this,t,e,i,s,n,r,o,a,h,l);return this.totalData=this.data.push(u),u},getValue:function(t){void 0===t&&(t=0);var e=null;return this.data&&(e=this.data[t].current),e},hasTarget:function(t){return this.targets&&-1!==this.targets.indexOf(t)},updateTo:function(t,e,i){if(void 0===i&&(i=!1),"texture"!==t)for(var s=0;s0)this.elapsed=0,this.progress=0,this.loopCounter--,this.initTweenData(!0),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(r.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},onCompleteHandler:function(){this.progress=1,this.totalProgress=1,s.prototype.onCompleteHandler.call(this)},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed Tween",this),this):((this.isPendingRemove()||this.isFinished())&&this.seek(),this.paused=!1,this.setActiveState(),this)},seek:function(t,e,i){if(void 0===t&&(t=0),void 0===e&&(e=16.6),void 0===i&&(i=!1),this.isDestroyed())return console.warn("Cannot seek destroyed Tween",this),this;i||(this.isSeeking=!0),this.reset(!0),this.initTweenData(!0),this.setActiveState(),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive");var s=this.paused;if(this.paused=!1,t>0){for(var n=Math.floor(t/e),o=t-n*e,a=0;a0&&this.update(o)}return this.paused=s,this.isSeeking=!1,this},initTweenData:function(t){void 0===t&&(t=!1),this.duration=0,this.startDelay=h.MAX_SAFE_INTEGER;for(var e=this.data,i=0;i0?s+n+(s+o)*r:s+n},reset:function(t){return void 0===t&&(t=!1),this.elapsed=0,this.totalElapsed=0,this.progress=0,this.totalProgress=0,this.loopCounter=this.loop,-1===this.loop&&(this.isInfinite=!0,this.loopCounter=l.MAX),t||(this.initTweenData(),this.setActiveState(),this.dispatchEvent(r.TWEEN_ACTIVE,"onActive")),this},update:function(t){if(this.isPendingRemove()||this.isDestroyed())return!0;if(this.paused||this.isFinished())return!1;if(t*=this.timeScale*this.parent.timeScale,this.isLoopDelayed())return this.updateLoopCountdown(t),!1;if(this.isCompleteDelayed())return this.updateCompleteDelay(t),!1;this.hasStarted||(this.startDelay-=t,this.startDelay<=0&&(this.hasStarted=!0,this.dispatchEvent(r.TWEEN_START,"onStart"),t=0));var e=!1;if(this.isActive())for(var i=this.data,s=0;s{var s=i(66458),n=i(502),r=i(56694),o=i(54272),a=i(99325),h=i(61286),l=i(55303),u=new r({Extends:n,initialize:function(t){n.call(this,t),this.currentTween=null,this.currentIndex=0},init:function(){return this.loopCounter=-1===this.loop?l.MAX:this.loop,this.setCurrentTween(0),this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this.dispatchEvent(o.TWEEN_ACTIVE,"onActive"),this},add:function(t){var e=this.parent.create(t);Array.isArray(e)||(e=[e]);for(var i=this.data,s=0;s0)this.loopCounter--,this.resetTweens(),this.loopDelay>0?(this.countdown=this.loopDelay,this.setLoopDelayState()):(this.setActiveState(),this.dispatchEvent(o.TWEEN_LOOP,"onLoop"));else{if(!(this.completeDelay>0))return this.onCompleteHandler(),!0;this.countdown=this.completeDelay,this.setCompleteDelayState()}return!1},play:function(){return this.isDestroyed()?(console.warn("Cannot play destroyed TweenChain",this),this):((this.isPendingRemove()||this.isPending())&&this.resetTweens(),this.paused=!1,this.startDelay>0&&!this.isStartDelayed()?this.setStartDelayState():this.setActiveState(),this)},resetTweens:function(){for(var t=this.data,e=this.totalData,i=0;i{var s=i(65521),n=i(82897),r=i(56694),o=i(54272),a=new r({Extends:s,initialize:function(t,e,i,n,r,o,a,h,l,u,c,d,p,f,v,g,m){s.call(this,t,e,h,l,u,c,d,p,f,v),this.key=i,this.getActiveValue=o,this.getEndValue=n,this.getStartValue=r,this.ease=a,this.start=0,this.previous=0,this.current=0,this.end=0,this.interpolation=g,this.interpolationData=m},reset:function(t){s.prototype.reset.call(this);var e=this.tween.targets[this.targetIndex],i=this.key;t&&(e[i]=this.start),this.start=0,this.previous=0,this.current=0,this.end=0,this.getActiveValue&&(e[i]=this.getActiveValue(e,i,0))},update:function(t){var e=this.tween,i=e.totalTargets,s=this.targetIndex,r=e.targets[s],a=this.key;if(!r)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=t,this.elapsed<=0&&(this.elapsed=0,t=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(o.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.start=this.getStartValue(r,a,r[a],s,i,e),this.end=this.getEndValue(r,a,this.start,s,i,e),this.current=this.start,r[a]=this.start,this.setPlayingForwardState(),!0;var h=this.isPlayingForward(),l=this.isPlayingBackward();if(h||l){var u=this.elapsed,c=this.duration,d=0,p=!1;(u+=t)>=c?(d=u-c,u=c,p=!0):u<0&&(u=0);var f=n(u/c,0,1);if(this.elapsed=u,this.progress=f,this.previous=this.current,p)h?(this.current=this.end,r[a]=this.end,this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(d)):(this.current=this.start,r[a]=this.start,this.setStateFromStart(d));else{h||(f=1-f);var v=this.ease(f);this.interpolation?this.current=this.interpolation(this.interpolationData,v):this.current=this.start+(this.end-this.start)*v,r[a]=this.current}this.dispatchEvent(o.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(t,e){var i=this.tween;if(!i.isSeeking){var s=i.targets[this.targetIndex],n=this.key,r=this.current,o=this.previous;i.emit(t,i,n,s,r,o);var a=i.callbacks[e];a&&a.func.apply(i.callbackScope,[i,s,n,r,o].concat(a.params))}},destroy:function(){s.prototype.destroy.call(this),this.getActiveValue=null,this.getEndValue=null,this.getStartValue=null,this.ease=null}});t.exports=a},96490:(t,e,i)=>{var s=i(65521),n=i(82897),r=i(56694),o=i(54272),a=new r({Extends:s,initialize:function(t,e,i,n,r,o,a,h,l,u,c){s.call(this,t,e,r,o,!1,a,h,l,u,c),this.key="texture",this.startTexture=null,this.endTexture=i,this.startFrame=null,this.endFrame=n,this.yoyo=0!==h},reset:function(t){s.prototype.reset.call(this);var e=this.tween.targets[this.targetIndex];this.startTexture||(this.startTexture=e.texture.key,this.startFrame=e.frame.name),t&&e.setTexture(this.startTexture,this.startFrame)},update:function(t){var e=this.tween,i=this.targetIndex,s=e.targets[i];if(!s)return this.setCompleteState(),!1;if(this.isCountdown&&(this.elapsed-=t,this.elapsed<=0&&(this.elapsed=0,t=0,this.isDelayed()?this.setPendingRenderState():this.isRepeating()?(this.setPlayingForwardState(),this.dispatchEvent(o.TWEEN_REPEAT,"onRepeat")):this.isHolding()&&this.setStateFromEnd(0))),this.isPendingRender())return this.startTexture&&s.setTexture(this.startTexture,this.startFrame),this.setPlayingForwardState(),!0;var r=this.isPlayingForward(),a=this.isPlayingBackward();if(r||a){var h=this.elapsed,l=this.duration,u=0,c=!1;(h+=t)>=l?(u=h-l,h=l,c=!0):h<0&&(h=0);var d=n(h/l,0,1);this.elapsed=h,this.progress=d,c&&(r?(s.setTexture(this.endTexture,this.endFrame),this.hold>0?(this.elapsed=this.hold,this.setHoldState()):this.setStateFromEnd(u)):(s.setTexture(this.startTexture,this.startFrame),this.setStateFromStart(u))),this.dispatchEvent(o.TWEEN_UPDATE,"onUpdate")}return!this.isComplete()},dispatchEvent:function(t,e){var i=this.tween;if(!i.isSeeking){var s=i.targets[this.targetIndex],n=this.key;i.emit(t,i,n,s);var r=i.callbacks[e];r&&r.func.apply(i.callbackScope,[i,s,n].concat(r.params))}},destroy:function(){s.prototype.destroy.call(this),this.startTexture=null,this.endTexture=null,this.startFrame=null,this.endFrame=null}});t.exports=a},55303:t=>{t.exports={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999}},56694:t=>{function e(t,e,i){var s=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&s.value&&"object"==typeof s.value&&(s=s.value),!(!s||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(s))&&(void 0===s.enumerable&&(s.enumerable=!0),void 0===s.configurable&&(s.configurable=!0),s)}function i(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,s,n,o){for(var a in s)if(s.hasOwnProperty(a)){var h=e(s,a,n);if(!1!==h){if(i((o||t).prototype,a)){if(r.ignoreFinals)continue;throw new Error("cannot override final property '"+a+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,a,h)}else t.prototype[a]=s[a]}}function n(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i{t.exports=function(){}},10618:t=>{t.exports=function(){return null}},78991:t=>{t.exports=function(t,e,i,s,n){if(void 0===n&&(n=t),i>0){var r=i-t.length;if(r<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),s&&s.call(n,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;i>0&&o>r&&(e.splice(r),o=r);for(var a=0;a{t.exports=function(t,e,i,s,n,r){if(void 0===i&&(i=0),void 0===r&&(r=t),s>0){var o=s-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),n&&n.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;s>0&&a>o&&(e.splice(o),a=o);for(var h=a-1;h>=0;h--){var l=e[h];t.splice(i,0,l),n&&n.call(r,l)}return e}},58742:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i{var s=i(45838);t.exports=function(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);var o=0;if(s(t,n,r))for(var a=n;a{t.exports=function(t,e,i){var s,n=[null];for(s=3;s{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r)){var o,a=[null];for(o=5;o{t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var s,n,r=1;if(i){if(te.length&&(r=e.length),i?(s=e[r-1][i],(n=e[r][i])-t<=t-s?e[r]:e[r-1]):(s=e[r-1],(n=e[r])-t<=t-s?n:s)}},5454:t=>{var e=function(t,i){void 0===i&&(i=[]);for(var s=0;s{var s=i(45838);t.exports=function(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);var o=[];if(s(t,n,r))for(var a=n;a{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r))for(var o=n;o{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var s=e+Math.floor(Math.random()*i);return void 0===t[s]?null:t[s]}},24218:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),n=t.indexOf(i);if(s<0||n<0)throw new Error("Supplied items must be elements of the same array");return s>n||(t.splice(s,1),n===t.length-1?t.push(e):t.splice(n,0,e)),t}},58258:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),n=t.indexOf(i);if(s<0||n<0)throw new Error("Supplied items must be elements of the same array");return s{t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var s=t[i-1],n=t.indexOf(s);t[i]=s,t[n]=e}return t}},68396:t=>{t.exports=function(t,e,i){var s=t.indexOf(e);if(-1===s||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return s!==i&&(t.splice(s,1),t.splice(i,0,e)),e}},27555:t=>{t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i{t.exports=function(t,e,i,s){var n,r=[],o=!1;if((i||s)&&(o=!0,i||(i=""),s||(s="")),e=e;n--)o?r.push(i+n.toString()+s):r.push(n);else for(n=t;n<=e;n++)o?r.push(i+n.toString()+s):r.push(n);return r}},89955:(t,e,i)=>{var s=i(67233);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var n=[],r=Math.max(s((e-t)/(i||1)),0),o=0;o{function e(t,e,i){var s=t[e];t[e]=t[i],t[i]=s}function i(t,e){return te?1:0}var s=function(t,n,r,o,a){for(void 0===r&&(r=0),void 0===o&&(o=t.length-1),void 0===a&&(a=i);o>r;){if(o-r>600){var h=o-r+1,l=n-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),p=Math.max(r,Math.floor(n-l*c/h+d)),f=Math.min(o,Math.floor(n+(h-l)*c/h+d));s(t,n,p,f,a)}var v=t[n],g=r,m=o;for(e(t,r,n),a(t[o],v)>0&&e(t,r,o);g0;)m--}0===a(t[r],v)?e(t,r,m):e(t,++m,o),m<=n&&(r=m+1),n<=m&&(o=m-1)}};t.exports=s},75757:(t,e,i)=>{var s=i(10850),n=i(18592),r=function(t,e,i){for(var s=[],n=0;n{var s=i(72677);t.exports=function(t,e,i,n){var r;if(void 0===n&&(n=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(s(t,r),i&&i.call(n,e),e):null;for(var o=e.length-1,a=[];o>=0;){var h=e[o];-1!==(r=t.indexOf(h))&&(s(t,r),a.push(h),i&&i.call(n,h)),o--}return a}},8324:(t,e,i)=>{var s=i(72677);t.exports=function(t,e,i,n){if(void 0===n&&(n=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var r=s(t,e);return i&&i.call(n,r),r}},47427:(t,e,i)=>{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),s(t,e,i)){var o=i-e,a=t.splice(e,o);if(n)for(var h=0;h{var s=i(72677);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var n=e+Math.floor(Math.random()*i);return s(t,n)}},80402:t=>{t.exports=function(t,e,i){var s=t.indexOf(e),n=t.indexOf(i);return-1!==s&&-1===n&&(t[s]=i,!0)}},77640:t=>{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e,i,s){var n=t.length;if(e<0||e>n||e>=i||i>n){if(s)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},27847:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},6034:(t,e,i)=>{var s=i(45838);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),s(t,n,r))for(var o=n;o{t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[i],t[i]=s}return t}},28834:t=>{t.exports=function(t){var e=/\D/g;return t.sort((function(t,i){return parseInt(t.replace(e,""),10)-parseInt(i.replace(e,""),10)})),t}},72677:t=>{t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,s=t[e],n=e;n{var s=i(77290);function n(t,e){return String(t).localeCompare(e)}function r(t,e,i,s){var n,r,o,a,h,l=t.length,u=0,c=2*i;for(n=0;nl&&(r=l),o>l&&(o=l),a=n,h=r;;)if(a{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),n=t.indexOf(i);if(s<0||n<0)throw new Error("Supplied items must be elements of the same array");return t[s]=i,t[n]=e,t}},59959:(t,e,i)=>{t.exports={Matrix:i(13515),Add:i(78991),AddAt:i(48522),BringToTop:i(58742),CountAllMatching:i(30164),Each:i(36337),EachInRange:i(46208),FindClosestInSorted:i(2406),Flatten:i(5454),GetAll:i(71608),GetFirst:i(51463),GetRandom:i(72861),MoveDown:i(51172),MoveTo:i(68396),MoveUp:i(27555),MoveAbove:i(24218),MoveBelow:i(58258),NumberArray:i(13401),NumberArrayStep:i(89955),QuickSelect:i(53466),Range:i(75757),Remove:i(66458),RemoveAt:i(8324),RemoveBetween:i(47427),RemoveRandomElement:i(50147),Replace:i(80402),RotateLeft:i(77640),RotateRight:i(38487),SafeRange:i(45838),SendToBack:i(27847),SetAll:i(6034),Shuffle:i(18592),SortByDigits:i(28834),SpliceOne:i(72677),StableSort:i(17922),Swap:i(96928)}},97494:t=>{t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i{var s=i(76400),n=i(97494);t.exports=function(t){var e="";if(!n(t))return e;for(var i=0;i{t.exports=function(t){return t.reverse()}},51995:t=>{t.exports=function(t){for(var e=0;e{var s=i(63515);t.exports=function(t){return s(t,180)}},42549:(t,e,i)=>{var s=i(63515);t.exports=function(t){return s(t,90)}},63515:(t,e,i)=>{var s=i(97494),n=i(78581);t.exports=function(t,e){if(void 0===e&&(e=90),!s(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=n(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=n(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i{var s=i(63515);t.exports=function(t){return s(t,-90)}},27365:(t,e,i)=>{var s=i(77640),n=i(38487);t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?s(t,Math.abs(i)):n(t,i)),0!==e)for(var r=0;r{t.exports=function(t){for(var e=t.length,i=t[0].length,s=new Array(i),n=0;n-1;r--)s[n][r]=t[r][n]}return s}},13515:(t,e,i)=>{t.exports={CheckMatrix:i(97494),MatrixToString:i(68428),ReverseColumns:i(59521),ReverseRows:i(51995),Rotate180:i(89011),RotateLeft:i(42549),RotateMatrix:i(63515),RotateRight:i(14305),Translate:i(27365),TransposeMatrix:i(78581)}},40581:t=>{var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";t.exports=function(t,i){for(var s=new Uint8Array(t),n=s.length,r=i?"data:"+i+";base64,":"",o=0;o>2],r+=e[(3&s[o])<<4|s[o+1]>>4],r+=e[(15&s[o+1])<<2|s[o+2]>>6],r+=e[63&s[o+2]];return n%3==2?r=r.substring(0,r.length-1)+"=":n%3==1&&(r=r.substring(0,r.length-2)+"=="),r}},82329:t=>{for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(256),s=0;s>4,u[h++]=(15&s)<<4|n>>2,u[h++]=(3&n)<<6|63&r;return l}},78417:(t,e,i)=>{t.exports={ArrayBufferToBase64:i(40581),Base64ToArrayBuffer:i(82329)}},22178:(t,e,i)=>{t.exports={Array:i(59959),Base64:i(78417),Objects:i(64615),String:i(50379),NOOP:i(72283),NULL:i(10618)}},32742:t=>{t.exports=function(t){var e={};for(var i in t)Array.isArray(t[i])?e[i]=t[i].slice(0):e[i]=t[i];return e}},28699:t=>{var e=function(t){var i,s,n;if("object"!=typeof t||null===t)return t;for(n in i=Array.isArray(t)?[]:{},t)s=t[n],i[n]=e(s);return i};t.exports=e},98611:(t,e,i)=>{var s=i(42911),n=function(){var t,e,i,r,o,a,h=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},l=2),u===l&&(h=this,--l);l{var s=i(5923),n=i(10850);t.exports=function(t,e,i){var r=n(t,e,null);if(null===r)return i;if(Array.isArray(r))return s.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return s.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return s.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},72632:t=>{t.exports=function(t,e,i){var s=typeof t;return t&&"number"!==s&&"string"!==s&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},94324:(t,e,i)=>{var s=i(10850),n=i(82897);t.exports=function(t,e,i,r,o){void 0===o&&(o=i);var a=s(t,e,o);return n(a,i,r)}},10850:t=>{t.exports=function(t,e,i,s){if(!t&&!s||"number"==typeof t)return i;if(t&&t.hasOwnProperty(e))return t[e];if(s&&s.hasOwnProperty(e))return s[e];if(-1!==e.indexOf(".")){for(var n=e.split("."),r=t,o=s,a=i,h=i,l=!0,u=!0,c=0;c{t.exports=function(t,e){for(var i=0;i{t.exports=function(t,e){for(var i=0;i{t.exports=function(t,e){return t.hasOwnProperty(e)}},42911:t=>{t.exports=function(t){if(!t||"object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},30657:(t,e,i)=>{var s=i(32742);t.exports=function(t,e){var i=s(t);for(var n in e)i.hasOwnProperty(n)||(i[n]=e[n]);return i}},72066:(t,e,i)=>{var s=i(32742);t.exports=function(t,e){var i=s(t);for(var n in e)i.hasOwnProperty(n)&&(i[n]=e[n]);return i}},28820:(t,e,i)=>{var s=i(19256);t.exports=function(t,e){for(var i={},n=0;n{t.exports=function(t,e,i){if(!t||"number"==typeof t)return!1;if(t.hasOwnProperty(e))return t[e]=i,!0;if(-1!==e.indexOf(".")){for(var s=e.split("."),n=t,r=t,o=0;o{t.exports={Clone:i(32742),DeepCopy:i(28699),Extend:i(98611),GetAdvancedValue:i(20494),GetFastValue:i(72632),GetMinMaxValue:i(94324),GetValue:i(10850),HasAll:i(87701),HasAny:i(53523),HasValue:i(19256),IsPlainObject:i(42911),Merge:i(30657),MergeRight:i(72066),Pick:i(28820),SetValue:i(22440)}},69429:t=>{t.exports=function(t,e){return t.replace(/%([0-9]+)/g,(function(t,i){return e[Number(i)-1]}))}},76400:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===s&&(s=3);var n=0;if(e+1>=(t=t.toString()).length)switch(s){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((n=e-t.length)/2);t=new Array(n-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},76872:t=>{t.exports=function(t,e){return 0===e?t.slice(1):t.slice(0,e-1)+t.slice(e)}},8051:t=>{t.exports=function(t){return t.split("").reverse().join("")}},76583:t=>{t.exports=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}},40587:t=>{t.exports=function(t){return t&&t[0].toUpperCase()+t.slice(1)}},50379:(t,e,i)=>{t.exports={Format:i(69429),Pad:i(76400),RemoveAt:i(76872),Reverse:i(8051),UppercaseFirst:i(40587),UUID:i(76583)}}},e={};function i(s){var n=e[s];if(void 0!==n)return n.exports;var r=e[s]={exports:{}};return t[s](r,r.exports,i),r.exports}return i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i(92491)})())); \ No newline at end of file diff --git a/types/phaser.d.ts b/types/phaser.d.ts index e8988eef91..cf295955b7 100644 --- a/types/phaser.d.ts +++ b/types/phaser.d.ts @@ -1345,6 +1345,14 @@ declare namespace Phaser { */ get(key: string): Phaser.Animations.Animation; + /** + * Returns an array of all Animation keys that are using the given + * Texture. Only Animations that have at least one AnimationFrame + * entry using this texture will be included in the result. + * @param key The unique string-based key of the Texture, or a Texture, or Frame instance. + */ + getAnimsFromTexture(key: string | Phaser.Textures.Texture | Phaser.Textures.Frame): string[]; + /** * Pause all animations. */ @@ -5201,7 +5209,9 @@ declare namespace Phaser { cache: Phaser.Cache.CacheManager; /** - * An instance of the Data Manager + * An instance of the Data Manager. This is a global manager, available from any Scene + * and allows you to share and exchange your own game-level data or events without having + * to use an internal event system. */ registry: Phaser.Data.DataManager; @@ -10062,16 +10072,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -10539,10 +10551,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -11396,16 +11408,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -11873,10 +11887,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -12644,10 +12658,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -13443,15 +13457,17 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. * The origin is a normalized value between 0 and 1. @@ -14120,10 +14136,10 @@ declare namespace Phaser { setAngle(degrees?: number): this; /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. * @param value The x position of this Game Object. Default 0. @@ -14438,8 +14454,9 @@ declare namespace Phaser { * @param xw The xw value. * @param yh The yh value. * @param roundPixels Pass the results via Math.round? + * @param quad Optional Float32Array to store the results in. Otherwises uses the local quad array. */ - setQuad(x: number, y: number, xw: number, yh: number, roundPixels: boolean): number; + setQuad(x: number, y: number, xw: number, yh: number, roundPixels: boolean, quad?: Float32Array): Float32Array; /** * Returns the X component of this matrix multiplied by the given values. @@ -15498,10 +15515,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -16191,16 +16208,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -16414,10 +16433,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -16866,16 +16885,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -17302,10 +17323,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -17754,7 +17775,7 @@ declare namespace Phaser { * every game frame. This method is passed two parameters: `delta` and `time`. * * If you wish to run your own logic within `preUpdate` then you should always call - * `preUpdate.super(delta, time)` within it, or it may fail to process required operations, + * `super.preUpdate(delta, time)` within it, or it may fail to process required operations, * such as Sprite animations. */ addToUpdateList(): this; @@ -17956,13 +17977,17 @@ declare namespace Phaser { nineslice(config: Phaser.Types.GameObjects.NineSlice.NineSliceConfig, addToScene?: boolean): Phaser.GameObjects.NineSlice; /** - * Creates a new Particle Emitter Manager Game Object and returns it. + * Creates a new Particle Emitter Game Object and returns it. + * + * Prior to Phaser v3.60 this function would create a `ParticleEmitterManager`. These were removed + * in v3.60 and replaced with creating a `ParticleEmitter` instance directly. Please see the + * updated function parameters and class documentation for more details. * * Note: This method will only be available if the Particles Game Object has been built into Phaser. * @param config The configuration object this Game Object will use to create itself. * @param addToScene Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object. */ - particles(config: Phaser.Types.GameObjects.Particles.ParticleEmitterManagerConfig, addToScene?: boolean): Phaser.GameObjects.Particles.ParticleEmitterManager; + particles(config: Phaser.Types.GameObjects.Particles.ParticleEmitterCreatorConfig, addToScene?: boolean): Phaser.GameObjects.Particles.ParticleEmitter; /** * Creates a new Point Light Game Object and returns it. @@ -18218,10 +18243,10 @@ declare namespace Phaser { * Note: This method will only be available if the Blitter Game Object has been built into Phaser. * @param x The x position of the Game Object. * @param y The y position of the Game Object. - * @param key The key of the Texture the Blitter object will use. + * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param frame The default Frame children of the Blitter will use. */ - blitter(x: number, y: number, key: string, frame?: string | number): Phaser.GameObjects.Blitter; + blitter(x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number): Phaser.GameObjects.Blitter; /** * Creates a new Container Game Object and adds it to the Scene. @@ -18415,7 +18440,7 @@ declare namespace Phaser { * parameters to this class. * * This is extremely useful for UI and button like elements, where you need - * them to expand to accomodate the content without distorting the texture. + * them to expand to accommodate the content without distorting the texture. * * The texture you provide for this Game Object should be based on the * following layout structure: @@ -18491,14 +18516,21 @@ declare namespace Phaser { nineslice(x: number, y: number, texture: string | Phaser.Textures.Texture, frame?: string | number, width?: number, height?: number, leftWidth?: number, rightWidth?: number, topHeight?: number, bottomHeight?: number): Phaser.GameObjects.NineSlice; /** - * Creates a new Particle Emitter Manager Game Object and adds it to the Scene. + * Creates a new Particle Emitter Game Object and adds it to the Scene. + * + * If you wish to configure the Emitter after creating it, use the `ParticleEmitter.setConfig` method. + * + * Prior to Phaser v3.60 this function would create a `ParticleEmitterManager`. These were removed + * in v3.60 and replaced with creating a `ParticleEmitter` instance directly. Please see the + * updated function parameters and class documentation for more details. * * Note: This method will only be available if the Particles Game Object has been built into Phaser. + * @param x The horizontal position of this Game Object in the world. + * @param y The vertical position of this Game Object in the world. * @param texture The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager. - * @param frame An optional frame from the Texture this Game Object is rendering with. - * @param emitters Configuration settings for one or more emitters to create. + * @param config Configuration settings for the Particle Emitter. */ - particles(texture: string | Phaser.Textures.Texture, frame?: string | number | object, emitters?: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig | Phaser.Types.GameObjects.Particles.ParticleEmitterConfig[]): Phaser.GameObjects.Particles.ParticleEmitterManager; + particles(x?: number, y?: number, texture?: string | Phaser.Textures.Texture, config?: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig): Phaser.GameObjects.Particles.ParticleEmitter; /** * Creates a new PathFollower Game Object and adds it to the Scene. @@ -19127,28 +19159,33 @@ declare namespace Phaser { /** * The default fill color for shapes rendered by this Graphics object. + * Set this value with `setDefaultStyles()`. */ - defaultFillColor: number; + readonly defaultFillColor: number; /** * The default fill alpha for shapes rendered by this Graphics object. + * Set this value with `setDefaultStyles()`. */ - defaultFillAlpha: number; + readonly defaultFillAlpha: number; /** * The default stroke width for shapes rendered by this Graphics object. + * Set this value with `setDefaultStyles()`. */ - defaultStrokeWidth: number; + readonly defaultStrokeWidth: number; /** * The default stroke color for shapes rendered by this Graphics object. + * Set this value with `setDefaultStyles()`. */ - defaultStrokeColor: number; + readonly defaultStrokeColor: number; /** * The default stroke alpha for shapes rendered by this Graphics object. + * Set this value with `setDefaultStyles()`. */ - defaultStrokeAlpha: number; + readonly defaultStrokeAlpha: number; /** * Set the default style settings for this Graphics object. @@ -19317,7 +19354,7 @@ declare namespace Phaser { * @param y The y coordinate of the top-left of the rectangle. * @param width The width of the rectangle. * @param height The height of the rectangle. - * @param radius The corner radius; It can also be an object to specify different radii for corners. Default 20. + * @param radius The corner radius; It can also be an object to specify different radius for corners. Default 20. */ fillRoundedRect(x: number, y: number, width: number, height: number, radius?: Phaser.Types.GameObjects.Graphics.RoundedRectRadius | number): this; @@ -19997,10 +20034,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -20181,7 +20218,7 @@ declare namespace Phaser { /** * The class to create new group members from. */ - classType: Phaser.Types.GameObjects.Group.GroupClassTypeConstructor; + classType: Function; /** * The name of this group. @@ -21112,16 +21149,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -21705,10 +21744,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -22637,16 +22676,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -22841,10 +22882,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -24152,10 +24193,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -24303,7 +24344,7 @@ declare namespace Phaser { * parameters to this class. * * This is extremely useful for UI and button like elements, where you need - * them to expand to accomodate the content without distorting the texture. + * them to expand to accommodate the content without distorting the texture. * * The texture you provide for this Game Object should be based on the * following layout structure: @@ -25297,10 +25338,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -25384,19 +25425,95 @@ declare namespace Phaser { namespace Particles { /** - * A Particle Emitter property. + * This class is responsible for taking control over the color property + * in the Particle class and managing its emission and updating functions. * - * Facilitates changing Particle properties as they are emitted and throughout their lifetime. + * See the `ParticleEmitter` class for more details on emitter op configuration. + */ + class EmitterColorOp { + /** + * + * @param key The name of the property. + */ + constructor(key: string); + + /** + * An array containing the red color values. + * + * Populated during the `setMethods` method. + */ + r: number[]; + + /** + * An array containing the green color values. + * + * Populated during the `setMethods` method. + */ + g: number[]; + + /** + * An array containing the blue color values. + * + * Populated during the `setMethods` method. + */ + b: number[]; + + /** + * Checks the type of `EmitterOp.propertyValue` to determine which + * method is required in order to return values from this op function. + */ + getMethod(): number; + + /** + * Sets the EmitterColorOp method values, if in use. + */ + setMethods(): this; + + /** + * Sets the Ease function to use for Color interpolation. + * @param ease The string-based name of the Ease function to use. + */ + setEase(ease: string): void; + + /** + * An `onEmit` callback for an eased property. + * + * It prepares the particle for easing by {@link Phaser.GameObjects.Particles.EmitterColorOp#easeValueUpdate}. + * @param particle The particle. + * @param key The name of the property. + */ + easedValueEmit(particle: Phaser.GameObjects.Particles.Particle, key: string): number; + + /** + * An `onUpdate` callback that returns an eased value between the + * {@link Phaser.GameObjects.Particles.EmitterColorOp#start} and {@link Phaser.GameObjects.Particles.EmitterColorOp#end} + * range. + * @param particle The particle. + * @param key The name of the property. + * @param t The current normalized lifetime of the particle, between 0 (birth) and 1 (death). + */ + easeValueUpdate(particle: Phaser.GameObjects.Particles.Particle, key: string, t: number): number; + + } + + /** + * This class is responsible for taking control over a single property + * in the Particle class and managing its emission and updating functions. + * + * Particles properties such as `x`, `y`, `scaleX`, `lifespan` and others all use + * EmitterOp instances to manage them, as they can be given in a variety of + * formats: from simple values, to functions, to dynamic callbacks. + * + * See the `ParticleEmitter` class for more details on emitter op configuration. */ class EmitterOp { /** * - * @param config Settings for the Particle Emitter that owns this property. * @param key The name of the property. * @param defaultValue The default value of the property. * @param emitOnly Whether the property can only be modified when a Particle is emitted. Default false. */ - constructor(config: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig, key: string, defaultValue: number, emitOnly?: boolean); + constructor(key: string, defaultValue: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType, emitOnly?: boolean); /** * The name of this property. @@ -25404,14 +25521,20 @@ declare namespace Phaser { propertyKey: string; /** - * The value of this property. + * The current value of this property. + * + * This can be a simple value, an array, a function or an onEmit + * configuration object. */ - propertyValue: number; + propertyValue: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** * The default value of this property. + * + * This can be a simple value, an array, a function or an onEmit + * configuration object. */ - defaultValue: number; + defaultValue: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** * The number of steps for stepped easing between {@link Phaser.GameObjects.Particles.EmitterOp#start} and @@ -25424,10 +25547,29 @@ declare namespace Phaser { */ counter: number; + /** + * When the step counter reaches it's maximum, should it then + * yoyo back to the start again, or flip over to it? + */ + yoyo: boolean; + + /** + * The counter direction. 0 for up and 1 for down. + */ + direction: number; + /** * The start value for this property to ease between. + * + * If an interpolation this holds a reference to the number data array. + */ + start: number | number[]; + + /** + * The most recently calculated value. Updated every time an + * emission or update method is called. Treat as read-only. */ - start: number; + current: number; /** * The end value for this property to ease between. @@ -25435,10 +25577,15 @@ declare namespace Phaser { end: number; /** - * The easing function to use for updating this property. + * The easing function to use for updating this property, if any. */ ease: Function | null; + /** + * The interpolation function to use for updating this property, if any. + */ + interpolation: Function | null; + /** * Whether this property can only be modified when a Particle is emitted. * @@ -25460,6 +25607,19 @@ declare namespace Phaser { */ onUpdate: Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateCallback; + /** + * Set to `false` to disable this EmitterOp. + */ + active: boolean; + + /** + * The onEmit method type of this EmitterOp. + * + * Set as part of `setMethod` and cached here to avoid + * re-setting when only the value changes. + */ + method: number; + /** * Load the property from a Particle Emitter configuration object. * @@ -25476,14 +25636,21 @@ declare namespace Phaser { /** * Change the current value of the property and update its callback methods. - * @param value The value of the property. + * @param value The new numeric value of this property. */ onChange(value: number): this; + /** + * Checks the type of `EmitterOp.propertyValue` to determine which + * method is required in order to return values from this op function. + */ + getMethod(): number; + /** * Update the {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} and - * {@link Phaser.GameObjects.Particles.EmitterOp#onUpdate} callbacks based on the type of the current - * {@link Phaser.GameObjects.Particles.EmitterOp#propertyValue}. + * {@link Phaser.GameObjects.Particles.EmitterOp#onUpdate} callbacks based on the method returned + * from `getMethod`. The method is stored in the `EmitterOp.method` property + * and is a number between 0 and 9 inclusively. */ setMethods(): this; @@ -25522,11 +25689,32 @@ declare namespace Phaser { * The returned value updates the property for the duration of the particles life. * @param particle The particle. * @param key The name of the property. - * @param t The T value (between 0 and 1) + * @param t The current normalized lifetime of the particle, between 0 (birth) and 1 (death). * @param value The current value of the property. */ defaultUpdate(particle: Phaser.GameObjects.Particles.Particle, key: string, t: number, value: number): number; + /** + * The returned value sets what the property will be at the START of the particles life, on emit. + * + * This method is only used when you have provided a custom emit callback. + * @param particle The particle. + * @param key The name of the property. + * @param value The current value of the property. + */ + proxyEmit(particle: Phaser.GameObjects.Particles.Particle, key: string, value?: number): number; + + /** + * The returned value updates the property for the duration of the particles life. + * + * This method is only used when you have provided a custom update callback. + * @param particle The particle. + * @param key The name of the property. + * @param t The current normalized lifetime of the particle, between 0 (birth) and 1 (death). + * @param value The current value of the property. + */ + proxyUpdate(particle: Phaser.GameObjects.Particles.Particle, key: string, t: number, value: number): number; + /** * An `onEmit` callback that returns the current value of the property. */ @@ -25550,6 +25738,14 @@ declare namespace Phaser { */ randomRangedValueEmit(particle: Phaser.GameObjects.Particles.Particle, key: string): number; + /** + * An `onEmit` callback that returns a value between the {@link Phaser.GameObjects.Particles.EmitterOp#start} and + * {@link Phaser.GameObjects.Particles.EmitterOp#end} range. + * @param particle The particle. + * @param key The key of the property. + */ + randomRangedIntEmit(particle: Phaser.GameObjects.Particles.Particle, key: string): number; + /** * An `onEmit` callback that returns a stepped value between the * {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end} @@ -25572,20 +25768,90 @@ declare namespace Phaser { * range. * @param particle The particle. * @param key The name of the property. - * @param t The T value (between 0 and 1) + * @param t The current normalized lifetime of the particle, between 0 (birth) and 1 (death). */ easeValueUpdate(particle: Phaser.GameObjects.Particles.Particle, key: string, t: number): number; + /** + * Destroys this EmitterOp instance and all of its references. + * + * Called automatically when the ParticleEmitter that owns this + * EmitterOp is destroyed. + */ + destroy(): void; + + } + + namespace Events { + /** + * The Particle Emitter Complete Event. + * + * This event is dispatched when the final particle, emitted from a Particle Emitter that + * has been stopped, dies. Upon receipt of this event you know that no particles are + * still rendering at this point in time. + * + * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('complete', listener)`. + */ + const COMPLETE: string; + + /** + * The Particle Emitter Death Zone Event. + * + * This event is dispatched when a Death Zone kills a Particle instance. + * + * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('deathzone', listener)`. + * + * If you wish to know when the final particle is killed, see the `COMPLETE` event. + */ + const DEATH_ZONE: string; + + /** + * The Particle Emitter Explode Event. + * + * This event is dispatched when a Particle Emitter explodes a set of particles. + * + * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('explode', listener)`. + */ + const EXPLODE: string; + + /** + * The Particle Emitter Start Event. + * + * This event is dispatched when a Particle Emitter starts emission of particles. + * + * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('start', listener)`. + */ + const START: string; + + /** + * The Particle Emitter Stop Event. + * + * This event is dispatched when a Particle Emitter is stopped. This can happen either + * when you directly call the `ParticleEmitter.stop` method, or if the emitter has + * been configured to stop after a set time via the `duration` property, or after a + * set number of particles via the `stopAfter` property. + * + * Listen for it on a Particle Emitter instance using `ParticleEmitter.on('stop', listener)`. + * + * Note that just because the emitter has stopped, that doesn't mean there aren't still + * particles alive and rendering. It just means the emitter has stopped emitting particles. + * + * If you wish to know when the final particle is killed, see the `COMPLETE` event. + */ + const STOP: string; + } /** - * The GravityWell action applies a force on the particle to draw it towards, or repel it from, a single point. + * The Gravity Well Particle Processor applies a force on the particles to draw + * them towards, or repel them from, a single point. * - * The force applied is inversely proportional to the square of the distance from the particle to the point, in accordance with Newton's law of gravity. + * The force applied is inversely proportional to the square of the distance + * from the particle to the point, in accordance with Newton's law of gravity. * * This simulates the effect of gravity over large distances (as between planets, for example). */ - class GravityWell { + class GravityWell extends Phaser.GameObjects.Particles.ParticleProcessor { /** * * @param x The x coordinate of the Gravity Well, in world space. Default 0. @@ -25596,21 +25862,6 @@ declare namespace Phaser { */ constructor(x?: number | Phaser.Types.GameObjects.Particles.GravityWellConfig, y?: number, power?: number, epsilon?: number, gravity?: number); - /** - * The x coordinate of the Gravity Well, in world space. - */ - x: number; - - /** - * The y coordinate of the Gravity Well, in world space. - */ - y: number; - - /** - * The active state of the Gravity Well. An inactive Gravity Well will not influence any particles. - */ - active: boolean; - /** * The strength of the gravity force - larger numbers produce a stronger force. */ @@ -25632,8 +25883,10 @@ declare namespace Phaser { } /** - * A Particle is a simple Game Object controlled by a Particle Emitter and Manager, and rendered by the Manager. - * It uses its own lightweight physics system, and can interact only with its Emitter's bounds and zones. + * A Particle is a simple object owned and controlled by a Particle Emitter. + * + * It encapsulates all of the properties required to move and update according + * to the Emitters operations. */ class Particle { /** @@ -25645,12 +25898,17 @@ declare namespace Phaser { /** * The Emitter to which this Particle belongs. * - * A Particle can only belong to a single Emitter and is created, updated and destroyed via it. + * A Particle can only belong to a single Emitter and is created, updated and destroyed by it. */ emitter: Phaser.GameObjects.Particles.ParticleEmitter; /** - * The texture frame used to render this Particle. + * The texture used by this Particle when it renders. + */ + texture: Phaser.Textures.Texture; + + /** + * The texture frame used by this Particle when it renders. */ frame: Phaser.Textures.Frame; @@ -25754,31 +26012,80 @@ declare namespace Phaser { */ data: object; + /** + * A reference to the Scene to which this Game Object belongs. + * + * Game Objects can only belong to one Scene. + * + * You should consider this property as being read-only. You cannot move a + * Game Object to another Scene by simply changing it. + */ + scene: Phaser.Scene; + + /** + * The Animation State component of this Particle. + * + * This component provides features to apply animations to this Particle. + * It is responsible for playing, loading, queuing animations for later playback, + * mixing between animations and setting the current animation frame to this Particle. + */ + anims: Phaser.Animations.AnimationState; + + /** + * A rectangle that holds the bounds of this Particle after a call to + * the `Particle.getBounds` method has been made. + */ + bounds: Phaser.Geom.Rectangle; + + /** + * The Event Emitter proxy. + * + * Passes on all parameters to the `ParticleEmitter` to emit directly. + * @param event The event name. + * @param a1 Optional argument 1. + * @param a2 Optional argument 2. + * @param a3 Optional argument 3. + * @param a4 Optional argument 4. + * @param a5 Optional argument 5. + */ + emit(event: string | Symbol, a1?: any, a2?: any, a3?: any, a4?: any, a5?: any): boolean; + /** * Checks to see if this Particle is alive and updating. */ isAlive(): boolean; /** - * Resets the position of this particle back to zero. + * Kills this particle. This sets the `lifeCurrent` value to 0, which forces + * the Particle to be removed the next time its parent Emitter runs an update. */ - resetPosition(): void; + kill(): void; + + /** + * Sets the position of this particle to the given x/y coordinates. + * + * If the parameters are left undefined, it resets the particle back to 0x0. + * @param x The x coordinate to set this Particle to. Default 0. + * @param y The y coordinate to set this Particle to. Default 0. + */ + setPosition(x?: number, y?: number): void; /** * Starts this Particle from the given coordinates. * @param x The x coordinate to launch this Particle from. * @param y The y coordinate to launch this Particle from. */ - fire(x: number, y: number): void; + fire(x?: number, y?: number): boolean; /** * An internal method that calculates the velocity of the Particle. * @param emitter The Emitter that is updating this Particle. * @param delta The delta time in ms. * @param step The delta value divided by 1000. - * @param processors Particle processors (gravity wells). + * @param processors An array of all active Particle Processors. + * @param t The current normalized lifetime of the particle, between 0 (birth) and 1 (death). */ - computeVelocity(emitter: Phaser.GameObjects.Particles.ParticleEmitter, delta: number, step: number, processors: any[]): void; + computeVelocity(emitter: Phaser.GameObjects.Particles.ParticleEmitter, delta: number, step: number, processors: Phaser.GameObjects.Particles.ParticleProcessor[], t: number): void; /** * Checks if this Particle is still within the bounds defined by the given Emitter. @@ -25794,75 +26101,232 @@ declare namespace Phaser { * Updates its life values, computes the velocity and repositions the Particle. * @param delta The delta time in ms. * @param step The delta value divided by 1000. - * @param processors An optional array of update processors. + * @param processors An array of all active Particle Processors. */ - update(delta: number, step: number, processors: any[]): boolean; - - } + update(delta: number, step: number, processors: Phaser.GameObjects.Particles.ParticleProcessor[]): boolean; - /** - * A particle emitter represents a single particle stream. - * It controls a pool of {@link Phaser.GameObjects.Particles.Particle Particles} and is controlled by a {@link Phaser.GameObjects.Particles.ParticleEmitterManager Particle Emitter Manager}. - */ - class ParticleEmitter implements Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Visible { /** - * - * @param manager The Emitter Manager this Emitter belongs to. - * @param config Settings for this emitter. - */ - constructor(manager: Phaser.GameObjects.Particles.ParticleEmitterManager, config: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig); - - /** - * The Emitter Manager this Emitter belongs to. + * This is a NOOP method and does nothing when called. */ - manager: Phaser.GameObjects.Particles.ParticleEmitterManager; + setSizeToFrame(): void; /** - * The texture assigned to particles. - */ - texture: Phaser.Textures.Texture; - - /** - * The texture frames assigned to particles. - */ - frames: Phaser.Textures.Frame[]; - - /** - * The default texture frame assigned to particles. + * Gets the bounds of this particle as a Geometry Rectangle, factoring in any + * transforms of the parent emitter and anything else above it in the display list. + * + * Once calculated the bounds can be accessed via the `Particle.bounds` property. + * @param matrix Optional transform matrix to apply to this particle. */ - defaultFrame: Phaser.Textures.Frame; + getBounds(matrix?: Phaser.GameObjects.Components.TransformMatrix): Phaser.Geom.Rectangle; /** - * Names of simple configuration properties. + * Destroys this Particle. */ - configFastMap: object; + destroy(): void; - /** - * Names of complex configuration properties. - */ - configOpMap: object; + } + /** + * A Particle Emitter is a special kind of Game Object that controls a pool of {@link Phaser.GameObjects.Particles.Particle Particles}. + * + * Particle Emitters are created via a configuration object. The properties of this object + * can be specified in a variety of formats, given you plenty of scope over the values they + * return, leading to complex visual effects. Here are the different forms of configuration + * value you can give: + * + * ## An explicit static value: + * + * ```js + * x: 400 + * ``` + * + * The x value will always be 400 when the particle is spawned. + * + * ## A random value: + * + * ```js + * x: [ 100, 200, 300, 400 ] + * ``` + * + * The x value will be one of the 4 elements in the given array, picked at random on emission. + * + * ## A custom callback: + * + * ```js + * x: (particle, key, t, value) => { + * return value + 50; + * } + * ``` + * + * The x value is the result of calling this function. This is only used when the + * particle is emitted, so it provides it's initial starting value. It is not used + * when the particle is updated (see the onUpdate callback for that) + * + * ## A start / end object: + * + * This allows you to control the change in value between the given start and + * end parameters over the course of the particles lifetime: + * + * ```js + * scale: { start: 0, end: 1 } + * ``` + * + * The particle scale will start at 0 when emitted and ease to a scale of 1 + * over the course of its lifetime. You can also specify the ease function + * used for this change (the default is Linear): + * + * ```js + * scale: { start: 0, end: 1, ease: 'bounce.out' } + * ``` + * + * ## A start / end random object: + * + * The start and end object can have an optional `random` parameter. + * This forces it to pick a random value between the two values and use + * this as the starting value, then easing to the 'end' parameter over + * its lifetime. + * + * ```js + * scale: { start: 4, end: 0.5, random: true } + * ``` + * + * The particle will start with a random scale between 0.5 and 4 and then + * scale to the end value over its lifetime. You can combine the above + * with the `ease` parameter as well to control the value easing. + * + * ## An interpolation object: + * + * You can provide an array of values which will be used for interpolation + * during the particles lifetime. You can also define the interpolation + * function to be used. There are three provided: `linear` (the default), + * `bezier` and `catmull`, or you can provide your own function. + * + * ```js + * x: { values: [ 50, 500, 200, 800 ], interpolation: 'catmull' } + * ``` + * + * The particle scale will interpolate from 50 when emitted to 800 via the other + * points over the course of its lifetime. You can also specify an ease function + * used to control the rate of change through the values (the default is Linear): + * + * ```js + * x: { values: [ 50, 500, 200, 800 ], interpolation: 'catmull', ease: 'bounce.out } + * ``` + * + * ## A stepped emitter object: + * + * The `steps` parameter allows you to control the placement of sequential + * particles across the start-end range: + * + * ```js + * x: { steps: 32, start: 0, end: 576 } + * ``` + * + * Here we have a range of 576 (start to end). This is divided into 32 steps. + * + * The first particle will emit at the x position of 0. The next will emit + * at the next 'step' along, which would be 18. The following particle will emit + * at the next step, which is 36, and so on. Because the range of 576 has been + * divided by 32, creating 18 pixels steps. When a particle reaches the 'end' + * value the next one will start from the beginning again. + * + * ## A stepped emitter object with yoyo: + * + * You can add the optional `yoyo` property to a stepped object: + * + * ```js + * x: { steps: 32, start: 0, end: 576, yoyo: true } + * ``` + * + * As with the stepped emitter, particles are emitted in sequence, from 'start' + * to 'end' in step sized jumps. Normally, when a stepped emitter reaches the + * end it snaps around to the start value again. However, if you provide the 'yoyo' + * parameter then when it reaches the end it will reverse direction and start + * emitting back down to 'start' again. Depending on the effect you require this + * can often look better. + * + * ## A min / max object: + * + * This allows you to pick a random float value between the min and max properties: + * + * ```js + * x: { min: 100, max: 700 } + * ``` + * + * The x value will be a random float between min and max. + * + * You can force it select an integer by setting the 'int' flag: + * + * ```js + * x: { min: 100, max: 700, int: true } + * ``` + * + * Or, you could use the 'random' array approach (see below) + * + * ## A random object: + * + * This allows you to pick a random integer value between the first and second array elements: + * + * ```js + * x: { random: [ 100, 700 ] } + * ``` + * + * The x value will be a random integer between 100 and 700 as it takes the first + * element in the 'random' array as the 'min' value and the 2nd element as the 'max' value. + * + * ## Custom onEmit and onUpdate callbacks: + * + * If the above won't give you the effect you're after, you can provide your own + * callbacks that will be used when the particle is both emitted and updated: + * + * ```js + * x: { + * onEmit: (particle, key, t, value) => { + * return value; + * }, + * onUpdate: (particle, key, t, value) => { + * return value; + * } + * } + * ``` + * + * You can provide either one or both functions. The `onEmit` is called at the + * start of the particles life and defines the value of the property on birth. + * + * The `onUpdate` function is called every time the Particle Emitter updates + * until the particle dies. Both must return a value. + * + * The properties are: + * + * particle - A reference to the Particle instance. + * key - The string based key of the property, i.e. 'x' or 'lifespan'. + * t - The current normalized lifetime of the particle, between 0 (birth) and 1 (death). + * value - The current property value. At a minimum you should return this. + * + * By using the above configuration options you have an unlimited about of + * control over how your particles behave. + */ + class ParticleEmitter extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.AlphaSingle, Phaser.GameObjects.Components.BlendMode, Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.FX, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.ScrollFactor, Phaser.GameObjects.Components.Texture, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { /** - * The name of this Particle Emitter. * - * Empty by default and never populated by Phaser, this is left for developers to use. + * @param config Settings for this emitter. */ - name: string; + constructor(config: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig); /** * The Particle Class which will be emitted by this Emitter. */ - particleClass: Phaser.Types.GameObjects.Particles.ParticleClassConstructor; + particleClass: Function; /** - * The x-coordinate of the particle origin (where particles will be emitted). - */ - x: Phaser.GameObjects.Particles.EmitterOp; - - /** - * The y-coordinate of the particle origin (where particles will be emitted). + * An internal object holding all of the EmitterOp instances. + * + * These are populated as part of the Emitter configuration parsing. + * + * You typically do not access them directly, but instead use the + * provided getters and setters on this class, such as `ParticleEmitter.speedX` etc. */ - y: Phaser.GameObjects.Particles.EmitterOp; + ops: Phaser.Types.GameObjects.Particles.ParticleEmitterOps; /** * A radial emitter will emit particles in all directions between angle min and max, @@ -25886,36 +26350,6 @@ declare namespace Phaser { */ acceleration: boolean; - /** - * Horizontal acceleration applied to emitted particles, in pixels per second squared. - */ - accelerationX: Phaser.GameObjects.Particles.EmitterOp; - - /** - * Vertical acceleration applied to emitted particles, in pixels per second squared. - */ - accelerationY: Phaser.GameObjects.Particles.EmitterOp; - - /** - * The maximum horizontal velocity of emitted particles, in pixels per second squared. - */ - maxVelocityX: Phaser.GameObjects.Particles.EmitterOp; - - /** - * The maximum vertical velocity of emitted particles, in pixels per second squared. - */ - maxVelocityY: Phaser.GameObjects.Particles.EmitterOp; - - /** - * The initial horizontal speed of emitted particles, in pixels per second. - */ - speedX: Phaser.GameObjects.Particles.EmitterOp; - - /** - * The initial vertical speed of emitted particles, in pixels per second. - */ - speedY: Phaser.GameObjects.Particles.EmitterOp; - /** * Whether moveToX and moveToY are set. Set automatically during configuration. * @@ -25924,56 +26358,6 @@ declare namespace Phaser { */ moveTo: boolean; - /** - * The x-coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true. - */ - moveToX: Phaser.GameObjects.Particles.EmitterOp; - - /** - * The y-coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true. - */ - moveToY: Phaser.GameObjects.Particles.EmitterOp; - - /** - * Whether particles will rebound when they meet the emitter bounds. - */ - bounce: Phaser.GameObjects.Particles.EmitterOp; - - /** - * The horizontal scale of emitted particles. - */ - scaleX: Phaser.GameObjects.Particles.EmitterOp; - - /** - * The vertical scale of emitted particles. - */ - scaleY: Phaser.GameObjects.Particles.EmitterOp; - - /** - * Color tint applied to emitted particles. Value must not include the alpha channel. - */ - tint: Phaser.GameObjects.Particles.EmitterOp; - - /** - * The alpha (transparency) of emitted particles. - */ - alpha: Phaser.GameObjects.Particles.EmitterOp; - - /** - * The lifespan of emitted particles, in ms. - */ - lifespan: Phaser.GameObjects.Particles.EmitterOp; - - /** - * The angle of the initial velocity of emitted particles, in degrees. - */ - angle: Phaser.GameObjects.Particles.EmitterOp; - - /** - * The rotation of emitted particles, in degrees. - */ - rotate: Phaser.GameObjects.Particles.EmitterOp; - /** * A function to call when a particle is emitted. */ @@ -25995,13 +26379,16 @@ declare namespace Phaser { deathCallbackScope: any | null; /** - * Set to hard limit the amount of particle objects this emitter is allowed to create. + * Set to hard limit the amount of particle objects this emitter is allowed to create + * in total. This is the number of `Particle` instances it can create, not the number + * of 'alive' particles. + * * 0 means unlimited. */ maxParticles: number; /** - * The maximum number of alive (and rendering) particles this emitter will update. + * The maximum number of alive and rendering particles this emitter will update. * When this limit is reached, a particle needs to die before another can be emitted. * * 0 means no limits. @@ -26009,14 +26396,38 @@ declare namespace Phaser { maxAliveParticles: number; /** - * How many particles are emitted each time particles are emitted (one explosion or one flow cycle). + * If set, either via the Emitter config, or by directly setting this property, + * the Particle Emitter will stop emitting particles once this total has been + * reached. It will then enter a 'stopped' state, firing the `STOP` + * event. Note that entering a stopped state doesn't mean all the particles + * have finished, just that it's not emitting any further ones. + * + * To know when the final particle expires, listen for the COMPLETE event. + * + * Use this if you wish to launch an exact number of particles and then stop + * your emitter afterwards. + * + * The counter is reset each time the `ParticleEmitter.start` method is called. + * + * 0 means the emitter will not stop based on total emitted particles. */ - quantity: Phaser.GameObjects.Particles.EmitterOp; + stopAfter: number; /** - * How many ms to wait after emission before the particles start updating. + * The number of milliseconds this emitter will emit particles for when in flow mode, + * before it stops emission. A value of 0 (the default) means there is no duration. + * + * When the duration expires the `STOP` event is emitted. Note that entering a + * stopped state doesn't mean all the particles have finished, just that it's + * not emitting any further ones. + * + * To know when the final particle expires, listen for the COMPLETE event. + * + * The counter is reset each time the `ParticleEmitter.start` method is called. + * + * 0 means the emitter will not stop based on duration. */ - delay: Phaser.GameObjects.Particles.EmitterOp; + duration: number; /** * For a flow emitter, the time interval (>= 0) between particle flow cycles in ms. @@ -26029,14 +26440,19 @@ declare namespace Phaser { /** * Controls if the emitter is currently emitting a particle flow (when frequency >= 0). + * * Already alive particles will continue to update until they expire. + * * Controlled by {@link Phaser.GameObjects.Particles.ParticleEmitter#start} and {@link Phaser.GameObjects.Particles.ParticleEmitter#stop}. */ - on: boolean; + emitting: boolean; /** * Newly emitted particles are added to the top of the particle list, i.e. rendered above those already alive. + * * Set to false to send them to the back. + * + * Also see the `sortOrder` property for more complex particle sorting. */ particleBringToTop: boolean; @@ -26046,17 +26462,48 @@ declare namespace Phaser { timeScale: number; /** - * An object describing a shape to emit particles from. + * An array containing Particle Emission Zones. These can be either EdgeZones or RandomZones. + * + * Particles are emitted from a randomly selected zone from this array. + * + * Prior to Phaser v3.60 an Emitter could only have one single Emission Zone. + * In 3.60 they can now have an array of Emission Zones. + */ + emitZones: Phaser.GameObjects.Particles.Zones.EdgeZone[] | Phaser.GameObjects.Particles.Zones.RandomZone[]; + + /** + * An array containing Particle Death Zone objects. A particle is immediately killed as soon as its x/y coordinates + * intersect with any of the configured Death Zones. + * + * Prior to Phaser v3.60 an Emitter could only have one single Death Zone. + * In 3.60 they can now have an array of Death Zones. */ - emitZone: Phaser.GameObjects.Particles.Zones.EdgeZone | Phaser.GameObjects.Particles.Zones.RandomZone; + deathZones: Phaser.GameObjects.Particles.Zones.DeathZone[]; /** - * An object describing a shape that deactivates particles when they interact with it. + * An optional Rectangle object that is used during rendering to cull Particles from + * display. For example, if your particles are limited to only move within a 300x300 + * sized area from their origin, then you can set this Rectangle to those dimensions. + * + * The renderer will check to see if the `viewBounds` Rectangle intersects with the + * Camera bounds during the render step and if not it will skip rendering the Emitter + * entirely. + * + * This allows you to create many emitters in a Scene without the cost of + * rendering if the contents aren't visible. + * + * Note that the Emitter will not perform any checks to see if the Particles themselves + * are outside of these bounds, or not. It will simply check the bounds against the + * camera. Use the `getBounds` method with the `advance` parameter to help define + * the location and placement of the view bounds. */ - deathZone: Phaser.GameObjects.Particles.Zones.DeathZone | null; + viewBounds: Phaser.Geom.Rectangle | null; /** - * A rectangular boundary constraining particle movement. + * A rectangular boundary constraining particle movement. Use the Emitter properties `collideLeft`, + * `collideRight`, `collideTop` and `collideBottom` to control if a particle will rebound off + * the sides of this boundary, or not. This happens when the particles x/y coordinate hits + * the boundary. */ bounds: Phaser.Geom.Rectangle | null; @@ -26080,24 +26527,6 @@ declare namespace Phaser { */ collideBottom: boolean; - /** - * Whether this emitter updates itself and its particles. - * - * Controlled by {@link Phaser.GameObjects.Particles.ParticleEmitter#pause} - * and {@link Phaser.GameObjects.Particles.ParticleEmitter#resume}. - */ - active: boolean; - - /** - * Set this to false to hide any active particles. - */ - visible: boolean; - - /** - * The blend mode of this emitter's particles. - */ - blendMode: number; - /** * A Game Object whose position is used as the particle origin. */ @@ -26115,9 +26544,9 @@ declare namespace Phaser { trackVisible: boolean; /** - * The current texture frame, as an index of {@link Phaser.GameObjects.Particles.ParticleEmitter#frames}. + * The texture frames assigned to particles. */ - currentFrame: number; + frames: Phaser.Textures.Frame[]; /** * Whether texture {@link Phaser.GameObjects.Particles.ParticleEmitter#frames} are selected at random. @@ -26129,17 +26558,91 @@ declare namespace Phaser { */ frameQuantity: number; + /** + * The animations assigned to particles. + */ + anims: string[]; + + /** + * Whether animations {@link Phaser.GameObjects.Particles.ParticleEmitter#anims} are selected at random. + */ + randomAnim: boolean; + + /** + * The number of consecutive particles that receive a single animation (per frame cycle). + */ + animQuantity: number; + + /** + * An internal property used to tell when the emitter is in fast-forwarc mode. + */ + skipping: boolean; + + /** + * An internal Transform Matrix used to cache this emitters world matrix. + */ + worldMatrix: Phaser.GameObjects.Components.TransformMatrix; + + /** + * Optionally sort the particles before they render based on this + * property. The property must exist on the `Particle` class, such + * as `y`, `lifeT`, `scaleX`, etc. + * + * When set this overrides the `particleBringToTop` setting. + * + * To reset this and disable sorting, so this property to an empty string. + */ + sortProperty: string; + + /** + * When `sortProperty` is defined this controls the sorting order, + * either ascending or descending. Toggle to control the visual effect. + */ + sortOrderAsc: boolean; + + /** + * The callback used to sort the particles. Only used if `sortProperty` + * has been set. Set this via the `setSortCallback` method. + */ + sortCallback: Phaser.Types.GameObjects.Particles.ParticleSortCallback | null; + + /** + * A list of Particle Processors being managed by this Emitter. + */ + processors: Phaser.Structs.List; + + /** + * The tint fill mode used by the Particles in this Emitter. + * + * `false` = An additive tint (the default), where vertices colors are blended with the texture. + * `true` = A fill tint, where the vertices colors replace the texture, but respects texture alpha. + */ + tintFill: boolean; + + /** + * Gets all active Particle Processors. + */ + getProcessors(): Phaser.GameObjects.Particles.ParticleProcessor[]; + /** * Merges configuration settings into the emitter's current settings. * @param config Settings for this emitter. */ - fromJSON(config: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig): this; + setConfig(config: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig): this; /** * Creates a description of this emitter suitable for JSON serialization. - * @param output An object to copy output into. */ - toJSON(output?: object): object; + toJSON(): Phaser.Types.GameObjects.JSONGameObject; + + /** + * Resets the internal counter trackers. + * + * You shouldn't ever need to call this directly. + * @param frequency The frequency counter. + * @param on Set the complete flag. + */ + resetCounters(frequency: number, on: boolean): void; /** * Continuously moves the particle origin to follow a Game Object's position. @@ -26161,161 +26664,236 @@ declare namespace Phaser { getFrame(): Phaser.Textures.Frame; /** - * Sets a pattern for assigning texture frames to emitted particles. + * Sets a pattern for assigning texture frames to emitted particles. The `frames` configuration can be any of: + * + * frame: 0 + * frame: 'red' + * frame: [ 0, 1, 2, 3 ] + * frame: [ 'red', 'green', 'blue', 'pink', 'white' ] + * frame: { frames: [ 'red', 'green', 'blue', 'pink', 'white' ], [cycle: bool], [quantity: int] } * @param frames One or more texture frames, or a configuration object. * @param pickRandom Whether frames should be assigned at random from `frames`. Default true. * @param quantity The number of consecutive particles that will receive each frame. Default 1. */ - setFrame(frames: any[] | string | number | Phaser.Types.GameObjects.Particles.ParticleEmitterFrameConfig, pickRandom?: boolean, quantity?: number): this; + setEmitterFrame(frames: any[] | string | number | Phaser.Types.GameObjects.Particles.ParticleEmitterFrameConfig, pickRandom?: boolean, quantity?: number): this; /** - * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle movement on or off. - * @param value Radial mode (true) or point mode (true). Default true. + * Chooses an animation from {@link Phaser.GameObjects.Particles.ParticleEmitter#anims}, if populated. */ - setRadial(value?: boolean): this; + getAnim(): string; + + /** + * Sets a pattern for assigning animations to emitted particles. The `anims` configuration can be any of: + * + * anim: 'red' + * anim: [ 'red', 'green', 'blue', 'pink', 'white' ] + * anim: { anims: [ 'red', 'green', 'blue', 'pink', 'white' ], [cycle: bool], [quantity: int] } + * @param anims One or more animations, or a configuration object. + * @param pickRandom Whether animations should be assigned at random from `anims`. Default true. + * @param quantity The number of consecutive particles that will receive each animation. Default 1. + */ + setAnim(anims: any[] | string | Phaser.Types.GameObjects.Particles.ParticleEmitterFrameConfig, pickRandom?: boolean, quantity?: number): this; /** - * Sets the position of the emitter's particle origin. - * New particles will be emitted here. - * @param x The x-coordinate of the particle origin. - * @param y The y-coordinate of the particle origin. + * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle movement on or off. + * @param value Radial mode (true) or point mode (true). Default true. */ - setPosition(x: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType, y: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType): this; + setRadial(value?: boolean): this; /** * Sets or modifies a rectangular boundary constraining the particles. * * To remove the boundary, set {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds} to null. + * + * Particles will rebound off the edges of the boundary. * @param x The x-coordinate of the left edge of the boundary, or an object representing a rectangle. * @param y The y-coordinate of the top edge of the boundary. * @param width The width of the boundary. * @param height The height of the boundary. */ - setBounds(x: number | Phaser.Types.GameObjects.Particles.ParticleEmitterBounds | Phaser.Types.GameObjects.Particles.ParticleEmitterBoundsAlt, y: number, width: number, height: number): this; + setParticleBounds(x: number | Phaser.Types.GameObjects.Particles.ParticleEmitterBounds | Phaser.Types.GameObjects.Particles.ParticleEmitterBoundsAlt, y: number, width: number, height: number): this; /** - * Sets the initial horizontal speed of emitted particles. - * Changes the emitter to point mode. - * @param value The speed, in pixels per second. + * Sets the initial radial speed of emitted particles. + * + * Changes the emitter to radial mode. + * @param x The horizontal scale of the emitted Particles. + * @param y The vertical scale of emitted Particles. If not set it will use the `x` value. Default x. */ - setSpeedX(value: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType): this; + setParticleSpeed(x: number, y?: number): this; /** - * Sets the initial vertical speed of emitted particles. - * Changes the emitter to point mode. - * @param value The speed, in pixels per second. + * Sets the vertical and horizontal scale of the emitted particles. + * + * You can also set the scale of the entire emitter via `setScale`. + * @param x The horizontal scale of the emitted Particles. Default 1. + * @param y The vertical scale of emitted Particles. If not set it will use the `x` value. Default x. */ - setSpeedY(value: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType): this; + setParticleScale(x?: number, y?: number): this; /** - * Sets the initial radial speed of emitted particles. - * Changes the emitter to radial mode. - * @param value The speed, in pixels per second. + * Sets the gravity applied to emitted particles. + * @param x Horizontal acceleration due to gravity, in pixels per second squared. Set to zero for no gravity. + * @param y Vertical acceleration due to gravity, in pixels per second squared. Set to zero for no gravity. */ - setSpeed(value: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType): this; + setParticleGravity(x: number, y: number): this; /** - * Sets the horizontal scale of emitted particles. - * @param value The scale, relative to 1. + * Sets the opacity (alpha) of emitted particles. + * + * You can also set the alpha of the entire emitter via `setAlpha`. + * @param value A value between 0 (transparent) and 1 (opaque). */ - setScaleX(value: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType): this; + setParticleAlpha(value: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType): this; /** - * Sets the vertical scale of emitted particles. - * @param value The scale, relative to 1. + * Sets the color tint of emitted particles. + * + * This is a WebGL only feature. + * @param value A value between 0 and 0xffffff. */ - setScaleY(value: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType): this; + setParticleTint(value: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType): this; /** - * Sets the scale of emitted particles. This updates both the scaleX and scaleY values. - * @param value The scale, relative to 1. + * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream. + * + * The value is given in degrees using Phaser's right-handed coordinate system. + * @param value The angle of the initial velocity of emitted particles, in degrees. */ - setScale(value: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType): this; + setEmitterAngle(value: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType): this; /** - * Sets the horizontal gravity applied to emitted particles. - * @param value Acceleration due to gravity, in pixels per second squared. + * Sets the lifespan of newly emitted particles in milliseconds. + * @param value The lifespan of a particle, in ms. */ - setGravityX(value: number): this; + setParticleLifespan(value: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType): this; /** - * Sets the vertical gravity applied to emitted particles. - * @param value Acceleration due to gravity, in pixels per second squared. + * Sets the number of particles released at each flow cycle or explosion. + * @param quantity The number of particles to release at each flow cycle or explosion. */ - setGravityY(value: number): this; + setQuantity(quantity: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType): this; /** - * Sets the gravity applied to emitted particles. - * @param x Horizontal acceleration due to gravity, in pixels per second squared. - * @param y Vertical acceleration due to gravity, in pixels per second squared. + * Sets the emitter's {@link Phaser.GameObjects.Particles.ParticleEmitter#frequency} + * and {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}. + * @param frequency The time interval (>= 0) of each flow cycle, in ms; or -1 to put the emitter in explosion mode. + * @param quantity The number of particles to release at each flow cycle or explosion. */ - setGravity(x: number, y: number): this; + setFrequency(frequency: number, quantity?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType): this; /** - * Sets the opacity of emitted particles. - * @param value A value between 0 (transparent) and 1 (opaque). + * Adds a new Particle Death Zone to this Emitter. + * + * A particle is immediately killed as soon as its x/y coordinates intersect + * with any of the configured Death Zones. + * + * The `source` can be a Geometry Shape, such as a Circle, Rectangle or Triangle. + * Any valid object from the `Phaser.Geometry` namespace is allowed, as long as + * it supports a `contains` function. You can set the `type` to be either `onEnter` + * or `onLeave`. + * + * A single Death Zone instance can only exist once within this Emitter, but can belong + * to multiple Emitters. + * @param config A Death Zone configuration object, a Death Zone instance, a valid Geometry object or an array of them. */ - setAlpha(value: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType): this; + addDeathZone(config: Phaser.Types.GameObjects.Particles.DeathZoneObject | Phaser.Types.GameObjects.Particles.DeathZoneObject[]): Phaser.GameObjects.Particles.Zones.DeathZone; /** - * Sets the color tint of emitted particles. - * @param value A value between 0 and 0xffffff. + * Removes the given Particle Death Zone from this Emitter. + * @param zone The Death Zone that should be removed from this Emitter. */ - setTint(value: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType): this; + removeDeathZone(zone: Phaser.GameObjects.Particles.Zones.DeathZone): this; /** - * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream. - * @param value The angle of the initial velocity of emitted particles. + * Adds a new Particle Emission Zone to this Emitter. + * + * An {@link Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig EdgeZone} places particles on its edges. + * Its {@link Phaser.Types.GameObjects.Particles.EdgeZoneSource source} can be a Curve, Path, Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; + * or any object with a suitable {@link Phaser.Types.GameObjects.Particles.EdgeZoneSourceCallback getPoints} method. + * + * A {@link Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig RandomZone} places the particles randomly within its interior. + * Its {@link RandomZoneSource source} can be a Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable {@link Phaser.Types.GameObjects.Particles.RandomZoneSourceCallback getRandomPoint} method. + * + * An Emission Zone can only exist once within this Emitter. + * @param zone An Emission Zone configuration object, a RandomZone or EdgeZone instance, or an array of them. */ - setEmitterAngle(value: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType): this; + addEmitZone(zone: Phaser.Types.GameObjects.Particles.EmitZoneObject | Phaser.Types.GameObjects.Particles.EmitZoneObject[]): Phaser.GameObjects.Particles.Zones.EdgeZone | Phaser.GameObjects.Particles.Zones.RandomZone; /** - * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream. - * @param value The angle of the initial velocity of emitted particles. + * Removes the given Particle Emission Zone from this Emitter. + * @param zone The Emission Zone that should be removed from this Emitter. */ - setAngle(value: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType): this; + removeEmitZone(zone: Phaser.GameObjects.Particles.Zones.EdgeZone | Phaser.GameObjects.Particles.Zones.RandomZone): this; /** - * Sets the lifespan of newly emitted particles. - * @param value The particle lifespan, in ms. + * Takes the given particle and sets its x/y coordinates to match the next available + * emission zone, if any have been configured. This method is called automatically + * as part of the `Particle.fire` process. + * + * The Emit Zones are iterated in sequence. Once a zone has had a particle emitted + * from it, then the next zone is used and so on, in a loop. + * @param particle The particle to set the emission zone for. */ - setLifespan(value: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType): this; + getEmitZone(particle: Phaser.GameObjects.Particles.Particle): void; /** - * Sets the number of particles released at each flow cycle or explosion. - * @param quantity The number of particles to release at each flow cycle or explosion. + * Takes the given particle and checks to see if any of the configured Death Zones + * will kill it and returns the result. This method is called automatically as part + * of the `Particle.update` process. + * @param particle The particle to test against the Death Zones. */ - setQuantity(quantity: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType): this; + getDeathZone(particle: Phaser.GameObjects.Particles.Particle): boolean; /** - * Sets the emitter's {@link Phaser.GameObjects.Particles.ParticleEmitter#frequency} - * and {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}. - * @param frequency The time interval (>= 0) of each flow cycle, in ms; or -1 to put the emitter in explosion mode. - * @param quantity The number of particles to release at each flow cycle or explosion. + * Changes the currently active Emission Zone. The zones should have already + * been added to this Emitter either via the emitter config, or the + * `addEmitZone` method. + * + * Call this method by passing either a numeric zone index value, or + * the zone instance itself. + * + * Prior to v3.60 an Emitter could only have a single Emit Zone and this + * method was how you set it. From 3.60 and up it now performs a different + * function and swaps between all available active zones. + * @param zone The Emit Zone to set as the active zone. */ - setFrequency(frequency: number, quantity?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType): this; + setEmitZone(zone: number | Phaser.GameObjects.Particles.Zones.EdgeZone | Phaser.GameObjects.Particles.Zones.RandomZone): this; + + /** + * Adds a Particle Processor, such as a Gravity Well, to this Emitter. + * + * It will start processing particles from the next update as long as its `active` + * property is set. + * @param processor The Particle Processor to add to this Emitter Manager. + */ + addParticleProcessor(processor: Phaser.GameObjects.Particles.ParticleProcessor): Phaser.GameObjects.Particles.ParticleProcessor; /** - * Sets or removes the {@link Phaser.GameObjects.Particles.ParticleEmitter#emitZone}. + * Removes a Particle Processor from this Emitter. * - * An {@link Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig EdgeZone} places particles on its edges. Its {@link Phaser.Types.GameObjects.Particles.EdgeZoneSource source} can be a Curve, Path, Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable {@link Phaser.Types.GameObjects.Particles.EdgeZoneSourceCallback getPoints} method. + * The Processor must belong to this Emitter to be removed. * - * A {@link Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig RandomZone} places randomly within its interior. Its {@link RandomZoneSource source} can be a Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable {@link Phaser.Types.GameObjects.Particles.RandomZoneSourceCallback getRandomPoint} method. - * @param zoneConfig An object describing the zone, or `undefined` to remove any current emit zone. + * It is not destroyed when removed, allowing you to move it to another Emitter Manager, + * so if you no longer require it you should call its `destroy` method directly. + * @param processor The Particle Processor to remove from this Emitter Manager. */ - setEmitZone(zoneConfig?: Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig | Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig): this; + removeParticleProcessor(processor: Phaser.GameObjects.Particles.ParticleProcessor): Phaser.GameObjects.Particles.ParticleProcessor | null; /** - * Sets or removes the {@link Phaser.GameObjects.Particles.ParticleEmitter#deathZone}. - * @param zoneConfig An object describing the zone, or `undefined` to remove any current death zone. + * Creates a new Gravity Well, adds it to this Emitter and returns a reference to it. + * @param config Configuration settings for the Gravity Well to create. */ - setDeathZone(zoneConfig?: Phaser.Types.GameObjects.Particles.ParticleEmitterDeathZoneConfig): this; + createGravityWell(config: Phaser.Types.GameObjects.Particles.GravityWellConfig): Phaser.GameObjects.Particles.GravityWell; /** * Creates inactive particles and adds them to this emitter's pool. - * @param particleCount The number of particles to create. + * + * If `ParticleEmitter.maxParticles` is set it will limit the + * value passed to this method to make sure it's not exceeded. + * @param count The number of particles to create. */ - reserve(particleCount: number): this; + reserve(count: number): this; /** * Gets the number of active (in-use) particles in this emitter. @@ -26353,21 +26931,24 @@ declare namespace Phaser { onParticleDeath(callback: Phaser.Types.GameObjects.Particles.ParticleDeathCallback, context?: any): this; /** - * Deactivates every particle in this emitter. + * Deactivates every particle in this emitter immediately. + * + * This particles are killed but do not emit an event or callback. */ killAll(): this; /** - * Calls a function for each active particle in this emitter. + * Calls a function for each active particle in this emitter. The function is + * sent two parameters: a reference to the Particle instance and to this Emitter. * @param callback The function. - * @param context The function's calling context. + * @param context The functions calling context. */ forEachAlive(callback: Phaser.Types.GameObjects.Particles.ParticleEmitterCallback, context: any): this; /** * Calls a function for each inactive particle in this emitter. * @param callback The function. - * @param context The function's calling context. + * @param context The functions calling context. */ forEachDead(callback: Phaser.Types.GameObjects.Particles.ParticleEmitterCallback, context: any): this; @@ -26378,13 +26959,23 @@ declare namespace Phaser { * * If this emitter is in explode mode (frequency = -1), nothing will happen. * Use {@link Phaser.GameObjects.Particles.ParticleEmitter#explode} or {@link Phaser.GameObjects.Particles.ParticleEmitter#flow} instead. + * + * Calling this method will emit the `START` event. + * @param advance Advance this number of ms in time through the emitter. Default 0. + * @param duration Limit this emitter to only emit particles for the given number of ms. Setting this parameter will override any duration already set in the Emitter configuration object. Default 0. */ - start(): this; + start(advance?: number, duration?: number): this; /** - * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#on off} the emitter. + * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#emitting off} the emitter and + * stops it from emitting further particles. Currently alive particles will remain + * active until they naturally expire unless you set the `kill` parameter to `true`. + * + * Calling this method will emit the `STOP` event. When the final particle has + * expired the `COMPLETE` event will be emitted. + * @param kill Kill all particles immediately (true), or leave them to die after their lifespan expires? (false, the default) Default false. */ - stop(): this; + stop(kill?: boolean): this; /** * {@link Phaser.GameObjects.Particles.ParticleEmitter#active Deactivates} the emitter. @@ -26397,23 +26988,61 @@ declare namespace Phaser { resume(): this; /** - * Removes the emitter from its manager and the scene. + * Set the property by which active particles are sorted prior to be rendered. + * + * It allows you to control the rendering order of the particles. + * + * This can be any valid property of the `Particle` class, such as `y`, `alpha` + * or `lifeT`. + * + * The 'alive' particles array is sorted in place each game frame. Setting a + * sort property will override the `particleBringToTop` setting. + * + * If you wish to use your own sorting function, see `setSortCallback` instead. + * @param property The property on the `Particle` class to sort by. + * @param ascending Should the particles be sorted in ascending or descending order? Default true. + */ + setSortProperty(property?: string, ascending?: boolean): this; + + /** + * Sets a callback to be used to sort the particles before rendering each frame. + * + * This allows you to define your own logic and behavior in the callback. + * + * The callback will be sent two parameters: the two Particles being compared, + * and must adhere to the criteria of the `compareFn` in `Array.sort`: + * + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description + * + * Call this method with no parameters to reset the sort callback. + * + * Setting your own callback will override both the `particleBringToTop` and + * `sortProperty` settings of this Emitter. + * @param callback The callback to invoke when the particles are sorted. Leave undefined to reset to the default. */ - remove(): this; + setSortCallback(callback?: Phaser.Types.GameObjects.Particles.ParticleSortCallback): this; /** * Sorts active particles with {@link Phaser.GameObjects.Particles.ParticleEmitter#depthSortCallback}. */ depthSort(): this; + /** + * Calculates the difference of two particles, for sorting them by depth. + * @param a The first particle. + * @param b The second particle. + */ + depthSortCallback(a: object, b: object): number; + /** * Puts the emitter in flow mode (frequency >= 0) and starts (or restarts) a particle flow. * * To resume a flow at the current frequency and quantity, use {@link Phaser.GameObjects.Particles.ParticleEmitter#start} instead. * @param frequency The time interval (>= 0) of each flow cycle, in ms. * @param count The number of particles to emit at each flow cycle. Default 1. + * @param stopAfter Stop this emitter from firing any more particles once this value is reached. Set to zero for unlimited. Setting this parameter will override any `stopAfter` value already set in the Emitter configuration object. */ - flow(frequency: number, count?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType): this; + flow(frequency: number, count?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType, stopAfter?: number): this; /** * Puts the emitter in explode mode (frequency = -1), stopping any current particle flow, and emits several particles all at once. @@ -26424,7 +27053,8 @@ declare namespace Phaser { explode(count?: number, x?: number, y?: number): Phaser.GameObjects.Particles.Particle; /** - * Emits particles at a given position (or the emitter's current position). + * Emits particles at the given position. If no position is given, it will + * emit from this Emitters current location. * @param x The x coordinate to emit the Particles from. Default this.x. * @param y The y coordinate to emit the Particles from. Default this.x. * @param count The number of Particles to emit. Default this.quantity. @@ -26432,13 +27062,30 @@ declare namespace Phaser { emitParticleAt(x?: number, y?: number, count?: number): Phaser.GameObjects.Particles.Particle; /** - * Emits particles at a given position (or the emitter's current position). + * Emits particles at a given position (or the emitters current position). * @param count The number of Particles to emit. Default this.quantity. * @param x The x coordinate to emit the Particles from. Default this.x. * @param y The y coordinate to emit the Particles from. Default this.x. */ emitParticle(count?: number, x?: number, y?: number): Phaser.GameObjects.Particles.Particle; + /** + * Fast forwards this Particle Emitter and all of its particles. + * + * Works by running the Emitter `preUpdate` handler in a loop until the `time` + * has been reached at `delta` steps per loop. + * + * All callbacks and emitter related events that would normally be fired + * will still be invoked. + * + * You can make an emitter 'fast forward' via the emitter config using the + * `advance` property. Set this value to the number of ms you wish the + * emitter to be fast-forwarded by. Or, call this method post-creation. + * @param time The number of ms to advance the Particle Emitter by. + * @param delta The amount of delta to use for each step. Defaults to 1000 / 60. + */ + fastForward(time: number, delta?: number): this; + /** * Updates this emitter and its particles. * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout. @@ -26447,310 +27094,428 @@ declare namespace Phaser { preUpdate(time: number, delta: number): void; /** - * Calculates the difference of two particles, for sorting them by depth. - * @param a The first particle. - * @param b The second particle. + * Takes either a Rectangle Geometry object or an Arcade Physics Body and tests + * to see if it intersects with any currently alive Particle in this Emitter. + * + * Overlapping particles are returned in an array, where you can perform further + * processing on them. If nothing overlaps then the array will be empty. + * @param target A Rectangle or Arcade Physics Body to check for intersection against all alive particles. */ - depthSortCallback(a: object, b: object): number; + overlap(target: Phaser.Geom.Rectangle | Phaser.Physics.Arcade.Body): Phaser.GameObjects.Particles.Particle[]; /** - * Sets the Blend Mode being used by this Game Object. + * Returns a bounds Rectangle calculated from the bounds of all currently + * _active_ Particles in this Emitter. If this Emitter has only just been + * created and not yet rendered, then calling this method will return a Rectangle + * with a max safe integer for dimensions. Use the `advance` parameter to + * avoid this. * - * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * Typically it takes a few seconds for a flow Emitter to 'warm up'. You can + * use the `advance` and `delta` parameters to force the Emitter to + * 'fast forward' in time to try and allow the bounds to be more accurate, + * as it will calculate the bounds based on the particle bounds across all + * timesteps, giving a better result. * - * Under WebGL only the following Blend Modes are available: + * You can also use the `padding` parameter to increase the size of the + * bounds. Emitters with a lot of randomness in terms of direction or lifespan + * can often return a bounds smaller than their possible maximum. By using + * the `padding` (and `advance` if needed) you can help limit this. + * @param padding The amount of padding, in pixels, to add to the bounds Rectangle. + * @param advance The number of ms to advance the Particle Emitter by. Defaults to 0, i.e. not used. + * @param delta The amount of delta to use for each step. Defaults to 1000 / 60. + * @param output The Rectangle to store the results in. If not given a new one will be created. + */ + getBounds(padding?: number, advance?: number, delta?: number, output?: Phaser.Geom.Rectangle): Phaser.Geom.Rectangle; + + /** + * The x coordinate the particles are emitted from. * - * * NORMAL - * * ADD - * * MULTIPLY - * * SCREEN - * * ERASE (only works when rendering to a framebuffer, like a Render Texture) + * This is relative to the Emitters x coordinate and that of any parent. * - * Canvas has more available depending on browser support. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + */ + particleX: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; + + /** + * The y coordinate the particles are emitted from. * - * You can also create your own custom Blend Modes in WebGL. + * This is relative to the Emitters x coordinate and that of any parent. * - * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending - * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these - * reasons try to be careful about the construction of your Scene and the frequency in which blend modes - * are used. - * @param value The BlendMode value. Either a string, a CONST or a number. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. */ - setBlendMode(value: string | Phaser.BlendModes | number): this; + particleY: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** - * The Mask this Game Object is using during render. + * The horizontal acceleration applied to emitted particles, in pixels per second squared. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. */ - mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask; + accelerationX: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** - * Sets the mask that this Game Object will use to render with. - * - * The mask must have been previously created and can be either a GeometryMask or a BitmapMask. - * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * The vertical acceleration applied to emitted particles, in pixels per second squared. * - * If a mask is already set on this Game Object it will be immediately replaced. - * - * Masks are positioned in global space and are not relative to the Game Object to which they - * are applied. The reason for this is that multiple Game Objects can all share the same mask. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + */ + accelerationY: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; + + /** + * The maximum horizontal velocity emitted particles can reach, in pixels per second squared. * - * Masks have no impact on physics or input detection. They are purely a rendering component - * that allows you to limit what is visible during the render pass. - * @param mask The mask this Game Object will use when rendering. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. */ - setMask(mask: Phaser.Display.Masks.BitmapMask | Phaser.Display.Masks.GeometryMask): this; + maxVelocityX: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** - * Clears the mask that this Game Object was using. - * @param destroyMask Destroy the mask before clearing it? Default false. + * The maximum vertical velocity emitted particles can reach, in pixels per second squared. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. */ - clearMask(destroyMask?: boolean): this; + maxVelocityY: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** - * Creates and returns a Bitmap Mask. This mask can be used by any Game Object, - * including this one, or a Dynamic Texture. + * The initial speed of emitted particles, in pixels per second. * - * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas. + * If using this as a getter it will return the `speedX` value. * - * To create the mask you need to pass in a reference to a renderable Game Object. - * A renderable Game Object is one that uses a texture to render with, such as an - * Image, Sprite, Render Texture or BitmapText. + * If using it as a setter it will update both `speedX` and `speedY` to the + * given value. * - * If you do not provide a renderable object, and this Game Object has a texture, - * it will use itself as the object. This means you can call this method to create - * a Bitmap Mask from any renderable texture-based Game Object. - * @param maskObject The Game Object or Dynamic Texture that will be used as the mask. If `null` it will generate an Image Game Object using the rest of the arguments. - * @param x If creating a Game Object, the horizontal position in the world. - * @param y If creating a Game Object, the vertical position in the world. - * @param texture If creating a Game Object, the key, or instance of the Texture it will use to render with, as stored in the Texture Manager. - * @param frame If creating a Game Object, an optional frame from the Texture this Game Object is rendering with. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. */ - createBitmapMask(maskObject?: Phaser.GameObjects.GameObject | Phaser.Textures.DynamicTexture, x?: number, y?: number, texture?: string | Phaser.Textures.Texture, frame?: string | number | Phaser.Textures.Frame): Phaser.Display.Masks.BitmapMask; + speed: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** - * Creates and returns a Geometry Mask. This mask can be used by any Game Object, - * including this one. - * - * To create the mask you need to pass in a reference to a Graphics Game Object. - * - * If you do not provide a graphics object, and this Game Object is an instance - * of a Graphics object, then it will use itself to create the mask. + * The initial horizontal speed of emitted particles, in pixels per second. * - * This means you can call this method to create a Geometry Mask from any Graphics Game Object. - * @param graphics A Graphics Game Object, or any kind of Shape Game Object. The geometry within it will be used as the mask. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. */ - createGeometryMask(graphics?: Phaser.GameObjects.Graphics | Phaser.GameObjects.Shape): Phaser.Display.Masks.GeometryMask; + speedX: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** - * The horizontal scroll factor of this Game Object. + * The initial vertical speed of emitted particles, in pixels per second. * - * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + */ + speedY: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; + + /** + * The x coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true. * - * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. - * It does not change the Game Objects actual position values. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + */ + moveToX: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; + + /** + * The y coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true. * - * A value of 1 means it will move exactly in sync with a camera. - * A value of 0 means it will not move at all, even if the camera moves. - * Other values control the degree to which the camera movement is mapped to this Game Object. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + */ + moveToY: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; + + /** + * The amount of velocity particles will use when rebounding off the + * emitter bounds, if set. A value of 0 means no bounce. A value of 1 + * means a full rebound. * - * Please be aware that scroll factor values other than 1 are not taken in to consideration when - * calculating physics collisions. Bodies always collide based on their world position, but changing - * the scroll factor is a visual adjustment to where the textures are rendered, which can offset - * them from physics bodies if not accounted for in your code. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. */ - scrollFactorX: number; + bounce: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** - * The vertical scroll factor of this Game Object. + * The horizontal scale of emitted particles. * - * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * This is relative to the Emitters scale and that of any parent. * - * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. - * It does not change the Game Objects actual position values. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. + */ + particleScaleX: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; + + /** + * The vertical scale of emitted particles. * - * A value of 1 means it will move exactly in sync with a camera. - * A value of 0 means it will not move at all, even if the camera moves. - * Other values control the degree to which the camera movement is mapped to this Game Object. + * This is relative to the Emitters scale and that of any parent. * - * Please be aware that scroll factor values other than 1 are not taken in to consideration when - * calculating physics collisions. Bodies always collide based on their world position, but changing - * the scroll factor is a visual adjustment to where the textures are rendered, which can offset - * them from physics bodies if not accounted for in your code. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. */ - scrollFactorY: number; + particleScaleY: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** - * Sets the scroll factor of this Game Object. + * A color tint value that is applied to the texture of the emitted + * particle. The value should be given in hex format, i.e. 0xff0000 + * for a red tint, and should not include the alpha channel. * - * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * Tints are additive, meaning a tint value of white (0xffffff) will + * effectively reset the tint to nothing. * - * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. - * It does not change the Game Objects actual position values. + * Modify the `ParticleEmitter.tintFill` property to change between + * an additive and replacement tint mode. * - * A value of 1 means it will move exactly in sync with a camera. - * A value of 0 means it will not move at all, even if the camera moves. - * Other values control the degree to which the camera movement is mapped to this Game Object. + * When you define the color via the Emitter config you should give + * it as an array of color values. The Particle will then interpolate + * through these colors over the course of its lifespan. Setting this + * will override any `tint` value that may also be given. * - * Please be aware that scroll factor values other than 1 are not taken in to consideration when - * calculating physics collisions. Bodies always collide based on their world position, but changing - * the scroll factor is a visual adjustment to where the textures are rendered, which can offset - * them from physics bodies if not accounted for in your code. - * @param x The horizontal scroll factor of this Game Object. - * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + * This is a WebGL only feature. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. */ - setScrollFactor(x: number, y?: number): this; + particleColor: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** - * Sets the visibility of this Game Object. + * Controls the easing function used when you have created an + * Emitter that uses the `color` property to interpolate the + * tint of Particles over their lifetime. * - * An invisible Game Object will skip rendering, but will still process update logic. - * @param value The visible state of the Game Object. + * Setting this has no effect if you haven't also applied a + * `particleColor` to this Emitter. */ - setVisible(value: boolean): this; + colorEase: string; - } - - /** - * A Particle Emitter Manager creates and controls {@link Phaser.GameObjects.Particles.ParticleEmitter Particle Emitters} and {@link Phaser.GameObjects.Particles.GravityWell Gravity Wells}. - */ - class ParticleEmitterManager extends Phaser.GameObjects.GameObject implements Phaser.GameObjects.Components.Depth, Phaser.GameObjects.Components.Mask, Phaser.GameObjects.Components.Pipeline, Phaser.GameObjects.Components.Transform, Phaser.GameObjects.Components.Visible { /** + * A color tint value that is applied to the texture of the emitted + * particle. The value should be given in hex format, i.e. 0xff0000 + * for a red tint, and should not include the alpha channel. + * + * Tints are additive, meaning a tint value of white (0xffffff) will + * effectively reset the tint to nothing. + * + * Modify the `ParticleEmitter.tintFill` property to change between + * an additive and replacement tint mode. + * + * The `tint` value will be overriden if a `color` array is provided. + * + * This is a WebGL only feature. * - * @param scene The Scene to which this Emitter Manager belongs. - * @param texture The key of the Texture this Emitter Manager will use to render particles, as stored in the Texture Manager. - * @param frame An optional frame from the Texture this Emitter Manager will use to render particles. - * @param emitters Configuration settings for one or more emitters to create. + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. */ - constructor(scene: Phaser.Scene, texture: string, frame?: string | number, emitters?: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig | Phaser.Types.GameObjects.Particles.ParticleEmitterConfig[]); + particleTint: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** - * The time scale applied to all emitters and particles, affecting flow rate, lifespan, and movement. - * Values larger than 1 are faster than normal. - * This is multiplied with any timeScale set on each individual emitter. + * The alpha value of the emitted particles. This is a value + * between 0 and 1. Particles with alpha zero are invisible + * and are therefore not rendered, but are still processed + * by the Emitter. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. */ - timeScale: number; + particleAlpha: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** - * The texture used to render this Emitter Manager's particles. + * The lifespan of the emitted particles. This value is given + * in milliseconds and defaults to 1000ms (1 second). When a + * particle reaches this amount it is killed. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. */ - texture: Phaser.Textures.Texture; + lifespan: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** - * The texture frame used to render this Emitter Manager's particles. + * The angle at which the particles are emitted. The values are + * given in degrees. This allows you to control the direction + * of the emitter. If you wish instead to change the rotation + * of the particles themselves, see the `particleRotate` property. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. */ - frame: Phaser.Textures.Frame; + particleAngle: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** - * Names of this Emitter Manager's texture frames. + * The rotation (or angle) of each particle when it is emitted. + * The value is given in degrees and uses a right-handed + * coordinate system, where 0 degrees points to the right, 90 degrees + * points down and -90 degrees points up. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. */ - frameNames: string[]; + particleRotate: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** - * A list of Emitters being managed by this Emitter Manager. + * The number of particles that are emitted each time an emission + * occurs, i.e. from one 'explosion' or each frame in a 'flow' cycle. + * + * The default is 1. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. */ - emitters: Phaser.Structs.List; + quantity: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** - * A list of Gravity Wells being managed by this Emitter Manager. + * The number of milliseconds to wait after emission before + * the particles start updating. This allows you to emit particles + * that appear 'static' or still on-screen and then, after this value, + * begin to move. + * + * Accessing this property should typically return a number. + * However, it can be set to any valid EmitterOp onEmit type. */ - wells: Phaser.Structs.List; + delay: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** - * Sets the texture and frame this Emitter Manager will use to render with. + * The internal flow counter. * - * Textures are referenced by their string-based keys, as stored in the Texture Manager. - * @param key The key of the texture to be used, as stored in the Texture Manager. - * @param frame The name or index of the frame within the Texture. + * Treat this property as read-only. */ - setTexture(key: string, frame?: string | number): this; + flowCounter: number; /** - * Sets the frame this Emitter Manager will use to render with. + * The internal frame counter. * - * The Frame has to belong to the current Texture being used. + * Treat this property as read-only. + */ + frameCounter: number; + + /** + * The internal animation counter. * - * It can be either a string or an index. - * @param frame The name or index of the frame within the Texture. + * Treat this property as read-only. */ - setFrame(frame?: string | number): this; + animCounter: number; /** - * Assigns texture frames to an emitter. - * @param frames The texture frames. - * @param emitter The particle emitter to modify. + * The internal elasped counter. + * + * Treat this property as read-only. */ - setEmitterFrames(frames: Phaser.Textures.Frame | Phaser.Textures.Frame[], emitter: Phaser.GameObjects.Particles.ParticleEmitter): this; + elapsed: number; /** - * Adds an existing Particle Emitter to this Emitter Manager. - * @param emitter The Particle Emitter to add to this Emitter Manager. + * The internal stop counter. + * + * Treat this property as read-only. */ - addEmitter(emitter: Phaser.GameObjects.Particles.ParticleEmitter): Phaser.GameObjects.Particles.ParticleEmitter; + stopCounter: number; /** - * Creates a new Particle Emitter object, adds it to this Emitter Manager and returns a reference to it. - * @param config Configuration settings for the Particle Emitter to create. + * The internal complete flag. + * + * Treat this property as read-only. */ - createEmitter(config: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig): Phaser.GameObjects.Particles.ParticleEmitter; + completeFlag: boolean; /** - * Removes a Particle Emitter from this Emitter Manager, if the Emitter belongs to this Manager. + * The internal zone index. + * + * Treat this property as read-only. */ - removeEmitter(emitter: Phaser.GameObjects.Particles.ParticleEmitter): Phaser.GameObjects.Particles.ParticleEmitter | null; + zoneIndex: number; /** - * Adds an existing Gravity Well object to this Emitter Manager. - * @param well The Gravity Well to add to this Emitter Manager. + * The internal zone total. + * + * Treat this property as read-only. */ - addGravityWell(well: Phaser.GameObjects.Particles.GravityWell): Phaser.GameObjects.Particles.GravityWell; + zoneTotal: number; /** - * Creates a new Gravity Well, adds it to this Emitter Manager and returns a reference to it. - * @param config Configuration settings for the Gravity Well to create. + * The current frame index. + * + * Treat this property as read-only. */ - createGravityWell(config: Phaser.Types.GameObjects.Particles.GravityWellConfig): Phaser.GameObjects.Particles.GravityWell; + currentFrame: number; /** - * Emits particles from each active emitter. - * @param count The number of particles to release from each emitter. The default is the emitter's own {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}. - * @param x The x-coordinate to to emit particles from. The default is the x-coordinate of the emitter's current location. - * @param y The y-coordinate to to emit particles from. The default is the y-coordinate of the emitter's current location. + * The current animation index. + * + * Treat this property as read-only. */ - emitParticle(count?: number, x?: number, y?: number): this; + currentAnim: number; /** - * Emits particles from each active emitter. - * @param x The x-coordinate to to emit particles from. The default is the x-coordinate of the emitter's current location. - * @param y The y-coordinate to to emit particles from. The default is the y-coordinate of the emitter's current location. - * @param count The number of particles to release from each emitter. The default is the emitter's own {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}. + * Destroys this Particle Emitter and all Particles it owns. */ - emitParticleAt(x?: number, y?: number, count?: number): this; + preDestroy(): void; /** - * Pauses this Emitter Manager. - * - * This has the effect of pausing all emitters, and all particles of those emitters, currently under its control. + * Clears all alpha values associated with this Game Object. * - * The particles will still render, but they will not have any of their logic updated. + * Immediately sets the alpha levels back to 1 (fully opaque). */ - pause(): this; + clearAlpha(): this; /** - * Resumes this Emitter Manager, should it have been previously paused. + * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders. + * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque. + * @param value The alpha value applied across the whole Game Object. Default 1. */ - resume(): this; + setAlpha(value?: number): this; /** - * Gets all active particle processors (gravity wells). + * The alpha value of the Game Object. + * + * This is a global value, impacting the entire Game Object, not just a region of it. */ - getProcessors(): Phaser.GameObjects.Particles.GravityWell[]; + alpha: number; /** - * Updates all active emitters. - * @param time The current timestamp as generated by the Request Animation Frame or SetTimeout. - * @param delta The delta time, in ms, elapsed since the last frame. + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * NORMAL + * * ADD + * * MULTIPLY + * * SCREEN + * * ERASE + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency of which blend modes + * are used. */ - preUpdate(time: number, delta: number): void; + blendMode: Phaser.BlendModes | string | number; + + /** + * Sets the Blend Mode being used by this Game Object. + * + * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay) + * + * Under WebGL only the following Blend Modes are available: + * + * * NORMAL + * * ADD + * * MULTIPLY + * * SCREEN + * * ERASE (only works when rendering to a framebuffer, like a Render Texture) + * + * Canvas has more available depending on browser support. + * + * You can also create your own custom Blend Modes in WebGL. + * + * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending + * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these + * reasons try to be careful about the construction of your Scene and the frequency in which blend modes + * are used. + * @param value The BlendMode value. Either a string, a CONST or a number. + */ + setBlendMode(value: string | Phaser.BlendModes | number): this; /** * The depth of this Game Object within the Scene. Ensure this value is only ever set to a number data-type. @@ -26779,6 +27544,49 @@ declare namespace Phaser { */ setDepth(value: number): this; + /** + * The amount of extra padding to be applied to this Game Object + * when it is being rendered by a SpriteFX Pipeline. + * + * Lots of FX require additional spacing added to the texture the + * Game Object uses, for example a glow or shadow effect, and this + * method allows you to control how much extra padding is included + * in addition to the texture size. + */ + fxPadding: number; + + /** + * Sets the amount of extra padding to be applied to this Game Object + * when it is being rendered by a SpriteFX Pipeline. + * + * Lots of FX require additional spacing added to the texture the + * Game Object uses, for example a glow or shadow effect, and this + * method allows you to control how much extra padding is included + * in addition to the texture size. + * @param padding The amount of padding to add to the texture. Default 0. + */ + setFXPadding(padding?: number): this; + + /** + * This callback is invoked when this Game Object is copied by a SpriteFX Pipeline. + * + * This happens when the pipeline uses its `copySprite` method. + * + * It's invoked prior to the copy, allowing you to set shader uniforms, etc on the pipeline. + * @param pipeline The SpriteFX Pipeline that invoked this callback. + */ + onFXCopy(pipeline: Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline): void; + + /** + * This callback is invoked when this Game Object is rendered by a SpriteFX Pipeline. + * + * This happens when the pipeline uses its `drawSprite` method. + * + * It's invoked prior to the draw, allowing you to set shader uniforms, etc on the pipeline. + * @param pipeline The SpriteFX Pipeline that invoked this callback. + */ + onFX(pipeline: Phaser.Renderer.WebGL.Pipelines.SpriteFXPipeline): void; + /** * The Mask this Game Object is using during render. */ @@ -26963,6 +27771,101 @@ declare namespace Phaser { */ getPipelineName(): string; + /** + * The horizontal scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * + * Please be aware that scroll factor values other than 1 are not taken in to consideration when + * calculating physics collisions. Bodies always collide based on their world position, but changing + * the scroll factor is a visual adjustment to where the textures are rendered, which can offset + * them from physics bodies if not accounted for in your code. + */ + scrollFactorX: number; + + /** + * The vertical scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * + * Please be aware that scroll factor values other than 1 are not taken in to consideration when + * calculating physics collisions. Bodies always collide based on their world position, but changing + * the scroll factor is a visual adjustment to where the textures are rendered, which can offset + * them from physics bodies if not accounted for in your code. + */ + scrollFactorY: number; + + /** + * Sets the scroll factor of this Game Object. + * + * The scroll factor controls the influence of the movement of a Camera upon this Game Object. + * + * When a camera scrolls it will change the location at which this Game Object is rendered on-screen. + * It does not change the Game Objects actual position values. + * + * A value of 1 means it will move exactly in sync with a camera. + * A value of 0 means it will not move at all, even if the camera moves. + * Other values control the degree to which the camera movement is mapped to this Game Object. + * + * Please be aware that scroll factor values other than 1 are not taken in to consideration when + * calculating physics collisions. Bodies always collide based on their world position, but changing + * the scroll factor is a visual adjustment to where the textures are rendered, which can offset + * them from physics bodies if not accounted for in your code. + * @param x The horizontal scroll factor of this Game Object. + * @param y The vertical scroll factor of this Game Object. If not set it will use the `x` value. Default x. + */ + setScrollFactor(x: number, y?: number): this; + + /** + * The Texture this Game Object is using to render with. + */ + texture: Phaser.Textures.Texture | Phaser.Textures.CanvasTexture; + + /** + * The Texture Frame this Game Object is using to render with. + */ + frame: Phaser.Textures.Frame; + + /** + * Sets the texture and frame this Game Object will use to render with. + * + * Textures are referenced by their string-based keys, as stored in the Texture Manager. + * @param key The key of the texture to be used, as stored in the Texture Manager, or a Texture instance. + * @param frame The name or index of the frame within the Texture. + */ + setTexture(key: string | Phaser.Textures.Texture, frame?: string | number): this; + + /** + * Sets the frame this Game Object will use to render with. + * + * If you pass a string or index then the Frame has to belong to the current Texture being used + * by this Game Object. + * + * If you pass a Frame instance, then the Texture being used by this Game Object will also be updated. + * + * Calling `setFrame` will modify the `width` and `height` properties of your Game Object. + * + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * @param frame The name or index of the frame within the Texture, or a Frame instance. + * @param updateSize Should this call adjust the size of the Game Object? Default true. + * @param updateOrigin Should this call adjust the origin of the Game Object? Default true. + */ + setFrame(frame: string | number | Phaser.Textures.Frame, updateSize?: boolean, updateOrigin?: boolean): this; + /** * A property indicating that a Game Object has this component. */ @@ -27074,10 +27977,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -27159,6 +28062,68 @@ declare namespace Phaser { } + /** + * This class provides the structured required for all Particle Processors. + * + * You should extend it and add the functionality required for your processor, + * including tidying up any resources this may create in the `destroy` method. + * + * See the GravityWell for an example of a processor. + */ + class ParticleProcessor { + /** + * + * @param x The x coordinate of the Particle Processor, in world space. Default 0. + * @param y The y coordinate of the Particle Processor, in world space. Default 0. + * @param active The active state of this Particle Processor. Default true. + */ + constructor(x?: number, y?: number, active?: boolean); + + /** + * A reference to the Particle Emitter that owns this Processor. + * This is set automatically when the Processor is added to an Emitter + * and nulled when removed or destroyed. + */ + manager: Phaser.GameObjects.Particles.ParticleEmitter; + + /** + * The x coordinate of the Particle Processor, in world space. + */ + x: number; + + /** + * The y coordinate of the Particle Processor, in world space. + */ + y: number; + + /** + * The active state of the Particle Processor. + * + * An inactive Particle Processor will be skipped for processing by + * its parent Emitter. + */ + active: boolean; + + /** + * The Particle Processor update method should be overriden by your own + * method and handle the processing of the particles, typically modifying + * their velocityX/Y values based on the criteria of this processor. + * @param particle The Particle to update. + * @param delta The delta time in ms. + * @param step The delta value divided by 1000. + * @param t The current normalized lifetime of the particle, between 0 (birth) and 1 (death). + */ + update(particle: Phaser.GameObjects.Particles.Particle, delta: number, step: number, t: number): void; + + /** + * Destroys this Particle Processor by removing all external references. + * + * This is called automatically when the owning Particle Emitter is destroyed. + */ + destroy(): void; + + } + namespace Zones { /** * A Death Zone. @@ -27190,9 +28155,10 @@ declare namespace Phaser { /** * Checks if the given Particle will be killed or not by this zone. - * @param particle The Particle to be checked against this zone. + * @param x The x coordinate of the Particle to be checked against this zone. + * @param y The y coordinate of the Particle to be checked against this zone. */ - willKill(particle: Phaser.GameObjects.Particles.Particle): boolean; + willKill(x: number, y: number): boolean; } @@ -27207,8 +28173,9 @@ declare namespace Phaser { * @param stepRate The distance between each particle. When set, `quantity` is implied and should be set to 0. * @param yoyo Whether particles are placed from start to end and then end to start. Default false. * @param seamless Whether one endpoint will be removed if it's identical to the other. Default true. + * @param total The total number of particles this zone will emit before passing over to the next emission zone in the Emitter. -1 means it will never pass over and you must use `setEmitZone` to change it. Default -1. */ - constructor(source: Phaser.Types.GameObjects.Particles.EdgeZoneSource, quantity: number, stepRate: number, yoyo?: boolean, seamless?: boolean); + constructor(source: Phaser.Types.GameObjects.Particles.EdgeZoneSource, quantity: number, stepRate: number, yoyo?: boolean, seamless?: boolean, total?: number); /** * An object instance with a `getPoints(quantity, stepRate)` method returning an array of points. @@ -27245,6 +28212,20 @@ declare namespace Phaser { */ seamless: boolean; + /** + * The total number of particles this zone will emit before the Emitter + * transfers control over to the next zone in its emission zone list. + * + * By default this is -1, meaning it will never pass over from this + * zone to another one. You can call the `ParticleEmitter.setEmitZone` + * method to change it, or set this value to something else via the + * config, or directly at runtime. + * + * A value of 1 would mean the zones rotate in order, but it can + * be set to any integer value. + */ + total: number; + /** * Update the {@link Phaser.GameObjects.Particles.Zones.EdgeZone#points} from the EdgeZone's * {@link Phaser.GameObjects.Particles.Zones.EdgeZone#source}. @@ -27282,6 +28263,20 @@ declare namespace Phaser { */ source: Phaser.Types.GameObjects.Particles.RandomZoneSource; + /** + * The total number of particles this zone will emit before the Emitter + * transfers control over to the next zone in its emission zone list. + * + * By default this is -1, meaning it will never pass over from this + * zone to another one. You can call the `ParticleEmitter.setEmitZone` + * method to change it, or set this value to something else via the + * config, or directly at runtime. + * + * A value of 1 would mean the zones rotate in order, but it can + * be set to any integer value. + */ + total: number; + /** * Get the next point in the Zone and set its coordinates on the given Particle. * @param particle The Particle. @@ -27740,16 +28735,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -28333,10 +29330,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -29080,10 +30077,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -30111,16 +31108,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -30689,10 +31688,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -31667,10 +32666,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -32401,16 +33400,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -32624,10 +33625,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -33084,16 +34085,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -33428,10 +34431,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -33841,16 +34844,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -34185,10 +35190,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -34608,16 +35613,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -34952,10 +35959,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -35445,16 +36452,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -35789,10 +36798,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -36249,16 +37258,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -36593,10 +37604,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -37067,16 +38078,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -37411,10 +38424,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -37841,16 +38854,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -38185,10 +39200,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -38615,16 +39630,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -38959,10 +39976,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -39363,16 +40380,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -39707,10 +40726,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -40236,16 +41255,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -40580,10 +41601,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -41017,16 +42038,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -41361,10 +42384,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -41772,16 +42795,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -42116,10 +43141,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -42843,16 +43868,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -43436,10 +44463,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -44411,16 +45438,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -44858,10 +45887,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -45958,16 +46987,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -46405,10 +47436,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -47430,16 +48461,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -48023,10 +49056,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -48308,16 +49341,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -48472,10 +49507,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -49578,7 +50613,7 @@ declare namespace Phaser { * @param line The line to get the distance from. * @param point The point to get the shortest distance to. */ - static GetShortestDistance(line: Phaser.Geom.Line, point: Phaser.Geom.Point | object): O; + static GetShortestDistance(line: Phaser.Geom.Line, point: Phaser.Types.Math.Vector2Like): boolean | number; /** * Calculate the height of the given line. @@ -50082,8 +51117,9 @@ declare namespace Phaser { * @param normals Optional vertex normals array. If you don't have one, pass `null` or an empty array. * @param colors An array of colors, one per vertex, or a single color value applied to all vertices. Default 0xffffff. * @param alphas An array of alpha values, one per vertex, or a single alpha value applied to all vertices. Default 1. + * @param flipUV Flip the UV coordinates? Default false. */ - function GenerateVerts(vertices: number[], uvs: number[], indicies?: number[], containsZ?: boolean, normals?: number[], colors?: number | number[], alphas?: number | number[]): Phaser.Types.Geom.Mesh.GenerateVertsResult; + function GenerateVerts(vertices: number[], uvs: number[], indicies?: number[], containsZ?: boolean, normals?: number[], colors?: number | number[], alphas?: number | number[], flipUV?: boolean): Phaser.Types.Geom.Mesh.GenerateVertsResult; /** * Parses a Wavefront OBJ File, extracting the models from it and returning them in an array. @@ -50739,6 +51775,16 @@ declare namespace Phaser { /** * Constructs new Rectangle or repositions and resizes an existing Rectangle so that all of the given points are on or within its bounds. + * + * The `points` parameter is an array of Point-like objects: + * + * ```js + * const points = [ + * [100, 200], + * [200, 400], + * { x: 30, y: 60 } + * ] + * ``` * @param points An array of points (either arrays with two elements corresponding to the X and Y coordinate or an object with public `x` and `y` properties) which should be surrounded by the Rectangle. * @param out Optional Rectangle to adjust. */ @@ -65176,19 +66222,19 @@ declare namespace Phaser { type RoundedRectRadius = { /** - * Top left corner radius. + * Top left corner radius. Draw concave arc if this radius is negative. */ tl?: number; /** - * Top right corner radius. + * Top right corner radius. Draw concave arc if this radius is negative. */ tr?: number; /** - * Bottom right corner radius. + * Bottom right corner radius. Draw concave arc if this radius is negative. */ br?: number; /** - * Bottom left corner radius. + * Bottom left corner radius. Draw concave arc if this radius is negative. */ bl?: number; }; @@ -65509,6 +66555,8 @@ declare namespace Phaser { } namespace Particles { + type DeathZoneObject = Phaser.GameObjects.Particles.Zones.DeathZone | Phaser.Types.GameObjects.Particles.ParticleEmitterDeathZoneConfig | Phaser.Geom.Circle | Phaser.Geom.Ellipse | Phaser.Geom.Polygon | Phaser.Geom.Triangle; + type DeathZoneSource = { contains: Phaser.Types.GameObjects.Particles.DeathZoneSourceCallback; }; @@ -65564,6 +66612,28 @@ declare namespace Phaser { easeParams?: number[]; }; + /** + * Defines an operation yielding a value incremented continuously across an interpolated data set. + */ + type EmitterOpInterpolationConfig = { + /** + * The array of number values to interpolate through. + */ + values: number[]; + /** + * The interpolation function to use. Typically one of `linear`, `bezier` or `catmull` or a custom function. + */ + interpolation?: string | Function; + /** + * An optional ease function to use. This can be either a string from the EaseMap, or a custom function. + */ + ease?: string | Function; + /** + * An optional array of ease parameters to go with the ease. + */ + easeParams?: number[]; + }; + /** * The returned value sets what the property will be at the START of the particle's life, on emit. */ @@ -65576,7 +66646,7 @@ declare namespace Phaser { */ type EmitterOpOnUpdateCallback = (particle: Phaser.GameObjects.Particles.Particle, key: string, t: number, value: number)=>number; - type EmitterOpOnUpdateType = Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateCallback | Phaser.Types.GameObjects.Particles.EmitterOpEaseConfig | Phaser.Types.GameObjects.Particles.EmitterOpCustomUpdateConfig; + type EmitterOpOnUpdateType = Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateCallback | Phaser.Types.GameObjects.Particles.EmitterOpEaseConfig | Phaser.Types.GameObjects.Particles.EmitterOpCustomUpdateConfig | Phaser.Types.GameObjects.Particles.EmitterOpInterpolationConfig; /** * Defines an operation yielding a random value within a range. @@ -65638,6 +66708,8 @@ declare namespace Phaser { steps: number; }; + type EmitZoneObject = Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig | Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig | Phaser.GameObjects.Particles.Zones.EdgeZone | Phaser.GameObjects.Particles.Zones.RandomZone; + type GravityWellConfig = { /** * The x coordinate of the Gravity Well, in world space. @@ -65779,9 +66851,9 @@ declare namespace Phaser { */ name?: string; /** - * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#on}. + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#emitting}. */ - on?: boolean; + emitting?: boolean; /** * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleBringToTop}. */ @@ -65789,7 +66861,7 @@ declare namespace Phaser { /** * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleClass}. */ - particleClass?: Phaser.Types.GameObjects.Particles.ParticleClassConstructor; + particleClass?: Function; /** * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#radial}. */ @@ -65807,25 +66879,25 @@ declare namespace Phaser { */ visible?: boolean; /** - * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#accelerationX} (emit only). + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#accelerationX}. */ - accelerationX?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; + accelerationX?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType; /** - * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#accelerationY} (emit only). + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#accelerationY}. */ - accelerationY?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; + accelerationY?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType; /** - * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#alpha}. + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleAlpha}. */ alpha?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType; /** - * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#angle} (emit only). + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleAngle} (emit only). */ angle?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** - * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#bounce} (emit only). + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#bounce}. */ - bounce?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; + bounce?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType; /** * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#delay} (emit only). */ @@ -65835,27 +66907,27 @@ declare namespace Phaser { */ lifespan?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** - * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityX} (emit only). + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityX}. */ - maxVelocityX?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; + maxVelocityX?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType; /** - * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityY} (emit only). + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityY}. */ - maxVelocityY?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; + maxVelocityY?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType; /** - * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#moveToX} (emit only). If set, overrides `angle` and `speed` properties. + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#moveToX}. If set, overrides `angle` and `speed` properties. */ - moveToX?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; + moveToX?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType; /** - * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#moveToY} (emit only). If set, overrides `angle` and `speed` properties. + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#moveToY}. If set, overrides `angle` and `speed` properties. */ - moveToY?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; + moveToY?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType; /** * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity} (emit only). */ quantity?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** - * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#rotate}. + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleRotate}. */ rotate?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType; /** @@ -65863,11 +66935,11 @@ declare namespace Phaser { */ scale?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType; /** - * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#scaleX}. + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleScaleX}. */ scaleX?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType; /** - * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#scaleY}. + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleScaleY}. */ scaleY?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType; /** @@ -65883,15 +66955,23 @@ declare namespace Phaser { */ speedY?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** - * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#tint}. + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleTint}. */ tint?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType | Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType; /** - * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#x} (emit only). + * An array of color values that the Particles interpolate through during theif life. If set, overrides any `tint` property. + */ + color?: number[]; + /** + * The string-based name of the Easing function to use if you have enabled Particle color interpolation via the `color` property, otherwise has no effect. + */ + colorEase?: string; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleX}. */ x?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** - * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#y} (emit only). + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#particleY}. */ y?: Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType; /** @@ -65911,21 +66991,64 @@ declare namespace Phaser { */ followOffset?: object; /** - * x-coordinate of the offset. + * x coordinate of the offset. */ "followOffset.x"?: number; /** - * y-coordinate of the offset. + * y coordinate of the offset. */ "followOffset.y"?: number; /** * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#frames}. */ frame?: number | number[] | string | string[] | Phaser.Textures.Frame | Phaser.Textures.Frame[] | Phaser.Types.GameObjects.Particles.ParticleEmitterFrameConfig; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#texture}. Overrides any texture already set on the Emitter. + */ + texture?: string | Phaser.Textures.Frame; /** * Creates specified number of inactive particles and adds them to this emitter's pool. {@link Phaser.GameObjects.Particles.ParticleEmitter#reserve} */ reserve?: number; + /** + * If you wish to 'fast forward' the emitter in time, set this value to a number representing the amount of ms the emitter should advance. + */ + advance?: number; + /** + * Limit the emitter to emit particles for a maximum of `duration` ms. Default to zero, meaning 'forever'. + */ + duration?: number; + /** + * Limit the emitter to emit this exact number of particles and then stop. Default to zero, meaning no limit. + */ + stopAfter?: number; + /** + * A custom callback that sorts particles prior to rendering. Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#sortCallback}. + */ + sortCallback?: Phaser.Types.GameObjects.Particles.ParticleSortCallback; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#sortOrderAsc}. + */ + sortOrderAsc?: boolean; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#sortProperty}. + */ + sortProperty?: string; + /** + * Sets {@link Phaser.GameObjects.Particles.ParticleEmitter#tintFill}. + */ + tintFill?: boolean; + }; + + type ParticleEmitterCreatorConfig = Phaser.Types.GameObjects.GameObjectConfig & { + /** + * The key of the Texture this Emitter will use to render particles, as stored in the Texture Manager. + */ + key?: string; + /** + * The Particle Emitter configuration object. + */ + config?: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig; }; type ParticleEmitterDeathZoneConfig = { @@ -65964,6 +67087,10 @@ declare namespace Phaser { * Whether one endpoint will be removed if it's identical to the other. */ seamless?: boolean; + /** + * The total number of particles this zone will emit before passing over to the next emission zone in the Emitter. + */ + total?: number; }; type ParticleEmitterFrameConfig = { @@ -65981,20 +67108,7 @@ declare namespace Phaser { quantity?: number; }; - type ParticleEmitterManagerConfig = { - /** - * The key of the Texture this Emitter Manager will use to render particles, as stored in the Texture Manager. - */ - key?: string; - /** - * An optional frame from the Texture this Emitter Manager will use to render particles. - */ - frame?: number | string; - /** - * Configuration settings for one or more emitters to create. - */ - emitters?: Phaser.Types.GameObjects.Particles.ParticleEmitterConfig | Phaser.Types.GameObjects.Particles.ParticleEmitterConfig[]; - }; + type ParticleEmitterOps = (accelerationX: Phaser.GameObjects.Particles.EmitterOp, accelerationY: Phaser.GameObjects.Particles.EmitterOp, alpha: Phaser.GameObjects.Particles.EmitterOp, angle: Phaser.GameObjects.Particles.EmitterOp, bounce: Phaser.GameObjects.Particles.EmitterOp, color: Phaser.GameObjects.Particles.EmitterColorOp, delay: Phaser.GameObjects.Particles.EmitterOp, lifespan: Phaser.GameObjects.Particles.EmitterOp, maxVelocityX: Phaser.GameObjects.Particles.EmitterOp, maxVelocityY: Phaser.GameObjects.Particles.EmitterOp, moveToX: Phaser.GameObjects.Particles.EmitterOp, moveToY: Phaser.GameObjects.Particles.EmitterOp, quantity: Phaser.GameObjects.Particles.EmitterOp, rotate: Phaser.GameObjects.Particles.EmitterOp, scaleX: Phaser.GameObjects.Particles.EmitterOp, scaleY: Phaser.GameObjects.Particles.EmitterOp, speedX: Phaser.GameObjects.Particles.EmitterOp, speedY: Phaser.GameObjects.Particles.EmitterOp, tint: Phaser.GameObjects.Particles.EmitterOp, x: Phaser.GameObjects.Particles.EmitterOp, y: Phaser.GameObjects.Particles.EmitterOp)=>void; type ParticleEmitterRandomZoneConfig = { /** @@ -66007,6 +67121,8 @@ declare namespace Phaser { type?: string; }; + type ParticleSortCallback = (a: Phaser.GameObjects.Particles.Particle, b: Phaser.GameObjects.Particles.Particle)=>void; + type RandomZoneSource = { /** * A function modifying its point argument. @@ -66128,13 +67244,13 @@ declare namespace Phaser { namespace Sprite { type SpriteConfig = Phaser.Types.GameObjects.GameObjectConfig & { /** - * The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager. */ - key?: string; + key?: string | Phaser.Textures.Texture; /** * An optional frame from the Texture this Game Object is rendering with. */ - frame?: number | string; + frame?: string | number; }; } @@ -70368,9 +71484,9 @@ declare namespace Phaser { */ type?: string; /** - * A custom class type to convert the objects in to. The default is {@link Phaser.GameObjects.Sprite}. A custom class should resemble Sprite or Image. + * A custom class type to convert the objects in to. The default is {@link Phaser.GameObjects.Sprite}. A custom class should resemble Sprite or Image; see {@link Phaser.Types.Tilemaps.CreateFromObjectsClassTypeConstructor}. */ - classType?: Phaser.Types.Tilemaps.CreateFromObjectsClassTypeConstructor; + classType?: Function; /** * By default, gid-based objects copy properties and respect the type of the tile at that gid and treat the object as an override. If this is true, they don't, and use only the fields set on the object itself. */ @@ -70574,7 +71690,7 @@ declare namespace Phaser { /** * The orientation of the map data (i.e. orthogonal, isometric, hexagonal), default 'orthogonal'. */ - orientation?: string; + orientation?: string | Phaser.Tilemaps.Orientation; /** * Determines the draw order of tilemap. Default is right-down. */ @@ -72106,16 +73222,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -72699,10 +73817,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -72960,18 +74078,19 @@ declare namespace Phaser { /** * Enables this Game Object's Body. - * @param reset Also reset the Body and place it at (x, y). - * @param x The horizontal position to place the Game Object and Body. - * @param y The horizontal position to place the Game Object and Body. - * @param enableGameObject Also activate this Game Object. - * @param showGameObject Also show this Game Object. + * If you reset the Body you must also pass `x` and `y`. + * @param reset Also reset the Body and place the Game Object at (x, y). + * @param x The horizontal position to place the Game Object, if `reset` is true. + * @param y The horizontal position to place the Game Object, if `reset` is true. + * @param enableGameObject Also set this Game Object's `active` to true. + * @param showGameObject Also set this Game Object's `visible` to true. */ - enableBody(reset: boolean, x: number, y: number, enableGameObject: boolean, showGameObject: boolean): this; + enableBody(reset?: boolean, x?: number, y?: number, enableGameObject?: boolean, showGameObject?: boolean): this; /** * Stops and disables this Game Object's Body. - * @param disableGameObject Also deactivate this Game Object. Default false. - * @param hideGameObject Also hide this Game Object. Default false. + * @param disableGameObject Also set this Game Object's `active` to false. Default false. + * @param hideGameObject Also set this Game Object's `visible` to false. Default false. */ disableBody(disableGameObject?: boolean, hideGameObject?: boolean): this; @@ -73826,16 +74945,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -74419,10 +75540,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -74680,18 +75801,19 @@ declare namespace Phaser { /** * Enables this Game Object's Body. - * @param reset Also reset the Body and place it at (x, y). - * @param x The horizontal position to place the Game Object and Body. - * @param y The horizontal position to place the Game Object and Body. - * @param enableGameObject Also activate this Game Object. - * @param showGameObject Also show this Game Object. + * If you reset the Body you must also pass `x` and `y`. + * @param reset Also reset the Body and place the Game Object at (x, y). + * @param x The horizontal position to place the Game Object, if `reset` is true. + * @param y The horizontal position to place the Game Object, if `reset` is true. + * @param enableGameObject Also set this Game Object's `active` to true. + * @param showGameObject Also set this Game Object's `visible` to true. */ - enableBody(reset: boolean, x: number, y: number, enableGameObject: boolean, showGameObject: boolean): this; + enableBody(reset?: boolean, x?: number, y?: number, enableGameObject?: boolean, showGameObject?: boolean): this; /** * Stops and disables this Game Object's Body. - * @param disableGameObject Also deactivate this Game Object. Default false. - * @param hideGameObject Also hide this Game Object. Default false. + * @param disableGameObject Also set this Game Object's `active` to false. Default false. + * @param hideGameObject Also set this Game Object's `visible` to false. Default false. */ disableBody(disableGameObject?: boolean, hideGameObject?: boolean): this; @@ -76009,17 +77131,18 @@ declare namespace Phaser { interface Enable { /** * Enables this Game Object's Body. - * @param reset Also reset the Body and place it at (x, y). - * @param x The horizontal position to place the Game Object and Body. - * @param y The horizontal position to place the Game Object and Body. - * @param enableGameObject Also activate this Game Object. - * @param showGameObject Also show this Game Object. + * If you reset the Body you must also pass `x` and `y`. + * @param reset Also reset the Body and place the Game Object at (x, y). + * @param x The horizontal position to place the Game Object, if `reset` is true. + * @param y The horizontal position to place the Game Object, if `reset` is true. + * @param enableGameObject Also set this Game Object's `active` to true. + * @param showGameObject Also set this Game Object's `visible` to true. */ - enableBody(reset: boolean, x: number, y: number, enableGameObject: boolean, showGameObject: boolean): this; + enableBody(reset?: boolean, x?: number, y?: number, enableGameObject?: boolean, showGameObject?: boolean): this; /** * Stops and disables this Game Object's Body. - * @param disableGameObject Also deactivate this Game Object. Default false. - * @param hideGameObject Also hide this Game Object. Default false. + * @param disableGameObject Also set this Game Object's `active` to false. Default false. + * @param hideGameObject Also set this Game Object's `visible` to false. Default false. */ disableBody(disableGameObject?: boolean, hideGameObject?: boolean): this; /** @@ -76564,7 +77687,7 @@ declare namespace Phaser { * * This should be either `Phaser.Physics.Arcade.Image`, `Phaser.Physics.Arcade.Sprite`, or a class extending one of those. */ - classType: Phaser.Types.GameObjects.Group.GroupClassTypeConstructor; + classType: Function; /** * The physics type of the Group's members. @@ -76630,8 +77753,9 @@ declare namespace Phaser { * @param body2 The second Body to separate. * @param overlapOnly If `true`, the bodies will only have their overlap data set and no separation will take place. * @param bias A value to add to the delta value during overlap checking. Used to prevent sprite tunneling. + * @param overlap If given then this value will be used as the overlap and no check will be run. */ - function SeparateX(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, overlapOnly: boolean, bias: number): boolean; + function SeparateX(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, overlapOnly: boolean, bias: number, overlap?: number): boolean; /** * Separates two overlapping bodies on the Y-axis (vertically). @@ -76643,8 +77767,9 @@ declare namespace Phaser { * @param body2 The second Body to separate. * @param overlapOnly If `true`, the bodies will only have their overlap data set and no separation will take place. * @param bias A value to add to the delta value during overlap checking. Used to prevent sprite tunneling. + * @param overlap If given then this value will be used as the overlap and no check will be run. */ - function SeparateY(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, overlapOnly: boolean, bias: number): boolean; + function SeparateY(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, overlapOnly: boolean, bias: number, overlap?: number): boolean; /** * A Static Arcade Physics Body. @@ -77594,9 +78719,8 @@ declare namespace Phaser { * @param body1 The first Body to be separated. * @param body2 The second Body to be separated. * @param overlapOnly If this a collide or overlap check? - * @param bias A small value added to the calculations. */ - separateCircle(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, overlapOnly?: boolean, bias?: number): boolean; + separateCircle(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, overlapOnly?: boolean): boolean; /** * Checks to see if two Bodies intersect at all. @@ -79511,16 +80635,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -80104,10 +81230,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -81497,16 +82623,18 @@ declare namespace Phaser { * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the left of the Game Object. + * Set this value with `setOrigin()`. */ - originX: number; + readonly originX: number; /** * The vertical origin of this Game Object. * The origin maps the relationship between the size and position of the Game Object. * The default value is 0.5, meaning all Game Objects are positioned based on their center. * Setting the value to 0 means the position now relates to the top of the Game Object. + * Set this value with `setOrigin()`. */ - originY: number; + readonly originY: number; /** * The horizontal display origin of this Game Object. @@ -82090,10 +83218,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object. @@ -94708,7 +95836,7 @@ declare namespace Phaser { * An internal Camera that can be used to move around this Dynamic Texture. * * Control it just like you would any Scene Camera. The difference is that it only impacts - * the placement of Game Objects that you then draw to this texture. + * the placement of **Game Objects** (not textures) that you then draw to this texture. * * You can scroll, zoom and rotate this Camera. */ @@ -96475,7 +97603,7 @@ declare namespace Phaser { * @param camera The Camera to use when determining the world XY * @param layer The Tilemap Layer to act upon. */ - function CreateFromTiles(indexes: number | number[], replacements: number | number[], spriteConfig: Phaser.Types.GameObjects.Sprite.SpriteConfig, scene: Phaser.Scene, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): Phaser.GameObjects.Sprite[]; + function CreateFromTiles(indexes: number | number[], replacements: number | number[] | undefined, spriteConfig: Phaser.Types.GameObjects.Sprite.SpriteConfig, scene: Phaser.Scene, camera: Phaser.Cameras.Scene2D.Camera, layer: Phaser.Tilemaps.LayerData): Phaser.GameObjects.Sprite[]; /** * Returns the bounds in the given orthogonal layer that are within the cameras viewport. @@ -98783,7 +99911,7 @@ declare namespace Phaser { * @param camera The Camera to use when calculating the tile index from the world values. * @param layer The tile layer to use. If not given the current layer is used. */ - createFromTiles(indexes: number | any[], replacements: number | any[], spriteConfig: Phaser.Types.GameObjects.Sprite.SpriteConfig, scene?: Phaser.Scene, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.GameObjects.Sprite[] | null; + createFromTiles(indexes: number | any[], replacements: number | any[] | undefined, spriteConfig: Phaser.Types.GameObjects.Sprite.SpriteConfig, scene?: Phaser.Scene, camera?: Phaser.Cameras.Scene2D.Camera, layer?: string | number | Phaser.Tilemaps.TilemapLayer): Phaser.GameObjects.Sprite[] | null; /** * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the @@ -99709,7 +100837,7 @@ declare namespace Phaser { * @param scene The Scene to create the Sprites within. * @param camera The Camera to use when determining the world XY */ - createFromTiles(indexes: number | any[], replacements: number | any[], spriteConfig?: Phaser.Types.GameObjects.Sprite.SpriteConfig, scene?: Phaser.Scene, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.GameObjects.Sprite[]; + createFromTiles(indexes: number | any[], replacements: number | any[] | undefined, spriteConfig?: Phaser.Types.GameObjects.Sprite.SpriteConfig, scene?: Phaser.Scene, camera?: Phaser.Cameras.Scene2D.Camera): Phaser.GameObjects.Sprite[]; /** * Returns the tiles in the given layer that are within the cameras viewport. @@ -100938,10 +102066,10 @@ declare namespace Phaser { /** * Sets the scale of this Game Object. - * @param x The horizontal scale of this Game Object. + * @param x The horizontal scale of this Game Object. Default 1. * @param y The vertical scale of this Game Object. If not set it will use the `x` value. Default x. */ - setScale(x: number, y?: number): this; + setScale(x?: number, y?: number): this; /** * Sets the x position of this Game Object.